zbar-0.23/0000775000175000017500000000000013471606260007404 500000000000000zbar-0.23/include/0000775000175000017500000000000013471606255011033 500000000000000zbar-0.23/include/Makefile.am.inc0000664000175000017500000000071313466560613013561 00000000000000zincludedir = $(includedir)/zbar include_HEADERS = include/zbar.h zinclude_HEADERS = include/zbar/Scanner.h include/zbar/Decoder.h \ include/zbar/Exception.h include/zbar/Symbol.h include/zbar/Image.h \ include/zbar/ImageScanner.h include/zbar/Video.h include/zbar/Window.h \ include/zbar/Processor.h if HAVE_GTK zinclude_HEADERS += include/zbar/zbargtk.h endif if HAVE_QT zinclude_HEADERS += include/zbar/QZBar.h include/zbar/QZBarImage.h endif zbar-0.23/include/zbar/0000775000175000017500000000000013471606255011771 500000000000000zbar-0.23/include/zbar/QZBarImage.h0000664000175000017500000000431113471225716014002 00000000000000//------------------------------------------------------------------------ // Copyright 2008-2010 (c) Jeff Brown // // This file is part of the ZBar Bar Code Reader. // // The ZBar Bar Code Reader is free software; you can redistribute it // and/or modify it under the terms of the GNU Lesser Public License as // published by the Free Software Foundation; either version 2.1 of // the License, or (at your option) any later version. // // The ZBar Bar Code Reader 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 Lesser Public License for more details. // // You should have received a copy of the GNU Lesser Public License // along with the ZBar Bar Code Reader; if not, write to the Free // Software Foundation, Inc., 51 Franklin St, Fifth Floor, // Boston, MA 02110-1301 USA // // http://sourceforge.net/projects/zbar //------------------------------------------------------------------------ #ifndef _QZBARIMAGE_H_ #define _QZBARIMAGE_H_ /// @file /// QImage to Image type conversion wrapper #include #include namespace zbar { /// wrap a QImage and convert into a format suitable for scanning. class QZBarImage : public Image { public: /// construct a zbar library image based on an existing QImage. QZBarImage (const QImage &qimg) : qimg(qimg) { QImage::Format fmt = qimg.format(); if(fmt != QImage::Format_RGB32 && fmt != QImage::Format_ARGB32 && fmt != QImage::Format_ARGB32_Premultiplied) throw FormatError(); unsigned bpl = qimg.bytesPerLine(); unsigned width = bpl / 4; unsigned height = qimg.height(); set_size(width, height); set_format(zbar_fourcc('B','G','R','4')); #if QT_VERSION >= 0x050000 unsigned long datalen = qimg.byteCount(); #else unsigned long datalen = qimg.numBytes(); #endif set_data(qimg.bits(), datalen); if((width * 4 != bpl) || (width * height * 4 > datalen)) throw FormatError(); } private: QImage qimg; }; }; #endif zbar-0.23/include/zbar/zbargtk.h0000664000175000017500000001677713471225716013547 00000000000000/*------------------------------------------------------------------------ * Copyright 2008-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef __ZBAR_GTK_H__ #define __ZBAR_GTK_H__ /* * NOTE: before modifying this file, please see: * * https://wiki.gnome.org/Projects/GObjectIntrospection/Annotations/ * https://gi.readthedocs.io/en/latest/annotations/giannotations.html * * For the annotations needed for Gobject Introspection (GIR) to work */ /** * SECTION:ZBarGtk * @short_description: barcode reader GTK+ 2.x widget * @Title: ZBar Gtk bindings * @include: zbar/zbargtk.h * * embeds a barcode reader directly into a GTK+ based GUI. the widget * can process barcodes from a video source (using the * #ZBarGtk:video-device and #ZBarGtk:video-enabled properties) or * from individual GdkPixbufs supplied to zbar_gtk_scan_image() * * Since: 1.0 */ #include #include #include #include G_BEGIN_DECLS /* --- type macros --- */ #define ZBAR_TYPE_GTK (zbar_gtk_get_type()) #define ZBAR_GTK(object) (G_TYPE_CHECK_INSTANCE_CAST((object), ZBAR_TYPE_GTK, ZBarGtk)) #define ZBAR_GTK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), ZBAR_TYPE_GTK, ZBarGtkClass)) #define ZBAR_IS_GTK(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), ZBAR_TYPE_GTK)) #define ZBAR_IS_GTK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), ZBAR_TYPE_GTK)) #define ZBAR_GTK_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), ZBAR_TYPE_GTK, ZBarGtkClass)) /* --- typedefs & structures --- */ typedef struct _ZBarGtk ZBarGtk; typedef struct _ZBarGtkClass ZBarGtkClass; /** * _ZBarGtk: (rename-to ZBarGtk) (ref-func zbar_gtk_new) (get-value-func zbar_gtk_get_type) * @widget: pointer to GtkWidget * @_private: used internally */ struct _ZBarGtk { GtkWidget widget; gpointer *_private; /* properties */ /* * ZBarGtk:video-device: * * the currently set video device. * * setting a new device opens it and automatically sets * #ZBarGtk:video-enabled. set the empty string ("") or NULL to * close. */ /* * ZBarGtk:video-enabled: * * video device streaming state. * * use to pause/resume video scanning. */ /* * ZBarGtk:video-opened: * * video device opened state. * * (re)setting #ZBarGtk:video-device should eventually cause it * to be opened or closed. any errors while streaming/scanning * will also cause the device to be closed */ }; /** * _ZBarGtkClass: */ struct _ZBarGtkClass { GtkWidgetClass parent_class; /* signals */ /** * ZBarGtk::decoded: * @widget: the object that received the signal * @symbol_type: the type of symbol decoded (a zbar_symbol_type_t) * @data: the data decoded from the symbol * * emitted when a barcode is decoded from an image. * the symbol type and contained data are provided as separate * parameters */ void (*decoded) (ZBarGtk *zbar, zbar_symbol_type_t symbol_type, const char *data); /** * ZBarGtk::decoded-text: * @widget: the object that received the signal * @text: the decoded data prefixed by the string name of the * symbol type (separated by a colon) * * emitted when a barcode is decoded from an image. * the symbol type name is prefixed to the data, separated by a * colon */ void (*decoded_text) (ZBarGtk *zbar, const char *text); /** * ZBarGtk:scan-image: * @widget: the object that received the signal * @image: the image to scan for barcodes */ void (*scan_image) (ZBarGtk *zbar, GdkPixbuf *image); }; /** * zbar_gtk_get_type: (skip) * Returns ZBarGtk type * @returns: #GType */ GType zbar_gtk_get_type(void) G_GNUC_CONST; /** * zbar_gtk_new: * create a new barcode reader widget instance. * initially has no associated video device or image. * * Returns: (transfer full): a new #ZBarGtk widget instance */ GtkWidget *zbar_gtk_new(void); /** * zbar_gtk_scan_image: * @zbar: pointer to #ZBarGtk * @image: the GdkPixbuf used to store the image * */ void zbar_gtk_scan_image(ZBarGtk *zbar, GdkPixbuf *image); /** * zbar_gtk_get_video_device: * retrieve the currently opened video device. * @zbar: pointer to #ZBarGtk * * Returns: the current video device or NULL if no device is opened */ const char *zbar_gtk_get_video_device(ZBarGtk *zbar); /** * zbar_gtk_set_video_device: * open a new video device. * @zbar: pointer to #ZBarGtk * @video_device: (nullable) (type filename) : the platform specific name of * the device to open. use NULL to close a currently opened device. * * @note since opening a device may take some time, this call will * return immediately and the device will be opened asynchronously */ void zbar_gtk_set_video_device(ZBarGtk *zbar, const char *video_device); /** * zbar_gtk_get_video_enabled: * retrieve the current video enabled state. * @zbar: pointer to #ZBarGtk * * Returns: true if video scanning is currently enabled, false otherwise */ gboolean zbar_gtk_get_video_enabled(ZBarGtk *zbar); /** * zbar_gtk_set_video_enabled: * enable/disable video scanning. * @zbar: pointer to #ZBarGtk * @video_enabled: true to enable video scanning, false to disable * * has no effect unless a video device is opened */ void zbar_gtk_set_video_enabled(ZBarGtk *zbar, gboolean video_enabled); /** * zbar_gtk_get_video_opened: * retrieve the current video opened state. * @zbar: pointer to #ZBarGtk * * Returns: true if video device is currently opened, false otherwise */ gboolean zbar_gtk_get_video_opened(ZBarGtk *zbar); /** * zbar_gtk_request_video_size: * set video camera resolution. * @zbar: pointer to #ZBarGtk * @width: width in pixels * @height: height in pixels * * @note this call must be made before video is initialized */ void zbar_gtk_request_video_size(ZBarGtk *zbar, int width, int height); /** * zbar_gtk_image_from_pixbuf: * utility function to populate a zbar_image_t from a GdkPixbuf. * @image: (type gpointer) : the zbar library image destination to populate * @pixbuf: the GdkPixbuf source * * Returns: TRUE if successful or FALSE if the conversion could not be * performed for some reason */ gboolean zbar_gtk_image_from_pixbuf(zbar_image_t *image, GdkPixbuf *pixbuf); G_END_DECLS #endif zbar-0.23/include/zbar/Processor.h0000664000175000017500000001547413471225716014053 00000000000000//------------------------------------------------------------------------ // Copyright 2007-2010 (c) Jeff Brown // // This file is part of the ZBar Bar Code Reader. // // The ZBar Bar Code Reader is free software; you can redistribute it // and/or modify it under the terms of the GNU Lesser Public License as // published by the Free Software Foundation; either version 2.1 of // the License, or (at your option) any later version. // // The ZBar Bar Code Reader 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 Lesser Public License for more details. // // You should have received a copy of the GNU Lesser Public License // along with the ZBar Bar Code Reader; if not, write to the Free // Software Foundation, Inc., 51 Franklin St, Fifth Floor, // Boston, MA 02110-1301 USA // // http://sourceforge.net/projects/zbar //------------------------------------------------------------------------ #ifndef _ZBAR_PROCESSOR_H_ #define _ZBAR_PROCESSOR_H_ /// @file /// Processor C++ wrapper #ifndef _ZBAR_H_ # error "include zbar.h in your application, **not** zbar/Processor.h" #endif #include "Exception.h" #include "Image.h" namespace zbar { /// high-level self-contained image processor. /// processes video and images for barcodes, optionally displaying /// images to a library owned output window class Processor { public: /// value to pass for no timeout. static const int FOREVER = -1; /// constructor. Processor (bool threaded = true, const char *video_device = "", bool enable_display = true) { _processor = zbar_processor_create(threaded); if(!_processor) throw std::bad_alloc(); init(video_device, enable_display); } ~Processor () { zbar_processor_destroy(_processor); } /// cast to C processor object. operator zbar_processor_t* () { return(_processor); } /// opens a video input device and/or prepares to display output. /// see zbar_processor_init() void init (const char *video_device = "", bool enable_display = true) { if(zbar_processor_init(_processor, video_device, enable_display)) throw_exception(_processor); } /// setup result handler callback. /// see zbar_processor_set_data_handler() void set_handler (Image::Handler& handler) { zbar_processor_set_data_handler(_processor, handler, &handler); } /// set config for indicated symbology (0 for all) to specified value. /// @see zbar_processor_set_config() /// @since 0.4 int set_config (zbar_symbol_type_t symbology, zbar_config_t config, int value) { return(zbar_processor_set_config(_processor, symbology, config, value)); } /// set config parsed from configuration string. /// @see zbar_processor_parse_config() /// @since 0.4 int set_config (std::string cfgstr) { return(zbar_processor_parse_config(_processor, cfgstr.c_str())); } /// retrieve the current state of the output window. /// see zbar_processor_is_visible() bool is_visible () { int rc = zbar_processor_is_visible(_processor); if(rc < 0) throw_exception(_processor); return(rc != 0); } /// show or hide the display window owned by the library. /// see zbar_processor_set_visible() void set_visible (bool visible = true) { if(zbar_processor_set_visible(_processor, visible) < 0) throw_exception(_processor); } /// control the processor in free running video mode. /// see zbar_processor_set_active() void set_active (bool active = true) { if(zbar_processor_set_active(_processor, active) < 0) throw_exception(_processor); } /// retrieve decode results for last scanned image. /// @see zbar_processor_get_results() /// @since 0.10 const SymbolSet get_results () const { return(SymbolSet(zbar_processor_get_results(_processor))); } /// wait for input to the display window from the user. /// see zbar_processor_user_wait() int user_wait (int timeout = FOREVER) { int rc = zbar_processor_user_wait(_processor, timeout); if(rc < 0) throw_exception(_processor); return(rc); } /// process from the video stream until a result is available. /// see zbar_process_one() void process_one (int timeout = FOREVER) { if(zbar_process_one(_processor, timeout) < 0) throw_exception(_processor); } /// process the provided image for barcodes. /// see zbar_process_image() void process_image (Image& image) { if(zbar_process_image(_processor, image) < 0) throw_exception(_processor); } /// process the provided image for barcodes. /// see zbar_process_image() Processor& operator<< (Image& image) { process_image(image); return(*this); } /// force specific input and output formats for debug/testing. /// see zbar_processor_force_format() void force_format (unsigned long input_format, unsigned long output_format) { if(zbar_processor_force_format(_processor, input_format, output_format)) throw_exception(_processor); } /// force specific input and output formats for debug/testing. /// see zbar_processor_force_format() void force_format (std::string& input_format, std::string& output_format) { unsigned long ifourcc = zbar_fourcc_parse(input_format.c_str()); unsigned long ofourcc = zbar_fourcc_parse(output_format.c_str()); if(zbar_processor_force_format(_processor, ifourcc, ofourcc)) throw_exception(_processor); } /// request a preferred size for the video image from the device. /// see zbar_processor_request_size() /// @since 0.6 void request_size (int width, int height) { zbar_processor_request_size(_processor, width, height); } /// request a preferred driver interface version for debug/testing. /// see zbar_processor_request_interface() /// @since 0.6 void request_interface (int version) { zbar_processor_request_interface(_processor, version); } /// request a preferred I/O mode for debug/testing. /// see zbar_processor_request_iomode() /// @since 0.7 void request_iomode (int iomode) { if(zbar_processor_request_iomode(_processor, iomode)) throw_exception(_processor); } private: zbar_processor_t *_processor; }; } #endif zbar-0.23/include/zbar/ImageScanner.h0000664000175000017500000001044413471225716014420 00000000000000//------------------------------------------------------------------------ // Copyright 2007-2009 (c) Jeff Brown // // This file is part of the ZBar Bar Code Reader. // // The ZBar Bar Code Reader is free software; you can redistribute it // and/or modify it under the terms of the GNU Lesser Public License as // published by the Free Software Foundation; either version 2.1 of // the License, or (at your option) any later version. // // The ZBar Bar Code Reader 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 Lesser Public License for more details. // // You should have received a copy of the GNU Lesser Public License // along with the ZBar Bar Code Reader; if not, write to the Free // Software Foundation, Inc., 51 Franklin St, Fifth Floor, // Boston, MA 02110-1301 USA // // http://sourceforge.net/projects/zbar //------------------------------------------------------------------------ #ifndef _ZBAR_IMAGE_SCANNER_H_ #define _ZBAR_IMAGE_SCANNER_H_ /// @file /// Image Scanner C++ wrapper #ifndef _ZBAR_H_ # error "include zbar.h in your application, **not** zbar/ImageScanner.h" #endif #include "Image.h" namespace zbar { /// mid-level image scanner interface. /// reads barcodes from a 2-D Image class ImageScanner { public: /// constructor. ImageScanner (zbar_image_scanner_t *scanner = NULL) { if(scanner) _scanner = scanner; else _scanner = zbar_image_scanner_create(); } ~ImageScanner () { zbar_image_scanner_destroy(_scanner); } /// cast to C image_scanner object operator zbar_image_scanner_t* () const { return(_scanner); } /// setup result handler callback. void set_handler (Image::Handler &handler) { zbar_image_scanner_set_data_handler(_scanner, handler, &handler); } /// request sending decoded codes via D-Bus /// @see zbar_processor_parse_config() /// @since 0.21 int request_dbus(bool enabled) { return zbar_image_scanner_request_dbus(_scanner, enabled); } /// set config for indicated symbology (0 for all) to specified value. /// @see zbar_image_scanner_set_config() /// @since 0.4 int set_config (zbar_symbol_type_t symbology, zbar_config_t config, int value) { return(zbar_image_scanner_set_config(_scanner, symbology, config, value)); } /// set config for indicated symbology (0 for all) to specified value. /// @see zbar_image_scanner_set_config() /// @since 0.22 int get_config (zbar_symbol_type_t symbology, zbar_config_t config, int &value) { return(zbar_image_scanner_get_config(_scanner, symbology, config, &value)); } /// set config parsed from configuration string. /// @see zbar_image_scanner_parse_config() /// @since 0.4 int set_config (std::string cfgstr) { return(zbar_image_scanner_parse_config(_scanner, cfgstr.c_str())); } /// enable or disable the inter-image result cache. /// see zbar_image_scanner_enable_cache() void enable_cache (bool enable = true) { zbar_image_scanner_enable_cache(_scanner, enable); } /// remove previous results from scanner and image. /// @see zbar_image_scanner_recycle_image() /// @since 0.10 void recycle_image (Image &image) { zbar_image_scanner_recycle_image(_scanner, image); } /// retrieve decode results for last scanned image. /// @see zbar_image_scanner_get_results() /// @since 0.10 const SymbolSet get_results () const { return(SymbolSet(zbar_image_scanner_get_results(_scanner))); } /// scan for symbols in provided image. /// see zbar_scan_image() int scan (Image& image) { return(zbar_scan_image(_scanner, image)); } /// scan for symbols in provided image. /// see zbar_scan_image() ImageScanner& operator<< (Image& image) { scan(image); return(*this); } private: zbar_image_scanner_t *_scanner; }; } #endif zbar-0.23/include/zbar/Symbol.h0000664000175000017500000003073613471225716013337 00000000000000//------------------------------------------------------------------------ // Copyright 2007-2010 (c) Jeff Brown // // This file is part of the ZBar Bar Code Reader. // // The ZBar Bar Code Reader is free software; you can redistribute it // and/or modify it under the terms of the GNU Lesser Public License as // published by the Free Software Foundation; either version 2.1 of // the License, or (at your option) any later version. // // The ZBar Bar Code Reader 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 Lesser Public License for more details. // // You should have received a copy of the GNU Lesser Public License // along with the ZBar Bar Code Reader; if not, write to the Free // Software Foundation, Inc., 51 Franklin St, Fifth Floor, // Boston, MA 02110-1301 USA // // http://sourceforge.net/projects/zbar //------------------------------------------------------------------------ #ifndef _ZBAR_SYMBOL_H_ #define _ZBAR_SYMBOL_H_ /// @file /// Symbol C++ wrapper #ifndef _ZBAR_H_ # error "include zbar.h in your application, **not** zbar/Symbol.h" #endif #include #include #include #include namespace zbar { class SymbolIterator; /// container for decoded result symbols associated with an image /// or a composite symbol. class SymbolSet { public: /// constructor. SymbolSet (const zbar_symbol_set_t *syms = NULL) : _syms(syms) { ref(); } /// copy constructor. SymbolSet (const SymbolSet& syms) : _syms(syms._syms) { ref(); } /// destructor. ~SymbolSet () { ref(-1); } /// assignment. SymbolSet& operator= (const SymbolSet& syms) { syms.ref(); ref(-1); _syms = syms._syms; return(*this); } /// truth testing. bool operator! () const { return(!_syms || !get_size()); } /// manipulate reference count. void ref (int delta = 1) const { if(_syms) zbar_symbol_set_ref((zbar_symbol_set_t*)_syms, delta); } /// cast to C symbol set. operator const zbar_symbol_set_t* () const { return(_syms); } int get_size () const { return((_syms) ? zbar_symbol_set_get_size(_syms) : 0); } /// create a new SymbolIterator over decoded results. SymbolIterator symbol_begin() const; /// return a SymbolIterator suitable for ending iteration. const SymbolIterator symbol_end() const; private: const zbar_symbol_set_t *_syms; }; /// decoded barcode symbol result object. stores type, data, and /// image location of decoded symbol class Symbol { public: /// image pixel location (x, y) coordinate tuple. class Point { public: int x; ///< x-coordinate. int y; ///< y-coordinate. Point () { } Point(int x, int y) : x(x), y(y) { } /// copy constructor. Point (const Point& pt) : x(pt.x), y(pt.y) { } /// assignment. Point& operator= (const Point& pt) { x = pt.x; y = pt.y; return(*this); } }; /// iteration over Point objects in a symbol location polygon. class PointIterator : public std::iterator { public: /// constructor. PointIterator (const Symbol *sym = NULL, int index = 0) : _sym(sym), _index(index) { if(sym) sym->ref(1); if(!sym || (unsigned)_index >= zbar_symbol_get_loc_size(*_sym)) _index = -1; } /// copy constructor. PointIterator (const PointIterator& iter) : _sym(iter._sym), _index(iter._index) { if(_sym) _sym->ref(); } /// destructor. ~PointIterator () { if(_sym) _sym->ref(-1); } /// assignment. PointIterator& operator= (const PointIterator& iter) { if(iter._sym) iter._sym->ref(); if(_sym) _sym->ref(-1); _sym = iter._sym; _index = iter._index; return(*this); } /// truth testing. bool operator! () const { return(!_sym || _index < 0); } /// advance iterator to next Point. PointIterator& operator++ () { unsigned int i = ++_index; if(!_sym || i >= zbar_symbol_get_loc_size(*_sym)) _index = -1; return(*this); } /// retrieve currently referenced Point. const Point operator* () const { assert(!!*this); if(!*this) return(Point()); return(Point(zbar_symbol_get_loc_x(*_sym, _index), zbar_symbol_get_loc_y(*_sym, _index))); } /// test if two iterators refer to the same Point in the same /// Symbol. bool operator== (const PointIterator& iter) const { return(_index == iter._index && ((_index < 0) || _sym == iter._sym)); } /// test if two iterators refer to the same Point in the same /// Symbol. bool operator!= (const PointIterator& iter) const { return(!(*this == iter)); } private: const Symbol *_sym; int _index; }; /// constructor. Symbol (const zbar_symbol_t *sym = NULL) : _xmlbuf(NULL), _xmllen(0) { init(sym); ref(); } /// copy constructor. Symbol (const Symbol& sym) : _sym(sym._sym), _type(sym._type), _data(sym._data), _xmlbuf(NULL), _xmllen(0) { ref(); } /// destructor. ~Symbol () { if(_xmlbuf) free(_xmlbuf); ref(-1); } /// assignment. Symbol& operator= (const Symbol& sym) { sym.ref(1); ref(-1); _sym = sym._sym; _type = sym._type; _data = sym._data; return(*this); } Symbol& operator= (const zbar_symbol_t *sym) { if(sym) zbar_symbol_ref(sym, 1); ref(-1); init(sym); return(*this); } /// truth testing. bool operator! () const { return(!_sym); } void ref (int delta = 1) const { if(_sym) zbar_symbol_ref((zbar_symbol_t*)_sym, delta); } /// cast to C symbol. operator const zbar_symbol_t* () const { return(_sym); } /// test if two Symbol objects refer to the same C symbol. bool operator== (const Symbol& sym) const { return(_sym == sym._sym); } /// test if two Symbol objects refer to the same C symbol. bool operator!= (const Symbol& sym) const { return(!(*this == sym)); } /// retrieve type of decoded symbol. zbar_symbol_type_t get_type () const { return(_type); } /// retrieve the string name of the symbol type. const std::string get_type_name () const { return(zbar_get_symbol_name(_type)); } /// retrieve the string name for any addon. /// @deprecated in 0.11 const std::string get_addon_name () const { return(zbar_get_addon_name(_type)); } /// retrieve data decoded from symbol. const std::string get_data () const { return(_data); } /// retrieve length of binary data unsigned get_data_length () const { return((_sym) ? zbar_symbol_get_data_length(_sym) : 0); } /// retrieve inter-frame coherency count. /// see zbar_symbol_get_count() /// @since 0.5 int get_count () const { return((_sym) ? zbar_symbol_get_count(_sym) : -1); } /// retrieve loosely defined relative quality metric. /// see zbar_symbol_get_quality() /// @since 0.11 int get_quality () const { return((_sym) ? zbar_symbol_get_quality(_sym) : 0); } SymbolSet get_components () const { return(SymbolSet((_sym) ? zbar_symbol_get_components(_sym) : NULL)); } /// create a new PointIterator at the start of the location /// polygon. PointIterator point_begin() const { return(PointIterator(this)); } /// return a PointIterator suitable for ending iteration. const PointIterator point_end() const { return(PointIterator()); } /// see zbar_symbol_get_loc_size(). int get_location_size () const { return((_sym) ? zbar_symbol_get_loc_size(_sym) : 0); } /// see zbar_symbol_get_loc_x(). int get_location_x (unsigned index) const { return((_sym) ? zbar_symbol_get_loc_x(_sym, index) : -1); } /// see zbar_symbol_get_loc_y(). int get_location_y (unsigned index) const { return((_sym) ? zbar_symbol_get_loc_y(_sym, index) : -1); } /// see zbar_symbol_get_orientation(). /// @since 0.11 int get_orientation () const { return(zbar_symbol_get_orientation(_sym)); } /// see zbar_symbol_xml(). const std::string xml () const { if(!_sym) return(""); return(zbar_symbol_xml(_sym, (char**)&_xmlbuf, (unsigned*)&_xmllen)); } protected: /// (re)initialize Symbol from C symbol object. void init (const zbar_symbol_t *sym = NULL) { _sym = sym; if(sym) { _type = zbar_symbol_get_type(sym); _data = std::string(zbar_symbol_get_data(sym), zbar_symbol_get_data_length(sym)); } else { _type = ZBAR_NONE; _data = ""; } } private: const zbar_symbol_t *_sym; zbar_symbol_type_t _type; std::string _data; char *_xmlbuf; unsigned _xmllen; }; /// iteration over Symbol result objects in a scanned Image or SymbolSet. class SymbolIterator : public std::iterator { public: /// default constructor. SymbolIterator () { } /// constructor. SymbolIterator (const SymbolSet &syms) : _syms(syms) { const zbar_symbol_set_t *zsyms = _syms; if(zsyms) _sym = zbar_symbol_set_first_symbol(zsyms); } /// copy constructor. SymbolIterator (const SymbolIterator& iter) : _syms(iter._syms) { const zbar_symbol_set_t *zsyms = _syms; if(zsyms) _sym = zbar_symbol_set_first_symbol(zsyms); } ~SymbolIterator () { } /// assignment. SymbolIterator& operator= (const SymbolIterator& iter) { _syms = iter._syms; _sym = iter._sym; return(*this); } bool operator! () const { return(!_syms || !_sym); } /// advance iterator to next Symbol. SymbolIterator& operator++ () { if(!!_sym) _sym = zbar_symbol_next(_sym); else if(!!_syms) _sym = zbar_symbol_set_first_symbol(_syms); return(*this); } /// retrieve currently referenced Symbol. const Symbol operator* () const { return(_sym); } /// access currently referenced Symbol. const Symbol* operator-> () const { return(&_sym); } /// test if two iterators refer to the same Symbol bool operator== (const SymbolIterator& iter) const { // it is enough to test the symbols, as they belong // to only one set (also simplifies invalid case) return(_sym == iter._sym); } /// test if two iterators refer to the same Symbol bool operator!= (const SymbolIterator& iter) const { return(!(*this == iter)); } const SymbolIterator end () const { return(SymbolIterator()); } private: SymbolSet _syms; Symbol _sym; }; inline SymbolIterator SymbolSet::symbol_begin () const { return(SymbolIterator(*this)); } inline const SymbolIterator SymbolSet::symbol_end () const { return(SymbolIterator()); } /// @relates Symbol /// stream the string representation of a Symbol. static inline std::ostream& operator<< (std::ostream& out, const Symbol& sym) { out << sym.get_type_name() << ":" << sym.get_data(); return(out); } } #endif zbar-0.23/include/zbar/Window.h0000664000175000017500000000723513471225716013337 00000000000000//------------------------------------------------------------------------ // Copyright 2007-2009 (c) Jeff Brown // // This file is part of the ZBar Bar Code Reader. // // The ZBar Bar Code Reader is free software; you can redistribute it // and/or modify it under the terms of the GNU Lesser Public License as // published by the Free Software Foundation; either version 2.1 of // the License, or (at your option) any later version. // // The ZBar Bar Code Reader 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 Lesser Public License for more details. // // You should have received a copy of the GNU Lesser Public License // along with the ZBar Bar Code Reader; if not, write to the Free // Software Foundation, Inc., 51 Franklin St, Fifth Floor, // Boston, MA 02110-1301 USA // // http://sourceforge.net/projects/zbar //------------------------------------------------------------------------ #ifndef _ZBAR_WINDOW_H_ #define _ZBAR_WINDOW_H_ /// @file /// Output Window C++ wrapper #ifndef _ZBAR_H_ # error "include zbar.h in your application, **not** zbar/Window.h" #endif #include "Image.h" namespace zbar { /// mid-level output window abstraction. /// displays images to user-specified platform specific output window class Window { public: /// constructor. Window (zbar_window_t *window = NULL) { if(window) _window = window; else _window = zbar_window_create(); } /// constructor. Window (void *x11_display_w32_hwnd, unsigned long x11_drawable) { _window = zbar_window_create(); attach(x11_display_w32_hwnd, x11_drawable); } ~Window () { zbar_window_destroy(_window); } /// cast to C window object. operator zbar_window_t* () const { return(_window); } /// associate reader with an existing platform window. /// see zbar_window_attach() void attach (void *x11_display_w32_hwnd, unsigned long x11_drawable = 0) { if(zbar_window_attach(_window, x11_display_w32_hwnd, x11_drawable) < 0) throw_exception(_window); } /// control content level of the reader overlay. /// see zbar_window_set_overlay() void set_overlay (int level) { zbar_window_set_overlay(_window, level); } /// retrieve current content level of reader overlay. /// see zbar_window_get_overlay() /// draw a new image into the output window. /// see zbar_window_draw() void draw (Image& image) { if(zbar_window_draw(_window, image) < 0) throw_exception(_window); } /// clear the image from the output window. /// see zbar_window_draw() void clear () { if(zbar_window_draw(_window, NULL) < 0) throw_exception(_window); } /// redraw the last image. /// zbar_window_redraw() void redraw () { if(zbar_window_redraw(_window) < 0) throw_exception(_window); } /// resize the image window. /// zbar_window_resize() void resize (unsigned width, unsigned height) { if(zbar_window_resize(_window, width, height) < 0) throw_exception(_window); } private: zbar_window_t *_window; }; /// select a compatible format between video input and output window. /// see zbar_negotiate_format() static inline void negotiate_format (Video& video, Window& window) { if(zbar_negotiate_format(video, window) < 0) throw_exception(video); } } #endif zbar-0.23/include/zbar/QZBar.h0000664000175000017500000001462113471225716013044 00000000000000//------------------------------------------------------------------------ // Copyright 2008-2009 (c) Jeff Brown // // This file is part of the ZBar Bar Code Reader. // // The ZBar Bar Code Reader is free software; you can redistribute it // and/or modify it under the terms of the GNU Lesser Public License as // published by the Free Software Foundation; either version 2.1 of // the License, or (at your option) any later version. // // The ZBar Bar Code Reader 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 Lesser Public License for more details. // // You should have received a copy of the GNU Lesser Public License // along with the ZBar Bar Code Reader; if not, write to the Free // Software Foundation, Inc., 51 Franklin St, Fifth Floor, // Boston, MA 02110-1301 USA // // http://sourceforge.net/projects/zbar //------------------------------------------------------------------------ #ifndef _QZBAR_H_ #define _QZBAR_H_ /// @file /// Barcode Reader Qt4 Widget #include #if QT_VERSION >= 0x050000 # include #else # include #endif #include namespace zbar { class QZBarThread; /// barcode reader Qt4 widget. /// embeds a barcode reader directly into a Qt4 based GUI. the widget /// can process barcodes from a video source (using the QZBar::videoDevice /// and QZBar::videoEnabled properties) or from individual QImages /// supplied to the QZBar::scanImage() slot /// @since 1.5 class QZBar : public QWidget { Q_OBJECT /// the currently opened video device. /// /// setting a new device opens it and automatically sets /// QZBar::videoEnabled /// /// @see videoDevice(), setVideoDevice() Q_PROPERTY(QString videoDevice READ videoDevice WRITE setVideoDevice DESIGNABLE false) /// video device streaming state. /// /// use to pause/resume video scanning. /// /// @see isVideoEnabled(), setVideoEnabled() Q_PROPERTY(bool videoEnabled READ isVideoEnabled WRITE setVideoEnabled DESIGNABLE false) /// video device opened state. /// /// (re)setting QZBar::videoDevice should eventually cause it /// to be opened or closed. any errors while streaming/scanning /// will also cause the device to be closed /// /// @see isVideoOpened() Q_PROPERTY(bool videoOpened READ isVideoOpened DESIGNABLE false) public: // Should match the types at video_control_type_e // get_controls() will do the mapping between the two types. enum ControlType { Unknown, Integer, Menu, Button, Integer64, String, Boolean, }; /// constructs a barcode reader widget with the given @a parent QZBar(QWidget *parent = NULL, int verbosity = 0); ~QZBar(); /// retrieve the currently opened video device. /// @returns the current video device or the empty string if no /// device is opened QString videoDevice() const; /// retrieve the current video enabled state. /// @returns true if video scanning is currently enabled, false /// otherwise bool isVideoEnabled() const; /// retrieve the current video opened state. /// @returns true if video device is currently opened, false otherwise bool isVideoOpened() const; /// @{ /// @internal QSize sizeHint() const; int heightForWidth(int) const; QPaintEngine *paintEngine() const; /// @} public Q_SLOTS: /// open a new video device. /// /// use an empty string to close a currently opened device. /// /// @note since opening a device may take some time, this call will /// return immediately and the device will be opened asynchronously void setVideoDevice(const QString &videoDevice); /// enable/disable video scanning. /// has no effect unless a video device is opened void setVideoEnabled(bool videoEnabled = true); /// scan for barcodes in a QImage. void scanImage(const QImage &image); /// get controls from the camera device int get_controls(int index, char **name = NULL, char **group = NULL, enum ControlType *type = NULL, int *min = NULL, int *max = NULL, int *def = NULL, int *step = NULL); /// Get items for control menus QVector< QPair< int , QString > > get_menu(int index); // get/set controls from the camera device int set_control(char *name, bool value); int set_control(char *name, int value); int get_control(char *name, bool *value); int get_control(char *name, int *value); int set_config(std::string cfgstr); int set_config(zbar_symbol_type_t symbology, zbar_config_t config, int value); int get_config(zbar_symbol_type_t symbology, zbar_config_t config, int &value); void request_size(unsigned width, unsigned height, bool trigger = true); int get_resolution(int index, unsigned &width, unsigned &height, float &max_fps); unsigned videoWidth(); unsigned videoHeight(); int request_dbus(bool enabled); Q_SIGNALS: /// emitted when when a video device is opened or closed. /// /// (re)setting QZBar::videoDevice should eventually cause it /// to be opened or closed. any errors while streaming/scanning /// will also cause the device to be closed void videoOpened(bool videoOpened); /// emitted when a barcode is decoded from an image. /// the symbol type and contained data are provided as separate /// parameters. void decoded(int type, const QString &data); /// emitted when a barcode is decoded from an image. /// the symbol type name is prefixed to the data, separated by a /// colon void decodedText(const QString &text); /// @{ /// @internal protected: void attach(); void showEvent(QShowEvent*); void paintEvent(QPaintEvent*); void resizeEvent(QResizeEvent*); void changeEvent(QEvent*); void dragEnterEvent(QDragEnterEvent*); void dropEvent(QDropEvent*); protected Q_SLOTS: void sizeChange(); /// @} private: QZBarThread *thread; QString _videoDevice; bool _videoEnabled; bool _attached; }; }; #endif zbar-0.23/include/zbar/Exception.h0000664000175000017500000001104313471225716014016 00000000000000//------------------------------------------------------------------------ // Copyright 2007-2009 (c) Jeff Brown // // This file is part of the ZBar Bar Code Reader. // // The ZBar Bar Code Reader is free software; you can redistribute it // and/or modify it under the terms of the GNU Lesser Public License as // published by the Free Software Foundation; either version 2.1 of // the License, or (at your option) any later version. // // The ZBar Bar Code Reader 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 Lesser Public License for more details. // // You should have received a copy of the GNU Lesser Public License // along with the ZBar Bar Code Reader; if not, write to the Free // Software Foundation, Inc., 51 Franklin St, Fifth Floor, // Boston, MA 02110-1301 USA // // http://sourceforge.net/projects/zbar //------------------------------------------------------------------------ #ifndef _ZBAR_EXCEPTION_H_ #define _ZBAR_EXCEPTION_H_ /// @file /// C++ Exception definitions #ifndef _ZBAR_H_ # error "include zbar.h in your application, **not** zbar/Exception.h" #endif #include #include #include namespace zbar { /// base class for exceptions defined by this API. class Exception : public std::exception { public: /// create exception from C library error Exception (const void *obj = NULL) : std::exception(), _obj(obj) { } ~Exception () throw() { } /// retrieve error message virtual const char* what () const throw() { if(!_obj) return("zbar library unspecified generic error"); return(_zbar_error_string(_obj, 0)); } private: const void *_obj; }; /// internal library error. class InternalError : public Exception { public: /// create exception from C library error InternalError (const void *obj) : Exception(obj) { } }; /// unsupported request. class UnsupportedError : public Exception { public: /// create exception from C library error UnsupportedError (const void *obj) : Exception(obj) { } }; /// invalid request. class InvalidError : public Exception { public: /// create exception from C library error InvalidError (const void *obj) : Exception(obj) { } }; /// failed system call. class SystemError : public Exception { public: /// create exception from C library error SystemError (const void *obj) : Exception(obj) { } }; /// locking error. class LockingError : public Exception { public: /// create exception from C library error LockingError (const void *obj) : Exception(obj) { } }; /// all resources busy. class BusyError : public Exception { public: /// create exception from C library error BusyError (const void *obj) : Exception(obj) { } }; /// X11 display error. class XDisplayError : public Exception { public: /// create exception from C library error XDisplayError (const void *obj) : Exception(obj) { } }; /// X11 protocol error. class XProtoError : public Exception { public: /// create exception from C library error XProtoError (const void *obj) : Exception(obj) { } }; /// output window is closed. class ClosedError : public Exception { public: /// create exception from C library error ClosedError (const void *obj) : Exception(obj) { } }; /// image format error class FormatError : public Exception { // FIXME needs c equivalent virtual const char* what () const throw() { // FIXME what format? return("unsupported format"); } }; /// @internal /// extract error information and create exception. static inline std::exception throw_exception (const void *obj) { switch(_zbar_get_error_code(obj)) { case ZBAR_ERR_NOMEM: throw std::bad_alloc(); case ZBAR_ERR_INTERNAL: throw InternalError(obj); case ZBAR_ERR_UNSUPPORTED: throw UnsupportedError(obj); case ZBAR_ERR_INVALID: throw InvalidError(obj); case ZBAR_ERR_SYSTEM: throw SystemError(obj); case ZBAR_ERR_LOCKING: throw LockingError(obj); case ZBAR_ERR_BUSY: throw BusyError(obj); case ZBAR_ERR_XDISPLAY: throw XDisplayError(obj); case ZBAR_ERR_XPROTO: throw XProtoError(obj); case ZBAR_ERR_CLOSED: throw ClosedError(obj); default: throw Exception(obj); } } } #endif zbar-0.23/include/zbar/Decoder.h0000664000175000017500000001306013471225716013426 00000000000000//------------------------------------------------------------------------ // Copyright 2007-2010 (c) Jeff Brown // // This file is part of the ZBar Bar Code Reader. // // The ZBar Bar Code Reader is free software; you can redistribute it // and/or modify it under the terms of the GNU Lesser Public License as // published by the Free Software Foundation; either version 2.1 of // the License, or (at your option) any later version. // // The ZBar Bar Code Reader 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 Lesser Public License for more details. // // You should have received a copy of the GNU Lesser Public License // along with the ZBar Bar Code Reader; if not, write to the Free // Software Foundation, Inc., 51 Franklin St, Fifth Floor, // Boston, MA 02110-1301 USA // // http://sourceforge.net/projects/zbar //------------------------------------------------------------------------ #ifndef _ZBAR_DECODER_H_ #define _ZBAR_DECODER_H_ /// @file /// Decoder C++ wrapper #ifndef _ZBAR_H_ # error "include zbar.h in your application, **not** zbar/Decoder.h" #endif #include namespace zbar { /// low-level bar width stream decoder interface. /// identifies symbols and extracts encoded data class Decoder { public: /// Decoder result handler. /// applications should subtype this and pass an instance to /// set_handler() to implement result processing class Handler { public: virtual ~Handler() { } /// invoked by the Decoder as decode results become available. virtual void decode_callback(Decoder &decoder) = 0; }; /// constructor. Decoder () : _handler(NULL) { _decoder = zbar_decoder_create(); } ~Decoder () { zbar_decoder_destroy(_decoder); } /// clear all decoder state. /// see zbar_decoder_reset() void reset () { zbar_decoder_reset(_decoder); } /// mark start of a new scan pass. /// see zbar_decoder_new_scan() void new_scan () { zbar_decoder_new_scan(_decoder); } /// process next bar/space width from input stream. /// see zbar_decode_width() zbar_symbol_type_t decode_width (unsigned width) { return(zbar_decode_width(_decoder, width)); } /// process next bar/space width from input stream. /// see zbar_decode_width() Decoder& operator<< (unsigned width) { zbar_decode_width(_decoder, width); return(*this); } /// retrieve color of @em next element passed to Decoder. /// see zbar_decoder_get_color() zbar_color_t get_color () const { return(zbar_decoder_get_color(_decoder)); } /// retrieve last decoded symbol type. /// see zbar_decoder_get_type() zbar_symbol_type_t get_type () const { return(zbar_decoder_get_type(_decoder)); } /// retrieve string name of last decoded symbol type. /// see zbar_get_symbol_name() const char *get_symbol_name () const { return(zbar_get_symbol_name(zbar_decoder_get_type(_decoder))); } /// retrieve string name for last decode addon. /// see zbar_get_addon_name() /// @deprecated in 0.11 const char *get_addon_name () const { return(zbar_get_addon_name(zbar_decoder_get_type(_decoder))); } /// retrieve last decoded data in ASCII format as a char array. /// see zbar_decoder_get_data() const char *get_data_chars() const { return(zbar_decoder_get_data(_decoder)); } /// retrieve last decoded data as a std::string. /// see zbar_decoder_get_data() const std::string get_data_string() const { return(std::string(zbar_decoder_get_data(_decoder), zbar_decoder_get_data_length(_decoder))); } /// retrieve last decoded data as a std::string. /// see zbar_decoder_get_data() const std::string get_data() const { return(get_data_string()); } /// retrieve length of decoded binary data. /// see zbar_decoder_get_data_length() int get_data_length() const { return(zbar_decoder_get_data_length(_decoder)); } /// retrieve last decode direction. /// see zbar_decoder_get_direction() /// @since 0.11 int get_direction() const { return(zbar_decoder_get_direction(_decoder)); } /// setup callback to handle result data. void set_handler (Handler &handler) { _handler = &handler; zbar_decoder_set_handler(_decoder, _cb); zbar_decoder_set_userdata(_decoder, this); } /// set config for indicated symbology (0 for all) to specified value. /// @see zbar_decoder_set_config() /// @since 0.4 int set_config (zbar_symbol_type_t symbology, zbar_config_t config, int value) { return(zbar_decoder_set_config(_decoder, symbology, config, value)); } /// set config parsed from configuration string. /// @see zbar_decoder_parse_config() /// @since 0.4 int set_config (std::string cfgstr) { return(zbar_decoder_parse_config(_decoder, cfgstr.c_str())); } private: friend class Scanner; zbar_decoder_t *_decoder; Handler *_handler; static void _cb (zbar_decoder_t *cdcode) { Decoder *dcode = (Decoder*)zbar_decoder_get_userdata(cdcode); if(dcode && dcode->_handler) dcode->_handler->decode_callback(*dcode); } }; } #endif zbar-0.23/include/zbar/Video.h0000664000175000017500000001361613471225716013136 00000000000000//------------------------------------------------------------------------ // Copyright 2007-2010 (c) Jeff Brown // // This file is part of the ZBar Bar Code Reader. // // The ZBar Bar Code Reader is free software; you can redistribute it // and/or modify it under the terms of the GNU Lesser Public License as // published by the Free Software Foundation; either version 2.1 of // the License, or (at your option) any later version. // // The ZBar Bar Code Reader 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 Lesser Public License for more details. // // You should have received a copy of the GNU Lesser Public License // along with the ZBar Bar Code Reader; if not, write to the Free // Software Foundation, Inc., 51 Franklin St, Fifth Floor, // Boston, MA 02110-1301 USA // // http://sourceforge.net/projects/zbar //------------------------------------------------------------------------ #ifndef _ZBAR_VIDEO_H_ #define _ZBAR_VIDEO_H_ /// @file /// Video Input C++ wrapper #ifndef _ZBAR_H_ # error "include zbar.h in your application, **not** zbar/Video.h" #endif #include "Image.h" namespace zbar { /// mid-level video source abstraction. /// captures images from a video device class Video { public: /// constructor. Video (zbar_video_t *video = NULL) { if(video) _video = video; else _video = zbar_video_create(); } /// constructor. Video (std::string& device) { _video = zbar_video_create(); open(device); } ~Video () { zbar_video_destroy(_video); } /// cast to C video object. operator zbar_video_t* () const { return(_video); } /// open and probe a video device. void open (std::string& device) { if(zbar_video_open(_video, device.c_str())) throw_exception(_video); } /// close video device if open. void close () { if(zbar_video_open(_video, NULL)) throw_exception(_video); } /// initialize video using a specific format for debug. /// see zbar_video_init() void init (unsigned long fourcc) { if(zbar_video_init(_video, fourcc)) throw_exception(_video); } /// initialize video using a specific format for debug. /// see zbar_video_init() void init (std::string& format) { unsigned int fourcc = zbar_fourcc_parse(format.c_str()); if(zbar_video_init(_video, fourcc)) throw_exception(_video); } /// retrieve file descriptor associated with open *nix video device. /// see zbar_video_get_fd() int get_fd () { return(zbar_video_get_fd(_video)); } /// retrieve current output image width. /// see zbar_video_get_width() int get_width () { return(zbar_video_get_width(_video)); } /// retrieve current output image height. /// see zbar_video_get_height() int get_height () { return(zbar_video_get_height(_video)); } /// start/stop video capture. /// see zbar_video_enable() void enable (bool enable = true) { if(zbar_video_enable(_video, enable)) throw_exception(_video); } /// retrieve next captured image. /// see zbar_video_next_image() Image next_image () { zbar_image_t *img = zbar_video_next_image(_video); if(!img) throw_exception(_video); return(Image(img)); } /// request a preferred size for the video image from the device. /// see zbar_video_request_size() /// @since 0.6 void request_size (int width, int height) { zbar_video_request_size(_video, width, height); } /// request a preferred driver interface version for debug/testing. /// see zbar_video_request_interface() /// @since 0.6 void request_interface (int version) { zbar_video_request_interface(_video, version); } /// request a preferred I/O mode for debug/testing. /// see zbar_video_request_iomode() /// @since 0.7 void request_iomode (int iomode) { if(zbar_video_request_iomode(_video, iomode)) throw_exception(_video); } /// get the information about a control at a given index /// see zbar_video_get_controls() /// @since 0.11 struct video_controls_s *get_controls(int index) { return(zbar_video_get_controls(_video, index)); } /// set the value on an integer control /// see zbar_video_set_control_n() /// @since 0.11 int set_control (const char *name, int value) { return zbar_video_set_control (_video, name, value); } /// set the value on a boolean control /// see zbar_video_set_control_b() /// @since 0.11 int set_control (const char *name, bool value) { return zbar_video_set_control (_video, name, value ? 1 : 0); } /// get the value on a boolean control /// see zbar_video_get_control_b() /// @since 0.11 int get_control (const char *name, int *value) { return zbar_video_get_control (_video, name, value); } /// get the value on an integer control /// see zbar_video_get_control_n() /// @since 0.11 int get_control (const char *name, bool *value) { int __value; int ret = zbar_video_get_control (_video, name, &__value); *value = __value ? true : false; return ret; } /// get the information about a control at a given index /// see zbar_video_get_resolutions() /// @since 0.22 struct video_resolution_s *get_resolution(int index) { return(zbar_video_get_resolutions(_video, index)); } private: zbar_video_t *_video; }; } #endif zbar-0.23/include/zbar/Image.h0000664000175000017500000002122513471225716013105 00000000000000//------------------------------------------------------------------------ // Copyright 2007-2010 (c) Jeff Brown // // This file is part of the ZBar Bar Code Reader. // // The ZBar Bar Code Reader is free software; you can redistribute it // and/or modify it under the terms of the GNU Lesser Public License as // published by the Free Software Foundation; either version 2.1 of // the License, or (at your option) any later version. // // The ZBar Bar Code Reader 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 Lesser Public License for more details. // // You should have received a copy of the GNU Lesser Public License // along with the ZBar Bar Code Reader; if not, write to the Free // Software Foundation, Inc., 51 Franklin St, Fifth Floor, // Boston, MA 02110-1301 USA // // http://sourceforge.net/projects/zbar //------------------------------------------------------------------------ #ifndef _ZBAR_IMAGE_H_ #define _ZBAR_IMAGE_H_ /// @file /// Image C++ wrapper #ifndef _ZBAR_H_ # error "include zbar.h in your application, **not** zbar/Image.h" #endif #include #include #include "Symbol.h" #include "Exception.h" namespace zbar { class Video; /// stores image data samples along with associated format and size /// metadata class Image { public: /// general Image result handler. /// applications should subtype this and pass an instance to /// eg. ImageScanner::set_handler() to implement result processing class Handler { public: virtual ~Handler() { } /// invoked by library when Image should be processed virtual void image_callback(Image &image) = 0; /// cast this handler to the C handler operator zbar_image_data_handler_t* () const { return(_cb); } private: static void _cb (zbar_image_t *zimg, const void *userdata) { if(userdata) { Image *image = (Image*)zbar_image_get_userdata(zimg); if(image) ((Handler*)userdata)->image_callback(*image); else { Image tmp(zimg, 1); ((Handler*)userdata)->image_callback(tmp); } } } }; class SymbolIterator : public zbar::SymbolIterator { public: /// default constructor. SymbolIterator () : zbar::SymbolIterator() { } /// constructor. SymbolIterator (const SymbolSet &syms) : zbar::SymbolIterator(syms) { } /// copy constructor. SymbolIterator (const SymbolIterator& iter) : zbar::SymbolIterator(iter) { } }; /// constructor. /// create a new Image with the specified parameters Image (unsigned width = 0, unsigned height = 0, const std::string& format = "", const void *data = NULL, unsigned long length = 0) : _img(zbar_image_create()) { zbar_image_set_userdata(_img, this); if(width && height) set_size(width, height); if(format.length()) set_format(format); if(data && length) set_data(data, length); } ~Image () { if(zbar_image_get_userdata(_img) == this) zbar_image_set_userdata(_img, NULL); zbar_image_ref(_img, -1); } /// cast to C image object operator const zbar_image_t* () const { return(_img); } /// cast to C image object operator zbar_image_t* () { return(_img); } /// retrieve the image format. /// see zbar_image_get_format() unsigned long get_format () const { return(zbar_image_get_format(_img)); } /// specify the fourcc image format code for image sample data. /// see zbar_image_set_format() void set_format (unsigned long format) { zbar_image_set_format(_img, format); } /// specify the fourcc image format code for image sample data. /// see zbar_image_set_format() void set_format (const std::string& format) { unsigned long fourcc = zbar_fourcc_parse(format.c_str()); zbar_image_set_format(_img, fourcc); } /// retrieve a "sequence" (page/frame) number associated with this /// image. /// see zbar_image_get_sequence() /// @since 0.6 unsigned get_sequence () const { return(zbar_image_get_sequence(_img)); } /// associate a "sequence" (page/frame) number with this image. /// see zbar_image_set_sequence() /// @since 0.6 void set_sequence (unsigned sequence_num) { zbar_image_set_sequence(_img, sequence_num); } /// retrieve the width of the image. /// see zbar_image_get_width() unsigned get_width () const { return(zbar_image_get_width(_img)); } /// retrieve the height of the image. /// see zbar_image_get_height() unsigned get_height () const { return(zbar_image_get_height(_img)); } /// retrieve both dimensions of the image. /// see zbar_image_get_size() /// @since 0.11 void get_size (unsigned &width, unsigned &height) const { zbar_image_get_size(_img, &width, &height); } /// specify the pixel size of the image. /// see zbar_image_set_size() void set_size (unsigned width, unsigned height) { zbar_image_set_size(_img, width, height); } /// retrieve the scan crop rectangle. /// see zbar_image_get_crop() void get_crop (unsigned &x, unsigned &y, unsigned &width, unsigned &height) const { zbar_image_get_crop(_img, &x, &y, &width, &height); } /// set the scan crop rectangle. /// see zbar_image_set_crop() void set_crop (unsigned x, unsigned y, unsigned width, unsigned height) { zbar_image_set_crop(_img, x, y, width, height); } /// return the image sample data. /// see zbar_image_get_data() const void *get_data () const { return(zbar_image_get_data(_img)); } /// return the size of the image sample data. /// see zbar_image_get_data_length() /// @since 0.6 unsigned long get_data_length () const { return(zbar_image_get_data_length(_img)); } /// specify image sample data. /// see zbar_image_set_data() void set_data (const void *data, unsigned long length) { zbar_image_set_data(_img, data, length, _cleanup); } /// image format conversion. /// see zbar_image_convert() Image convert (unsigned long format) const { zbar_image_t *img = zbar_image_convert(_img, format); if(img) return(Image(img)); throw FormatError(); } /// image format conversion. /// see zbar_image_convert() /// @since 0.11 Image convert (std::string format) const { unsigned long fourcc = zbar_fourcc_parse(format.c_str()); return(convert(fourcc)); } /// image format conversion with crop/pad. /// see zbar_image_convert_resize() /// @since 0.4 Image convert (unsigned long format, unsigned width, unsigned height) const { zbar_image_t *img = zbar_image_convert_resize(_img, format, width, height); if(img) return(Image(img)); throw FormatError(); } const SymbolSet get_symbols () const { return(SymbolSet(zbar_image_get_symbols(_img))); } void set_symbols (const SymbolSet &syms) { zbar_image_set_symbols(_img, syms); } /// create a new SymbolIterator over decoded results. SymbolIterator symbol_begin () const { return(SymbolIterator(get_symbols())); } /// return a SymbolIterator suitable for ending iteration. SymbolIterator symbol_end () const { return(SymbolIterator()); } protected: friend class Video; /// constructor. /// @internal /// create a new Image from a zbar_image_t C object Image (zbar_image_t *src, int refs = 0) : _img(src) { if(refs) zbar_image_ref(_img, refs); zbar_image_set_userdata(_img, this); } /// default data cleanup (noop) /// @internal static void _cleanup (zbar_image_t *img) { // by default nothing is cleaned assert(img); } private: zbar_image_t *_img; }; } #endif zbar-0.23/include/zbar/Scanner.h0000664000175000017500000001014513466560613013455 00000000000000//------------------------------------------------------------------------ // Copyright 2007-2009 (c) Jeff Brown // // This file is part of the ZBar Bar Code Reader. // // The ZBar Bar Code Reader is free software; you can redistribute it // and/or modify it under the terms of the GNU Lesser Public License as // published by the Free Software Foundation; either version 2.1 of // the License, or (at your option) any later version. // // The ZBar Bar Code Reader 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 Lesser Public License for more details. // // You should have received a copy of the GNU Lesser Public License // along with the ZBar Bar Code Reader; if not, write to the Free // Software Foundation, Inc., 51 Franklin St, Fifth Floor, // Boston, MA 02110-1301 USA // // http://sourceforge.net/projects/zbar //------------------------------------------------------------------------ #ifndef _ZBAR_SCANNER_H_ #define _ZBAR_SCANNER_H_ /// @file /// Scanner C++ wrapper #ifndef _ZBAR_H_ # error "include zbar.h in your application, **not** zbar/Scanner.h" #endif #include namespace zbar { /// low-level linear intensity sample stream scanner interface. /// identifies "bar" edges and measures width between them. /// optionally passes to bar width Decoder class Scanner { public: /// constructor. /// @param decoder reference to a Decoder instance which will /// be passed scan results automatically Scanner (Decoder& decoder) { _scanner = zbar_scanner_create(decoder._decoder); } /// constructor. /// @param decoder pointer to a Decoder instance which will /// be passed scan results automatically Scanner (Decoder* decoder = NULL) { zbar_decoder_t *zdcode = NULL; if(decoder) zdcode = decoder->_decoder; _scanner = zbar_scanner_create(zdcode); } ~Scanner () { zbar_scanner_destroy(_scanner); } /// clear all scanner state. /// see zbar_scanner_reset() void reset () { zbar_scanner_reset(_scanner); } /// mark start of a new scan pass. /// see zbar_scanner_new_scan() zbar_symbol_type_t new_scan () { _type = zbar_scanner_new_scan(_scanner); return(_type); } /// flush scanner pipeline. /// see zbar_scanner_flush() zbar_symbol_type_t flush () { _type = zbar_scanner_flush(_scanner); return(_type); } /// process next sample intensity value. /// see zbar_scan_y() zbar_symbol_type_t scan_y (int y) { _type = zbar_scan_y(_scanner, y); return(_type); } /// process next sample intensity value. /// see zbar_scan_y() Scanner& operator<< (int y) { _type = zbar_scan_y(_scanner, y); return(*this); } /// process next sample from RGB (or BGR) triple. /// see zbar_scan_rgb24() zbar_symbol_type_t scan_rgb24 (unsigned char *rgb) { _type = zbar_scan_rgb24(_scanner, rgb); return(_type); } /// process next sample from RGB (or BGR) triple. /// see zbar_scan_rgb24() Scanner& operator<< (unsigned char *rgb) { _type = zbar_scan_rgb24(_scanner, rgb); return(*this); } /// retrieve last scanned width. /// see zbar_scanner_get_width() unsigned get_width () const { return(zbar_scanner_get_width(_scanner)); } /// retrieve last scanned color. /// see zbar_scanner_get_color() zbar_color_t get_color () const { return(zbar_scanner_get_color(_scanner)); } /// retrieve last scan result. zbar_symbol_type_t get_type () const { return(_type); } /// cast to C scanner operator zbar_scanner_t* () const { return(_scanner); } /// retrieve C scanner const zbar_scanner_t *get_c_scanner () const { return(_scanner); } private: zbar_scanner_t *_scanner; zbar_symbol_type_t _type; }; } #endif zbar-0.23/include/config.h.in0000664000175000017500000003053213471606246013001 00000000000000/* include/config.h.in. Generated from configure.ac by autoheader. */ /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ #undef CRAY_STACKSEG_END /* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA /* whether to build support for Codabar symbology */ #undef ENABLE_CODABAR /* whether to build support for Code 128 symbology */ #undef ENABLE_CODE128 /* whether to build support for Code 39 symbology */ #undef ENABLE_CODE39 /* whether to build support for Code 93 symbology */ #undef ENABLE_CODE93 /* whether to build support for DataBar symbology */ #undef ENABLE_DATABAR /* whether to build support for EAN symbologies */ #undef ENABLE_EAN /* whether to build support for Interleaved 2 of 5 symbology */ #undef ENABLE_I25 /* whether to build support for PDF417 symbology (incomplete) */ #undef ENABLE_PDF417 /* whether to build support for QR Code */ #undef ENABLE_QRCODE /* whether to build support for SQ Code */ #undef ENABLE_SQCODE /* Define to 1 if you have the `alarm' function. */ #undef HAVE_ALARM /* Define to 1 if you have `alloca', as a function or macro. */ #undef HAVE_ALLOCA /* Define to 1 if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* Define to 1 if you have the `clock_gettime' function. */ #undef HAVE_CLOCK_GETTIME /* Define to 1 to use dbus */ #undef HAVE_DBUS /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the header file. */ #undef HAVE_FEATURES_H /* Define to 1 if you have the header file. */ #undef HAVE_FLOAT_H /* Define to 1 if you have the `floor' function. */ #undef HAVE_FLOOR /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ #undef HAVE_FSEEKO /* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD /* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 to use GraphicsMagick */ #undef HAVE_GRAPHICSMAGICK /* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV /* Define to 1 to use ImageMagick */ #undef HAVE_IMAGEMAGICK /* Define to 1 to use ImageMagick 7 */ #undef HAVE_IMAGEMAGICK7 /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_JPEGLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_LIBINTL_H /* Define to 1 if you have the `jpeg' library (-ljpeg). */ #undef HAVE_LIBJPEG /* Define to 1 if you have the `pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD /* Define to 1 if you have the header file. */ #undef HAVE_LIBV4L2_H /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_VIDEODEV2_H /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_VIDEODEV_H /* Define to 1 if you have the `localeconv' function. */ #undef HAVE_LOCALECONV /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the `malloc' function. */ #undef HAVE_MALLOC /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H /* Define to 1 if you have the `memchr' function. */ #undef HAVE_MEMCHR /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP /* Define to 1 if you have the header file. */ #undef HAVE_MNTENT_H /* Define to 1 if you have the `modf' function. */ #undef HAVE_MODF /* Define to 1 if you have the `munmap' function. */ #undef HAVE_MUNMAP /* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the header file. */ #undef HAVE_POLL_H /* Define to 1 if you have the `pow' function. */ #undef HAVE_POW /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H /* Define to 1 if you have the `realloc' function. */ #undef HAVE_REALLOC /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV /* Define to 1 if you have the header file. */ #undef HAVE_SHADOW_H /* Define to 1 if you have the `sqrt' function. */ #undef HAVE_SQRT /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strrchr' function. */ #undef HAVE_STRRCHR /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL /* Define to 1 if you have the `strtoul' function. */ #undef HAVE_STRTOUL /* Define to 1 if `st_rdev' is a member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_RDEV /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILE_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IPC_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MMAN_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MOUNT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SHM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STATFS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STATVFS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIMES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_VFS_H /* Define to 1 if the system has the type `uintptr_t'. */ #undef HAVE_UINTPTR_T /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the header file. */ #undef HAVE_VALUES_H /* Define to 1 if you have the header file. */ #undef HAVE_VFW_H /* Define to 1 if you have the header file. */ #undef HAVE_X11_EXTENSIONS_XSHM_H /* Define to 1 if you have the header file. */ #undef HAVE_X11_EXTENSIONS_XVLIB_H /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* Define as const if the declaration of iconv() needs const. */ #undef ICONV_CONST /* Library major version */ #undef LIB_VERSION_MAJOR /* Library minor version */ #undef LIB_VERSION_MINOR /* Library revision */ #undef LIB_VERSION_REVISION /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define to 1 if `major', `minor', and `makedev' are declared in . */ #undef MAJOR_IN_MKDEV /* Define to 1 if `major', `minor', and `makedev' are declared in . */ #undef MAJOR_IN_SYSMACROS /* Define to 1 if assertions should be disabled. */ #undef NDEBUG /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define to 1 if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING /* Program major version (before the '.') as a number */ #undef ZBAR_VERSION_MAJOR /* Program minor version (after '.') as a number */ #undef ZBAR_VERSION_MINOR /* Program patch version (after the second '.') as a number */ #undef ZBAR_VERSION_PATCH /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ #undef _LARGEFILE_SOURCE /* Define for Solaris 2.5.1 so the uint32_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ #undef _UINT32_T /* Define for Solaris 2.5.1 so the uint64_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ #undef _UINT64_T /* Define for Solaris 2.5.1 so the uint8_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ #undef _UINT8_T /* Minimum Windows API version */ #undef _WIN32_WINNT /* used only for pthread debug attributes */ #undef __USE_UNIX98 /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `int' if doesn't define. */ #undef gid_t /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to the type of a signed integer type of width exactly 32 bits if such a type exists and the standard includes do not define it. */ #undef int32_t /* Define to the type of a signed integer type of width exactly 64 bits if such a type exists and the standard includes do not define it. */ #undef int64_t /* Define to `long int' if does not define. */ #undef off_t /* Define to `unsigned int' if does not define. */ #undef size_t /* Define to `int' if doesn't define. */ #undef uid_t /* Define to the type of an unsigned integer type of width exactly 16 bits if such a type exists and the standard includes do not define it. */ #undef uint16_t /* Define to the type of an unsigned integer type of width exactly 32 bits if such a type exists and the standard includes do not define it. */ #undef uint32_t /* Define to the type of an unsigned integer type of width exactly 64 bits if such a type exists and the standard includes do not define it. */ #undef uint64_t /* Define to the type of an unsigned integer type of width exactly 8 bits if such a type exists and the standard includes do not define it. */ #undef uint8_t /* Define to the type of an unsigned integer type wide enough to hold a pointer, if such a type exists, and if the system does not define it. */ #undef uintptr_t #ifndef X_DISPLAY_MISSING # define HAVE_X #endif zbar-0.23/include/zbar.h0000664000175000017500000016231213471225716012066 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _ZBAR_H_ #define _ZBAR_H_ #include /** @file * ZBar Barcode Reader C API definition */ /** @mainpage * * interface to the barcode reader is available at several levels. * most applications will want to use the high-level interfaces: * * @section high-level High-Level Interfaces * * these interfaces wrap all library functionality into an easy-to-use * package for a specific toolkit: * - the "GTK+ 2.x widget" may be used with GTK GUI applications. a * Python wrapper is included for PyGtk * - the @ref zbar::QZBar "Qt4 widget" may be used with Qt GUI * applications * - the Processor interface (in @ref c-processor "C" or @ref * zbar::Processor "C++") adds a scanning window to an application * with no GUI. * * @section mid-level Intermediate Interfaces * * building blocks used to construct high-level interfaces: * - the ImageScanner (in @ref c-imagescanner "C" or @ref * zbar::ImageScanner "C++") looks for barcodes in a library defined * image object * - the Window abstraction (in @ref c-window "C" or @ref * zbar::Window "C++") sinks library images, displaying them on the * platform display * - the Video abstraction (in @ref c-video "C" or @ref zbar::Video * "C++") sources library images from a video device * * @section low-level Low-Level Interfaces * * direct interaction with barcode scanning and decoding: * - the Scanner (in @ref c-scanner "C" or @ref zbar::Scanner "C++") * looks for barcodes in a linear intensity sample stream * - the Decoder (in @ref c-decoder "C" or @ref zbar::Decoder "C++") * extracts barcodes from a stream of bar and space widths */ #ifdef __cplusplus /** C++ namespace for library interfaces */ namespace zbar { extern "C" { #endif /** @name Global library interfaces */ /*@{*/ /** "color" of element: bar or space. */ typedef enum zbar_color_e { ZBAR_SPACE = 0, /**< light area or space between bars */ ZBAR_BAR = 1, /**< dark area or colored bar segment */ } zbar_color_t; /** decoded symbol type. */ typedef enum zbar_symbol_type_e { ZBAR_NONE = 0, /**< no symbol decoded */ ZBAR_PARTIAL = 1, /**< intermediate status */ ZBAR_EAN2 = 2, /**< GS1 2-digit add-on */ ZBAR_EAN5 = 5, /**< GS1 5-digit add-on */ ZBAR_EAN8 = 8, /**< EAN-8 */ ZBAR_UPCE = 9, /**< UPC-E */ ZBAR_ISBN10 = 10, /**< ISBN-10 (from EAN-13). @since 0.4 */ ZBAR_UPCA = 12, /**< UPC-A */ ZBAR_EAN13 = 13, /**< EAN-13 */ ZBAR_ISBN13 = 14, /**< ISBN-13 (from EAN-13). @since 0.4 */ ZBAR_COMPOSITE = 15, /**< EAN/UPC composite */ ZBAR_I25 = 25, /**< Interleaved 2 of 5. @since 0.4 */ ZBAR_DATABAR = 34, /**< GS1 DataBar (RSS). @since 0.11 */ ZBAR_DATABAR_EXP = 35, /**< GS1 DataBar Expanded. @since 0.11 */ ZBAR_CODABAR = 38, /**< Codabar. @since 0.11 */ ZBAR_CODE39 = 39, /**< Code 39. @since 0.4 */ ZBAR_PDF417 = 57, /**< PDF417. @since 0.6 */ ZBAR_QRCODE = 64, /**< QR Code. @since 0.10 */ ZBAR_SQCODE = 80, /**< SQ Code. @since 0.20.1 */ ZBAR_CODE93 = 93, /**< Code 93. @since 0.11 */ ZBAR_CODE128 = 128, /**< Code 128 */ /* * Please see _zbar_get_symbol_hash() if adding * anything after 128 */ /** mask for base symbol type. * @deprecated in 0.11, remove this from existing code */ ZBAR_SYMBOL = 0x00ff, /** 2-digit add-on flag. * @deprecated in 0.11, a ::ZBAR_EAN2 component is used for * 2-digit GS1 add-ons */ ZBAR_ADDON2 = 0x0200, /** 5-digit add-on flag. * @deprecated in 0.11, a ::ZBAR_EAN5 component is used for * 5-digit GS1 add-ons */ ZBAR_ADDON5 = 0x0500, /** add-on flag mask. * @deprecated in 0.11, GS1 add-ons are represented using composite * symbols of type ::ZBAR_COMPOSITE; add-on components use ::ZBAR_EAN2 * or ::ZBAR_EAN5 */ ZBAR_ADDON = 0x0700, } zbar_symbol_type_t; /** decoded symbol coarse orientation. * @since 0.11 */ typedef enum zbar_orientation_e { ZBAR_ORIENT_UNKNOWN = -1, /**< unable to determine orientation */ ZBAR_ORIENT_UP, /**< upright, read left to right */ ZBAR_ORIENT_RIGHT, /**< sideways, read top to bottom */ ZBAR_ORIENT_DOWN, /**< upside-down, read right to left */ ZBAR_ORIENT_LEFT, /**< sideways, read bottom to top */ } zbar_orientation_t; /** error codes. */ typedef enum zbar_error_e { ZBAR_OK = 0, /**< no error */ ZBAR_ERR_NOMEM, /**< out of memory */ ZBAR_ERR_INTERNAL, /**< internal library error */ ZBAR_ERR_UNSUPPORTED, /**< unsupported request */ ZBAR_ERR_INVALID, /**< invalid request */ ZBAR_ERR_SYSTEM, /**< system error */ ZBAR_ERR_LOCKING, /**< locking error */ ZBAR_ERR_BUSY, /**< all resources busy */ ZBAR_ERR_XDISPLAY, /**< X11 display error */ ZBAR_ERR_XPROTO, /**< X11 protocol error */ ZBAR_ERR_CLOSED, /**< output window is closed */ ZBAR_ERR_WINAPI, /**< windows system error */ ZBAR_ERR_NUM /**< number of error codes */ } zbar_error_t; /** decoder configuration options. * @since 0.4 */ typedef enum zbar_config_e { ZBAR_CFG_ENABLE = 0, /**< enable symbology/feature */ ZBAR_CFG_ADD_CHECK, /**< enable check digit when optional */ ZBAR_CFG_EMIT_CHECK, /**< return check digit when present */ ZBAR_CFG_ASCII, /**< enable full ASCII character set */ ZBAR_CFG_NUM, /**< number of boolean decoder configs */ ZBAR_CFG_MIN_LEN = 0x20, /**< minimum data length for valid decode */ ZBAR_CFG_MAX_LEN, /**< maximum data length for valid decode */ ZBAR_CFG_UNCERTAINTY = 0x40,/**< required video consistency frames */ ZBAR_CFG_POSITION = 0x80, /**< enable scanner to collect position data */ ZBAR_CFG_TEST_INVERTED, /**< if fails to decode, test inverted */ ZBAR_CFG_X_DENSITY = 0x100, /**< image scanner vertical scan density */ ZBAR_CFG_Y_DENSITY, /**< image scanner horizontal scan density */ } zbar_config_t; /** decoder symbology modifier flags. * @since 0.11 */ typedef enum zbar_modifier_e { /** barcode tagged as GS1 (EAN.UCC) reserved * (eg, FNC1 before first data character). * data may be parsed as a sequence of GS1 AIs */ ZBAR_MOD_GS1 = 0, /** barcode tagged as AIM reserved * (eg, FNC1 after first character or digit pair) */ ZBAR_MOD_AIM, /** number of modifiers */ ZBAR_MOD_NUM, } zbar_modifier_t; typedef enum video_control_type_e { VIDEO_CNTL_INTEGER = 1, VIDEO_CNTL_MENU, VIDEO_CNTL_BUTTON, VIDEO_CNTL_INTEGER64, VIDEO_CNTL_STRING, VIDEO_CNTL_BOOLEAN, } video_control_type_t; /** store video control menu * @param name name of the menu item * @param val integer value associated with the item */ typedef struct video_control_menu_s { char *name; int64_t value; } video_control_menu_t; /** store video controls * @param name name of the control * @param group name of the control group/class * @param type type of the control * @param min minimum value of control (if control is integer) * @param max maximum value of control (if control is integer) * @param def default value of control (if control is integer) * @param step increment steps (if control is integer) * @param menu menu array * @param menu_size menu size * @since 0.20 */ typedef struct video_controls_s { char *name; char *group; video_control_type_t type; int64_t min, max, def; uint64_t step; unsigned int menu_size; video_control_menu_t *menu; void *next; // video drivers may add extra private data in the end of this struct } video_controls_t; /** store a video resolution * @param width width of the video window * @param height length of the video window * @param max_fps maximum streaming speed, in frames per second * @since 0.22 */ struct video_resolution_s { unsigned int width, height; float max_fps; }; /** retrieve runtime library version information. * @param major set to the running major version (unless NULL) * @param minor set to the running minor version (unless NULL) * @returns 0 */ extern int zbar_version(unsigned *major, unsigned *minor, unsigned *patch); /** set global library debug level. * @param verbosity desired debug level. higher values create more spew */ extern void zbar_set_verbosity(int verbosity); /** increase global library debug level. * eg, for -vvvv */ extern void zbar_increase_verbosity(void); /** retrieve string name for symbol encoding. * @param sym symbol type encoding * @returns the static string name for the specified symbol type, * or "UNKNOWN" if the encoding is not recognized */ extern const char *zbar_get_symbol_name(zbar_symbol_type_t sym); /** retrieve string name for addon encoding. * @param sym symbol type encoding * @returns static string name for any addon, or the empty string * if no addons were decoded * @deprecated in 0.11 */ extern const char *zbar_get_addon_name(zbar_symbol_type_t sym); /** retrieve string name for configuration setting. * @param config setting to name * @returns static string name for config, * or the empty string if value is not a known config */ extern const char *zbar_get_config_name(zbar_config_t config); /** retrieve string name for modifier. * @param modifier flag to name * @returns static string name for modifier, * or the empty string if the value is not a known flag */ extern const char *zbar_get_modifier_name(zbar_modifier_t modifier); /** retrieve string name for orientation. * @param orientation orientation encoding * @returns the static string name for the specified orientation, * or "UNKNOWN" if the orientation is not recognized * @since 0.11 */ extern const char *zbar_get_orientation_name(zbar_orientation_t orientation); /** parse a configuration string of the form "[symbology.]config[=value]". * the config must match one of the recognized names. * the symbology, if present, must match one of the recognized names. * if symbology is unspecified, it will be set to 0. * if value is unspecified it will be set to 1. * @returns 0 if the config is parsed successfully, 1 otherwise * @since 0.4 */ extern int zbar_parse_config(const char *config_string, zbar_symbol_type_t *symbology, zbar_config_t *config, int *value); /** consistently compute fourcc values across architectures * (adapted from v4l2 specification) * @since 0.11 */ #define zbar_fourcc(a, b, c, d) \ ((unsigned long)(a) | \ ((unsigned long)(b) << 8) | \ ((unsigned long)(c) << 16) | \ ((unsigned long)(d) << 24)) /** parse a fourcc string into its encoded integer value. * @since 0.11 */ static inline unsigned long zbar_fourcc_parse (const char *format) { unsigned long fourcc = 0; if(format) { int i; for(i = 0; i < 4 && format[i]; i++) fourcc |= ((unsigned long)format[i]) << (i * 8); } return(fourcc); } /** @internal type unsafe error API (don't use) */ extern int _zbar_error_spew(const void *object, int verbosity); extern const char *_zbar_error_string(const void *object, int verbosity); extern zbar_error_t _zbar_get_error_code(const void *object); /*@}*/ struct zbar_symbol_s; typedef struct zbar_symbol_s zbar_symbol_t; struct zbar_symbol_set_s; typedef struct zbar_symbol_set_s zbar_symbol_set_t; /*------------------------------------------------------------*/ /** @name Symbol interface * decoded barcode symbol result object. stores type, data, and image * location of decoded symbol. all memory is owned by the library */ /*@{*/ /** @typedef zbar_symbol_t * opaque decoded symbol object. */ /** symbol reference count manipulation. * increment the reference count when you store a new reference to the * symbol. decrement when the reference is no longer used. do not * refer to the symbol once the count is decremented and the * containing image has been recycled or destroyed. * @note the containing image holds a reference to the symbol, so you * only need to use this if you keep a symbol after the image has been * destroyed or reused. * @since 0.9 */ extern void zbar_symbol_ref(const zbar_symbol_t *symbol, int refs); /** retrieve type of decoded symbol. * @returns the symbol type */ extern zbar_symbol_type_t zbar_symbol_get_type(const zbar_symbol_t *symbol); /** retrieve symbology boolean config settings. * @returns a bitmask indicating which configs were set for the detected * symbology during decoding. * @since 0.11 */ extern unsigned int zbar_symbol_get_configs(const zbar_symbol_t *symbol); /** retrieve symbology modifier flag settings. * @returns a bitmask indicating which characteristics were detected * during decoding. * @since 0.11 */ extern unsigned int zbar_symbol_get_modifiers(const zbar_symbol_t *symbol); /** retrieve data decoded from symbol. * @returns the data string */ extern const char *zbar_symbol_get_data(const zbar_symbol_t *symbol); /** retrieve length of binary data. * @returns the length of the decoded data */ extern unsigned int zbar_symbol_get_data_length(const zbar_symbol_t *symbol); /** retrieve a symbol confidence metric. * @returns an unscaled, relative quantity: larger values are better * than smaller values, where "large" and "small" are application * dependent. * @note expect the exact definition of this quantity to change as the * metric is refined. currently, only the ordered relationship * between two values is defined and will remain stable in the future * @since 0.9 */ extern int zbar_symbol_get_quality(const zbar_symbol_t *symbol); /** retrieve current cache count. when the cache is enabled for the * image_scanner this provides inter-frame reliability and redundancy * information for video streams. * @returns < 0 if symbol is still uncertain. * @returns 0 if symbol is newly verified. * @returns > 0 for duplicate symbols */ extern int zbar_symbol_get_count(const zbar_symbol_t *symbol); /** retrieve the number of points in the location polygon. the * location polygon defines the image area that the symbol was * extracted from. * @returns the number of points in the location polygon * @note this is currently not a polygon, but the scan locations * where the symbol was decoded */ extern unsigned zbar_symbol_get_loc_size(const zbar_symbol_t *symbol); /** retrieve location polygon x-coordinates. * points are specified by 0-based index. * @returns the x-coordinate for a point in the location polygon. * @returns -1 if index is out of range */ extern int zbar_symbol_get_loc_x(const zbar_symbol_t *symbol, unsigned index); /** retrieve location polygon y-coordinates. * points are specified by 0-based index. * @returns the y-coordinate for a point in the location polygon. * @returns -1 if index is out of range */ extern int zbar_symbol_get_loc_y(const zbar_symbol_t *symbol, unsigned index); /** retrieve general orientation of decoded symbol. * @returns a coarse, axis-aligned indication of symbol orientation or * ::ZBAR_ORIENT_UNKNOWN if unknown * @since 0.11 */ extern zbar_orientation_t zbar_symbol_get_orientation(const zbar_symbol_t *symbol); /** iterate the set to which this symbol belongs (there can be only one). * @returns the next symbol in the set, or * @returns NULL when no more results are available */ extern const zbar_symbol_t *zbar_symbol_next(const zbar_symbol_t *symbol); /** retrieve components of a composite result. * @returns the symbol set containing the components * @returns NULL if the symbol is already a physical symbol * @since 0.10 */ extern const zbar_symbol_set_t* zbar_symbol_get_components(const zbar_symbol_t *symbol); /** iterate components of a composite result. * @returns the first physical component symbol of a composite result * @returns NULL if the symbol is already a physical symbol * @since 0.10 */ extern const zbar_symbol_t* zbar_symbol_first_component(const zbar_symbol_t *symbol); /** print XML symbol element representation to user result buffer. * @see http://zbar.sourceforge.net/2008/barcode.xsd for the schema. * @param symbol is the symbol to print * @param buffer is the inout result pointer, it will be reallocated * with a larger size if necessary. * @param buflen is inout length of the result buffer. * @returns the buffer pointer * @since 0.6 */ extern char *zbar_symbol_xml(const zbar_symbol_t *symbol, char **buffer, unsigned *buflen); /*@}*/ /*------------------------------------------------------------*/ /** @name Symbol Set interface * container for decoded result symbols associated with an image * or a composite symbol. * @since 0.10 */ /*@{*/ /** @typedef zbar_symbol_set_t * opaque symbol iterator object. * @since 0.10 */ /** reference count manipulation. * increment the reference count when you store a new reference. * decrement when the reference is no longer used. do not refer to * the object any longer once references have been released. * @since 0.10 */ extern void zbar_symbol_set_ref(const zbar_symbol_set_t *symbols, int refs); /** retrieve set size. * @returns the number of symbols in the set. * @since 0.10 */ extern int zbar_symbol_set_get_size(const zbar_symbol_set_t *symbols); /** set iterator. * @returns the first decoded symbol result in a set * @returns NULL if the set is empty * @since 0.10 */ extern const zbar_symbol_t* zbar_symbol_set_first_symbol(const zbar_symbol_set_t *symbols); /** raw result iterator. * @returns the first decoded symbol result in a set, *before* filtering * @returns NULL if the set is empty * @since 0.11 */ extern const zbar_symbol_t* zbar_symbol_set_first_unfiltered(const zbar_symbol_set_t *symbols); /*@}*/ /*------------------------------------------------------------*/ /** @name Image interface * stores image data samples along with associated format and size * metadata */ /*@{*/ struct zbar_image_s; /** * zbar_image_t: opaque image object. */ typedef struct zbar_image_s zbar_image_t; /** cleanup handler callback function. * called to free sample data when an image is destroyed. */ typedef void (zbar_image_cleanup_handler_t)(zbar_image_t *image); /** data handler callback function. * called when decoded symbol results are available for an image */ typedef void (zbar_image_data_handler_t)(zbar_image_t *image, const void *userdata); /** new image constructor. * @returns a new image object with uninitialized data and format. * this image should be destroyed (using zbar_image_destroy()) as * soon as the application is finished with it */ extern zbar_image_t *zbar_image_create(void); /** image destructor. all images created by or returned to the * application should be destroyed using this function. when an image * is destroyed, the associated data cleanup handler will be invoked * if available * @note make no assumptions about the image or the data buffer. * they may not be destroyed/cleaned immediately if the library * is still using them. if necessary, use the cleanup handler hook * to keep track of image data buffers */ extern void zbar_image_destroy(zbar_image_t *image); /** image reference count manipulation. * increment the reference count when you store a new reference to the * image. decrement when the reference is no longer used. do not * refer to the image any longer once the count is decremented. * zbar_image_ref(image, -1) is the same as zbar_image_destroy(image) * @since 0.5 */ extern void zbar_image_ref(zbar_image_t *image, int refs); /** image format conversion. refer to the documentation for supported * image formats * @returns a @em new image with the sample data from the original image * converted to the requested format. the original image is * unaffected. * @note the converted image size may be rounded (up) due to format * constraints */ extern zbar_image_t *zbar_image_convert(const zbar_image_t *image, unsigned long format); /** image format conversion with crop/pad. * if the requested size is larger than the image, the last row/column * are duplicated to cover the difference. if the requested size is * smaller than the image, the extra rows/columns are dropped from the * right/bottom. * @returns a @em new image with the sample data from the original * image converted to the requested format and size. * @note the image is @em not scaled * @see zbar_image_convert() * @since 0.4 */ extern zbar_image_t *zbar_image_convert_resize(const zbar_image_t *image, unsigned long format, unsigned width, unsigned height); /** retrieve the image format. * @returns the fourcc describing the format of the image sample data */ extern unsigned long zbar_image_get_format(const zbar_image_t *image); /** retrieve a "sequence" (page/frame) number associated with this image. * @since 0.6 */ extern unsigned zbar_image_get_sequence(const zbar_image_t *image); /** retrieve the width of the image. * @returns the width in sample columns */ extern unsigned zbar_image_get_width(const zbar_image_t *image); /** retrieve the height of the image. * @returns the height in sample rows */ extern unsigned zbar_image_get_height(const zbar_image_t *image); /** retrieve both dimensions of the image. * fills in the width and height in samples */ extern void zbar_image_get_size(const zbar_image_t *image, unsigned *width, unsigned *height); /** retrieve the crop rectangle. * fills in the image coordinates of the upper left corner and size * of an axis-aligned rectangular area of the image that will be scanned. * defaults to the full image * @since 0.11 */ extern void zbar_image_get_crop(const zbar_image_t *image, unsigned *x, unsigned *y, unsigned *width, unsigned *height); /** return the image sample data. the returned data buffer is only * valid until zbar_image_destroy() is called */ extern const void *zbar_image_get_data(const zbar_image_t *image); /** return the size of image data. * @since 0.6 */ extern unsigned long zbar_image_get_data_length(const zbar_image_t *img); /** retrieve the decoded results. * @returns the (possibly empty) set of decoded symbols * @returns NULL if the image has not been scanned * @since 0.10 */ extern const zbar_symbol_set_t* zbar_image_get_symbols(const zbar_image_t *image); /** associate the specified symbol set with the image, replacing any * existing results. use NULL to release the current results from the * image. * @see zbar_image_scanner_recycle_image() * @since 0.10 */ extern void zbar_image_set_symbols(zbar_image_t *image, const zbar_symbol_set_t *symbols); /** image_scanner decode result iterator. * @returns the first decoded symbol result for an image * or NULL if no results are available */ extern const zbar_symbol_t* zbar_image_first_symbol(const zbar_image_t *image); /** specify the fourcc image format code for image sample data. * refer to the documentation for supported formats. * @note this does not convert the data! * (see zbar_image_convert() for that) */ extern void zbar_image_set_format(zbar_image_t *image, unsigned long format); /** associate a "sequence" (page/frame) number with this image. * @since 0.6 */ extern void zbar_image_set_sequence(zbar_image_t *image, unsigned sequence_num); /** specify the pixel size of the image. * @note this also resets the crop rectangle to the full image * (0, 0, width, height) * @note this does not affect the data! */ extern void zbar_image_set_size(zbar_image_t *image, unsigned width, unsigned height); /** specify a rectangular region of the image to scan. * the rectangle will be clipped to the image boundaries. * defaults to the full image specified by zbar_image_set_size() */ extern void zbar_image_set_crop(zbar_image_t *image, unsigned x, unsigned y, unsigned width, unsigned height); /** specify image sample data. when image data is no longer needed by * the library the specific data cleanup handler will be called * (unless NULL) * @note application image data will not be modified by the library */ extern void zbar_image_set_data(zbar_image_t *image, const void *data, unsigned long data_byte_length, zbar_image_cleanup_handler_t *cleanup_hndlr); /** built-in cleanup handler. * passes the image data buffer to free() */ extern void zbar_image_free_data(zbar_image_t *image); /** associate user specified data value with an image. * @since 0.5 */ extern void zbar_image_set_userdata(zbar_image_t *image, void *userdata); /** return user specified data value associated with the image. * @since 0.5 */ extern void *zbar_image_get_userdata(const zbar_image_t *image); /** dump raw image data to a file for debug. * the data will be prefixed with a 16 byte header consisting of: * - 4 bytes uint = 0x676d697a ("zimg") * - 4 bytes format fourcc * - 2 bytes width * - 2 bytes height * - 4 bytes size of following image data in bytes * this header can be dumped w/eg: * @verbatim od -Ax -tx1z -N16 -w4 [file] @endverbatim * for some formats the image can be displayed/converted using * ImageMagick, eg: * @verbatim display -size 640x480+16 [-depth ?] [-sampling-factor ?x?] \ {GRAY,RGB,UYVY,YUV}:[file] @endverbatim * * @param image the image object to dump * @param filebase base filename, appended with ".XXXX.zimg" where * XXXX is the format fourcc * @returns 0 on success or a system error code on failure */ extern int zbar_image_write(const zbar_image_t *image, const char *filebase); /** read back an image in the format written by zbar_image_write() * @note TBD */ extern zbar_image_t *zbar_image_read(char *filename); /*@}*/ /*------------------------------------------------------------*/ /** @name Processor interface * @anchor c-processor * high-level self-contained image processor. * processes video and images for barcodes, optionally displaying * images to a library owned output window */ /*@{*/ struct zbar_processor_s; /** opaque standalone processor object. */ typedef struct zbar_processor_s zbar_processor_t; /** constructor. * if threaded is set and threading is available the processor * will spawn threads where appropriate to avoid blocking and * improve responsiveness */ extern zbar_processor_t *zbar_processor_create(int threaded); /** destructor. cleans up all resources associated with the processor */ extern void zbar_processor_destroy(zbar_processor_t *processor); /** (re)initialization. * opens a video input device and/or prepares to display output */ extern int zbar_processor_init(zbar_processor_t *processor, const char *video_device, int enable_display); /** request a preferred size for the video image from the device. * the request may be adjusted or completely ignored by the driver. * @note must be called before zbar_processor_init() * @since 0.6 */ extern int zbar_processor_request_size(zbar_processor_t *processor, unsigned width, unsigned height); /** request a preferred video driver interface version for * debug/testing. * @note must be called before zbar_processor_init() * @since 0.6 */ extern int zbar_processor_request_interface(zbar_processor_t *processor, int version); /** request a preferred video I/O mode for debug/testing. You will * get errors if the driver does not support the specified mode. * @verbatim 0 = auto-detect 1 = force I/O using read() 2 = force memory mapped I/O using mmap() 3 = force USERPTR I/O (v4l2 only) @endverbatim * @note must be called before zbar_processor_init() * @since 0.7 */ extern int zbar_processor_request_iomode(zbar_processor_t *video, int iomode); /** force specific input and output formats for debug/testing. * @note must be called before zbar_processor_init() */ extern int zbar_processor_force_format(zbar_processor_t *processor, unsigned long input_format, unsigned long output_format); /** setup result handler callback. * the specified function will be called by the processor whenever * new results are available from the video stream or a static image. * pass a NULL value to disable callbacks. * @param processor the object on which to set the handler. * @param handler the function to call when new results are available. * @param userdata is set as with zbar_processor_set_userdata(). * @returns the previously registered handler */ extern zbar_image_data_handler_t* zbar_processor_set_data_handler(zbar_processor_t *processor, zbar_image_data_handler_t *handler, const void *userdata); /** associate user specified data value with the processor. * @since 0.6 */ extern void zbar_processor_set_userdata(zbar_processor_t *processor, void *userdata); /** return user specified data value associated with the processor. * @since 0.6 */ extern void *zbar_processor_get_userdata(const zbar_processor_t *processor); /** set config for indicated symbology (0 for all) to specified value. * @returns 0 for success, non-0 for failure (config does not apply to * specified symbology, or value out of range) * @see zbar_decoder_set_config() * @since 0.4 */ extern int zbar_processor_set_config(zbar_processor_t *processor, zbar_symbol_type_t symbology, zbar_config_t config, int value); /** set video control value * @returns 0 for success, non-0 for failure * @since 0.20 * @see zbar_video_set_control() */ extern int zbar_processor_set_control (zbar_processor_t *processor, const char *control_name, int value); /** get video control value * @returns 0 for success, non-0 for failure * @since 0.20 * @see zbar_video_get_control() */ extern int zbar_processor_get_control (zbar_processor_t *processor, const char *control_name, int *value); /** parse configuration string using zbar_parse_config() * and apply to processor using zbar_processor_set_config(). * @returns 0 for success, non-0 for failure * @see zbar_parse_config() * @see zbar_processor_set_config() * @since 0.4 */ static inline int zbar_processor_parse_config (zbar_processor_t *processor, const char *config_string) { zbar_symbol_type_t sym; zbar_config_t cfg; int val; return(zbar_parse_config(config_string, &sym, &cfg, &val) || zbar_processor_set_config(processor, sym, cfg, val)); } /** retrieve the current state of the output window. * @returns 1 if the output window is currently displayed, 0 if not. * @returns -1 if an error occurs */ extern int zbar_processor_is_visible(zbar_processor_t *processor); /** show or hide the display window owned by the library. * the size will be adjusted to the input size */ extern int zbar_processor_set_visible(zbar_processor_t *processor, int visible); /** control the processor in free running video mode. * only works if video input is initialized. if threading is in use, * scanning will occur in the background, otherwise this is only * useful wrapping calls to zbar_processor_user_wait(). if the * library output window is visible, video display will be enabled. */ extern int zbar_processor_set_active(zbar_processor_t *processor, int active); /** retrieve decode results for last scanned image/frame. * @returns the symbol set result container or NULL if no results are * available * @note the returned symbol set has its reference count incremented; * ensure that the count is decremented after use * @since 0.10 */ extern const zbar_symbol_set_t* zbar_processor_get_results(const zbar_processor_t *processor); /** wait for input to the display window from the user * (via mouse or keyboard). * @returns >0 when input is received, 0 if timeout ms expired * with no input or -1 in case of an error */ extern int zbar_processor_user_wait(zbar_processor_t *processor, int timeout); /** process from the video stream until a result is available, * or the timeout (in milliseconds) expires. * specify a timeout of -1 to scan indefinitely * (zbar_processor_set_active() may still be used to abort the scan * from another thread). * if the library window is visible, video display will be enabled. * @note that multiple results may still be returned (despite the * name). * @returns >0 if symbols were successfully decoded, * 0 if no symbols were found (ie, the timeout expired) * or -1 if an error occurs */ extern int zbar_process_one(zbar_processor_t *processor, int timeout); /** process the provided image for barcodes. * if the library window is visible, the image will be displayed. * @returns >0 if symbols were successfully decoded, * 0 if no symbols were found or -1 if an error occurs */ extern int zbar_process_image(zbar_processor_t *processor, zbar_image_t *image); /** enable dbus IPC API. * @returns 0 successful */ int zbar_processor_request_dbus(zbar_processor_t *proc, int req_dbus_enabled); /** display detail for last processor error to stderr. * @returns a non-zero value suitable for passing to exit() */ static inline int zbar_processor_error_spew (const zbar_processor_t *processor, int verbosity) { return(_zbar_error_spew(processor, verbosity)); } /** retrieve the detail string for the last processor error. */ static inline const char* zbar_processor_error_string (const zbar_processor_t *processor, int verbosity) { return(_zbar_error_string(processor, verbosity)); } /** retrieve the type code for the last processor error. */ static inline zbar_error_t zbar_processor_get_error_code (const zbar_processor_t *processor) { return(_zbar_get_error_code(processor)); } /*@}*/ /*------------------------------------------------------------*/ /** @name Video interface * @anchor c-video * mid-level video source abstraction. * captures images from a video device */ /*@{*/ struct zbar_video_s; /** opaque video object. */ typedef struct zbar_video_s zbar_video_t; /** constructor. */ extern zbar_video_t *zbar_video_create(void); /** destructor. */ extern void zbar_video_destroy(zbar_video_t *video); /** open and probe a video device. * the device specified by platform specific unique name * (v4l device node path in *nix eg "/dev/video", * DirectShow DevicePath property in windows). * @returns 0 if successful or -1 if an error occurs */ extern int zbar_video_open(zbar_video_t *video, const char *device); /** retrieve file descriptor associated with open *nix video device * useful for using select()/poll() to tell when new images are * available (NB v4l2 only!!). * @returns the file descriptor or -1 if the video device is not open * or the driver only supports v4l1 */ extern int zbar_video_get_fd(const zbar_video_t *video); /** request a preferred size for the video image from the device. * the request may be adjusted or completely ignored by the driver. * @returns 0 if successful or -1 if the video device is already * initialized * @since 0.6 */ extern int zbar_video_request_size(zbar_video_t *video, unsigned width, unsigned height); /** request a preferred driver interface version for debug/testing. * @note must be called before zbar_video_open() * @since 0.6 */ extern int zbar_video_request_interface(zbar_video_t *video, int version); /** request a preferred I/O mode for debug/testing. You will get * errors if the driver does not support the specified mode. * @verbatim 0 = auto-detect 1 = force I/O using read() 2 = force memory mapped I/O using mmap() 3 = force USERPTR I/O (v4l2 only) @endverbatim * @note must be called before zbar_video_open() * @since 0.7 */ extern int zbar_video_request_iomode(zbar_video_t *video, int iomode); /** retrieve current output image width. * @returns the width or 0 if the video device is not open */ extern int zbar_video_get_width(const zbar_video_t *video); /** retrieve current output image height. * @returns the height or 0 if the video device is not open */ extern int zbar_video_get_height(const zbar_video_t *video); /** initialize video using a specific format for debug. * use zbar_negotiate_format() to automatically select and initialize * the best available format */ extern int zbar_video_init(zbar_video_t *video, unsigned long format); /** start/stop video capture. * all buffered images are retired when capture is disabled. * @returns 0 if successful or -1 if an error occurs */ extern int zbar_video_enable(zbar_video_t *video, int enable); /** retrieve next captured image. blocks until an image is available. * @returns NULL if video is not enabled or an error occurs */ extern zbar_image_t *zbar_video_next_image(zbar_video_t *video); /** set video control value (integer). * @returns 0 for success, non-0 for failure * @since 0.20 * @see zbar_processor_set_control() */ extern int zbar_video_set_control (zbar_video_t *video, const char *control_name, int value); /** get video control value (integer). * @returns 0 for success, non-0 for failure * @since 0.20 * @see zbar_processor_get_control() */ extern int zbar_video_get_control (zbar_video_t *video, const char *control_name, int *value); /** get available controls from video source * @returns 0 for success, non-0 for failure * @since 0.20 */ extern struct video_controls_s *zbar_video_get_controls (const zbar_video_t *video, int index); /** get available video resolutions from video source * @returns 0 for success, non-0 for failure * @since 0.22 */ extern struct video_resolution_s *zbar_video_get_resolutions (const zbar_video_t *vdo, int index); /** display detail for last video error to stderr. * @returns a non-zero value suitable for passing to exit() */ static inline int zbar_video_error_spew (const zbar_video_t *video, int verbosity) { return(_zbar_error_spew(video, verbosity)); } /** retrieve the detail string for the last video error. */ static inline const char *zbar_video_error_string (const zbar_video_t *video, int verbosity) { return(_zbar_error_string(video, verbosity)); } /** retrieve the type code for the last video error. */ static inline zbar_error_t zbar_video_get_error_code (const zbar_video_t *video) { return(_zbar_get_error_code(video)); } /*@}*/ /*------------------------------------------------------------*/ /** @name Window interface * @anchor c-window * mid-level output window abstraction. * displays images to user-specified platform specific output window */ /*@{*/ struct zbar_window_s; /** opaque window object. */ typedef struct zbar_window_s zbar_window_t; /** constructor. */ extern zbar_window_t *zbar_window_create(void); /** destructor. */ extern void zbar_window_destroy(zbar_window_t *window); /** associate reader with an existing platform window. * This can be any "Drawable" for X Windows or a "HWND" for windows. * input images will be scaled into the output window. * pass NULL to detach from the resource, further input will be * ignored */ extern int zbar_window_attach(zbar_window_t *window, void *x11_display_w32_hwnd, unsigned long x11_drawable); /** control content level of the reader overlay. * the overlay displays graphical data for informational or debug * purposes. higher values increase the level of annotation (possibly * decreasing performance). @verbatim 0 = disable overlay 1 = outline decoded symbols (default) 2 = also track and display input frame rate @endverbatim */ extern void zbar_window_set_overlay(zbar_window_t *window, int level); /** retrieve current content level of reader overlay. * @see zbar_window_set_overlay() * @since 0.10 */ extern int zbar_window_get_overlay(const zbar_window_t *window); /** draw a new image into the output window. */ extern int zbar_window_draw(zbar_window_t *window, zbar_image_t *image); /** redraw the last image (exposure handler). */ extern int zbar_window_redraw(zbar_window_t *window); /** resize the image window (reconfigure handler). * this does @em not update the contents of the window * @since 0.3, changed in 0.4 to not redraw window */ extern int zbar_window_resize(zbar_window_t *window, unsigned width, unsigned height); /** display detail for last window error to stderr. * @returns a non-zero value suitable for passing to exit() */ static inline int zbar_window_error_spew (const zbar_window_t *window, int verbosity) { return(_zbar_error_spew(window, verbosity)); } /** retrieve the detail string for the last window error. */ static inline const char* zbar_window_error_string (const zbar_window_t *window, int verbosity) { return(_zbar_error_string(window, verbosity)); } /** retrieve the type code for the last window error. */ static inline zbar_error_t zbar_window_get_error_code (const zbar_window_t *window) { return(_zbar_get_error_code(window)); } /** select a compatible format between video input and output window. * the selection algorithm attempts to use a format shared by * video input and window output which is also most useful for * barcode scanning. if a format conversion is necessary, it will * heuristically attempt to minimize the cost of the conversion */ extern int zbar_negotiate_format(zbar_video_t *video, zbar_window_t *window); /*@}*/ /*------------------------------------------------------------*/ /** @name Image Scanner interface * @anchor c-imagescanner * mid-level image scanner interface. * reads barcodes from 2-D images */ /*@{*/ struct zbar_image_scanner_s; /** opaque image scanner object. */ typedef struct zbar_image_scanner_s zbar_image_scanner_t; /** constructor. */ extern zbar_image_scanner_t *zbar_image_scanner_create(void); /** destructor. */ extern void zbar_image_scanner_destroy(zbar_image_scanner_t *scanner); /** setup result handler callback. * the specified function will be called by the scanner whenever * new results are available from a decoded image. * pass a NULL value to disable callbacks. * @returns the previously registered handler */ extern zbar_image_data_handler_t* zbar_image_scanner_set_data_handler(zbar_image_scanner_t *scanner, zbar_image_data_handler_t *handler, const void *userdata); /** request sending decoded codes via D-Bus * @see zbar_processor_parse_config() * @since 0.21 */ extern int zbar_image_scanner_request_dbus(zbar_image_scanner_t *scanner, int req_dbus_enabled); /** set config for indicated symbology (0 for all) to specified value. * @returns 0 for success, non-0 for failure (config does not apply to * specified symbology, or value out of range) * @see zbar_decoder_set_config() * @since 0.4 */ extern int zbar_image_scanner_set_config(zbar_image_scanner_t *scanner, zbar_symbol_type_t symbology, zbar_config_t config, int value); /** get config for indicated symbology * @returns 0 for success, non-0 for failure (config does not apply to * specified symbology, or value out of range). On success, *value is filled. * @since 0.22 */ extern int zbar_image_scanner_get_config(zbar_image_scanner_t *scanner, zbar_symbol_type_t symbology, zbar_config_t config, int *value); /** parse configuration string using zbar_parse_config() * and apply to image scanner using zbar_image_scanner_set_config(). * @returns 0 for success, non-0 for failure * @see zbar_parse_config() * @see zbar_image_scanner_set_config() * @since 0.4 */ static inline int zbar_image_scanner_parse_config (zbar_image_scanner_t *scanner, const char *config_string) { zbar_symbol_type_t sym; zbar_config_t cfg; int val; return(zbar_parse_config(config_string, &sym, &cfg, &val) || zbar_image_scanner_set_config(scanner, sym, cfg, val)); } /** enable or disable the inter-image result cache (default disabled). * mostly useful for scanning video frames, the cache filters * duplicate results from consecutive images, while adding some * consistency checking and hysteresis to the results. * this interface also clears the cache */ extern void zbar_image_scanner_enable_cache(zbar_image_scanner_t *scanner, int enable); /** remove any previously decoded results from the image scanner and the * specified image. somewhat more efficient version of * zbar_image_set_symbols(image, NULL) which may retain memory for * subsequent decodes * @since 0.10 */ extern void zbar_image_scanner_recycle_image(zbar_image_scanner_t *scanner, zbar_image_t *image); /** retrieve decode results for last scanned image. * @returns the symbol set result container or NULL if no results are * available * @note the symbol set does not have its reference count adjusted; * ensure that the count is incremented if the results may be kept * after the next image is scanned * @since 0.10 */ extern const zbar_symbol_set_t* zbar_image_scanner_get_results(const zbar_image_scanner_t *scanner); /** scan for symbols in provided image. The image format must be * "Y800" or "GRAY". * @returns >0 if symbols were successfully decoded from the image, * 0 if no symbols were found or -1 if an error occurs * @see zbar_image_convert() * @since 0.9 - changed to only accept grayscale images */ extern int zbar_scan_image(zbar_image_scanner_t *scanner, zbar_image_t *image); /*@}*/ /*------------------------------------------------------------*/ /** @name Decoder interface * @anchor c-decoder * low-level bar width stream decoder interface. * identifies symbols and extracts encoded data */ /*@{*/ struct zbar_decoder_s; /** opaque decoder object. */ typedef struct zbar_decoder_s zbar_decoder_t; /** decoder data handler callback function. * called by decoder when new data has just been decoded */ typedef void (zbar_decoder_handler_t)(zbar_decoder_t *decoder); /** constructor. */ extern zbar_decoder_t *zbar_decoder_create(void); /** destructor. */ extern void zbar_decoder_destroy(zbar_decoder_t *decoder); /** set config for indicated symbology (0 for all) to specified value. * @returns 0 for success, non-0 for failure (config does not apply to * specified symbology, or value out of range) * @since 0.4 */ extern int zbar_decoder_set_config(zbar_decoder_t *decoder, zbar_symbol_type_t symbology, zbar_config_t config, int value); /** get config for indicated symbology * @returns 0 for success, non-0 for failure (config does not apply to * specified symbology, or value out of range). On success, *value is filled. * @since 0.22 */ extern int zbar_decoder_get_config(zbar_decoder_t *decoder, zbar_symbol_type_t symbology, zbar_config_t config, int *value); /** parse configuration string using zbar_parse_config() * and apply to decoder using zbar_decoder_set_config(). * @returns 0 for success, non-0 for failure * @see zbar_parse_config() * @see zbar_decoder_set_config() * @since 0.4 */ static inline int zbar_decoder_parse_config (zbar_decoder_t *decoder, const char *config_string) { zbar_symbol_type_t sym; zbar_config_t cfg; int val; return(zbar_parse_config(config_string, &sym, &cfg, &val) || zbar_decoder_set_config(decoder, sym, cfg, val)); } /** retrieve symbology boolean config settings. * @returns a bitmask indicating which configs are currently set for the * specified symbology. * @since 0.11 */ extern unsigned int zbar_decoder_get_configs(const zbar_decoder_t *decoder, zbar_symbol_type_t symbology); /** clear all decoder state. * any partial symbols are flushed */ extern void zbar_decoder_reset(zbar_decoder_t *decoder); /** mark start of a new scan pass. * clears any intra-symbol state and resets color to ::ZBAR_SPACE. * any partially decoded symbol state is retained */ extern void zbar_decoder_new_scan(zbar_decoder_t *decoder); /** process next bar/space width from input stream. * the width is in arbitrary relative units. first value of a scan * is ::ZBAR_SPACE width, alternating from there. * @returns appropriate symbol type if width completes * decode of a symbol (data is available for retrieval) * @returns ::ZBAR_PARTIAL as a hint if part of a symbol was decoded * @returns ::ZBAR_NONE (0) if no new symbol data is available */ extern zbar_symbol_type_t zbar_decode_width(zbar_decoder_t *decoder, unsigned width); /** retrieve color of @em next element passed to * zbar_decode_width(). */ extern zbar_color_t zbar_decoder_get_color(const zbar_decoder_t *decoder); /** retrieve last decoded data. * @returns the data string or NULL if no new data available. * the returned data buffer is owned by library, contents are only * valid between non-0 return from zbar_decode_width and next library * call */ extern const char *zbar_decoder_get_data(const zbar_decoder_t *decoder); /** retrieve length of binary data. * @returns the length of the decoded data or 0 if no new data * available. */ extern unsigned int zbar_decoder_get_data_length(const zbar_decoder_t *decoder); /** retrieve last decoded symbol type. * @returns the type or ::ZBAR_NONE if no new data available */ extern zbar_symbol_type_t zbar_decoder_get_type(const zbar_decoder_t *decoder); /** retrieve modifier flags for the last decoded symbol. * @returns a bitmask indicating which characteristics were detected * during decoding. * @since 0.11 */ extern unsigned int zbar_decoder_get_modifiers(const zbar_decoder_t *decoder); /** retrieve last decode direction. * @returns 1 for forward and -1 for reverse * @returns 0 if the decode direction is unknown or does not apply * @since 0.11 */ extern int zbar_decoder_get_direction(const zbar_decoder_t *decoder); /** setup data handler callback. * the registered function will be called by the decoder * just before zbar_decode_width() returns a non-zero value. * pass a NULL value to disable callbacks. * @returns the previously registered handler */ extern zbar_decoder_handler_t* zbar_decoder_set_handler(zbar_decoder_t *decoder, zbar_decoder_handler_t *handler); /** associate user specified data value with the decoder. */ extern void zbar_decoder_set_userdata(zbar_decoder_t *decoder, void *userdata); /** return user specified data value associated with the decoder. */ extern void *zbar_decoder_get_userdata(const zbar_decoder_t *decoder); /*@}*/ /*------------------------------------------------------------*/ /** @name Scanner interface * @anchor c-scanner * low-level linear intensity sample stream scanner interface. * identifies "bar" edges and measures width between them. * optionally passes to bar width decoder */ /*@{*/ struct zbar_scanner_s; /** opaque scanner object. */ typedef struct zbar_scanner_s zbar_scanner_t; /** constructor. * if decoder is non-NULL it will be attached to scanner * and called automatically at each new edge * current color is initialized to ::ZBAR_SPACE * (so an initial BAR->SPACE transition may be discarded) */ extern zbar_scanner_t *zbar_scanner_create(zbar_decoder_t *decoder); /** destructor. */ extern void zbar_scanner_destroy(zbar_scanner_t *scanner); /** clear all scanner state. * also resets an associated decoder */ extern zbar_symbol_type_t zbar_scanner_reset(zbar_scanner_t *scanner); /** mark start of a new scan pass. resets color to ::ZBAR_SPACE. * also updates an associated decoder. * @returns any decode results flushed from the pipeline * @note when not using callback handlers, the return value should * be checked the same as zbar_scan_y() * @note call zbar_scanner_flush() at least twice before calling this * method to ensure no decode results are lost */ extern zbar_symbol_type_t zbar_scanner_new_scan(zbar_scanner_t *scanner); /** flush scanner processing pipeline. * forces current scanner position to be a scan boundary. * call multiple times (max 3) to completely flush decoder. * @returns any decode/scan results flushed from the pipeline * @note when not using callback handlers, the return value should * be checked the same as zbar_scan_y() * @since 0.9 */ extern zbar_symbol_type_t zbar_scanner_flush(zbar_scanner_t *scanner); /** process next sample intensity value. * intensity (y) is in arbitrary relative units. * @returns result of zbar_decode_width() if a decoder is attached, * otherwise @returns (::ZBAR_PARTIAL) when new edge is detected * or 0 (::ZBAR_NONE) if no new edge is detected */ extern zbar_symbol_type_t zbar_scan_y(zbar_scanner_t *scanner, int y); /** process next sample from RGB (or BGR) triple. */ static inline zbar_symbol_type_t zbar_scan_rgb24 (zbar_scanner_t *scanner, unsigned char *rgb) { return(zbar_scan_y(scanner, rgb[0] + rgb[1] + rgb[2])); } /** retrieve last scanned width. */ extern unsigned zbar_scanner_get_width(const zbar_scanner_t *scanner); /** retrieve sample position of last edge. * @since 0.10 */ extern unsigned zbar_scanner_get_edge(const zbar_scanner_t *scn, unsigned offset, int prec); /** retrieve last scanned color. */ extern zbar_color_t zbar_scanner_get_color(const zbar_scanner_t *scanner); /*@}*/ #ifdef __cplusplus } } # include "zbar/Exception.h" # include "zbar/Decoder.h" # include "zbar/Scanner.h" # include "zbar/Symbol.h" # include "zbar/Image.h" # include "zbar/ImageScanner.h" # include "zbar/Video.h" # include "zbar/Window.h" # include "zbar/Processor.h" #endif #endif zbar-0.23/ABOUT-NLS0000644000175000017500000026747413470561246010600 000000000000001 Notes on the Free Translation Project *************************************** Free software is going international! The Free Translation Project is a way to get maintainers of free software, translators, and users all together, so that free software will gradually become able to speak many languages. A few packages already provide translations for their messages. If you found this 'ABOUT-NLS' file inside a distribution, you may assume that the distributed package does use GNU 'gettext' internally, itself available at your nearest GNU archive site. But you do _not_ need to install GNU 'gettext' prior to configuring, installing or using this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and work on translations can contact the appropriate team. 1.1 INSTALL Matters =================== Some packages are "localizable" when properly installed; the programs they contain can be made to speak your own native language. Most such packages use GNU 'gettext'. Other packages have their own ways to internationalization, predating GNU 'gettext'. By default, this package will be installed to allow translation of messages. It will automatically detect whether the system already provides the GNU 'gettext' functions. Installers may use special options at configuration time for changing the default behaviour. The command: ./configure --disable-nls will _totally_ disable translation of messages. When you already have GNU 'gettext' installed on your system and run configure without an option for your new package, 'configure' will probably detect the previously built and installed 'libintl' library and will decide to use it. If not, you may have to to use the '--with-libintl-prefix' option to tell 'configure' where to look for it. Internationalized packages usually have many 'po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations have been forbidden at 'configure' time by using the '--disable-nls' switch, all available translations are installed together with the package. However, the environment variable 'LINGUAS' may be set, prior to configuration, to limit the installed set. 'LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. 1.2 Using This Package ====================== As a user, if your language has been installed for this package, you only have to set the 'LANG' environment variable to the appropriate 'LL_CC' combination. If you happen to have the 'LC_ALL' or some other 'LC_xxx' environment variables set, you should unset them before setting 'LANG', otherwise the setting of 'LANG' will not have the desired effect. Here 'LL' is an ISO 639 two-letter language code, and 'CC' is an ISO 3166 two-letter country code. For example, let's suppose that you speak German and live in Germany. At the shell prompt, merely execute 'setenv LANG de_DE' (in 'csh'), 'export LANG; LANG=de_DE' (in 'sh') or 'export LANG=de_DE' (in 'bash'). This can be done from your '.login' or '.profile' file, once and for all. You might think that the country code specification is redundant. But in fact, some languages have dialects in different countries. For example, 'de_AT' is used for Austria, and 'pt_BR' for Brazil. The country code serves to distinguish the dialects. The locale naming convention of 'LL_CC', with 'LL' denoting the language and 'CC' denoting the country, is the one use on systems based on GNU libc. On other systems, some variations of this scheme are used, such as 'LL' or 'LL_CC.ENCODING'. You can get the list of locales supported by your system for your language by running the command 'locale -a | grep '^LL''. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you understand other languages, you can set up a priority list of languages. This is done through a different environment variable, called 'LANGUAGE'. GNU 'gettext' gives preference to 'LANGUAGE' over 'LANG' for the purpose of message handling, but you still need to have 'LANG' set to the primary language; this is required by other parts of the system libraries. For example, some Swedish users who would rather read translations in German than English for when Swedish is not available, set 'LANGUAGE' to 'sv:de' while leaving 'LANG' to 'sv_SE'. Special advice for Norwegian users: The language code for Norwegian bokma*l changed from 'no' to 'nb' recently (in 2003). During the transition period, while some message catalogs for this language are installed under 'nb' and some older ones under 'no', it's recommended for Norwegian users to set 'LANGUAGE' to 'nb:no' so that both newer and older translations are used. In the 'LANGUAGE' environment variable, but not in the 'LANG' environment variable, 'LL_CC' combinations can be abbreviated as 'LL' to denote the language's main dialect. For example, 'de' is equivalent to 'de_DE' (German as spoken in Germany), and 'pt' to 'pt_PT' (Portuguese as spoken in Portugal) in this context. 1.3 Translating Teams ===================== For the Free Translation Project to be a success, we need interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. Each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, 'http://translationproject.org/', in the "Teams" area. If you'd like to volunteer to _work_ at translating messages, you should become a member of the translating team for your own language. The subscribing address is _not_ the same as the list itself, it has '-request' appended. For example, speakers of Swedish can send a message to 'sv-request@li.org', having this message body: subscribe Keep in mind that team members are expected to participate _actively_ in translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, or if you are unsure about what to do or how to get started, please write to 'coordinator@translationproject.org' to reach the coordinator for all translator teams. The English team is special. It works at improving and uniformizing the terminology in use. Proven linguistic skills are praised more than programming skills, here. 1.4 Available Packages ====================== Languages are not equally supported in all packages. The following matrix shows the current state of internationalization, as of Jun 2014. The matrix shows, in regard of each package, for which languages PO files have been submitted to translation coordination, with a translation percentage of at least 50%. Ready PO files af am an ar as ast az be bg bn bn_IN bs ca crh cs +---------------------------------------------------+ a2ps | [] [] [] | aegis | | anubis | | aspell | [] [] [] | bash | [] [] [] | bfd | | binutils | [] | bison | | bison-runtime | [] | buzztrax | [] | ccd2cue | | ccide | | cflow | | clisp | | coreutils | [] [] | cpio | | cppi | | cpplib | [] | cryptsetup | [] | datamash | | denemo | [] [] | dfarc | [] | dialog | [] [] [] | dico | | diffutils | [] | dink | [] | direvent | | doodle | [] | dos2unix | | dos2unix-man | | e2fsprogs | [] [] | enscript | [] | exif | [] | fetchmail | [] [] | findutils | [] | flex | [] | freedink | [] [] | fusionforge | | gas | | gawk | [] | gcal | [] | gcc | | gdbm | | gettext-examples | [] [] [] [] [] | gettext-runtime | [] [] [] | gettext-tools | [] [] | gjay | | glunarclock | [] [] [] | gnubiff | [] | gnubik | [] | gnucash | () () [] | gnuchess | | gnulib | [] | gnunet | | gnunet-gtk | | gold | | gphoto2 | [] | gprof | [] | gramadoir | | grep | [] [] [] | grub | [] | gsasl | | gss | | gst-plugins-bad | [] [] | gst-plugins-base | [] [] [] | gst-plugins-good | [] [] [] | gst-plugins-ugly | [] [] [] | gstreamer | [] [] [] [] | gtick | [] | gtkam | [] [] | gtkspell | [] [] [] [] [] | guix | | guix-packages | | gutenprint | [] | hello | [] | help2man | | help2man-texi | | hylafax | | idutils | | iso_15924 | [] | iso_3166 | [] [] [] [] [] [] [] [] [] [] | iso_3166_2 | | iso_4217 | [] | iso_639 | [] [] [] [] [] [] [] [] [] | iso_639_3 | [] [] | iso_639_5 | | jwhois | | kbd | [] | klavaro | [] [] [] [] [] | ld | [] | leafpad | [] [] [] [] | libc | [] [] [] | libexif | () | libextractor | | libgnutls | [] | libgphoto2 | [] | libgphoto2_port | [] | libgsasl | | libiconv | [] [] | libidn | [] | liferea | [] [] [] [] | lilypond | [] [] | lordsawar | [] | lprng | | lynx | [] [] | m4 | [] | mailfromd | | mailutils | | make | [] | man-db | [] [] | man-db-manpages | | midi-instruments | [] [] [] | minicom | [] | mkisofs | [] | myserver | [] | nano | [] [] [] | opcodes | | parted | [] | pies | | pnmixer | | popt | [] | procps-ng | | procps-ng-man | | psmisc | [] | pspp | [] | pushover | [] | pwdutils | | pyspread | | radius | [] | recode | [] [] [] | recutils | | rpm | | rush | | sarg | | sed | [] [] [] [] | sharutils | [] | shishi | | skribilo | | solfege | [] [] | solfege-manual | | spotmachine | | sudo | [] [] | sudoers | [] [] | sysstat | [] | tar | [] [] [] | texinfo | [] [] | texinfo_document | [] [] | tigervnc | [] | tin | | tin-man | | tracgoogleappsa... | | trader | | util-linux | [] | ve | | vice | | vmm | | vorbis-tools | [] | wastesedge | | wcd | | wcd-man | | wdiff | [] [] | wget | [] | wyslij-po | | xboard | | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] | +---------------------------------------------------+ af am an ar as ast az be bg bn bn_IN bs ca crh cs 4 0 2 5 3 11 0 8 25 3 3 1 55 4 74 da de el en en_GB en_ZA eo es et eu fa fi fr +--------------------------------------------------+ a2ps | [] [] [] [] [] [] [] [] [] | aegis | [] [] [] [] | anubis | [] [] [] [] [] | aspell | [] [] [] [] [] [] [] | bash | [] [] [] | bfd | [] [] [] [] | binutils | [] [] [] | bison | [] [] [] [] [] [] [] [] | bison-runtime | [] [] [] [] [] [] [] [] | buzztrax | [] [] [] [] | ccd2cue | [] [] [] [] | ccide | [] [] [] [] [] [] | cflow | [] [] [] [] [] | clisp | [] [] [] [] [] | coreutils | [] [] [] [] [] | cpio | [] [] [] [] [] | cppi | [] [] [] [] [] | cpplib | [] [] [] [] [] [] | cryptsetup | [] [] [] [] [] | datamash | [] [] [] [] | denemo | [] | dfarc | [] [] [] [] [] [] | dialog | [] [] [] [] [] [] [] [] [] | dico | [] [] [] [] | diffutils | [] [] [] [] [] [] | dink | [] [] [] [] [] [] | direvent | [] [] [] [] | doodle | [] [] [] [] | dos2unix | [] [] [] [] [] | dos2unix-man | [] [] [] | e2fsprogs | [] [] [] [] [] | enscript | [] [] [] [] [] [] | exif | [] [] [] [] [] [] | fetchmail | [] () [] [] [] [] [] | findutils | [] [] [] [] [] [] [] [] | flex | [] [] [] [] [] [] | freedink | [] [] [] [] [] [] [] [] | fusionforge | [] [] [] | gas | [] [] [] | gawk | [] [] [] [] [] | gcal | [] [] [] [] | gcc | [] | gdbm | [] [] [] [] [] | gettext-examples | [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] | gettext-tools | [] [] [] [] [] | gjay | [] [] [] [] | glunarclock | [] [] [] [] [] | gnubiff | () [] [] () | gnubik | [] [] [] [] [] | gnucash | [] () () () () () () | gnuchess | [] [] [] [] | gnulib | [] [] [] [] [] [] [] | gnunet | [] | gnunet-gtk | [] | gold | [] [] [] | gphoto2 | [] () [] [] | gprof | [] [] [] [] [] [] | gramadoir | [] [] [] [] [] | grep | [] [] [] [] [] [] [] | grub | [] [] [] [] [] | gsasl | [] [] [] [] [] | gss | [] [] [] [] [] | gst-plugins-bad | [] [] [] | gst-plugins-base | [] [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] [] [] | gstreamer | [] [] [] [] [] [] [] | gtick | [] () [] [] [] | gtkam | [] () [] [] [] [] | gtkspell | [] [] [] [] [] [] [] [] | guix | [] [] | guix-packages | | gutenprint | [] [] [] [] | hello | [] [] [] [] [] [] [] [] | help2man | [] [] [] [] [] [] [] | help2man-texi | [] [] [] | hylafax | [] [] | idutils | [] [] [] [] [] | iso_15924 | [] () [] [] () [] () | iso_3166 | [] () [] [] [] [] () [] () | iso_3166_2 | [] () () () | iso_4217 | [] () [] [] [] () [] () | iso_639 | [] () [] [] () [] () | iso_639_3 | () () () | iso_639_5 | () () () | jwhois | [] [] [] [] [] | kbd | [] [] [] [] [] [] | klavaro | [] [] [] [] [] [] [] | ld | [] [] [] [] | leafpad | [] [] [] [] [] [] [] [] | libc | [] [] [] [] [] | libexif | [] [] () [] [] | libextractor | [] | libgnutls | [] [] [] [] | libgphoto2 | [] () [] | libgphoto2_port | [] () [] [] [] [] | libgsasl | [] [] [] [] [] | libiconv | [] [] [] [] [] [] [] | libidn | [] [] [] [] [] | liferea | [] () [] [] [] [] [] | lilypond | [] [] [] [] [] [] | lordsawar | [] [] | lprng | | lynx | [] [] [] [] [] [] | m4 | [] [] [] [] [] [] | mailfromd | [] | mailutils | [] [] [] [] | make | [] [] [] [] [] | man-db | [] [] [] [] | man-db-manpages | [] [] | midi-instruments | [] [] [] [] [] [] [] [] [] | minicom | [] [] [] [] [] | mkisofs | [] [] [] | myserver | [] [] [] [] | nano | [] [] [] [] [] [] [] | opcodes | [] [] [] [] [] | parted | [] [] [] | pies | [] | pnmixer | [] [] | popt | [] [] [] [] [] [] | procps-ng | [] [] | procps-ng-man | [] [] | psmisc | [] [] [] [] [] [] [] | pspp | [] [] [] | pushover | () [] [] [] | pwdutils | [] [] [] | pyspread | [] [] [] | radius | [] [] | recode | [] [] [] [] [] [] [] | recutils | [] [] [] [] | rpm | [] [] [] [] [] | rush | [] [] [] | sarg | [] [] | sed | [] [] [] [] [] [] [] [] | sharutils | [] [] [] [] | shishi | [] [] [] | skribilo | [] [] [] | solfege | [] [] [] [] [] [] [] [] | solfege-manual | [] [] [] [] [] | spotmachine | [] [] [] [] [] | sudo | [] [] [] [] [] [] | sudoers | [] [] [] [] [] [] | sysstat | [] [] [] [] [] [] | tar | [] [] [] [] [] [] [] | texinfo | [] [] [] [] [] | texinfo_document | [] [] [] [] | tigervnc | [] [] [] [] [] [] | tin | [] [] [] [] | tin-man | [] | tracgoogleappsa... | [] [] [] [] [] | trader | [] [] [] [] [] [] | util-linux | [] [] [] [] | ve | [] [] [] [] [] | vice | () () () | vmm | [] [] | vorbis-tools | [] [] [] [] | wastesedge | [] | wcd | [] [] [] [] | wcd-man | [] | wdiff | [] [] [] [] [] [] [] | wget | [] [] [] [] [] [] | wyslij-po | [] [] [] [] | xboard | [] [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] [] [] [] | +--------------------------------------------------+ da de el en en_GB en_ZA eo es et eu fa fi fr 119 131 32 1 6 0 94 95 22 13 4 102 139 ga gd gl gu he hi hr hu hy ia id is it ja ka kk +-------------------------------------------------+ a2ps | [] [] [] [] | aegis | [] | anubis | [] [] [] [] | aspell | [] [] [] [] [] | bash | [] [] [] [] | bfd | [] [] | binutils | [] [] [] | bison | [] | bison-runtime | [] [] [] [] [] [] [] [] | buzztrax | | ccd2cue | [] | ccide | [] [] | cflow | [] [] [] | clisp | | coreutils | [] [] | cpio | [] [] [] [] [] [] | cppi | [] [] [] [] [] | cpplib | [] [] | cryptsetup | [] | datamash | | denemo | [] | dfarc | [] [] [] | dialog | [] [] [] [] [] [] [] [] [] [] | dico | | diffutils | [] [] [] [] | dink | [] | direvent | [] | doodle | [] [] | dos2unix | [] [] | dos2unix-man | | e2fsprogs | [] [] | enscript | [] [] [] | exif | [] [] [] [] [] [] | fetchmail | [] [] [] | findutils | [] [] [] [] [] [] [] | flex | [] | freedink | [] [] [] [] | fusionforge | | gas | [] | gawk | [] () [] | gcal | | gcc | | gdbm | | gettext-examples | [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] [] | gettext-tools | [] [] [] | gjay | [] | glunarclock | [] [] [] [] [] [] | gnubiff | [] [] () | gnubik | [] [] [] | gnucash | () () () () () | gnuchess | | gnulib | [] [] [] [] [] | gnunet | | gnunet-gtk | | gold | [] [] | gphoto2 | [] [] [] [] | gprof | [] [] [] [] | gramadoir | [] [] [] | grep | [] [] [] [] [] [] [] | grub | [] [] [] | gsasl | [] [] [] [] [] | gss | [] [] [] [] [] | gst-plugins-bad | [] [] [] | gst-plugins-base | [] [] [] [] | gst-plugins-good | [] [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] | gstreamer | [] [] [] [] [] | gtick | [] [] [] [] [] | gtkam | [] [] [] [] [] | gtkspell | [] [] [] [] [] [] [] [] [] [] | guix | | guix-packages | | gutenprint | [] [] [] | hello | [] [] [] [] [] | help2man | [] [] [] | help2man-texi | | hylafax | [] | idutils | [] [] | iso_15924 | [] [] [] [] [] [] | iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] | iso_3166_2 | [] [] | iso_4217 | [] [] [] [] [] [] | iso_639 | [] [] [] [] [] [] [] [] [] | iso_639_3 | [] [] | iso_639_5 | | jwhois | [] [] [] [] | kbd | [] [] [] | klavaro | [] [] [] [] [] | ld | [] [] [] [] | leafpad | [] [] [] [] [] [] [] () | libc | [] [] [] [] [] | libexif | [] | libextractor | | libgnutls | [] | libgphoto2 | [] [] | libgphoto2_port | [] [] | libgsasl | [] [] [] [] | libiconv | [] [] [] [] [] [] [] | libidn | [] [] [] [] | liferea | [] [] [] [] [] | lilypond | [] | lordsawar | | lprng | [] | lynx | [] [] [] [] | m4 | [] [] [] [] [] | mailfromd | | mailutils | | make | [] [] [] [] | man-db | [] [] | man-db-manpages | [] [] | midi-instruments | [] [] [] [] [] [] [] [] [] | minicom | [] [] [] | mkisofs | [] [] | myserver | [] | nano | [] [] [] [] [] [] | opcodes | [] [] [] | parted | [] [] [] [] [] | pies | | pnmixer | [] [] | popt | [] [] [] [] [] [] [] [] [] [] | procps-ng | | procps-ng-man | | psmisc | [] [] [] [] | pspp | [] [] | pushover | [] | pwdutils | [] | pyspread | | radius | [] | recode | [] [] [] [] [] [] [] | recutils | | rpm | [] | rush | [] | sarg | | sed | [] [] [] [] [] [] [] | sharutils | | shishi | | skribilo | [] | solfege | [] [] | solfege-manual | | spotmachine | | sudo | [] [] [] [] | sudoers | [] [] [] | sysstat | [] [] [] [] | tar | [] [] [] [] [] [] | texinfo | [] [] [] | texinfo_document | [] [] [] | tigervnc | | tin | | tin-man | | tracgoogleappsa... | [] [] [] [] | trader | [] [] | util-linux | [] | ve | [] | vice | () () | vmm | | vorbis-tools | [] [] | wastesedge | [] | wcd | | wcd-man | | wdiff | [] [] [] | wget | [] [] [] [] | wyslij-po | [] [] [] | xboard | | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] [] [] | +-------------------------------------------------+ ga gd gl gu he hi hr hu hy ia id is it ja ka kk 35 2 47 4 8 2 60 71 2 6 81 11 87 57 0 3 kn ko ku ky lg lt lv mk ml mn mr ms mt nb ne nl +--------------------------------------------------+ a2ps | [] [] | aegis | [] | anubis | [] [] [] | aspell | [] [] | bash | [] [] | bfd | | binutils | | bison | [] | bison-runtime | [] [] [] [] [] [] | buzztrax | | ccd2cue | | ccide | [] [] | cflow | [] | clisp | [] | coreutils | [] [] | cpio | [] | cppi | | cpplib | [] | cryptsetup | [] | datamash | [] [] | denemo | | dfarc | [] [] | dialog | [] [] [] [] [] [] | dico | | diffutils | [] [] [] | dink | [] | direvent | [] | doodle | [] | dos2unix | [] [] | dos2unix-man | [] | e2fsprogs | [] | enscript | [] | exif | [] [] [] | fetchmail | [] | findutils | [] [] | flex | [] | freedink | [] [] | fusionforge | | gas | | gawk | [] | gcal | | gcc | | gdbm | | gettext-examples | [] [] [] [] [] [] | gettext-runtime | [] [] [] | gettext-tools | [] | gjay | | glunarclock | [] [] | gnubiff | [] | gnubik | [] [] | gnucash | () () () () () () () [] | gnuchess | [] [] | gnulib | [] | gnunet | | gnunet-gtk | | gold | | gphoto2 | [] | gprof | [] [] | gramadoir | [] | grep | [] [] | grub | [] [] [] | gsasl | [] | gss | | gst-plugins-bad | [] [] [] | gst-plugins-base | [] [] [] | gst-plugins-good | [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] | gstreamer | [] [] [] | gtick | [] | gtkam | [] [] | gtkspell | [] [] [] [] [] [] [] | guix | | guix-packages | | gutenprint | [] | hello | [] [] [] | help2man | [] | help2man-texi | | hylafax | [] | idutils | [] | iso_15924 | () [] [] | iso_3166 | [] [] [] () [] [] [] [] [] [] | iso_3166_2 | () [] | iso_4217 | () [] [] [] | iso_639 | [] [] () [] [] [] [] | iso_639_3 | [] () [] | iso_639_5 | () | jwhois | [] [] | kbd | [] | klavaro | [] [] | ld | | leafpad | [] [] [] [] [] | libc | [] [] | libexif | [] | libextractor | [] | libgnutls | [] [] | libgphoto2 | [] | libgphoto2_port | [] | libgsasl | [] | libiconv | [] [] | libidn | [] | liferea | [] [] [] | lilypond | [] | lordsawar | | lprng | | lynx | [] | m4 | [] | mailfromd | | mailutils | | make | [] [] | man-db | [] | man-db-manpages | [] | midi-instruments | [] [] [] [] [] [] [] | minicom | [] | mkisofs | [] | myserver | | nano | [] [] [] | opcodes | [] | parted | [] [] | pies | | pnmixer | [] | popt | [] [] [] [] [] | procps-ng | | procps-ng-man | | psmisc | [] | pspp | [] [] | pushover | | pwdutils | [] | pyspread | | radius | [] | recode | [] [] | recutils | [] | rpm | [] | rush | [] | sarg | | sed | [] [] | sharutils | [] | shishi | | skribilo | | solfege | [] [] | solfege-manual | [] | spotmachine | [] | sudo | [] [] [] | sudoers | [] [] [] | sysstat | [] [] | tar | [] [] [] | texinfo | [] | texinfo_document | [] | tigervnc | [] | tin | | tin-man | | tracgoogleappsa... | [] [] [] | trader | [] | util-linux | [] | ve | [] | vice | [] | vmm | [] | vorbis-tools | [] | wastesedge | [] | wcd | [] | wcd-man | [] | wdiff | [] | wget | [] [] | wyslij-po | [] | xboard | [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] | +--------------------------------------------------+ kn ko ku ky lg lt lv mk ml mn mr ms mt nb ne nl 5 15 4 6 0 13 23 3 3 3 4 11 2 42 1 125 nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr +------------------------------------------------+ a2ps | [] [] [] [] [] [] [] | aegis | [] [] | anubis | [] [] [] | aspell | [] [] [] [] [] [] [] | bash | [] [] [] [] [] [] | bfd | [] [] | binutils | [] [] | bison | [] [] [] | bison-runtime | [] [] [] [] [] [] [] [] | buzztrax | [] | ccd2cue | [] [] | ccide | [] [] [] | cflow | [] [] [] | clisp | [] | coreutils | [] [] [] [] | cpio | [] [] [] | cppi | [] [] [] | cpplib | [] [] [] | cryptsetup | [] [] [] | datamash | [] [] | denemo | | dfarc | [] [] [] | dialog | [] [] [] [] [] [] [] | dico | [] | diffutils | [] [] [] | dink | | direvent | [] [] [] | doodle | [] [] | dos2unix | [] [] [] [] | dos2unix-man | [] [] | e2fsprogs | [] | enscript | [] [] [] [] [] [] | exif | [] [] [] [] [] [] | fetchmail | [] [] [] | findutils | [] [] [] [] [] [] | flex | [] [] [] [] [] | freedink | [] [] [] [] [] | fusionforge | | gas | | gawk | [] | gcal | | gcc | | gdbm | [] [] [] | gettext-examples | [] [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] [] [] [] | gettext-tools | [] [] [] [] [] [] [] | gjay | [] | glunarclock | [] [] [] [] [] [] | gnubiff | [] | gnubik | [] [] [] [] | gnucash | () () () () () [] | gnuchess | [] [] | gnulib | [] [] [] [] [] | gnunet | | gnunet-gtk | | gold | | gphoto2 | [] [] [] [] [] | gprof | [] [] [] [] | gramadoir | [] [] | grep | [] [] [] [] [] [] | grub | [] [] [] [] [] | gsasl | [] [] [] | gss | [] [] [] [] | gst-plugins-bad | [] [] [] [] [] | gst-plugins-base | [] [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] [] [] | gstreamer | [] [] [] [] [] [] [] | gtick | [] [] [] [] [] | gtkam | [] [] [] [] [] [] | gtkspell | [] [] [] [] [] [] [] [] [] | guix | | guix-packages | | gutenprint | [] [] | hello | [] [] [] [] [] [] | help2man | [] [] [] [] | help2man-texi | [] | hylafax | | idutils | [] [] [] | iso_15924 | [] () [] [] [] [] | iso_3166 | [] [] [] [] () [] [] [] [] [] [] [] [] | iso_3166_2 | [] () [] | iso_4217 | [] [] () [] [] [] [] [] | iso_639 | [] [] [] () [] [] [] [] [] [] | iso_639_3 | [] () | iso_639_5 | () [] | jwhois | [] [] [] [] | kbd | [] [] | klavaro | [] [] [] [] [] | ld | | leafpad | [] [] [] [] [] [] [] [] | libc | [] [] [] | libexif | [] () [] | libextractor | [] | libgnutls | [] | libgphoto2 | [] | libgphoto2_port | [] [] [] [] [] | libgsasl | [] [] [] [] | libiconv | [] [] [] [] [] | libidn | [] [] [] | liferea | [] [] [] [] () [] [] | lilypond | | lordsawar | | lprng | [] | lynx | [] [] | m4 | [] [] [] [] [] | mailfromd | [] | mailutils | [] | make | [] [] [] | man-db | [] [] [] | man-db-manpages | [] [] [] | midi-instruments | [] [] [] [] [] [] [] [] | minicom | [] [] [] [] | mkisofs | [] [] [] | myserver | [] [] | nano | [] [] [] [] [] [] | opcodes | | parted | [] [] [] [] [] [] | pies | [] | pnmixer | [] | popt | [] [] [] [] [] [] | procps-ng | [] | procps-ng-man | [] | psmisc | [] [] [] [] | pspp | [] [] | pushover | | pwdutils | [] | pyspread | [] [] | radius | [] [] | recode | [] [] [] [] [] [] [] [] | recutils | [] [] | rpm | [] | rush | [] [] [] | sarg | [] [] | sed | [] [] [] [] [] [] [] [] | sharutils | [] [] [] | shishi | [] [] | skribilo | [] | solfege | [] [] [] | solfege-manual | [] [] | spotmachine | [] [] | sudo | [] [] [] [] [] [] | sudoers | [] [] [] [] | sysstat | [] [] [] [] [] | tar | [] [] [] [] [] | texinfo | [] [] [] | texinfo_document | [] [] | tigervnc | [] [] [] | tin | [] | tin-man | | tracgoogleappsa... | [] [] [] [] | trader | [] [] | util-linux | [] [] | ve | [] [] [] | vice | | vmm | | vorbis-tools | [] [] [] | wastesedge | | wcd | | wcd-man | | wdiff | [] [] [] [] [] | wget | [] [] [] [] [] | wyslij-po | [] [] [] [] | xboard | [] [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] | +------------------------------------------------+ nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr 7 3 6 114 1 12 88 32 82 3 40 45 7 101 sv sw ta te tg th tr uk ur vi wa wo zh_CN +----------------------------------------------+ a2ps | [] [] [] [] [] | aegis | [] | anubis | [] [] [] [] | aspell | [] [] [] [] [] | bash | [] [] [] [] | bfd | [] [] [] | binutils | [] [] [] | bison | [] [] [] [] | bison-runtime | [] [] [] [] [] [] | buzztrax | [] [] [] | ccd2cue | [] [] [] | ccide | [] [] [] [] | cflow | [] [] [] [] | clisp | | coreutils | [] [] [] | cpio | [] [] [] [] [] | cppi | [] [] [] [] | cpplib | [] [] [] [] [] | cryptsetup | [] [] [] | datamash | [] [] [] | denemo | [] | dfarc | [] [] | dialog | [] [] [] [] [] [] | dico | [] | diffutils | [] [] [] [] [] | dink | [] | direvent | [] [] | doodle | [] [] | dos2unix | [] [] [] [] | dos2unix-man | [] [] [] | e2fsprogs | [] [] [] [] | enscript | [] [] [] [] | exif | [] [] [] [] [] | fetchmail | [] [] [] [] | findutils | [] [] [] [] [] | flex | [] [] [] [] | freedink | [] [] [] | fusionforge | | gas | [] | gawk | [] [] [] | gcal | [] [] [] | gcc | [] | gdbm | [] [] | gettext-examples | [] [] [] [] [] | gettext-runtime | [] [] [] [] [] | gettext-tools | [] [] [] [] [] | gjay | [] [] [] | glunarclock | [] [] [] [] | gnubiff | [] [] | gnubik | [] [] [] [] | gnucash | () () () () [] | gnuchess | [] [] [] | gnulib | [] [] [] [] | gnunet | | gnunet-gtk | | gold | [] [] | gphoto2 | [] [] [] [] | gprof | [] [] [] [] | gramadoir | [] [] [] | grep | [] [] [] [] [] | grub | [] [] [] [] | gsasl | [] [] [] [] | gss | [] [] [] | gst-plugins-bad | [] [] [] [] [] | gst-plugins-base | [] [] [] [] [] | gst-plugins-good | [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] [] | gstreamer | [] [] [] [] [] | gtick | [] [] [] | gtkam | [] [] [] [] | gtkspell | [] [] [] [] [] [] [] | guix | | guix-packages | | gutenprint | [] [] [] [] | hello | [] [] [] [] [] [] | help2man | [] [] [] | help2man-texi | [] | hylafax | [] | idutils | [] [] [] | iso_15924 | [] () [] [] () [] | iso_3166 | [] [] () [] [] () [] [] | iso_3166_2 | () [] [] () [] | iso_4217 | [] () [] [] () [] | iso_639 | [] [] [] () [] [] () [] [] | iso_639_3 | [] () [] [] () | iso_639_5 | () [] () | jwhois | [] [] [] [] | kbd | [] [] [] [] | klavaro | [] [] [] [] [] [] | ld | [] [] [] [] [] | leafpad | [] [] [] [] [] [] | libc | [] [] [] [] [] | libexif | [] [] () | libextractor | [] [] | libgnutls | [] [] [] [] | libgphoto2 | [] [] [] | libgphoto2_port | [] [] [] [] | libgsasl | [] [] [] [] | libiconv | [] [] [] [] [] | libidn | () [] [] [] | liferea | [] [] [] [] [] | lilypond | [] | lordsawar | | lprng | [] | lynx | [] [] [] [] | m4 | [] [] [] | mailfromd | [] [] | mailutils | [] | make | [] [] [] [] | man-db | [] [] [] | man-db-manpages | [] [] | midi-instruments | [] [] [] [] [] [] | minicom | [] [] | mkisofs | [] [] [] | myserver | [] | nano | [] [] [] [] | opcodes | [] [] [] | parted | [] [] [] [] [] | pies | [] [] | pnmixer | [] [] [] | popt | [] [] [] [] [] [] [] | procps-ng | [] [] | procps-ng-man | [] | psmisc | [] [] [] [] | pspp | [] [] [] | pushover | [] | pwdutils | [] [] | pyspread | [] | radius | [] [] | recode | [] [] [] [] | recutils | [] [] [] | rpm | [] [] [] [] | rush | [] [] | sarg | | sed | [] [] [] [] [] | sharutils | [] [] [] [] | shishi | [] [] | skribilo | [] [] | solfege | [] [] [] [] | solfege-manual | [] | spotmachine | [] [] [] | sudo | [] [] [] [] [] | sudoers | [] [] [] [] | sysstat | [] [] [] [] [] | tar | [] [] [] [] [] | texinfo | [] [] [] | texinfo_document | [] | tigervnc | [] [] [] | tin | [] | tin-man | | tracgoogleappsa... | [] [] [] [] [] | trader | [] | util-linux | [] [] [] [] | ve | [] [] [] [] | vice | () () | vmm | | vorbis-tools | [] [] | wastesedge | | wcd | [] [] [] | wcd-man | [] | wdiff | [] [] [] [] | wget | [] [] [] | wyslij-po | [] [] | xboard | [] [] | xdg-user-dirs | [] [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] | +----------------------------------------------+ sv sw ta te tg th tr uk ur vi wa wo zh_CN 106 1 4 3 0 13 51 115 1 125 7 1 100 zh_HK zh_TW +-------------+ a2ps | | 30 aegis | | 9 anubis | | 19 aspell | | 29 bash | [] | 23 bfd | | 11 binutils | | 12 bison | [] | 18 bison-runtime | [] | 38 buzztrax | | 9 ccd2cue | | 10 ccide | | 17 cflow | | 16 clisp | | 10 coreutils | | 18 cpio | | 20 cppi | | 17 cpplib | [] | 19 cryptsetup | | 14 datamash | | 11 denemo | | 5 dfarc | | 17 dialog | [] | 42 dico | | 6 diffutils | | 22 dink | | 10 direvent | | 11 doodle | | 12 dos2unix | [] | 18 dos2unix-man | | 9 e2fsprogs | | 15 enscript | | 21 exif | | 27 fetchmail | | 19 findutils | | 29 flex | [] | 19 freedink | | 24 fusionforge | | 3 gas | | 5 gawk | | 13 gcal | | 8 gcc | | 2 gdbm | | 10 gettext-examples | [] [] | 40 gettext-runtime | [] [] | 35 gettext-tools | [] | 24 gjay | | 9 glunarclock | [] | 27 gnubiff | | 9 gnubik | | 19 gnucash | () | 6 gnuchess | | 11 gnulib | | 23 gnunet | | 1 gnunet-gtk | | 1 gold | | 7 gphoto2 | [] | 19 gprof | | 21 gramadoir | | 14 grep | [] | 31 grub | | 21 gsasl | [] | 19 gss | | 17 gst-plugins-bad | | 21 gst-plugins-base | | 27 gst-plugins-good | | 32 gst-plugins-ugly | | 34 gstreamer | [] | 32 gtick | | 19 gtkam | | 24 gtkspell | [] [] | 48 guix | | 2 guix-packages | | 0 gutenprint | | 15 hello | [] | 30 help2man | | 18 help2man-texi | | 5 hylafax | | 5 idutils | | 14 iso_15924 | [] | 23 iso_3166 | [] [] | 58 iso_3166_2 | | 9 iso_4217 | [] [] | 28 iso_639 | [] [] | 46 iso_639_3 | | 10 iso_639_5 | | 2 jwhois | [] | 20 kbd | | 17 klavaro | | 30 ld | [] | 15 leafpad | [] | 39 libc | [] | 24 libexif | | 10 libextractor | | 5 libgnutls | | 13 libgphoto2 | | 10 libgphoto2_port | [] | 19 libgsasl | | 18 libiconv | [] | 29 libidn | | 17 liferea | | 29 lilypond | | 11 lordsawar | | 3 lprng | | 3 lynx | | 19 m4 | [] | 22 mailfromd | | 4 mailutils | | 6 make | | 19 man-db | | 15 man-db-manpages | | 10 midi-instruments | [] | 43 minicom | [] | 17 mkisofs | | 13 myserver | | 9 nano | [] | 30 opcodes | | 12 parted | [] | 23 pies | | 4 pnmixer | | 9 popt | [] | 36 procps-ng | | 5 procps-ng-man | | 4 psmisc | [] | 22 pspp | | 13 pushover | | 6 pwdutils | | 8 pyspread | | 6 radius | | 9 recode | | 31 recutils | | 10 rpm | [] | 13 rush | | 10 sarg | | 4 sed | [] | 35 sharutils | | 13 shishi | | 7 skribilo | | 7 solfege | | 21 solfege-manual | | 9 spotmachine | | 11 sudo | | 26 sudoers | | 22 sysstat | | 23 tar | [] | 30 texinfo | | 17 texinfo_document | | 13 tigervnc | | 14 tin | [] | 7 tin-man | | 1 tracgoogleappsa... | [] | 22 trader | | 12 util-linux | | 13 ve | | 14 vice | | 1 vmm | | 3 vorbis-tools | | 13 wastesedge | | 3 wcd | | 8 wcd-man | | 3 wdiff | [] | 23 wget | | 21 wyslij-po | | 14 xboard | | 10 xdg-user-dirs | [] [] | 68 xkeyboard-config | [] | 28 +-------------+ 89 teams zh_HK zh_TW 166 domains 7 42 2809 Some counters in the preceding matrix are higher than the number of visible blocks let us expect. This is because a few extra PO files are used for implementing regional variants of languages, or language dialects. For a PO file in the matrix above to be effective, the package to which it applies should also have been internationalized and distributed as such by its maintainer. There might be an observable lag between the mere existence a PO file and its wide availability in a distribution. If Jun 2014 seems to be old, you may fetch a more recent copy of this 'ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix with full percentage details can be found at 'http://translationproject.org/extra/matrix.html'. 1.5 Using 'gettext' in new packages =================================== If you are writing a freely available program and want to internationalize it you are welcome to use GNU 'gettext' in your package. Of course you have to respect the GNU Lesser General Public License which covers the use of the GNU 'gettext' library. This means in particular that even non-free programs can use 'libintl' as a shared library, whereas only free software can use 'libintl' as a static library or use modified versions of 'libintl'. Once the sources are changed appropriately and the setup can handle the use of 'gettext' the only thing missing are the translations. The Free Translation Project is also available for packages which are not developed inside the GNU project. Therefore the information given above applies also for every other Free Software Project. Contact 'coordinator@translationproject.org' to make the '.pot' files available to the translation teams. zbar-0.23/examples/0000775000175000017500000000000013471606255011226 500000000000000zbar-0.23/examples/sha1sum0000664000175000017500000000231513471225716012452 00000000000000a56811d078ea5cfac9be5deb4b6796177763e152 zbarimg codabar.png cc53bf34878f769fc3611020c11e572f2853bd2a zbarimg code-128.png 7537d593ea42393a43bc0eda0a896c0e31017dd8 zbarimg code-39.png f8f55b828eb7d0400f300be021d29293bd4a3191 zbarimg code-93.png aebbdbed0b32d7fd72f1245e3fb384822d492062 zbarimg databar.png 9e245874d3229a575eabfdba1c668369c55960e3 zbarimg databar-exp.png 53429fc04dfcf674349e2db6cfbaf73e301fc3dc zbarimg ean-13.png 4095418b74efbb026dd730543558fefdda46f5b9 zbarimg ean-8.png 5501245dbba21c153f690787fc97ab50c973b846 zbarimg i2-5.png b350ca7efad7a50c5ac082d5c683a8e8d8d380a7 zbarimg qr-code.png 84c0ce7072e2227073dc8bd1e5f4518d8f42ae3d zbarimg sqcode1-generated.png 84c0ce7072e2227073dc8bd1e5f4518d8f42ae3d zbarimg sqcode1-scanned.png 5ab2b518e2c9d827cedc5825d2e3c9646d43713a zbarimg -Sean2.enable ean-2.png 668fef8cb9caac34df8cb8564c2cde62e4af5e65 zbarimg -Sean5.enable ean-5.png b567e550216fe24f7652f683146365a9fe7ee867 zbarimg -Sisbn10.enable ean-13.png d0f37aa076d42c270f7231c5490beea5605e2ba0 zbarimg -Sisbn13.enable ean-13.png 3f041225df3b8364b5fd0daf9cf402e8a4731f9b zbarimg -Supca.enable code-upc-a.png b350ca7efad7a50c5ac082d5c683a8e8d8d380a7 zbarimg -Stest-inverted qr-code-inverted.png zbar-0.23/examples/databar.png0000664000175000017500000000335613471225716013260 00000000000000‰PNG  IHDRÀdçÏÍôPLTE3f+™U™UÌ€Ì33+33U33€Ì3ªÌffªÌfªÿfÕÿ™+™U™€™Õÿ™ÿÿÌÙ̀3̪3Ìÿÿÿ€3ÿª3ÿªfÿÕfÿÕ™ÿÿ™ÿÿÌÿÿÿ`µIDATxÚí—?vÛ0 Æožä)‡ÐÖ©«'Ÿ@i¦^À“§^!“. ©št"S4Õ“¤¥Ä?tÒ*C§ïÓ{q‡H€LX×臞UËï<ÎÙÒfÊ7ü§Ùyû÷ÞÏOžó±”1$ €ÿàs?À?˜vcübIlbižè×°åÏsœ|’©Ní–F‹.½-ƃ|«Öë$#ç_TÇIÉëoªeƒ .NjBµš •=­ùmvtáaÔŸ“ËÖÞf”®ˆ¯>eäíZgÛ¬äô7Õœt”‰<ª~—ü=<³ó4)v…Ÿ^¾=ð['ú¬F·ÆxêÉàZGof%ÙNJNSÍÀ\SÐG:×v¾Úr_(²†’,“bw­m³Íõž$8Ÿ2n.þI<©ÁÇKû'ú½’éWPsÐñ®j8oË™ØâGo[ .ÔO<‘\.ç‡v-‚¾Ö§œR5¬ëKGg­Srú›jÞ ˜¸Ùòº&Ù¹>r^x5¢æµfa›æ½CAÓÎæÔNá[“j´Ûµ.è)—nf.cŒú›jÞ Ð—RYR¾B´½&œÕ8Kzx Óª«JÉ3;þ’ sp­éwgJEK4WGo.z0ýçM5o,³fà§®ÀkÊí°ŽRA“]ê)%$³çØZ£VÕQ)¥bðÍs G½¾ÑßRó!×É£e \þF:ßþG^Â#»¨ÔUn!V˜ZüqHõãRA^+<}Åé·›jÞÀTï×€¬ uÞíhë!jÿ²ÔìÚÔ>w­”sï´Eï¹Ð‡b uPs »~VÓó®}³T´IB}Ñßô[î ©ÉŒCðGµ#ì“*ÝêÿMÍä(Λh—³ö—¹óVÒå@S´S›ßǙϢùñ›RÖßVËÒ…Žþ$,zƒF²òQ89G ñ"åØÙê üwOf^Ÿ6‰ÈvádçñPÄoJNS-äsÀn‡BÖÎ¥¹N7JÆÓ‚óíJšŒ¤~óâïBÕxsLJNSͤ“˜¹ÂÍ#o?RÕòæX%<·çoï’·E*ßê=%ß½RÖßTËAÏÚ?>|º÷ÿ.Åõ±|&ÍÄ],Íñ³.@ñÙ{O¿ïà7•tŠ›|ÄÖªIEND®B`‚zbar-0.23/examples/sqcode1-generated.png0000664000175000017500000001023613471225716015150 00000000000000‰PNG  IHDRÊÊÞ«Më pHYs  šœtIMEã %Ü| ,PLTEÿÿÿ¥ÙŸÝbKGDÿ-ÞIDATXÃ¥Xy8”kŸ:âœQGÙŠê”)-Ò6:Ùú*tTT˜NÛp´ÏT3óN‹¥HN Z´PÑ>–ÊZ¤f3³»1Sf¼¾ûEÛ©Îõ]×7ðÎ3Ïï½÷ûþ=¡ï{Ÿ¿ü$X÷Ï÷QXAöý¾kyL<Å@w…óS“Š?wŒR4+ÑÝêH¡ Ý=UÈéAì(>WYœÝUÞ(Cåd%~ÚÞ©D’hÎ3ú2(‡ êkD(*Ù<ÁG€¶)Uޱ é ì4~½»ŒïýF@¡e!|~½h(»;L’â/¨¯O <Õ›/øwsz%å9¬7FÞË ŒI©O‘Ó#Ù‰881V"9•C¤édöN|¥1öZwC¯$,Eˆ!ˆ  ØÚŽ‘4+„†8Ðhn”%3#©4øšC:ШTŠ=‘™ð…2tÐÊfãß˽SÉbE¦zeÑv84„eYlþv¿wXP¿SêÝ¥wbù9„Þ[ÝN)*Mˆ4¨2qpÈÂ5â îÀ2‹Sü#ä© T¶}îEy_-ªÆ¨dÝiAŠž˜¨æË­û´›­ž´¾ôWáP‡æåÍøÏ¡„nÅ‘E¥}MS?LQcfž­žCû ýÃL}“¶Å¾qiâ)'Þ>láñÖPÍ¿{I&®úËûð1íärÕç¢R‘ý\þv+@¡²&»Ì¾Ž9åÞº%‹hqOÏ^³¸3Á6 r£]Ûñ†hù½š Ûò<ŒTí^Âgþ—F×ãž7Ú\ˆÑ¤÷ÿÎðù}hkÒÈDß§ÞÓ/‡äz*Zæ¿x¼/Úé¦ò'"÷p(–òÜXY¦GYþ­ÞX»&j&[=˜z:b ÁÐãçýa›sªQË|MZ׬wõÚäIS°s‘UCg?wŠÆ 7*˜iéÈ=\—ÞßÂ,ÔñÂ|‘|GP}оÎZ´¼VkÈçë+Ú5d²ð!ZŒ!ÙøRšTÎVgëó³ùŠòrа/MN§ÛѬ¬h4*d‚ ," Å£œ¡l‚ô•)¤ÎÙ‰*Ú ã¸J<ʃ Å*,ç_8 õûžÃ¥>i©¥à q‚OQ¢ñ£;oâf{w^ZüŒ=—Œg”ŒÂÞ«ì¿?¤Áv$,L@f´CÊ>h¤@«Úí.Nâõ©Þ¤ªÜöÕËg¯y,ŽØpâ%RRFÊ»qâ•€Fz>òˆèWŽÖ¯ëGdß,ãÅ ¿'z€jC/¦ÌäÑ^ÖxùåH󵥯öÆ;Ûº8Bn 34`5*ÿô)îC…ôÝFŸSñ!‹ëCÓ¤/.£×m±^¨Q¶Ag[‚,’æ$'|ö†6@ñ¾Tã]aGPÄ5³¹Á ¡ebðYæÈyÕ>Ç"l×µ\¨Ü±y†pÃ<^Rv,î2o<~mlŒÑi4è@(«:ƒv6Ÿ/S†ñÁMð„kˆ‘²½—yPÎýO€âË™›×…ÌÛˆ·ó¹ OO&…²‚˜WSO2¢¹u\ùÉ2J€ø$WÀ„JQµÂZW7_eн½[ËNáÐ,ˆr?úkh8 pôÚ¯¡Ü®ÄA% /1 >Ï^‰9ËŠ­1¸ôŒý–¿ TD4 ¨Û†œÄõ‚×!.Ÿ²c·ð’û·}©Š44¤®ÌÏ“ØÝ€ Î'ëüÈ ¥tïêõU½=Åx›Àx›ÍLt<^ LCÄæƒTá=ðvˆ—ê›nZÛÊYŸl3X}ñ`W²‰ã?ÐÍïÕnÿØÎaI$Âí¼º6BÎéuêöP"(;Á.Í¡­Ë€¦2{eŸ§¦­ Ö*jeÑÂ݇gœ¥iM0‰*EIw‘âá/Ï6¾3Ó—Ô¦vx¼OÀ Joh/ñÜWä–òç¬D֫׿Xhe´(…ܨºG_Ò.:N>¿ªy˜ŒieÎ>ĜڱþÞ£¨ëí]–XKŸ =Ü2~ÄaSÖ3¢(O¼R*°6¸c{_l,~î±l’ÉýÁ+1ï/_œE½?ýM‘G醛ÆQo懤"¿ì×YØb›–s‚ëí×¼©´ªdeöåЄ>€z§³Õ$u©Å‚¥×¯Œ2^?6Õ,yùͺA Ø%ÊÑ\· þ†ªêqͰ‰Û•ܪ“·Ùa\ƒlðáäpòANS§/±K}W5ÿK7Ázn *¥Ê)—Ç@sa~¿Ú3@s¢Q7ŠÀ.“^W»YÝŠ»¬/Æz"T¥ c©ƒõ¸ãÙûmÖ#Ä+åÛ¬' <ß+¤;°Ý¨F°ÿîb?õbÔ~âã†8PI4*Ù:ˆΆ}\!~ÁÂ%ù¨Ò—ú@öö~Pé,lõ«ô¬òsf mŸûç6ýLÅ™ 4U¼7º©i9ón,Dyò ߨüÀ?Ö×½ŠÒÕÝ4O›~ìàÝ+ÚpVzgo–…ù"V ºEšâ WôS^ÉZˆWo| +[{ùÛêH‡Z8&²<óM¼Y%–îÀD’õ]¹÷ÉóœÙ—›«òõ}ohFÄšäã»-—4ê•ÍeÞ†‘e…KkÛǽ¦›Ùrwè•£­ªŠÅ²B‚rÒ››vIãLæ‚ç{ŒËV:ˆ³Ê"}ýÐ yî³S–\+`ìKZ–û“”ùhá)ë§J‘WzÖéj¾Ï3öD€]=œ…MçEé¥".Û ÈñVƒñÞ“?ÁüŸ2ô_m§D?þÝƒí­ šL¼«ÿâýQà6½XåOôBÖÖ„¶Â{#¾£Ý9Rx‘ *7ŒA[ÞO»èH¾xkÁRRm¨¦–Ùññ4è½=Ÿ(üõÜ–)’y;Dú¢’ÖLó…éêúE à‡sf²n,Ù=çè’ýQë”á±§§-YØéTv}鹉¼ê;“h5Ó:I†:«›Ž_ƒZ–-]¸ÿŠçubW•àô+µPÒnSñ«|ìPµ6øÐ£u£_̼'®¦çžºš• 3ÑÞ—%oÌ€ªíà\¥§5Þ½f8=E0UÛç×cûÃýl=9`k ïR9º>v'ާ;Íp󛸼[§Æ~tìÊ©™û~K²×Úu¬B{¹É‘‹Ä©‘¥‰Ù«“q¶œ˜ýþJìЦë÷{Ûf.›šX½B>Îùü8ÈÃ* ‚ý<°¥¶j}˜ .x}á$ó«é¡1½ƒCÆkó„“Í•áÞ“—*Ÿtÿ‚£Žúø0ÌYQý#SÂcIY(_⮇Ÿ¤0„øÿÎÊþR : +‹Í‡'T}Î_ûOÐk: ðE*´S‹v¦Êˆ²²c /ïk€sÑ¢ëü¢)õþ`— ;¹‡*q¾?þ} õ§ÆÖS¡pbà©»AHeáÝþá,¤â}ƒè6ÿ4öcsR!^’ÁŽ…o‡Í¬9ü&÷(è1 c5œŒp‹Àž¿²Uø$‚Gn@X4wY­µk›P- 5¹¬Î³×°kE·Þ?FÌÝæéÇm]‹ïcpOÂÙAÊ蘭ìX¡ìØú¥á¸ç¿ôy¿áÝ`8°J1n{^ôW†{ƒ]ý¶ûe8Tå€íÈW†ãUÙo;ëkÃAÃ~ÛS>ÞµÖ3#Àë9P`yÀ7ÌÆ9Xý ³Áó*Ürö×,òPÊ›–á@¦°C_&•_Ù=áu¥‚¼ä7¨”wÕ/yq¹kΤ'Ûm}0½¯Â itñLQtQ©rËÞíñg%þfèœØ|Yu6Nþ›çŸ÷ÂÙü]Üû’ôÄæ2½Ã/F»‘é5fÝ$êÄÛ8ß(j*U‘©.Ô]¿Ë{KÒ)ù㊧ºÎ{/Qù%+çÑgYE”ß*ˆ!îIX<ÄW <_ñ.Ü}ÉK£ µO_5ÔRÛk³ÇaŒ0ØÞäôcê~—G´G15ê,‡¿vb¨l pP»Zº á‘ë~ÌÌëWÒåÜݼœPƒY^Ðç{$Aù›.>T0ŒiáD'MëÎÕ­õ¯€GI]‚6«ý5ß,l?kî8Lkgòø!¿.V s¹ÇùUYX_SÁÊwîÏŒ ©pÊ-{qyîB*Et´áú3þ„ÉùžIñ‰[⋳âùÃ"ÏØƒç{/i$³ùóôeù‹ö œó:õ[Ï?"H³ÍAÖ×LVÑÖ¡A+¶yDd½W4Ã…½¿;ÚÎ˽΂;)Hg0a cº®Ñüцš^?:ÛÀtMŠ=°NÝî}·‹äž«|ˆ× ²BÙ¸} äaRä«Ï ßø¿4èPÅ/Ù:Wó v#¢,þ¹²qntöý›w swJÜú&~yƨ®8süœ²Òz¯†yÍÛ Ã›ˆâ¬Ñ?Þè\ù¹|[̯Êü‹²Æåi-¹v»~R¹Ã£ö!£ÉcU0 ½·wAOEO{æ ·½h;‘¶»À“)eÒ Û|‹¡á9ÿ5CÁéÞ¾ÁPúét¶oÜËà×BÐm*ô¾¼RêQ¥²m ÍñSv¦§5Ð?»a’³ø©àùÁïiBzðÀÝÕŠ†Pà”Ù‘à€4) •ªÞ»qÔ¥Ÿ‹ CC½ª«±>cáFWñzâªaãŒÃð;‡ÍIæÿ¸ƒ©‚êr{¨‹ã†Ó÷Hâz2SöÍÝ}"{Œ¥å5']`˜æž“FÊ2Üœ‹\kÁO”˜>×eñ>¿(Ûn“Äöä-§[h&[¿žRË4Ì9rrNºkŸâøðoc,èAmTÚða&"ô†A¥Hn³‡W؈ãhÕ‹g·˜û¦„¼6ð¸zlŸiÙ2Ú;ÕtÚµûoŽî*ݬ–+m“ V$kзߵJ°´P˜/Z}uì4ñ²«™ @ÕŠ§ê7Êñ?oéÕ•^­k¶Û¦\KM-ž‡ûÐ’L ›v´¬Kàl(ŒÙüóÒã›Í­µ€™cô©äù9‘Ómæ/ZäæŒä²ÍôÛèü$•ájNé|yôw$ý¤Èö¹«ü÷[Çæ›ßùüëåç÷ú/¸w¶Ì´$x±IEND®B`‚zbar-0.23/examples/upcrpc.pl0000775000175000017500000000176713471225700013005 00000000000000#!/usr/bin/perl use warnings; use strict; use Frontier::Client; use Data::Dumper; my $s = Frontier::Client->new('url' => 'http://www.upcdatabase.com/rpc'); $| = 1; # autoflush foreach (@ARGV) { lookup($_); } if(!-t) { while(1) { my $decode = ; last unless(defined($decode)); chomp($decode); lookup($decode); } } sub lookup { my $decode = shift; if($decode =~ m[^(EAN-13:|UPC-A:)?(\d{11,13})$] && ($1 && $1 eq "UPC-A:") || ($2 && length($2) > 11)) { my $ean = $2; $ean = "0" . $ean if($1 && $1 eq "UPC-A:"); $ean = $s->call('calculateCheckDigit', $ean . "C") if(length($ean) == 12); print("[$decode] "); my $result = $s->call('lookupEAN', $s->string($ean)); if(ref($result)) { print((!$result->{found} || (ref($result->{found}) && !$result->{found}->value())) ? "not found\n" : "$result->{description}\n") } else { print("$result\n"); } } else { print("$decode\n"); } } zbar-0.23/examples/ean-8.png0000664000175000017500000000273713471225716012574 00000000000000‰PNG  IHDR¢d2€ôPLTE3f+f+™U™UÌ€™€Ì33€Ì3ª™3ªÌffUfªÿfÕÿ™+™U™Õÿ™ÿÿÌÙ̀3̪3Ìÿÿÿ€3ÿª3ÿªfÿÕfÿÕ™ÿÿ™ÿÿÌÿÿÿ2kߦIDAThÞí–»‘Û0†!E¾ˆL¬"X…³à]ŠØÅEj€Ñ)b ,‘YÉÄÀ. œ39ã9?fDBx,¾]ü P-IQŠ¡ž>×ï0*þ'6ÒV®û¹öx}? ˆ@"D ˆ@"D ˆ@"D ˆ@"D ˆ@"D ˆ@"D ~*â‘ò/æˆË2!ŸÇU}n$;èï£2µ:;_ó°Ó›ôö®ÛÕQ}7â|å%Z²îëS@¼ñj¦¼Œ™%†âÀÕŒ]?d'"[ÔÑsð(´Pkch#`Ûf–èCü\¼¨ASÔzN•mêó.~ˆ87¼‚V¥5ØÖéDPSZ?æyÂ’"¾ü°‘7ï@Çv;qfâ£b׿¦—;£„E¹—ú6…Ò”Q¾Fa%Rñâ.jÞ‹XÐ{jŒ™Geãw—`¹m6Í%)+›.ZÕ}èëN·xLü.ÁÅì.|Œ85§WžnÓ‚Wù˜iVVß›ÍtqÙÂ}V)³¢µö-Ú©©ú{ĸô$hÍgBšys'T,¯Çx~ɯڅ)E´è1Ù±üY¹Ý凯WÅwŠ…Fñ^ææeÜ4cúÜø.NñwU˜èñ¼GUBäеf Öc¤‘·,±JÞ•§çQöœÏRA?“×âå â": š)|6&Y K?!vçÛO•ÜH‹Ÿã\H™ûݶX-Í>Š—d_^·´$sÄ ñLÚÉHÿtÞîBüEúë]¶Ø0iµ:©Ýô$“bIûØiN#N±ß*½]Ž¥ ß«îb.£›e‰îî2›'ÜW'§u¸£ËÌ}(]Ä¿Þßü‹Ü5ás¦Ýž¿¾Pü‰Ùæ¾tŽ¥Ë§ ñ)~¯x 5ì]¡IEND®B`‚zbar-0.23/examples/qr-code-inverted.png0000664000175000017500000003374513471225716015037 00000000000000‰PNG  IHDRddU‰Êˆ60zTXtRaw profile type exifxÚ­½i–ܸ²¥û£¨!D?4äZ5ƒ7ü÷mÝÃC IçÜ[©ÌŒFît0Û¶­¥»þ¿ÿ{»ÿóþOµDS©¹å|ðOl±oê±ÿÙ_ýíÿöOŽÏßùï¿wï¿8ùUàkxÞp=¯ïü>}½¡<¯÷ãûï]™Ïuês!ÿ¾°ýôÉúþy]}.Îý{ÿüìÚó¾?nçùïœÏeŸ‹ÿús,lÆJ\/œî¼‚ÿ¯ú”À B =èûÎ÷•!ó}âk1äŸ÷ν¿ýeóÞßý²wG~¾o…;òó‚üË=¿÷é—߇÷ÇœßVä¿>ùÛ_\#Ìã󟽻ïUïûÚw×cf§²{nêu+ö/le°·eþþK|_ìOãOå''¶8ÍÁŸé|ó'»}ûè—ïþö—}~²Äx^gáëyÎ3Øïj(g;§JÔŸ…ãY.TÎgrj_ŸïµxûÜfŸ7}å“—ç•§çbžwüöÇýôËÿÉŸ÷…î[{ëýQß{źNÉ4ËÐÉéÿ¼Šñ÷³§Éö×þ¸¹9>6p‚ɶ¹rƒýû#ù/Ù vÎ×¥#ºc«†/ë¹[Äg'ã'pd’Ïþ(çY¼g+çÓYùâ98ŸÒ¹¼»9›2‡ƒ6ðÙ¼§x{í™Îýk …ƒH(JáhP +Æ„ü”X‘¡žBŠ.¥”SI5µÔsÈ1§œsɨ^B‰%•\J©¥•^C5Õ\K­µÕÞ΀°Ôr+®ÕÖZï|hçÒww^Ñû8Gq¤‘Gu´Ñ'â3ãL3Ï2ël³¯s……ú¯¼Š[uµÕ/!JW¼Ò•¯rÕ«]ýFÖîpÇ;Ýù.w½ÛÝß§öœê÷Só¿œÜßOÍ?§¦‹öºòujüº”×%¼à$éÌ8±3zN¼èèSgvTã©“Ó™íD)ÒÉ©ù¤ÃY^'Æ ÆËŸéöï³û:¹¿ž›Kñ¿:·óO'çttÿ/NÎéèž“ûýÜ~8µÕÍ¢; i¡öô7ÀÆ‹úYûÝf¸ÎVf:o߸~ W_=^lʼW»f>@ŸÉâ® š]k­ q%Ç…ÙÎÒBD8bY>ÝçQnðiݵ–ûšntýb€[†±‡ûò%#á¾»×«ÎØÝ²¿®\û(«ÜXðYA‹cŒrúFhôµ)ëë=ód×´Æí÷ÇÔŒÒò ‹\÷âˆXXº_˜¡&¯Ø ãb,Œ;¸‘ $%Ì”[Ì–¤‹›y­8‰+§xcJ(>cn‘§~Ü1‡»iýc²z¤=^e:o­âžþÜ7C÷üݘå¾Zd WåÕÑáÓã˜9qåå¯c˜ì•Ë5ï0×­¸†â¥ŸÃ§çÎxŸyÄϽÅÐú}«ìï²›|¶×}ìïñÞ὿{wµ‡¶»Ékµ»ÜÃÞZ6›ÍåÖ&'pi#±jµq?“¿Oöé!õn•#õ!EÛøA"ÓÐt޹B¸Öáø‹–Ö 4gl{r8)`)9ct±c¶4Ä~´VZÎAgãØŠó¨î‚1eÏ™\Ý (À}”~ñº£Ù^$'°ÀìÓ°ubˆù&î›nÔù–ŠÄ“Dɺý”6”rù|cž'Ëö×’¾-¬FF¤Ò9õˆç—žË}v—ë:úÌ1ž½³–†ýkG®Š}Ž+êlÆ^_áÖôÌ¡œ¥>Rî>Åü»”§Y®QúbƒQßÀ-n.z¨[eÎVòÙóŲœHæìÀ‚*ál’‡q ´ã>"P&²¼Æâ¿»KRºë~t–g,,®4ׯ¸®pÌ«äÎNÄ~ÛÐä\÷Á>&~fÐddqËšÜ}£I+×J:ûµDFÛåÛäüš©KàÌÙ†Ä}Ú7‡ìCòé²-ðÏakú€2qä`(øp'—PŽÔgã,"÷Ì’+ߌ†‚ÀåB²*„Ì„¿J·û vüÇ &Lsÿ/@ÍVô¨…j{]{b.P6fpþM§_ç}qT 6Ô²k ‡ ͈s?Øk©G|$òð!‡/)4<“ÂÁáb/ö;k§@Hôáæmá쬴çüù7·"AÝôÎaƒÉõQŠÇvb¼îuÛ!`˜»Ë¸S¿ìr\Fh‚ÄòY}ïM^ìsμSjŸl{—GÕcWÜö&ãÆQKÃã±m\xßÁ ŽjûKþ ÙE¸´¯œ{(êÇ瞦’ÜÁÞöé7˜²:–ÁË3™¥•YyÛó Sé‡m{Íi£º`$byÚÞ­¶/tŸÀzðjç9]ˆG…jÜ HºÊöö½Os>[|ñþ‘zÙžyi{gt\7§|çmCæ¨¸Ò 0° 0ŽéøÖu@ÏÁ=sbܦtB’í‡n·áŸq¸¬LqI]¸a,öéÑå‹p¢g·Uc/h9§£\Ž+l<ÙÆÂ{]ón5„:ñ—°°—–y¡Ü}ˆÔ™%;íú¸'+ÀØß˜£Yo\Œ3{U‡½&0‡ñGœë‰š‚X2 ‡ìÈËeã//À l˜Ÿ KëÏw]~Gôy‚üȘ$Lƒÿå¼ !,Á:QÄXB1l{¯þVOÈh!aÀìÆYñÛ÷9†l ÇQQ×€–NÀºr;Ù)๔<×––Œ“ÆN¸«@‚S÷1J¦&/|˜¾¦ •æÿŒUÚQÀƒ6SÀ.@‘]ä#»òuÔRQø'jP—N£©ƒæ¥š(õ}Âe·`²} â-Ìê,-Uë¼SÄ  ÀÝÍ錵®ŠG!˜®lf¸e¶Ð ¹ŠOv˜^Ï¡ŸP `Zb0‡Ÿ0Ë›Îd?B[ÂŒstѽ2 '_# ;Çn°ÐcV ø ÿÖ{Sæ"ØEdbŠ 'R—½/À#Ï6GÈ ¿J+<’/ÄH÷C7¯8öFƒp²Šyx -[x ø&WDÅÎó‘Qˆp{»áîX ŒZè^r¡ÊàÑØ0Ñî&ê†â<ÁS¡]}plrÇÇBhÝcA†ø¼`lM$ ÆLïaNYÞ@&~ׄcâ#à˜!‚Èp±Šº¹P&ú Áƒ*°ØLñÊyed™Ñ„Düóh(õq·¿ƒ‹}Þkãr·¹€,mlc“Є6Dk2šÌñhd×¶n×A1¨}Ø pûWrl&jò"îc}w|Ÿ$;lFýˆvì–¸å½M6Ø‚%•åBëeêxÙ'ÔÅÛѺÞöI—Â;c³>Lf_ÖÊ45„mM†ÙÁlöºÛ«œ…Øe¿ª/3pȘÍŸÿ#ô²Aåâø—hÂqÇm/~»Y?ø±~Ú±oæÏŒŸ¸Px;·¿Stoï†YžmwÌê(hÍãö¶‹ø£ýçš®?{÷8X×ÞöJ.VÑÞ&¡²²Ï¥7î¯á¼ß¹¡® ÊW901Õ5ï‡"F-ÁG\É_Úšeªî­êÇÖþ´ŽíAšìõ)¼½x\Q´Ë; ÅÀíç ø ŽE@Ò!V°Æ,™–Oï³rb<0M5%Î “maÅ× ¶ƒÃÎòµÒ…³ôuc;ò7¥ÇkÖÉû³a<|;}ÔïáfÈy =®Ñ%.Pý#]gNãy"%i`àäHˆR¼9àGá«!ÉØ¢;äÓ7ˆV5k„E¹.ÑÇ!úXuM6ªÊ àÏÜÌMMôœÉâÝ ìðXÑ]vÂs¼|ä§<ÙËvƒ&Gìog:Sc×p^t{bv8œœu›¹i"Œ˜&QU0å$û,Ú’ wàãÅzc-É}ÒÞZ lãÆÝÿ €£ƒ±\a+ ÿšŠ´GE¢†«ŠìÛØú ¬¦œîw\å½á,YÐÆÈÜÌD59% Ýþ]]bÆI´Ò„wt9òìnIJÏÅŽ&@œ{«´¼]/p”Kp¦—k7Ôè›|SpJ^Á7ßágv{–Z›ÜúÉGœ—C赎Ø@[òœ§ž†b9BÖò„”SR"¡½ŸÝ8m[Ú,dl°7ߢ‚• |Yª¹] Š»²˜J»FÃó\UæüÛ†n»c7’=ÒXú™ó»¶³×0±lÓxåÿHÛ¡` v ›¢(vãqü„kÀ¥]©C¥ub¼ü Û)ùa_Ëpÿ»u<Ë( $/•²ÈYœÐNô÷VH§ç,àÐü ¥9¥³cqÁ+?/HV‘s?¸î~öÿ`Ç@ZtôŠ _©W-%È{Ͻ•Ò9)ìhŽ ?Poáȧ RÍÇ Æ2wÝnþ¯16wl;¶)–ÙÈ·…¼”7Y_¢‡'Q8Åeôd‰æ¸¬H–y)9â +¹Ñ{ƒî!Üvµ½±‡ÍòE„$/€h@:r*ìS.®A7åR@:ðÁ[——U Bw¿n-ÉwޝX¸ùgÓ0Pl‰ÁnF ÆÅ ~®˜KhçÏÒO‰ñeÁèn‡ÏBõŽ~ {ÝÚOìGVxyÁWc+Ο°ð£ÇI>Ÿ˜Ò  —¶ßŒ•I‘Ù7¤:aR´O)Jå îR@.¢P 1p0ç ‡h²É·Ã÷P3>_j^Qp|n\ªè¥wîÌC& w=æ†Ä­ó:¸N>pŒdÒ–ß§TLX[Å:ã‚ÔåX ™ù4ÄÛQ) îØn #\È6‡Žï3ð'εÀމ«Ã.dÖ¬¶ã³âê‚xìFGPBÎ=*UcF}©DÊù@R·Jœœ¤?¶J ò®È·– /ðKq¢èX)ÚÀy¬‚T27SsÉÒ @ éœêýÏäÐý›¾Èa»¯#¯7¢³£J;–•ã¸Y’ ÜC$Rž|×èRÔe€é’$¿*¢†Í]Aíë'½ÔÆsÀžÇýœÐÉJIÐ…—‹ŸvðbnXÖ]×Ϙ·û)è=o£®’f]A.‚8°`óš¶e~sMÝ÷Øô?Syí#²¨9wš.[X–휒£ãÃ÷0ßmoæ÷³ûüÅNZ€aØÐÛÂVÒ¦†©ÚjÝ ïDØ÷<˜S"ŒSÜWÂR@!…‚ÒîqìØçœ#^Òë»GŒ»pê`”ÌĈ¢OMQçŒòÁHFY2= "uÅ‚pcnr÷$‚Û׺à'FÔãC(`A©¸Ÿ€2Šuq¹M †²d,,ZÁÕZ–R!W7ânïÍáï·ÅSlƪôWx’J¾¾ÌØ@°×…5D ýÚÀy±–!’°ÿ7ZûüJgTóíº^޾e¼÷ÉŒ§î~(`¾¯xËå½F¬ î±cäìXÊ%( ÍñµØZâ?œÈËô©¸4¬û{ ¶ñÁ]‡»Œ&úYï öVeî2ô_ùY@e”çäWhÚÎ^Xþg®<ú‹ãWvV§Sm7Ž'T˜R+r®)³¤dQÈudñµÕžH%÷’…¸Ûy®•û ÃÎëåb‚¯h &Ö .?B‘$DŠÇyI,DÃÚcdZªÊ|ÖÚeÉ1á/(è³#ä;ª´J}dÍÂÐÒuxÞY§ßÒQ"*¾Ÿµ±ÔÀ£Ü]px­ öQy1'/ÄGÀ¬øcWøíIùxA’¥|[s.™^_ч†áp‚N¢ y8åëˆÆáMO'éß‘q¹üsp~1ZB+.¾vžåç@žÞ*@¹|Tšpî2…m¿NÅŸåô÷èR-ä;Ãï9 äwM¤Ç;ø+Xn+[\ÏKËi®0OTá>ÁáŠÕ¦Ë‹ü’@vOù?O UÏÔßâ8î{ ÁÞJü¤/´õ%rJà @ìb,sFYÁâSÓágV(òª9xûŸŽpL8¥o»¼äK)C2‹ƒß/ͺ0Ùü—fa$ÁßæUH„=d‘~Ø 7˜˜Œ—¤^Õ.Ð6džU­J!&6 ¼Ðš”j¬b:‘Ãd[X#HÔ&äÏ3u?*ÛïqNWÏѪ$Ûü(_ù\ÚÌi­.©6÷Uúb"q)t¿ Ò,2Ÿ% 0t°^ãUxPQVˆO=œî´[ÚGê&²l.‚ŒV«¥PV]U¼Ù d˹+<–rp8–踒e§‹åÜEôï[ŽÊ”tƯ$•²èï$Õü5IåTúeíw¢ÕÊêU–ìRÚ¹7…»”D„Ds·˜Ø©;*ʾiçÝW¦õ¯ZeQÎѪO0q›4SFg¹.õ®šô?Š/®©Îdnœ¾-—8sB‡N4û¼>*/\±’eSÍ.¿\Ü¡tæ!‡‘Ÿ‘26íT¬Eµ'˜þ›=ã?"Æàüåz8UÅyþÑ´£…,ù:¢Ui E¾¿„® @Or[%}÷ËeùÉcQÍ¿OÛ#ö0¶y®>oEN<ÂŒ}÷býºzXx¯9Ë/:­Ví2‹2·ÿx æYj®ZÐWªú²oe}ìE9÷oþº[E¥ÎêCü5·YÜ— ;‘?Š×ãn¾[¦Pä%¿$ oWó]8äØ=bÀH žx‚lºÌ׫ÖäzÕúM<×.ÑÚb3àWãJNÀ}uóöU»ÄHoå“Ì?|eOKQ,K6àiù™êp¿æ:J{×Pú±Ká¾j(—/+\ïJS¶®ºA7NUÂfHƱ‹œþ0Øy—úkrܽ²ãfúwš3úäõª=Üu†OºÔ’¥»¢}¶7¤º]èxÞá©F9>˜Š•*­FN‹‘‘ò³º·U}U¢P¼tò£žm–§žM~@ ¢‚ÒW½§2¾È­.û¢ æÔ›S—¡ø5+ÞóP©„<¨?9Íî7¯Y§ùu”VŒ³DU@Ì3¿*÷1ŽòªhÄ9†—¾K[®^ÕÈéÚɧ/§:o{#§ºþ–Ïro+ZÖ‹ñ¿Êï¾8Ùœ_UR_¥W~gÀõp[nwàC‡l¡'ðQ-°Ô‹ùZW“H(¼ÃT†ôLþã|‘£x¨5Da~Lž\ãA~3væ%å§¢,}T”…ù n*`ân‹—(pSÅI ðTµ 8áQ„UÊœ£Ž·â1H|/Påpíl8ŒgT/wq¢ç+xÄð¢„H‡àTGvxhçG”bÑ-´-èu7ž[W1MI"ë85–mU0Q÷/¢¼«]ë®v•NU÷÷ªcÙ“¢ä±Á¼Áösm>msÍ õ¸KÔ•õããb„†˜èQ”‚ˆÙË£d"¾ ŒæË¥ßU£/—~3óéÿ^-"€WXGmjCÔA?@9¿ã&ªê³û€XÊä¬;Dxzu­ÚÄTÕ©¤z¨m4-R»ë©Ý]·æ_‰7Œ‹J—y| o††ÞùUÍ´ ºòL×Th“/WAQW‘óá"ñ¢­5¡ „r~WKx` ñ¬^”Y€µõˆ.CÏ!j8¹Sy@Stq$ÎÛ¤Ðz}«Çן„¬ìQ€CÎ^1’ðŸ#ªêáÆ¬r*àS>N˜âµ¸Ùqa?aYYô] Bµ²u)ŒpW¦“I¦"¼J¯²4ÔKáðËè}Ž¢zŸxwNbâÔsàql‡©j9ÎpÄ®®u¯À®§lu7vsˆƒºÍËRØè鋾™€ÐdU/Ù6Ö넸݆{}¬”Ùoô(¾±.x68˜á*¡æ€(¶”¼Ú–|ÚMêØcƒt´¯ð¾Ž}Ç÷YÓSò  ”HÁªçž'¬n¨ÎTµ[†õ9#Úf„HœÊÚZjÜRgN†2õœ®HœuÏËŠí€Y9E'V±âþž‘u¤ tR­l°±bgf¯õ:ÔŠs9ÕöÏÂÝcå.õ™Në:Òð£®ófdTÖHÀ È(# º’Ø‹öŸoÜ› ôêÂ)¿x¸iwízåï€ûœG/Oþ.•#ÀZ-Çí"ËÓeÞÚW(P•o‣vkY¶¦psüeæžØ,Èà‰,!S^kÕÿ§ ñ,®¼N³]¾Éë$rI…ié©”zçX-üüʲêèp4•¦rÿìÁëï¥{Ül›oö1©Öún0+vɶÿšVøºæaõ¯+,U¡ ùp˜*…ýʹô; ,§¶\Ap^¤ÀÇ©lÌP@³yÄ¢zç´³x*0ª•ýjp'ÍWµŽÉÁ9´Yik_£Âƒ9¦°K<#™’ îÞ¼ŠAU öÅÑëà=_Ⲃ8†: æñ×VF|Ͻ å Ëάœ$"-ˆ §‹~Áÿ"FK‰¥ô¹ÔÔA¥Ã™ë:ììQ(¯ì‘·ì‘¨àöªö…½\ƒ¯z-Ned£d_°úªtê ÏBòMW³),Kõ@`6Arõ©2Yk `Î-aûabh«žH¤|´wF´õâÝ"<Šs¿SûÊìg¬`‹˜šÑFûϲåÝžŠ ÀÌR¾ .šÕ+³OÁÅyÂŽú\ñÀp»âBþB T¼.Eúü¥ž5¼ú†ÑAÝ˵þpb»Z²’g+ÜÕôèÊ+?ÊJÌUýJrsî¯ôèiYÖú¤G?²¬ ÷ÙÛŒÀdv“€†Õ„b”>«Â¯³ª6X¯ Ò|«µK­^u|Î^|*øv)ŸÅù$Ùµ¬–Kžœ U³\ÚjªÓ«*];u@g÷ª\ƒœÄÿ.3û=1ëd3ýø3§e8ø*÷„ÈsHƒ¼c÷ËN) X•ÒWí*¹å;Hwý¼¿PK õŠ`¤KQ)<ÖÓ4Ÿö ³«AË:╉´Ðÿ0a¿N…ýÏ»$ä¥ÔÆNåÒo½s2¡E­ƒ–¤ßžÐÑÖ“‚f*Ía— £m‚AëÊ2«#2ûª^ˆÇ¼*¢Æ‡ÅWž? uç;þ•AP•ÊGi$´<"3X2Ñhµêß•©CyŠúÚ•Ÿº:«ý4olTÍ€|Á_ض{ò“/¶ýÊO¾»ÍÛ³ôäWrrú¦(PR¶C/ɾÊî!Åh6‰—Õ@•£­VF£.(s´ÿfýÝe‚tG?áüS‡xÏî¯le» Hð \Æ)ÖÏ}+‚ådÌeÁ?÷×’×tÿæ!»ÖÀýE%¤™lõfÜïöà1¬srzm\Ѹ–*~戽ªîDé§|ÅÜ ĨgŽªòªŠ©Þ²Bi¾æ$#¢@× ×" |›|d?£hèËyžÚ˜US“†(³µ¦ •À_ÎJ!biçilY-*œ¹äùg©}©ÇCP§dd·ŠH‘žÃW±†•j8!Š…˜­êÎX`_ÌO`\~xßf¡³füð!¾ž[ó‘ÍÙÌ“ZÅ|kzxo)oµÄÃ5­¬;µ!ÎR*Ûp)Æç—³ìéS5r†Í¼P% ÔŒ}Í '_¦B‘±²;Šý“W+ ׊»ß=¼ßÀôY‰… N½Õ¹È]üÐw«r(ˆiƸœb9ïn›…—Ý»Vx‘ðh¹[U­Ý¼©ßz<ާËõÁîÀÅýZÈ£ö„ñöbø@»¯Ÿ.è^W|œ ;NOtR€·Àãši³8…¶¤‹Å%¥ ,+‚Q{×ÑŽqâCzb¥¨µÇ EUù®l·-bX¢¥ · Bx‰/ƒ0'«²¯¡T„hYâ* õ¤J™œ%Öem=~°ù@†{9E# W.µR2ÊågœœœTj©ì•|5EÍ8Íë2’kF@Æ\DzÕ½Aè E$[ewB–UvCMP˜z¨ïH¶J‹aûd¶Já7¤'HPÝ›ºkRü¥È’›´È™Jãã­:K±ÔhmøÅÖcÍs4*v`ÜpŸÖ{¥:Ë¡˜³Ò{lŠêÌn+ž‰c¥¢%DÕúŒ@¦ÕZ<Õ‚61½³ªPå³Þªó[Á”jþŽ;5‹€*W¼L7 ›Œ¢©Ya ±À¿´ ªÄD+TyRq·àvuŠ@ ·óåZNéXn­’ÓÈÔv}·ì ¬µ•Í,áséj%¬þKÎf.ÜNÇú“0ö:2/ÅP]äüeêD‚{±Z§( ¢=U§åÖÉ»½ÏQ”3ŸnU¢wø#l$FZžÜÛ7¼r¿–8îñÏRêßÀÖÙz¿Àöz÷Ôý»cª_ÑšQJqªE.O7J³>8Ù65£ÈÖy EEìúˆ‘|—Y.EÙÁ‹$÷PéÎâ”ëTÉfRqC»`Ï%ïŠèlÙ3Õ¾´KAkY©l9). ÄÒpÁ"X•Ü£‰(*9Ą̀Nü‘='}u*µ…ßYÕ7EE5Õ8ÄžÅG0YMQ1‰+XñëÉX]K¡šÕN‘‘qk´Ä'“Ô°°Š<9µöï¶9M¨PL¸íˆÖR6V¹ pvÎå£)Éà½ù?Jª›úÿá<Ýû@ËÓÅ÷7"Úwûã'Xvßqù] òÍf}3YÊb5¹¬øÑ~ °óSÉLèJ}J ‡O-z¸iržöbppjøÑ#œ]Œ!#EPì¤Äá…ÈŠ+³hÀQþ)‚Šª£ú¼Ãz'àu;Î8¶HZÎKFÎ Ž¬94xã ;ŸEÍÓÍ÷G|'€±UÙŽÝ õ¯Vûm3fÜÿnÈÌ׌±Ú?õ9ÕWû‡%$«¢e;Ù®G;oq™ŽÄ§ŠÔì Zp/ª†ç¶rª¢_ÜRŠX6=¤cX5jc¨ ä\OÎIÑN5}²©Aƒy†”; ôc,KÚ•v»9®Åû-ìncŒ¶ožˆ†uè£#¹õÜ5%\êK½ßão5¶Ñ<ž¹>ASA„.ñ¶!Ý€Ñòö¾ø80!«(ä÷·ç ƒ;&ü°;]£ØØ‹Z°Üà߇`X_UÍ 0|ÍÃp?O¢Ù}±þÝÕðdL>ËcÃ,;Û¦^wÀÿå×Ý#NpTž¼îb“içu”9Gµ`yQ­ZÄ`wxWÁCt—¹„žÿ•ר¸©Ë§WGÂ…õP…áW+KuqËTºàóöò •Þu_ýÏ¿·y@5JIŒt†ÛÜ´x:üórXîjG·Oe#‹NïF[]ס»]ˆ®ºfÐÔêЕ81[vG¢cYJJÉÎmš]óQluMUú¾k­©æÂbzÙÿ‡ƒUž^Eð¨þ©­ýß]íF‹V`6’¢×Š9|Käš„þ”Ñ’õ¸4É&DéH4§“u ñ/9%QD¼²ºeàÓPìÕa609¹9èåÄUI%Ïž”b´éØW5WÖ®iÓ¼œÆ A+¸˜‚ªðža¡ý¹3½bΨ¸úéå8q¿ïŠjU‘Â[N1ÜÐíf„Ý= "ï5Bí£ÈäùVâ}aÿ?J¼SØÞ®]c è”4ÓIg„˜èdQç®xÍ»D~Ê]ó.qä‚U]cø´õ³ ê)ÁøšFóû0šWÙ¯™d÷-•\e–^•v.»Ü/ÃðŸå„Zp%â¯*tpϰ"H%Äó w*°Œ»Ö8*Í¬ÌøT‘C×ͪG¤‚r"êOD² :v­ŸrÀÝ ya4Ÿ%xTìN]‡X,\+Õ^Zœ6ã0².þ§Pü(œ§µË›$”¥òزÅo@!YËðH ÔŸôïÉ`‡TýCì‡;”åùKÉÛS}Îö x’UŸ³Oâ)P,UŸÛˆ™ß_TM`i½g‹ «xÉ_J—¾&“íbÅ)¨E•7OÕŒ$ø¥Ü¸çÁI1JÕ Z*À±ºMAaÏ¢1/¼ cÃíD>-œÝwy̪ÿ4Cæc™ßÌØ¥=+ý¶Î9VTiËœ›`ac¦ûg)×ûñëv¬C5£÷ý1cÏ_úˆñž¿4>ç/…ïã—Tùã>Kþ‹ÊŸ¹?ê¶¡1ø —UŒ+W†Žd‘cn]3ÄdÝ0Ó¨`ê *’ðùÝýsï‰4ïy4¶G#?;ñó´š~””5s³þ¸ÍfLº—^¨Ö Åf+]Ø4ɵª¡åª‹[K4ð]…ùU|.Âý¶ŠlC¨lv‹» Ï{•¯ê{}f#±'—Gíróf|R-ܲêžTR0x6ïñkl_°Þ=¶Ï¦ä͹§öÉz¦öíâž/Eq/]0E±ÁWùê=øBÝ5úö]a”ÿµ@ΟÍñ‡5Æu«T/Áa²êv5Oµ»þÔÐVÚ¶z*;Dw“µþÞÓàV-ŽP ù*\D9û½æhfÔIðßÒa5CIl#ÊË;Dv¨u¡Óª4Qó‚å·d“Ó¹k)SÜãF²¡‰{üe»Ê.Dóé)D;[WÉœuwŽûZî{«ÖïZWøÏ0Ýý ÔŸù—¦‚O>òè; ý^Ç3 Ì„Åõ© uT3…|êe“d˜š_6S…OhC­{+~.ê‰R¤bá-òÁh‰ËõÏÝj`{³·Ócoý »,|w2biw¿áóãó“uØî¦Çz&÷ŸUÿ9¸ðš-á¾—жÙ'>AÅ×0™_fÉXÅî{ÎèûPž#1\–YýÛ„¦ãø6£Éý2¤Iqhë~µÒ­ÝÿúÙýzÿò~ûø¶Ýu{¿Æ îbÅøŒâüÇü_‡S¹¯éT³ažmyφ©Ödk½™æÇl§§{Ö=Ÿº›gߟcÙñƒô¬0Ú`qSÊ Ù%ׯjÜ]³šë÷ôÿû'Óa{dFímÒ¶>uÓ§•¶Aí>VsAEŽþÑ_ î‚ûø¬Üþy3Ü{ÆUæ•ý±þô=DÕïþOþJEçøàrÜGØm^ºMZ¨ÍÏ+V•ßõ©Þ0›süÇ¡fšícÝÿ»8Éþ=¢ûk<÷/áܯ î çî!;,¸C÷¹×³ù­ì©c·ö¼ºÌN£¼Û£,¶ÈGY-Ù_&|N2ØËpÿ£u\—ågR媲ì8Ç8öçeŠ+XIÚ8˨p ÌÅÒ •²³ˆ— R±,¢Z æ®~Œ8ŒECVzrVþØ­+_¯òÇiSTÂ.´)*^åi]Ð4ÅLÓ¬ûkr–}£ÞÑ¡¨¹ÛªúØ—½ùÄ-š²/ê÷SžÈudgø!/W7Ê=®ÒÕœ˜g±F½®ºZ5 û©š)«CzU{Èûl #‡êعùm–$ï))~’z×?s¤^5Å{ŽÔ®)vj»«WkVȤâÞöYsRN~/o[z´ñm,5dîD¼FùpB‘œæuÄã™û I8å \üÉ´€«P7 ði Ø,ާæ'ÓrÖ³@KµhÀŽÕ“OÅvr©Ù rÙ¸wnéjªou¾rK±ªïT©çÐdp%^¹'u¹îš¹¿tHÍ›Jqßµ}ɵg°Ïo²´¶&Õi²O1'H=6öDSO¶4€©&ÿÂɇzsÙMtJÜQÚ½GvV Qx;fEÞN¥Ä…JK¿†C©Ò2r®ë= ‰£ÂÝr’Ã×8¤¢²üŒ¹§!é —2þš†TÍ?H{>Ó3‹æ=Ÿiin y hz†ÑìùL)Ú,kׄЧ¥Ë¿!LJ¯Ñ<îÉKÝñs4f…¿Fó¨¼ÿ5šgþ™Z8QZÙìy`R¿;ÄzõylDG'pÒÙ´.¢=Dqª¸lþ§%]N”»Ÿ2åßåÊ×)#¨Â¤]@÷…ù<8±¯×ÊêÉ\«%4Gs6\¡‰„b°Ýè_'U¾WéþÏ/EI™ f)iǰT\Д6Læ@D“¹YAB竎(^WLò×m…àªñú‡½·fBñ$3önxËÞoÞSHªeÜóœU·¿Ço™ÔÄÃ|kxˆœÜîx€wvdž)ù8?ü×ëiü‘\)Ò€ úê©€áÐÞÊ>Âòó ȪžŠÞ,„»žŠjš1†!&…³Ue±8E¹.,¬ÿªõÓ܆ êT= 1N÷Êù5|õÑ´êÆ›ì±E?ÏÕ ¶×Åéç:>Êý÷´óýfŸ~2zgcmöؼãÇ¡« o>þóàoqB÷·Küq¸Ìz÷8¾ ¹ÿ`ÂÐ.8|¦ÈfM‹P±ÆËŠJ³º‚ˆ˜Ú?—4¸WMÃÿª¤øÞ‘ˆÌ“¼ÄÜÓn³Sÿð8§`ÕøÃíØ´æ=VúŸy%÷·ÄÒ«´i˘°vøjX¹Û2ßþïþôŸ`ÿ’±ýMTÜwYy= áÇ'!Xx³ð›w“yo¹ÀüÑ“6bù¶ÍWgõÎ8þ…›îàTñÝ{L1+”°4%%=ŽÉÊÍ÷ˆâ¯6ø‘¥åƒµj©bí27…ÐQßdñŸ³„]ôsy+oSoT}A7ñλÜ$w¨ô7e#èsèOê@gk­ó­ÝŠ÷3ƒ~6xçœ{½ò3ðBgÞçë©’X%\^O}PÖÅÜO{äƒü Ò’Ì~]f¥8ÅÊ[ Ä3á‰i$Â3Á&¯©µVè“èEõY U¡ùG3À^,´šž'¡(²Rò`cuFM}ªªP5+^]lX‘‰é_CÙ„]s|M¥ÚصI O ¼„oã ^îç¡ú6S?OçU’YþÚz©'=3æÓ\QÉ}›Iމ¨÷ªÜô[xßM«g|ZVß«wtUóÒUµ64ãC½ k×Zîçv`êà¯*)×”¦JccÈyh ¦ø.4…¿:@7æÙcH„y—ªSbÔ ïÒè5®bD8¥±LšOfc™¬ÒíãBö¾ðu!{šIüºd]“”íBùbzOfú{—ÏW“ó»ë—,ù£ïx¶l«=$ù̈ÒóHlÒÑøÈ3Z‚%«è×Frýb¨Ü7K5ޝ%ü¡ÍZåk»+öT†¯Íºb]-Måý6J– vÎbÇú¢‚ã¨jšlC¢¾ž.s~¶{M|l7÷Ä«C´zMÚÏ©*f®”Û¾Ù㲿&Ïì¹3{ꌶºìiïïeý0&Ã}ÎÉ–=p{ÏYûz€Û3fm<p{Y{žßæ¾F›¼æÜ«òñ÷”ο2:î)¯0ùNÓïí—Îú/«q”(£§Z¡âz¸YÔ”È ì‰¤ºjvVe5-Ÿj*òš×§`´û:‚oƒœžÊHÂï)š„`ðF'AÓsÖrÙYÅêUy¬ôä„íŒU£6ÎÃÆÝHŸ4ëˆZ³£ç@s”_ÁlÜy8¬¥_}&TÖ¦RÃ[ªaOsœ] ±” QåD°žÅvàUÔ†_¦‰›è½ãr ”8ÉO5ÖCÔÀµ'VRÊëLц ¿+ÝJ¯ÿ¶¨É}T5ÝÏgn'°´í¦ü8ʶ(Íþóˆ÷¯2Ž_§/éÙUiwÌÝ!°‹’]{ZU¤·ÿbX¬QÃÏÞeÉf •¶¢ä{ mT˜ Ø%t“­ºÐžºW9¬ ™Q ݸU‹9@=—Ê´óΣY3_ÏørßòeA‘×#þˆ==‚ùªEpФã,C dôT+¶,'/d¿ðû}„1HQuœ¨ BêC„Oñ’w„Ãÿdnþ²ÅíøG0ævÛQåvÓ»jDíWfŸ cõ®ØTŽ‘j Ãb›èÔ.žµ`ép'›k-ñÚÄþ ßßvgÞ÷o·ç°Y,@ò¬îÒZMäûÁ’°Cci–Ô³h¹c+ky=XRUèõ~°¤,êϪŸý©rÍʯ§F‚çu?(¬, ÊN8¼‹ÚÞuûx§=sí ò¤ÍŠ,GudìÔñ¿ÆâÈF†þ„Œ@,P¡è pHYs.#.#x¥?vtIMEã 21o«`<HIDAThÞí™Û Ã@DµôÿÙ>‚8Þ’†Æ—°IH`£Ž«&8TDÌ­¿aÁÅKnˆçüäí÷Úï±÷lÐwÈdÎD=÷Ý‚{ˆÙñ;d²cÒ‰ˆ Òs×ï™ua€™\ËD›\"ídk2Ù1±†>¢«¯ñF\Úц‚úmM}‘ÉŒIT´`1áÃ^xÏ$ãb ‘LfõDuiÅûF¯12ÙÕø¨Žg>$ÓŽN&×ä.4?‰xi1‹!“=“l®’Õ +ø‘ɾÏê0B¾žLæõÕkzBuïúÞLæ:©ö<ãP=cî:× káã£>¬s¶E&3&Õ9c–ײsGú“óõD¡ _YScd2g"Ò?w¯Ø<{»þšsyäOtà+ÉdÇD‡Úȼ¦Ïmd2gÒñ%h®eÉL…¹kLyÛ÷’=jIEND®B`‚zbar-0.23/examples/sqcode1-scanned.png0000664000175000017500000122762313471225716014640 00000000000000‰PNG  IHDRª¬·À«sBITæ [™ pHYsÂÂnÐu>/8IDATÜáw nWU/~ǘs͵ÖSv;ûô’rBzH!B UPš *¨tQ"*½# ÒÁ Jé% $!½œ^v}Ú*³ŒñÛç$EîõÞ÷ÞÞχÿçTâ üÿ%ü/$ƒÿ—„ñ?§„ÿMJøß˜ðK JJøÂ8F u‰£„ñ_KÿASà…ñßçñŸ\à5øÿ•â¿ ø/E£ø¿„ð¿bð¿Öâ?Jøocü/þw~Jñs¬QüGÊ„_¤¸ ~ãv‚X €ÿ5ƒ5·ÓÂÿ5$øß!Œÿ%%üw(áÿ ?O ÿ ã(ÿaüI¡€p2Æ/P~%ü”ŽM?¥¤„_B Éà?PÂ1J@´ø„…qŒ¨Áÿ%üw c þ"üLÕÁÏÆ/#ŒŸ§„ŸÆO)ávJøe”ð‘ˆÅO(A ÿ”ð?çþaá—‰?•ˆÿ}ÉPޱø%„q”!”aÜAIIÔ࿦(áÿˆ~ ÆÍãEjðß£ŠŸboDTí(ip ãvŠ£wŒŸ§„£@Ë ?E€*Öî 8F#~‚ðS1á)~Ÿ’¤X#8Šâ' ñKHÄÏ#üÚâ?a’RÄO$Õà'G)Š5’¼Ä¨(€  ¾‰¤ ·¤” ©Q†„52HˆH8JT<î H 0H’Ðj(²ÿ@¸ÿ@" ø¥Gµ wPüãçùA%Ú¥Êâ£U5u•H5 *PRG¬G¬¡Jh ÅH‘Juí­q”Öø±ˆ“I¨=Žò¸a$‚‚’ nç•€8ŠT=ÀX“ZX¥@ŒXã¬18F}ÄQ¢X“€˜pŒHÄškÂÆ1G)~^¬Qü'l!ø¥4Çbej|‚x@Àá¨BqTQµ„£Ø X£LÊP@ÈÀ9 MŠ;À¨'Sh‚ (0mÔ¹Ä ¢*ex¬a5†F@ªR€Á.1)kG%iq”(ñŠ£gX“w` n—wH8Fq»œqÂOXJPšϽl ï~¿æcãû¿µ?|Ñ7ãóŸúµ«ý÷9~õ—ãÃ^4³üô«»¯¹g÷›o½nÝ{Î\|ÞÍ+¿ó¼òȳ÷ô^s¾½øõgþî¤ñ+¿¾úø?î~å•îugË%ïX˜ï ÍÛ>3ø½?â[ÿì–é7ßÅ}ú½G¶¿nK󺯷OýmsóßýhæM;éc\ðâ¹¥·\UÿÁ¯wô¦C›þz«{ß'ë ž¿þЇ¾ïŸô«ù¾vý_íÀÇ¿¼pþ³çWßþÃñ#ŸQyë‹??Ï}óÓ·nxé¶ÉÇ®Ø÷ §aõ—”O;Ç]ú©áÔó¶N>ÿõÁ=·7ùÔ ø­;áÆÏí+þà¤á%ß]9ï1ó£Ï]a~ýÎåÊW¾ÏÏ8­þ·Ë›;=vÚñ†ñCÏ.÷~aOç÷vøïþ`°óëëoÜîq6¾º[~R~à³GÖ=nž¿wµßyß|xÉ¡ö§çû¸0{Ñ:¾êòxÚ]óÉõ7Œï~Ryð; .šã=7¬LÝ»[ßpS{îÞ¶Ü\Ø×[¯]<á²¾zirêh~t¤wú:»çº¶faöºk¯¯‡wÚaoægMûC‹ƒÙ3œ¹íH»uk>¾uAï2ÝÖ7§ÙÓHö†-<8¼;;u6_Þ§7•ñ¶åvë‰-U“6†#‹¾·¥ÀêB3}<¡%Ù°ãCBÛʸ8¢bžíò¨žÛ æH•uún¼ynJ‡“ä6dõ¤ÒÙ>—=m²ÕP)n68äÃlטű®›j½4“Ëøw6 M&~ªg«ÉØÍæ¨ýÈ®W®*îgñp&§¬ 5¦”G©«.o4o ÛÔ´~6‡Tm‘[ãG¶t*­gWU¤>à½uŒŸ°wXYŽ)p}Ûjݰ„ý‡©®ü‘#LLZ^n–=†VÚň+/…(~q·Ôvaßms“¦¼ùƺiL¼u¯¯²¢ºzëvßX…¡,^²wr$ñòÞ#õJ“nºaU›òà÷„ƒ’_ÿÝëkq×\ú“™åÜÂG ·\º´}¸}òã«ê¬ÅÒnÔ{kÚó½½›V¶ñµ—4Î뾯ìJg5ÅM_»uªBûÃOOvLâðâïÔ[W¦÷þã5ů‹½ü“Õ¦'ÌO>÷õ¦7Éö½wWvþ–¹¾ÔÌÎöã߫ãäðû¯ÉÎ>G¿ñƃåoJøÌ×&yŒìç5¼ãÔìGï\.p|ûÑK&÷ˆ®¼ã2¼xgïÆ¿Ù/ÛN’/½}°ó~Sô‘«~å¼¹ß|[|ÉYtÉÛ–OþÕ}N-o{ÕžáßÉÝôW·ÍýÍ´ûÚ;ªÓßÔ_ø›ïž³³¼þúôÊÅ_}dþm§û÷|{åþ/š¼æé¥ëÍ÷_»LK}ÿçG÷ûó©ñû¾šýþoö~ü¶[Í+ï;þ§/ŒÎzY1~Ûwñ»Oëí}×í_oÔkßwäŒ?Ï̇¾äã 徿¿að´Ge{>tÃü_l¤o|qt—'Ï?ñ­ö^Ï,Ÿ¾lüä{å×riüÒSý׿{øŒ§—þË—šG^È?}]û¼“Ý•—¯nÿ½_úýz˜9ô™›&¿}o»ë’C—ÉeßX:íw;“o\ã/ºW~Oþûë««®9²éaë›n¬v^P,_¼j6®æ÷Ù¨»÷¦Ù³fýMês·ËÒµ{âC7êø–…âì>²ã,×^}HÎÞÆûWŠÓ§pà@ܾ%Ç,Ž!¬Ñ„:·ZO ©ï5cÉ ¦ íAB™ÊtŽg FÆ21e¢j·dïjâz4"VEÆKÝ®I‰Q– ÄQ–êf6R”QÚ(}k§" ¢v”bDNÁk¬ò–Æ1kslÛ‰ÀE{hàc„ ’:›g*‰Å7“$uíV ±FEM§ÛU'd&oVšèŠ,´µ6¹_ö>؈Ԫ%£“ £àV­²_­ƒd‡VêÜY»¯òElšªjŒñõ‚G,ÝáÕ 1O®›4l©^XI’t¼2Ö rde0hb¨ª,{o[@£Å¾•åÃ>š›ijdq×bh¸õ¦Ã$ܶÜiïž´¯6×ܺà+W_s(.˜ré‡ZoË»÷Ú…ˆ›w ëFV¯¿µ:$Åákv›ýMyÓUç Ž¯Üå—Á£Köl=Re×ÏÏy™üðÒÖLæhßþ¸/ú+¾04K’>ûïozõ7¯4W/o¹å³‹éHäo|bp\Má+_Šõãæw}øÖ87Ž »Ò]xa{ùG'ù˜ð•ÏTË¿å–ß}n:«¸ö½ ôð;ןÿÔäÞÌ÷-¡ûÌ^ùÆ9ãù79óáS£÷})n¿ÿñW=oQ‹»˜ÿ«aÿ3ùçÞë·Ü­·ï¯OO¸{uå+ܺ‡d_UÈ>vüò›.©ú7>¼àJzÉ3òK^8Ì·?8¼ñ}õΟ±ô§_‘‡¿3ûÑSš·ü}è-£³?\TÏùŽ<ðÝ9î`ñ3´aç ß;çMöŸXˆì„žP »uzkvëqãã;쎫:ë,Š}ÆIÍpG¦[ÎÒõ3L[ÏÚ=—1Öm ›M¬7UÝõTN²¸½/ió‘v.õÖl‹YvS[Ç'N¶Oª)—m>­Øº¡ÓίoO.+Ý8júñL˜žõóí¶"Çô8ÍXš›K›×±Ù4_mÈË~豘ÞÔúMuguÊú¶îr ,£Ûë§Bº±(m7p 47‰E༌]CÔ/j“¥6ϳ¨-\w.Uš 2šêûÖšÌYÛ&GÒVÖš².:ý!u[S­u2ÐŒ7‘ Ë’QŸŒíMå±ëBH5™Lû½t8:Ëê­I™‹mää¼yÑ)ÛäØt2PáÒl¦A­M!$«+2&Â’p©œˆ)Hn@¥M-A%V&âf¡šL×N,%Äå,‘%ˆ¥"°k`(Éh£7œ†NU„D'»…di+A‘L,,³C>ž—±kÜÔmYS%x›³ ^•]#غB\Ÿ@Hp=Ð,“8C*¢>RLÂc‚¢u” EŸ‚|¡J@¬*ÁŠi2C„šj\=V )¤LÁOàç´Ð@lM+Úg4´ÎµZø .cÏ9€¤¾£m]TðeÆIVÀ»Øv±¦ÊgÔDôià,jÉs¨ ¤j;¥ b) 0BVI®$´Ád6Ѫf ?¶y½/ºjÇmê妩Î3ªî˜*Ô~ÎeM•¸cÒHÒt:ªí: .¤´Ùʰ yÁ¨2sF½?Ü[oeeäûë²°Ú™¾k5v‹É–‡ÕÌfNG¿~†ý Š[œ š©éË«asOýBÝ?&»Â¦mhVuãzš„Ó§±¼7g@––†õÜ>?+íâ ØQèž%ÂFÄÅ#´qF×Ýfò}»‡³ç¹å[ê9;o[ÁÎ)ZÙ½4uNÑܸ¸xê©ÙÊõ‡ëlÄÙçâNî|’÷pïü-|èº#|¯MÍîkVN<¯¿¹€»ìÄÞË'öÁs¸òê¥÷ÏÛoî gŸ[.}kwõÛíÍß^ØöhÒo^·|ûåK_;´p¯ »ƒ/ÝÔ<æsý7˜§lÔO]Ig?,¯¿¼{ñwO×ãÈè¹[ÌUߨuêoò«ÇOºËÔ­Ÿ¹nð‚»¤+þùÀéϘÂ'¾wð>OÉn{ÓÞð'÷6Wüíþ^5ç?õ¯Kç>?_üû›÷Û¼ïí·ô_rrþµ–¯Ú?rÉÁ‡>Û-¾é[òÂeßyÏ>}ËYÕ{¾²pæßÌ®þÙåú„g›¯¿fäßð|àóßÔ où—ê5 üŒRdÆOµ9ÖJˆ Æ/‘`(Pïk„±&‘¥¨Pe¬i­Rb«b ©pëk¢8Æ£„È25>£(Æ‘59$O”ˆ¢™ÀB¢ÃšhlsÆšhhÐh2¨$6„55çJ`’×TX © @}[8&Z8¨‚õ”¤ HK±Ã>jA Œ3GJ^(¤2àhRa€ŒÐ Œ1H•±Z[‡È!™ØEjˆ•ack;HdÖ(5ê63…Rl‡ë-¤©K›‘ÄaÞ‡?2›ùP%íñš@Ži¢±(Ðj°9hÙØtL».Ú&¨- c¯³,íJGºnêõL~¨aÊä~œš™.µ¾á~F‹E/ê÷ùŶÁ¬µÍÄçSbã¹â ®7÷IŽ„¢ÛÅê3S´<®Òúyìi×oC¯r§S„MØ4Ez¤Òãs7<¨n«£#ƒ…-Û(ì](NîðâáŸYê­õÞùÓŒÜz›;m-Ý2‰goÀÒþaÿTâ[÷¯úÞðÄ7lÂQ$ø™jKÛ§ð3€0þ(?¥„_¤„Û%ƒcD0þ§” Þ)aÖ$Rƒ5 1ø%JøaÜN ÿŸ”pL2X“ˆñ3Þá ã(M¢É2þ%¥”˜€DŒ£’QÂaü”ÄŒ°ÆKÿLX ?!Œ5SÉHÌÇ(AÄ&ƒÄ„ŸÒ©X># ©ÅQ¢k’27n§b@B®)i£"¬†6w€6ÒÅQJX“H‰‘’óšû,ÂQš˜Ñ`ˆ­‘R©u (¥¶Ó‰ PU7y`;Û09ï  ” !SÓfˆÌ ¥ñ ÿ©¹û'æ’`qL2Xóé÷gß=…;$ÀøŸQÂ/ág’Å/PRÂQbpág”ðŸ©0)ðá(a` P‚0 ŽF3a AA8J…9C”p%€p;ƒ£ ~žÃÏD‹Û1Ž! °2ÆQJÇ iº€`@8Šq; Î(Z(YöǨ2nÇ8JÀ¢í £Ì@8R0ÃDkp”ÂäRrÄR‚QP—ˆ€QB()B`%%[2cDËplP xC BÒäŒ$׆`’:µ¸QÈ‘  (A‰ .‰š,Ä'éË:tABÉJ𠨲ªú,” $«5ØG¬!ÁOÉ[ß¾R~ü"ü¢hdp;aü2Ñ*aR2J¸ î „c¢M ?#Œÿ  Ç@4Ñ(ã§’Ád–?¡@S¶9~Ž dŒÛ Â8J ÞE#Fÿ‘þ3%ÜA Æ1R Q@IPeŒ „ÿ>‘œfÄ8J "dšU©¬ D‹ŸQPƒ#V¯ìb̸ RÁš1fF ˆd€&K–!D©ɭ0ކ0T£p*F kjÓZ͉¬QR1X#ì­0 „h‚à]2ø¯$ƒŸÆí’ÁíŒ5ÑB €øÿ‰´7݆­w ‹Ÿá)˜¼‹ÛMÚ²yËXcÜA¡„;( ãg¬Ž"aáIæn§ €‡š˜L, ~·Ž¼ÃO@RN¬`+ë JB(ÁਠQœ0ŽQ¢6Ö³UB2@ëši2ÂXÃÇà@ „±F €&«U MÂa%¬IFAðÎ&CŒ5¤Œ5Ö(AX•ñ T  „ŸÃÌdñÖ 5%%&0CÂÛ …UÂí„AÒ¢Pk„@¹X"*k ÖDcŒ&kÔÐLÞ GÉk`@Ù‰(©MÄÐ"õ½&f¨w„£D”'â@ ' dJX“ŒÖã* Q£ äÐ*sÆšd†‚ PÀ „c”p—§žM´$ø)¹îªe~Ô¼ô[Ÿ8°Úu'£ÇýnÛ}ñËGNyæ†Õ÷ß¶ôè‡eŒ£šï|ñày›/°Fê[>º<ûÔ- {ßs¤DÒÇ^˜ïýÔ¾î37ã¨Û>±gðØ‹²Û>3·YAm¼×E[G¥]Ÿ8’å£ò·îÌø‰ô+|ïás@•!Œ5ímßÛ¿óþ½wPÃ凷?pcJ8ôÍ¥~=å5uAt÷ÍùM×O¤môfÇ»¸ƒ’wJv_5dvþ¼?‘°zËsê†%j®[ÂÝfUÚUm?ÑÕ7/¥S·ÊxaÉlèàÒdëæRÄŽi G]vÌqJˆãë‹m3%XZIv»Ã1º°ÜvÖOPDV‰<ÜæŽ9< VÄ$6—ç&[mÕÉ"³]Ž5 RÁhµMíË^‹I‡€J.š0VÓq€0$˜ˆ€¯Ú²c±F @¢v!ïs´ŽQÇn0¦Ššl›§›ÔÄÈF ”“ñeu˜ À$ˆvŒ*ã%ÜnhbF9cÅ1Jø”í̈D7~qÕ“€•OzLcÒåÿ<¹ùIXýÜuñ´ç8J囟ˆKÞ†5)å£Ý¿á!Û- G¾º+BÍÎóùÚîÝüèuǬ|bO:õÙþÞã! ⥻n÷Õ­hcó“Oêá'&×¾gá´{m…„A8Š>÷ÞÕ3O=wHj>ñÑê¬ æÁšêÊ×ò0BP±ºå꯾k50©F<óä,#Cª @«/¿uQlš}ûvÆ1ÑBT±ûÅ»ò×< Y“n|ÉÍîí÷v ¼éß—Ÿñ”¹Ë^}‹yó½øvý›Fïù·ñ“ŸT2ãW¼ïêFAø¸®Uc>ø¡ö‰O'@õC_?òØ';%¬IŸÿtuÂËòœtü÷—ŠãäçßüË¿6,™ó®'Þþ‚­Ë¹lØos•<{ÖÉ9Ö@F¾ÿ©I¬†[ÿà\Ón3Ï>3äÞ¨…œ0L¸âk‹wz’3”Cƒ%êUß\¶1ú‘œAah[¢ë±†Fßü>~s§=xÉ‚>q}{õ•ã“É](ÁBDQß|ÃêìƒÀJ”W¹ »®[Úxn€°†äÆšãÏíJ@4bCE­'ÏŒÏ kjcÈ“4åΉ‚ñ`ŠØ™ïÆíÉà˜ÕѺõP`q °]5„5“•I-HU‹ Ǩ¶1kÀÒÐÃ1­.µ y(ê#AÀs¤*x¯05œ“R-á@ £i8ŠI•$e(’ÁQí¡ªMœupL„Õ¸gù Žò“6TR÷q‡4lª:5‰ë’Ê>"V Üªç0XIsj:î ’” °4ªib"”,@šhéàB¹¸bªN\Y<Ò]­-ƒ—~x+V´Þs˲YM¾÷ÝÕ¹`qÛ®´bq áð×QìÈxB®ÐåËnJûÌ9/}ã;ñªác ®»t¸<™-q;#ñÇ—´*¼÷·6û~¼äI„™5•[Ÿ`‡_¾²I€¦ý´(aM2ò£ QÝm÷9³óƒw»OÔk¢H> –ÿÝÅáž¿UQ‡E$sB‚füáOM4)Ãéoœ5e½µÔÀA£:®{Å-î´é3¯¯g¼~õ/®ð»ËÈQ´m* ˜ñ+¾Ñž™Œ£¶ƒ5íê+¿TõáN$£ÊHQFþ-9ûc}KPIú?Þ Ðì¿Î6üý6A`“pþ±XýÔó&B(^öJD, ¥Ñ“þ]Îüè ã(aÔûƽ-]™*8ÏY…§2£¬PE*·XíGCKíhÊÏ”`RµzȧFÕtWÇ•$Àå\'¢´0Ãsý˜3lé0åmÞ¯j0Ú¨Y48†³Nj²¯8¦mµ];g‚ú ÂX£ •˳ÉÒ°—çHM’¬—‚òM#Jš%“¬‰Ç IA¤Ò®æU/‡’†1KË~ÕRÁ¢€°Æ[76VRÖ6¹&MMÝ …QõE­0ŨÙï5ðÄ&K1á(%„Jž#µ¶V¶¨³HÂQØSŠ äŒ52Á(HÚA1);Ô4¡D ¡´kDC P`J¬!a 2Ñx¢m[r1–ß­9!Z±!Sƒ¤ õ…Ï-bJ’yS2k›i¦™F h‹,Äh3ªàK¢ÆjMV!0#r‰©Cˆµš€Xa!xÍ}Œe*ê>0ªÚ±e"ŒS%gÉzfMV±F %’´Üt†‚‰Pšš-Ž"$ÑÇX€qŒïxÇxî“gˆ]×lx÷Éݨv*”8Ÿ5kfßÝc±æÆß»->ë];];ùÀ›WC”}7Ù žëf§øfjª#{~Óf/|^àôÏV¦ïܯݻ‰“·~ªU…‚¸ç>5†h²uÇtËçÿKó°šînbŒ£ÈB»¯xÎÊå°„?ùÝé\ù¦çÜ€A£…³›ëóÜKNï»è²*ÃF’ÍPëúÞ”sÞ¶=§>ð!?V̽ñ\÷ÔG¬ªbzGqL2È‘z3ÕŸ•ö‰Ï‡M’¬S@¶¼êfÁz÷+§ Ó×ÿqùºQä:‹y :}aé=ûþ ¦&YÁ^0:ãyÓUž‡Ï_†3_>]þɾêîóX“LMè“YÞÅ¢@j"?pëêêGW:>n.„lî+Ÿ˜\øˆÕI,ÛdæÎu¥`o¨ƒ‹ª%²yï~ëBá&Ìÿ(jÓL?鸖_ú•#Ù“O)Ôr˜bd¤b­6˜®î=ŒK߬’"¬©@4‡ÞxÙpÿ™§¤“RØvß•Û:së¬Þ}º„ !KKW®æwÞ<ýàÉÊYëJ+Ñyyëâüµ»Óy›%÷PëãŽãÂy3:Ú·Š ›ÔÙDÓý¢ Å\IÓ§ [U"µ)™ã{QdXVa´-4°íâQ“Ÿpí [⋟0€—Ô £:*ºs%(à³ÀVCF˜óŽ3Á•=ÒÌ@d$T uÕrY$ÀjŠ‘Mm}f€‚lFV97BgÊXšås[îu¸ê@q”D6ÃåqìlîwÕgÔ«T‡>%%3=}}ltµÔDíp¹ª"¸¥dÂ5ÊmÇg6G˜ËDÆ«Dˆ$ÄUÍû'ÊXØ7¥¶ YoZ[c‘³ˆ Ö˜ª $£a¶µ_¨æ¥(ÀÙ¶¸éXoÙ6Zy×÷|.sênÝ‘ G.¿vrÎÙw²†Æoùöª¯ò` »wS:4ï.8_z$`1@rFlW5Y•%ëŒB‰­ëœyZsÕgW¦~ýÜiNiÏÇÜÍ]³ 1°+MrÀùʹ3¶!ÎvÄdD¨²á¿|i¢¢S÷]B{éû&ÝÇ¢ ÁgLÉhpŒ‹ö~çø^Y++§6jÁ€¨A2æŸß5Yÿ†³´Ïæîg¦r}´ýÕ`»Â€G°—¾äHç½³öA¶Ù\ …MY›œ /O|Èákþ|˜¿ã¡ÑdÂÈ×=óÞãû´ïE7¶Ïúý¬N˜{É©SU[šÍ>{îÂ8B­ÂPKAÚòìdÅÌuòDÔÏZqä€VJÅÈŸtÚêq³ªD€ÅO`Ã:“Ï2€Ê®ãÎtŸ€•Ýn,%ѽö8‹ÛuÝ|è…±4¤40yfTmâ™)ƒrº¨k¡`û¾ö­ÐøåÔŸ'ñ^—YØÄ^¬( âÀè%,kllmœÂLµnÐLõ°¦0‹¦ãÈ8Ý1?H½å¢,¬ÍMn˜¬@È·+2ÙÖ"Žm6dZÃI•D uf![Ê ¤:±gäÔ•J­ZÆ!B2É9(3úS,È<`¸× å(w^ÄAÇ–€`Xt6Û­³N5;±»¬“ž›x2 ©Û!% EOX-ˆ! €AƒhÀÌÔÉÒö’ynS'…D“Ö¡3-QºÞ4O\‰(©P* “%Óp±*pe54>²Öcá:oÔOØ2“u¶¡R“ƒDis·µžË³VÙ²u€0T£b(‰Ÿ¬›I–”§2\f€’ბ´y==‰Ç” -¢Ø¦p0Ó[«Ô´‡GS `¶o¶„ªºå€v~œˆN»k&Éj!¼m›@„kóÔvë½MÁÆÀ £Xõ5Á9bÁŸ¶S ‹ŸRº—=¬ë@ç"ìŸß@ /¿û¶ÏÜšÓÁwlëÿþ Çl~Âù}rÜü¥ý6F¦'×½ªHÔ„»YúýÛV¾¶+fYvüö¿t@tÀä3·Ž~íqñ×oxàq}G2¦lå_=ΪD ·üh°BTñ…£3»­¿ö†Õ‹N+ßÛG O3çõëÍŽ ŠéûÌ.¸,ž¿Nê] 2©â6ïÄò$Sv…¼•å“hiw%¨Í—óæ~Cavw fOvX^©7m#Óqˆ‚™ „ÍJ!IJÊ>'Ž‘gê›f{Û)3„Û¹­³n.Gd`÷JjÖÁnœŒë„ÈŽÚpFlƒ€À8JÑ-­L„SHF¤*§§úŽ!¦H"“…ÚYႃÖe(t\+› ‘¸–‚bwª-§óÒ¸dS†‡KrYæ,™n‡3¤,L2dY¹]—1Ø» t•ê0È4Iɤè$˜¶#]ª3 ɧª®Eš#ÅLˆhË66âEBA¤Be§dnÛå¹qi*CJªm$hã‡ÌÖ‰ ™wD p‚°i£‘l¬¥WøÆNؤ¡šÌt"- RrvâÑÅ1?E8íTÁQ'ïDÛÁ1&ýø\÷¨Æ²¾„-ÛaqÌÔS  ã»?ûiÔe@;ßî¿a¿fÇÓê}Ëÿ>Ì\¥Þy›žpAºä¥ËÇŸßÍ•)KýõÙv" Æšêý$°yÝã:Žñç·˜¸ñå»â7ô™qòëRõú¿©Oyÿ©Çý¹·ÁæNùÆg_ÛD¢ó^wÜÁ×}w 0PyÖ{í uETUSV¢cùíß3xÃ’Òiï=cïó¿ßþ΋6«±µ@q·ÏDÓ6ݼ¨‚:Œƒ+XXDk|~Ü·" ßù>uþî× Xñôì'Á­KQ\5f\úhí¼ã/õcïÝ×5MDZXS i§6SÆQÔ{ߦþõnÃ蟟ûÏu§ç˜©98ÆÊs؉E²xÆ '·þéÕ^#[ÿáLCʸ(ë\û–qüô›bó SþÅo–½G Í2õÚ±þÛ¯;﹇Éá$qI)¤äþäáÝy*`ºH>¥Hºø„~L%%O¤úÛVæ)êÛ¿²:Êè™yþЇN~õ?låÞoìfÉ"Q~ÆGŽÿù½þѲ®×šÖhÿäw6‹—þÎè„Wuó³;†L ÀhÜóò}ö¥çñ7ßröfbÚó_§vLžß0v¹PÊ:v‰îñDÀ˜ñ'¾SõÓk,~NÓØG¥-’A2€!«bd#1÷(JJ @#™PÛqš %„®$ËŠ¥¾É[ ™!”Äš• s®òÉôK&Õ$Êø "c4À¨UfQSà¨Ô¸Ì »Íp˜0•™€N!m B ´;uäp‚а¨Ì´œf›„T¨‰yfR'ÈLÏ$Aò)ÙF¬*¬ËfZçQ'¢YÃÆ+\kI*J) @œ &a qhs±™IÆÈDêEŠq¦M1S@Xƒ³Ji&`ãlî  ØMÁŠ2J#N êRm\ײDT¡àdÛPtý8dF“D®2EBCtâ|¯’¤¾Í:–M0LSSØÚYšDu‘Œ7ªj¼Ë ÂÜÆ~‡"kPøŒ´º”d0JpBªB`hŠDT/í]´LÙªª²Ô{öyÀ,ø%øœërë–Ég„[È•”$›½{5ºì²4þ:ÉàÎ;… fƒË÷wFœ .x„yÝSÊœ³Ñ{þuјDCbø±‹Åw¾P/ýþ޲¢Åí®ýðÞMÏ=_uñ럴­ýÎË÷¾_ïŒß¿mn»ÒÝuiªJs[œâÂQtþ³ö ÿu9|·êœô3Éà¨DžpÆð<÷|mytÞÉö¼)¥dÖ?lO8:ÿ€ÕS7ÎÕg>¶^÷íò…“xz·Kźxèê¹fš0õàÃiKc `O[ŸÝIƇ/]Üx¯ÞÌÃã½çüÞzÓGPk³ëÞµÚÒ¨øÝGY6¤|̹é ÊuËð¼MV¾ðm[Öæ„ßÜ¿ö­áæ_¯·Ï[ÆüWÈW.+ZòN €¢|T!;÷Ä) nák+Ù…ÛÓÝ kDèÔãÜîû÷Þ°zÒ™ÿÆ{8!nyࢂøtKão,Wâp¯S²ãýãf÷uö>gD W9xÎ9¶{×~»ª¿òˆù•™d]´êIT2"ò¦ã‹»‘Œo”©ÓóC…P‰Ä­Aoc›b+ýFaÚÍ›m:Ø,-Mó¶¼–ºhs€¦Ö…Ξq~Â<” :F65Ï›MuH§rU1S&Ë´Ï,¢ë‘‘-rBÛ-ÊÐñÂJ€%“EâØ;F£×•Ú·f77 îõ „ÿ€‹M+;‰:Xšîc$Xä õf™iÝŒ:Ûr€c²­©ê¢îÍŒ9Ft6¶[³ä§wt¬0”TÈ3\×L/n¨1¬1æÙ µÌ Tœ.Ò¡ÚFUv a™«™È–®U^wÂŒ+Ú|º‘Óÿ­ížyüÔ¶Q'TlòºÞ('ÔûŒ@Íþqyäºkb0V"D¤<¶=ôÝ)¨´8ؤ°ïÛ+'qÒÒ׿7$lœº­(%µ§ß·¼ô«Cpè#O+ß^‰*î!’Qôlc÷¢ •SÈóÖ]t7iV¾|Iç>¼]üÔ7âƒ^³)gTÔ|î≂£\ŒÀFJÜFgÌôÝÛ•ý/ë<ë>ÆvBr®÷G,>þª,×ïøWÿ˜›ßwY¾yýôùçX bÊÿr5‰æ/Ý:}òñíèå_q‡æ7ˆ­Þö-ù½“6ÞõÜhL¹ô‘wO¹ Ã!°ÉL*Wt+!̾þüüë¯ÚWC5÷øâ—iæï’ÚšXˆ äM4Ýø‘š\ðßÊAðoýÅÜžyˆ^ñþ²Ku'XjÛŒS“±èóþ¸½ø–vüc‘9Š †0´×œúyBGÓpŒþÇÏ‘X½œÔ”a}ö²rðÊoŽÔ ¦Xóüm•f})‰1’;—»Ž@E'yèO—¶.r äá#ûÔ!1ÁÀdÁdQÈP›Ç¨Lu£)LÆQ2"¤À¶, Ab£Úƒ&mâ–µJ@ˆylLcIBÛ•!FÄÈR«UCõD$¤ZSÒHD6¥@ÖrT@Z‰šéRÓÄTg)MÔAŠ"B’´u'Eë²:•ëԈʎébD)*i¢¬ôí2 P6&J1äR"²F&e/uKÛ%-`.GRrºÈf¼U” ˜3£cj‡•Ptšç H FI£šž%%Óµ$ë0;(Ø€Á÷‚g1k°æ#3>ؤN‡æÖ§_GÏùýéË^²gÓ{Ïa€q‡ŒòôO¤:£ÔÙH"\¿áŸÆAé„wÔìÃïyºË™6Ÿ|íò–÷ž–ýõg¼'eíë›îýɦܤiÿö£UÕ’{Ëô=㟪շ¾:>éʈ6ZR|÷¥‡ü_=ÒTŠËió?{¼S¤½u}…öÂ×o9ñï'“;õ-ê\û¤»¯ž|\ÇýIã>÷øÑ]^9¿ãåÃæŸ>1ÞøgÇy£õÉùôɯ]¨4•×½óȾ§¯ßú“{jqÊ›–ë‹&oÞQ¨™Ÿ^ÝûìîÌß4úö?Mð{ç˜_Ùžö[sÕûo$êô¸V-óŒµ{þëUM•=x޽ïºüù§fL-œ «¬fž~­~ïß'·¾r½;ãœö¾ST†Z²—~ùàIÛRüêÉÕÍVÞÕçߺkÉ ¥H©{êïèœÙ×CßÞÏ9¾sÞ,nùÖ.sÚº¹{tÜyO:`¾ÿÙnÿá“ã¿U NÛˆü ‡Î¹nøžžFçÔÇ,î¿j%þPú›PÌ]Ô ¿^³]U{7¹Ëtm7í¹n4¸óxk§§ûnÚ ×MöÞÖ\»“#ÓÌ–Y5'ͤ›v-y¨NVíìÉgŒJ[50|Šz—EÚ½T´ev˽ppÀK?îï:nªYßO†I @ÚëëÐvuç6;ÎÛœ5kÙA(Q¿ŽÚ±GR£+ídj®›-, Žt¸cc?ç«ZF“:³Ð*²äLXc¡@ kL§s•¯[}rȆP‹/ÄO&Šÿ¤Íz©×¯Õ`aÛÕãe[õ«dç   šÔMj™'£NLùjíÊ.ކ|ˆKè'BÝv³îÔí¡G©¢ñ£BFÛ,Âò/¯Üº¯bÕ£I¶ÝçR`›,òù»Õ,ÑÜÉ„l_»»bÝ:gNr4súI`&íè\~Ê(÷£k·»ïۿð…;’E`“²!’NêÔ^m§F>üBëî^sÅ-q˯ÎN¾|›¦º£&ÑIKŠUYt,núâ.÷›'DCƒh!(_x×Áò·yðeW¼ùÞ~®H¥°XZ¹ä#£š¶÷¿Oóíﯮ|–í©çQsyð[ž¶ìÖ.~×ÒY±MÖ#^úÆÑìkvv78sÆqõ«Øù³ é«o[šùë;MÞ÷íÕGÝõoûŽþñ©ñ„§výõ(~éëéwMÅã<þ§÷§ìgö¶”å¸yÛWê>¿c×ùìâ¿n8­³üŽo7þ+s˜ã¢9oÓdl4ýí·<@”5xعd´¹,žNÚ’Yy÷壧þ®9ñOšÅ·ýØç¦ìÔ—W+wU ¥ñ™QP´{_;Põºýw³uVÈ›©0ÄÔVÆŸ¹Æ_3Q†Æ=_¼ñ~¿žM>zu:þ [\²»9÷>íW¯ªË2³®¼træýæq”ÆQi íºkØá¨>Ö$ƒ¦] ).ÝN_$ƒcª…޴͡˥é 'CdHMV ºÃªô3JXá3›§¬&Dyp°ç”QzjSÕ€ò ¬Â:±5Ѓ¦@+Ü%8ŸûHM°«&£(\MMÚHÕdÄ”4탅’õœ¹T:Ô‰Ô…èÌì d&õ§Ù‡œsesÝÌhjRÒ"fʸ£”2Š`ª+e .Ëro6œÜ™¬w,–,ç’ŒŠã–9¤^œÚØphR¼øÖ¦VÉ2jn 0@9"oÊUbH˜¶9<¤hÔWmÉλ<Ï"$!D“ÚN­˜nIÍÞ#í¤ã,À‹“Êm;¾cZšÛ0ì4>µ3Y±:îŸxÂÂ`XAÕÁ1¯Ô$3Ó³§íŠmkb(i¦_õu¸©³;ÊÊdÇÛÞŽ i²¸¿é³ãÝGüxë¼iŒÖÍÍ ípólˆ†\,°i=P—B Ê[\}-nŽ~¶Ôñ7oi–M¶y‹5N ‹g'l0þÑá˜êE'#kµÄŠ)k¿ò?~بéÅö]ŸóþÑ2úâåüê_íãÙƒÎÇO fWCD–>ü9ÞƒpŒÅQ (WýÓêÜÓ·” j€ÂCÅ&šyÜÞ™MXcp”ÒW/kï~¯|õŸâCÎï‚¥-Éž7IË~|¹cÙùÐŽ·DmÞœúk 3dzU@‘X‘®(J+:wÏYÜxíâ⹫NDöÈå«ö®3¼óõ…& ÷ì]ºÛñY†$kHÌ鳓=\,Vw÷žÜ™Y –zÃGvQ~† &Ê­·†©s{báÖ_o9¼oÝ)])§–“:D›¶fè ¦w|¯:Ó¡½nšÍèPc6Ne†']" “ ‰sèX$U»¿3Û©'KÕ<ϳÍD2IÖ/øÎôtB§™,È®#ËŒSóÖײ™y % «… ªDQH,„¼È¡ªÊʹYÉ YI¢”ŠU?™ñ­…V9dEƒa‘•|Ú‘$M¡2Q¬ZäMÑ+3G$m«œ’TÓuÊuzµvL£@ÖºÜL†ZEkTÈuIh™º0+šTWÓ™îxy$N ¡ÅØ„~­‚4Áx¥Í ¸œ¦Œ‚Ó^E (+ê¶ÉÚ’ ¡ðh›¯`&Lº¬”XÐJQGíª Àb‰Œ´B›L2Þš”’t@ªÊbØ®@UR3. ‘©ç\¤D¦0*:Iá’ItÜc"Àâà’Læo@8Šƒ5¬ kùäeSbÖÐ蛌×ß­»ò±ÛÒìÙQ qy,$Ú›ŸuU­b.ºgÇyKzz@«.6Æ0 4‹éÓ_PsÁ©½ñ{>ÕüÖk׻̛̤ÿÍâùgw²—¢E«žuÞ¶C Ê §ì~’_ýýª)ðÍ—ØùîãÃË>S—ˆHÉ¿ïï›Óþ¾ãˆFü ?ëƒsšB|ÖÓª¯þÑÂæ¿;]F‡ë²ÀÁ?þÿƒç®ËÞª}ü£›+^rýòqöœgw>óšÙœç€ûŽœ3­q=ív»š[ë^ýâð¹Ç.tßq^Qm£…üÝûF÷z“s*+/ûÊ( ϱP¡{üí¶Á3¾“žøüùéàYߪ[(3dµ)‘->ç~ì'§ûYÌM2¸× `o{eýµìŸÏEÊÈisðO.oÚ W<Êνû.®Ï0Vr!ßtbÀömQá²*…¼•“þe´ÿuomI…&¡÷œûu6nŒò’¯ë³¿P¤ŠiÓ´|ämKw}ÓúÌj¤d~ôâÛÂo~ÁÜðìƒs¯Øa¦çõÖÞ\¼ñ^3Ðf×ìÊ^ð"&Vl¥M«:ô’kýó6õÝWé<çOô„yÜð÷— ÷Wô£M[ŒÉE8…kŸ»2yþS(Þå}«ÊѶS3ƒéúÝ—Øñ¦uƹЭ/?Üžñx«³ó§G Ei_¶×Þ»7iZ+šf–Šº(³%œ» ÇXüœhÆOµZVÀml| Òv””"TxbVbgkê2EÚ$ø0lhd@F%è ’Â2‘wJ*D”Š¢“Z› ÚFÈ™ñÑØ ‰Åš)¬añ!eA)RŠ­Ï#hEe«s €A’üJÙ¡ @#^“:dÉKâ 8ˆggAŠD: µPeøÄbã¤J¤k‚Õvk93}oI|Sv»)VuÊ‘b% 2O:eE9q2Å ü¸µYG!“‚€@¬Q’Ó&‰)s.å† úE.YJQÄkʤvÜ4 JJ@¡D’%p>žØÒ°V"5³MU$R!¶½R¹m“ªQc¶oíÛ€å½#H1+ëÉ…4¥¨ÀÅja¨å†NU³©”T ƒvœ5q8Xíæ› ±J¥(EÃMïÙh:²gXî<)ËQ-~ë¶F m:»Ì˜Œ1™ºm`+Í)õÏ1Óà’sÅ·cRf„ccV/=‚ÇÝg†5t;ÈEIc*N?M³ÖðQÒÍ–²,Óhí}ÏrðGY% cçýÛæŒ;´ßÝ}èžgw xó¯Ý8ºÇŒ`eï‡Oº°“ M*I ŸíWìoÉZM\]wî~bnJôÏß8 à‹æ}¸|yrΩÄp ?>"õ…A’õTÛ»­cic–&]³äNÝÞÙvÞâ©*ÖCªV¥]™6c­¿÷ª>Ò¥77ŠÊUImå);·ì]@´õþ©Þ).¤‚LÁj8sâxa¸<“Ϥqâ%&Q©ó@Ž[*GKž8ALcF)µMh3êÅÕ|Ó̺Îx™ÛzÌÚ’Ä$±Î¦Ül§ƒ¤&·[ÈL*‰Ñø¶…«†ä›ÔY?6ºhê* ¡p=:œ÷ºBI²uY¬ªCÙ¼pmSiƒ"·Ìö ª}Ù+“ñR[h U ðµÙGÓÓ…¸Ûmvš¼èš¬Ë5’É\–H 2ZuÔ”[®õ)Ëeâ©kª›ëd Œ¦ŒØ$VÙç3B¿¬‚ÔY·.“°šRtªP Ú6Y2ÔDSgµË%ìœïÒé4l“’)³YcmÚ‘S7—qAÒ­œt•|+6ùTwM›ƒ³ºeµ³}éf’Bh«„RS1Pê³4æ‘·ýhØ‹Ífca¢8@-Žb üÚ==mÀÏ,½õŠÎdsÏê&‹5l?ùÞúWÎéá² tÕõzîëgüúNL%ö¼âf}éÉ´sÏ“º¥|ÆÉÁ×Üþbë4»ÿb¾øÉÆ@Éù¼•ùï¼ÄäåÖ7\I¯_×{ô}V»SK&8×xɃñ1QøÛõÌ$4«B–RdEüÚYK‡Þ¼è£á‡½>Û8ÇÎ[í°¸ †¾ô¡Ñ©Ïɦ7-©–6M “%V!“ئD}“RÍzYIj(wldåÍ×Mýe·ÿГüÕÿxØ(»Ø@ÅÙÓ]_¸¯*5Ž¥`°ÏŠG¤øD3r­Ùr–ʲÑgo e?ãß¹Àß§UK¤khÓ}OÔ[¯49»$–°Ð„+>P¬‚“Ž/Á¢"†›|S»‹WãKnžxfúÑõd¸cdûE~ë:2F)°úHéßoÉõÁ+ýyÓ_¸Ké\ƒò,øÚ¸{à¿;§Þ?¢Ê Ü´ÒÞÝØ’aƒtš©¹Ó¯üptü¬n8ó`§ÇieWs`#SÝ̦4s2}ÛqزU7e‰§º†å±EQåw>§&—B•Òâ8rN|ÆIéã ¡xÑcç´‰SN†“ÅGdï{ÿdÕH¤¢Hà¤gn¯^ôõhO*9ÂÒnäó2'HU§ê<'üyë2ñÞÆo¿âàô›îÅo?0HªËì‘¿ÁU'yѲ™3I¾$ôøwmG¦õq7cÍü™OM>Ù÷«üG¡:cº™D2ß}Á ¿ÿ^>Ï( û± âîôšV¬Õó>äZAý¡÷ÄãÞ¿ÅDj£ÛþNcåúŠçíÏþê¡Ý}ÕJŒóÀ{«Pb¨_ªU`¸fJ¤£ìn_ó2Ó©Ëß{ΞÿG…DÚÉb ç´å\ôÈ„e4™•‰Øq\9BâªÌPç–}³i"–~‹¦Þò—™ËÉ[,<í»Í=>ܧ?Ç,)G¨®ƒádMÖÔ·>9gKM„hA6+BJ!ÝG}ä‘ù¸ÍéQ³ÜÖQÍ¢LaHG>/\ˆéR›å0*Ò±1oWƒ˜i†±Y4¢ÞÜ, S73^Cd“ ›†Ü´Í:Öf"^ß7B*aãI$1œMlã aêf†&Ã$œS¥Lš·Œ*óŽÆ„àa=±WL …­ÉýT`±…u)IK–2k`À-4HÖr£¬ä`k9ÜmޤÍP-Cr¶hƒª¯'L¤Ìl$1MYjúþø¤ßÙõòå-÷ê"m~ÙïU_~b;\H!…ÂÂ0ùÖHñ¨“WʳQýã¿®œò¶Ô$¦|}têÓ§qÁ&Üë=ûçÖ«¹?ë «{Þu(|à‹|ÿgÍe…Õß¹‡?mÚ‘ç^xßÕÓ7ÑÍ<4¼tÚÆ¬„–ƒ¹Ýÿr=÷¸ø­¯îÿcÚõ‡“9ñÏÙΔçMïìà~¹¾ïCó­O[˜Þáøô§‡§nJDíPkV?wÛÒՋəޅäw}úГ¦öŸu(˜zä†Î]6¶§o`cÀ‘“=天“oþѾ‚êÂ%!¬û ´“³·—ÎÕÊ«ßÚï|Š.ýû¾õ\2‡õ÷¼yÛö"d†“Þ÷Éšæ[‡ÌE3J§NIÍË.’¦+µÇ—µ­]¾þàÊæ [òö¼œ¹çü2•›î¶OöÙæû vðƒÂ†³'÷šÒÁÂòè„ã•[Óî®,М’[Ù?Ns›³x£ÛfgäÖÅ.í³£ 3~ecl´©ZTóÄl1‘‚Ýd“šh”ÀU‘GpNÍÓÛzÁ9¨hi&¹er^ÌìLãç5ŸÎ ¢)Qçý^ì-O»©évM¬I a ä’Sá eèOÖX‹ŸiBr%˜ ‹++fþäÜÜtëê €ÔG–çc;©‰;yR’Ð/†JÊ8O·ìòÃÂö²ùª:â=ãp•„!JÜéªvLÓÖÏU íŠßß´ã}ûh)J“)A›³“Kö ’¦2ËqLÀÃ`ýãœÜèæ Ö­__¸f|Ù÷';î;efÍœr§¬kØx»~®™ž:–WÌq©#Éfg:“ÕlË#ÚÂ壋wµp–tL¯”?|pËO4ßøçú.O9îš] å¸ùá5wÚ•i’ãgxß‹¯Š[~Ö?ªé:‹»ÂäÌQ` §/|o#¢ÔeÊÂq¿“›üìŠWî_¸Ýþö@;äµLÑhÍ~å×§.{Ýᦹ¹Kß°j_u!ÅdŠÞB ÒM¯ÞÃ[Oh¾óÆ=;Îì*ñÔ?_šÚÐC¢ Oz¶þÖËöÍ·>i–Ž{ù2¼ôÖu[ìyÓÕ£ß>yš=Y5zéëϼf«6Tl(hzÖ°Esç—ÕGÞº+.{sÕŸ[óê§ÊqeÚûª+ý³Ÿ’« ƒW^=~ôë°i{¶ôÆË㓞fn|ÕžìUóòì¤× ß·ØÞÿUöÖwÜŒè…lJo¹Tþb‹Þõe>LÎ)“© šŽîú‹Èë£~›N|é¡ÑƒŠ,cäpóO¹«×DnO|˜;å‹éŒ ª”O?ëM÷Ým§7â³î>¸îK…бl"S9Å_0$£d…±F …\7J0Ž›÷ü Ò˜Ù™\{;ÈLáBnæËžNÚHat¤¥™¸ÔÔY܆ä\Ë‹9$˜\¡ã6*5·-H^zSëúYBOâîE)fc,Ú:E4žÇ*¢Äà`@hÛu‰ì” «õÐÇŒ¢we4¶3çMŽ®WûØúÄ&WÊ¢˜ÙÌd„<Ó&xn k{œZϬª43BÆê#mâ>µ)éÆM=gÏ–%4Ëë¢Dîk¬|ê.•}ïLÙ ¨JÎ¥¤ˆž‘¢WÚdÔ1½P—ã‰O‹2£lÆ(›Ü¤Èfh“Ÿˆu§o.ÙDQ“õº® >•ÓyÒhKÕØæœü¡X›Rt0Ò´T@íºM”êÄBÓEW!ãá¤j³˜Y ظ1 ò,kÍÕE[I^ÅIû½Ýí¦Ù­Ú}¶ç†ÊÌJ·Þ"ýþj5úÆLÏΗeÈv_½"êLfixóÞÔÝÑ5m»pèP@ û®;<iCÒâYúü=Ÿ8åÔ;9rÛ^wÉ~·8îtàê<n'£^w]uDÌù)ÍþŠos%’àh¥s÷óýWßqØpk.ÏmÝdRa=gÆÌ^tßæ]Ÿl‚böÍ÷5_¾¸¦d¨,’H­ö~/&ÃPË8аÆÝuåÈÙŽp»Sï¹§{ÍîNôÇwnNYϾí8û„ãgÞe4>‰ùð†èúÑå•îÿz†™‹ÜÙˆ-.ÌöÜëYZìÞë¹있RÇ´„3{âqöså0JÔxààÂìÙIæ™9’Ú`4‘ABsˮ츭˥>¸²pK£õîCÅÉÝþÖsÍ-T8ž­Ø|µ^K'În0½S:« ̬‹œLµÞ†l[™:*ºyµ;¨(¤d§æ[½9Ü\'DÖÙùqæ]–ÏØi’I§;Ž)XãºEV*¸­_°ïnŒ;1š*¯:ýiCmÇtçmTÍ$cp6T¡>ÔWžËª²nš¾Ày‡jH˜ð ŠŒj!—“"ë{³­Ðd’ÚäiÒ‹–›Jàs¬/]êQiÈdAÕ²ñJ¾j;<Ékå4\Ì»·q AM—“@Ž­ú˜Bl`c’a¯vÉæm–ëlÖ6«‡÷hÎ  ¾É¸Á–uË:©‚q‚¼o˜51Á€ Љ’‘¼Yë6΂)œ ¢g[¶jS§±ÑNqŒÜ¦ 'k[ÊQ ™<™N3"cŃŒ¥ŒÅZEÒ$Ü•^%µëÊT[Hóž*&l‚S"%°ÅODCOüͼÍp#¿Ûyñæ\3f˜ß~Õ&gÅ’ÃE÷…-›ÎÓŸá]/Én¢õª÷ú§õ 49Lù¤'MþáíGÜ OÞü¥‰'E$*3—#R÷OMûƒT`‡¯ýlýW[Ôê È²˜[@¡‡_p)¿rã:’z׳¯ôQõ+ÿÆó»s÷é¿Ó|â©«îHNùêÝÒ’¸§ÿiAõ “,|fVßþ±Eñlßö(.îúááà_ åúéó?V‡÷ýö²dE,ÿä9ѹìÜOÇ8Ív¯nyÙ† ûØ—8 ¦yßûaEN}×É®ãqÍso­m4Oþ“uȱþ-cÿ±wŒÈô Ð¿{û ªé½þü²²fºÀ—}cø¸×¬Y=yéçG¬8áU;õµ/©ù^7xé÷ÉÕëîwÑÊËŸ„ô᯦ñ3.Ð$µäuâž=:øÚ›~äKÖeY“"åT¬Š²Þ˜éÂ-«Õ»¾eg¤n0N‚ª5”Š){ã ÷N8Ú'}"Ûû½›ß~FWPîxoíOêT_{õbïÅ[ª÷ÿû˜-?…g^yo·í­5ŸVX´URúè?Ò=^µQªÄ±ÉOÿûfñí‡êʦ³_³nÓŸ=%}ë›m/YÎ%,ÚÚûWÿMûˆç‡¾*™²ýÌÿ8dß|j‡Õ8)Ô¨-R­Æ”‹­ÚÐ*‰ht½‚)RúìÒÖg“-³¨P“ÉÙ/;š9!¦\ KÞ…_»¨ "‹Ÿ0‰|ôawèQ‰³1˜„Œ MÎsñ©“CXˆ0)¤Æ˜Ò¨DgbÃË^´Ð„h”ê­# T§GFˆL$¦$F›RÈ’‡(ßfštR‡ÀmtV’ ˆ/›$"¬M'ñUJ¤b› äò6Zò‚ܸš˜4q¬mÌÄÅitm *f¹­—Ç 傼GtLê êGmRhmñ@CYÀ4“èÕ¦n ë“ÒiŠUNQ«&iŒò²0†¤j³¨“If‹ràÛÀ°·nµYÑ™¨`”ÆuÊѰiÁR­Ä¶JèN$›Ÿ-bBÖ&Õ0"RCHm‡¢HuxÐŒM“±ˆg€„˜L[![mÎ'+WK*bìnoÅúöÊ=µÌ?ÉóQ"`Å´+ÉÌLqèpõD G`ög& ý3ô†ƒ7yµi¦Uݶµý÷FÜŽ¼c[Šž`â^¶»Çó>ÅžÊpß·Ûlÿ©š4«Û<%SC£Ï8¨Â $IlÈзÿ­Ýô{B–ªÌ©J˜;·‡È…ïh>¼Wøž€j‹c4Y²ú½[ÚSïÖÇQ‰‰£ÉXÑX\=¶4¡¢Ñù{rò‹7,\¶«ÁÆ nÚS%ùz:ý´Òrví~÷pðš»;ï_<°ŠMÝÎq6ÂÊu‹>+VOoc«eüÁátâäÄ¡¬:ÇuWEÀÈ«•CËJ8rMã¦lBÙº Ê"Ål9?5.'»š ‰Í2ÉbVW¢Š´AGü,$78.ó‡÷÷•ÜŒ„—nœš[ŸšÉâʸÛÙfê&GL Qf˜\ƒŠ˜r“,ê…v¿SµY6}d¼O¦dÒ*Ò”[¯P®â” lRY&îP4 Ì΂‚ÌõFžçí8U‹7TÁ¦f&Tõ$&S–š¤ÄükÊmäh„¦×wP ú­ØRETà”§œT¬2Qô£®V‹,ëÔcV¨'Ê W«!‹(ûTt”8TÄhØY¬¬Ée%˻̜g12g3}T &dEƒÐ#/†ÉЍH5°<ί/²è§§ i=jʲ i¼¥3 š|á;M c“±Ù"oŠB}c…éÅÊÖ-;›XSp•rR/Ù\#­DR=$sßn¡TWRÚh•HÁÙì :F}mŒD›Z›±úä0¥Å…¶mþ3Ÿ‘»ÙÇQPÓ ¡¤Åî~õY¹¡{ž2ÓÖ_ýÀ¡q…ì)wéWœ‰}øâø;'L½Éß^Ü*Æüç>ö™xÂóׯ;¡à¯ý«=­<ñ±EËmøÌwÃ3G¶õ-G„Á(€(jð’CRR½?fJð)r™…¨|—'æÓ[óö+Ÿ?|p)©†ÌÕ h‡Ãâ'oXƒ3¤_:>ýåÕO+ü™aúà¿•zh¯úÜ·—Ï>;» oX(%c‰ “æ­ ­é¨´ ½váG-îvV¶ãKûÚ‹æð…+’* ‹47EòÒµÈá¶& ]qÒÃ&©•-òÉ•sêV/;°x ©áùÀK&e w°mõ~s&?kÞž^t„eæîeÙú”ëÆ‹Ç¯ë®z^¹ºFt&‰™=ysAçõ»áÇû&»£ôŽëžRš™|þÂCM2‘ÑžÖ1ae}XãŽs»51I4Ó=5óýœ®©'ö»·-ÐN…²ó­Å†FÛ7æåœ¡bÎÕbN‚‰YÙÄeÝ?¹¨G7¬ üœ]G†4ëïXYZmÀÉ5ìò8vy7k2°”}2ëÊÈÞðJ3X,y¶[´íB³œO™ÌŒ¡4˜´¦ÃxXµs­¬VUStS-ˆBäRÝÈhOÅôᕼ‡Ñ ÈÔ&cª˜uˆ:-rÆQk’¥ÂÀ·õ(í]ìwp;1™%#$Œõ¢×DjÒÂd@î8¨MŒÎíÁil¸’‰ªˆI«BÒÚ‡ÞÚû~ÇÏžrü#Åm»Z’Üž8-HõG"?­gJTdÚ9Êó:-ݰb$EuŠ$µ›/Ø¢ŽßûÞJHŠdSC×0Îá¯ü‡ý^ÁB4\ž}çÒxÁc§~ð­*ܶ—·ÞÏ^õîòp.ÏU6N `4± 9<‚Im&YøòßI€{ØofÿúÎ'<õ,îZPçÓSÊTæÁx§"UC´ZI¾÷yFÄ~É·CuoÝõú}MTö¨ÅÙîL§Š€F{b•e.lü N®•®Ñ'«I™~õ¥‡»ï>§Cfðý—ïnÔ:»óíÞE%få v×Qù>/ßšåFUÍýï(°0ˆóÑîgßR²÷y£Šc ¾’€õ{\çCO©O{Ãö›_´KžðòްOðü˜_£žC0L}Á:)aŸÎc!ç~ ª_ÿOíÕÏ0wzÛñ¥±ðbº¯j–ßúÙÐ1A4¡œZÜ÷$Z÷‰³ò`ô~ç×e›·gÕ5KOÿ®^ôé©™"ÞúñÑ?ÞéO¤ì*}óVÍ;﩯ý§æžoÛpäé—Å»}lêÆ?Þ/UšPÑ^÷«yª/šbH ²ªÐU77¿àjóܧ’ärÜ—‡vŽQg̰İݬ¬‹žQŸcM¤ª b‚59 B,Æ”N“••1 ÄöDÌyòà¬K>‡u¦€&…¡¢4æÌÍt£…™ÑfÜpÝ mfÉi²–3b$ŽDˆ¢j¹ÛɃ„f‘¸.ÊèÇ“¤ˆ`R£4Lì‚å¢;5m DdXÙ îCÏ @¹0T‰)±À ¬u!FÉ[1VC iˈ…DFA0¶Óvj4e11WVl•u »bkáØÒV (åA8zÑ`o¾MlPc„3n1I˜û]hO@P5d§C&¹JHäi1eì2íIbk˜ŒH=f2Fˆ`§r¯}+ÆÕ¤`hâŒsñ0C1j[fÅêRä̉©E³Y‰ Ó¦eÒ–\Ó˜©˜‘ ÊÝž,†9ejc–”bœQHf¥G±L•ÙÆÍ&©3Yñ€´šri¥Û%w(倪/fg I¹`xw<çBGê ®_E•¶¤AŠN:7&åE=–Nh’’-RLB-ˆ9xÊuÚûvÊP«+Y.Ä¥›M&8,†0Æ+^<înò”cR²J*OûX3~Í7¤'æ.Ÿ.½ú›éñé¯ÛàsVrˆ$„”’,`Ö½ìYí¶‚‚äÓ¯_öû¥‰ëuméÑ®lÙ”Ù¤`–RÚ>]þû«Ž´ µSê¡vÉéžÄñúm…yÎcÃW>8†q•ùÆûwžnVÿîú¶Ž6½ó;ÍÃ~-ûÌg*3-€óÿvI‘ää2Ö­ºGÕïøîüztŸð«í9õä‘L³ò§“MO\ù9<ðÑs–1ý»÷\öµQ·°eÃþ»ŸXjÄæO¾Ð=tà5”= ÑEÃÏ~ý╼‹¢µ~´@`Gañs7ÐSvòùÏ?¸q{™•/}w%Z£§³ükç@Pî sâ};ŽÄ »hÙ%䟸ž¸³CÉçoŽn|ß|ÆÖÆ„üø_ݯ';R–>SK—úÑ{¹pSR5g]Ööï9»ÂG.ŒË¶ºÏÉùðª…۶ϸ¦éž?ßÙzÁú!·¾t˜TO{hßñ{n:´³ŸNψUÇ7í±NwÍýœíÁ;V¬|k˜.Ød½3Õ-K£ýÛ²¢ÁÎmÝ~ ¤”¯¬ê£öGYw¶O‡ÚTqY iup¥™=Ùtêñ¤3ßn›Ë¶Ú0?\¿8QSȆž]·ž{óÝqoÆÍ˜¢ïæÂlÙÍ×MüÔrM<0ˆ©0EÇ%CÙå3³n"m[#.Ü6pp dõÁ¶È7¨A2°8JqÌW¹±€v¤%úÛÓdÖFÊÖ÷³ýÉæshE­ÌÊB'l«¹ì–u“EG[¢ñÅ\'ö `„ž:s˜%²–ýàÀbÊ m§ôà–O @4&›ïOÈ(¤Q\µ¸nnçðßni´í—fO<î”7d DÐ\¯±Y²M[D¹ç=¦ÈjQ¦ö<íä‰ÖÝ3!o'¹bõ‚ ×_ÿƒvã#‰)œqÊÀ\Q‹ XJ»¾}¸vîu»mÈ‘úÜö(3åé;%]:†h²Y XC Ö]ýáݽ_;ÁÜùN±;íThôýVšxÃëvº§n®ÂP­µ¨ ‘Ö,6# ìÿÌ¥ÅÝ·ÛœÒòß_¡ùýž13=Û&. ÏÛ¾§±¾å£‡"1 8ïe•.ûÈ®OŸ™®(~ãí‹AuwdÞ|Û–çnvAû½ÂÍþa½ú™×­ +á™.î~Âøæ÷ìžþãy»ÅÄ´úúkBÔÎño>ÎÔÎ%1™Ìë÷_»l_ùˆ`àozó õ¯?)Cw;y2­ãTï{ëmq—'DíźxÄ9íþwî£#îJ›²É{®¬wW Éž|k8=Z2R>öÄ…ê‡Þrñ´;ó¶'ò­¾{ÿ «'õ”vß町ùÅ×ìmÿiì'³{ |Þô‰Ó’³ÒIAd;5•Õ?¾|ÐGºÏáx>µ–'ƒ/ìÁ}B@2jq”A2Ú !/¸Î…°¦ÓNB†±ZP6MAVª²cÛdu_2Ñ(‚ä¾i\‰X§´N” \¸vÈ./bg'Rš@3ö‰r—¦r¢6/«¤jÖ,åF”¸LIÒHŒ•Ì0R6Å“•V[;cq½énÓ´T—Ýéœ1iò|¢èO%õi ™‚æ×»–83Åy6f¥ñšÙuäÛnÇu9´1ˆ›Q[²2‰ÃÌô¾ŽEÏbF¢#4ë¼EÛë²é¤Z!f‰ßHŒ†º.fQµ.Rˆ TÌ™Œ£ZR°í9t0QQ)k%6¥,†ÑJC¤¹D¿|•ªÍ›J4}Nvz¶‰ÙLDœÕªJ‰  ÕbGn=®>¸4g³1Ñx¸°”hhKK«fó™¶çEJåqÒþÛ qXÍt¶ùýGtþÂ,7ž¬­%`9oÏvj;E gS³|d`öOrÓfKW–黚”‰¡àIc‹®ßݶB¦'aì&'¼hûä³,´ƒïí’Û÷T„/¸CD3å3î”>úÞ±õ’ßyg~â)¬"æWî/Zx÷XqwÖù“W|i˜ÀIÉ>þ‰6£ŽÆÐyøƒ8ô¬Ú ŸüXŒ„8YÍhb›ÜHK÷-}î„-ng’A¼õ–jîn9„$Þ–ï<ž•©u[“Ž|¯Øtç~}ýá¸ûÄí {·+·-m:%û ŽßÑwrÕþ»÷ÐÃh×J{¦~Kl™óÁ‚%)H9cÕueoGÇ)©ˆbòû5¾ÞÐo ì¬óÝM½^Ϙu;—fXE5®\3{ VhJ+‡Ç½­=²˜÷7N•³Ñ5·e>P±­ã'm5e¬%XW)©ŠVU9Ä%ß+Kíç–TZJq°´0EϨ_n;ýÃñxÕ”ýÌ`(ƒÔ)Èù&Ä¦Ó DÙzÕééå‚£ÑÕ¢A×~‰òLÅñbf(¬Ø¬Éu8®ÔÃE±e²ñh AA!vabS• ›¥‚5>÷maBÀ¤ár„T‰5 Q´©¢‘4ßI|´™q¬ª@Ýv<›‚„BFµU“OÚ•ÄBÖšv¹S׿Yd=kXª ¶e°4îvsÃ> Ùu.4çÂH&‘'×U©s»#ˆˆ¨æ¾g4.³iY™|CDˆJÞ&Õœl=§Æ6– M CZƒ !—1圂3I•rB‘E$"X†ãaL•Á”HðšmÌÚâ†Jj—x¬”â°[+Œc 4¼ëÄ»¼½ÌL‰5¼áÏ*Jê<äŒÏ~žïýŽ®}××Â3ÞÙÿÊË–8£ñ[>9¼ï;rÿæÏú?üÓ)£øÝG‹™â•×_œþðÙŽ’!Bp&Á!eDHMHÙq¯?‡K >L[ brT¹îyú IAyß XЧü1Ieçÿª.™‘j ÿ‚I ²ÑË¿0¹ïkg«gÿ@þøÉSý3/¼òâ&!¿ë[]|Þ7ô™¸!e-Zè2±¤APB¼ä¯ò«Ò]´ÐÂH·:Ôºmo;~Ú¥æïÞê/¿Ðþú'æË¨?ðÿÈ÷®ŸîºâíŸõêMD&ë”tá?ìÇw¾¸ãïï4|Î÷Æ¿ù…©hÓ¡þÛPŒªOÛß²9Û0¥7?÷ú™7¾¨ä–¿ÞÕ Œ‚0Š%©¬ïu’¤Úå´·Ö|᥋îC÷˜î÷)‘¡Éÿå«?~Œ…±7ZÌßßž¤f¦ÌïùÕì¦ TjÔ<³îÏŸR¤˜Fï¿¢òO{ÍÜà½Ï¯Ÿö<•-ï¬EbêïtEæóÛõï<;•¬<;š;eÑUùyo'9s]õÙj‚sö0ùñ;®™~ÖsÃ;¾$Ë÷½ù†Á3o£¢Òvƒiy^ß4ž¸Q^wu|ÝÿÇ^ÀkzV‡âöZë–G^Ý:>™™L2Oˆ N±P¤¸†¶H9¥¤‚;…PœâN¡@Ñâƒq›ÉøìÙ¾_yì–µþi¿súû®ëL©³vƒŒ† ­_xv¼çŸÂÅ—&Í×n>ë (ÐÑP»&¤ …‘¦ž§Ô#ÛP·5”¹H-v¢Õ¨FFì˜HmÁÈÓO9|ìQ“ÎD­ þ¡D¢hÀ"€DÕX¤CU¬ká(R°œ%‰È/$Dà8ê"•a=5VÇ$°òX#%%zbŒ«¦& 6(ÈJEÈA€Y‚˜àmm’lÔ¦˜³¡–•ÒJ#„À:"rh‚‚ª×J$VT¿náˆÁã¼° <hØ=µÄ F@À\$âQµ‘Úˆ‰é¶X6±vËØÄ&éS‘øçt¿‡ÊC+ø™¶e"#¶9—Æ™èBÀáÐIÈÛ&ñ&ijôÄ,*뛌hÐøªšHœ†zPY*¥ƒŠ#BPºIbMƒæ†U\'k½`’ )p €L LÐÜî (o×h!vèÉC ÝN ùèh¥ªeÓÆ½ÇVÂ7ÔX1$X. êÝ ÑcÔ½Z[ÁÆÆî9Mª}³|ç2ƒØc1Ì_¿â7ì¨×™è+,®=ćÆ*ÀžÕìK“œ_ˆâjïG"µ('iå•~ȹ£ß^í&ª´úåu¸ýÁ=УvtH”8X”u—tÒ„¦L¬&`¨—Š0F—ÐXƒQ“/.ï+4ü/òjWsæLÿ—öäÌ­Š{îî]l›æÖ¬=¾ÓnS:sæ}Ù&ÒííÅvÍe³²—ë]]µptyúåzÆ•·˜ÙmÊú´X:\õà1îñG·N©® ‹ÃÑ̶Âϭʶ԰.Û3± ei~ìnv±ZèééfxÔÍÌ*š]_ ¶y’´ZqÝì8ªÑjƒŠ 9o*Ê: Ü´~HG’ -Ã1Y\ŠØV€&¶’Ù0Æ=ö–UVJ›˜¦>w3Ó$2IV-WUÖw!5ÇÀ°SN݂ͺ­$Û`\­(Æek&ólp¢ßWµq‡tÆ‚QL$·µUI^FÚïÉHCJ0`Œ8“£pÒ‚P­d”²“ %ЊI4aeQ¥„H4±ÓÌ÷†H–Ú능B¥Ì¢¡ÊUz7°€Ô €ánÈ@ÉÈ¡Úf̈ In"×èlæBæ¥V\F€1o0JÍ6ïœú+g­€ô%̉Àq£ƒPT `æ™Uà"{¡öTºž”tt³æ±ë›Ä˜²V©¤€QV€¡ÓJû’ÄÆEË>fäP¢Œ:ÓÚÌ fYokE€4ü/i¿âÒ¦•€ÔðÕï_:åcÚ˜Xýú½GrÖtÚWú±ÏÚ玒Ҙß9¯×çüЧ®n˜Än‰cu÷‡î%ÿõ•Åóß5SW¥ûêw̓/Ÿð¦Œ_ýÑü#.ŸTèÂÇ~Î~C®vêÕO_5|ü+:ÇÞ}º|²m¥ØöúeüÔM¡N5ú3¼þBºóÓsùÛµûʯÆOÎþãüòço ç>²Û?Åç/>{¸ða®îŽÚX öQçûþM^4õŸñ1÷¯ÇÎ~yæ}ÂÃຨ­ÚõÊýks·Ž¯¯k¬Õ¹SËÓ$ f|6,ã·T}Üx|/‹ªŒWWé¶äù'æOX'Á‚®Žüü°Ã ’Gú:”?õÖå³2mÛ^?0Qª–?Ÿˆ¸ 9!êÊ‘sî¡»7“»§ËÌÔvÚ¸‡e‹žZ'ëPߵǜq뙫I;Ñ`A p»ñàvϤ.5(š´&R›O™ Žn)rÌ…ÝF¡ Ft¶jö”{#Ølw›)úcÞ>U,&sB»˜>®X[fØï»ÇO€[8¤N0%Q™fG×–¶±Y \…¤GÂU€1³0Áô°ÖûãÑ|b¶«dPºt2ñÅò¾5³e®Žùu¢FŽeQ®¦*í8 ÝQælgý~¦ÅØÓ«&vÚ ËPw£G¦iRݸ¢vë“Fà¢ô‹@,Ç«ªÏ gE¹ ¢á!lŠ*hVH}ßÂp~m–íG‹¢–rÕëm§ômÞøRQ樗lµ0ÝãTÕÃ9PÜÞÃË=:8\¨‡¦P²„úÀ Ñu6Þwu”1$\9:Ú¾uÒd!ÎÝ+‹V<²×ÎW–µíœK£_ß30}^¼õ¶d‘Ãm¿÷—6®þê·{aŠO8qõ÷Ž·=«‹ª1›¦è_˜wBd뀆‹aií¾%U7æäVÿíª*kç@BcˆÃä#›å·ý¬B<𩨠/DT*H™Ÿ{]}ÅøàÃ2舅êÙ³餇8‰)N\ÌèO>‘õ _ÖM‰§žñ̪›8ËãöKVõrçkËá'ÿîô¸<æÆúûŸÎ~fÇÚë—‹‡_ÞÙû†ÛUhj°!ÎSœNmæ¾ËïÄ×<'{àEš[)7 ˆT ñïë·ÿWq\© «³Ï* ÕÞ[G±?s|¦a`‘uA"cúù}`@+²õt²r÷eG[=·ý¥/T›¿´cöÎãS+˯¦ÞÇ.Ì~ö†ýð%ÚŽY\}õUüð/õoÝA¡œ 2”“PYU'~¹)ßñ4Ê'·@.ñÊo¸ŸY¿ü’;ùé—OŸü=äÕ·„罩5hËÒ«ÿàñ£4mkûæW‡Ôb÷c¼ôîÅ}¼·öÜ;øá7 Í`Ž€î{œ±ÿò Vï|ÑÑøúë–*o}éQ¤{Ÿ É_ 6âí—Š/z‡%AA ÿÄè3vFp#¤E•£Tgä[‘3™0ZqÒŽ€0tèœ ù²e˜3 ÕSÚØV"¾K<Ö.2‰D9v)£ht<©Å;›é­ÙCc#G ½µupkDÐ 3¥Z%A—­T°EV0ë)™÷2@löbÈ hNrR*GÂÐpŒ¡tœ@¬<+¥‘©ñMB¨£°6Z+ÈCˆ1 jiM@a%Ô@)B$vI;jåt ުݫrB#Y³Ë©i§Žx"eô:Ja­€RJû!ÑZµ3[$äÐøVŽ¢r) #:«¹ëQe",iR䞌bn‰BÖI×[“úvl´Í€BbÓ¦!Ž‚0e…PjË…ºÝ–g'…`/Y+S@H&i˜}å¬E[ê’DeòI…¨16ÀVeÍ8RÚ#e%J€`Œn5œÄ¨‚i@BˆÚvÚªöSÁd½ÃŽ1ˆqÑHtÁÕ=1œ‹(,°‚Ȱ¦u£cUy¹®³ÊZ/LL¡Fnb“Hu-±F¥£ ÿEÿŽßú³¯Ø÷£,<û£Kï>Ú¼íñÙË[Îv³øÆ—âñ“¨AÅduá_îî¿å¤Ô`ˆ³¯¿tßÙ]ŸF¤ÍÓvϩϭ»³Žñ¦WEû–³ÌîßÁ5© G‰W¿0ï½y[û’MÍ6녥ΨYýò«×Uá7 ù[+–æ´×¬å¿¾R?ì á_Ž}zî¹ã ¦Rg›Xg<𬾠/îBŒLÔé/X>kêŸþe5ž2ÝܹŒ0¨A' jº‘ì’ û7^†çöôl¢!Æxõ œ|B"¤Ç§j>C·PkЇÁõkÙέfþžbâ”6n9eÈ¢wç=9ºße§¤6±eº!vñ–¥þÆm ;X=6­Þ”T …tZ´©ø•Ñê–®@ÅÕ°Q!Bde#)åZi§§FÔZÅ(1DókG ŽCI(Q> ;(3³®Ê1 Ò†©²7šWëÚÔé×}wàpÌ=.ý¹Ô´ü¡VÚCĎʆJ¡¨–Vš¥Á¤ÝÉ(-çÙH)‚1Y'ñ„¾_×@•kõÖ§²þÂ~jÝèg_/N{Ý,$5ÿâs'ŸÔYý䟋KÏŠ­óRüø‹Õ)¯Ù¸öþëB"*ñLÒ'€éÃ/ýæ}+3¯!oö(ûÞ»_½efdfß8öǧ¦lPs¸æ+Éû6û|i¸ëc¹zæE  'f>ÿÓÁ9ïì9öÍócÿråÒü{lúªn7ÅbÏö/}~ÀÛWæþë‹qwO-}ë÷Çþþ¹õBªÍ€(:Iµnª´=Îþ~{~J‹c¤yùã{Ýç¡•µˆFÚ €Oyð¡Ú¢Pà[ ó•¹þÝìÌWAý™óÐÔÿ¶²í•½îãO›¯,oý‡ |Îi‡šÏN¶?÷ø”­GEå…Ýfë¯Ö§ž]?¸—:´é#Œg¥æ~U‚ÕèÙN]| 8/Aо}ÞOM’ä~þ¦!çíÈ$çn(ÎhÁÿЂp?ñš@b :Q ÔÍ]‘F·!0@Q¸ÑÒTÁ¨ <<¼bÑÄví 3à@ƒ(ØÎ™³N5Ñ> •¸FÀ SïBFF1%ÅY=öš:¨ˆB›9!“iYN[\kñIG´ˆ j*Æ…º¥97ˆY'O=†šAHgmS@S×Mìw§!u” ·§&»Ñ‘Î:N`胱­¾RI0$e Rã ilè²(ÆYT]ƒ2¡¨èÖúÌ@TíªŠÈ .ʰ(ÛëØ‡k£o›£/ÀÁT–@IãëÓÜ:¯Èð±v @Ç \üîH©ÛëSkÁDðÍ Yft‘Òv– øØ .WVõ‚¸c ~¼ÔO¦6ņ½±axô@X RgwT­å*®jSY5J|sx¿ß_Lnžq[¿£ÃÖ‡¶$¬ÍÿüF·w)¡\L;ψêA[ƒEh?j·Í=ë¢Lllr×j´Ít`b«ˆPE×d'{C9÷¬pÏ—ï™ZYë]Ü47æèċΆûO?ñ¬¬÷xi>ûíjâi³j÷)üýw.I„ôÌ JÕØ V——ò”-«Þ¿®6?ùÀ`íU*yó“ûÌv×—«8cDiéÐy˃»$qõò«¥ðDFéÊk¥ôL{µ}åÉå»_W?áéøÒÌžÖ}ÔÅ•éX×dxõ[TÂúy¯jO5B(Ôø¦%®ŽA8ås¾Sè ¾üok'jB­OlÐV"7ÿøûÚ úÉNö™+«Ao|NJ£KIP; _ùœûÞmöåÏqí¾uÀ!þËÓpÛûvIK€°m>[6uL¨YÁß?©î¯×=ÃÀÊžüÑFmêÊß_2Ö;81<öÜåµìË>p!XÁé+xz 3ŽJr$¿úМþàƒ;|ú'Çúô¾{ù“Æ÷^¾Do{üñ³GOxóq×<…7MˆJZSrÎÇÃx„ÝÓ»&÷xÆ{çøì–u n¸|À'Ì}âÀèß»Åo¼ÔÒ-~ôæÕM›!ê 6N.S«)×;^3°V!¡úø7÷dí]g[ã|ÅØg£³ñð7æQºi±÷PäªÎY`Ë3uNvñÌW,NLØ¥õà0œéxÃØ(+N3³IT#)SŒ"!14q ÊÖ‰Ò" yNES´À66QG±6K@\BŠî–ûhÛI©Ô á¿%b#2標Ø(0µ°ˆ@ËÆCQAZö2A_¥H±Q. 6´‰T ’BÐ6 ªÓN†lœxÝC ‡ C«ÓÎF*28LÚÒ˜záFZSžxè•‚PQÑ45`Œ£èN;ÖÎqÅ‹ÇØ€Ò©QLÜÊÒØ °„VciÕ 0PÐèŒûg”®8‡íi4Ñ©(N‡%®ÊèÛë›f¥bÉê²aªzT B]ÓJåT§Si …q<’å‘(•8b;õè=A“ÙÐÉ!ñ8j2h“R¾ÉÛ;*ìxטظw¸ÐZ­’h«Ö‰Œ‰2¥†¤âH>Ý7H¿&ĸïws!ˆ™Ç-—³ÇM¥ÊbJÆ!¤m·Îzéf”þ#+r‚¬’8R1ƒ¸eG -4€á¾ï/ù€„!"f©Ñ[Ÿ$%{öjÛqb"œwjmûy-ˆ"F©-·Êlh¤&1 Q¼åÄYÄ@¬›ªliAéèÓHT­»Ì)·¶ì…X9jí»â^ÿÜÓuMš@ÃÿE ¡\nËT"Z@|A9ÝÁ$w~Ш šT ­  µœË½0tz)`\.q*×kC—õs-¨ÕôLh[ýÚ˜ä6&JtˆN³Õºµ9BâŽý™iˆDí1Úvšw)× 1&VÝ/oe}à .ïn˜Tïâ³®–°êcô¾Áp¥`ez­ ¼K7X«‚$¬ƒiNºP–a ª^ÑBÁÕ ë¤Žئ!’ØÈÆ„AêÑ*] ³¤F綪¢IôŒ!Å¢¨†•Ø‚—BÚ3ŠÁUy½¤.±Ee{Ps’§)qÔèè•XPìÆØö.bd r Ñ#ÂHƒ×Q'±bÕ69"…—ñ`=Eʽ÷‰4H*Ò”'—2¸P&©¢T¥y$rÑE !2qD==é˜õJIâlSÐ$a ¶kŽÁ8•ädj­LQ)Av™ Y¡Ê&îPÑA$БBi­aÝŠÒ˜†Œ”£RÙ4‹©)HCLbÀ42€ÈZTfAP 00×¶jtd&‚"šS£}å´B¢¸XiJ´#ã•e^‹’€høÿóËë`çSÖ¡¬ xSlxö<Óã¾_ÙòblP˜]"•Ýõ˜A)Ý&µfÙ÷ëêoÎhnùóxÛTK@'›.™«´Aý+8|î°»9 ¶±âm¯šÙGQ ¹ª>å¶aFÕ¨fê!íÖœXaš Õ±É=å§ëþ6KÛÏŸ“:éHu¢æŠÚ©®,×§Láê}åmÃÄD{§±ŠÔ°FçLæµf^¼‹7ìÊÂ`nuq¦»±G¥ÒY”LÂæÕÂ*›Ü„À”MMsMèµM{XU›?8À(̶u2œ™ š&¶Ž”÷ë‹=TµÕLÊapŸJ²öœHZÞ7íDÀ˜8¹¸•ÛX¿ZCRyD_ÖQb¬üêÐ ™ªÔ•JÇíˆÅ(ªŒ¦¨M8€iM¹)b’ù¬YÊZ‰È|LÄ8$MulIº²&0ÙˆË\S×õæ€ ÕZ@`!ÑÑ'UZ ,W픜ÎÄŽ—ZPå•qPd%PT’¶Z( ø*áàë^ÐM&-€ AYç’YEC(!ú¼¦]^°^$tK€[À:1¹F$ŽÊC] E„1!aˆè¢–„„cª8ø˜{Òq :P M‚j£5ü_ 8øý·êÓ>@!01?mg¥U,~ðéÑþjG;×êa ‚ÊŸñ4ò,ʸÌÝö¡•dë:úãg^HÚˆuŠv﮼8þÏϽø½Ó­Ðè‘KŒBÖ#ÊùgÉ’â­¿*w‚m¬F‹ Ö_î3W¶ÉI‰›j‚ŽGT-çòÝÑ—¾Œh%KŽ?zÛÀ|ò¡òé¯ÁSvÅã[!žÄSãIJMÝÄ}é+êügî]? ÏþÜ©µ¶4ìr¤Fç—7k_ýê²jB#‚OyÑæÛßt_úÖ‹³Ÿ½âè©ož¥ÿâ;¾íE@o~±½ó²=SWž=åñ„ÑϽíFÿôo妿ê/ °¨Ù/žT M’]ö%ÜvÅžö'Ïo×Áïyé=…DˆP;¾ö™5#EBF¦‡~ {u”Æ96Êeg|¯YxË;Â%_éþå²9zÓÓè¦+ö{ÍP=øÊM䨛~ÏúøzÈÁ½çßÇ缃©@>þ­Õ"€ dF޽û×£þC¯ÐéXA|åsýá·ïs [#€öOS2»c®|Ïû, Ÿø‰íYW[‰ øÊǧ9Žü~Ù¼ìÅ“*h©!?øòû¼6ñ©oN¼úýr¦‚iNåŸÞ=‡ ø5OÄÒA ÀØ;ß¾§PVCVͼOáõ]rP;ßrœúÆ'š Þ:¥QéÂ5[ž}KRoĈ^÷ÖU95Çî§á~Q1 ¢ŠjaAâ½"•(d“ Î” ‘DLœhåB¢+f”h$"AK VI3(c6š£AIÄÔµQ.h¦,LBJ·=ĘÔøªÞ”FQ„ýX!¦]gRŠH‚R‹'€ŒŒRˆk,¢²nk@ˆ À4¶™¯µa…‰ŽEŒŒ‡…0‹!ÒÆzÄÀˆQ‚VI’¶È3#*ËMb¤ÆvMë»Þ§ùÔú; ·´VA`²U#LN¬ïçh0KS»C4º&v1"0”«}ȉK ¤.鯡T> ‚+ ‚äÇv0 Ü`ƒ,ƒÂ[‰fX@Pí­6‰³K?†sñ¨Â°nc’‘‚ÑhT{ Þª2Ê+¦œ_bVz‰"Y"v:á¸rßÁQ§×ÙïßU @Y–róA¾£è¡˜!éæöÛÖê¦mÎŒqÁÔ™ÔQ(|ˆ^»¨_´°NÖ®;Æ0j†Ÿ7äl=<;S£;ï^râ`îöcÚˆóÙÛžz$ä?Œê·][Û‹Ö·!°IŒ»fÿÚw×ÜÞÏuZÝ(‡îYöí¨‹ M€ãAÅÝ‹ÇôÃ3[~þ®}%‰©²Y¿ÿàŠƒÎA¾(†ßyqâìnshïpû šU&ð\×(èÐ à\ =‘ö&•ì¡s|Ëì\©&î ‰]msÁòQA¿Ç’JXŽ©[Œ¶·rÛl¢7lNp¾³X—uí ËÖ˜t¬s‡ƒ¿{µF`áå[ÕpvÜ«÷$ª¤d]·½}e¸®Õ ÕaÕkW ýD ·\šÙÚ6Àžd¹?lë$kTP½µ @déähÛ梨 8f€Æq¦ò0p¥è*k$ó ª!Ój Ö1±ûÌ}5ŠVˆŒë“‘»æ¯òh£ZIµD® Äd<¤½ÜÅ•d¤CÒ"çªzÉK$¥A@€#‚4ÃrHHÝ`,1®ßV)A3ÛRð&úµFÚ´É®.4ŠÁŽ:ª‡Ærk’8äk 5µg…”5Z”è´¿¶dB‰¢kêÕ'_uÈ3˜‚]F·œ£ zȧ´—ªÑ{œGå#)“BP  øÙß<Â¥m LÎÀÛó¾ý Dõ²×êÞTžôH7•èÞqPïÞ†¿þ±ÈF0d½õÝݯ[)¾ö£ò%ÈnûÐÑìÃ[€(‚ÑþW¢Ü¹O­;sƒûÙ—y‰…EÔ£vO>z{|íéI_É⧯/ŽzÇ;üìo‡NÔö—_|ÿ7F>þ½§TßüÑê3_+Ì‚H ¶€ E€3_8M¿û£p8ÿòÔ>ÿ±ÍOß]<èŸU~ÉÙK‰k&»Ú;$êCÿzoóÖ¶X—êQ»š;þm„Ï~ôøä¾Ýõš1ïÎÜ÷/°§a@ùîÕæÌ§êæú»Å5£ÝÿØê½ôÐÚ©¹šûø^sÑ£[Ͱg¤š€û†©ŽíÎ%ûÕØÄ•á¡5A-ÁEáÑ¡4[_O®„!¹²›ÀÞ•%jº@ÎŒVÂú4² €*sJ¥³¤$* |½¶Ö€VUg&Ȩö°2–Õeš,FŠ´JW™HÍx¼Ô™]–Ú—#g£ˆ•-Ê@K5¿Tù£óK€ä‘$­é¼n5mÈ-‚ZZ©Xˆ$‹“Q–Ö£šœ­heä¢Ò•/ï›Í•YTQ9q&P0$*qEc…">aº\¸{$ 8“lÝ<¼j~p`dªÖ‰»X\ƒ9|øïô6•1I•ÖN6otñ‹‡à¹gõTõÎb"£[ *!âÁÃJž¾ãÈ]·Dª•õé¶ã!ðÚ¾ß͵_xN—»jc—¿ûÞhÛ_M¨ #{÷á®íTÐ*XáÖ£‹ÒX])Ôpœ}rcØsl¡+{à ”ù%fí³¿ ¢ éË‚hß4Y6³·üÕ/Aíü§™•ÕR’4€0)ñÑ÷¿xß±H„"£60ûOMò‘÷,±ÿÑvòû-G†ÖÏžŠJbõí/b‰$¼ )"½öb}Û‡oŸ{“ýÕ7ªÚH’²d6ùİúЋÓÈúOæ?õåzûGŽ‹ÈF‰l¹¬Yøè‡¡ÊUÀæ_¯&®|€|êÃóe@âo¼ìpð€€ *’õ\¦î{Ò¿—Ýò’¹ˆ‚ Š=z èw?'V7¾ø(¿ê2›01kAˆ*Mì`ú îÇÄeK—XÉ¢JÀÅ¢é`Úìs‘AHª*$šU+²-Öª¶µœ‹Š[:C“5Ѩ\b³µÒ!²€¨0ö)©f-´- F1¢C0Ä2  / £ b¢ÖVÆÒ$ªkÈRŸ4DRLŒ6F\µä$I(ë%c!ÊÀÔk@)ò‘M‡u—kî˜fę,S„@â].L`0j6¡A]±‡±ÕaTJÀ0"@.jT‘AÀÇØB;ŒlUª¡°MÂÀ•ö €Ê;‰ñµfg“†r_Û¨ÈÅ`ÛYѨ%wÆ (ƒC¯Àc/AcØy‡"BÄ A\Ô¬h"F¿Ð #¢î' $nˆœ Õ-jQÁ¥Ì3-Å”8‰RÎGˆ"MŒÁfŸ(BH3/:"FdÓÚ‚tÓˆ9’Ž š¤BRFe14 ÒÄçMФçlV&¸Ã ²L*7Ù”€Px¾f@F !£4JÄHdúJ‰D$ˆˆbŠÈ*EVZ`H 0k„û)¸W¯ú)_|e?‰HÂWþmµ® J­ÊdåM¿ /q ¬øËº¸V0 @ùžªŒ/ÇÍÇ¿<âIså«Bó°w¯ëhP|úǃ³_3ÉŸ»Â/7òÀ—­ï¸y,"¤ŒÞ–ȳ^ÚË-´^þàä·_\œûûI?_D8ô‚´û†g—~çÆ•¹JbÝ.ßøGý¦Ç´â8í¼{Ùí6ð¯â÷?<˜/ßÿ¾¯oYÖO½¸»y2MBÓÝÓ‡{/|éãÛw^yŸ~‰ÛÕ±¹ŠhbﺯìßþÛràØhÄHbÙîýÁ«¦¥bă{D€Í³/N„hÿ7÷"ñ®·êuOyÎÁŸÿatàííéKw𫾳¤ž>Uþú{«Ï|´ÁvÿûÍåÆ¿u'niÊe S5±ikl€R§ÚÇÅŸÜU?äÑݾˆ®þEUkj‹7Ñ·¬WêKq­È`&n>+®)Ëöýf¨k/=kqÛ÷†rÑyöWwÆuvnhѵÊ¥Ææ õcåä[ï=ðŧ¥ëX'®¢L!æ ¿] &E æóͱ›Ki“Úý„ùB™Võg)cço†“s <4…c÷ÔéÉí¼{[qð‚-+wŒc$Øó_Ý^î<×î¤Cuï<õÎ[b¤îò_Æng½ýØœVÊë,ÊŽ.çǶ˜ź5ŽB 1Ókµ$Ý´?¾»ºq*eF•ÊqTŽ‘DÔ &“ ó°›¨²ôØKÂÐEaʸþ*oV!š@ZÃÿ%qèÜJµ5 SÅZˆ ˆ*gpnu•‹q*bQƒªH@€¹jÔÒdRÛA‚#¨l?-v¦Ã|ó†ñxµrBÇ÷ª‰¤ŒˆJ“ Åb¬V;#é;õ]ŠãÒE Œ+ª¡íyÝèÀud¨—öÑ«¥¥¶ëm;E¥Ùºi?—s¢WV”0àî ;¹•Ú­ËËñ} N8Ù7¢ý7-òsÏT™®41 ~óÛ¥ªtè YW¬]{C‰ÄBYP”:ë[¶aêšc¥]ÀíÏÙºíèMÍÚU´õÙ÷ýa錋6ýö=ñÔ‹Uhñçמÿ¬v–€éŸùônÒŠB1!ÕhŸV?¾>´ Þ§w׌< "“ èÈ °aó²VI ¿¾vÕòØ]Þðïó»ß²ŽîÁó_²Áä¾ùÑê1D%`^û,ýçOhzwkÇ Aˆ$G•U©Rñ¢“âmo+Å»‰3_“å\¿¢˜l3§m¬€×jøËcõæ+ºÉw~5zú ›}Ÿ¸£”›ïµYw̱´¿%›Ï‘êE¯nDÃÒì<í ÍŸÜ‘IaÜøîxæEãÓ2cšL€D@”1ÃåÔçOânªùæX›mº-­BÂ2ó½ìÂ<ŽL½h½üò¦Õ-/\wßçA8‹f_q_|t48 ÿ €IP@ô B4Êš¤xA«PÕžÀºF ¢ÒˆQ"ˆû¦• 1œ@(ë#Qw¦²š•/:WŠ¢&V1Œ›’FL‹ÙåQJ[í´ŠA"i%J"Š5 EDAÒTJ©ÒHT¸Q¥ÏÃhUÈ0G`‚V{RÕu MAÜôž” f‚ÆZ´-L‘J#ä¬"¯ƒcÄîÙ7€ "£66WB…M²>eØptK¥¸nhjÑhap¸òÔî(å”!£gz Fã[Hkt ͈0Hˆ^eͬ¼bD À„¦é%O©nb¥É|9i ˆ×¦£× vëʨ¹ÚÜKIæ×êÈ‚Ìëic5`=,A&3%5§˜t˜Î+ 6¾!ju`œ!2‰™fòƒphĈI­3LœRclw#Mlš‘ñw´³Å¢t@€˜ÕܸçÖŽ†úÄœ¼žÿÑ‘¡ÛnïßïY@K›ô‰ÛŠ,… ­™N# ¸$ ê¸GÚÕ÷ÝE§žÚFo DˆuÇ/®R›7Á“bZ O?aƒßsŸ|ÉÄÝ?/yˆ¨êtsçÑV `5ü/1§¬ú3º 7=`\Ý:’íi—uHŠ0’ê( [7gö‚ ˜mÛƒvqOÕ ”×O&GD¢#‹{—ÖvTdz´OñyÇM/=­‡˜`6œä àqŽXTö´ì§ûÞLÎã…£{òínqÈQ ÍÞ¦oì¯ßjƒ ÕêÚ­ÍPotQ‰[qÄ"%Rµ´F.´6t$UŠò$ÝjÒ¼ axTÍÎõ}ì%2Z'­e2¢¸¸æìhQŽE0mSjâÁw*™[J’! õÕ°>Ð0ñÊ|ð ·’4Mz.KŒ4ÊB“ȸŠ++)¶ÁC1T ª“êÚ7•p¨³8ö”2Ý5- "+DÑ‘AzS:™Ÿ°‰À“´%EñÜŒÔÄŽ25]Ü™È0xá€Á z ˆÀœQµÒ^šà¨j5°ã(gF ½µRº6"×±Ñ(HÊ@­ÉF68Z`í= 6>²ö€¢ ìŠU£I‡†MÂqЀ¯¹TH"êÕ S-uÌÕ¸$A_Wó¢¼d¥2RDŠä9°ª“fŒ–A!ÄÑT¢‹Ø8n|ÓRÆBÙˆfU'™/;À ¬†ÿŸ¨Ó75Áê*cÖúç›_{/¾çœ,Í Ž °\p’¾ý\ûÕ-{öûϱ,Õ ŸºA’G¸æ:B!ä°öº«áŠ7›6YõOnõëÿq4o§ê«&ùÒËV§?¶K§ŽRl‹ÐF»ºäè¯_1m¼dØ*>ûÉbÛ•;ʾ¦æ*søö²Ïõ´-ôø]?7žÑq¤®~×} (7þý[Žù;Ÿœ€‰¥'l3,¨~ šW¼löü¯!®ÇðŠÿø|n , ÀAÂÈÄÀ ˜èüøóo*œ„·* l^ý7mˆpä£×.y>©üN×´pë—I1ÖIð K]Á¾wÞ:õ/;|Ë×wþË ŽQ¿è5„ZQW“æúî×Ü×ÿÈ©­ç?£ yr &Åa ‹‰,v®¬š¯>o#¶>vÞWBã€ßúãðÜo´óŽž~OÝ´ÚŽ$W¼nô«.$6½é}" ïz§zÔ;6Wlêwÿ¨yÒ?lj)×¾^@"‡ß÷'÷â—èó¿;7øÔ½Ås_ÑÚÿêý¾ˆòÐW¥“ë2¬TP*4ïÿÃð)_Qíé°ˆ±å AD=öE½Åßî8âïŸ3¯iÇ?>}ôà7M7…„¯ü0ÙyEÊ>i¾ÿ½Â$ùê»þÒ ³>aâò—×|viíµ@Oú¨:asè¿•vuÕ=Ÿ¸Å¼÷ îûÈ¢ÜYùÏî…¿]^þØÚ½ðÊ©é~¼Þ=F %TÆ®»ïcûÜÓžÝb ‚BZÕ ‚Â4hBÈØ“o§Àš´X…‚Jƒ «^CB*è¶bgÔ # 'A@@™„C‰bLS¥ 3ßd—Sd¥ÁŒ’®ÕJõòи( L'K)„¤£Àe-—%V ë€À1A‹bœs h6),爂Q‘sy ˜¤ ³,Ï ¨ ‰›LZ*@‹¸%u`!bvi$!QY›Lðˆ€,á¿a+O»6‚ , ´Z¤Jq ÝH&‚F? .P'S>”Á1*ßë ÕÁ³ÁL·@  ­h$# <‘4ØFšŠTÔ1®WÊàf;¦Ö:3ij€¢‰&IÛ™ (ÐV*iD­Ò¨…4ÖM3rZç½qËŽRT¸oêÐÂI»Ô)êQˆ ËZ§6tR:ë#…=b±u½b@AD@ìß%›zDpG1Y·‰þ4_ò.F²ÂÉM]Ôv8md¥ý½.ÃÓ“á>þ.¥{ç´2­S¥ahV¯?¢VT£ž¿v>V›ÎïÞù»Ã|x±'Àã»0¹øš4öT“.üt‰Ï"@ €½æ%Þ5Wn>9A'‰?poZ¦Šˆ£¶®"ˆe«sÚú8k¹{Ê(„Л.ìÊáá}3‰€‘H¨ 4»SÕÝ5¸«ÕÞ–´+îÇ¥?õRðÙÆ¾Éjn¯%Qyº¡N ·WýÅm†ûkêµà¸,‘$qb”që ƒí}5n¯â¨G0Rªi϶BwÚ1c(²-…§Ö¶bñX#@¤Š<‹?Ô±³}ÉU/-=÷$SSV ÔU:ãÕêÌÄAD›“Î…QZ¸Œ&ïù¨ (Auj©›ÙvƒPÇÀŒ¢r4ý2Öª‚¡†)„V»îWÍÑZµ]QÖIã â¸\^Õ:”G(›Î2C+ iËZ…Tú²V–Rtè´Ô‹Ú´T:Ñm\ƒHª”ÈÄâkB5OÒ|‚#¡#€M=¹n âÚ¢Ú7b… UTmI›P° ¾–¶+GÃ¥R(’RœR¹c¬Y­8Edã(LyíÖDpm]I­:Ž h(š†”ŒÏmÔ"̺Wwì¨)×AÅQêÑ”M• “ «UÁ°^Ó’æÄ@¦€¼p˜a³V4Æ9Š0"NYH•hÛá¡6,!W AcêÆ.FÐ2Î!XÑp?Ê€@°þðoëmÎÁ8ç¾þÓ¥ÑT®$š@àVǬZyvÖûFvZé']Ô°³vCÖü×çŸöÆÌYE‹Kc««fC7­þá¨ûòÅ^©öè¦Ñ°×Ý’ÊÄ›ÏòD°öž6'Ïÿ;5.|ù©4}›³[Þ7×~ÃÖäe®=GF&kÕÌËžQoë¹WÌ7ÐÐIÝ`§ÿþ‰qت;»l >àÝÕ¸©“äS{ެVVéR~¬kþîáýþi©úú=î§7… _ÝA["°>þÅÊçonxñÔõߨgoïw )±ÈoúO¿óù¢âÏÝáà¸gMW´RÄ¬Ý B$ÐæL²îÛK'>i"\wsÆ“ZëŸöÀQë ¡ý¤Â\­Ô4udÏ …¿|Aêôá;›‡n?b—¹ýšñƒ«ÓGÚð¼G³G ^(öüh0ùœi<÷ï¹¹@ ¤ Û¤¢ñþfîå¦kœêq¹íáÝÌk¨Š@,ê6O^‰­ór2<~DK nݯþШV†·Žw°Íy½pQšU÷ܳ¶5NÜÚܱá¸~ëÄ}«|^‰ÇŽEÑUomÞëZ°¸å´¢37)ÇÀ»ö/wÏX>vŒ1¢IћΨ¹3‹ýaa!V‡£ÚÞNÖíXÙÑ1U›Àöq3¡±•¹è‰ÔlKÉ‚£b¹1¦ÞïDTÐnP‘=@tsY5±Âë ugœ–\襽0;r)5 ÒuUÜ’CŒ¼Và\…GÞßQ6hÐÙ¦ž<´”£0Á@å Ñ‹Ëò)pNÁºŒ½©­«W——§¦Á@#~=®Í´!˜ÆB ¨7vÆ07Ú»lÝÊþŠë˜dmò¢Œne€ðHƆ° I±)K7,˜õ§éVŽmblXVŒ/û­v[§§ž<ªlfPaâ]ht†¸eÔÅ'¿7ŒÄ¬ Ž˜€=¾ÿî?¶xß}Øõk –ÐuwyÇáåóŸÐÝx½Kþpl1q«ïûE8åAë *>u( l~Ò4)¯FÃU&Fd€ÉÇ—~û[‹g>¬5÷é?—@pðÁíÙ'G~ç×ÝÃÞÑ[xÃÍ…D`™ÿr èé=Ù¶¶^&w]v¯SŽ!¨ú¬—.4œÆX„ê_õΛ¡3ÏŒ¿|ÏA «=CN‰¿ú*!bøo8%÷m ‚ß@ÀÝoÙd}0–š=¯=}$ˆaé}·@iXÿö s5úõ[æ'?x†ýÆë×Jቷœ§~öòµäç—_üú8 Øw>±ùÄ¿–¸rsï2)¿ôÚáW®7Dk¿}ÕÑ?:ÃûæH$ÆÖâBù—KiLJN­¿óÙ£÷\ ë¿p:?ó™¬È‡E?þ µ|Ù`Ä-ŸÝa[ä¢*Ö^|sD@l\”/}|5 $Õ—¿®ÎùH‡{(?´¼ó·4—ký¤wô­"Jqûì_¯ê.ˆX‰V ¢´$T1i±EÆQãט„Àwà¿ETF·Ýš1Á(\Màl¹=ú“csÿ¶ÎþfÉqˆÞ!0Æ_ëtž0ÙÚ¢XÙÎ /Ù3¸ãÚÑô#¦}Â~ÿUã4úáUý³ÏL…êä ;Š µQ íèñ„V”öÇSNoLêC7Œÿ´Ê1B2õ åó;cuf2¾g¿G¡¤f •¯OÑCO+G}zbתÆØöÍËùy›&yË“ï«n^D©{&'šÜ`Îb.ï9Мr\ºá¡w&wìÏ~¶/ ¥Ó'­äù]Ë+§LŒÉÎNµiW³ýžÛÉ¡ZØ8½ynQªS´3„Ù,צ:zH&ìvÒRÔ^Dâ¨j9έ­¬M531MËF@ˆëX·çQA8´ÏIÞÒÊ8™tq©gÝ zŒbz’ÐôºÆùÖ¸@`X˜žk÷ê~ÞÖÁ¹Q7å 1hAAˆ„7Ëh4PjÆû«èuTbm Všé¤¸:¹8ŒŒA‹°¢ „ˆE¥†Ku*1V’åþ££…& ·ßTŒÃËîŽDØ"[èzé+êáq©š˜³'žûö ÆÖ™çw#»Ýüé=õœ¥x|àîpþêö›FA\’fåÖ£ŽA_XéÕÞÑ nXÝä¯ùí¨‡ÔS¬V‘R”i»uK¬&£Voýþrô *Ktù›_¢˜‰ ¼ÒÒÊû 66øÏQ͈µˆDëÈ +Í.^ûÃ¥ˆpâ{·DTn׾ ¶Š@A”eAÁ{î3'^8Q rä¡yà¹ÃïÝQžøÌ $ß»¾ Q£o yÍ©QI²ùy¡l)o ÖÏ|¬ÌIQH‚IxVÕî»Ñ÷¿¶Zz„ áÉ÷²ž1^ý÷Á’8@‘}ÿ†Ù¦mr,Àñ¯ŸÑ:ñV—7}f¿~çÎF9={i5|ë2gyà9oõ;qé­÷†—¾„w¾®Üó¯Ü(€° þ¢SWé[?¥KŸ‡]®“i±9§¸åíË lžð¶Î;RxŸ<ôuzfZ­TϽt¢?cë’q×KÖOíÐe‚ B t&ºšûÀ½é¥wÂD3$#(djÇk~1/èÖŽó¤ófÃ͉&öƒÆ?µÂà!IÓÿ\ýí95fÎ2Åø»Jw_0^‘€YùÒÁµ—^h% híµ„D’CLÀšˆX µ–ó(^i–” €2Á¢ˆB‹>ŠÕ¢Lj¨ nlR–cMÙ0êLƒ!ê\#%-OS]ÐÔnMh­l'ƒ& ê ç„Œ´ÜKVNözªoB$DÌ”D •6‚‰ 0CÐVlr[f!r ¨ÁÊŒî’T9ÅP‹qeU  ¡1€R¥Æ¾)X"“F PÖ,ŠÐ5n>†è~¶•5÷q ‚Yi“7–I<7ºI¼ã¯°U0V33-ˆ¥ dÀªa¦SÇŽ£b¶!ÄZ%µ€jµ‘Yô܍Р€Y»]Ú^]7ñèÀ‚ŠÁ! ˜òãÖ%ÚéhaqìãD[ÖÝnwÛ­U] c‡ôú­˜uô‘q¬éãf\GR‚Ec'§fÊÕ%•¬_× 1ê"Û -¯Û:+ <“‚S»Ы”Úxö$é‚Жó§%Ðh I7AÇêÀ ‡ûís(mÒÔbÒ (TÜ\ó_eA}æZ\¥ÈÑ¯Û ×o.Jd½ë‰Ù­ï\äjÕØ#ið¸wŸõÂiÓ"ÏÊ_ûéU9ãZhƒe÷Sî¾Ãnýv+,pÂ|³¸(jKÚ.n º4§÷t¾µŠ$Ñ Ï#­Ìy½!Z×ÃUïÍ)CÆÜ;ÎÒÄñÃM#„d*Û¼hô¦i"†ZG—mlf@ç[‹lè|ã¸$»ÉPI«ÛÐôtè¤ÑÛ_4}iåÁZÅmm{Æ6Ž!³éTG¯ÎΔˆÜC$\ò¨³²‡‚˜dÙh~8ÑÉY1Aç…)¨ˆR Õ€A%iãJuš*Œ&ƒÒ ˜”…ž—Ú’q~éÈØ ÄXsÄÐHÛÕAÁ6ÍÊ pXšâÑH\5h±/>XÖX]M¹3a­,(Nªë¨„ò€MYc|m®ëÁ4 ˜zŰU¥rc¸·²"D  A“ÔBdô¨oŠ`˜hYPb€© PÖŽ;Ã5Ð8Ô`ìXHZ(6 ]  °ZÎáX;à$¤ "êÚ7žU ­œOÄ©¢ ()C@U92Ä~BÉ+ÑU(•h§„MmðèD)0»¾€ Ö8„ŒŠ<³n¯ØÁÛ¯ ®î˜ýP@ký_?ßyç)I‡di ?|ŠMÒ˜)X÷¡ÓÒTѶ•‘)üç•«Žu˜MÇi‚žk.˜hæ§„O^9~Ü˜Š£€˜~ý{¥¼O.»¤wÝûçäç§v* >÷<®½¨Q{QPRK§—>~âæWscd¼õ™¨ßô,ûàseßûo˯¯5¡r,ˆ(¼÷¹V¹’u%ÂP4h5xÓíÅ ¾‹y¤ÆÿìÉÅCÞ=EA¯}æËc™üØé泟o¿rçÒ{~×<ù²|ñ·Ç??U†Ã§Þ"Á‹ ,LÉ«?Ú¯t5~ßÍÕ ÿf"Æ:~íá9ŸKî~óR Aýý¥ý‡ž±œoÎø;Y8íƒ[Â{‹áþa¸å-øÎçGOzźmŸ^Š»¦Içäí~X1ÉÊe@/zA––Ñ}ì‹ô7§î}·…5¯N~s§I‚¿÷ŸVvþKX FŸ8ÒV‘¾ò©´k"11BN"Úrc}` à~ûË…•òv¥ Ov¶ý]ÇDÕ÷‡Ê"ŒH…(Q¥-uì?VŒe“ýGÇ‚ÂÝ 3Ç!'p›^»Šß½Ý ãá%O9[Råz—,eF„û‘QuË)”ƒw›gæ E͇ºÓž¦¼.֖ƃX©ŽÍë¥ñììd±v(Ü»ÒooÛÆ³ [1¬Ï‚CŒGçbƒ¹‚ш—™;t[ÍHëOØ@âêÛï(ÒþFˆ L¤IÔ)Û¡Å.¤ÑÌFÛF[7H"Ñ#ÝùóÚ3¸?ƒ~@ç^M8ò  – b®=úÎ\Å‘”ˆ€X›[’œ8ØüÄj|óÝ5".ý€hÇ.‹LÛ_‘ØÄÔ ŽÚ¢5 B©ËÖ:·9µ‚NØæfÒÙåÕ±ÞYDÔå‚ã4±P'.„Ííͳ½„êÂ;Äî”],¼êÛé,ä£ÕåFcI1N ÆËé5‘9‹à„Y/Ǿiì†-8Z«`CÚ$6SYywoZ÷±êíœwaPå³:™)zóIÚjµajØï´²ÕƒM«×ÊÆ qO…‰Äd"-øÀ„ngœMé Òå•bª¨Ú)5eSùHÆtƒUY«kØ{ÔŠC¡lÝÀ/Ò®¯§Úö-¡tª¨u¯“ÒcärTS6ZY œ(ƒuôÀ¤i,= 0Å^{­QDN›&o ”Á¤;lÕ#èN}-eÇH5Ÿ†z%:ì ÍŒ, Œ˜'m_éѳ<ëkªCJÖ·%¨c¤&h‚¬Æ±ËG0Îmbx&¯ ˜ÊEcHF¹61ˆ ˜0*#A¤Zé6i‚ÂD fyÛ=&l¡Pí¶öâ5rLjï´ÑTjÚ!Š(‘l†‰2 17U_ˆÖÇZ¼bdÖç%*”ÈÊj¯_YŽÀ TÉQüÈ`'6£ÓSS³YÁš £Ú0#à 6—Òh0GÔð?¢è!®ÜŒ®~a©õDHOS œbÒnùÚ qæuÓæ–¯/œú÷Y3rxÞƒZú;ËÝ— ÆéKÅ ß<óQzÝ‹å*~â£Ê Ï>ºn#WüÁÚ‰Ïë”×^3¾f…Is‚¿|2™~ùlóø­e|w߯ø¶Jný²é?s#îýS}{ÕcoÈ÷\=à ·¥gN&hÕ÷ßvxËc»ÕŸoÚG¥÷ü©0÷Íɉu–õƒmrfrbܽ#ã6®“{lHlF2ÝØ1ýI?>5 …©P­Aplt7)FŽPDÍ©'$·ÆI 莊e j±u¤B”" ¬±£½hײZ-&ˆl¦bã*16Z Æ9%ÞÈ`ÌVŸ€„û©³3Àd¼ܱzçµoºþ^õw§wRÖk“è´oÜ0ï(ÜuֺĹ"Kƒl=ì¬pÓÍþøGN'‰þâk‚ /9 œæÿ~y楻TJè“ b&‘›»~3Œ$³£&^ÿóñʳz“>ùYvß·nÛðäu=!ÌOwýÓ]áô‡·[†…«þ4>K²öÓšŽiV~óýꆇÏþë‡kÌM”½ûhö’vzúéÁ·øºëš ¸¿™~Ôºæß]e‘‰çïj¥Þ_½wÔù»3së|»TÊã/|üð ôð“7È›ßÿîþ¹ÎÿÙÝ–L,pþâCâk”¿è¯ÙÄjÿ¡•òÛß4È Èæ —Ø[VoŽɳ/±×/ßV2Àß<=ûÿîß|ù‰vÆš2b“Â_ÞpdÓ'¦:žSÞôæ#[®œÐ"¨Y`äÔpì5ˆ,ðó_ ËçhÝÇOòŸü&G ‚*–Ùïß>×úàù p„Šz—+—@<ùCQ¼K²4õì›·ý^ð…îuo<ªßûóÀ ÂMº›ßöwÓ«ömÿäqÔî'ïZÚrånû·/ª4òÑ÷þÞ}÷;ºÿÉ×4Ÿúá"³ >æÿüW­4—Ðpëͯ|Ù’~÷SC=V¯ü…Á“>¹K} *§M»@ïxkyõÒ©Ä¿üÕÜåw¹ÔÔY°ÑCŽ:‚¯4æ/Ë×Þü‡ú5 GQQ ß×­>ôãjÕÐC~2¾õòÆœÿÙN3öeÏêÖ:1YÔúº—.á;ž­Ûp?ð?èÈv,&4 È*˦3Ó~Þˆx­-c ÐÙ°ìP1B™¶&²;ލ] L-J-jV1bZiiAé1e/>V( ¡L”j"*‰ @82¡Ž5*ˬD¨eˆ•fÝ 9æ˜Öìƒ&^Úù…mNåB$ÐMÀh­Yˆ(F „I01‰2JSi[§Fb rÔZFh"(Û,± R&•UÓ(#׌bp*™¶i P!EØ~›@€•1›-¨ÔîÒ”V` uÆ&:1€:T1!²´©MèÅq%¦"&À‚ "Iš BA„×FÂYšX€D‚,ØÚC'(V¬Tfe;,Œ&(Q½™½¨´ð‘½×”¸¤µì‰ÛÀ†¢ô2  ¶°%%‹ZϤjwtêÑhÕJP8“ÏG#ŽÂH+Ri®±B0¥Ý5Ê ¡«82ÜÏõêö£FŽ*"TJ, ȳ†ÀB&më )-mý˜™a­é‡!Ŧ›uY¥™WÎúÁ¸ÆˆhŒpùm7á Ÿž““©7Œ.ï»7øËÚ×Ñ:ý-*üàÝ|ÙÙöìW/,|é<å”þv¬-TM-Â6MŸvúÒÂ?Gm.xSuÕUKoЯޥÎ|ý¸ûݹجeOjÇÔà£Øóß|tá{kÊÕÉcvÏO|ÿžxÚ}åÚÑ»<±ÌRð£;UnôÑßA³ÚÿŸÇ:³--Ëìt{ùÒ ×6);·;{ßo¨RñëªgÜë Ã}7¬ ¿6[ütÉ£ P¦DEç¢ûR/ÿ«»{ö•Y]ÃŒ…<•ôÑ» ½ÊýqÑ?¸:ž·<¸ëè¯Ùèqó­ÍhíÆ¥ùݧ-ß°?LŸ3ãÀ'S¿ 7ý¥H·7un‡B€„²™mÚì¯.¸.ì½kpïä9þ"­S õOþÜïqÑœ°~ݑÎäóäLH×2¬ßÍ!fhmH¶tóô„öBÄ-ÝöñoÜ»²c¿4[¶G¿ºº²&f×–þðÎU‘NØdÆqË6™¸CýyÕóžk21é=×añÖâÚûóh©Üq¬†ÃegÓ¬2è«Îv(9n†CãÛ–™8ø•í¬‚çcÎOt•=.º0¯´ ë`ì¯VqsË«j5æV»èóú–vkc¹Ë¯¯ŒZWQ|;pTסc¦7¢Ÿ6h3Quhè¡ÓS¶“ã f¡×¯°.›íWíÂ'JÊ~¢¡–@ZÙ‚e Z\"wÝ÷¬ZÊžvúøk×-;†pµœÞÌ\?{‹™oÚÉnñwÇìÅu¤F±0¨YŒ¨ßZÿð›+,Øý«³býßÜD“1»wwnodINylî4€8eGq:¸óÄÑÞÏÝ;õœÝüõŸ§ÐNI*®­÷¤àö»Iò^Èy·ðã½Ûž¦¯að3Û{÷Ùþâ96΂œzéÄð]w8²ra{ú±DÐÕ÷Gÿ â#¢ Þ ™Ê×~DÝ3N`!0ÚÄ*KŸÖ¾öëq餸ºR(ðWç¶•±þ·?*úòv6‘6¿üÜʉ¯Ë]uXÎÿÛ‰CüñãÊo}éîödÈÒŠ…ï·ýÅk£ïþyôÏ—Ô7lnê5Sù–~S‰šû¼m£ƒ>7]üê÷ŒWª†4ÍdHªýœóèGß{"Pv½`ýt?4«…€HzéIæ®Ï=éÍ÷ÿR½x¦»çó{NôKÖŻ߿(Þ%/}j¿qyþœÒ­—†‘¿õKÖF —YýÇt¸”æ6æ´çþÕØ—<1𦗮JIÅô­7-ßZ)&…Žb•xÐzîó{Ý‹D»_R×·ÿt5M¢³ ÏxX­|±’ÿsûÝ]•ò¢ xÓß ²–ÀÞŸ ²gšù_ƒ-(®o¼¹¼±ä…ÿ˜ÄÙgºó@ FuúÙrìWµ9÷,üÅ=\ˆµdÇÎ0­ªêªGL ¢Jv‹æñºÿÂv‚îÇ Ìœ»ìO@@´\kLiìûØT`aÜDá£Ö ”!Ï¸Ò UZubÓô¡ökž:V£Ž©ó AB·K€HÂ$aŒYkJ‡º}¤ HLzƒuF'=IM©]ÙP·O]@ImÀ’1JP‚ F‚ T¡à–H'Ýv?sëºi=jzcbá"bʦfkM¯c‹ Y£@Àž‰PZ•)`†&PV¡nOuÖ†!Bb°Ëº5^`©Phà+mVGóÅX6M2T×êdŸ²²uç¤véÒJꟴÅjª]N(L(ÖÒº;î8š@ãÕÁºu2 -â`Qšã6ï·Ãšv+­À›t°I:í¢»&+ëqûù³FièX@€äô3âÕû—v<³rtÄ–]¹ñhÚn¸rð³˜Á#ž´­ùóÝC„ÃG@ :Pß‹¨Y°¹õ\£=AzÖ°Ã~üv"‰Ó7†mS©rÏïäá3ë7¹ÁÿÔ+aÌŸñH®ýÖ¼zìIææÏûÀ³elj`°æŸ}Ó=øå{ÿXGë¯þaLQ?´ý=½ÛrM} Ì.}”ünß^û48Wˆ“ä’'Õ”8“ºü™O2(uÉ£Ÿüb ÌÇ×›¤lÎù·È]„ s ÿƒ ˜²é.Ç÷c;† Ù pX<¬€ÕÍKf|¤3B+-¬ôBºÌI®šÔÜr!t“°ÖÀò±\Ö™Z8‘Ã0eL7·µ5ÇݰZˆä`&ÀNâ•#*‡ååÀ. nšÁ&RFà݈eœäIS¢€7š² CÀÖL‚"hͤM 8]Å5NMåmcÇã 0Œ€Q ‰f¯¢é¤dLk¸Šjh¤eŒžì,T†9ŠÕ /ÅÒb;×1ЍQ…ìÃèî2%Ú¸qË“gÝ€°s±qìPd¸œ¶3%¬U‹&šDÊqH´P@C†HIÖTÞÓ:@ ¡Ô¹ h툥.ífµÄ¤ƒ¡Y ioNxP$^+A‘èB¬ÜŠ!…AQ!@D†@È,^@ëQËS‚® h)«¹å°²Êy@TÁ7‰âHm¤H âJȇD…Ð` "ˆM®(Yó„`¥ßGo™"A`a%¡n²&­Åðj•M RZ˜bAQb¥d-ѳâ$bDc€£JÀÛÖUÐQk` ÿƒà~ë¿0°íÜ •N¢¼#U—"¡™ŸTðŸ `ÅÿÑ(DÛ>¿~ô–?Œ}àý«ID=õ{¸|ÙÝk¯"õ¼¯$¿òþ«šg]®]ï}gÌè>üéw…úÙ—uHäàó…P±Ôê'=®I|Tm?òõñYÚ¸ûKÞÿðãË š œ°k˜À6æq­–.¿§ó¦+²Ÿ<}°émÇ >ô‡qådß?ßY2éº ÈØ}Ý…m€¸òÑ’w>AûJºïÛݙȩ7±ÄÐ4 þä7vâcÇ7ǨY¦Þ}BüüOõ¸½ø†»ŠQ UŒËŸüE󨥹wrKµ®½ï½w–E{Á–Õ÷Þ„¢[‹B ¨+¿ø\±<è#_䇿µ×ÚÒvßýÅ¡ùU¿ñuÇã~ì~sCØòâç¥'u´«ñy+ÔÉ®®zÌà} ‡^]L¾s§?ZDˆJ:/:âºñþSÿžnyâ?twý•_´v¼›GŸ¸ 8(Ùõ7Å㯬ãL-ß¼jôÐÇlÐ`Âw®Y¸àÉ…þó×£aøöÕbƒ-˜ýß>b2Àrý«0}ä¹ÅCÉ\ÿ•]76^óÝ_?O?eB÷~¥¨?ö#ýÈGiÃ>|ëªüÎ¥À-®}u)4i³î•ã3&õÚ„VYªM ~1"Mü5m87±7¬’ûù [S;gÇ»þvéüiCPcÅb䪻 ëÖv?f ÷Þ~¬óTÞwµ×šL“ã «áÛUeHÃÿC™èá¿ÅP4™ @ÀèQGlTW¹Á#Œ ‚7f]²"7ˆi±¯§€ØqÚE?î``ir°T'q#ÛÉbð(ë¨Æ 22E&‚–k9««aồ žAP”·H,c‘˜ƒŒÑ¨Ð­\C~2QE=2])lÉ+ÁŒ€¤ÖMë4m:=ç–ÆZÎæÔ6ÂÀNIr\:rž TùŽÖ*0@g#$D›Ä/¹ªRábÍëÚÕÒ¢wÈÚ¢^^¨DH¶ÍB¹\C ˆ‘Tlç–| àð– I»öK7¯„’ãw›Òf\@ºî$ÓåÈì4¡ÚÐŒHYtvýºÌ± âïØ7ì%Ö¨¼Dï!ZDYÐìöõõ¦{`u•Ò ƒûʱ€©C¸ézxÌ)iÕqúÇžv_œ'"Õ´R'^Øtá–_‚ŠAäÞ½„¬ íù«—®Ví—íHSëç¯YòžA\zð¿Vù1ç xÍ÷›pË­¦÷ ÉN¦ÂµJ±g`¢àè–o.1þó%œJ"PK Úð×í~@ðª“0\u->ð¶Õ‚äáç×SQ¼Dm½áÕOü¹A=‚Ÿùqý¸¿ùù^†(ÂÞ·­¨é$m4€†û‰ü·¦ôÅQ@\÷­9AV&‚M4kœêŽMg’T(=‰æ¦5˜/ ¥Z‹]ítÌ€­Õ“š" ©]šBMYÞJq4 ¨ÖŒ­R P:cb`ªÍFEzIŠu°’PÐ&Ú¦ZªB$ZOéÅ”™îö‰&Xs4<®ÔJ•©4ÜþÛè³®òÜ ~é–Áž%åA=ö£µÛ¸y¶zòée-Ý•¯®@ÔÉOÑæW£ò¦RÎzt¯SÓêäÜæÒ˜GBç(ÿã`uÎùË示ó´ &w¶ø¦Ÿ ù‚›~ÊÏ>Õùö± Œ3ío˜6Ù9j´d:Ð5•„@4Bÿq3«¿8ÆŒvý߬N­Ž9 êƒ×-ÆÝ»ÝÂÆk‡Þ•¬3‚M Š%}P¿µrÃZM¥:­#»UëÄÇèoÕñàåŸÖb¸vÁýa¡a’úš™‰þ#¬®û}þðx𔼰;}m$î¼ÛÁA}¤uçm^Ú?;I†‰ðÌ–¸Ëê¤Ojzf*hDÇVÍœy°I¥ gLÛ8?ÞÛr1Öº=¦Ù|Óæ ¿txœíÊãácÊ–âl$›ø˜³m6 - ÕaöÃÍÆY›“ãw-Lί,ÝØuì¦ ›Í 0ÀÚÁ5>2b Ú&uŠãAûpÔK97×Ú¦Õñ»V¦tðÇ`´:¸eG‘Sßê@snÅoŒkU4mÂá’Ä™VƒT»«zÍÝcß8‹*/ò˜X‰B ÂÔyùñ_~²{Ÿ>ÓÄn8ëÂŒŸûî(J|‘AÄáÇŒ~Ã뺤#æŠÿˆ˜ªè¯±|õÛŽÔQ¨Ó§­—ÿ…OŽÇ^쪿{j7EêoŸÚR‚‘¡mlý€³¡ÅXëpÛeû8° Q>Òéï\Ÿ¤è¿ú©jýw¾ìÖà%’"*œþìi11Þ3ToÄüoɪ,óüœg¹ß¿b>Ähÿþ9}mÀ'$ñöÆh naˆÒbv‰ܲiŒ_ú2òÑxp÷Û7¥¹O "Ê{Þ¯/ü¨9‡±ÿi¡ý‰-ñ›_\¹é¯4 ˜½¶{Ê7¸]ÝÊt@S–ß¿a;ÿax„MÚ鯎š³Þ6ÿR­üèo£:¤.(QþŸV´-0Šh $P’jd…‘ƒ‹Š #"hÄFETÑeÎf‚ò15>’2ÞT1íe³ ÑzÔ4ʤbbféÿ# /.=«Ca{­uÛ#{ïWÇg2I&îF „¤¸»—B+V¤¸÷B‹´@¡x±b¥¸ĈÍd’Éø¼óÚÞû‘ÛÖúéùzÎ]”-i*ª\( ÔŽI €tòÉLFYªsÖZdT™±p¢B/Ä۱:dgl†Z(Nˆe–$S@ÖƒÌh€}Á ëÄH¬‹™~ëpI”([¥Úˆš#aÙ‚bT9ŒŽŠÐö.o‚vš2«ÜÌF«B@Èì™ô¼ÍäxÆ „Ê*D(—Õ4YT"g@ÖˆH9šh—H,A@H•>kM‰$“ruЃ²Y×P¸ªÄäJ 3!,03²= µM—=Hfѹ(¤! ’]ÔÄLeQhSLG$¡@E`‡3–}œƒ$U¹0¯¸µ*•µ·,¶XtM‚‚T°#hF³3–³V—­ÙŒ™sÌXÁ–#1ìN³ Pƒºzm¬3Õ#«ÐgáKráÙ*Ô™¸`mµ-Ò±I$Ÿ{)]iBe$‹þD²ÖI<åŒæ&ZpêŠ-ª0t°)Ë=cæ*Åé/~»véýç6?åÌd¤¿óÊ{ž”˜ùÎ.gÖJ'¬l|ÄÙæ.u2™ð.›êK-îùÕx5£zèi*xdÌg?biæê_t¿[ö@àY«HýyZñ” ÓT×ìΉuL/[Y?sË`îò Ë'1&éãUGü·—“ˆQ†€33]Îë—ÎHÕG:ùî‡ÏE·å^Ûíwt,C˧Üiç Ðü&)]ÙrN­|“6ŸÚP2”Zθ­³Qe+ZhÝ‚°òà÷"Û›Û'IçèÔš—î˜^;Éáºáúä8GÆ$œä¦°§JIÍl+±¹ O¥˜œ‰Ëí½«yÀ£ï^‰¢ ‚ÝÚïpAm_Ž™9¯õÀ‚z·-*ÓAö#ÉÅ…RPØ·"Õê|ê×zÉÄi}míÀ\=n“ ¬]ëA§Ú¯T›±nÚ´3;h/,.†$3£bªÊË.rBd^E5çíºõ2›-2ëù¥`ʺåI‰;µRµ§ìÐÙ,™4&lV0‚é»;ŽôaÍÎÉG;% € ºKÓ\ÐÈkO†p ¼ÖÉ( ‹P!›"²äª±qnMJÉ cŠHµ*eëzŽ.‚$ÈJ+H‰'jif@¬-“D µÌ?àîŒC Œ£§JSp9ͨ0§Ð¢Té›ßê'÷èëûÞƒìÔXSØÇ§>—Ý,VÌ,ºd\xÖ1]ÙÏ>'paàWïZ‰«3w€Q>Xêw>·?úê[BLˆžs}¸øtaCÐ~l_*€¥tÙy¹®eîÙã\U¨“;ø7ø6%$ÁhÊæ|_S•PÕOy\¯Æ<ËùÔJ'Bl”»ÓYÑÊNÕ}þk«÷²N‡¿zD$€’eúõ/¯Þé9MÚl”NLh%A²¿ç—Ñh5^OêYwÃmF|ǵݑˆ?ü•œúÒÒl7èbÞñÚiûå/æ¤Â™o>Ùe¥²*M©0½áeÇ3Øêê8ò°K­(#Òßÿ’vv¶ÞôüeÌìÿøI.{L±}Áˆ ße&XÊxZ© Çcïühà3Ÿ'Í?Ü6åc½Ñ>üüÝo¯žø´müÏHJ¡d³øœ•é‘wNm‡£?ôxç{ϾtSû¢»*~ãs'ö2ÂFE@‚=o¬6ÿíV¼ÇÆ•áNmpòÒù3J`,WìˆáK‡Ãe÷Ë÷*Z•pð”;ü}‰« µ¿í;ëAiçðW ÿÌÜÂÍñu(‚\yÏ“&w)iô¨}úÊŽ÷Þ–B–»ÄR$Hu6hvòÛßuÝ=[{ºÎC¨Æ£©Et4ÚÌ9ˆrµ_5…;ÏzL‰¬@ø% €@t™F–}‰šRvY”x3æi’Îs±·*˜Ró¬…%ÑÈh$…@7)p(l2„"Œ'MÏÀ¹ñ3JÄT¬Q3Ãér11¡PrÙ¸v¨tod5g¢±X0¹™ÙL‰@!GH@¾mZ ŠLd¿âÁXM;PªY¢ºÒeÔ•Þ´ 2 $¬hS d±ó<^] ǃ.½ÃúdÝ ¢?a¸¾pú¢5 —I¸+“²M²¼ºÊ ÌâyÊ2t‡öõŒ8]W‹Õ‰8¨SÐvòX–š¬Ô‘µ‚áÂyK!êTžvFpË‘n¯‚,˜U-6ÏÏíJ©:-vlxëN—èÄ» ªJq¸a!«HÊ‚FÀpËÌ‚ ;7ùoÜ&ŒzÿêÇœÛÜé{<ÅFøéÕh¹µ%â%Øæ«Â(ÂúÜûÏ]ýýý°L¶sjç6Q1™cG}VbÈê:n:²Éœ}J.»Xœqªh¶ ¡¼Ûåüí­›ÇÞÃ(Ì*éB"™,KlðéiÆL €Ëß@a@&]ÇMO hT>á9QW-Mû¸á…Û(IY±ŽÙ¢Á„ä?þýpé?JŽ• Ã,¦Ï–Z[ps˜$‹¥2S¯®{Á2¾ùYŽI hø¿²Jkc«Ö"@R¶¢¢wƒ 0Y+3•.:±)f¬£Ävª'û³Ò‘t«,‹ä”Lµ‚iu Î s.2P•º®‘ èTB@”{¤G=#ÐZ(”KNjQÄÝ0DR ˆ ÆÄ> jB «‘³5µ²Æ4Ð tºõŒ6ƒ‰m»º×»ÈIùñ ÆÞje›Ø­&vV:ÕYêÃÔfLjz()Y¯2n‰Ñ‚¤.éU× ©ìd2%“²`žI¦(ª¨0“x£l† œÔÐ6™Ûik-6q%'+¤ˆSò »RƒŠ}Ìl™bË„ $"’Ê£òÀ¤ %Ǩ° ID%VPÃÿ‡IÉê_ý6?ëù5€ ô* @BuÓ oW½²Í@å8pø¹W…Œ<úÄ¥LFþí]k³ÿt&H4šÕ €/Ÿü@&ª-š¸Ð{£ë÷ßµò.Ÿûé܈öZò`‹¾á×¶ÏzFù‹7XxïùÅ_?–qGÉh×"3úkß|[7ðÔG •p>}ˆO¸[˜ßŽ‘`Vý ®Ë&u~E}øu7гŸš¿óù© §ŸøÙÁ‡=Ô|à‡íÞ ;çëòÒ?ýä(*ƒ˜ð©oQ{^´zÇyœH…>»£Ÿúáúe/™«^³2þÌ/Ú ÿb4wî€éŒw­Æ®ù÷Ô34°9‘ÍscÍg?ztÊé%‚E­òž÷ö/¸?÷ÌëŸøckO|ìã£3fò®m† ³N>ii?»g…X¥%üý»ÒÜskküÿ¾âSVq§¤”ÛòÌø.ç ŠMO½—¾¤&r?óc}Õ*“ª±Òƒ€ç=cZ’í¿z_}| €|é@g©¨Qвù©'9Û[ †™Eçñ—opŸb¯ýиºÇéüë¯Obé!W`öš1gj®~ã±böœa0ì*=ºV*¥"çð±Û¹Ó¡Šú,®Ç~ØiR˜½ž¼ÿ‡Ýã/äÔj«#K¡½N¸6­¼ówù野%°Ò”}ÿÁëÕÕ¤H(b..xëÔ,eÑð' R'e¹ —"˜É dzß×Öº¢D^JõBÖ‚–LU7ÈÊÀÍBc-Ñ`çG0"ÒL3UUÊ2ƒ!ÏÂVBÑšdlÇ}Z¡îR_´°B}ÈTª"+°=QvŒ1¢°jc»Â: `êtÍ¥… …[#maÐ(݈!bIõ:+iï}‚é²®lK\VÜ+W Kâà}ÈY€ ƒÉc9û¨E’ôØPò˜R–ŠHå¹¢µó3 Ǿ-CS—f-+¥J˜°K@6J¡tUÌ iñÌqZÛ÷)S €dÑÁ&ŒX¸†S¬01 ˆä¨zí¤ÏÂD)kM"elNb7Dô)wI­‰×¼(£B‰½2hÊ8Ë@ÈÐCå(PpÄ~Òƒ¤½¢¹Y£«LÖGA•rXî%HŽ> šŒY·‰5Ú6&ȳ GˆLRõ”0ù-.;L‘Êäuꂸ¥ã´-ŽÞ1MhrJšM ”Ë@J«@ëËtk; @”2“Å¥#ž„P û¾ÖIÏ_ÜÇP áÿbœý³-þR ŒY ª˜oþÑ ¯´³¼¾Ÿþ$œvù€˜¬APȧâÏ6.7UÒ7ß1¸øDuâë³G-ÅO»GáSÅ*‹3m.½ÑÑ/Å&± ¨ô«MWq¦”-‡fµ³¾8iiã°È)Âýx _Jk-ž´°N.blDÒúÑ A9£UÌER€FgÎ.ø–1Im…t–9%gîS ÚÆœMáÀ…Ð0YÅ2q¦‚3”¬dD›Œ)8«>ÆiQièKÐ,ü ±z&mAÁÿ@ˆùÐë® :oãÂ3›¥WýÂ?ø¢Yð)8!@•ª§1ç€û_p“}ý¶…+.Ÿ|þQ˜}YÉÔ³–øoÿ8ÝtÞ‹²—žß_ÿ’ÞjçšÍ¾—Ý"Ï=_ó¦WøÉ‡þ®I•³Yµ4A(0%‡llŠŸøj—X}íxâG7 HüÂ'Ú,8zïŽ`l{‹:𺟷³Æm}/î}Óß·9có5÷ÎËÑV*M ΨÃϾ!q¢{¿|¸þÚ߆÷£â µé•Éòù,'!΀*5ƒéÖU œK9|åƒÇ„Ù¼ù1ÃÇ<BiÛ·}§Ø«´8ä$ü‹_à¹ïs†²î„jll èôwd&ïýR·œ”"¸Èþ/?<ÈSŸ\¯¾â:Ž(âTolêºH¢GÙ£JìñWþ¼»òmÛÀ¤æå?X˃w]ꢲ?ý›#æmoµ3•5*{îïBVéÎÿ¸aø®F'/å"f4Z<]ó’}‰õ‰z¦²ÊK‘1“R‚L)Püà?¸û~eFÕ¶þû&A¬x¾Ì’ÂwÞ´–ôóžq¬2æ¹²P1ö¯ü ?éæº×í›2ÂÞ4¸ãEûò‹¿­êY)ÆOÿK#’7ôÜ…g>±qõ¶·5ë;çòM¯Ù-o¸OTš ÈñM/mÿóñ½yÑ«ôâ ˆ58DA›Æ ñ¢Wè\DÊꆗ.§W?´( hÈdàdes*áÿêµ8{² êñ4cU!L‰ ¬4`Рû.”^1Š„ØGV©½ÀN"™¨iR%3ðF/)–6J&]ÔY5ðbšbÉl!ˆÕ}€^DH€ gÅ&)¤%Å Èt%E£ôx°éÔÿî4£`޽*ñ0 JAˆE8#À`Ž6g`Fˆ¤-k.2 *$X¬t!c¨:]J"ªÄh0φÌ!†•Pè†1 1hÖ¬ƒCèbEŒŽí³ô¶PIi‰ì5:!F9ûÄ@Õ‚kfL‡@À]Œ¤ ’%aV‰s•êÖ%ß‹0I¹¨ÄZE*gŠR‹’ˆMŒ˜0&æz@HZc*Ý& ‡WCB¶ÝƲÚcg”°)ǹd¨m–¨8Í‹ä­.½ñVqÓ3åé«s½ÔZ@eXo`Åûc'Ö¸:¶S?ö0¬(IœÖ–#f\Ÿô¦¶Û€ÑlFŽ9O.[ 5aV¨¶n W¯µåö]…UQE¥Ù—8ö=m:{@UB¸û†Žz•¬‚ ÚŸï…ó/pÄ”H •æ1ºä gUñ<èÖ~ºÌ>ç^R¨Ä\Jh6ýÙmëË_“sΪæî¹™1Ç»Öä}»ÜiÛh!礒ß{põÌ ¬©¡t¹;~øxyÁ :¶9»Ó‹ *vÝ}2íù´unŽ<è.ÍGhT[o½`”N{¦2»@§Ìj%;ó´ed5s¢rà8Ý´´Úí„ ê\níÒ– œTVdÌ °y«™l8EŸ 9èÍ]È@§ÕV-l÷LÐ-eiIZ`c!·9^œXª…mÅv'0ÅÉ‘ÄÃúl{|Ÿž1ÍMl’hbA¡ÒIê‹Ö&˜¼Á@B{ žýñ¶åÅ~Gj ‘ –ˆ4k°¹B¸©°q ]g)!ª:æúîèšÑNå±íÒÜâ$ f”&V:$Õ$5¡ATØÏW˜kdÃUî9L{ÞTŽb £Çª ³:·H IKˆ˜f‚"#º*’¢•†¸f²"›|š“&(8lQ àBS[cÑdš÷ã¥qÆPe ׯÒ­ceb¡º”œ›ô]f3q4ŠYr!‘:›T=Bϱ°¢¸iö”퉆‘  óëï ÌežáÊDÕ˜B+`ñÚ£¿éÁ œ*‚ïeRÔIû©=áåOw‘bŒÜ¦zî`„\ê­›.ôˆ ÊZ¢"¶sÓÞ£ø´T1úÂà:zWÔ÷»{GPˆ(ŸsrCM¥'ó׋Òè’J Òo>¸NgŸH‘ê“^Y¡òÊ6ݧ¾›ïqy”NªG O‚ Q#)Y•QŠÇ>°CŸ'úXÅÙο÷W \rÖlù h†ª9óÃ16 𶃠ÀÀ¹åÈ:=û9 ö¾`·<÷E£hèÀÓwÃ3_ŠE…é=@y߬GáœáQ÷wYwkoÿfwÙ?/( ÑŠžbZöŠ2( ´9•Uˆ—|wR¢BA-À„‚ÐÆhÔ&"`Œ¨°ø[H>£2Ö‚¶‰L• l…ŠDEˆÚF@b§§­R0f Å™nfC‰ŠB–9±RŽÅUE™“!¸Æõ¬Õ܃S­š˜¥É¡p)ÓeEA˜³M9tØ£dîÓ©34è”fa&0*4fìlÄH¥Hذ²$Xc‹ÈŠ¢§ «0ãrDjyÜ'­A÷È=gk¢Ö„¥·àuÇ ¼6ÓÄ¡’¸"¤5#ä©#Q×Í[Ħ0ÔQµÐ¢-û©hŒI´ˆ’0ž„Ø•e®À=4)Щ$gCa¤OI˜Œ§1#d n¹¯rqŠVeS*“Ç %JeÑ¥–ÕQBdb•ì”lÇJ(PE¦ Ò;£Q²‹HRC¦Ô×SâÀ“€¨K*#F®S"«^J$Ÿ †ìy˜µ@n}&!¥’RnZ É®ŒËÓ­‡Dš”A1ÖEò¢Y‹€OqÔôm’'¨"d0œ1&íP sÀ}È ÑÆ'Š‚SB—•Z›²#€Ùmýç³8+¨`0~ç¿ïÿFUŠ@bvˆ¥$`åw~z’]_l>dê´jøš7¬ÅÃQ3¢„`H§Àæçï‰ú-[€©Ðð‚ ÊuÈ$9%VL0µµ¨&¤˜§J˜Ôˆ¼ :iÂ,0iµ•^ä¶Œìb݇¤´ê™t®‰I8¯‚­gB奶(H/ÍØpÐ(¡Ÿ6½•ƒ)ZkE&k Ê„ŠùÜ%V^»”Çà ¹— É%-ÕZ0­h]jÄ#’Ф£ã£$Ž‚x“I“b4ÈQ"5FsaY…œª²T¤ª6«¡C侈¨J›{5œQ‚ˆ 0÷v®E'ãȺ¬ÍL¡€¹ï˜ìñHZmn‚IåêT…‰XæÉ8$27¬2¨’¥[!i¦…Ù@DFÀ¤ …ãµA8j•Ù‘$(‚ÿažM´) Ô£µÄ…ñÞ7åʤc Ag‚,1+qó[¡£õõV¦QÖ6ŒÐZP@¡W£…!Ùõzaç̾Ü cwh=NO*îº0Ik±Ž£êÄ)Lf…”Y$nœÝ¼ó4‰É{Ëk!ñÆ#ª,­S¹=²gšE PĨƒC£ìîíØk¬Dˆ yíúýù‚3l%AN,täGõì]Œ—„,¢ò­·5;.PL…bÓN°Ùs‡° ÝNeçl±ãÂ)çÁÚž^Í\@qÂ¥GvŽæ×n?ÜôÚ*5©Î[pZÊ&ƒÞ6gço…^%¥}ÎVH¥ ¼ô‡bãé3’³:œ|ß,ž7œ¤#Ùåˆ\¿tCaw툆£tÅúž‰˜¶mE>Ø»º‰«7×ʶìOØîÒžñQØÜl­4zÁ£Ë4¿™*©†ãt) un—&s3Jcs¹ ‡]áƒl°£îÚ¬„N°“¦g5[fB·À)R7žÜºæ3¤ååºM X‚HsCÉë{†£mЬVm\+g|Bt“ >h AJ®œó ˜  ¦ï|¿š!¨Òµ]ÆJSè"s¡ê!K§íÜ C‰mdYžL†23]/ (F«&\™fcæ]19ßžI¦È "„J‰€Ùdßè\Dk¨ó]_¤ÌPH£˜x ­©•éÚɸ ²jÕ¨ÔÄ@gÔ¡cÒ…ô¦ó½Ç<®šž‡ŽºS¢4UÎéZGmÅ$VÐOÑóá†9¥¦EFÒ†;k0M¼®!!ŒÓ§¡"‹I@Ì Ö^5¾ð«JA’koÄ™Ïot ÃhóòK¯=e¤ ´`•Ev{Ÿ·§Ã ›>vV¥Ñ_y±Â&ÿð÷Ë‚‘ėŃîÙTà·tD6|tVq µõý'âgŸ±ž ƒ zÁ‹u´ŠŸú4Þóí–læüûTXNþ§³Ýë¿ðº u ñÃQçüÓ¨ì”ëUûã׊YÔS^^ï~É2üÇw)1þå g¯yÁ¾ùwœk†Šžůý#_µÐw(ø¯¿{uôÑK×ÿöçÝC^©³²•~Êc¢+2 ŸôØéô¿²¯|¤}à=eõï~ãŸö‹ Òú’ Ä[^½»é3*` oTZbB@]¹¤•L&ßñ.ý×ö¾îšVïÿ©Ísÿîw>éÝ'dS9}Ê?÷T• 3£þè¿61f÷Ê{¾ô‘ná§É;ÐæMï9ÓÎB÷“7.Û\:xË«&ßüðJûlí^õˆá¿Ê(^çÿþÈ­^ØüÍC6ð<õ/ùqÀ1‰}Û½ÍÀ@j›øJ­ûc˜G PÐŽÅ; œ›½f"™6¿íï»ü}ûÀÏkÓ¡¤K0Ÿóv—ü¦µÐE5§í…ŸkÁUmµÍ̾î…iq.|óír(«[^¼O½èqùGï_šûÛò•û5ç}p(‚j@šÒ´|ó¡ö¿Ÿ2íÁÉAOÖØÍ#ÑqOÚ¸Iõ¹O_ùâÚ®÷hÐF|Ñßð¬V½ûR‹ÜÜýã _–µ†?ÑY)¤JXeÐ0a"ì³ß‰(;/F{‹Y%Ý‹”¨dP’Rœ Úc+I²(AÔšCɵNˆQ匒Yƒ-tdg„³DÐ‚àƒ…ÈÚf… @÷”!efñ˜%7!¡S’sB±æ(€‹¢"€ØžrP*jž¦œØTm&-Â9–01¨”°#‘Üwcו&”¬p1s 9¡)˜c eÄoERu©‰YƒQÅ((„"™AriÚб€$ŠýY 35hʘ©Íj“° ÙjC.B¨"ž®õživè6Ö½YØØœdǤ†ƒœ³I±C6\Qq‚óŽkº+Œ‘´H¤¨ZE¼Þõ‘!# š¡­![!Ê9ñ`FºÂÖÉ€åh‘@\[è¦"°ZV ¢OóóUÖ9ª¤xqc¥pt©e¬˜ !jÍÓYX¨I§öØÍ=å>M­Ãñ±[:´ª·nͼÒ5Á±c.äÅ¡¿vß„ 0"9Š­:á´EH¨¸—«wON_ “E Þ·fö^Òj]ÛÛ×E(ø‘H¸s7fÁ¬ ƒ\x|Œ ‹únÇÇö·XžmúêäfÛ&Q ª;xkZ<©°g¹µc+2þÍmN߯xu÷úêm9U‹CQ´p’«'– ©jÇ4ˆÊÍrŽ‘ÔÉõìxOüã4ëMŠŽ65•!‚Ù}Ю>VŸPÃhÇJ&Þ10¡Ä¼zÓúá;Z‰VW×6nÅúž®GHËÒu)¬#ÃýzJeA#f=7]¬+åÄËþÉá¦vî·âæM>V.³£ñãwt‰êi‰-OšÞl7AÁtºÕŒæ…YV·fæ¡SN£°H¸£Ø=Úq`]*ô¸¦ÈX‘«³÷+¾Ÿ2'=¿Žº‚„HkmØ%¨%…§õ5,çkÈF¯£†àVûetEjéÊÊé{Id£eíÊþ`ëb ÚÙ(…V ¯ÆX—ƒšAikÑ@,rVˆR ,{ Q„^»©ìÌb‚A§â48›Í >Oe²> ™†¨§zYÇ<Æ\kɨÜt ¬±f"½)U¬½2S›–' 4jŽF!øPSêXÛU†Ðx* Û¨LÆHVÄš±÷µ)Œ_Kl³Ê+„u æÈp²¾Ì:‡"iø‚ȱšyŲœ4BV 6>ã¾A4ÂZxÂåÍ/^;9á}›/iÚÍ@IƒÈ_þt<í-'Ï>¿_þ÷/§æ]vÃûçf5ç•·ÞÞ¯¸ë_TÔ°§Ê&`Zü۵쳹îƒKÊÖº³ræß¯ùò-rØËYÏ«ÝÈ·§,*UÄ^;î¦?Ôîxí)ê)÷]R­Û´MRòÇw@Ü2!÷ýÇ®:ô¨ç˜]¯^¾å£E”áêÉg,–”nù—}Å£Ï)î<0ç¿òŽMçÄÈGÞþ³Göò±e|ÀlsÝÛ-Ï×ÓÿíÞ$ hå—ǯ|>Õö_ÿ¯µ»=s0ÿÌÝaï÷á®,Em›™GœÇéC²øxÓ~ãÚpÑýG+Ÿ?¯¼Ü\û£´ø€röl§nûÙ/̽ áÈ'þl¯»ò’$séü9k¨{Ï6(íÆMÃéÕ¿8tÖ“+H×åŒGÔú·?;:|T‘<ãoåécÖ6l‚ÁÙ´®u7¿y6ý÷ K+÷ñtÃí+—ŸÆ=^2?¸d‡stššâÊ Uœõ'EûýnñáF_1j ;& ;µÓQ²7a×fuÚï8¨)ù]÷ªsÀ¼ÿºÃæ~³£ûºöæ›søåî|G”˜°5¹ã¶#;ïjµ( }DÚ<7WÝ0Ý~Q–öO<ÉŽwËoƒ£7.ß¶mgS¤|Ù7žs8ØÛäH€Œ6ŸtZ<±Ð³§Aê®Õ›NµÀšv´Ú£hà­CC «ûî²ëÍ4ܲ‡ÚDfïü†ÍFiÉÀïeÙ6ë ÐZP k„“v" ø²°-«”d^œë®][®BÛÈ% ÀÔËòª?ºêD^¿ºè¸ëóÍ;œ:¿= Ð)w"«³@4®5mEvWV1§¶,Ð{ÁÌ”›6~ciEm»x‹Ö@Ò¨4ºÀæƒþÜíý4º­›@Pí4Êô:]ç㿺*îoçg/Ò;¾q,’LzæîÅÈ ß:\?ôÒJCU^‘ÈzÕ/ÿî†â‰ÆÏþtmö…gOßü“Éî,åšžd4pó‹µ׿8»¥o^å·4Ê]tþê›ÿà7=,tc‘D`0öÓ×9ÿi[ò»å¤{Ïßö£#tÿþ%nùóíZã¯~ÌŸ÷¼Í8Hý7ÿíö ß±ÕZȪ䖣ºÛÝe—1Ư}=ì¹oÍLÝ—¿àO»ÛìíøcûÄç9“qù¾Ù<ú/k[•ñq±#pÁöKùU~ø ‹öﮂÑÉ®×8zÑYn6Úkß°œ2ŽfÎÕ·­ˆ{ÆÝÂG¿<¹ø¼íå“k½#HìlÎ=á8xó¢ËÍ×ß¼’A€~ç!% ïÿšŸ9w|ŸðÉŽ›³ãtgýúßÿ¸½òÔ…!Û`û¸ÎR¿ù.ýÇ?8½ìvíU¿Ìóôúê—‡w<Œ?úéî¬oËìÉ9Úþ0~Ï;R6NO{*p¥7¿S¥7>‰ÏøøN† ñPâÔW½-HÇÕcоó]„ÈÖS@'^!–Hô€è~” ˜¶ß}yKï~‚·2¦¡&ø1(vš:SS&qA‹&Õ'-Ðg¿v|6eK C'ÖAëĨ gÒ˜‘u^›Á “NýÄù„(Z¢Æ€I±Í‘ŬQ¬“ØtÎ*+ ©’å7š\È J0ØŠHD³J^+Í0Ö=‚ËÜ–Ôù$µÊ †&õ¤ ½B «•@ µV€Ô÷c¸ñ‚*#°ï’ö^k 9£ €ˆeÐxÍ}÷™2¥u¦h´D"êPQ™­J9³žêd †Úd“YÈ`HIrJ@0 ¬D,BY¦YZ„ž$dªR±\¶ƒ¾5›(M­fèƒt“rĶ?EP…>!‚ZÇY›•5J™ÎXáä ’ˆ:ˆŠ&§]/ |<ŠdBX¬À,ð'ŒL<@¹†€’¹1NB" V¥çÐ2#*OIгÀY¨d#5$ÃAo-ÇA²ë©@²s-[£|V˜‹átä¼ ™AV2ÉŸ0D±Æ&ê²$I3¤rof0ÅPDíhDf¸üw¿Ã>Ú@&$°@`@”yöháMgöXˆÑù'^x<¼k}ðê󪇜d2J3÷$à Bªžr­¾dõô×lòÿÍ*{uÖK¶_º^Ôùo]6çWðÿ:¶Œ¸é OËMÈ'oõ0`.3)n òUÇŒÑäÁôQæßm¼ø˜­Å×~ë3±ýë;úK-FË^rórz¿š<ÚÎøÁʽ5Úüò›Šs¬£ØëV¾wí4°Ú¿¯×¥ªïÚ¯mØ6ÀÚ^4rÕ#î¶PË?ðÂÓvÌ<øÌxÉ ±5<§¹Ëœ™~ûyëcý½+3ÿØ3ò½çŠlsLÆÍ0ëÙÒÜóŒÉâwÂú•gçUù¬Ç?yãˆÄ¤óŸ¶2ó¯¦Éä«WøŽOÏñCÏv¨£ŠF]ÿ› VF6ïçÚ-¿úE¡úœïÑÝsÎlzÀ¦æŠZ¯^½¯§{»ÐxG˜œˆ jfÿœoùò†æ–äÚ?p%8¢«³î¶£Ñ—ÔæÔG.ÚŸ¨#"\ªÄ4¶O’L6ÈùW^Æç(è¦pùøÜܪœwìh9çМx·å¬ö®±Ö›8OhˉÍ鋳"ëF9ÞrþŠÝ^5#ÅnxÚZ·Ý(uêa{J‘N:y¼kˆ~éàô¤S­'58•·ª¡p¬”MÜÞnut¹­°ï¯å³µ›.…#û;p#muNÀ¦iO}°ŽëùÂ唕?‹úä!˜óÙé¶ûn<|"•Á¦~T‹ ó“îK׸7]\U~o;¢Ä½ÎvÚ­$ M>¬IŸûøäÌ×-Ô#ÄKÏc5Ì®¾Ë9ýuo¿McÊrìSàN:‘tçr¯›/|­g”óÏÒ]ÏN¿}ÿ±Ì žùâá¨Ä™'?¼7þ؇®§W>*‰¨ƒ2Q5µíEÍñ†[LY¾bõý^ªaC¦xö«ÅðˆÌOo¦¯¿96FNƒM MD œs‡6AüÂ×é±/“Êø®ÿ Uvaìó}®—[  ûÝ©ïm\ÿûk}IM/xLÜ0kÀ¤½¿ü¤ÆìÔÊ–®ROŒß¥ã™oìõöŒWœÍvÊç¾Ô=áŵmÁWIrUVŠTI”„ðÔ?K‹Ã¤@•YÃÊn®ß}ŽúÅç×–ö Ýï3µjº¹qÄ-–»÷ݺn1?ðÙCPŠòßtŸF9T “@%δá& ‚&!LMNI 7kmÖ½x‚šÇÉÆ¢yq"Ðyë`†Xݰv¼6ÉÞ *ç£Z+êu¨&€XC[gF*p ˆkèÈM¶H‰Äd¢E¦ y¾ÆMu*°pŒ&CgÍ Ø9á—}Ê)P1Ð$9#B²N= *í”Z( +I—Þe¸É§ bÖd  É©wkëAÛ5­Ô,†äµD‹X¸"8Óotkiv«Õ™\Eh’˜„v±›#î dŠZT(*ÇØP!²ax8fQjëÀërÔA ÍñΙM5wEVpÊkìú@¥a "Ðì Û–Úo&±QRÔtâîifÌm9“´I¢[DÀ½§vqPE™.¸ä)’Ó¼l"‹X;@âý DF·ØÍ.&5®”ו]ð´¡4š`ã&°S´nH‡¨Qš½Çû½»¢¨“ˆEQ;›À†"Ö'ŸÜ[Ó3 õ!­ï>28z¶_ýíZ²_¾2¦è„L ÁúÏ Ò–1çt¼k§öNP´Ðþ€‹³s°™™*è `Ö@÷­vû‡¥V2r‡öÎÛÂéÖ«ç7 löÃY‹–’ݾõÍ[P3³ó..œ¸´¹OGE.KµÁpZ:†[6Ô>›46ÝŒÍÄ æd¢† 0YÑʤ"¤ŽE§©}žÙ¬…‚&áäd©‹-`p¬Êld0Óýz'²> z]$¥SÖÉ÷‚d5Š)+BN% …L¤R2!aãÛ%ëF€A«’[\_Z µ3²fó¢M”³å„UQt›T(¨H$ëX µ˜†Ck­°aˆ, bCš²J’¸t:Ù˜Â¸Ç L²²` жMm(=÷q9ˆ„µ¡cÛ¹!SÊ "2BfQ”…SèÁ$*I–¨ù,I'9>Í€Âi= KêIç Œ¡è€`¤1÷ZÖ2]ÈnRj› ê M<:C."©˜¥µ‰ü:»NO­ðiá$I<{.8!õ‚™5K•Q˜ý´AÅ9²Gnª…ÄÓscÄ¢%dö-Çi•‰L‹2±k•;«ŒÁGs „= Ÿh„ÿcë'!Ñ €€ÀÊó¯û÷ÙZàÐ{ÿ³}úKÜÁ]£Ø¿ú[sÁ¿0”`VrüußiŸðšú¬/µ®õ¤G÷7ýÍ­9²zò_.8‡_õ[ÿ¬”yß³o‘§¹d ¢ª²sN Ù´@:$:”éHRdÃô­ßlXx×ÇÏp<»j,F¤)”v9÷¶U‘—äþê‰ýÍ/:”c†4SëÐpq žòÔ³Yæ “bÅ¢-“§–Òò«~ÝÝÿ“£z ¸!Š“"'²Íö¯4+oýÛðÐ×Ï“Bj•qš„bòº”'=’Õ ŽßøòçÏ2**Ó’îQ_ôùÖz¿ûÏÇ`­¨÷¾þ†µÞ‹]ÿMx÷7.F`;´Ú `óû¿0õ]Îo|›ÑÂQò¯Ð?~ÃÊâN¥ ÊÈ,¿ûSÚú¾³úûÆ¡œòìÏï?ð”V&E?{Ùðþ3•‰é·¹­¯x€¶£å,F,èƒïýMzöãä¿_4–à -‹˜Ñúð­¯müð鳯\ë¶Ù*Å„JÀæ@½RQ$– ¦Ô7T"&݉ë B3UR2*9˜cÀ¶?Öro0£Ê:B²;[•‹L€¢ eœ=ÞqF`V¾#ÖÌs©-ŠžT(Ù¯uIÚ÷å¡f æ©d @ÖGh×U<¼”˜¸…Ü®¯eDåi€†&G{as󕳦͔“nƒ^úí!q§Éuû×mŽúX3¤( Ç·²ÚÁ¶í,Ê¡ëoÑǘÁ%J Òá=¾j صU— FÇo‰é ÍŽu¼ùºå±:µ’õ±ÏßqQÓcp®¾®Efîú«Ìì;9_ó=¿á¥Û†–Õ†»\êÔdüö…j?ùÕU‰I¨züEÙ|é~ÒN‰õ‰}ÐY•§áÿ‘~ÿ¡zçŒC€ÉʪÌnÓãÛšrg)³³¸k¤;‘böuK}GXˆ:¡3n|dMç€ÖF1í‘}ÓtäôŽ™t,N1ÊMɼvÓFÕ˱ۼÏjêŠ>Íl˜ºc~4œ™ia®N¼¾ $ÌT%¨gJA´»6ɨ²I ¿.ŽJ§cŠ–åîâj§¦m›ÜOiœ¬Ë¦6ÎŒšD¬ãâlÁV¦GŸóñ;æfG W–©³ƒ¬Û5¿¿-h4¶+€4g¬¬OªÁ0c©ÂêšèáV×@»¼.ÕLW×y¡€ºÎ3Ú’'ÂèMlÖ!4®X]£œ$#Ce:; Yœ&\Ž,d5© )HTÄf,IUh• FÇ2)„˜ ¬6ÍzL Ý¡¨lÕ3°€&¡I±f`•esa0§¬Œ 'N‡Of„®T’AŠÆ¯«YkQ5@16–]ÌÌZƽÏJiÏFŸb½Î,e¦°2¯+›‘I³0d¥0D0Û-FÉ’Ú1¢®uÁVF6¯!ª9B6D⤊RYE‚ $ ‚h7*JX¹„80š`½C%ÂŒ˜¨žÍ–ý¼£+@;Ê;Á¬áÿÁæ]7‡?2‰ÿÈOñE Å÷>¼>÷¾S†¹48UM˜ŸpÎø–7áì_ ÃpM.°ñØGþè4Y3“ð=ÿâ€:ïeÃæs×­³†õCQPò/oˆë{z"‡&»m/¾ýøê&—=Sùä ê/î¦÷}æF_`p±°¶?w;1ãIO\ß°M§Gžžñ_ W¬CÒ—¥/ ËßyçúŸ^s8žñ— í—v¯ßûUŽì.;ÝìülLzjŸ=êl†Ãß¹=Þ’ðÆÍn}ÂÆtÕU1u¹~FÊêñúgîhvœ†?™6Às<-ïûñ1|’³Š›¿w›züImP–~þ{}¯‹Üþ?R>f—º§ÞFmJŸ1sqä?§ãëƒ ª˜þæHŸ“¡&žx¿¹0¼ãžK ‚= óþkVnYɬg.š7Qñ5wDƒÈ·Þ²–²9õ.3¬c:«9P…¾Í·íNöŒja3sOÒýø6;WÙs ÌL¨²`ú;úwKQP”1xêÝÝv€ñôÌk»}ú# xÐýæ-C¦Cש½Ûç»ôÎÊ)˜ôfþôÕµc 2 Òô¸ÏqõèÖnöøÓ<¢‹£Çs¾uf°á”l8²ÎXô7ˆ;¥®bÄ´¸5¬¡ß7Ì妎Oª‡‹¼hšå—Ã-MÖDÁ΋Kën›‘Ù“—äQÍÊÍöU‘\V¹OÕÆa93Ô­¢z”„‡³Ú¨èTÎÄ!¡",Ù -8A@ ÿ¯Þt#ÜÑJ qõç·ÐþàÖn[?~|Ûè~IcæSwʇoí7¿z—e¥"‡¥ŸíML…L 5/þØÌñŸ^ÓeɈaï^PŒ*‹ŽÍfš¹_7}Å/ƒ~4þñÍ|çËóM_;ê|‚ŒÈg<~1–‰N>)Š£™‹ÏÊóWwÔôŠÏ “ï#£+ÚÛþé†^o¹ouðó7f}òÉW˜O~~ÁÍÝsqÄä—¾¸'%Æ›n÷šÿë¯' ¸ðàmuPš£[ýÚnûæ{þã­ÇÊÜ[Ì~hmñuÿÝwM ©2hJHŸþ- Nƒk?q\Ÿ»0¸ìR•§”’Aã?íó9Mf¯{ËÁ Ðê,êîW&'L6†/zÜg ¸ÏË%RûácîÆ‡_wu+b/=ÁXÃúqkp`êÿõ“kÛßq¢®P÷qœy÷¥Åß곊DѰú>Å‚ ¸OúN—ûÿzçáê•–E›ÿëG»+ÆÌB‚éSŸÁû¼n†$“ !"B‘ÍÅ©?¾þ¦dõŽïM$ô”Ww¼hoFfDÌò!‚G¼ÉuZC¯Å£4¯C÷ºG2û!hß÷Åæ7Oê­¯ÔF·E‘oìq^§3>¥Ú÷¼ÕC”Ixþsü=myǧ6V/}×ã<…g=±$ô…„ø¹·wõg.4¯~­¯kTÿ3±PWÙÚ*¿AÙñ€9>úÁMÚš€høÿKŒº #¢@¥KÇÜ£Ä:T`¦I²ÁŒŠ°;Ô‚NÈ$š2 Z”HE$(F@Pa„{j*EŠÔ¤Ô)ºLJ P×0èQDX±yp’PI!¢@dÀØL£"hq3ZLŸES6UÑðIB6#ÅLJˆELEˆŒD„U@ÏÜ$Ð~ ‚’Ù¢R¡ÊI‘ÆõjR…Œ¬A€[­)¹ ’¤NÕ†¸YW#‘8‹€QA4($†(:–Ì$ÊŠ¦Šd45UXÊ`]ÖJd¢€Œ³=ÎfÌ61§”AS’@ 2#A.$ hÛÔÆ¡žrÉ9ö€©÷ ,‚$”HD["Û—*{΂YQ,G*¦XQ)ˆœãŒqYq"F$¯ #‰b™HS@Q’YÔóL9`]aWU)[e)È‚‚PcôÊ%÷…تÕÉJPàjf :™Äâë¦SJcLÖ"±*•4P™¼ö…¡7e›“ÒLð¿è„,óÝ AѳÏ:¬îeí}gl;«¬@él„î¹yuë®zù“7O;Åç¡"„œQ%¥˜Öª={§ÝüÂÝë¿þiÚö¤ÇÿýŽõŒ´á§cµ:½W…XtF·àrÍËÍÓºt%¹,î'ÔZçë¼ !K®ÿÖþ-OÜŠWçà­K±TänëãŒ)b"õoäï|<.pöIÕô§äâæàí)fÄÓž¶zë¯ÆT2]ëÅžwÊŽ>÷ ;kçáHmßš”2 u[<öV}É( ²ç.nÒ?h~¹žsêCQµˆY‘ÏÜWTÝ{s¼h4Øñ p—6C5ýõ(Myá‰åÆÇíîŒáû¹bóoßx„G§.Ûd@0Ee@K@2[ïs<ñ¾}’•BRæìØÞ­®î²m=#ÞyèõºêÞÔn¸¤@»óÊé¦Å a ­›6nÑÆ+&)ðÆCipúLàᤄ62 7¨ŒÖ•ŸÙdéÀ‘¸7lž×”Ñœ0f„µ›úÂåŒäžª3ÞÈEk÷7 Æ×ºÕ•Ì£Rvࣆ#-¯ d°¾«‚µS£7Ÿ4Ž Zn Ñ%Nüì «~Iäð­Åæ…œ4xB¥ŠHù@W  í&N»±)˜ ,DÊéRæq~0Ä®X]ór¸ÉØÝZ À`+÷ËS %Æ+6ÛAUMÅé¢ËUh–õ¼ÊJHýõÂ9€òÑ-)«æîÉT‘ŬA2žs†¨Ž}û!]𜭬MÐÉ6a‘‚#©Ü匞®Ž;>¯?¤$©Í=Õ²(Cà¹Б ×A»þz+ Š»^ ”½…~þ÷c„Ò¦Ö_û…¥“Âôõ/µ1IQõ¥l~‚HÒþðæÃÞ~ríµµÙtï{N?ùÕ–{¤Êª‹/Y¹ê¦)"DW@åpøôó7NqNŸ¸œ Pµª™MÔ'>.À0*ó¦gŸÚö—Ç›È:ÏZa`;”dþb†¶?å%ͬÖíU¯?î“Ð_=OzJŸÐÈh6î|Z¿öÖ%¸ÇÓæçmÔÙ¹Lµ–îuÙD"õÿxØkg Ø>æí¬‘ÍÏm[ÕUv_ýòä²3†-ÝmWr£DP$epþïÎ.·p8óU}«Íúg¾±v×—Ìz)º¬ ¢˜“lNŠyÓá{«ÍTªì*M+{þÁBáß½‚ =2_ð—9ãóë9«p<È¿}ËúƒõQÐT¬ô<é;e$ïÅ24‚B”%¶äà8™€Þ%P³Ø>:Xî°íSkG@A&m”à=‘© «v ZÒ„©J¥3é:êÆí»]""Qh1f‰-*ñ E€QDQ€¾E aÍ…$N" !Îs¤†`RZ5Y@ˆ” MÀ h0ɽ@Ì3”“‰¤3 ¢’΃ž&ݲ•V%JiM€b?E;»ºJ”IHa`ÉN%¬2qJ=®·£Rq$Éõ˜@‚ Óm¾‡Þñ €·<}¯}Ë£Šÿ|Ódösg᤾ìØÌr‰4aü‹gÏéR£ùçj·~ªÔÊøÚÊÁJÀ¬ðº¿ÐÛßöÆØñï_ºÓGοõßÂÞ¿¸ÿù{à…ß°e’Û^µ›ßôúÏ·Þõ¡SÆïýúŠOµö¯ùN|ô—¸èñå/ˆŒ¤g4‰ë¿ðžeÐo}È`ñ]b‡¦ÿ÷?íÃ›Ž½úúqðü7n]}ÏU>guöÛgWÞÿÛiFàŽ=Ç0žúO'Ùª4ð×…'¿|´ÿ¹{¼l#ï~<;æùúsŸhÊ¢&Oõ“ÒÝöÚéj¦Ó&‘2*0бÿŸ÷¸ ’ò§¾`.zÿ–îe?‡gü% ¶M2 õërJ¢²œûî]þÕ¿è% ‘†5o6”¥Å¶}Ëwó]_¿ùŽ×\ "W¾qãþwß´r¤—i(¢|öCS ió»v•ÖË ÖËïþïñãž7ØÿšÝáxšuœä½?X¾ß««ƒo½:sTelè5Ïl J¹ì?µ|§·ÌŽßp}È„ÿÕÌPÉô«ÿ1.fŒ¨2Ê)/ÚhÔ·8öR#Ïxz)EÙM-{•¸|ÞEÕæ¶YÖßþ«éŸ3{ì팇Zþé#­0|Íù]ðbŸvuo:rh)ëÑ r¥Nç¤ûìÏ™EXþ÷/GoOK/Ûb|é·½ZšÀrìåë;_º0iRPÕ³NîS‚3çúu·øÁµñ”'ᯮôŸüц_¬d ÊÂ}ÆÇÕ%N£ ÀÀ$œ®÷¦îGIS’”' • %yH @tòœUU*&f’õœ¼ïË’% å¤3£I=@–žuÁ8pŠ-p˜Œ(Dá#U69箯|Ó7Ò*ßzF¤Ô…c;d (#‚P¶ÏT¦ÀÐIoŒJ4¹k©6Ó> ÅÁ\ì3¤•¸¡ªú20Æ„$°â5 PßßôªOr ÜÈnµm%³ÒØ Ó5œ&‰\öœsÙr¸1=†,„’µ´>ßcÇëBR-èØ†~z|-JFq=¯‹ŒCf aÏ©¬×¦_é›Éòm=#íg {oé ¥©Êàšõq½rìd1¥óò±n%#¯.y¯Å椚ƒü¦(&G# ­f˜)MȨJho¾½™n˜+7(Js§Î;ŠröÇÜ3ˆØÓ¶(ÄLÅc@·mq’TVÑ30¸SO(·’ÛÛoÍGtßÝzSJˆÍ­‚¬ÜÞSgb}ÑòË«$ž®™¢sÃSÿöª)fÉþ÷¿÷‰±¹þ•AÝùÏ7²¨ü/ßÿÜ ºá=w¡å\*.8gi÷Ó®û¸¥«Çýï®ÖA$€Ž vç³Æ´-+ ¨/€`¾‚B Ïuij[ryé¶z3Ê*•e]¬@#hàp|U[%£QªD8 @Ñ»> ‚ë(Ô’úÄÝ›‹Ñpà²r•,Ž Eoˆ É9È qZ"›m ÀŽŒØº—¤qÔZdB>D‚ÆÈ±Ñœ–Üv“£AÙþØmÞbØà,`™…iv€œ\ÈÌš\»dfbÔ€Ù¨sÊÔ•Ò6QÒ@Êš™bÐ×ÆÛ©FÖY…ƹj ÆhhzFŠ9*%" 4I¥A¶]µ±îmîVÑ0 dMÕhabuÊ @´]w5Ñp»Îm‡ŒH=÷L…f†‹ ©ë’R ±Æv9êÂD$à©'TX€À›¡šWÊøÐy"Œ-UYWU z£$LÈYÝD§ƒ"l„@+cШB´è$º"UšT*%LÙÊ8-)8› cÄ”*‚@L)4©FO¨‘y꣚ì|³oMЊ]9>×nB ¨X01‚’@ËsšLÅG+Œ$˜í©›f9„[Fº#qHUf²],<Íê0NÊ:³CÕI)žÝØÎVS™_ ÓóÚf0¯ÀH†²—Q5ËI©²ƒB³ÉC@€”óJ¢E€Nˆ†?A! Ñ)‡ êû< £ÎÓF÷·î¹éA§$ÀÜc½&Ya¢€IøÈ#š…‡ÏX2[Ò½Ipé…Ë‹/\ÿÃO'á*ѧ_Z.^Ye0Õ…zˆVeQdP„ 8;¼þ ,^sߺ„BOR:ãä¢ð´ç›ûÍ].TÊG5©sk¶?óLxç—ûëïlÿǯü_?­ÜóÏ·oxÇÜ^?)"—õÄ5(&º÷Ý}"§jaE½æ—zç†T(E¢æþ¼Ó`ÒìsiÅ~sùŠÏÙ¨3Q>õ™t_†¤ˆ±]¿ðrG6ªèTh°ÈyøYûÜ'V.{Ó6SOI“'—Ì#e³åið‚Ø|ø ã Þ¾½P‘tVyyôcSJ:eÐ~û=‡Ï9u‡ýë'Åï¿ôTO{|Q³ó½}§3ãUÔðäÇ`gèð‹ÿàÿN·çM7xÒÓbÃÛȶ¬4‡2 ,Kºê0ÿ±óP%É2N…Aúöߟ¨áÑÊ_þˉ{ÿóV>÷©pýË©~Ë#õ9o h@½ˆR êæWîå×<Ùmyk‚Îè~÷ßÜêñI_œQ¦ïþjÿÀ·Ž,CÛ ÆÌî­1·É¢kÅYPwú¦à¿~ÆV·/ùÛôì¿*¯yõ~ß1>ø¥[¸2Ýã¥ïÜö®ëº—?Ú»¤èqq4€Ñ;­ÿÊÛ×VžDåë5„¤J Å»XL)äáßß½Ð,fd¬|òÍûÀ#TA¤áÿ@ädƒ15ü‰¨¤¥D+ÍÉ2tØ;‚?Á’P+΀͚P ‡M3 k•Ä.(Ar‘H,ëÁh½vž¢âÀl($JI‹˜.ñ9ŒJˆ¢ÔÌ´ÔÚë²EF8 Y„2ˆ˜B‰A‘f–Ù"š« Ú8“X1“‹¹OÖ²Í5Œª¬Œ÷‰xÞB6&- µfH–‡1Çh…Í‹˜°5A1+“PŒ¨¬l-CĤ$P)ƒ",ÛŒX/(@ Jd"´ ³u¬³`r* #Um!À2¨+p˜É!MŠa.2'…ÚfN¢‚UEdD€ÑŠFܱ Ó™­ 8V™Y’u@JÇZIêA¢5s sLµŬAAY°×b÷‚ÒXù͇—2ˆ›9MŸuJsôµ7§×Ý[ýæûCøå¯àì·lYÇïÛ>Á™¹-T¤@¬>üžùæwè­7Uïß\ÿàŸVÚ Ý5!àæ“¶kùÙŽ{ Œ!Åï¾Î½y“ùÉ»Wvœ³}ý?mrâÌÂ_ù8*1—iõÑ¡° "ýôçÃE‚2e¼áÕ‚}Æö¹@’êÅÛ^gª×?´û凎Ÿòþ­Öhÿý÷Ó¢LÏxï——·po~é鲓$I‘¾öÞö’7ÏX'+_þêÇw‚,ˆÚ¥ù¶ò“—¶3o8ÁIKs )¦ÿpõ>¯Ú¦%CE(ÈþË_BkV\îŽÇbѱ +”AB&ÁËu?®½²“ƒ!Æ úio³DòMdJÄ(_ ª…fšE3ª¬i}>ŒÚ˜&“ɱ#“0m7”1Y ØôC& ’Æó”¨3'ÕïCw3”ƒa[û˜›¤u×49&cú¶€¨LÍâ +m'±Ðis"JSãÇ+ieûõfÚ:¾‘M§hê4*:1ô¹]G·µ@©R™Z2“ƒK}ª‚!s|¥ @„›£Ú5èýÞ%ìÀ·Òöú€®üÌâVz \¸x‹†>i³¼ ­JÍ‘•úÔ¶Á<0» qßmkYb¹óœE•ˆ$­­$ǘ@is!^^-WcØ{ksóêætí!¾¤¹¡µÇ¢QÈK7ò´~•œqÚ‰ôëÿ–æ:@%tÙÝ•¢¶Ü¾#¾åIPàOFÎh·œÈ!•ÇÞñ½®|äBûåkkAÌPb®ùäj¹—E†'Þ)°Ü+Ðð¿X2Ír ˆœÕò².P8È4Ö妔]U«ì2õ%dQ¶µ˜ ›|¨àÀg’ª38&6¼©즱- zá†%-•ô•„q¤¡r •c•B2Ã*«cçtì1˜ skEi˜šäWs”܆%(”‰ ±óë•-¬‡HqªM¥,·j ÂkªIC£ Å1UõŒ¢ Ä$Öi‚æÿG~Üv ö̼e•]¾zzKNz!½$QšH‘¢ ‚ˆ‚ E¤@Á t° ¢‚*RD”Þ¤„$¤—“~úùÚnk­·Ì̽÷ÿŸ§´¡A«L5¹)r+9HÁ…±$*4°Al-Äì €Ú’P´Á¸ì=¢ç"6Š.v¦qÙ  €H…K–HšdCÐ@ªm`æ2§,3@gK`£ÙÚ¶HH>SÂÔõN ë 5ŽŒAÑÈØµhTlaÛv {³¤H™… )˜@ád´šy‚"`Ë(œÔ{,¢V-'Ô:«c$%JΉƒ®ªm@%D¤X‰‚T¡t(Faˆh%ú²“ÅÛ\‘*Ò €•g%%%(솋.¡ $Q@T0Ìmèm¹_O­¢T"¯ «E“£¤²`*“·Bð3ýöNü|OÁó½¿w³üñ¯.é-+œ Á௿qxΗ'8WŠAˆjPí—Ìè=ÙüÞ½~ÙQ¨ n¼ê'DO{ÇR=èÅ}ϘYÄÄ7?Û+¾è¥æëï<°ó/ÎÄ?üýŽ8Ýó†}ú;OŸ–pþ?Íâ¯Ê|÷î õ—¶™iÑ|þé«‚†þa>ûÍ;Á¤yžÉ`h·\;éL‚£o¼síÕP>ëú t¾ýä¿ZžÅwUniÇ[Noì?¼ê*ãÁ€Þrîì£ßhŒcX€bî)Z[ýà]³Õ 9 /¥ñ;¿±F*Å«Ÿo­ˆ©på]ßSÕâþ?»^Þy¥`ª]% éÀû¯ÿÑq‹#….Û_¹deííû‹ùòw³"»”O^„Ó¯m'g‘>ðÆý úfÿ†&ÕC¾c岿è¶§«ÎZKŒÆDç5_=XøÃ‹ 5•–¯0ìY€æ]7´ýUF?¡o]yÜùŠzã–lÙWÞ;™úóæÙtÉ/ÔÇõ˾DrŠi£_*ÓK7}æžö©[ù«ÿ0ÚöZXùçcÒ7™2*…ú·!¢)i¬Å#ztѵëÕù΢¨!¿ô’§…+óé¯Ù‹—ÒÌï9¦W]LEÊKÛÐ>fçĘq—/ 枯ÞÓûµãÓ•Ë•®«óåmÇ“÷m\úø¾ã2?~Óä,[Ìýú™ D“5ÒÂggì)®‰†W¾³šŸ|E¯€@€<ÀRÅ.¶1m´ãØf“EÑ…Ô–X tÚ3F•%VM(’ÖšœËí M´tB±‘N„òpÙ.$;i§™D­E9ŠÍ4Ólšv¹4¦ÏÖ•òÒ^k †^™æ%Œ§ëMF@5®*J¯‹ãÕ‘‰ ¨£ºù"ã ã U«>Jn¸ gº+·š Œ§ ¸ç8EÓlí¯YŸ‰$n$r;¶O:4”c\ÖåDs¥®ì‡Hè*Šš7¦‡'BPážÒ °áz©ì°p㻎èá¶ÈÞ-ô¡Íðàwñڤ̈H öšíÛïX} êÑ]ÛIQÁöÁB¸ãÞ#ŒªHêÐlÜpgºúBcMDhPŒ&4Žäȱþ¨‘º9iª={8ßzGÙ?½tÂ<îì¹øOG„ņÔnZdÍÑš4 Bg]µ` ÊTIH!# ÔrÆIc¾óùñ®+÷üô­Ý“/©}å˜%ΆÉ&ðY˜&;(¹æ¼k)ó À$÷.è¼~ëãµ4 )Šø¨« O§u˜Ôö§…%sëGn~ÂØœAv*Þg‘Æ“Ðèmßí¦W:Ì`ùpÉ:ë?ùªXvâÀë Íß}lãqo K®«à¯{ëÄw\E€„¢ˆmfì{ °UÇ\ £’É`h-QˆX×”Ñä¼êØ&×›€4Ž­‘ʨW˜U½4œß´¸Œ6‚+-O³ ³€NT @6Žôj¬1"YJ¨{ Ípšã°ïÛì¥lŽlOʰ–hhfÆx(Œª€ÓäAM=T8‹IIg(ÂÞd"]НP¥``ìtnySv¦ò*=«õ¢€Í‹u¨ê!n.ÑèÔÎÕ®¶ÐKΗ¹fÃqæÔ÷ §ÎÌ÷zâS3',KÄΙÉVÖäT¨€±×GëódšŒq®äÚÎ ZÂz¸ˆ£RSÖ`Ê~ô¡×RŸÄª¨ep•€‰R•ž”¬Ìž48€¥rŠhT±Xd® @Ubå,T ²OÐ`甕ØB‡F‰Ô šØ+g¥É2·IÄ:ß¡í·=480 ·Vl¨&²sóhªÍÔÖ©4­”‚)ÁôtR"ô H¤V°fK[ˉ­K©Ç…§$­³f‚P‚7¥ã,lh˜Ñ寤Йæl)uÖX_Ì|É6y©3³uA±´^ÛXIßö3´E^Ðl˜aÐS¯`ê8 ¨?£hÀ@øäéI— ÿK§t–å¹Ï]ç®o4ÁæOÏr4›7è4ßý®Óúîg÷1\’·`$ `X|Ìv¹q_-»[ï}³þ£Û*Œj.%ä<\øŠî[Ÿ.WÔ¡nyÆ£³k^ùïnñIKý³›pò· ½âÂõáÇ-ÃÇöñ’Îf‚¢@¿|ÏutÅγ·A]<°ocßýŒÇïµç"Œ¾Hû+‰ÌnY'#pöãïì/‰v?òþåmV Ô».ÍíœëN £Í·OÓ @pcÕ)ÐiN¢‰'ß:óm6 ë]®·­@Ó¹m§òÉ}ׯH÷}“N9¹î?l°Šˆ'”Åà4«õƒ“[÷ 1ØÄ…$Ó;É$asB¥GíáûuËîën1¹nn{•È™`O?ÓîÔUGšÞ•-8§4 3@òÎp¯ßÛå=·Ây4ê†{ªÞÂ&ØTXƒs¡·¬ådúPT´s LÇ:΂õö²È âg©,fqž™4=¸T²æÈ®Øýàz½fGÓBÖä“Ùl­d€v–·,Ä•Y"0ƒ2§YRJ9wy®äº%D,«À 0:6–×söRÓÙèÈJˆ9n¬„Úu1æ#ó½2å2L}­Æ §Ñv±ËFãB!6| p$£¦iÙò¼"Õe0)€`áÿ(‚®}ú&]>·²ó/î=œ~ZLœ H>ó‰“êpçNÁTSšüó7&f×nÑØåG?\Ô‘2 Yðºñw×f.E¿ø…œaÓ Nun6o"xI¬Ðýó‡W“@wxw?ÔŽÉl}²Í9rü¹sÕcùoZÙüþ“ôoÿj"Ê'œxF﯌¹À†¼ÅÔÝöºûNØÉ³!CnÿãCSβôúKû>ê±wßÔ¿æQVÁÜÿG·BŒùø—Z1É¥óN ½""=ürÐ;uŸ}ÙlþÚW‡÷~i]—?ð*±!Þøöûç?´0 H~s¿ò%;UðVÿ$MÀ¥éXä£àžôV·û-쓵hì®w5zÍëÂ/½aÉY g:ªâ Ñï 0¶ùTºðϵVÛì=æQªê&Zæ„ÇÿÌæä÷ï5”½Ã(ô;!Q¼ïÂrhlÎXæ´ñ¶ÿžþÒŸ.ö߯4L\Sÿy;ûàµSaQ£†%‰Úöm_í@áò?=®C¥A˜TFZL bÏþ< ¡îÙzä¾ß›Y˲.þ¸Íÿñôµ” ¿Å ™ûû3,~þM£êcg·oþzHL½kÈBj[}É÷ñ~­Ž»×}=?çes¤ßö×_1wûïß§¯yÿèU‡À¼é9ng/¯¼@üëŸNû^¹¯z÷•‹‘Þ5/-Ë~8ò²Ÿ˜?xAÿ+¯›1“½æ)™²1Ò&úÊ·¨÷—ÉâèiWx³…ÿeáÿ V° ?GM,ÈQðF°} ã¶ö¥E ¦G7rH‘Û6ˆQà ³‡Y:­b¨ï²Ó3*hb’*%oµÔB`A~F zʹzu/x„ 4Y²íì?oÕNòòËÖRÅæ“| Œâ «ŸT˜5ÿî¿øçìv|ûÐ$#>ÿ” ;){0eêtô™­ÇþcÐ{@_a0= úèWï=úÃcyîÊMÃ}·Ì:®N|ÌÀSœ^w]·qéÅKËÐÔ¾\}xÛViWZE†ÕÚYÎÈZÉ($WœZµ»ºé9÷Ò~÷Å{§TGimÈpðﻳ.§ÑЍ˜JƒÜ­§ôißSvlQ¢ R]±n¿yrêE.:‰·Þ¾±zNSïoºŒ„zÎëìõÞÙú6è Çâ¡ÿîÑÅ;ɤ¢µf|ÛýLMyxÛ–ÙÝG3Š„»÷ÏÎÝcÞ»6<£.¶^ýÞœöst!œpz9àÁ£¥S†“û6FO{î¼§:{1zèØ¦‡'6 ó`csçÚìŽ]aÓãÑé»2UÛûÃÝÓì ÃÙáê})!Œ.Í5â±;§ý3}gµ<¡?Sµ°\–ÛoïõOH°´{:°wRôΛÖß?ÁiÄÁÞžræÙ~üÖ¾ LÉ Ê âÆ¬Ûß(Ìd5õÍæ=µ®w£»§Ù–.„y?›ˆæq«µñ%¦b¨óGLíúPÂúp9 ÒÎI»#BâUU-¬_¬20( Ln«†;£­Ç¬Ëê” ·±¶ìlS–f›¬s YŒ¯+ò¤ôg¦ÑƒÉi,ÝædCŠú¿¾n{=E êÇŸþI«`~ãIEgÜÊ{¾ÙdA!™{Óy+ðÐëî^½+}ók¨wùî @J`ãÑèêÇ=6TLYG†H Ž>}cÓfÜõ¼=û?rãŒ^xù¼ÍðÉé…¯ÜTõý Ùâ¼c;´Z ¦ ´þN€@M&&ëNп5=üÎ}ÝóNŇþöF#OyE!>üÃæ9e H%Ì['„Í&ýä½ ª$ Ê[OØ”>ù•ñÎñ=ÂñG¿—õâáÊß쟬Ì&øÂ¬¬Žxí#Eµ>Óëï„ú]Ûsà2‡3ªšS_6wŒÊ>t]÷Úö>x䬷ÖQ@¾}Ý€L’œèI¯ñb]÷÷ßÚ¸èó+ï»gú‹¿=Û÷Þ•ãÞ3Ì_üçÕó®© ò éÈGoݸøÕ²ú±µîÇÁ íè�±6MÙ`†»ÿj˜Bñ‹Ï(wÍ¡•bôå8tÑ›çKeÙê“ú_?Knú‘G½ºoŸ{eó_ß™„ÜKÎ䦇wìL~Ä K›Õ]÷ŸíÁ5PR…˜hòŸ7®Þ¿’ŠçÝüåÝí OZØ´ºÿI¾¥ŒR<õ²ö»ÿÚŠESÏ$S?ãÒÔûØÁ*X8íÑ9ÿ ->‹ÆE'sŸÒû²¹Úd¡|Ô®â,-‰å[džþqm¼íGÞÿæQª¦ØýÃäÜ_®¶>~:>¥œúäµ:‘=1Û~¥ƒV‹ëo‚ £Œxø¿M~õ|°b¬* €‚R¯ Jàä +O›â§¾?O.a;C ‰& wÕa_×úÉF1…à8Nk hñ<åºÉ i(R©!k;%ãæ‹w-  +…6q¶|’3³™k*WÔÚ¹ˆPÛ.‚¢Ûu}\ÞT˜˜CnGG¦IÉH½„{'ÿtcœ,#Q‰ ¡WÏ'ð1mlŒ’(­0wÖ»i²^RjÚwøš²"@’™¬Ü“àdbH!fÊQ€U(¥µƒ«‰v,îmNûi“ëpøÖ#°šùÀõgIV’N'G ñöU30u:zOw´KæðþÔ;Ù^Y)g@wì‹û»ˆ6•¥Q÷Ýç/µ?¼ï˜;8ÚT5¸ÔÝ{ÿHÄ9Œ®Ò|èÎ{"P¹üHïɹãwî„#‰3I3V‚ú‚spý‹÷­r‚Ü}ÝT4tS!Iýcß:’…ÌÙ€mÆo~–àg]JßúNÊ+Okî=˜Îzþ‚ånüÆ4©f)ä´“cþ›œ3@›‹«¢üÓ—WÀ¿ý—ñsµqÑ;¶:üÏʶ¨pqù÷Oô=ÈsŒJ 7ÝdNøøæî-_má˘9½ñóitõúòK!¦sÏÉ>EñFO9™¬pxç]#†,=ì⯻“Ïð`À"ÂÿBUnub6 £’=u‡äàˆ‹bàpf›ZA{¥Ñ4ˆ€®L¦¦ÌµðÞ«¸œf¨BNÄ Z[:ù2 ]LÒïš ciW]åJDµsLB%kìLëýÕs&PRBcKL³²FSáÐa›TŒuUáÄÎÚÛÖ£ó…«êç"ØÀQ9˨„XAi‘£2U²®+Ú,ª^×èþqb°”œZ ÆEdµ^!+ zËv‘J29Bk¡ržÄ"*ekeDº”¤ðžŒCf5$ê­’ÍYs‘Y UÙa‰ÆÙ-[+íÕ…i:n¨* ¢¬ÉC'ÊY‘ÈAj²hhûÉtÈÆj_½…ÒQC„˜ŒÏÜI—±ð~2@!2ŽFjлì|"²€mÝf´è.êJ*“éV‚a%EËS”¤µQi×3¢¨±®Z2Yxc¨@à­w…tOTÐ2XëëäÚT`¥"hL E×""GƒP jr‚¨€ üÒá߸‰~÷å}ø9áü™·Ob—xù¦áBB¯‹E,Ukwx[©3ë¯(á·ÿ©p¢²§ô™eTðâg7·¾ùp4€¿ù´¥MKe´ˆb•ÊîøOL%ÝðŠõ&D|É/úû~ïÀ‰ïß5± ­o¼ü.yÃsäûoÝ¿÷Ovûý*R‚»ÞwW«Ì†xÏ—ø«O\¿à­»¶¼mºµ—…pîå«v-û^W3JÔsÅŽ¿ÀŽãˆÙ[p¿qFÿBïH0 U¿uñúI;aãS·ŒnÚ3ŸêîøâÆÉͯ±}‡rášãSûô‡w—ŸóŠuu¹t¡;üÏ×ó œø‹ vˆ-†Ññ;iáéçüµ4(]qÅq³ =RêôÉg­ÝøíŒfŠßþάüµõò'ÿÞþÇH•ÃÃ^1ž¶Ví¢ÓêWOš¿º/ŒŒ9»ÀM¿¶çæ™+µšÿ­£G¾º®§î-®ÜÜ?vüU“+ú}P¥#Q„eõ'÷–—¬€è4ƒ.š,úÍûgþÂ=w0t€náÌusJW !ˆÈ@Q0v]ÀáÿHyÔ5Q—öÌ ± ƒ Y% -»`Às«’g ËR²e)l0¨1¸ O¨‚´p\U(86KÁÍ–yÓ%Z‰ë"jçwúÛ§³ého"´¢~´2á£+skkíjkÕp ùäÃ&"ÁÁöm½¯i&0 ¸ÛØ,îÄ3+ 8:|4[nû~Ë¢+-å Ð7dþX}æéÆ•l ÒÛJQIÒæ»Ú›ï˜TiîP E(J›OÝQô@ŒdƒAw,廿Ö2.ö<¢åÓ™*²»7“È;wÌNÿæÆæ³ç©O±òíè§·4I‘ š³¸é%·p޹طթ'¶UO•µ±lÐâÅ{–Ï?‘©½÷Æ)Ï=÷²"9²5%›ó¤ÓêŠs^ZSƒ¡Ö¿7•bºïãÞ+ëîí?ê²èʪÐâ¼sú•#¸² nÎÍ? ¢:Õ£ÿyw'€§?qSaQÈ–RœjŠßÍ¢0¸ðR©ËTæÂ\zÉÚÜ ë”bøÿž=úw`öú›bHY¤¼üBˆ&ó¶V$僟DÎ^Þñ´5»BôÔ­—¹è /=!ºmÿ »Ðï¿:ªë75‚VîðníoÞ+1i¹êAë½ÿàô•5<ëÅ2©NêÁÏ¡(@'âÄJW [!#dÙ8F*†=œ™.;Úˆì*\FÖj碰‚¶ìbr,•lÖ€µB$ô[¶ôl‘p¨@™ h˜ƒw]Âcl!Y#*QÈ .oš+máÀø0 É3®ŠÅ&áìîŠñQÀµ«!ÏBråöVfiÚ$ÉuÏkž¶@ˆ$©ÁÒEê± ²KƖΨfÛ3ÞJ«à+i,‘T…!Ï$‚˜A-¡* #xÄbÇb6`’æ‚ ‡ÞÚýl‡l õĘ\Á(P±ËVZ¦Så ‰&«1£¥_ñØÌQR,,н\x2€èH=%ª8Õ™d[!dD,ç"˜L©°ÜNM=o‹‚cÂd¸¬ƒ(ªdtìªùC@RM€b°ZÄXõei£DöŒD˦׭aR¤¹¥…Âr­*ÙªÚI`ŒåºPÛ1G’Ô“b®4n±ŒÝ|4ÂÚV–Ðg‰¬^L­ ªj^*x ê¨*•³T'»^æä6å£Ác›)qËöÖgÉœ¡.Nxu:åC­÷Æ€uÙI.¡y`äy{±©Œ­‰ÉÂ^ìzš< …ŸR(·=|×ÚÙýÀ‚P€S.Ÿ%—çN5¸qï}±u=f§_a-• ‚ö¶\¸YËO) }÷h<:}h}qasaƒEÏ‚eJ°ë£#mbëKS ¦¤[ºNŒ,Z8ÍŒa°¥”$`|´ "`5B{ ³[½Vªe$˜%?·eÄ*¦©ƈÑx«hjOÙIŒÍ„AÜ$ùÅN•ܤ[Û|È2 êLòl‚~«FD„iacÁ=Èb–[4æØ´·Õ4 ¾J¢ý®µ…1ÖtŽc "ÃÒPîl”xh~âJt}¶e â±D¶Ñ £sÈŰR?†Ôå@"¶ƒ24f"ãH‰AŒk¬ƒ…Ʋn5uªëǪ§H."ƒ8îL¢¥EPrÔB BMÎ…ø_Œ@;´!àÎøŠ,d¼Ì>úþ ‹¢øÍ×.3]«.Ekl¼ç¥wW~ez€ ÒR²LxÕS@{ÞŸ)à\W¡ ³×þ[¾äÍ»“v݇?×ýÂë6Ù9umcÉ~Öe‡ùKo?œÀø·þ*|å­‡Oû³íÕ?s¤SR Чÿí®ž×ÙŸ|b–lýÐ…=o:˜Åì€?ú×ᄜ\u+Ú{v:Ûÿê ó¬7ø}xgñîGû‘µD0¸ö1l¢PTÇü‰Ͳ».6T)`¶šÕ.Rª#¨ÏXt÷?ÿ6}öom5óŠj`‹‚]?%ƒÀÍK¿3aÆË®ÝIýr–¼ mËE œ‡ëþð¡ `žôæ%4Ž‘´ˆ,dr÷©?]ßüѳk6&x¤ÐtH†s••Õe•~hºø‘s Þñûwª‰ÒâN,ÄÏ~t}á½§Uµi_z3áUï\4…@ ¨ý¨ÔÂh ^7þã“S?²«êª)ÖÙÒl£­úÃ4)á}mæþî\“\ûOïXçzo¿”úƒØuÔ·H ©DÌÍè9·Ê³žÓ3>CïÅ‚r¤dJÍ yç—Ç"°õ-{Êź¤ÅàÈ œw›ßpl].4GCÆL*÷þÚþõÏíŽÆÞ–ÅDNÿóÍkæýW(Bkáÿ˜õÄ–RJ"„®C ^½G¶%(ƒ¢’ yÊ^°p£I-‰¡3*©’Áè¬Á„UA$¸®Wˆ¢Ê\ Å•E•sLaKC¦°S'mFáY6¥‘L÷‰Q\r1ETÑ©‚ñ–|£³NÑFε†g£i Fð ŽY™¸ª ÀDk;ãKèRßVIJê<33ºŠTìÌRÅ^2d æ@\[Fe›3:jAÈ)KÇ *ÖXƒ·Œ+Þ ç8gUi4;“¢Ö¥È@"mæÐi2©©:î&Ÿ„ÔX›]d%’T2Þ a´&±a!e…þ\Éd]'!—¾ÌXêðPß%Ë^8`HƒA®si JSê:Ç…cMÍ0c"Åy ¡kŠuʤYï› ô ‚”`»B1v>Ch£à²ë  ŠSu)Dg§’éØáŠsó;½5Ñ1•©d0ZK3¸…Ūï£ÌâÕR¨N‹Å¢§Ø9§øÀƒ_ @c+ ?'PëÑo„óN¢(D/PÔBj€—/?ªEÙ±ÈÒ¸V µÎ¶£ÖcÑA{ð¸ÍÕæ2ßwçtù̾u…ñfwÝïþ7ïæË–LÌÖ:Nb !,6ŽÝ>]-.˜žÑ8kZìwMs]Ì'm£ÍÈ-˜í·:úÁxàäã ¤¨ôœ [Üš1¬¦ž$iÜ Ñt×䢭rÑX e¢ö–)è¸;'1›Éå“z‡Ãb÷üx¥ƒ£×»ùmýª(©Ó #Ìm*ë•õ#Õîªv¬PøVgŽ •jóvÞÑ÷–@œm¦‡Vû;ÊÊd+£ÕÉh]YÙ8>Ùfc£éoñŽj²qc50vd E ›äecR×õÒò‚¦Ézìmõj… îqÒ™”Ó4éÒQ¨¶zöK“­‹ÑM*I>\-t%»¬°è‹º¢9 LQvÌëiÝ.U\…C{ÊT8ÃâlL™4£Iìù™ÎÉæãwlI]߬ú)œk«ž$p®ËÕFäA!‚TĦôÀ|ë,ÍyÙ¶Ú ‚9îÅÝö¡-4«Oh $rùðÇèÄø[³²ñ`±xO’Bϯäþ¿™îø½e΋gvP`4޲úÙíÃû–±J 鯝L¶¼h1…èbêø‹«á®¬bs.äÐWïé?k»Ã΀ddË€À뫽¢%KEÑIG[¯<¾Ø•ŠÃûnÉ¿|<ÚS/h‹]B ¨ÑÂÿ+4ézècð B¡J-MEAŠ™1«ÇÂê˜ t¨mÕÀ Ì Öj>µ“1DPLÜ‘65Ë‹NmÈ;‰¥T9±_N›¼(„.·Ç— HP£‡¦·ì¶RØiEl¯ÃQ˜¶8£%©NVQM*——›» BF Y`¶&ŠÈÛçY½*Ͳ¾±Þ BûäBKêèø°\n­w<ØllàšóE䀢K›¢%B æÈÝëãÕ=jÀfEfQPªNa𬙀õar`´U4fKÓѾ5aU@HÒ»ñƒÇ³YI¡˜ š‹¤¦ÊÁ©’I¤S¦~ xé*±š[nˆUâEȦéA"ȼïúõDÒ¿gûÜi'$,P~ò㑨Y|ñÉÆYˆ <6oÞ%Ð$MÉÞù•qý¢xüïÏ<`V“!Ó$-‚Lïúò†Ø§üÖ2hÓ¥‚ËlQ5 ‡ñWïÉ  €†ƒA+Û–IU­ÞóõÁÓç-r×yƒÝ¬fUàP>¤Ê&Óz)2ý̺“¥ª™‚¾çC¢(–²H¡4½åÏŽ,^0( Φ L€êª>äB#{Ÿr‘[ Þ›£G…¯½c­8g/¨/®¼ŒdHXXEø9ÍHd–?c @"QƒÊ™Ù4®L¾'ƒB­“ŽLò¥ÏĈµ¸,dVØÙî`aš9A¤*’™#2µ˜§ pÚ‹`PT9”úè’u ÔŠ…£Ë”‹¾¨4etF©çܸÌê€<B²†Œ-jMÔ)$ǪXTEr Y)Ï(USgŒgrT¬8Ù0Äœ… š¤QT©a, «Š.ûaµ‚©+²²T—Å–S£ÎåLh2T97PïÚl\QY²""™€Ê…™)’cœw @¨bÃT¥o£KÌÀeˈ Ñ(@¡ ‚O у“Œ¤d ·ÐYJĤ¬ÄBÐGgÙT©µŒÕºŒ¹§d<¥Jž¡1egU]Ʋ$$,1¹~fdºR²59’0I€è / 99C> «fO…Íe$;)²”jÄ"ä:RS&ꬖ•”1bÔ—Æ(@tÖ7cÈMW$à ZÍÙ"e`fC%6‘8#©g±Æ‚k¡°Ê6CP%,àÿe€‹ã?p¿?¹6ð¿²CMlLûWŸè2À¦wï-^øË³ú„Z!Vpùßm°à1ê'n¬þô,ûÌÇtG^¿¡ñ·}pÎG7QvlêÙ ÷üÉýk¨\dÙùæSåo?Ó\ñ8ñÏÂ58DâìÌkD[kzïÇ«_~~eÔ‰ÏÅN}pPæñyÎøÈM!¡¾òêÒjWBVF¼ð«‹öõŸ>3;ºã‘Ø%D.ÕjìyÓ8Ç Û÷˜é?|¿»ú×+©¦ ÿ÷¿¦õŸ&A†ØEZù»[6~ñi ÁÚȬ톬þqð² k# ÙfîqÔ„@ÓÆ§n˜žð‚¼g“µÔ]cN}ûþð¥ŸÆó9oþýØä…çÙsÞð ÿýû?âªþŽWé(†G-—Ѱ|æÓ‚º­¿³¥øþ¾à)õ¯Ü5[~Aó°­Œ˜Ì?º÷(ŽÏ93?¦:¶QsÿTËKŽš•E…¢ë«t¸ÿ†»VÜãÏîyǦé?o ÝSòàæë;P>}‚»;˜ñ®ÏMͳNN7^×Ov’»à;+[ïí­·OG Ëg.Á7tüpHПº;ºðý;¦çʦ Y&aQˆ³^„®ûêƒ:°Žú—ïž½~¼ço†“/íºãîqYts9vÊv“<»vmgϰbà˜ÃMÏólþœ9Þu~{ä@š~ë¡æÜV€»}«®«ÌLÀž·öܸy©vqÍỺòô%ÜôÉF`¡8c[Ïc´ª€y ,Øä¼zpÄÝz«õÞ®&ˆP@&µ»¶ã´çŠŽ÷ßÿÐ`¸e>÷ô`ÄqmÌ)@1 S¬â}w5ª‰ò$ÄïF ²g‘Õä}ð:­z)S…„°¶anžõG’¬ÙR¤uF¨G?ùÞÑSKŠ¡Ì0cš»"ÖÄ|ÇÝè÷vx€:Ad…DɶR„ÞEB•§Ù·~Oœ8h¬úîþሓ( šÜõ2­}ç§qû“Ó@Ôv^#B¼æ…R§= œƒÁÔk+¶aZ¹Äßø ÿ”AÙK”±Nó—¦é¾Ûøâ§.üàcèqg綤|òpDqôh˜ mÀ~Å6šñ7¿Úe¤Ÿ¹-|þ3™Ñ­|öÖð»ÏèõØüÝkÆtîqœ°äU ,MWû‰sv”¥°,ô?'€úô‹úM—m,6>óãôØWÒ«o YÍU¯)æ¬%Èrû?+Ï=Ž¿û·“`žu¹ûú‡×Ͼ|¡ûÂg'uÓ›ôÇÿž%ã¨obø×ÿj„P”[.õ ¬“åáЇo@ŠŇ÷vÿñÁÉg,f5öW§»Þù X“õ´·oª“bc‚ßF¤Ùö 𽇍œð^;xILŸúX¿ú×l®qãÍw¶TdÔÿðùé£_œ>áý0ØRA†æºW7ÕûÑ;°À“f ?W‰˜ @-” Ð WjÛ&øPt¬&ËE/T꼡²ÃåбË`”Š<#µEÀ@¨,VÐU.Ra0ÇH™T±Wd©m*82³zV×4؉M‚9vS6öÚie ЛNxcsŒ¹ JsV³X§NµSç`ªH n©Ê™’ZhlÌ•"LYÁÄ>ªÕ©B†u‚Z2GBt¥7$È-KD©4®n¦c±* õÌÀ@l+è\E&v`ÓDRÁ:×ïë Äì:*Ñ\Ù+‡ì<ØñæBÙ"ø ¹ÆycÓúÎkmE!‘j—¡û Û†Ìó;½•< ÷ÇÈ`Œ±%.€(I1˜­î¨f¤H&{t“J"«–}n)C!T@æùú¡Ø$Єí¨u#šŽƒjHµ&ÕÞI‰@ra¡™4 fa !h¹…Ba‚áBiòPˆ¬¨SÇÒzST>0 :ôš£"åÖºY˜Î—¨Ü/ýiÐ,dÛ^{&™¾C’Ùœá¢Rm`Ãp\7XÈešéhã²QD….Nc;·©À¶ò÷O›6[Š„Ùt1»·(*0ëúÑ™ß5ÇG´÷I«ŠùÀnÞ=3¸¦õnV-vTÔÝCë׸i×7î<HÄtÎÄ(Á‚„Èè…À,T»ÂÍʦéÖ• Ó²µßÏ«#™yÞ±-ŃÓ{Üæ`ÁÅ}y~碓ÂáBÝ¥öè­SQ!žµÛõiêV±ZÎÙþÒtÓ@!£*©!ÓßÓIס°§HbŽúA4«Ó^nq±§„ ¶.loQ³ •Cš­ët³ÕY·N…a4bIk8âÞÅ̳µf’XsçMêG•£"¬·an>/y£ÆèD#×Ï2ãÈjè„©™ .Yß+) äЩLSjŽYÏlZ›ñ„FA  Âkjg¹ìeÖYYÄë~ãhPP9åš+[“Z®¢™Ì¦BÞŽºn BØåÅ@(± IÁ9Þ0–BB´ETGEÇ"8©N-’²Q– ‚€HTv1e[J“#±ëãØ‚’qÞt›œZ6&b—"Ø  d¨'I$*©ÔMiê-‚ªQ%S¢vÆ©w Š’<§ÆÔÄ$B„Dq¦À™ =×^AZ@Ê`;‹`@%ßÿ¼{ìk«OL±ÿð¾éæœ;ôÊNþC¢?úÝ¢€xßkooóåæÇ¯8”)#ˆˆÿÛ»WRE…f}P€I¾¢™É6ÛÂcR6|ý¶»ß¸Oþà5æÇ/=¬,Õ;ŸÖüàíû¢hïmW¾õG+'¼í$Ï"ÿø¢ñ)ïYTJÍçÿbãaØéßòÅY'ˆFÀÙ |íu3Ua4»>|ªüþË×ïÅ"i1}÷•‡“ yù «;^{wRT£‹o¼ þç§OyñÔ}@ Z~Ó¥Cç-e¶†Ïþ;îýÀžÑ›¾ÛýÊ?.i§ïyMüÍãè?Žˆò¨kœÅ[úî;J36€î¶×ÜŸÜ‹»øñq×¼¸W–*YIð¥M³\¼ëRÜÒW“l´‰?þW£‹Þµ_ñ’ñ}xC};†/}Åh›- ‚îèßÔµœøÆ«eÿùý³Ýïß»ö¶wÏ}ùÂÊïÝ>ë² ªb?ÅL~p —€„HG^øSxÑË«¯?·‰FDøÏ¯ÃÒ_ž*ÿöÑéÆLE þ_5?zë1BgŸvõ¸Üf… ƒ¾_Ïþ¶uå,ýî jCRTZ|Ëqé®?ý“¹>ÛŒßøéÕפhÀË~·ž?¡àc ME+ïý~|Þoô/ûÔJüÔºGÿúüþky% €‚é²þñÕÜL („*l¦âwžtde.Í.-è_>åôFEQ½ø9ÕäצO¼bíðëGåÛsÓÒ>šÆþt@`­-áÿ 1J*N²‡Ÿ1à#K…©v)*0‰i²Ë`²%ßëå €jTtF9%PD¹A½1‘ÄM}`RÔ;·7}7¾En;2* €sof?¿@IÅhµg7ŽúÑØöØÍ“”­"˜ãÙ{ðwá³/µÿøí0X=-;èv<Þúš­dcAþÏÜæò$1‚¨J“ýëí]1 fqK£ãzc{µßjËæ@8|,æž•Q¡~ŸÊ„KCìnp¾¦ùA÷ö \={‹uÅ Z¦‘?~œ6‰Ù˜© VåšDÁX‰Ã%ݾ 7uì5æBf<™Ìv•7Ád™&=ºÏ..”H*Š};?;ƒ%뺣Ój„ŒÒ÷ns lTQUŠAxÖ0(ºÐ3Yu£Yœ¯3¶ÍÎÕ.õ—Æ S-û˜f9ÙJšõŽUVr5(Q´U‹`”k‚0\žAg½ÄÁ€ ;\Œ'Ù×¹\*!!âô€Ÿ×.¤„õÚÌ% æ0i¼ó4¿s¥€%Ñ‚wŠI9'飴Öû¶Ê}Y[Iv†×±J(˜šRe­C Êœ¬ÙìrÕ‘°I¢ä°„NÝ’p¹vƒ;fjÍÔÎÅ$èû…mÛ`T9X£YR!œQ%5âŒw…M¨BÞ"”9Âú`^Âô°-±2Ü$ìªY±ÎEMk®ïXY*B´¾N˜ÐÐ&œz#BŽ´2… ëºÌ‘œU9÷¶.1ú.ùäc¢Ð‹È±7鯑@Ž{ÃA˜>ÿCzijX, nzz]ÿàäyÀT†É?ÜO~ŒÌR -šžíªQ0 hjÄšfÖY$ÿËÖæª+UÊyÀ,?þÜCý/Œ‡Ï[ˆÄz@Åû?SÏÚDUÉY±Ýõ¼ñÑ/= •†ïž/r¼q”A°U ×)Î:“1BÕ‘yØ>Þª¾sãÆ‰$@~ìâ=^·^^Úã-‡…h©I¿ª¹¥ºà¡õ¥ÛîØ¿’5eÚýÈmÁ"Þs/·ÙY×R*Ä’Ò¸Âbî•ß30»w÷£Þ¼–æN¦…MZï´ª§5(笂Á­Û€³ M*'™Œ0AÅD¶8Í´Ç í ë{Fa'05Û¶·Û¬^hÒc^¿ÏUë{NÞØrte4ÎŽj#ãÅ­Œ÷Ñ‘Í2[ÝPÀ¹RkÖ­{W§R.º¹£²ÐnÞ ³™,‘«‹™Åa{ëÓ±_(Šä6/QYD†ÛµÖî™ s½Zø$T]lÙƒRÛÝsÇ8+`’þëˆò¦¯¬Î_}ò¤yàK·L#X›Cˆ¨zÆÕý*¹TçQR%†þ§ëG>ß΂†ææŸD-³dEÀœL}Ùy•гT;uQ&‰“¹·Å!kÌÎO…©Uüî—Ϊ]îN?%—dnüö‘tÛmäžQÀ¼ "ûÜ-þáírÖCätà7ቊÒdBYŒ`I°sIm(êÔ΂*âìsDËçlBD?°¨ †›ú aö7¶_5Ä ,¡lÀ Ü÷W48ë6“¦&³UÔ€'îmWn?˜9Œ@ùsêXTHÂU¨~ý«N,A\›Rï©¿l¤“~¹ ‚©ÿ°SÒm¯öÎyׯ„¥‚@ïýSÝvú²^~¾ÞôŠý’¬KÈ–bûo×®cWä©R E¬Õ0Ãàѹ»üâTh\Ç×òÕ¯Z0=;jTAA'Á[ÌãD®LÿîÓsÿ¶ÐAò,8cm E*Á äá[Û𩎾ʔöÊ~‰jE«··lúiþ´ñÉ¿=öíoÓüߟ[þîï¦Ï¿p#( … ýþ¨ûàóÛóßÓoßóņw}`OEOÿ[=𪛺çþÎàþ?¼'gð/üƒþ­¿w°~ÿi;ª™ÿ‹ Šo>ûØöŸ,Cçžuµ)û‘Ã_¾7—ÿv‘gò@„ð3 ¤0H•°UQi°¬ê²˜óÖš²îë—ú¨eN¢!cÀ{ò¶Ð¢ÇŠ€?“³C™;ã+C„ÈT Êk-{a]I ø3m¶ è!ÎÜ\Qz«9´Ö”UENLáŒA²¤Î0¨‚t®­‚Îz–9Æ@QLe²…AeUD;1`11„Zd%€Ù˜ž!4Æ`nO )çÊi‡ƒ¥¨¥,æ„ n€¹ 8è£HvaA2CíȤ,ÖàÿR£ˆ,xý™0åÜf@Àh$KODQ!£Öž Àf½¶ÒÅFÆITD|„¤Þö=I¹ç­wY‘’NMÏ•–P±Ó”zeAT Á{Ÿ8<*VÃÒÚ)w¸’$¶k¤ ¡@@E@ Fp5ÕUQ8Õ ¦4ÂÜf,Í`s¥E¨ž RÐÔaoó|½{@bŒÒ³=„l6o/‘@œ«ËÚ8c\JUÏ« ‹¦‰,šÍ´IõBÇÙÛ¡¤ÎÎ/WTd—8K6‚~Žàçö}ø^óûz#Ê(xíÂàÕ'Â}çþMÏϽv\ÖâN”ÿñGvïKòÝŸ:”Å’zË”dšLR]ýãAqî›`Çfï;ÌÏ9tÊÞ"޲ æÿyíüŽßÞ^R„IBB=ãe‡W>{P?þ?*Uÿ¸gTðÙë×NzÑt×"ÁSÏ?öÍ7¢ÎÿëOŽ)Ö‡oëT€|ÂÅøõë³d­!É×RW¥ÕÍ@u*¥UPüæú\ÿK3[´b!wõöZ‡ý£•“ªqÒì\ûãð£n¸çêªËΈ*Ú~týFzVܼ»žÖ|Éîôã;»Í—õnù¦”Ò»å@–Ë÷º Êc_Oö7úã©I\Ôbèw]W`ͧª$ÅÜܧçípg~{$ÃiãjcVóÞ‡×a±œ‚¢äˆwÞ"÷ïOÌR;N®éÈŸ»´ù¡ûòY§ÚúŠãWîkâ® j…ëm;¡/bŒ!—ŽÜ ‹Õ%Ûäà-cºr®:Û9ù§AÎÛœ·@e¢É§-;æ–s'*(2Øvn·r_D‹~–…UK4– }èÈú¾I0;«å ëwGf?Ü?ÝsRÌ÷=È_=–DR Ü…ÐIôÈ=£Ñ–nÓ¾ýíÝÚŒp@üŽ9Ž÷ñÕ$õÏV%(Ê]:¿är‰ª¤Î5z” Åp¹³ÁÙÂü|¬«qŸT Xø?œ~ë¾ú¡³+E(¡2ŠŠíõ´ùضÞOÿ¥=ë÷6a¥4¥ ‚ì»Ï_ù̹Ý?8‚AcŒÎä’2¶w€Ô£k0Fª©;ùx­z ˆÓi¿º9*gE#hˆæ.„û®[Þ| "Â¥«ãõ_ ‹Ïtõ/=s=ÜÚió/·¬ Ì Sù · ™ŒEÑüø&E¥vV¦d"€\ ]ñªeεáà\.´0ž€¢P ŠÛžvÂøàúøG7à™çï¡#~F#þñ{áWŸçëš31OOíºÞ¡tÊKñ]ßkÄ`ÚÎY•Éö¾¿ ‹Y¿úmxäËK „ŒXõ³t¬*èŸy‰ûÚß­Š(‚(]rÞ8#(²@þôç‚Nȸh‹{¬€ pò+woüÉÝí öÔ»^’ïþ“»"~àÚ;>íe¾?Ïè§9ef1øÁ£!`ïKð?ï]]:iØ{v7ùñ;ÖŠ¿^,£K”lÏ¿¦±'ú€Š"â~õñk·¾ç ZÅÉ,ª‚b«OÞý“Y7“ÁKNýsüƒ÷Œ7}pnòÉÿZyâë–GúI:œ³j(ˆŠ¾pBŸþ4_ù*sÿ{Fz¬cAxà =ÿªÇÉÿ|h== Èe¹û³C×ÞÇlqÏ+7Ì ®LvÓnå]…Eä'ýšgc¸ rI·{  `Aþ—aH¾? ©¢*&j»ÀÙÔE„¨>—óÎ)’ú^¥œÄ磤F3I´e-tà‰Ñ©»ïªÊj-zH©o‘µÆ‡…iÙE0‚Íúl’¢­–4ZÊ®6ÆÖ–;Ã*ª*HŠÆ æÚ‚«†:D4ƒÊŠ0V NëÚ÷$Ú‘C! G£ª‚ŸóÅ8˜þq[Äp@ˆ†„êª:º’2”}4Õ\m´îõe!6¦4 s‹«ÇfYM«€ØÛâ«¢MãY¡¬só¢,%KÌ5‹’ÒÒ¶"ÅYREƒL§Ùøu=Ëu3c_sSwµ ¶,‚`çæœ› ™hAÚ>b& ã¦ż¹rÆXL † cƵ)‹´qh»¦† …)üd£èÜôpbcjƒÎt~úLŠÊ¸…jqä,‚ÉmtѨ"(UU7{ðH‡ ›ÏÛÑëIqì@“' º‡Ú´~øþƒ9©¢›Ë¥uYÒÌE×þøòù ?ùØj%`Ї¡íþÛG9gwN{ø²£ãù‚æ.ÁT›T+ 1ê´ž†ëIðÁ"·%€žsÑÈ €0‹‚,Ø,_„ÁÔ&äfš3Š iÙœm,Mœ³+Gi~`©`@ßóõÀŠ5Ñ(‡Q£ó å°.Ò†`ÏYwl& :+°·P!AUåL…pnp(B¾„œgÇK†|eza:ëWvp¤1›Ì¤í¦ë™ÃÆ—Æú3“ Î[sÈùX{oÌ” `Ï!«ëX—h­š#f7'M.ÏÆ8˜O’Q@4k_Hý’H®„iLyXS­èm; ª”’viÖt±ËPUUF©9%lF¥Wo ¢xo¤±°e˜¬Ú0Y³ó½ˆ*Ó"ž:<ªÀJAÂ,MrèÆ ëÞm^žêrI•R—Ür¡Ê)-"S€ÙæÔè¢Q uµ ôE’$NMÉj•ÅG‚lëM”â¤ö@dò´b5ÆR³Ð4 "w’Æ> 5&…ª1E¡ Š©Ã™”¹3»É¨#U´@…¤,@“ÎuUe²QãØB ‚1Z¬;Fµ”oö @H5 sá÷µšf=¶¡”Ö4Šˆ*̼\ÛDD1M€šJJ %ƒ"PgHÈ€S>rU0Ж½Í=b°ùäkOZ}çO&/ù\åzùà‹nk÷å&µîÕOwUêe$1é–—íßô‘³«—þfúá[÷o»v¯~ò)M"±Ù]píñx4#“¨PæÆbe^ø´ll!ð¥w¯tYAÁ>ý·7Ýû÷Ñ›_Ú}áÙãsÿl¿õ ]ÎÒõÈ¿«Šá¦?> ozœš/Ú—b‚à\ŸDà’×í0E[új‚Q@|á³Üݯ¾ã¸÷l¡ßüðm÷Í_{™EEŒ/zÎŒËC‘UÄ­AÀyÚûá6÷*/ ݱLÉ•_yó´Í༫ß×|ýÝG'¯tÅï?m-*ó¢'÷®{ñQó¾Kû•Ê·Þ|ßõÄp¨P¢P˜+ÄfÍ (&D JÞÍ[â[ŸéªW?u8hc@Ⱦ¾{­ùÏ'ŽÏxÏŽI“‹BÑgAøôçÌο<‰Š®kÁ0GGO}âêÁ7ßQ ‹3ý çÀصNLÄ,¨ã—åk©‡Æ›F‡oø©ßnFþµÙlÌÖ÷»ÏŸ}ïÚc‹¯9Õm Øeƒx¾Y~÷Ãô™:šÞ{¯Î{åñx X_ü— WΚ¬q" Àkm6›ÞúÀêy[ýéï›YÓø¯~rºåw¶ÒEŽÑf¢,!v¨0JiüñŸ¤WœŸD|˜¼yYöêb,0þÔ=éë-,þáÎ"’üèŸ÷ÛWŸÒÏ`±o€àç²¥ÒyR!E’pt@p®ìa›`¾¬™CÓ1û"Š!R¥aåðHƒ30÷ªæ¸‚Ä*¥¬€’UŒM"`°´r5l½vi-V@EtÃ¥})#-p i’¨&2BÖ—b¢–q~“%ÇSŽ1d .«-š’C¶X 4¹ÙP—ŠbÃm´@Š€”S¯'VkohÚ"# À­q…dNv€ÌÀÐNZV­Z)lÙºÑu1næ þŒb5?ÄØY Bºê ¿nð%‹…ÆÌ ‡ªw®Íb´žæ Ð…¾4"²<_Ng¡ E*—+£ƒFŠR€P³«{f±€Ìävr½PuÔ3ç… jµ¯e¿Ouå`µ9Äpƒ>f0¨¥™8£Ã°Í‚ÆÛëUP4+¤£è‹’‹ÚÕYÁPofËHqÊœ4 †«ctVh°$Ù |˜ÚéÑ5!‘äT 2 Æ¢:Ê@ÖjÔ²¢¬n0WZL „,ÄPd( S ’÷zø€fU£€j„êjqµcv#I>+D—7£"õ°2bz1&Q “”jŽèU½ªK¬1Ì€¶_9«'3²¢³¬JDLBZõ¡d" Ç4ûAU Ù‚’C!&»É³M÷©·8?«m—XH¬ïLò«‘QØ@¶æ%l¶N£É™lî,+X(ù>ƒ€s;LÀ‚ÎYžÁT  ç²+UÉ$¹¥««‰OV@Øõ{•”ÖEJF¤ßËd(ÙA‰¢…ÿ¿Ùûï”ç=ƒ²nzÞÃõ›_m|h8xÂÕðØeϼÎÁvïï·£,î²a¾ÿc‡í•½ôПϦˆfð”üq¿Ûâñ>>îÔÑuÿrLá² ü=>óqö,m„Jôƒ/sØúâҰƒÙj?ÇæŠÚ:Vß;÷ÅRÖÖlÉ™ ^ŽÿµCÍ^ìÖ¾þ=ç¢-à—SVþUi :Œ«­Tíæ3}^~úasÛ ðU‡ë-h/ GÅo,žTõf50©¿èŒpËMÑÂyK±`8»WfÁ  Ǿµqøþ¨ª`{Ò”¾pÈ—2çtÖìq<÷èÕuéèë÷þ¡ê´ÍÝÌ9a"6ÅE묋qO$ QŒFôÒè–[ºï-@qÅF©0u»;Ë¥  åXFjUº›Ž ©\´€aê5¥L¸wcöµcB{‡ƒ%Ed¶g:< dÊ Û·ˆ!Ôœæ]>ÿ¡CG’Îo)ðf³p|™'ÐÉ–+sÚzÒ[*Q’4t4ûéŠ;q;SàòîÖdc†C ÖªÙ»VaÒWJ9áreû6­ÍGvÖÝZÊ…GÅYth’ƒ[¿ÑŽoŸÃþ1À]Kl˜MNsDYaÖ©Lî¨n]cV [PF4º¹´ mN[Ãáã4Â]Ya9G°ðÿ‘tëçp¸< 5½<Äïu“ïà¦'_Öó̶åÇF²u^ånÿ±ãíTyïç:aähŒ¸¸é©nêwî€Þwf!ž÷Ì'Ãù¡bE5Z˜é×¾Ô€èÞgmÍTÀ©'s‘­ `RÁ-O3êºúqƒL*uGd²îz. ýÖ»Öv}poÙXMP‚âÍ?¥=î!0n«‡¥—œ¥CëN=1=ðªŸQsúöªóðÈKĉál3–SEØþ2è>x·ãÖ“r&ê‹Ád@ó¡>ز’ŠÛô"žš!%+ ʱãªß¿°òÎ:Í0F[X~ø%ÁigF ‚+.vI*iW"ƒ((*“%û°“»¯¾óðý׿æ÷¼ 1Mí¡Lv¼JV€P*p×+*S¡«B,¸%¹×A™2*&îCÀ&¡–Ðjv É¢ð†EË8άñè½T¾¤²#ÎýAôZøÌÙ9hK?0†“2Û2ÔÆ‰YU%-®<Ò»ÄÁÏ!ÒûÇaîlC6JÚøüÍ.$•lZêNý­‡z×ÿè¡ÞsgC;OÍí׿ߞûÔAûÅûãx¶å¥úÚJ¼Â Ù þð¶c£lO~ʰºXC:i'*Øô›&óOºî_ƒÖÏÛ+—Òì¶Ž{ÜЩ†ßkpÕ/o¦”}ÎÀn½êîã·ú:Â侟®Ln˜ €*Pøæýéô³tÇîÙy†ŸŸQ%MF€,‚[/,šápøÎµò’%ôì–ÏL§ÌGq†&·r|ëC͉grÆDY½j/ERhÞ?ùÊÙ †¾0¤6{b£¦uZ&¶‰[AçJ`'@È`yÓÃÂèÞ)lßZy T rVN[b:ÅàÁc+ógš09´¾}¯ ó'thÓ…[ ¡ ™P y`Ónœˆgsr¿8mv˜ nYèƒv¾S F ?¶~ÏdË‹)ß¿QN@wmró;ÀnC m«[V¡Uáºçv/p™M%n:­…ãìpS—VSšÝ^Ìï¶phÄZ©Û‚°¶w¸lÊio.ΗÔh "ÈöºLœì\ =#Ý´%ðM¦TÎí¼‚z;Xç9œçÕ5Rt“ý¥[Ô\.Í@•ŠbêQ׎ˆ({¤¢ÇœólTpŸ]‚¸¦å<Âÿ²Bˆ@àá¸×°Öì ‹ÀòìG=eÔœS7ïÓÁOÞœ—/Ð DÆ´5>ø¶»Â=$\a}ËgÂàƒ»-&µzÍÅ+w­ë·¿÷œ_@Åëÿý©FTN¿h“½ú§˜Šˆ*Íw>µqæ~úùÏOÁYïÚlúœ¿ö×£3/^ŠÙà~ð¹áN‚ `©®<¿¥9lAøúwB«ª „p但^²{në‹[)lë’cÄÊ*ces7È¡ò>‹üì_M÷¼àᯰ´Ä5$þ·¿šìýà`ÿ[oïžòÆ^ß  "j‰AÚd(MíÇ>;ë‚`R$hKrÉçXcRKˆuØÛÈ0í9T4Ù¡Á'<¢ýéÛ¼øáö‹•xmS6>\~j :órÝýÏ_¬î~ÏÉæãÿ:½ìí;Ž{#o”¬ÁPUVDP,Øàlõ-?lyïý—6­–ˬR( &-”<ñâ©=®Î6ÀwÞ2Íš7=ÅžzíLO¨áW5·¼jÖÔ\ý´þ./h9T™Fo¸-üöoëqou«ïýQó¹ÿòû“Ý÷^sûT˰íÏïþÁä),‹mšÙ3hÏ|sä}×wâkliø§§åªlœØ¹çÿR>¥ìn|sÇÖdî´·v.4`v¿iÔ]TçýÿøÝ‰-iJ¸÷µÛ¶½éàJM2¶._ŒMeòÚ‡o…P"Ï¿aÏèó?Õ=oÅ^ zç™7œ¦È„` › ú…A‰­*÷¬YÕi+I(ç˜B}RÈäœS™`4 d] -kšÎÖHGÌ<'çÞ—’bâES hp–ê'4¥ÍFÑ.q˜zè³™Ø-Ùd9×¶Ô0ë*ä ¦ÉxÈY=˜~߀ú®³Ä!ª©¢æìcQx[ä s²IAº6«j G‰µ™¢±)´m—¢"¤ž'«5hÛélµ*»vÚÕ¹Ä3ˆ‰#‚ÉDiuc&Š¢Ñâ s슨H­Ïˆ£Î(uŽ]H©bJ£+CÄᶸwóØ”ì…nì §mÛL³„ÑFw8ˆ.ÐVשÇàIóÂâ Àï…êf.®‹Ò±.•ý ™m³œ+µ½]"(|>¼:É ÅCsÛ¡@ sƒfÒMfÛé u™… iT§‡ŽÉ±®œLz'^¯Ó©›ÛXâCH®Öï;Ž;f¸8å(…7~p0ŠPê­Æ\$ŒnÇãÔ𱃬ŠRMm»!¸YÉž—$ý÷ߎ4!âºݽ2v$HCˆiã˃Q5 Ó°ö•ïuÏyÎxå éûŸ™ÕÏ= D E@03Wëà ¤bS%(Ð5®iˡᮓP'ÖöðjT$ )Lµî—£õpdÌ2ypSö¥øŒ¥(íòœ ât½¹?$0]Û°'ëÌ|Ï€ Ò4väZžÊЋ]󺚄¼í/ Åé( 8 ’umš@Å0dÇÉÀÌôQs[ézT€<:›»Ú<Ã4¬}râ MToSl€T±ç™ÒxLV´(SlÃ8+RÖl»¨U£('‰<3#¤Â¯†H½zìz  [B!¶„¶5(kѸŒ°Îmå$ëY¡ŽÒâ©‹\6â³´ƒ;cmœ´¬BûíŒ[ÂΗE…@` ]›sy=¨¢²’RmNâ¤pÔàLë–Zm¡6FÅR¾˜x-$$h½'/`C×Í2!·˜úÕÚQF60KLdœaP ÍÁgm ÔʽÒ#‰1Œh<’õÞçN£cöA —&)Aã™ÀƒnéO2¡’¨èŒVxqhh’rDB#j´ƒÕDƒ†M; 4ç’ ‚UÀ¾zóÀóo.¯½ ŒFc«|`²ãoO<üÖëÖ™É §Ì05.ºpìE·Æ—¾,þô-M‚èÇ>H¸øá³2Üþ Üþo4ÿ›ñÿ<Ù&¨þƒÛÚªÓ^»gÙ“ß~óÚ£¢jÿèÙf©¢[ž]ú&ÛÇ=iÛ’ÉoÿÊxÄÐçüCOh‹„¦¯–ënæÀA†¿þ‡Ù)¾åÐ5wA@•­o85﬋»^w‡›ßùõS°=…'=snë6o,L?ññ‰Ùü¦sÌÐÊþz« Ï|ñœ^yëMÍÆL!«Yk Üvíäèßgê0çw}""—¼~‡ÆaÑ]øâåæËïÍ/xòP(vïø^zÁ3–nû³;XL6§½mÞŸXvßyÿš0ÐkŸ(Q€é¥~L9Sþ§ZŠ0Ó×\å.þÀ¸û—ûó­ ˜²Šùß?939lzã‰æ’¿ Iˆrœœá`O×ÑbÅ3Á²öñ¾¼š"íþÓ“(SFEvVH]yëá Êg¿·hý9[ˆ‡64ÿýå#󯂘pÎN’ØXsìíù'.ÉèUíI/Û´Ð0kQÓÜ5‡ÛHØ;Q~oe-\3¶…‹/>Ç2ž73õ§E§:÷‹»¦{ç@¾ñýÉÓ[òºõ ›ÈI{"ÎYD Áþ§•Ï|T±ýy“hÁ 拤_þi¸ìÑÅè_o·O?k ¥Ùþì‡Ð({ãõñÇ-ÞñZø•Å€Ú;û—CÞ+%H¨À" x•é,·MëJ©&pÅÆ4ÄIÈñÈJ‚Œ¨ ¤¦‚ìgë]ÊÔ<ÚFFŒÁY#¢Díl CcC Š×§Ó–•Í®=Œ2O»éTÔPÛÔ–mŒQm¹xü´›Ž¦, óʤQV@TCÊM€c%@âBp“I#ƒù®ò3’Û²cX˜ÛH´– MFè¶œ2,Âhc,ÒtÚyUÁ¯'Ô†ÃуmÈJ–\‡Æä¥¹> p×Û¸ç¾Ö(%ì’–' g£ýÝÁ©¢éûù@S¬Ýþ@dTZÚ¹­ê)ÞóÐZV4«±Š€2Ë®ðàŠo¸¥ËÀˆàGÊË‹á†ëïɪÐuj»·vYüd#úÍ[…Mޤ¥ŠM,ØR#iÖ6ß½¾QrÝ‘mƒTBv,‰¦¼]{ÓýÌ`6Ÿ8ðFÒR’T`¨‹Ñ÷¿1>÷¬åšØVJTgwüèàÖ?8=þÝuÍÊoôÇ Ap¡Þë#VW´ù3ßšh}õi…¸4y—M™7 çž’Êa7úÄupÂ#Êå_Ê –2“Ra±÷~b•/xL>}7D_&ŒXVíѼ®Ë=9X^|z4-ÿfv9«…ný 7t úãdxêù=ÍtîÉ€ ÑU€à)ôËš°²èT地®Gï²A£Œ(vž’Þkl”^¿Aá èÜüp"®U-ÁSÙS²*¨ñ®ï‹Í»‚Ôa.VJ*`¾gY-w,Ĩ j­ÙRMâœÁÚNaà@+F05¯º~9!WÎ £4ÇÆY´ar™UѸ¢ç­I)€*H7íÙ9߯yy±4ì… za5È“d’欴ÏkÆ%ešÃˆ%©m*Î¥ïÚh3K¶h|´Ì]¿;6S+¡š€Î'¥5w¬%B$põ\¡TíÆ´ºN¶U+IH:̨ VÀy]ë[Cç8 j°Šµå¨”D4$*!窢è«ÿ…ꌷî Ç¢õFãYö <õäÙMo±¡ }"êÑWµG^ÿçµd€íï=upí[–`#Îü£[ûÖÇ–ChGG*¾î瀌˜üÕ>üü‹ éÅkš 7ßBÀcå¼y¾ñMõ€·lAf¥lᛄ’B!€·£ë?x×™ïÚoLj=8P\XIN}ï|ÇÏÃÃßšîødh>÷oÕX;Ý(Ô§xÃè-.‘û¾´È_~ùì#@ÛðÔ«^i‚N,5ëãc”¿û¯ìÞ;vA®ÿ“ô¿tŽþÄ× h?ö»ÎÐMO¦äCèèˆ1¯«×ý¢å\Ÿec)ãäÛWÂO?²€õ?üymøúzO<ñ pä¥ûÜ»4þõÛÔèuh£‚G¾cbüŠ?†°OÎØ¨çº='˜f¦µEÙw-çgÈ–]vò´b°g\ÞYGØ3OÊ“Ú7€‰ sª‰Íêâòî’Ë;ö†•~aÙ›M99±§Úñ0$ ÞûŽ®))ï7½˜mÚ9µ¼è°£9„P'zα( >'IÖá™ólë¶rK×D’²äèÅ©ƒXÍÈÙºãlkÅÈíR»ÒߦôÖàÖ–P„•×FA †slmÛAÐ+»u³sÁyR À÷'VxfÓÚhâü]‰lÒ~xá/ÅúYM¡mÌtãÆA”Ðj’p8—ÙT’Í»k´Ü+@kI8ÔE7:ܺŽlJu»*Cè†~ʘAÅcewW0x´ØZŒÖ—I±àãb‹™¢ã$ÖN;ÌÄ©aRz­ç*MÚ°¡¾hœ±¤ 11+ @Neۥܭ&¶Ãÿâ¦þØïÊÆ 1€2ð®wæˆø‚³¬MÜþOd8¯¿÷û9 j\<ñ3óö³‹ÿ¼vÉ£Ÿ:å~ΰ,¬ù/:=ë&JZ}ûž¦"u ð£_`p #¤ŒÐíªÚpÏ*"KÆÇŸ~iùô3·Ë1:õÚ­iÑWlðÕïÆ‹ß71ý«£/}§ÙúæM˽»áZv¿G+Vò‚çfÕ•Ï-Ö­Ó¿þÕºu2ñÁYõ«·õJœxÕE4:úúÌߟN¿ùçñמT~þ¾¬øÐ›õ¦×­ËXÔñ·ŽÍß^–o*\ûÕo•«^n}šxýNú÷¬ýª­:8;£I„Q’ÜhJ†?øÂr+‰zëêªó†·tŽ´Mí¡7+½Ð0 9Œz‰ñâçõ7l´ô̇»“&­‹:+€: _ÿùè!ïÔ'­§©×,;(Ê;?rbü¡Éøìç%›ÞØÌÿË-uPÑ!Pl5Û@¸ß»÷cGÚ™tÿShDÝjGNmÍý5,ûåÊ}tÊüõµí_>7ô_ý‘Ô‹flïÕ'ªÝ_ZU94åÈ»2Õ&xÿWñŽM]—! @ ß!ö,&%b IA¸ùý1ð#ò+òxð‹ó+<Œ/-„ƒrüó{z;ŸŸ„›¯[|àzÓÏ>ºtq¦…‚Àߌ ÷ø.Œ4 ù¶n}ëCïÅkerZ®â(ßöÌùáy]ÎRÅ•³æâ§ù„€4XH…Rí|˜_ëYnVVF# €kÉ‹ª*O¨ZÈ ’T<–*@[³Q%…1ƒ:2;P žH În52N‹ãv\ ²Š(ŒA19½±­+•!¡Q›k=†¬®ëÔŒ QÒ"×P¡OB»Ö†HžLµ[2¯6îÌŒmD©QETk^!¬ß9¥‚f5^¬¼ Ç ãÕ(³[sÛC·OÒM&¯íwìÖª(Àk„¼µ/>M&Éžq^a ÿx¼£KNöMœ¶ÙV&:qÂ+Û(ì[ ‚éj911ÑèÍ‹ÒrèÜqP@,‰“’X¯?wsL•_7cHÅܨDìÄÑ覻}8c¶çj½ix™\ö‹+úèj§ØŠ3w`THÚ·ÐtQyHhç©£ÍߘÇé¼MÖƒZ˜„Ó-*ÿã£n~îUG¯ô'T©‘Š3ϬúßZƒõR Ín$uÑÃÓÀCIóQÒªB‰Ñ4‚pl^Ч\–e®ÚýÝ<õjk™Ë5!ËÆQ“u;©@L¸ùeê¥U…œÒ¤Œ&S½j2))êfµ‰n¹£:ÒS€‘Ée¤–DƒiÛ$ÍRby€ Q€WUš§6›ìF‰™F…£Ö)«ÈY£´dœAëÄdÔŠnVÇ Êêˆ6*[»6”Þ¸a‡•Ϻ›sp5z¶Óªm ÝQ\×Ú±ˆ ¼I°3$k%OmPuÅi¢¢€ŠÀã!æZOk¢1éªÈ±€ÈŠíNôÇQP!´# ’2­ÖÁQuêá$¦IÌ ±²pR°éZȽڱ@F1 (HÛYM“HQ•G¥A@3”m€ `¢iVT/K´&ƒ µ0ÆÀY…d Q+Ž(»å°íJâÀGDŒ~Ŧ˜4®AÅBd¢Qªè(‚„•ou« YÔ‚€¨"d#k0å›b¦Q.«f×jQ ¤•†N+™*c.†LGi“ÄÕ Pe{ŽìøøvAë5ÛI0døÿYrg·àv½ðˆ~Ó CÃCÿp(ÿ—+Ò/|rFaúÝgv»ëE׫ã¸n½o›zïk÷6°ý§çD ט9&Ý„T*ÍÊè赇{:çS›ç_y£îéȇ綿s6|þ{k¿aó]ï?Ào}ªòMtÕ·¿¹4®#¥dÞþõókŸü/§fãztÝ'æÏüØÉ©ã]¾ÎÊê0IòXü¸ fZ×mY}ékÕŽ·mKÛ\ýÛ7Êí×nR!¨Ùõ¬8Jh—«=ošƒ"å'>KG…°ÅØÏvØŒ kõÈþÆ ¥ê¥á¿8‘îÇÚc$wP¸?~úÉÅäµgC$ðÉöž,og§mó®ß.³‚Ëž— ±¾ós+úm–ï|ìˆC0ï{jæo~í7•ØÇ?¡•D¼6m9ÿï£áËOR›7ôAEP£FhÜ{¿RéI3õ¢-í)ÛûÀÆ÷âd°¯aÙ9i€jiyMƒÏÏ*†_þmUŽyãÏF¯QœøƒÇœùm¿;Øïy˜X4(¿ú“æØQ/ºŸ=oÖ®ì”&¶gžD»¿¸oðWÀêÝ«S瘛üäJòw'Ùã?nv¾aÃð¿_øè©‰›þ‚מ\üϯW™X£>ãiöw¾ñEvbç¥CƺùÐàDµøØ§÷æî\ µO˜aæŠd¸k÷ÐíŸüO³µj†×w¬üôº¹Tស,^»nxËíË÷»Jë1ªMX¡´<ü¯{¬Jûüͬºõº%ÿ’í–•€høÿ3‘E 7â„&ºä-v£QѹºìLëBÔÆLõ´iÑäÓ‡ƒÊ7ÍäÔº,©¨™|* c¢— ö%Ši@1“–MÕ¤=½™0ÝÐKœ?î¹ãHnõX"H ì<6‰ts2Z³VJcc§ÐA³©U–E—UDÞhÝÝDhzӅ¶ZšÞÊ!ñ $$Ä3õbªCÙ ¯Ë½QH톫‘Aª’âúu•BÜÔÒÆ j ž”„Mµ!ŽósÃbb;2cJÒ¥Ô+G+Aµ21›bØè®.éa €@s‰¯…h€z!Ÿ°mÚ’Hæb\;"xšéÆ ‘R'œbDPM¢Ä-’OOí0( vùæ9?7ÎÓSQµHIjLpùìFnÉëœãÞÛ† ÆlÀ+v6ݺ9h0ó{N¬Öu«PS3XÙõ—q`Pçœ×É™{çù½MT\úõÌ9,N'›‚Ý>ÛNot.;9ÿúþªiÇa„´ýÁN|d_zh3Íýj<óüÓjÕM);ûd/"€ÒÉ¥‘ÉË.[|õÝí9u±¾[G`oH™ÞÅg·ÿuÓhî…Ó ŒŒËTçªJ€,L9¯“ö®Mþu¡ïsvè1]ö¶hu›´QÆ¿üSó„—coZiKáÆOÖêaÛØiøEUÕ±¯!Í•‚PtÚ9ÌM¢”Cë¡ÄN[«„| Ó$I§°@ލ 9IݰŠèÄÐ@«:P6MÚ@i´)t«„ëï;¡¤#º—¤‘­Ö”æ=€ ™¬ÛÅÓ±ª“gIÖë(ã2qíȦdUG#”ªð “rÃhŽìÔ†ÉnÃz)h±b¼…=œí´€±”.&ÊMµ‰Ú˜Äyò“´²¶X¥‘LŽ**™,sÖƒjÄ*ÎXP1£Þ` %•6–MÊ^!1C¥MžVkN3°8æBBb ‘ïÎÆØ*AŠ.A:™t\«mhBe ®¼öÆFTdŠ”œ¡& R¢B¦ZʘUÎÊ’(ÎzHâj(r•5SRO:VI æÏ¸4IšÇ" ³0ª^ží´‰b…1FÐèl× C$)2ˆºk–€“ EäÞtZäÑiëÙ‡˜¤‰MÑ,:M+° £I´É«.·‘ “ý¶´èÄŠ–©2… |s¢•Ï‘¹F¤ÖúDÝ`0V‚! ¾öØx§ è¢ò¾7ÙJ£YùUçt°1êDýA„dtÝmúáçZ`šyØáì>“7ÜyÔÖÙšÎö±•ß­ÅŸßÞ¹ô<jG»÷Tc/g?¨7óÌC \ù³zScŠxü†¬J¥O­/ÕÃ.]ó!ž·Ž&_~Ëá™_/ÿy(Ò'¹dyåÁ};ñÔC'î_¨yyã|½ËƒtîÛÅÍ ;¯žÛÜ'ƒÑœòÄ?ŸÒ×ÍÝuØQ‚—lM½j59Pª©ñ®{V“û„ût²ˆ–ÏÛÓžÚ3;ýÕ™çæk7ê<`Ò™î]¸~Êœb,MUŠAm¼ .îFVº1•:ý‘GÇý¾%ˆ!JïÚ?½fgV£7âØÚÓNœß­=r lÌ9GƒRS§MÉø†úÈ©ÍÊá€!LÁ†KòÐêd‰~~80QÒÈû‹´…CED-hÆZê#kžN+}àÞz…Z­´Ú°PoЊ0…ٰñ÷™a_ÍΰêôD bØiÑz)ç¢[×I¢B7Ÿš-I©¹1Á @¦«•q²Mˆc1i/ˆ?9k…­žêj#èÉÙz2@Q(X[81^j3 ºÈK–ȧ1´8ßhŠAцœtÓB4‚¹b2^1$žÌ„À´ÁˆÜGY³ãV ÚA6Ýí. U+ïÙ¯ÍÁl¢cÓ–ådnš*¶lFÃÖW&…úI´ˆÀŠ4@T€êð{öëõ§(E2õƦ“¸Jž}™3ý½r|çÑ;‡_FóÂ3“@Ù—~5ò’Þç¾yB]÷b´fDIÓ|ÿsÆHDc@T[>|æLÜçÐ}èåþƒÿ>ЍŒºÿE*¦´ù9cê¨@ ùçƒm„3ÿys‘Q8ùudûÞ8gž§G=ÅÕŸÞ²‚1ï߉ S®tV h¢ýï¼)¼ä:-@'žŸüF1G^w·ÿ»þÆ×™úôñ»Ÿ…Óï¿ 7IäH€HzÔhÏk÷4ÄÊ#Eëàq×uRÔ†ÇÆ€=øæ[ýÓ>´É¡T§›V0|üÇõý>ÒU}ežöwÛ$éDL.½oÙ¼âò²Óï<‰e%Ù†ò¨9Å·¿ô˜!}懷aÇ(Á¼&BŒÀ»^y4¼â³:‡Ô§”gØø‘{¦Ì¼þÏîioìf Ð å“ãéÏ^SD1à“àu;ÿÜýê}W%B/¾Xú|Ȥç­ZœÕRRøú¿,ßÿ3i+ªQÍ}ÿgܼíN<矒0 Ýì™U…QkµÀÿ"ƒ 1Mu´Ž”òØ®=ÿîV´0bö…ËC°:D¿ñÛ•6c"å»þÇè÷?,ÑT@˜ª)¿ëùûåšký=Ï;ÌAë¶ãÏåΧÿJ¡ÈÝ/=lß9ýÏ»V™"ø(?û-MõÒ>ó‰U:-L5“‚ÿ%Q F‚¦@P}ZÓ&NǮ怂ŠÀшrbD`×FÍy%´"p"Œ• è ÖŒŒ@Ê8LP¸¢7tœÎciª$rdÒY'1¢Š4-l%—Ô”HQ”ñDÊ;âH,£5eÐ$™ ©³ˆk–˜„”˜CEPD°cD|«Eb¯A†Y ¢’`C’µ6RpÀZ¼×,.åŒcÕ4$±€bˆ½$脵km\*BbA¥F9ñ¢R¥ã"£ˆ``­-pk)°Šš³†Å‡¨LG´Eb£*P˜Z6ÁDµÅˆI®Yx-:a«t ¨,u”ŠPg¹ µÀL»„U 0 )Yi FôžWLj:ºŸÔÂȃQQÈä¤ À@P :",è€a`T±$.HÔ¾êÅă!m¡.[—A`$¡6¶9´ar„Șˆc§=ù5±4äF•±3i…BZ× ³bŒ« YÁ4¡5 F¥4å IïlÃ[0xÒ9HuÏñ¶ÈKÁ‹7jjó_­«úIÝ38zc 3ÌiwíµLÁñ]MÞ\0-=‘¢NšÊÏ¡=½˜šˆqáÄüôY“Yt ¤'OOTlóšaÃiªòÔŒö/ñQ Ro½9©OH^eXKœŸ«H:pÊt¹t‚8Ï‚qî×ù†õ­ÕI[œ6‰‹»iâôD°õÚ\ulTKZ0B¢Lÿ´Q9_2j ‚*‹õ 4jr º¹a\¾c@;{¸¶³ÝvuÁOo¥aF¤.ãh€–šî¦T©Ðß´¹Ù’ (mÔ4f·Ì*ígî¸+W.ÖîK¦]tͪ7.™Ì³°g€L¡ê12 ×U“$Ô‚žÊ’ˆ:â&ýÙ`bˆÃe×™iõj5´$Z· ‹mäJÇQ-•°Ÿ*×w}”ØÑSœ°3®rŸ7ï˜{çî:¢(Q§}xh«öÞßzÂG>urvªp P`¤ðÅï– ñ¼u¿ýbiX1„k}Å[ú‹×Þ²Ê/øèÄÄŽ¿4ÿñMºÏÇ2PQGæÝo;ÄF…‰Q(*š§]åö¼sÅ6Þøå;*ðëßyq0)m}—?öñ?–×ý‰Ï}÷º•÷þªÌ\³íS;—?ö»Õ'¼`sî1ÉQ êê7yâ®5Ìžóɦ²zè³ cÛ¼û/òüÇÃ_ÞÜ/ˆ|ãÇpÖ?ÚâÔ¢½çÓ»BBêõWZ‰,øäǤßüÞ˜µÿþƒ”½¢x„§&roü"<ä Ê0 ¾ó•vç[·­¾ãžÐ¶ ê GrM>üè._ºxÿwøõÛ é¤õ}žÝšI$uêú/.®Í±ØŽÂaÑG |Ôk P¦¢€€ŽjÁ,MDeõÏÿûø9oèKñŒíê²®J{¤ìüåÛǶ¾tzòU'V¯û1gÏÝA‡~ºzk%‹ï_o1ð%ÏÔ˜@  ²‰Áx­°òÝ?>ºv# I\÷˜éŽýò`Ë‹ªò[õøšÈðwïÛäRÝ{ö^¢˜ÝýóQöð®Ýa‹}?5‹G‚ªêLÝFEk#¬nX¯ ‡zï¯y™À@‚îź3éÛh5k°3nÌ$6$©ÑEgœv›q#½MªkšÆ»Xʘ—¢¦”Îlu[%ÖÛ¤mVW뵆À:— õ&R5;aVBNZòÒ–m ÐzûF£CÒ¢Š1xëÖFk%8yùà8°B®@­9æreÀ€eÛ¬Í14 ­ö †I¨ÚHÀF`·Úd[3ˆ…q×õƒ(¢š¶Ä©é,Û~óÐÕp|¼²:¿<’Åâʱj5kœ·9­©ƒX.ÂZô)I¦zÊj'Ðűp££¸¸&ËGœ0ŒJuÒéýIßÔ7Þ°ä’%@Qžæ“Τ3®“†µ£»GÈØyR–Ø#©á÷8혥ýK÷ŒQ¹£Vn¾3²¨ì’\ërµŠxʃûÜÑè`xûM«^ce0€H‡ÇšBJDÅ ¹VS*äè #ë¼$iQ:—ß7ã´mˆÀñèwßi·?s~†ý"N=ᔥ7ýÆCÄp 0ڧ嬈@Mµ sC±LHîúä lzÆúö?”§½*9öÚ»ù¼ å7ï<î“Y÷$TÃwn¨ûw)hþôÉÒ 2øÔ;¥cñ¬«,›,Zñ¶±?üˆKïš Lð´®m a$_ƈ"’€’‘¨D§ªÐ°t˜AO$†¸ ,ŒlL`fç±NSÒºlÊ:¨F­q!B•cÇÃQ™ƒ3Ä€ŠH5m9©¢vâzP8Ž€Õñ#ƒ€ +ÖWŽ…‡-a­ª!“#2iqd4ŒGÝ£±@šTjQ!V«¬sã@0¥Q1´ ø¤ †bÍ’&K3/è!¦èѱNÁjGe–Ó@"Áj ^!“IXë&ME@BåtÚ„ Ž#xÌÆB>F`i6¡ã”b žB«HAmdE)ç(`…€E-Aä9US0ŒJÀ¢ÑQ#¸Ü¤Áj—;=Í0-ÕQbÐWŽ#R« Ž)IÚH«€U"(B DHØ7'€ò-y.´“(ŒÝQ1ê¨L¿£ºÆ±í/!@µ%$Y)Õ$!69ŠÑ@‰ö^£Zcµ!`&ku‡‘ öµQ à^îEP-¾r—}ëC3Aˆ °Š(€ß{Òò§öŽŸûêDeÕñ·ÞØ<ç¥Ó“‰rLÈlÎù>5ó}Bˆ¨iÒüO[Ê·hPŒ¬)ÿÓîñJfç'ªÒgtóÇæ?'Ó¯ÖE^tYvâµóç½o39þësÓߺC%£€Ê3ÞlK¸—ŽŠkÕV50:¥\Ð((w¿׽Yê œ ò¡»ãC£c_9R=åoJ\›ˆ¬¼fFûb¥Hb+Š<Åþëö¹_|·teH'ðç^a¨¼e$m­ÑDÁ!¥¿ö?£Kþ¾Ÿ¿ü1õ}7„ÿvonå?~š]ô&öh›Ö…36gV\Ö  Rhl°ØñG†ƒ·ëV‘ô3¸pÃÏÆ,ƒ6YöÚÁ±õÙëuõíëéËš­[zò´ûÖŠ6UJ ü×óúW/³µê²BϬfÃù7Îo}IŸ”ž¸øå Ãä’Ï/ÅôÑ[óÈí{VƒW—ÌŽ÷þ| Ùúj%€J8¹í¶¹Yy(.Ÿòºn6Ÿ†”ÆFËÿøyæ®À©B|ÎÓ—fŠ`¶9¹$ZüÅ ÉÓϲKÞÕÀ›"ßv÷ê)W¦îO÷ÄKÏÔÓ[¨)oø4TʇXRŒÄ’ȯ<•â‹R²`Ú£‹£_£ßîÎﳩØ|Áj$ƒ§YµýáGšZ‘»Ï;E9%Äîl³&ø_˜@D‡£KêX€Øj£IÁ½’M›ÓjF¥X‰ãýK~•@-µ]7ã É ‰A•"˜0•OªÌcEãHM=>z´ˆ2fS†x<µ–Q-0÷1"‘Þp:¸<ëƒÓÔ®XÉ*çrb$Ë­B`DŠÈÑ1"H­ `(ïâå’£nP‰šÓSdÛÏ6G«îJ…ÄR™– œXÁÏ€A2z°fëúx@†šk‚åR@©€Æ*ø_ÑÉÈ…ƒwVi=K窓/þ☀C‡zÊ&òÞhg´Q1ÄÚ# ¹F£»—Þ¯~Ó/\dp#°gœ¾’ü©`о1è&îÃ(;†–¾w‹»æq½œ¢¾ßctœùVC®»èŠ«[Ç©0·­E ˆG¿C³O\GâçV&0æ…°÷ÔS¡ÐÁ¨ïw)ýÏŸÒ:›ÔFýÁ~^‡¬lú°Ë5TR¾ ¡­8ú£ú›×ùD¨ðÁ—“ÛΓ\ЄX;Öø¼€‡ÿ•¨à„d–ü·¿7ºü¢Ø|öü·›'Ïþ§Ù0k¶EC²Ö‰–èX_r†W0•qËáÈv7uÕ÷aþöÇÀE@Oïxƒ£hVÞõÿÔ·X âÚÇ^š˜M"¤€à^ˆ ZÙ~m¥´/*…H‘T§oZ“rP® ¬{”ר4C«=I2 ¨¼M€K0Q"ºã½€V*tbµ-µH!Ðtê5%Ôø0 FTÔR§`SÇ ÖƒmšÇ€EÇØž"H£Ç`À!’ L‰Õ@¨;Ý<`ÔB µ¯•´¶2„ ©p‰U<š”Kà–ÌD¡XSDD @§h5Cj,Yß*­&sÛ”¨P˜Y K€t »“éZŽåX„Ê5K†Ð¸‘sD!rf‚±D“CU"8ç"#’B¥mt™nc‚€ 0­'{‰A)TJM8ö„@^™UÞ—4Xöu’)¤ÌˆYKyш/lˆÊÈ Îrˆä­£l¢Lk"¢NÓ\ ’‘ ²$m£‹”RÝîk‹$óÄ‘Bhµg3‰ ,çÜHpc½Ä&•Nê oC[Ÿ*E)J(YÆLQ#·Í±†+çÚ¶Rl׈­ VTE“s#âX§]Œœ™ ÖVi\kQˆ•˜ë­¢>ÄQÇiMb¸ÉŽI›€”Ðð°(I²íl7tS°ÓSü°µ~óúÌMŸä6Ž÷U‹ÀmêÄM÷é÷yþOùÖí¡POÚ9N§6“^wáêpoíþ2Î6žìÇ×’S¦ºOªÏ˜.Ö_23;s®ñõÞ†\mNkTOݶž?5¾ïظ¾óÒ¸}ßá•Õ[¯ì'/¿íž{þü¢~ñê#‹?<=ÛöÝ»^8Ó{À®µµ•¹=¯ÜÔ½ï/öY]Zxÿúì¼ïß½oßþc+k'®¿|bç×ïÙõö ÙŽŸÏßvÕl祷86X[:~àÈÝ{üñ²\k¥^²kn÷czÝ·ÞtàÈj9*ýêÒÁ½ÿyÞd‘åýkï>þó+¦úŸß}øÈÞÝŸ?cròËókãÅãß?³Ÿ§"³ú~×í:º:†õhiaï³&Œ&RY1ñ‰ÃÇæöÜý£s²ìÍóãÑÚâÏèvòÎ#î\ºói3É‹/ŒÇƒ]WÍY‘y÷¤ï[ j7òû6•?çਮʵ¹ýû÷î½ëàÚ’kFkØ6½õg‡W‡ãÑÑ»výðþÝ¢ÛÉ‹NoççO¼`Sï‘×Ýpû¥•ý÷Üü‘3g6|â/zÃŒyÀ¾Áüs6N_yë`muxâí›û !¡¶/Ü·2¬îy캉gïVÃÕµÕÅïÜÐ;óWóûžÑ׿g~Ï•ëg?·0úÒI“[~tìÄÛþüÞ3¿üÛ›çGƒïŸ53ûù¥Õ¥µ•áÒʉýþåM‹K?>½“}|uñÇ­;ùû‹Í8Œn»ò´m©1ûÉŸþô»_ÿ~Á7ã8¼þ²-;¾µ:ªËQãF7ÿòçw–‘¹‰ÌüÝó¶žú³À>2³f!ˆ )œAlØÑfœ×¹'3ÀŒ©U¢0·j- DmB§I ´Ø@Ý’Šà».`pi4q±é‚Ó¤êÃ8Ä 1M}fJŠ@’öŠ©D…Qt‚2Õ:ÇJw4gÒB¦'ŒÔÓÂ:AÇ*3äÔ†Ìs:¡9NN!T14£dÁó¨E´0!€ë”™×ëZm¤¨PÁ‰\ŠQìB“-º–û‘¬F[«8¡b:™P'L˜rX TªZõˆ’0æëMP !(€:õ>¸w&r+*j Ê @À+‰Œ¹bU“*g Å–Nb PYˆÐŒ]A…ºŒ…ŠȹQÆhc"¹ ±Ó*¶Ilš2Ž2Ô-šiß*K•®ªZÔæN¦P¦°˜®ãn6«©t¸ÇýÓà¸v-+Ó(àÑ×KµlA“èêv±Á¦i%Ôå˜V*ã«6Ž$í6b…´1VS]Ór*ªd ¦(Ý®@[Q½0”Ø¢iêñò03[&‰[«« FV–ìrkšRÞÁ¤¥µ˜ö«“rlDMŽ@åÌøÐ’;g£ ´wÍÃŽS `kbl‡ïÞPLä¤!ÊÚþÅåâ¨ÙìHh¼zpxò6)z8«£@)噺}šŒ8sî䎳r‹àu[]nvlc- ”ˆKbTÞø¢QkGF»ú'7"°i*WŠÙ­åÔÜr²½ƒÅf^¨HOZ_;®›MÉɳ†Û6ÁØÚUEÕSñP¹çîTú©Á´…lÛ®T$r麙fëh—Îj7W‡µ=£éõFb€œ£ŽýÎ5I#ÊöÔ†¼.•°!Û2]\âÙu¥Ë&¹¬ÈFE5±6u%Ä0¢òÀ¡®x¬ ó}æ¥ØáuÄÃA] X@ˆœ4”ùzÐ „µ*WFJªæ:“yÀ¤àÚ„Šs]{ΙK™ÒBif3!QD”¦|Òx!m¡!aGU GâÙ2åXÇ(Ê4n%ú´CƒQ`P6É‚—†›ºž%,F:R*™2¦T ‘$¤ÁUõ€¬÷ ‘Qš½q*Õ‘•hBcÜš—˜gs”I§(‰%†Åhæ"e4â$$…–¸feBµ!ŠªkkË‘H‰P4©†ÖÇã¥Òq `%‰œò°ƒÀÇW‚5i:k›q6-X¡ ‘’‚®BD  ÔqùmÑoyT÷JÂêûÿÒüÍ+s䊒˜ýäã+Ûÿ&ÙršˆñŽ·~ÅdîUì÷Úï½sðê‰É•wš|ßÙÚ:xê=ÿ {²åoòjJš$DåñÐ[æÚ—\c´W”*@@扡ùñWVg_Xˆåú¬\@Çäuû>¾|òµýäY—·kŸ]<õ­+–U÷ÊÓ6o2¢zlÍ(+ê–/Ì'OLËË A´›^²¶z~§вæêõÌŸ;fÉÆÝ {owÃkû†l$iõîß,ýå8£Äpþßóì¦,cgß‘á~½òˆg¨©—­¿{kÍ$Ä‚‚Y‚ÎÙ ýZ "‚??ÚY:âtø¼gWδqÏ7ýÜj9ãùY댷À»~¸LäìŽÓ²[5š|Ô,5Ÿ›¼ðòbÛ“—øÌ$;ž¹0üÓçT2óâ÷êÿðÓ×W$LóOoÙž1çn¬4)Úù,å¢R!!]€3D”6á¶›–.ºÚfFyšy`§ØH¢@‡l¬RdÙø jb§®QÀ®"º‘úG\óp7wSK÷™UwU‰Ð4CTšö4¢Ø¶fjš™–Q- ªºã†àþ¸`/:»­kÊßéÍçàøøb'êͧ­;œ pÅ·ß_ŸØÞS<±‡\4öŒ â0Ñšyñ¶dëI6ªæO4]ÓÁ „6ÏVvZ& D–î9¡ö޵&¤vaÙÏó²A&võ{ÊôôsÒ *ªzõàbcwö!'³ï¶C2캕¹#ãqˆÎCaBrÁ}Mb±ŸÖ–„.]®8v¦ZZ‹ @,}Ÿ*¨µ[ÜçÍŽõ†ò`xlìömÕÂ=‹¸¶!9õ”æßn[ŒG’Înb­ ”DW */¢o;4ý·å¹²^Bz¡!Õˆ´cküÓí‡FPÞªÔ ÖÖTÞú¯'7uÆÉ¨YÈIhq¤ËŸþ¹Ùº:;qÉ¥s¿K<¨0©)–EP‚™ÔÌ(È»v£0ñ l{QIÂÕϾ=ôQ€Î}É$õ<ÕþðÕA`¢?ºY·«<åE³üö﹇]`¦ž¥I§!Ó¼óÙuû£Ü-[{áyãO|!ì|ü{E´ùõ;'œHÚHˆ ºDU¡ÆH4B‚Y‚$‚å7~R®<ÄôSB ¸ôÚÉB´µŠ°bO*ÖÆ<ðÂÖwk/ª YLÚ¨äÀ;Žºçÿ}¶ÿûz¯¼0É(ˆÞ ä ŽQÐו› ›¥åjŒ(À™Uš2u§Gþ3¤_ú÷;ßGoøˆX¥±ê~Âu% °·]US(Ä«“ÙCè£ÊdP8RBañÐr+=ls ÈFŽ1ar}"2N(‹I[e$ã: b Eþ°S ¸Q„ŠCÊZA^a¦´šC( ‘…“n4 k£™cì@1uѣǜ1&^è;æÑHe¼¨ˆ]7Õ ›ÄFA°­ÐÄ b‚¸šdÞQ°âA j¢T]„ž!ÖQŬ¨§Á7Î^ƒ ZPBÄ©%£µx 1&RÌâ4±pT%Yâ4hÖ(Qy­’{yQˆ¢¢6Ú‡jÉ#¶mæB„T\Û ƒ ABjDå½`Tb¬M˜À´†¤DKE0ì›(w)EiSH27œ";"F!FbµQùEµãȺ - râ ^,u)8¥ûäU?©D‚éqtDÄh—ØÉ4rp!@„ (€Rjø¿Nz_-ÌF ³ï?Öüáï‡A9„G~®Ú¼ɰR–ïÿEwâ?Š€9ï6žú¡9;å\ t“$vB®héõ6yî5ù‘÷Ü9Ê‹žÓÑÏú`3úímp¼áÅ/&ærëÑ+åÔsÿj|ä}GD]õâ ŸB«±GˆÞ >×Àw=ßÈ?_íú/'îóÏÛü—~¸vá+6’ @›=øc£{¾ô¡ñsž[Zí[ÕöW¬Ù_~ªJ v<׉*ÕZ׿hŸvñ‘u[{+_»¥¼g!€Hù©ïkúͯÝÒyõþãž p÷Å9qâcÏdô€åK§þáÈøº5@‹”š à¯\wà?—HYºãG‹;ž7ÿy+mz!ïûŸa¼ê||èl‚Íþ%¹}ÉsT¾ é†$"zÊ9sô¯kë^0˜éÈ7V×¹1L“yt²°yÙüŒ‹šnöµ(rº•xâÉg_,³_+]¼ælm@”i¼yÀ¢ŸÜsS}ƒ†dêšý«Të+ûVaœ¸|b|¿YóËÜ/ìùãÂX%jü¨:½~\¯”;½ƒÇž¿üÀI³þšÃ¼Ù`ó¦ÿ¨;—vÂð‡äÊMv1¤'=rõBÓ8¸]÷ÿxŒùÆ hîœkáŒm𥪛æàµÌý¨7¾p¨wõƒûûÃ-³axUÁÙW,OnZC°yÖÄvb‡*‡w•o09›ÍÞ€½s'Ý•ÕÒ¦ É/ïØûN1A†ÿ—dG­X†Ò(Ø2nßS¡xALÜÎnžALZ_)Ôgp7Ì DÈÖœÞg,¤Û† =a\cô‹¤Ž•¼vä€Ró‹hEÓ…qð«…PgA3,ä£K7LÇ[ÿõG4sbEcÔ¡UžÑ'šÆAÚ¨Œ`enyÏ8º¿ÜÚ&eŒ @À˜‹]ç›ûy~Äšb­¨hmœz˜?ø¯w9&rÏÚFL‰·^„Ó”Úé -wÜøú!ƒ¸Ûï0õémì^x&¢u£ÓóNŽßûøŠ#é>ôþSÊж٠b?’¥<¢—4Ñ(öþWOÝù«5‚&ýã÷ç?36¿ø¼à‘½›®/Õ/Ÿè)I½ø›ßÖŽ‘µBFGb OÚ:¾îßWNzüŒ—‰Ü±oío=@à$TFºÅÛÌU—¸tß 2´! vyùè¿?7àâ‚“ˆˆÉ±q¤ÏÞÖ^½;&žDýBª“PÑ~€Í¥^ûòï!;ßøä1‡Š®y¶½õƒ êµÏ”‰œyZl&3µñé&Š UÙX&žSÂÑð‡ò­;IH’Ö¹¦2åÅË7¾§›:úIPtžwÌR³çÝ÷À à­wÓÙoìȾÕþáÝ6-|ë§rÅ?ZµÞø‡œ3Ôë…³«OÉvZøó»õô“ŸÈ7][O~.ë=éAÍÆ • DÒ×½­)>öP41hø¿¢‚H¨AœÖh|±„5B6ëÑh¡Y :£Sö :ŸVSˆÑ¨&$ƒž˜4ÉÐ% §ÛÚ^(ú@*êBÛ¢ª¸c)m0ÓÔBJ•‹ÙBb ·¦èt´Pìæ™A(ÕØ EŽ)ra*Õ¢’ ¼î& bcb0&j¡V§ÜäH ÓO@…D#‘xê‰nÍ· Ä39 ®ÇVÓ ÙÀLÜz›ÖE†®I•0Øè¥q8²ETa%±ÎzÖ6¥~¬L3Џܠ§3$µ ¹—Imˆ‚‚ [7"åÛh)“>‡Ê37Aäè"æÐHÆTdAÛp²VA¢ó¶†Ô«J¬Oœ€>umL"‘ää솶$c2ZTž3°eJÚÔ+èPÚÕµë¥Îy ºÉÖ©¼ÐfH#é Û(rE’®¶±31kÜÒXFC—1ݴʬBæÌ¸ÖëHšAÕl§cʕ֋"c]¬/§'NÄJ X7IØI$, %`ÈuDMÁ‹Ö• 0G^~zÃ5©"°’Ͻêfÿ˜›œ¿öé/ÊŠ´‰Š÷üý]-SdQýþÑ7ÞÚüãßt#£r†åæu?xa7·M`Zÿ‘“:“R ÀZÑÅïØxøÍ»ãË_Âw¼ñPˆ¨_÷t™UÕ?{×+žØIm²çe{ãµOJ®|H›Ñê÷=ãÞñVÿäÏO™:À´ßýpHu.§:Šî3í„qê³÷eD1™Lˆ®ya'J47î+Ÿ¯ÖÿûÎ\Ùö›F‘Þ;ß‘3ÒünrøØ—u»YŠlÒJâî8ЂYÿÑÓ;Fu` Ë/¾-Tb?zu0wɵ$üÛ3†~2ëäÁÇ¿}”²×~ ÉR9çsž¦“Ñç?³zþ‡·N|ÜÕ_ýÒ‚Äw½Ç>íßÓ½¯ßçÕ•_)¾i|Í5ůß3ïêÏ|VqûßÍ?p¥v…¿ñ ÷äºù(žlf>u±‘½¯ÜDÉÓ¾a¿n·T.þøƒËÏÜOÚ&q®iYq›1kÒìÁu%h ¤jŽØ¡öÓ_HÇ5Û7]œüò¹«ç¹ÓKº  Ì ‹÷—˜!yú«ÖÛÖBLµé–/WzÖð³Îá#7FàI¯3Í1¯^óàþ¯?¸–¾ó´øïŽ/zc–þëÛÂ5/Ÿºï7V(Qᇟ쿦Û9TÉýÿaöÐçáÙ5['!GjtRͽyƒˆ&©;;G+£ŸöàZÒFŸ™ÖW]°¼ø±y|Ó£RÒ•mó}È'÷³Ð&H A‘p”q¢ ЂֲM“'EI‹^§Ì‘€ÑD"Pu#ƒ÷"ê*D mØkÄLv5 Sè÷àµÊ,¹Pê1GöqŒ•Rjt˜u‘ ˆ MHÀ-%y+aH}B¬›¬ç4xocÃÖ«™™BÙFËÖ"!¥QZŒ ± -ø•!»ˆàEwÒm¢½ ©¤“ZPZˆœ³6HdFœšLØHŒÄ:xFOz<˜ Öæ­öºÎN³mÀž± *E¢d“b Û¶Áq[õ•Š©d€(îtú|$¬Š‰^Sc튲©Ûˆ2±©8âb½ÈQ‡VÕM=ê´rÜV—„6&R³€­ŠÌ͹è¡ò•wp'Z80‘GdP£Šä¼Nb6T*x*ë¶Œ"ÐÝÉݦifÖ³¦ÀÒoXÐ¸ŠŒj ›qÞPÐ1FÐë"vƒt 8¶æIèøÊ:m×o5ë­ŠÝÓüvKÙæn,ÊáàdbÂóɉæ•5fÀî¦Þ0%ÞxF'CŠL!ghî@¬PºU ÊŽ™&‰€™o:ùŽÝó‡ÕñÆ"’§Z»MÐfA€ ÜKšžU³@Ęm\_)™ŠÂ"†Ñªj"Œq]Œ™tddØØÑ¹%l:l«Ä˜ÔÄ—ŽçÖÍj×è¸Æ £Àhq)Î1yÑY'ÛÕ©;³õÈãâñq=izÓ‹Pí™H«lÙýMÑ0†R”,b8¨‰N 袂4fÕ\Ð-Ué„ ‚.çWÃ2Šè$%l Z‰^ W®Ç ²Î)›•î@È`ä8BV¸fT­¨"ÔNj—*ÜptÄ'ºõ©ÍºþH ”Q¾nVŽ—\®XÓö&ƾæxb./bŸE a_ÙBª皓,cPý^f»¹ (ƒ™±äAcSqÇ¡éL¯è"6aìG>p¨¡.¶²R@tƒ&)Ì;Qb…‘oôhT§y;¢"i¥PÚPê,)Ê é0ï´W2,£"â(¤´‘X.w E¯Æ•*ÚtàDK,׉( ØqP£ÎED…&2¨VµãV‰lf œ^ QÎP˜EH2öÊWc$@b@;±yöµiæUÐmŒ-Z›’&º&íúºàŠ´1`Ídޏ„à §@ds‘Vc@ 5 ü/E[Þ7—lŸ€{µÆöß¼´¶i""ø?|y¥¼d}ß1OVvdÁzUw;Ew#iŠMo®ªs©Ò½zLJsŸ;&O1dÑV“ö&Ú¥7ìnF%‚ûÞïÍ…/OjÞ}ý{éC_›¯ý’ûÑë• ïiä«?‚Ë^³ Ct ˆñL”8r%.8Cè £Ä›Ö”?º‹(ÊosàãºóûùÈã/Ä-’E6V8" Pöûw,ÞYIò´S{§OtZ—Î>§i¼àÒ†ñÔ Ï£›¾½lþZ·ÿuû"æh™oÿÏÅúŠÇú?ü~´å9ë“›¿÷„4±Tãfµ·’#ìêçÞÇœñ·÷kñç·ËC¯¶U:Æä¡¶‚ï¡FÙù¢22ªº2õiÃó.‡6?³›ƒnÄ^ú’ãGÿg‘­Ñëÿî`¼ ×·þ0®ÌËøw&¿¯Ñ\½¥3üv«Ì^x=¸g9QU÷ì÷Tƒ7ÿ´ÞµKM_Ø×W}ï£uö¹i°%kb¯´<ïêô†·¬èàø´3F„¥JF£ i9ò0„ V`ï‰@Õg¿R1DóŒk²„#`;~÷Ÿ¢°0@ïÚ‹{ʤ@qE#”s»/ˆV{w¿ÿÙ(il]†N ^}ë͵ýâC!&lA 2€&Ý"h ‚ÂJ»Dkâè£"jÛº ¤z€½ÓƤ¬5ÄÚD”Æ‹Ü)` «­‚X5 "®e¢†À¤#;ÀˆZA ¢"³@´µWš!"³ˆÆ;Ü‚å KÎzÁ”Ï+&²ˆ±Ú§"(¨ €aH0F@‰Â ¬@Æ®!.½hM¡ŠJ`“å%àƒõm’ C¢BD‚´R(˜¥•T ‚Y1%I­QZM*ëL1 €20V‰Ò¤€¢Fö¾*J£ÈëNŽd"c©:¡‘Ž hŒ:‰­MZ1¤PRÆ–É!h„`É( ˆLŠ)`šj/ ˆb@ ÆA$‰"Ê)W8 8Æ$i|Ф‰*ΡM)AF%(D 3i€hNÁžÕå×Iþ›žCêæ¯œ˜~ýÆ­o=ßø]íG®8ù¦òþW§ôåµÎÓŸ¿ýç–¬™ø¢‹Kgxñ»ÇkˆÚ…Țʟü¢¼ðñ3ÞpìDæÄ4Äø˜fê¿—'žv28Où›¥ÖeF}v³•õ;[î¾þèC^øæw§;ž2©o»cé—•,j¹è’A¥šÞvC„ùßö­èGœ–†³‹g'ÏëÙÄ=Ý“{æ!ÓC­ÛÎÝÞñ‡¥Å‡9sRêÏ{Ê¡sú*{Ä–öa]”4Í8}þú,ˆœçÇ:ˆ¬O;9œzà $#yÈiœÍ.]¦¡WÙ¸iQq:º?~`‘émkv'-Ùê…Ý7oÈΙ²FR{&Æó';1ôÚÍâ_«õ;U’Äìô££ (ÛlÊŠ©sû²YÙ”ëPâì&e'‹$ä\Ec×=øîòñ´nœÙ>Ì—n‰Vü†-&¦PÝÑž¶Ú¨ì^eRrÃ…©É³2iÀ…½' F?»‘+k <>#3ÇÀެLX¢Î5J^û`",UÑ䎲hf›¬‡`²¤h¤Á8 Äfƒí8ãT’> S¢@ÃÿÑVºÏ|PN à^ÒPf檰ö–ŸTÕìÅg®ýü÷¼~0eÁ­•’´¯Tä£Çive›[³‘‚ö±U—ÛüàWK›_º­“ÇúÏ×Ö6ÂÙ;áàÍ."·wÖê̇ÙÝ_Ø¿åI§·»oa&2 é¶ŽïÔcLÅ¿øN^ÙQ.q+H¹ JArÕå_>Ò½t[j±ž}¾oIü~zÄ'.9I_÷‰¡‚ °wŸÞöà©å/þzäYªïSïÚ+´Í+샯Éßø¾%Ù¸ƒÛ '^rZg2‘3NitOÓâT’˜…ýéèŠ7tò^Ä O2˜ÆüÊ«BV×Ñ•€¾l»Òˆ©Ž&€õ`®¹"½é}Ç£ ÎÎЉ´§¼4Êäí‘÷ä×îà_¾óÄÆœÖ…ôÀö^â°[kÓÄÙׯQc¬*Q—•W:`Z‹{ÿí­c&€î?^gúº;ùʶEH~óöÉ›ÎK§œ•8ìýcˆÔ¢ éÛV†ŸøDý ·õ=…ìïÝñ€Jlw¾±íõ@§ˆP¢Îþxm7SĆEµ7ŽtS™•÷ì²ï¾¸ÿWgÒèãwT òÐ7'MKü™/Я˕³å|Ö#9ÅÀzßÔì×þ'­åU×À>Ô“?¤ß<·é]§híãoß·BÇkAlˆ GwúXäÂe?ÙZÒO¹jâÈ{VÕˆAI`h²_Øé«²Z?$VI4@T‚‚*jÍ¢ê Xp¬%˜NmRHUh+X¯¡'eYoÓŽF¤ØÔ*rSx‡ÐI³Æ{šÐ/¯& Ø Æ*³¡×UF0Õy’Ňa´y ‚¬Ö€hĆ*ÄQ*¾ië.®B_aµ–¤D‘gªÍ áZ´`Úo#GÈ£±)#330hv ¢ ùû ßxK-"TÞ& ¢„f\˜¤PòžÓ´uP,m²$—8-¬RÈr I@iboBY‡I%Ó'@ù&‚AòŠ»Ž~’´ tAM%>¤ 4Z-u”åc[ª:I&1øDvT>íÀ9+-Cl€„pÊN{á&35¨˜ÀuÛAA i2Ã6JÓ¡¢œmê £±Iƒ›¨ELÄ´á~ÊÞˆFôº%&(z^ÒV ƒ Jf:³ÆÆjÁjÚÉU»6µkbi-ML%Jܦ°Ê€ HÕ9=QÞ>¶QD/-ôçŦ8‹hn>ø,„…`Í<”r÷ïW=«€;½ƒÐ—e´¯çHH„“GÏÍT«Š‡FÒ Y´¡Ñp/3Öý“í”al²$*†Ë]žOÉ8g2ÓÅI£½~èÙc¨·k›cg¸Èc2#Ç̘ £}µVXrÒÄœcØ@ËâRy¬_ÌŽö2¯4â»Òn®»ÇÛ£5»äìólX-e]wV—PÅ¢«g´n–åbˆå¾VsK+‘Ý¡VŒ€d|`Õ‹÷< LN–+#?t EÒMFÒN¨ˆ„ƒM¦úЄª/$"UæUæØ°‘Ô¦ë2­{¾7:f²‘±Ó𬑆E;\( ›ìâ%‰×‚Z‚Ïg;‘%™˜¨fs¯šz‰»–uÙ¸X5¢Rð‰d²Phµ&­¤“5?ÎJ…±µVFyÁº‰ÒrÛ”ŽÑqLèX MÒ¦¥ÑÈAD5* ä±a Œh|êÛàòuÒvT eÚC=(B¡)–.’ÒRPi ^Bi4²&Q‰šX‘é“GP„Zkv%µu@ Œ! YÈjÅ+ 늑BBŒTûj,(E$– BׯhL ºÔ©5ì)2 ûر*‚ÔMƒ‘q܆ƒ "HÝDãOEé1A0ˆ ÿ_‚÷=ÐðÿùʵûÙûßÿÝñc_[Ô¯»¥ Q?åíù=¯Ø›üٗ߿戴ðü÷^ïœQbÄÍŸ>k|ío«gü}rè5÷° HÔ¸ñÝg¦ßùô’¼ùSgM6¾Úý¦£ë?{ZøÒgQ@˜éeÝ+òäÎWì+[aÒH,‘‘H€€“©Ý?ýúG×&¿töêÛ6Ž7d+~ä·ËOxþDfèÄ»®«ÿòÂN%«ïûÖè Ï]oP”î)Ãrð·;FŒú¸ó‰¬\Ko¾Í£¨‡½k¦à–TT–ë¹—ÜŽ/¾jV%ixß·G¢Žæù/šQNs9ô^B¦ÿÓÝs_Ò­Çì?ñ]h:ã=3ô¯UW¾y: BL]üpÕ­ë‹Zò8˜Æjß«÷müàé]jrŒ~þÕwŽžñÊtáå{XŸð¦Âˆ•HÂj|üå7û€¢T„B&ÞúˆìÇïX(>ö%ÒüàÚ…ìK¤¯~a9ü®Ùæ=? œè¤Ÿ¸¼¾î ç¼o¿ã‡ô7/ž¬“Ö_{/‡¸ãkÛhH+Ðþû\É>yAU:ÜûÂÛýd¢L–ðE¨ØdàpÃÏþ«É£ßœoÞÄùµ:ÁØ4´m+ìýÈ2îZ†=oÃ]žw›6©Åƒaöe'å§­³õ‘Õ?;*ÏœYÞß¶Ÿÿu£8ÏpáFuáézðé[¢ˆì¼È†ß¬Æ³v¸S¤F_¾¡AÄO™ÊžºMnÿôóÊû¦Aƒd€ÚFÅ++µBíÙ×} FÙ¦XvUlœ²}R<<¸æÜ«b^žTi’"±HÓJÃËM®û<ª}ÃÀ¢z5»Õ€ £n²ž(f=->ÚµžõÛÔ:±Y­¶ml×FM D õ„`À(êZ„„0 Œ‡¥ÅñØ[Aí{%D¿¶¼Ì( ÿ‹VB;>:×2S\U®ªÊC «Ë\s3ˆ'œO½Z©£€µ}ï#¦k6g®†ðâ°µA)Á5Da”ñ^Q‘ÕÔ™ÙüÝ 8“°nÚg- ŠÆ°rסà£:ù¬iœ>Áss "&žštQ²è#‡x·S6TÛmËìD ÞrÒûãí{Úqn‘UñÎ;I¿ »²)u ²ã©¢c¢‹þžï–öÉ—°Ђ÷Ê/ùÍÛQA”¥¹ÕÍÓfÛ¹GÅïêu™Ù>Û*1ʦn6µ~-Ýh| ‘&3ÔAg˜²b/OZôã²I<“ö­¹™ºŸ¥Äº)ÕCPÝd]’vgRÝ 0´æDÕ,°s}2WF¡Ü¤©¶ùÔjîÅETa-@‡L åÇA\’¤}Üp–† òdÂàžq•6™É§·$#¢U Fk~)ªj6E–T‡(:DÕËÑT{êDü&ˆšíJ¨ê%±ì½-°ß/œRfJ·Àp/¤ÌL+ãKX3ÜNhTÞzŒ¾]ÖØruM¬ƒvKñÇñ1׆YT‘%íH·1Is›i ÁÄPެ€R~mì"Eç]Á˜òhÒ5ª a‰S+Œ* q4XctÅ¢ý²OmþDP‡ˆ¤+³2D-€bH(‘¨OdÕ2(3b¯™êÈHÔãº"„œkÇ>ªŠi–jPÑ[‡"EH  R"J€tF–µÔª« Ž(ÜKÍ Œ(‘{;÷U€@ý ܸ+ÞáµêØÃE+ðäÅÓÔ¤©»¡%9ˆ cs.‘:Ñ›Z]£0h&ð pâ=·Õ/~Ò:zðïŽ^üÄɋ޲4÷õCø·¨oûHµíIËÎ’óúW/Ãv†éÖ¿xëø³»Å³ŠÀ ç>m¶eô•›ëû=ݨoß®Xßœ™™Äªô¹§«ïÿ¬™ùÛmS;ú­×B( Ýò³Ñ¾ƒ¼ðþ©âž¡û7Ûìƒû¦ÉüÄËVêÆ¨Lš£_;ü â®oަžÙÏØèCÿ±¤s“=È´ë&LµñœGO¥úöø¶n¨õô‹Ï¨ÁɇS@ªâÍŸ2:iŠgœebR¼ä~yH nOª?þnUGH/¼\@Ëyà›o¬‚§ûÀÊ-CqŸ¸u×2ôÙîñœíìn<1jC Ýûæ‘&‹q}‡ŒÎÙ’&Ñåç'R°6W0¬Ÿ˜Ðä&n]D¢ŽcP 2w’º xì„(´·ÞÙ0Ü«kã‚ÃÉI@âÍz¾ÞÚu´6ž)ƒNªVw¶4˜¸¸Xq@X9˜Öw8(¦tÔ P¸p*Nz:¯ãVƒJûlJCº2ÿK×™³ ¡õãCûhΨ¶üþí°Ð–´sçæ/ïQî’¢üêòáç›f+mï"hYàðÓ‹O©oâ‘…¤Í×ÿ×( N~üü”Ùò¤þÖ]>‚^¾jrêi´å Z2yÜ㌉¼ëcGðϘ¼ïJùåk—™"Ð_½zöðë5Âfó—Ò,h“L, Þ¢Ô[žaJò3ïh@ÿñmNØ—<¼ˆbªwü¤a¤50Ä„ê•LBóÖ߉D``’ 9vP?÷©Ø÷Òƒá/3׿ꄠT  Úé7ÃI¡¥üCIßýo AÒ7>&“ÖÉÛÔŠ¸ ×8󆧧¿xÒX}ñÒ>Ôxõ Ý„‘@' ¢Ð1‚Ò$åÉã ˜Â9+}C ¨™2Ï ©C!Ñ.jelŒn *" ¢ÏSU;6IRhc‰”1ÓÊ$ÁÖy²µŽÄB›¦cQ „h3•äÑ“‚œC˵Ñ)¨,$zb²Óz£4)åZÊXK–':ÚÜN0  H¨Ù1B ÈÈ$@xÍ9å™b1‰à—5aCl£ï§ÍlF)F-t@…ÔjCŒÆ#¢DAÅâ's!d+X·œ‚bÒ®kzF1`ˆDŒBMmUJŒHôt8QªfD·Üxi5õM L,(”h­!4ZiÁkP]ï;$(2ÓÏÑšFùJ*èj´En-é*·ä"¢× ÓÎ02£€°X¥DaD‘±–‰íÇZ–˜k„$Ð8jÆ”ƒ¦ÚØÌP$¦D'ÈD¢Ø‡Ìc› éÙ1vJ âDP`ìêÔ@mù^9¶Ú@`qjì5:ïEV0r( ²n^Ä3³)ZT¬„|³Â¼Ä*/F “äUMGkT  (‚e»×X~P¡0: ríÑð¦k÷áe} ˆWA ´4ÖI B/¾z•ßÓþ<dQMàßîöR…X̾}¾½ã»‹O}üäÌ[޵w|o¸óM[š†áH4Áè³Îyƒ›l–3ñEÙª¼l6Ÿg:1BÞ0ˆªøƒñ9Ïß0õœ9ÿÐD”F¿2”Û¿½ì£áwßå+mYWæ¯/_F¡±¹ôÔÙ›®/M¦‹'7XË&}± ‰ã:¨4 eøÂêÙt-ÇïÜ’³ãꈰ:ò“,$Í`çô’ŽD^´½¥ºaèÝoöR¸4Ìí îW{Ìý6Ú…«Ó½iòŽ,«je¥‘à“ º<Á‚È¢B]u¸6(‹ÉÊÄæjCBI³l=·‰r¾NµÁ¤(NæuŒÓØé¬xÝ‹+±Ç 9ߟŒp½ß1ôgpàm·ÛÏn4>A ,Q@ .îsAMŠÄ) ¦L2•Ê}Ï‚ ¬b.réÄ“ÓÚƒb° ¤ }îºðŸ¯µ¨bD€ ·1bFÇæŒÓÖ~qƒÛý˜X\V¿ö¦vËE›¶‘mb¨®³ãÝ!â`mTèÄ&V‘×06’ÚÝü»rù\ÿèÖBæHM~÷ýñú¿=iüÁß4ù•¨[ex¿r"—ªä‘ɧîp*¦tù%ÓÆŠŠª6&ªà¾÷+}Pår7ÝŒÈÈ„öeŸqîÝ¿ñàiõr”‡ÿ•ƒ¦£ZCN:µÔŽEçÊä1h`óä«ó»ßwYTí(n}îû¯_«÷·ýÆ‘•àæWm#a÷‡öo|ÝV3áTÞ‹1þü÷Z@øå…׿ý¤6eFíÜ}qÅ•qôÙdêçÑO>»VÆôÞ½.gN{ó´Çõ”uúáä õÏ?RGû”çNF’g>®¼îí+güCÿrKZ.~[¿ò½úI¯èßý¾\zÞù¦¡n´ÿä¯ëۮœÿiÒ}ã+í»l’×juÌÈFC”Ï]øA/±ü‰ëÛû<ñ•&ØNùÍwÇ-€¹ãów µ§>iú‡_`Büÿ°„€–žÕÁ°½Öºå±-GÇ=î®8ŽX‹[ Å¡„ÁµÁ¡x±âN°Ð„$Ä…‰O23?ºÏÞû±[ÖúÒ÷ÿ¯Ëä(üv;‹ó›ÿ%¯ŽÄ ¦÷f/8³w«—EÔÎ[/ö9çôÎéÔ~ÿ~aŒ}Tj“•oG/xNs†TG¼siå$âVóÜ'÷5ož6Ñ@‚A‰KXE;Ò*¥%±,ÃDUÚ!;2‹í²Plêƒ 'Õs“$#€X1ù¥OìÀà ×µ5óÕÏÒ½½5÷ Ñš&íP YVRà«oÀîWOŽ_ÿï¥3?º^Z+7\xßù^ ŒL§ƒ&÷I7Ÿÿõkö}â'"Qsb&_ó|:êƒ=ÔÆÝþáÝâ (NþN}ÿg¨^õ:# ÖÃϾ¾è¦ßwJ÷[?\\ɪò§Ÿš‹„„F-œóš‰êÒ{”¡²È¬„È—}Íѽ ?Ô®J@a¥J"Ò¹ß ÍNÖõ*OÉÏnxû ïkoifÖü«ÿílüH´vÇ¥wF¶½ýƒÈH¢º*·”_tœûÖŸª“_5Ù~rWµõ­_8ïú9Oɽs)¼þÍ~WßöŒÛxÔs&¤ÖÝã¡óòóÑ•ÙqlUÉ3ÿ~„ûáŸ}/%ÛWðøgåû?wpü¢ûì'÷»pnð«oÅgÿ«N9ÚHŠj<ÿÍkbÄŽ¾fYm|Q'žh‚;úý{ã Ï~‚=ðÍ=ðÚã nzõÞälH €Vð°IÀ×ËU«<˜€%¶MôZBÂc뢯„T›®·†B#*gGwN %Bô!µÆ‚À­R¸˜y ƒÖE@HbX ‰ºI»£FaŽ À$"®mýØ{š¬ÒØ!•+¨¨Ž¬›l¦¹q±è&ÒÄ!ËC0•SÞ6QÀXBô ·4­ Ûqc-‚jvÒlÓœN­oÔþeUÝÝØ/'ÖI‚ ~ˆŒä¥è[ä–’ˆžÙ'v+²RÞzDiSR² -ôQ@ Æ„‡´ Ky¶±©}à‡‚ F`@ë뱇Îake­¦éSó•éÜQ~ßÍ+>ÌÓ¿j÷¼²[Ý”âáÄ,¸ù¬n¤ÐU:¤ÛÄG&tIÐ=áðѪ”=K5 xÄé4Õ?X߇tÜÓÀœüènwâ¨?6£DÌÀ""Ü¿1rÜôÔIÊDµ.™}RÛ¾å*{øc“ƒ¿˜ÃóÏ$ÑpØkÇÉ* @ H“at©Þô€]mÕZÛ”ãèµÃ= Ø£tLWöCd­)쬦L>Z`Ûú±îåõ CÖ¥Q-¢¤®8˜¶mÝÁ»ÒÙ¸Ñpÿ¼c4™KrM‡{SV5BûsdÀÈÀHÝBd7<8Vº=´»ŠU›Ñ  –Ë*HwÇ==™@bcJH)JÍbµBZ4 m`ÀÈ,—N´6õ°ÊVÙ,1dJ*ŠÎÚb4&£ª¾XúÁ܈E@ P¯¬•M ˆãy[—%KO=£G±4Þ5¬2‘¡*#ß je:©Ó˜ Õýž/ÛÅ×\º +éJHƒ ÔJ'"”„–•µ¶$ 7Ï6„¨À‚•u­#­£N—z$…BR&Á•¨lÓ¢‚¾F#RzË ­ &8 #"J …+uÍÅáÞÇ^þþýzEGýOÏ÷úii^sšÿîß›¶åÅÏÜKOzÜâ]?-lƒ~͙٭ߞ÷û¸±â%Ï:ŠN±¼ò¿W·÷à{b àxÂÇÖ©ï|oéÔ‹6,½ùžðºÏ¶ÕG¯(£€ .fLПüY?|ïU®räWCõžËÃß´×¾ÿ ¹ô 2o~ûAóѧû rùû†øîu.Âþ×)óî‹ÐPM…ŠÊجQ!åm:ÿ¦¸(ø£ŸQ!ùÀ³3ß¡â»óî?"r@"°iÅÿ^üæ™ß°,—|¬þõ‹VNùîDÚ£¤ÕþÚW-Ãû_™ÂÿÑ ¬ h¨GT±ªhmňBÌ 1Žj@DV Dv´bE‘På#’M"•q#‚–Dù¢X€+‡ £+Ä"‚4!@Ï6JEB¯úB`$ø&€ba$"ƒ1“g‹ˆ ` û<ìkÁä&Ĩm·O­N&F(RÙј#‚Júý{¯0Щak´ ­™™D8tr !Thr ­¶uî*ÀF5Ly§z$ˆ8‘çÅ–®€˜… Á¦©xIŒc$& ‘( )ï)'1±IÐ ÁEÕT©‰€„ìC6@y‘0Ú*-!éŠOSŒªcˆ…M?Œ+H*€€€õŠ% ­6ûjAH\Ø[13¦Ž hi­w*ud00 ‰NµeLfº+!°¢>MÇ Tt:jÄš20:QQ©r‰iÅôÖõìÄtH),FLZè¡ ] G›I4A#:Nô`‚„Y„AGCÒÚ1™®éŒI0 +ˆQÇBb¢‘§¼è®BÀ|R+tÊSÙxí‚0Šˆ½©(|ÿªæqÏN;Ñ  Ö<}ûþîìoþæ{¢ûé?ÆÛž—185“³.eµ‘-©}̆{F7ü49₪û)1O~¼o¾QÝ7äüiëÓý_\é½¢‰õlv~~hö¹+aÇm°ÌÝÝd캂~xKú’Ô^ùóã;kØrVoð§!œ´yæÑiº?×>2n;¥»ñ¦Áâ=m¼b”¯zì:5«1Ä@tËâL³'n‹ Nß}ÓHºº÷œ‰ªjP휛»~,Á³}Ø ¬¹zù®CUûÇýxÕ%Jøß»éôÊ]^»IµE±Ù•IS I®ÐÝÖ¸o›ää'ïXß-Ãá¬Äɦ òapíBþ˜¤x؃û7wUhŠm E¯™¿ÆÝZE»mT[¯Q´î˜|béJ¹u´J8ª6œ6cÛqqf²ÚÓ€ÑYqdgfåŽÈ‰Ú¾0.èºþ¨¹ë¶ „í4CP3G—ØÄ(°¼Ê{؉¦ÉŽ\®AY:T |`‘fXen¡­©‘ÌÓ¡Ê 20 »=¥®7NLî>°k¿çÝ×bZ@´_SŠë:yµ0(÷4˜¸¼×ºbãýa]Nb&ÕòýyÑö NB  2¯ŒF@kÓN›‡vq\ûXïÂ]+Ë11˜w4£NÙ&$ì5ªæc;F„€H¬âfY5–«•v‘2µ2ßTb¬¨˜€øFiÒÆY¨5JT`@’ÑåWòºgÀ¤2ˆK×?kC}å„=ß§­Ï9²º÷}ÂÓÔ”ŠÐz¿ojÙü¡­L\•Âáïi}ê>_J”•VC4²úíÂׯož÷A½ûýû¸9é}Ã…¯=ÐÙါOd‚L~³Ü‘ñýw ‚4P„ÀâðK—Ww¿ ö_>Œ£”Ü/þëÀ` á¦Ï-µ°Q0‚D&¤]ïêeŸYšûÌÞj^TîÙÕ˜¾þ„bþƒ;#qöúÇwa×x··­ c-¯y^u,âáºxõwV^ül¬D´Q6tÄE^=Lùåˆý—·:,|ù@u_€ßï¢åC1yÉÑpv`5’Î3N¶ü­L¾x*?§#.c÷ûÔ?JˆH YŸùØ<ù̓Õñ¯ìv|/==ãÝö[^Þ3¡"µFó²ÎÕj ™Váÿ`'xA‰M D?F(¦zÒ7ìD òÒxÅùXQ¿ÇÅ@1NH4B£Q+àLç«tl(õS™5¦fr½Y º‡ ’”­5Ýç…8®(ãcÉYYEêuŠ˜ÞWiÀÁˆAè¢X¤ÖG!¦Ð¬,µ LýB|’$#gP[LªDC°¹‚¦cëØzV5&Ü.W‘Q3" ÆèFA²«lð@©šW¬´2¶R ¢VÄÜB“lª™Ž´…2Ʀ-¯hîLŠÅ@¦V;¡Þ¼c’‰>%S®£”ß‚yו ’U㨠ð’7³•Œ—7[„éCÚ…¤ÛóSQćˆ,HR²&È€ GšB4²|æÕM“š°†Ö¤X–wÖIH)×}‹E€y?ŸO/ìÝïPÎkM§%»{.2ªýDs·Ï×,ЃRëè6oÅ` ?§^úò?`7g$ý˜¬wÖä-ì ôŸ¶©kËúŠŸ/1ïÛ˜Ÿw"¦;Ð?ê«F“Ï\W(BX6Íí¯AA$Žöü§t·¿}¿:çùðý/O~ã†ðî_Ò›_Ü•BN*zó;1æ(AƒP4&ý^,tA0*múj:2qXGí—VµóùTgy4^’²·¤RÇ6ëve¼r¨ÉòüøAéN%G^„$x]•F»…š@Î ºÑâ0F¤LH§#Ö·wõJ=Øæ@˦׳zºÕƒ2$Võ’$' Œ:dÜ-0i—G%cŒ¦\ Ú´.Å4CÔ¤‘z®äDÄÄ9%æçk!c)Rp@JcLZÙ\Ç6°ÝH‚ìÄËR ¶Ù©±(_°°iÒq }Šm[ÎG£c•´¥-!˜( XCZ³hÒ*rtåÀÃe¥$À@IùXúj%%k€ÔI…¶" (È€€Jagåk*RQ^a:/ A8Ò¸•õ¡¥:0hd@£&0i:I K=jEç&c@åËA±¡„|"£}eJcIh[VÀ V,¡(Žš|TT\Öô´B`@FPÀ±‹÷­p°*¥¸Æ”3€D"oU(ɺUß’^EÚRlÈ’Ò–!‡BQ4ƒ†‡hP3Ÿ©UÖ Àý¼ÍE:õ©fü•Ÿ¬4*¬¼Vu.y³¹âU‹½¯ŸÒ|ì׋,¤òÿ{ZF"{^¦ |â›V…¬N§Sթ蔌÷]z?3¨c>±±ëtý‹— ŽþèZÓÍšÐØ5 3ï?¡è§ÀA½òe»4û2þéUËuC;2ùÄbô`ÞþϘ¢£¥MŠâÿø· 4È åG½}RUZQ ×^6gÞy:þø+g¾nffµv¿þæAdÔH ¢õDq>ೞ¼úƯp—^¦„£>°y’*sÃûö¬¿l‹ÿÜOÚ“?3ýÀ'—ë7>Ý¢À}ÛÙ&Ô’­×¿êµîk¿óB­ÿêÃ7¼0XTÇ~fÜ sï?4sÉ1`›rߥûì´¦ŸÓðk:ÑËÔ‹_¦¾qMMLÀŒ ùk³'w­–Þü'o¾ä98 žž÷¨%hUýÕ;ø{Èû±îÞ4†Ç>5wYݽûKw yË‹&µ4Ô3÷Å…V‘qê_Ö¤çÎúc>¾w<Î1~`„Ïûgur×ëþqâze±ù]náû 1üÞ¡ðÚ£ýMÿZä´óGg­JNÿÐörþCÞ~Í?Of®Ak”’üÓ <©Sýî1`ÿÓúXJ:Úïs öغ7аN<†d|W+Çœ4±ûo ÖÑÝ6 áñüÔÏ3>µÀµ¿å'tÄc´¤ ¤añÚ}í#Ž3ˆ@ !*ˆÑ"€`†08¯}2iÒS>ÏX B :Ï}ÕºqåA 0 ¬Ph›Ò2´ÑMu21¤"@q) 0:äma„0õ''\:ÓŠ h:IèøVDû™ÕYIy[UeÒOóš$ʘ‘&Öœ–>'-twƒP¡Ún½ä‘Ðç8ž[ "Y=ì°D¬$0 B¢YUp~¨€{«{¸†´÷¾c)Ùº­í¦ë·XkVvï[a@6ë·t·NäaIA°×–® üÀÞ…^ÝÄÅÅfaíª²Þs1„æÁÝ  ä›`]ÂÚàøöõîªD›ÃÚ¥<ÐÝóŒGÁWŒqßÄH'M8øÅeDæu[ã¦[]$Å€ Äžzš±±TfTÝ}+ßë¼XPèM«›þ|—8(ˆ´í¬)l~{U£¬9o}Ú P;W/! Jï1GPî±8ëxÀþëò²ÿêÍY'40È]¨Ï¿ÀÎ]¾WUcºÿ'‹ôøã‡¿ùC’Ç?ÒäoÏ8¾üØåA¤n«HÚ„ø?ßãÚ¥æ< l|þfÝÁÛȨIŸ|T¹ûÍK-B±EûüÇN\ÏÁš„/ÿ œõbô‰ÿ•¿§oŒWdê«®¡Çœ=éBrÏ›—è‡[xHÔQ±h-ζåJL§•ŽÊ-×q”8gžÙid¡$É{YÚë…47óY@XÑ¡xh#¯ç*6!ÓSS¯pmp£ùÁ®"èÔvÜȦ% vVµ.Ö-F4&Í´Âze®Š rcTX< i‡Všèõ¾ÅEén ­—–B+¬TÚà³Z iC*0j¿`' "FL AP¢6½p묀I#¢J(U˜˜T+€Ô‘D€ „pÕêé}¨ ªÀqÒh¸PÁ;‚ŽÖEH{ÚÄÜò–²U2€0ÂØ&hzއƒ7HÄmôQÄ5ŒaFâCuÒj¡1ÃÈ *Èû«êB) ‘Hwm&¾ÍtwÎk°m(ÀhdC± %hÉ’ÖÖ%kä!ÈÀq xFb…˜LÏ‚0鎃ÄQd‹V/‡Pˆõä¶íœ¦l”4ꎈ0 Ì ;Œ¬CŒd§”n‘l´„±Ç`ÖöëS‚Üû°y´¶ÛŒ:£0g€ÉMf¢cbŽL¶›úØÎô1kÇ¥H¤6ˆJ„B”eeT€Ò (2!€÷Ý›Ú'?)±ÕÏïoÊ~zÄ?¥Ê/ÌȘýÓºÎq6óŠ}³[|²Qƒ có×ÛÌõ¥‰D%wýPM¼¨È&Üúh{øº‰æ¼uðçkà!õ•»V_ß2mÏ89Ìþ9Î<Þ´×?pðÑçš•?˜»¿ 'tì÷ݵÛãM­¨=ÚxÏŽw-…½ûK㇠Å!ŸP˜ú¶Ý‹*Áÿ8:nM~,f›s¨ ©=³‡Ì"·íïžµÈS(AQGoP÷î ×eræ*ÒRM˜¨Æa"–Þpühy¯‹Œ P dV=”5«Óám{ë²9btûjKÒ»¯NB²o©AaOˆ [Úm+ÕûÚhI’êС6äîþq{C/ þÐúþƒÚ¦À„©"]ž ³>ê´]-[å[%¬ÝÔL&ãƒãÙÃk»i®íÜWt6¡%‡‹®bĉmåò0⤅a þÁáÄ*M#aF„åf†&”Ÿ,&Sµ°Àº‰´I§©Ñ˜qX&‚hë’™ì`2)ÄN7¦ ‡ ã Ú‚Y0-´RâhI€A°iRï0(B-2™vˉ®bÁI'¹]èÓ×€9x *Q €Æ`(šMF€`”‰Þ=>ò’#½s{+ŠOýÐ&HLâM¹ëÒÄ(Q¯¾h[7±þ¬Ó£B«?Mù%Ï*|ƒIíD`â'ÕW~cÇu×éÎgÕRb:–CS·9p# #d¯‰ùÝ'F@ Œ€¡m—£yݳã¯/›ßû°ïz^’gÂ.f/~]ÿ¦ù 9?IÉv¿YԻ߷¿cW ŒØ¬¤ªÜù¦; rˆûߤT8ñk¬†P$à½Ì~ô8û»ÏÍ+õ¤ó"¤ƒ€°ê´Í%W ÏúøšÕ—Vñ“¯nÎûLc}ägeDé|þþÒOF羿×|ä/í×¾ÁÿØÚÐK*¸þy”üç£å—Ÿö¡Ã¢e(šI¶ #xm¨NÃÁWѾž³FŒV}ß¹ðßÜž¹âœ(ÛI.~“ãè;t:¨Þ~ 4Aj×|ë;C×ð½ÏWªaZò<ýÁE1ì}Ç}½oœÐ5Ñc•lŒßö_mõÅ?4O¸`bøÁëEjsöwÂÞK¯“ç¼²·óÕ{ý0jlg£Ö>!å”Hƒ ¦Ñ<ö{.Ù–1kØèé(Ÿ€s‚AL*Þ(‘fÛKHâHظ¥ŠI$ "€ ˆU1+ ¦{Iš²jT›h%HÀ ‚0¢&Ô‰)*T–ä1²Ô¦NôBH±ÎRçœeÆ ‚°:W ·lŽ"ˆWI‚Îtس€G`P ³/¹[é‘#D¢ :\ƒH ÃM*QwÈ$s­ÎòIŠyP‚€((B"e^FÑ…6ë:+­÷- HK¢§|TlŠ£€PŒ$ÂȈ3³qýÏ€j¥/A‹€ˆ@dL(›(¬G-“Ñ5ŒºVL¢•BJÚ:m”¡Î2×NHB7¯ÆÛñ*T.ä è.t“2Mrµ) ‘¡ÆèEbÂQ!»º‹LÚ“3­ñiMrŒJP$âšBŠÑ:œEÓ¤®Ž ’v©±äY)ñ™‡²uÀˆ’-‡•ˆwˆ*Éf £ß»ÐäÁé âhÁÕÈØñé87µYß)ºœÍ‚qjó-qÝšloS5QbHWŒv@À¤-äÚ‡”zGc%rœi‚@–ÏšqNƒ쟷&ܹ+Ü÷­¬ó¬Yÿpž»seøÃ-Ýnô²<.ý¸ˆJU7Î1­=)Ç›÷†€ˆ Õ`¬'3¥›¤ã;[Ÿ²2ºq<%ÇN­Ù’„M ÿx›[›T[V<éµ›ø¨nZí¸{ŽÎ µ“£ïüßÉ37*csíŽr÷1È+›¶ÊØ2×7ΧGj3¿sÈE`ðnÿ ›ø®AØsm¶qkÀhjª;Z¸Ÿùú2€Ší]õ¤áöÚZu«o·¸ÍPf”IÃô¶É€&•ÀÍÞVHdÏŽK“[ÕÆfŽ-†¬™$L;9+X{‹#YÚ\A4ÍBMé¬i­°@`WÏA‘²SVIou+B8ïD%Ïqw©å¥•¥îªÙ¸‡ã†tS½àDÓÙ|[ƒ1²ZŤgg§SÀ„ʉ›¯Ë9¯#KXxz³T¸¸?!_ E0A€ÉU‡Ø÷cÞIÓ˜ðÊ DF@:³‰oŠ©˜52˜WØ PÌŠ ×(·ÜZå‡;$Y€%ÈÚ`7ÔåPs D¶§‡[qÒZmëŲI¹’4Ÿêò ´ìGÜ#†%®ÀRê8ñ@KÛ½ `/d¼—¦”Ò ]´cd–T7YÂN3 ›vNŸ²ÿü¬æ7ŽÇßÒÊxŒÂˆÔ¹ä¸îÁ‹I€Î-5/–(DI§¨Ö&ŠQxœ´(öìãëýo1` ”#.\ÕËR09¼ ×_|4ÎôG>„É;­ßµþÞwï˜ùàV©îÿèõG¬«Ñð=¦­oÛ¬¾ñc':zûîö5/+Öö´AFœÿ$Mhº¼ü K¢XðñoÉWþc»ûZ¢žõŽJL/8½åg—ŸVv¾a*? :=rùŸEöÂOIb½UNéG¬lI“—¿j@â/þ$g¿YÙm)œüîvûg‹á CŠ¢ÐÐ#¶-úï;åE/ h’û¿pŸáÓñšïd4ŠTÌy¢jÍýw.E[§{>}@(2îxowæ½ëüu߬{%¨kþá}ဿ·/82IËï˜m¯ùÝb›&«Þº¡xÕcGÇjl”©XÀæªþÁí£í5€ûò <õÝ‹í—÷Òž ÿõX§Ðz@€ðƒŸé‡½£édÖã0^ÿã·Z›G½|&3–Ïßz¥žHÆxrÒÖ?Ú±‚éÈcè^p8ß[RÑCzÿOöÀËŽ¢„Ê.P@¡ÃÏ,6Þ¶®.YQ@|ÎhÃ_Æ>G’ÂÇÌÍ>x{“Øs®ô7§aß_—k‡w4¸ïg¸eZg™Áe›}¿ïóyãÁ û@ V÷ίÜPº¶žÁ6Ü:?:k̘Àj„”€9ÛÜJ‚Ðíø…ŽñÚ­¸dÖ×fèCdR"`u±õ¸X¸H&Û­÷·•f·;*Ñ-{ JY¦ždšM$l¦6)’P/GöЦSéÎ(šâèµ™ñ> Ëœ:IŒ¸_|í¢’ÀÜ`¹n ­Ér9þe+™ïš:ÀYl~wKñˆssn~uû¾sŸ“ ³0ÒúóU¾Q¹3Tr÷ïë8rFa~ô3Ù ÚŽ4ò/s.j™¹^î\ €kÏZëÐá±FŸöÚAzpë]ñÀ/8ruv×ïq×,Œ’ó›ƒÛ+a‰è9å{îPȺ¾f,À¤øõ§µ‡†Êë DP„‚ãqQMsˆÖ’8ÜAj‡‚&n‚ˆõ¡²fv¦Þ|½š\;¥ÆyV«Q©¨Ÿ/®6 |­€ˆ$Ò´$~¦‰`XUW+fE1‡F%å(Qn mœÍ·r0÷.T!¢ÝÄ¥º™]§ÈÇ–Aç”ó`½ÒénQJù:°b`Ûݰyùоv¼&Óœb­x罋žEÅvCzxû“›^@ àºcrd˜Ë”YslFd"d>‡0÷ÀRVW¢´ì¿y΃²W’™~¤”³¹t‚DÃâ’:ýèUfiWXP¤ØÇ@ðxÏ5s›Ú¬ÿóÚrËÉÅôo–pÛzì>æ0{Í•ŽqH9sR >dË#S$C9çµ—•ë(2Ëރ¨XÐߊùãÎvæ«pûN€Û~´”½d#+¥N‘6ùÇ~‰Øͪ'G€q0ÀT&€ÀLQå‰u” {xÔ¯Û¬ìüÜnP'ç!¸Å?_QÒsx<ñ¥Ói'­vr{õßZ‰!R|KÄNƓ׾¶ŠNÜo¿²Øxõ°×÷riqJÁÌsŸ¨ÆßÚY>øyµêÃâ·w{G~á w5/y=xѽN  `tßýUQ¨db.’æeOèN¦ÁkA”JâpøçJÞ¨™ ­ADPCê,‡Næ{é  ]gëEO®ÆÎDl„Ûñ ìˆTRמ#7b]ÙÌy²^Ù[ƒ±ŠI”kD´Rš˜«»Á“·ØcnF+­Î¢  DÏ4öŒbhÈN0¢Ñ`ä"›Ì{f%ÂõÀæÝzjboM2¼q‘Ðh¥š$ˆmÂ4€£è…‰@³ÆÈе€:PÐ*QÑpDš£/8pT UdÈR,u uEe™•˜‡”SfgظÖÇž ‚ʳDë :ˆil9d¯j6¹²ÎpL¨7…h²*ß_±¨"PÔ¦ú`£UŒ„€9˜ÆI› "! “ fbƒ2$ÞÕ¼\{r%Š2iîÓfàCÐb4âÁ² F+-¨kB$Ae´4Æ&©' UÜÑÌ ÎyVF² );®†9$ùajʈO'Š"Ð(@"è&Mrò¡õ+cDH§f2«‰Ä¯Ž#(&8œ\ãW%ÞZE±ô2cJ­´!’fÏ#çœ 3Å²é¡¥ÌÆ¶&AQÀ€TDö@ýŽ"¥¡ÔJ³ÖÒvŸw >4›öIëËRœÝ¨zÏ;aéš«ÇÕwºú\ªÝ/ßÔðßÔËKØÞ„«]gñ!}ìÓJ £¼6×þo<|u*Ugþó|÷¯Ä»'œ…ÍÏh¶Txè Q±ÐT×hok=€÷÷w:{Ê&žÌ‘¥þÛ<á8ì&Ðünuqò1Ø?ÿ”×ï‹Ó‡Ï®~pOµÃ…ûÕ›:eÒî»{áÆ:ÐÑIÜ^±¯ÕiãÑ»s̪NöŠMhö4úv5Õ$’œ˜K“Ú §:sWiÝMcÁ-³q-¶*c+Ñi& ‘wîdмkpb><·E¢[PmD;uDÎæ.χ˜IÈEl%ÈôÀèÞ’ÑjZܰNÂÚÁDävN%B.öD ZIRÝQ‘YjŽ){ cì­æz©‘Pc’oN2 Í\˼ÛÉÚåÕi¦ç‹÷® 2±,Ü×dƒAñj3«%j‘$/`© ù¤t-$b&Ù¿¨9÷ksŽË²…[Â8ïªÊ‚QÉHX§¨iã A;tþ™®© Åj”Ür¥Ål´ÉC•ÔêzY-ž:u}r>ñƒi ŽŽD’uzÍdWÀEÒcv5xB 'B„>RZ' ª8…P„ºSkf* óœ'{(¢r \žž|‚&ÝdàôSëé{êÁ/£ŽúþoßÙHÀ{ïUù·! æO”%&o¥ÎoiW½ëð)6qÛqÿÛþÑ ;:ßý­»{Ÿ<3%F`ÚyçÈ'yôzüÍ››TWqaxÏWhÍqUedÀ¥Ï"¼þ°Î¸ÂÁ7I½ý¤"Ì]úÇñÞiv¿ëÇ7Þ€³_ž*¿þ‹Å2ûž“SùW»ÚH©~úÓGøø¡âí§†Ÿ|ëP–ðÝï" ä_|ªçœÑ,¾ý–…™©éé]² %ÁÖiÒ.}ürÏ `ÞqÞDš°"u«"´›>ƾÌ?æÒUYá©HêG}ª ŸútÅ‹yÅK]îøÁ÷Þ^3Óyج1À7^:Œ€ŒÂtì%GØ(BÉp÷{ïH/>7»öÃ8´H},W*™û؇^$^ˆÉ›¿ÛÍ­_zÇßªÈ À¾ð@A@Ò¯úJ¡ [¦hÞúŒîu{@}ú,úÙ‹VNøü&°MóÃO/‰ zï‹Õ_>°ßE&äþ»ÏG½Ó%‰T½ºQ[BÄ:iÿøž!]öhZ„$H#'}h6~ô×±rã"däÈÎ7ÝáZ–“.íòeWºWþ »=‚¡Ä¼¯×|Y»Ò …õѽû-õŸ?ºØýÐiü•Ÿ­Üð ÅBêÕ¯ëžö«e«”UùÛEËÞj¶ýCñ²§èN,tTð¢º@­"/¢”#ç@AT)b#Þ× )  (A ÒÀä³Nƒhéj$$Ö1Z3pÞ3Dô1¶.B’h¢ÈFCÌ•˜´Œ AXißT,‚H…5ž‘Œ4 ³€€Ñq*é\ŒõžMJÚÄ6𔓠%×ÄD # f­ dµß”(È’ ·Jk¦Ð`K"¦£›ˆ€‚JeQ@‹¤L!1ˆÑVUc‡Ó ÄŒ’È ¨&Ç=0œÇPOw2ÕŽ@„ØMHkI׬¾G ›J‹¬@÷‡P·M+¢tgãžuh“nb> ÀÝH5ë©,ª€ ‚1³®š ‡å#©P5*+v8 a*[dÝäíèÀ÷ {bÒj^‘WÍï÷Ï>~Ö)¬ÿ¾»4Ûú¨Id©3“ Ðé³Öz·þÛÚ{üÂus¼åÔlá†%uü–þí÷VêÔUÉò:'Ÿ–蜽¼Rƒ èÅÈ¡›–÷<" >ð«béoʦhS&„ÙÇõÜ‘©MÍ8³y¶u¸ieÁÜYBrTgvÒ EH·N…ûVdñÊüÎ}Q$â`…“»—õ Mï~¿Ð?Æ'*.í !´Å†„$ìhò ëÓÃÎ} wp‘9W导ï÷¹¿ÏC2Ó3T¨‰ Eöà õ..&›,º(ùÏz¬€S]1U{ªÁ ƒÈÒÁÑl0Šì»yjv}^-®”<'­¤Qñ+R.Ž`íJžJPÅ4RB’­C(½`ž€PÐkf{~X¢cwð—Æþjí0t&ÇU>©ª @Wi˜ÍòˆX‘qlLjF üF"›tÚè¤Iá¶ ã¦ãeà’U6CM&Ë'°2­ÖÝ”AÀ4s‹ƒ TîwiÑEЕî³ÀœkD@–ÞK½O¬5'³8úØžpa:üÏ;¢“‡½®OŠÀio“5Ýù¯ü¦tLwÖ!ï,4ݵY¬­l$ðº-W"D ¾ò=õÜrDð½Ÿác/œ¸÷}ûë—ýK}ÓûÇÂô@ˆjð‰íKÿüɰšX/ž4¹†ì$é§=#Y¿Ê¢ÓV×¾n³É\Tbg']ý³«P½‡E{â‡uÓ÷öo9£èùŒWväøi§û) l{Õ&ÿ©;8Š~ÉÉvô¹G¼Qs¢üOnuËËPÔ™çç?9€·> &-M=uKïl¥ú¹n˜µžyõR•Û|¾Z¾«¾ã£¹yó1†œûÑ»Ý=×ûgž*g¼u>ždý=¿Û»î]÷“ÒJ`ºó§‡[~¶¸å)}úÛoíYOÒÞB{ø©ÅQ½ 3ÈA¢ D5ƒ2Jßy[ŒC:üq7ßW¹^çoC WàÑuµ\¸kç@nØçm5‘€«¢™>é€Þh™1Ѐ jƒµòÈ1@m`$D Á3¸åÎVÆVºÞûb½±âu/ÕÂÙTbQÛÉÉ6ƒÐÈ›HmÛ4š,ŒµÁ¸ÔAdd‰­Ils ™­í,"Å Y ²=…ùÜòJ#ŒÝÙuÌ‚|fË¾é¼ …D‘­t5®ÐMgЮäÓóBOi -`"R©ËÓw•+žÝLf«ù˜ŠÍýYN” T´~ÿbɤؤ9Iƒ·cò6 “jØ ö,3h%Œ+Cuó‹DàñXÏÕ°²7òÆtqñP„P-m¿ÃË&ƒIÈÄrš$¶qèeÓ‰ý"“‹©R³gmT& KQW^S0 y½¦_« þ|ëÊ&7¡|lçƒê¸FB;ªz4^p,‚jõYܽ5xÂãÂ/._Ë©4‘wÜ'è˜-ñºo.ª'è¹§_¸ö xABÔ’ç¢öŠ+æ ÉÁC”>ë0ä V÷ϼñF\{âtoG‡î'ß/Oxfꮼ"€`¬†?·ºîƒ»×ŸÞ[¹ü'|ÿë*Ýâ“^Õ· ·û€\LÍ*1:ì{×#=ñT³ô‰ÛCþ/°\ÐMLlÞôPT]óoC=»©)‚°ÖIê =í­É5@ ÔðUÜÉSìMjˉ!4”cy9ÄÖ³jWJÝÑéÚ”*×Á~‚SÔ)ªk(-L?M ±éÙè똤ÇniÊ&™-J ^̪ý‚¢¬œ÷šcÃy+Ò4óú“* !‚ˆ ž$2XĶ<8ª"Åű(mA¹’u6SX¥Às&*/š4š5Š@aŒ€VŒ‰Ü-LPu $!8 eë¢qÊÌXç@P{#mð ˆRä¦Ö …Rs £R("! ŠÇHh×YDb4F!D§HcDALó\´!t,9iñ:b[1‡V¢¶õaŒ˜iäµ5˜J# ‰‘Y€ÉsÚÆ:6AØ`ð¡-9-:Æ:]ûÈccÍ©J“H¤rc¨bhDP §Q¡ ¹€\€!µŒäµhέPbc$°Öj[BT’h+¤J­¢!±“(b³ "ö‹hŒN*Öà4`d 6ˆØÌpî“if£$CV”­ï’0ˆä”ä$"(ºÚÙšÀuϱ€ø01©§£ÒœÎI„²ˆ # RÿK¯í²¤5V¯yâÄÄZ¿ç·D5.yçsmïcˆOyÌÖ¶›?½Âzn9û0ŽÝÇ?|”®éÂîþí™Ë“_<¶¾ìW哾mW.¾¯óÁGv^ñŒ8,|îú†÷30ú „“Ø¢ÜwéÝî‚çwï¸äþvA³+!#&ŒmB-ò ÿªaàùϲ;>}pê­ÛàÏ/­yÃŒ=¬ƒ(Ûàøë¹‡_–Géf)¥3^>½ÿ{¹ö|ˆE€R0ñÊ»z],¥î¤4ý÷™½àQ|ÕV–/žTÝ ç¦Þs\õç_/žzAô™íM"í†w$è3òÒßõ_ûä1ïÐ…mÜå G§ÎJä(bÍ#òÅ,¯èÇ×5+\{ˆü¿ªSÿebøÛëÇ/}¸ìÿþü¡Žu§ÝöŠÙÁïo,×½¡Î¾³ óç=>YøÅmxò¹|ýu&ºïw?²æŠŠÝ¸ÿáÞ°þ_Íqî/7íº0™©î úøÓgè[l¿€o¸¡^óĬ-rè ïüB·sÚááï·5³ç&ù)(®»{î1*4?s×yù¿':AJâI<³ÂP\þþÍ’°8`A”¶“è%mÛFW.W†¹Ý7hâ†ü¾Q‡£nÖ›T’$©˜” ê–•S1aÅåö Tà 1F¬L`áH"m¢oH@ÔìQÚ:Ý|ÿüÁV­>Zõ(4‘"Åpû½c·¹/F±ÒÌ1S3Ó Fg¼–@ùýû£‰ Ã1hŽ@"€<±<2‡oÒÍ/Gñ`I»K•¿öj×ëö[jbLܪÄ͸귋õÞUtEéŽdPH ¡•ÛÇI]Ûúæ1Ž;‘…Ø þÙ“‡þçŽxÔ9þïÿ½äãý÷ÓñOɇÿ³Ý½èé½ÿ±‡ƒØéÇɃ?Ü1ù‚-<º …j”;ÿ{!cr‹?¹ ßõ8ÕKyðµë] a¶O|Zÿ/_+“OŸ “w5G½jvùÝ××áÁÿVÝO>ÅÑÎpø«gº©ýösÃ#>¾iøñ?zheùû ˆtöEX å¶Ùõ…½vãF[¡sÁ±h—Ád!Ã|tÙÇ€W]k8’fQ/~ã4g)vu|ü«;Ûß;ÀKžhÁàü§Œ8Á9†„Ö0ª‘{ Ei•vu-‚‚¡œ)ÞPWŸÿY}Ö»s¹è*þÑÏÕy™rO<&s,ŒvŸ×Å+_™ýášÖwbÙ‡¿¼yYìéiUè5ê¨àÿaÁÁ¬0 Ø¢§bÚ͵Ã^WƒHMDð¢çăèäLĬ(Éü\¯ JØB›"G1úæàŒó‹ÔÔkǾ´HiO3WÞôc1Á`㸠%Ôc™„ËyƒP2D$¥SeŠ$ Ao]"Œl™(2ÛÄÅ1É‚“Z"–XQYZÍž¡‰&ë§(`D`Aýh¬òT‰2*èˆÙ•XZ5u‚îúi54±Müh%&h¸M@Lj)Rãëhîx'ÑNN 4)ÕÑÒ´( ÊÇȘë®Q„"`²q% :›6 ŽWú„„MÂEÚpDðÙŤ"S†éê €¬k­¦Ú1ƒèÈLPL¥³«àVq%5õ§0‚0 :L:)³îv´•"0cŠVZ/ˆÂ‘ ™èå ZVº‹ž]‡<L2”Ôp`§‘€fRŽ‘DbDF€•™igš²U8ÓéΨ†ªÀ±!A Ö­CḢ ªC (µRdÆg‡jB¤ÍHw’b}^g맪ͷ”QxylŠÄ²oÃRé"‡¸ó6cÝmÔÂÒØÌE.Ðm‚4D?üÁöê¹+ D’”Ê$ë_´côç½²íq‰%óß­+—Ц2ü1“ý»n<æñ¨™&>ü©eÿê+†7×ñÞï®Ú?"kÝ’YúÍpŸƒãÏdHyÛV ·]1ÜòÌL5ìoÄÎ=ó̘#§Å£O^vÚo¾ÑÕ:íNHŸ8E'( Ñ*<ú±#sû­É#ŽNg,C-lQöþ¦Û†µçT[o†¥ýâoª «›pÔôü= LÞë³zËbW©°{NfÖPµ¯ö·6pøáYzjÛþc‘#ÊŽ²V§,¬ZØ3Ø%ПNŽšhÝÂÞ!$qyC®6g‰vàwîMÖo¸wïbg··:Xëb…þ@õ`Í2Ñ×GV·Í­rí¶tœm.ÆIºùñE¥fFíæIm7Áx¾–áîliº-pOé×Oø–õdd¥º)¶C®çFÃå c÷«þTjº\¢0k£­EÚË{º¸v´9ÃC"c¬Â° ”nè"—Ì6%d¤°-æ>UUb3X•¤ÓM¢ :8 ¦Á¬%æÈ @‰A0H'‹ó²è)º± ½¦q1hes7([A_r›ë¼È U åDÜJ9 ,J™Ä±' +´"—¡ah—ˆ™[ˆJnél•Z$¥Ú®RRr`Y´ 4ü”ßßÝñÈ.0ÑRú>€d/p+ó |ÒVYÂCïùÓ80Éê‡mì“éW³üö[¼œÚGRuªÊÇŸ×î}ý­1ŠüãNŠp ¢åoÞß0ÀLæF õU_m:瘨Q®ü 3‰R®Ê£èÙwŽ%îö w1#0®~Û±E&®)Mž>ú õMíÍVmH‚'Uˆ¯Q®ù;Jö‘·©_}èCößH¦>s\ûŸ?“ŽÝ7FÑáÒ%–7Ÿ7ñ§ËöŒ?§Õ7ôý¿rÉj- ËQç·æ×¾}Ÿ‹bÞðô®I°ºäª"óáÍ=2 È»ÞõÿÎWðo?zð°oR_|}Åò"f¹ü/€-êw=µ}à½wl¸lõ´9ï‘îî·ßë^÷¢n’dÝ/·TdnÛW.º­þÑè˜m^ºø&ÿ´Ë&|§J ¹•ÉOœ~ðÝW\ýÏY}ââêqO¶|uèðõÅÈH,¨öc7~Ç ò¶×÷³¤Í·öëBŒÈ‚ùݳÉ~òIÉË^è®}ã‚o™^ôÊ>:ÒA­BÀ„[ÈNüqœ×»ÃS¿›N̈f6iKñ߯Vïz¾¥DP½áY¦½A’<E9ˆ?ú©öèCQOûº¾ïÝø­OåoÝÉ£ _ýœøÅMSÿ=:¦cÊV>sÕà‡?§0†ä¢s³kŸ7î~å4YGºéþÛëGßûv{ãsuÞðbÕ¶¢>x&üñŸçÏúrG9Òàñ?où¸ÌiHZ€ þŠ1‰íŠ8X ÁXh¥Qj±6QLÞ7‚ȨXêA“ I±£"yŒÊG ¨•‚È(HØDDp,žA°Å–DZÀu= «µ‡† 7dQ‚R‰Ž ‚È&DæRû–*6¹& ¡ôcÈÞ3ˆô˜Xd ¢Pг±$#YѾF4Y+KQqf I‚È›ÙPHDt .‚0Ôb´ƒÆ °Ä˜å:„P1¶m>%è<ò8FA $èuD‰ÃhUY› â4¦45¥4tº:3!ë¯ kPYoR!#·®3 1˦¼2BYŠ$Yì&$½ë„) q”èTMb@©ê.æ:LŒ†Z°Ä@ à!·óƒ¤MmâzXG¤©.D ŠR ” Êg0ÔÂÒ›4MÔ”pË~à#4ŒhDPénoÒ0A`­Á4„‘"!€´lõäÄ!˜š¢±Ô­€øãÑ0k78†d«Ö"9HŒù,Ã¸Š¾j–BH@ì*oW¥Q€h¬ÝÍüàà‚iˆ°°¡wTÔÂC4Áÿ#‚Y·ž´†Âê“2wʤ”d1áþ)²|ʬÊZÝÝææTB*8“Ý1¼º‚´ÈVÓ´Ýk1;g&ì†TA¦6í=%uqœŒ€¯W…øüÄiŽšË»o¬af“쉸vÍõzÍaݸw@í^O5RÒÂ1ý•”+6÷g6Ù: *Û”$qçðÁ©noçhxOƒI?1;k3ƒŠ°)Òm«Ò䤋Dg5e–=aSEâÀnšÊa…ÍöÙÄã¡Ý æiªP"øNo_g‘!0àt½×:æbU]•Qa¦ªCÎEÜ[zÈÃhOIšµÓ³Ã((uÃÈ‚âAyö‚ŸßÛ™˜ˆIÉuœò¼{²3‘¡,Ô]Myœ‹@ÒæÀJ¯½Ž’–‰¹ÊŠ™ty´O”G&=riÎÇ>ŸpÓ½Q¤ŽÂª:íÐE©«(Ú–#…È‚*Áºa"pÃ`œíRÁŽIcâ EìѪ’z„Ô×y– êv¼sµSiƒ4hÌ GJ€#W¤8Ía<àÄ7¤”fBhÓzMxŒ9UC(‰ÊêØa£”OòBA#¤ElfuŠQ|…J¢˜Òä+b˜$èѨ« ¶hטHºILHY"ûÐpœ- „ ;ïÄ Iƹ·Ž“D pù˱¸Rĉ7 ÆI⻵ìýú½‹U«jûšÆí=®ÿõ¾ñy`šŠzÌ«º{.ÞI Óy2cà?_Gĸî3y\á¾K'Ê… ŸöÜlÇ÷­z×Qê»ïj~‘=ôžíc@uΫ&kÐà:º„Š¿u« g¼>ïO`:î"?þþöÑ£>€û¿¿¯wø¨t/é6EQEÎ~öô̪ÄwĺÕÑj5DS$æ‘G-úü}þ»¿™0FÜ­~òæ;1”îŽ_òÞ'Lî[i yÜÊ?þ¥¬ò+þz°4jy.é´Ÿ çžyò¨EÜû³ÝŽ@äò;h÷\œ¿lƼø±y£’U¯iç¾1<õ%ª½üïóÿô¸BS£ìÿzÏ:Ánpñ×F!˜âEÍÄ]W­\u0ˆ ûŸuvã«Ûú;Þ¿¢ß;7]jä/wú¿ÍÛØ ÕÍ®[XeÚ<Þ4Ž((”%uÂã¯îéœqª%xAˆ ¥ÚˆWY-w_[ó fí“×8Ý"^õ 'c:±Þ²Õ¦ç‰@ø¾ËU'Ôò„#† w/¬˜d<ñHä:kgÇ·n¿ãe®Žž}ûøÎ%ak’Ñ®Q¯¥ÞfSïšØ¨Rqé†n%Èm’QDŒìy樥ö ‹¼tëäüñE³Á;ÿ}Uwk‡BlÝÜr}\ªƒ²áÿhÌ`ª›ú&u™dim)¶º'j&b Ycìtí±ØpÍ¢öÒÜæ´ìÛ¦ÖìDl"¨õ[‹ f6>ñóEˆ„½²Ì ƒ_XFؼ¾(­ês´tVü¨rÕÎ>ί_Q™&)3‘{‡F„MÓh1€Šf«[œÛçÓã‹{÷7pø¹…ÑeiÛP€Ô¶GMIW/ÞTf TÀZ”æ–@ÙB²¸aËâOvÈÜ""1°ÐÙèjôla|í-Ë@â]÷ £Jžy† nn­’Á/þä0E¦\Aã# ÁL_¡Žsw ñ!Ýr‹P„p'ª3ϵÖÃä#}õ©ß4‡Eÿç†jë#tRcº~gˤ™gœfüøÄÏ~URþû-!ƒŠõ/¡¸ôqéŸ>°>~­9â$n›Û…ÿv5 ÃÕW#ˆ€R³ ø?ý™.8ÞŒjÖ¡‡>áè9šÑõè¿â'ßÍŸóDe²fÿeÛC@!ЯWdà̪?ûŠP²ö0¸í]KŒ¨?õ(!²NGèõÞeQK·¼Aö¿ïkdQûß}} ŽøÆ†•©Ä?ÿå“$Ê[«ØƒÑ«Ë2\¹Ëξ}›ÿíŸ=ö¥¶fp_ÿUrî ;¡Ðöü³ºÆÇ¥¯P–ÂÍ?;Ð}úðÈÖnýýÔÎÒ¡ºçªö˜WÕk¦Ù<ý„æo+„R@zïeGQ<†ég>~ù÷Ûã‘gO›4&¿¹9L=|]%ÒgÇ=gf|ÝÝóWŒâðgË÷U¢¸]ºqÿž;€âþ¹½5ÕG’Êþ‘Žßlž…L© ³é¯œçÛ«CóÿN<îQÐ&³6nÜ–i!½y§@:nu9Ô!t6ÆÖ#£ 6ÝDÉÂ{Y>u#ÏïX‚s’ì¬ÑоãžììuQ;(ΞZÙµ$}{ÍbrôZ3¿+âºYƒ"ƒÝ^r]bµ¦€}Ó›·ªñ.o›µÅsŠƒ>,ºzG{èþÈ‹Šƒºú˜á ·d°CÏn4"É8߸¤¤ÍÍ ëÔ7L¸à”óTä8ªER"£îk i‘»SÊ®K4D0õòP;! ¶U!‹Ã  Äñ|“U¡ݬšF  VŸ‰:Áõk+›è”À ¨8츮M!Õ}læÂ\móµ³Îr¹­SEÁ0JXµÎh¦'˜EšìÕôý½æÈîë«v?"¨fËüãõ0Ï„Œ‚‚¶ža*U ÝóÏN Mpô÷[«Ð}ÌÑHé@S’,.áªqÿúÚvòYSQÐßAÔyFªª<ò}@¿ôçyÔvü¦œzyÇu¸Ã?«˜<ñ±F£«>üGÞð즤N9¶ÕÛ[ B1V—ÿ‰EÎyÚºjßýÕÙ/ŸPytïè”×­Ö Ç]ü?ù=ŸÚY;EÓê»>»wì#ÑÖ f—?z[”p$óÜ'$\*'ŠAñÆbÏ®åú;V¹ òs®?bª†1šŸ’qÚ4ñ?"˜½é4ÔªÕIµŽ#‰(LR{QÀò×kЦ¬æ¿|jyãg·ø§?‚·à`ç³°.\r½S ÍM~ñùª7µlßrrEsŇ—)eh"ö¡Þð²o†—¿tâ–‹+¾øüäѧ—$Ò]¬W< •£`E=åyió_w4 ,¿úƒ>û=«t÷ŒOòüçæÛ…Z€! kA­ðgÀO~VÛCÌuôëúùé´Sg~l ç€Fü‚ô¬&ëÜrxIxÐFep­Œ@™Æé”5DÒ€B…š4~¬Ù1¢%¶ÓÖpnL3ÆÆ{Ûè´[(vB—¥½ $`DM˜*['1ŒµÕлV›$ñž!Š&b†Ð4ª0$¢ ˆ”m·Ó@¨ƒÛQ©ØJè A$H¤©Å ´Ã¥‚"Ø77JÚàA"QDqÃHÙD‡•÷“$”Z¶eÚ®=“/ ­øÔEp" ò®å˜JÑxaÊeTEˆŒ e"LV’4Mý:³3$ÑoºÖ±Ae|Q"S0aX ŠJ55AZR”ô;Æ4XˆŠî$#¢Q¹Æ±Ïm †ÍÚŒ°.šlÔ’fD4“:‡Š¬&Wy¦ (¨q qLйD@×4†ãÈ!¤k µ-Ž"#@fUgµmÛÖ$,cºv:ÐÓÅP[‰MÄtͬ˜Tí°¬—U$•vY+j,sÀ¨:TólRvš¾ñ}†ˆ»$• ß—>î‰Q4§©³01ŠÙr*ÜýëÊyp(ãEë1k5ò©9OU8hbЛ`Ÿ?fMv¶èèB}ÍÎÐ" ;šÝÒ]¹s\Ÿíº75­Ä+«`O\ço^èbû§׭ݱ'u£ÂáM÷ògè¶åþ.¶Éº³ºÝ'÷ôûŽw”¥¯gBNžÍÂÒÝ•:r"91¨l|óü♇űŠ`“ô¤vnï}%«Uë’jG5¾aïÈ´ÕÎàº3Yu !h(˜:)ëm@Œ ª;]rxM,-¦'tU$a" À*¯;òàÔƒ|p…E°Ê•øØ¦Bí ¹tÃÑMÏ+%A¯×í>hЉçÕquWüúU´Ji™VØ‘¬0$À*íêˆ23šC]X=_ê5©]d à€—÷ÜYÆòŽÉ%œí’0€€{ЃtŠt4`9ËAªÛ2R† ª.VWÀqZ¥y¢P[#€8bÁÕ+U¢6ÑxÌõ¨]jO(&ÇJcÌŠm(kAMV~)ëÚÀ\D&¬ªQžÖà*¬§PD0­øèèØtœ¥)Ic#ð’3T´ ¤Çd2%Œtjˆ¨ZU )Åš mK‚ øz4'Z\è˜(DȌѷ665˜0ª ¢$ªÎ€QyBlg kÐDÐZ©VµÈ¦®²˜5hxˆÒ`)¨Õ.uºaÇ%;[zÞE“È?vGûŠËÔoÛ‘¶¼oKóžkj\éÜ÷ÅÛjFõž\ªê¥ß_ptÀÍ÷àøÿÊûÏyнô#MQAô¶oN”®ï{ïöMÙÜM «¼¾óm{øk{Sjžv~{ÃGîóA©{"\ÿÑÝ{.¡§ü{oßÜ'ÿþ sÃ%{´±™ÛôéšeÔ·¿iw÷}gLBô÷\¸kâÓë ˆS£Ì6ÈX(7ñâ–ßÍ8:D´”2IÇ:Î@(=êtLPãŒwÐÿìqîË]dûw›N·½ãÂà#ÿdÁÄ“>¸6OµÏ{û)jsáã;Þ¶w¼w¿¼ã]Ù^³|ì§·HÄ»ó?î¬[?_ÛÞ{õ§¥DŠü¥¯`Œ²ñƒ[ÌϾ=wÓkyã6e_ûáà°÷­éw'”løZ„0Ö« U6ä>¬/â—?~xæë?ò@Õž×Ý£Þ|Ašø*›È#+Œß~³k=?âÝ=K#ùÕs—ÏýÀ”&ï~ùõe€Èïÿ°>ÿ ÝßrP.|U­ˆB÷û/ì}ó¨éKFî/—ºÛª¦sY3½T¿=IþãIÅ“O+qMÏ¿ôüº7Õu—.ºŸÿs{æW mŠáÇ_žøþ.a4ˆ„ÿöRU‰˜º€SoÞFÿóëah~÷Ý’óyóÎ÷ËæTÊ‹ÿÎo|†¬Œ"ðX!Êö—u2ËñÖ‰]+œG—¯ýxÓ¹ðÜÄ @Ô"ÀD@”›CW¸Ž(L&Ôøˆd4Ya`›KFhB…"ò¸Û:ˆ™8åÌpÄ ($*õ./L,ˆ!"#ﱕ+Q{L54:Dß:2¾t(-ÖÄB"&åÕF1F¡L!3EÓ/”R!&™‰g±†N‚ô'Çb‹ÐEQmdTQ!‰±±Äbˆ@@ò(h”@SU †Áçkf±µ0xP} LäI™xá*„&ˆÊg»Q‰ôz…ö½B1á„5\¶”(UåMÙ¶€B}§GS " y!à^¦È!·Ò&}žÍ†ÙìÚ´€¶/ÀÓ­qªˆˆfºƒÁÇ–A7VÆ#/¨Ä3†èfº¦¢ ~¶ÂV…0,c̦zÆÌ”ýªu¦TZ4C4œ…15† êÅýc5¬LªC7šÕëŒã*–¦ÌW4Á—‹ã|³R43;ÊÊÑÊú¬àåÜø » 8© Ínò ™²GV™˜u“òŽ™˜ÝVØÃrf·pûj’Ü`îšÕv´sÚpL=ÍÝUëÿ'¼€Ûì¬ÅíµÖm{ïÇ^wÜ2q ŠZ …"Š)-V(KñÅŠ+n…B€68„xBd&ãúê#ÛnYëãü¿ó;×uφ‚JV#2!ü‰·~÷îpÖ'hg ª©9»³Gbhát ›zíÂå¿i$Þ¶§Í÷ë`ßæÞƒ5 О?¸…myÂÒÝîÐ!Oë K¶Ý¸û¾Á)Ó¸ëÜÅ€ OLÔŽ÷Œó¬êlÝ8Ûѱg&ÁÌž¬Û­‘“q\Q*©Ö®sª-W| ÙÎm«Ýh¼{Õ§»uoj}Ö,“ŠzÝæjö”8÷öÂl}1ååñññ5ÅRš¥Avì:Ø0A˜µJë¾ÉË*¯eÑê»äµ!Ìtõ€Hùa|K r⤞ûüÁÙš¤më‘dÛ•#Üš …¨Ñ @B%^íxMuøê=$BZÛ-שׁ½v©\åÅwæøüçÈÝﺧBÑÏz±Úü¦ÉÊ—ÿØ€áõ/Zo6·9uüÁ· kÀÕ·öæþá{áÛVÓ”í©Êì|Ssü¦ï,Å‘5/\ðßùDù„vN¼ÿ†ìå—šFáøªyµ·”‹ž<÷¹úëËó¾b²µZ "ÎÓýHn9–vždmÏ>]28Á¸?éë×ߺ‘÷ЧE!Oç[„{]zÆÙû¯ïhÍA‡©KDÓD'¤\H¼mòÃ;ùÜ y$î`sÏçï—>´G˜îþáñ$H».ßxì‡7ŒEÔ)OÙÐø–±«0uc{ëËÞ£ò‡·}¿žÙIY ðû/­ÄˆdÈNƪÿü³\Ž¢ûãþóF#^÷žµìq§Õ:ÊÍfx¸ Ê‚&c/šQrziD’ÆÐE»óU-éœN`&gžíw¿øHËI°ú( ˆ$eŒHÓ)æ“ß­øomhVšr½òŠй𮫧}¬“Šÿv ‚-oßÚébÔÄDyM(w¼ž /‡q™pÒß1d`±ü³‡–Ô#ØÏpñ{faøÒû‡©¢®QJ¬ºüa¥hК þ@Ë`¨œNªn âÊZôÐR¤IÀ˜rãTëšR%@u{”3€ÂŒRâ6úacke@ _æ¬Ú:³eetòvõ@#J¡I*°¤`¶\èRì0ɰ ¢êd”@S*àcåApX±Ò¼:a“$µM½’ Ö $H‚EÓE¥˜T£.šä©  $oYQãX[%*pbt#Å€kT‚L q¢Ø£QU8žAJ$yª£´%·ÂÊš`´€® Ñ$˜"f0k%$_¡ëŸdP+ÒL– p!7€ªÍ·í¯e cBa Õ ˜XóD‹²1™Ö§ZDKaTh|Í X)j¢a┄$q*“&N‰½¶:qJ’±ºÅ?Ñ€¨ûšBÔ<¶Î¦Ö©0º¤‘ Ö¬%錫]bH€Ä  f­µ x@ß't%˜r@ÛËa¬™Ú¦Š AIkAP1"S ©n51€05Ί˜RL‚¢£©¥‡Ð„ Š}›Z>Uೆ’Vƒ @íHkøf?±¦7Ï@·ƒjüÏ}rѦÆe~’œÄsÞºåèÛÿÀÑ´ç¿mûÎÏ,­þø[£óÿv[^«úkߟì~a·=^«§^aseW~úo' …³ÞÏ{ß»ªÀCR{ÄÓÓ._@χ>¸Xå`‹ÛÞ~¯¼þ‘݉knüðÒ¤F}ò;ô껎 eÍâñ(‚íG¿âŒU+»«„¬èýŸ<>|ÈC;U|ä(f™ €O3ÿxbü£_ùûޒ;âTúý5û¦þ«ÿ<ä…$”ŸY(Z[{äâY»z×cqᛳ\ÉÉIs¿ýïÉõ“ôëQѽ߃a÷/›ùgÂ×÷0‹üf˜§³Nå‡ô]G‹ÿï›ó_IRT%û¿R¨¤Ør§¢F?òôX,}©ïHå7‹‡¿šk²ö´dF¤.жKèïùÎü›G ‡¿1Õyl>– ŒUsàÖᾋ›™íf|ïï&{/áÁTªÿ°eï¥è¥ßíþ°ùíñP}ï÷m±Gïù;nñF¤–«U•=¾geöÒL×ÐN"v»UÔìÚéø¾}¥fóIvtàxs­–³Ö…µ»ÇËsÅdoMEØÝÂüTgm?㦌÷´`”LÏtöE9¹çB‚úÎ5q×<ÜæìCuçÑ–Á\pZÿž#÷L@1Š€<H"Œ 4£ßîÆ'<¸§«ü®Ù%d:™‹BÊ)å 6£}7ÆöVX(ƒ½ñõ©;3ùí1 Òþ ˜xêÑ»Ò0é=i‹Ÿ°¾à©Å7Þ“àÑEX÷Á“&oû]¼ü9ƒÕÿÝd÷>Ìß÷@ÓáÔVQ~ "‚™•d5'EG>‹(€€Ü–]±:øyT ™~D±ûËs­Eb=§¹Ý—“Üv§N‘Hvï¥íMÁ‰ˆÎ›Wÿ¦}â•=ãôò{~Õüåëg³^ú÷þÉo˜ÊbHï½f’L>oMg3ºr‘“1oÛœr£< šÎ@ØéÔ~î¿Öu±"Åiážwèç¿‚ïxë] ]ñò¹ýÿxÀ{Ô(<ó¡YúÖGʹÝyìõw¦?{I÷Àk䯿Ä~ÿ½eñÆ3ãÇ^³( g½\Ýòª5õ‘ˆüãk±xÿÃÜSé{³Ô‰Aí°‰÷ÜêWW¯î}¹1䢷äfÚ1ÿ‚Í`kÚÖm–ß|g]€ [H(Ä»?°›>»Å¼ì‘õ†9å-uþá/ùúާÿí¼¨1»î-ãôÖ˱ €·P(Q´UOÐ$ÒŒ)!i!‘ÈQ7K«K>A¢N³\´©<‘š:P¨+0ÄJ++e;h½pº°)‰àŸQO[]M¤åè++1ú@~âщ¥˜°Ò͈5 Db `A2(Ahª£927Ö‰.©Ð¬yPB¤½Øh¤![b*}¨™P/ëœO¤˜@@( AôIšUjCG+ìN¯ GBÅÔŒ€b yã” €°ˆ+”›„Öé(Œ˜‚0z@`I I‹c%AD¥ˆ äת©hä"¥(° ¡$ñ³i GÅB¹t4@¢˜šÙ٢ɥö¡ê¦¥ ñÖF· Á­­uP+akZ ”*‡£z‚fNI#7€ɯÇ—€šBUM‚b XQ¨ÛØŸÍNº¯uºjþ¨Î§Š¾minNúu‰A6÷öµµnÇ0ÁØVŠ6WF .Q­S-fšš“zœXVæœåJÄÁE³Y¤¼ÔG÷AbPHL‰ã¿ÛCsõ›T‹Úëüí÷…•ã>ƒTßwÛÄf… þ P4×ï..YÐÒê®Ú¼>ß0e§ôØy}ä@_?wb1#¯Þ´>šd4ix{Onî*¡ØnV±w;¸U(o¯yv žu ô›²úà±d×OÑž $ªµƒ'öõJ.¡ímÉ î qOÿ$fÐ[«GO™û–$b%BÙBa”áý+D­µðRupÂ,@°1Úd Än•ÑÆf²’ ¾V6NÖ L}ħ|  ”1Ý ÎoðYýad²Š}—š/€§§ê©yC€ ¬€‡kÍÚ˜…ëIuOŦk|)èrj*Œ+q¯šJIØÄ2©Ì@`Êzýh;ø(e‚@ Y w2i[+…¬-5 ¦IùEƒ)Q@´bê¶ï™0BÁŽjªC1—N×i•M7G V‰öÕèX`Sõ“Ž8AEä¦âd’²àE9bŒ,R§8DÝÎÇd1##”©ž‹ÉÚÌÍ]IŒ$ Ai¥'+I3"o-vhÏ@ÖôF‘¹µŒ%iT1å|æŒ嚤ü*ËŸ ‚RªÌ@)«µ2À±L`˜òF#À% ¡ Š£Ôðÿ4¿}Å¡â}DK©8xÛÅøÙOŒN}ÿ:ë‚|þË÷þ"DÀëo€$ð«ß 0ˆ pÑ¿ÌØ)ò•uQñoŸ‰7\µóûvʾ^=ø6ßû–=‰cüÝ»ö¶ ”‡h#ýY._óŽ˜Î|ç¶nág/=qÞ;¦Â{~R&bzƳPcóþo4S¹´u¤"K¿xû™ üÇšR PQXóTû²o}ËÃ/"ýâ/ö¸Ç±|γM´ñÄ{o¨þê¹3È:7¨úÄÖ´óÿ•É+¼ãlGš³>-¼½åŽ FøV@ì?´ìƒàß…Ó›’‰:ýñè¥4VûˆY@ŠÄÙëÎVw¿âÐ…WÏ®¼ë&,0žò1ö1„};´ü÷óäOÂôBšýÇç¯íìáÂ'—&'w›??µìŸ<îô# ƒ€‰î~ ¿ô¯tÅÕ|Ï÷ýÍóŸÚÍÇ*wŠSjÆ»=‡Ü^ ó/ØÆ_ºÁßözuòk»rù¶òÌ"y««Ÿÿ÷Êê¾Àpþ_ä˜ê0󉡪ënChuû»/ ‹7œŽ1šó^ôÙØFewþÕ‰©‹@G Aþ„@ò‰Ñp@c4Êœ%K™h Y £Š‚Ĉ*¢ 0£p±!ƒˆ‘º9tuî"‚ösÓ=$êQô“(LJ¡OæPÏÌ)ׯ2Dý¸@$ @€JwMÇùäœGD É›¾a%bÒzf 46ʃK„Óý>'€\ ÀpG+q—¬SÔÛf“ Z¸ö ’™$H5c§?pZ fhN#J…ºéÍ€W˜ˆ§ ÃT?åDÆ&Ï&£Q…¸»©]0ÑôסЍZÇÆQTÅdziq­ëYÍcär(RF¬oÇ‚JIyt)ŠàÜI}¡lG*-hC2¥ÆlX—¡ÄœS]F(‚ Áað¤eg씟Ü3^_˜ž3ì§SCœæµ ¤“:6Ù2Ë…$7]äôí.“³šd  "Ξ¯}í^2g ’ôÝ»ãÑ&WyÐ2¸p×w—£ˆ€Ðº‡Í˜ëï+×Ñr9ð'íBBIµ–[¾WA…§>AS„òK_ž<ò5Ô×Dm¸é¿Û⻀Ÿ³‹  £pN£{]ZÒà€ è“/˜u'OY¨%?w]º%¿¹L£[Žv=Ôál^Ú?aµn}¾xÄ ¯_èT÷İS­Úpñ¸Aå÷ˆ¡Ó#T¶P;O)Ï+tvZ»Ë߬µ©È¶«Ü²WÙ¤¬™,H³®)Êù\ÂÍ'duGJØ1‰¤™ƒûf7[Q-í*J PŽÞÖ]˜ yÒ,yI¹_n •ÑÜÖö„ÃÝ©yß™[?éYTúš…ËÕùŽÒ´¶T/µ€˜‡Ñ’L¯Ã© U‘÷zKãºØ”.Üt;‰QOáLQûÛNÛ ‚JŒ@ŒYOw64 em#€ÂÈD ` J­ÊþQâºj©à¢YL'¹PËÖ<—52éLjN¬{Ñ iˆ¼Zg)óœ2™Ê,¤a<á õ”EAPq„¢O6*e\Éj‹Ù —Á€’De0 s–E7lÖV› F2>rD®1Ë6Ë=«XÇÔŠ¡Õ¨6÷-ã(OØi‚`ÒP²•{[V@ˆb3lƒ¶¬;q’uÃÒZÒ6( #¼µƒu+ ÑtzÚ ˆ@{ ïç‘}èVe+€ D„ƒ|€ã4¾+å¨ ¬B‘” {:ZEbD〓h0B€À~þ ¶¤Dmvê›üÑ÷ô“Jv_Ù…†èÞ¿üHhàÅ›>r”6PL(¯=0>ζӫ óíjLÆ›ç뎕5}'CFDì×n½«#³§nÙÿ­ãñÈ1ÌÆ3²aÓøÆÝÁGI‹@ÊÂzùok@¨§â‘oÞí/Ü»T…\Ú[]mýÛ\³T·½Ëd߯öã¹—uWÞtCã1Õ@‚„(HB²ú_¼ô£_zH¨˜²LøÉÑþDpñ?¡øðàÓ_žñà^ÿ±uùíÛš®‹ wï&QLÛµ©ùöWGÀ®s  €†u¯`´èÿðîåùž9 ë_*Aøè{& qð¯—Úo]µÊ½w=$ëÞó†û²­§Ä ·^qG#ˆJºG¯þCüŽnóŠ_¼óJ)®~HxßÇ« Ï™«Þ~mËÌÛ?¾mò…Ƴß={ì}·x`³}×¹+DÕ5 ˆÐc_cKloxÓ±VÀòßA0&Ó7´©F¨æ)›RŒ’ô_ÿíz¥M’DyÝÔoÚÛ‚Š ¾ô îÈKï|à¼ÌÞùª»{W½¾þø†‹÷=¦ÿ¸GJœÑÃ7¿¹üCýLqкúôû¸øfÎ%нR4KŠa¼23 ‘Ìâp 3JQR•¬ËËv< â”%&Ü͔U˜ÂAF½LšJ4k:³C/L…’0Zîä¦õ…Ÿ’B2=-­$ãY!!“I&ȼ™²iÕò,ÔŠ•ލ­U¥ÖЮ_ ŽÍ=G%&Ò*%¨”¨<¢¤6FJ “!IJ¡ŽY0%`G“@Š˜Õ–e,˜´©ò)àMMR%Ja%•|”2o]¡ˆ"›n7qÔ‰¢Rˆ$ŒÈ6 Rš(‹T`"¥@’ jÅY`Ò"@L‚9Rî9åm¥4¢p9 ˜…êfŒ#Ï@d¢h!±"Kž„[$Ë–¢¨ ”€¤Ð‚F"rÓ€qØ*·‚ýLTBp6úqdrÑ4"(ЉuÐDŠÈTU‚NƒÉƒ‘€AÒÌÈ0$‘(D«`Âm…AYPF¼¨¹Y$ÚT¨ˆÊMm2ºípêw)±FAj yA]`9:†,7ÈFŸ|š®C«ÃZ”<&1Ú2ÆL·‰¢ °V 5ÿñu‡zWŸez~ýÆý³¯Ø2ßþîC‹ë^¹Ý|û?äøJÚöšMÅí'´õÕ[z;ºrÑ¿…[Þ½ØÂ5·dœ\ I_þò™]?1ٞŠÁž¿·Å+žˆVÆœQîQDXu'U`BIú¡OœÝ°žµ÷´‹&¼bÔw?ÎÏùs F¯Ý3²¼½ë$t‡ÿñ“æøRªß·¹³ûxdAzÂC³ÓÖ©CŸ»}íï//X§_üHwÎÆœ:  „¨SŸrRµ}:BN„㌠_½ðNR½ms÷Äjäà5™^£>ÜMNÙ˜SŠõ5?¨¶¾`ë2#ÿ¸ÊÔQ_sËšÇ\´9»:ê¯ìñßüeç’ÇÁGuÉyÝFK#¹´Nzæ1ˆä ¦FŸnéAæðÎ"Ö×Þ:¹eÌ‚=÷ðA™WJĘڶ1Éæ»ïlýcÇè¸?Ó& „ä¤-švÝVŠÛw§ /@MI,ësZ6À½Í}ÅUÒ§Îô·I‰?ÿÐ?š ÈÚÔí¥ Ë7¥lºsë@@;»imav£ÍÙÖ\o»heWÖfhÖNL­ˆ=í¼áéK+‡N$˜[§Îí¡a½·e@b8xG—N)&«‹áÆQd`„l]/ªB+ÇW÷ÑFȆË7šÍ|¤’Éþ<;êý^-î›Û †îT%aä(›ßÖ˜XÖÑUGŠu:ie Ifzzu-q O†NÛï(Æà-N­eYHH ´ ]<¼$Êuâ¡CKzpr·¥Tu‡ó÷ÛH_Ý×@€l뮩TH68Þ9mgÏ1·~Ø]"ñ ˆ‰Ù¬°k×uTÇŒ‰T8ŽYYg¬ "4lÍ"Ú‘Çm•‹vݿӵ,©ÎŠÓ¬º£_¸Ï¶¨!za½ck(º(:5÷ÜRƈtß}@ .|‚ëI\ýßýr AN>)ô„9K¤Œ"$^p¿{†À:vÒH4@ZAPJ!' Þ]zɤߕ0^ÿ“vË_6Á½ï nùàÎòÄáªaì>á¼.£M­Z»á`s3ÿ`ÆìIè±4Ìlú §ì˜ˆJŠ4CÆqJÃ¥VÝNð_ºÎ'å“}üåJ’´€W¿y?¿üñ&“McV·˜t8è6ÐE§¶÷^u?ûTòNaRê!÷‹U~Á@F¸éͧ@gJoÖ½&„õ.êë_8:öú?†œ’yå¨é$îõ¹Èþîâ^E/hûOòÚèìi—5¿ùࢢx܃ý‘¿©2=áY¦?›{÷ãÚ³BBþéu¼õê­ñkÿ³¼V Š>äeSK¯Ûƒ†ø÷ï<š¿ikúÚ¬÷¦Áðý¿ ßûŸxÑûÎêêW7ö'K ýøhlµü»#uß4>ñ‰CÀˆÿ¾àK4W^òWï„[¿¶L¨EOŠ¿zÚâE$!¬0]>¿2}†  hLJC`QŽÇu#iѤ¬·.“2¦B™ˆŒo›Øè2*ÕíN"¤Þ8s9 10ifIKU “¦X¥p`“FðkS X¯ê&1·¢b]›FRã½ uZŠ!¹¨y”wh>Í«´xÂ(×’P.QE`P" Ð&bQšA|ªcï£Ø™ÂXŠ ¡¬“ ¬•F^ó™ TbmBÍdò"6X²ÒDâ Œ\Žºàr)G!&À†{Öy@35¯(y“Áò ÇÙÔŠšÜªVšB[àleW’8ÃnßLÇ€^5¶CÒt³Ê‰ªƒÆ¥í2—¤ËÐP¢Ä{Ž]“álŒvÎ=|[uíï}Dˆ€õ°~d8·RŸ¼UØ% LÀ 8Þü}ëwd NM_º´ugÇuühiõ×ÉúGÇ=w¶“ßO1øGÇ%ë[²‚ó-:0ID¢Ý˜,ÞxúÆNþp¤ºlç¤c¹8iá725iû—)‰( ó ûö¯µÎ¤5UÚóüÂÆT¶­d!&Ùx±Ø3˲{k' ©¬ ÎʺŒúÔåIÃYº¯JuyÚßP®\ÎÖ)9=7¶P”E‡Ü?¥˜Ôw>Ö=¹× ÍÁÑÁc—wÍŠ Á“^ØÔÑIg󣸂vRY©7m*"`TXŹfS8¶¯œÓ `&ƒ",(QQÞ1ªlÞGPó)„î,ÍäÕå¡a ýyJK%N¯7£õÆÚ(˜¬_n†ccôæ©!Õ8bKX 'TôîMµ0åÓ.¹¶åãèfºÐT!ï¯Ö‡êLò%k!´hš¸XîoYëÈ)VG%NõR"išfjàLFS†|-I«¾Ãš¥0nÇI©Ðè)S¦ÒcFl×hÐOÎÔŒ@éxègf¬w,¢‘=3‰†¸.«)1Q0*kÓVéVižT¬ˆtn:4*RA{í8! #ªNBK2$3ÐÕôÒXiN’pâzmwBUA&¡PT²­ó†l#ÂÀ””Âqþÿ˜bµåÚ”•“ÅÔ´¿xÕñˆhßñäxÍ; !#3ý]&#É¢—ÔPÒ cßúíð„·uïúûÃðާÂç¯^9çªmðÁ¯äìlõo¼f\ôá ø/ß+E²÷\„ŸúúD@á!žAkþö(±LJD|Õ†^pÉû†W^yS|âË~÷¦cêª'¹^’T'tÔ¥Üø²ƒñÏ[0‘`ÂÐJûÓ«—6ô´3ÝðªÁ' …Jë¾¼O65+ÉÙNÌÅßýª{Óß½²Ghp2 w¼õøì›ÎÊ Ò´Öã~ûX˜ýüyNµAá¼RÑ Ð‡Ru!~ÿ£$ _Eñ_ïZÑï»< yÍ*‰wÈ?yãq®˜žóÔ©l½ER¬[ØŽ^ócþ‹×Îør<¹ú—á²wl¬¹3¾êërÿwÎ|ãÍé9/q¿|ËÒÆ^/_þ®_÷¡ó2@m¤(£WÝèG ·}êäŽ`ûÁÏ—ó=Õª¼úâGGë>rj–i¾À#¯¸Û¼ñϦUË5†u9|ïcÇ$zÃøÓ÷/ 0Ö%›®2¯zªÝýŠûjÌs<÷êuji8Îúñg9ÆmÛѼãÇõÅÏ›é‚Oª©¶œ|¨¬·Ì…ɱ啯›<íâ¶{^Ží†ÆÖoq÷R£óÉÝ?ïyj®"­Ý}4^4ooyG5ÿ(«ÿûG>Û2èüóù½;ofši¿—ªƒŸ]Î?þðî½_9ÔyýŽ×}«„לÞd5hÿÅÐóÊcRFµÓ˜ @PÅb"…RÄ.逤#(T.emƒ:RW%FRÕ#£·t¦•I‚"ܶ €ɵMF±½h„ ’蘔D‹Mt="@µ%%¶ Æ`Q³Sè“;©@ˆ¦&# 18ªSj¥FmHÜÖɉÆ„À*qA ð:[?a;rãŒǘ*4º5 ˜ú ™ÔˆV6ŠÕx±ÄIƒÔ™hÉý\ò`˜fhIFœšZ51IPQ%PÀIEJ¾ò"¨hn6·„&ë6ìë(Ë-£Cè_%pXIÙ„¥ñT»ZÏ¡*»Û<ÔÒ†!‘m)Æã6%âDžŒ˜ª©µõ°¼ÒŽ‚å©yñ¥v °´™_\(îX31‹€`ƒZáQ $Ò´t¸Bô*‹m¶¸6qþ$i¯ýï£}v€@±Ë²V êÖfçýðúνü“=4õ’5<—SÊP½òÝÿQ»¬{ÊóÓò÷÷¤ëŽê³ŸÍHVjÊÉ*Ìw§ø…&CÄšµ×°x`r÷ˆ)B»º’psO†Gü] 2˜Ü¡‡»ÂâÑH&7>j£"NEé£w]P*5ë¶Ï9€‚”úmosŒ”Føh,õêF' h D%HŽ»SUÉ(-}×:Bl›Ø¬ W+}h4ÃÉ ‚ܧtŽ@͘TL™z<ŒÇE(ß¾`u„2 &JqvIŽdšê8˜¡* ©<ëš2ŸÑͱ#•\Æ&…Üœû¿«íaèŒRW±D›àdËlÅ€¢tj?:xB}-p‘¤FÓ—¨Ù¹=Üôé}mpÏž§‚·”¡GmH°ºöÞ†E]ÑäÂ+7>±º³¹ç—ÕI—ì<úƒâ%y>’:éä”Ñ8>ñk›ÞÓ³Š%ßF—IOèÔM´øû}Í­·Óå/™†A& H28üúíiúnã3emÿáê®{èØcúFGʽŽ$ê y­nýø|Ý_¸âÑ/ÜP½à¥‹0ûW~åƒß §|bÝ=¯¹/=ÿ¯z÷¾jïÌÃbüΧš¹‡ÍoxEà<²ú=˜¾` œqF5|ñ£yÜ¿L)%&åñ'ï+g>u!d\ÞþžãÅÙ[–>sMó w®Ë|ЖÒyçÆ4ÌÆ¿yû@ÛÞà^‚Œ2Þ0ùæ¿·³ŸžÏžòçåW>á\…½+Ÿßu„ÀL :AõžŸ5€à>ðÀÌe†*“ZgEP#´“o|pD¡%üÑû&ÓŸ; >ó©vÓ§ÖßðÛø‚Ï©»^½›C´5’@YM Óê%'=ªé ¢ñØÁ3¢é9ˆ @iAøÿPàÔ”×Z$ cŒÎ« ¾œK*l|')!×&è8J¤rX‹ùDT?Y,bPÝ–XPPÄBjK! $`L[éuÞëÉ䕤qÏòPòˆ˜‰RÀ!¤¼†ºÄÌG (iTC§4äbÓ±ÑÙ)IªÀp €‰s3N­ÉjE@b¢$¤]ëÈ©‰F‚‚1!" ƒ€K¢@U,ÑŠ¢‰IŒ*1 Tw&ªM–ˆ¸­Äc\%@[ªVA^j!ˆ˜©“‹ ÊÄœÀØB¼Ñ & ›åU !Õr4-4B”XqkDTB«a8Дؠn›:=aqÀ "HnX¤nU«Ä$Š E©S£jôžIy6) €O‰h`kCT§qVéDLÚ˜às‰¤k‡.U:ÕŒà˜je‘A €E¤¤uòà9‰/"fH  ›çªÕªîµµÕ,Þ8 ÐŒLˆ1¶™Dn}J1)]4,â ­Œ1Z`Q32 îxcm²ä‚äÉ‘GŒ•ÒðYˆþtkOË0“CŒ¾ãGõÛžÈ×ýÛîïé‘$/üÌ©®{þ0EÒï¾¼ƒÖMæÞw_»°UVƒ  ##º|tßèoŸÚFoÞêÒ§¯?ï)|öÇÓ¢¾ö­å‹ÿi^ƒLXRôhÿá¯Ç_ùe­Ö>v§¿ìm“ß~oŒQʬˆ7}ôHxÃEJs8ú‰ûª—>Zƒö¾u5Ý÷êÑCþz‰(ËøÆÿÜ?óêõÓMctMg]¹<üÑïš;ßY¬{æ6uã/Öþz6Cã0µ6·Œ’Y‘¾j3IÓÏ:®~úÉÖ—7î,P‚øÑÏ÷º‡dÑcùûG¿+ùÎOn®cÔ?·]½þfó×sSq÷/+¸£À„ØXÁÈèþª>²eƒ~Rß±‹Å…*#Ÿ3ç—÷Þ0ºß§júꃷ–&ù½ÎwœÛÑaŒ8-œÀÆÂ @-¨¬ižöÔù»Q øéѤOLm†¸÷°?º½+ ây½|´ûŸºA˜NÒ±CþÞe¾¯Z.O‰g<îÝϧïÈLkùÞ•p熪50Ï>æŠÉùãyp’ÄÅc“vÇxsŸªã'ÂÁ8çæNšE…mKlމ]u–E5³uÄ‚ÅÌA•MŽL:ƒyÛ*ÌUÅõ¥=E†Ä°`)ÆZ;êñöYBd›$¨™£tb•¶ûh•ÒN•0¶ªhqm­ÍgœS 4ÂÿÅzãÀ c–AÙ©É„4YYÕÚì¿}µ—‚Ó*j“ËÖMEnY\Jzì5Õ%ésÐP¯@!8ºã^Ž$À¶ƒiù¦ÛøºGoÎçµÕÜq[3› ¢b”6ØSNZ½ù––;j|×/ùâ3³øãJDk¨iϯ‡´j8}ìÇGù®Kº}–ÁÃBùÖ_ÅÎS*Ê$&iïºæÄÖá¶”Hnáþm°ÀEKå½þÞâ}óœ@AÞ]ûü5{“]}Û|ÕhS¡†ú•üÓ á}¿åóÿyfŒ›)ji?ýµæÜ÷l]ºòõåWçÙf»üö[Ú¦ÂÁ•§ö¶F—¦àŽ¿åºêož Ù‹Ÿ5ÒÉè]Lm~÷ö|ÛC¬¶TIÞm{é»ú :i›’qÿòÁi®,"™M=„¶2«oý]÷­gÙ¦w½åhqž1m“)q®ûørÿ½§“ jAø?˜Ø&A`… ™9qÆ[§ë‰8Y²-¢ªT£±[WÀè¨GlØDÆG[2elf ÃEV¡ ‹ î`[Ž‚d º-Fƒ'šî´N¢†^b Á€45 ‘U’4ƒÔÌçn&s™/ºIP1é6S8±†:´¹Zµ™Þ;N¤ƒ™Á0i-yTCW5„ tkkaA”ÄJ!ÐãbÀ¢ÌH)=ElLÇÆÌèmÐU™(”Ú4íþ嘀„Á¹ˆ¡Mi\v$‚jDG¹–ÂÔUÙ´ªu³À’³J I(YÓ0 R‚äqUÚÄ,ȉ£7½ ÍtJ9Zº§£¤¶-×Àt2Ag"ʃ1!fÀ©¾uÞ¨i®Æz^¥©àMÖÆÈD½¬Ärµ9VØh3Ujµ9·ª.ָꓵíêZzó:Ug!¨È©µ‡c,MjÙhLVÛÄÊœrª3H)¶V3[óÒá–@-ÌFê`4©9qp¤–-(‹Uã[ï“pfß‘+Õ‚¤­›:@µ‚Áwm!z ýÊ[磮mZ[<±`Ñì':‡(éÖß¶ùÑ34€ h>pçaóèb‚¸vý^uñ×d&³À»ÿ×.\;k ²äšÝwøÁÅ=´ìÎxÀ¡@µÞäxõ–UûÀAeŽÞ³nÚ;ˬÚ<ÖÚ£>`IJNÝ»²îÔ^¸záû:ƒ×¾šõQ‰jÉWŒ"}Å"pÝuHH) ʸۄ•ty!œxí‚>øƒóm•Ø@‚^¦5¿~ýxÕy&ÕZ`rÆd¨™cë¸ì’m5ÂZ`œUTÅ}±>ë}Û¶’áÃ_¨$†šè5ˆÕ¤øÆkâã?ÙÝûæ£ÈWÛ?^«q¯Ûm##Üñ,½ñu›icÆç±Â]Z5BÁÇäÌ—þc¼÷ÙzÓ¿ž¯£Õ¡ñ{n\ü«WèªqµÎEb1•åÿy&7[¯žÈ–"ü䫸w[¦wÙ&èÖüË~ذ"`ý©ïMò¦ÁÊ»~—ktÀsŸ8è·÷óH“JÁÿ!$¬tJ‰xþ]ûÒv©LlüǾòˆ×ô i³4jÆ]…)Ÿ$ƒ¼”ׯà˜çHtG7Šèðg¬þ1âµûpý“ŒÝ¢üõß6OÔùUÿúÇÇÖýÜ¢;¿µ8÷|FpôÀW7gIEÅJ$ AÝU¢Ê¹A•å]&h˜‰ÉYò2ÑF$i9™¨§b’bœ4¹N“)á€ÎP6€]0eF…mI@ó€P‘8ŒÖ$ìÇ  «rÚIT4}¢®‚ÕÝA=m$%&“uETÉhAÓRjX\ÞÓR5µHQÀ¢XMš5V8"!!ìê3pUU‡P ©^™zF \òAаõ*p¦ Œ'…²0cNd1HÂ`¦8Y¤d"•傃vÄSÛŠ Ðìæb„*%‰bŒ¥Sª‚u<†@Ùº›)gYZZ™oîNº €H’#5 ŠÃ¬AåV×0É·ç˜CXhÓ2Îkâà-¤Ä°\£-s(ý‘Ã~T¦ ºÐ02÷ã– AL<)©È<:T».¢‚ËU‘ÍfÚ%½¶7îöpô†­¨¨§¦æ²€É“iÇ” æP(A²RÛÓvim1‚=ñûÛÃá27d[D1yæ-Ù@„"“foÐ3ƒâSsÏ7N¸ënuò·:…ú§_öS¯ÜIlô­_¯^°Áê¦þÁGcÿñ´$8ã””™¤A{¼I:©rÛà}Æ6¤SäÒf©ámº:Q;×ìâöAÌ·Nv¢ÁvÓT°’¸ß@L¢4P'½÷–’Y?‹aïŠm"Àú™7¢*ÿèo«D;GmÞ6Êq€$:[¿©ÞÐwéøÊp­—7ÃÀ½ž¬5â”Æ©µ½×RIÏ4eÍã“Á :ꎱŸÌ:k-ô‹´ü¡å„HaÒ‚ÃѨ±›0Ž«ñq×KT1=žS‰µÑ.Mµ‡‹ÂQêŠu¸H}G„×!XiVÊ(Y!)KL–PlµŒfDyÇuM;Pé1¨¹ö‚€ÕVÉ9Ð©Æ eDbzè5S”˜ÚZå9ä“"™¬©'^KÆh:¢5˜DskÞÛ6™ÄÆE¤ÁB.9¡€gÌ,ލpÖƒÓë5 ’ß&”È–©N •˜¼+ÈæQÅå› &y°µLOèùûnm€‘ÅÙ¹nÝÎ~íLAíµáø=žzÈÝÝõ®Ñ"D¦=tlyÓ9–XäÀ]'vŸVOm£p×Q˜=ªý†ÛΤ¸wX,yWx°NŸ=£;¼g÷Ï¡Î) š–·M¹6iDÝÊ¡¥öäAO$€O¨P”JLʼr ¨ƒAN×8N09Væs] ¶3 ¨g-!¦Ž u©$ýf™:…êHJä2ëfªi:"Ý$m@²q5МNH@™€¤H,dyR†J R0аìH0ëÖË•Œ¢u+Cu"Bog:´zYìªéT’Q-(h”iivÚŸX:F‡N£cÖ ÁŸØ=mÈNÁ%^¬£èÑM0WTqktH°e,ûµýwhsѺµoOÔ–3&›nò8y s D•¸3O?ºãÖ²¬°7Ê!ÝÞ&š6ZRç±:Q*oýÕ @Q¼€D-“ŸýÜO=ºà‡ûÓŸ=RÏý¢ÍùÎm„I$8:ë‚áw>·º÷©ÛÂɧBÓ{ÄÃ騸nÑ&Ä•_|îXdQšI%=xøÅªÖjïënmQØÿ™q¸PåØFbÀ•5BŒÿ¥Í_܈[ýö7‡—¾sÞ“Í’ðøÚoMr‰­?y=UÛC7©ìožMlÀŒ€ÒÄÌ,ò|¿³§Ps÷²‡r¢^£9cÁ[®Zœ>%·_ýBuÊGw¹D¡MpÚ;O¶:r/«Ýé¼ isò[¼Åe””š#/¿==ñÊYÐaõ ¿j÷ágxüÝ/U—½kÖ¿á÷ò¯[çkþØJ¤éºRR/ý+×Ë€XÉw?é·䤩«*•¥3 À[¼õEGÜ»› 5•¦Fò‰ ­ªãõ¯^æåëߢû}YKËJ˜’²:f?xVfaxÏ‹w>s!ŽÀ„¬ÿÛ®Þô¼¥îg.Á’HYÍÆ§Ï\Õô¾}žø4€$(Ç-Ìu(PH#ÔP¯ß%tmg>“"oZÊ “ ¤,,±êÁ6À«÷‘É`̈́㲌ÑÌë¤#šÌZ ¬ ¤$kÇÙa&•w((B0Ò¸LÈLºŠHB% Z,´”K,[@QVUAUºã[çcR‘<ÊD Þ‚¶&V•Œ&h ReX hÉ(â„©2v*m—[ãFJX)%ʇ8¥E$iL&&qR^[ `ÕØvr­¼(’2™ªé(bD±ÀA;)žHT€4Êw¢¢–”2afnZ%Û1[Ô YƒõRBÕ+H¾¬t!•$Pª1”˜±)*bVµW#ùXd²Ò‚!Åœ íƒrºÕ*§hà6–b ´‚€­I˜&À^be H)S‰Ù¢fᤠžFTÖ¸Š4Å:qK}Q { .˜ŠÛ†T¢MfSíêZÕ˜Q’ÄIŒÖ iµ´ž’@Õ u‹®  ¾¨£w„Å4V)Õ›ÆÆ!Q[ø¬=цØx«¡É@"Õ?}ÏÒ¦«wL`Pé­&ÿõÙøç/í©œÝ›þnõä.Ÿý‰Ï¬œŽ¢5¤¬™¼î÷íÃ>Ðïn0¤¸ùÉ¿/­-³Í¨÷ÜÇ.qÉx¶^+ºã…7ŒG_þÕèw/ëd!úÖó£þ~C®%Y©uÔÆ%=•ºT^Ù·wD8³ì2¨RvðÝ{Ó½%œþ´ºæ“Í“žÚƒ‚'ÿù³%ƒt΋†òþ#¦Öö|cI´Í¹ý¾É×}õ«ÖÌe¢c‚Èjâv¤£ëÔǾv» T>çAðÀWݑ阄$÷‰ø–k&uO[Pÿs½Þs"Š$KŒvòû‚…¹pÂ=žþÖªyÖŽ"V~qS›‘º«Jô€MYüÃ3ÙãwýÒè2Ê#NMÔ 3ï@R¢â1ÅRÿ‡h)„Goµ (¥¶n뜕9è»!kÇ×ß­>Íö­¬?·O5Oßo88öƒê÷kÌͪ>~b|Ý0­ýpSÿ‚Y9é¼êŒÝ÷Uä“ÎN{Wέ7qæzmú&F˜>¾7Eѳ.êql#ؤP„Î4ˆ Ö’ªZ &E…Ñv¶îÎ þ”¹™ãÇ¢¸Àü–va¾î¬·–$ø£zÂeÇ/®ås³4»ë‡ã"!Åž¢hª¡4Çb¶>çvÊ Ìª$ÅKÓÙ™L0w땳87˜®ÌòQÀEÔ}=;5,:úSMƱª1+(ŸRhHˆI%$nï=2vÁJÐî<8ü­#¸–TŽ¢æšªqÓ¨µ ¹–a£$/Íà N›±Öª¤Ë{ö,lj؊­Ý6*V&‡ ÄmuµEKu7 B¤ƒ1UFa›I«Ðú®'j÷ 0p-FÚÆXß‚ß{kÅŒÛ:S}÷·|ZÉàöY @ù—¹NØÎ<(Þü}¤´¾î¾¹7Ö’1> L$!æi~ûù£Âˆ—Ü߸ÇVÙ aJR)¦òËß$€ÍŸ÷w~cØŠJ5±âÉÇn*“èMïy|ÒI}ýó«ëž¨˜R{ü#w$NQæþæ”ív%YÌyùŸ÷- ²ZèR-AqXÖ:æ¼xø¥ï”,hw.(«9aR/¸,ïf¨@מÓî·Ë™§gæŸl/ú Nb¥"s濤coÚ_‡DÖËûíêZàÆuŸYH½ØûöC L/>G´×£÷ßXýå›»½<õ^øÌå/¿Òƒ()£ê5J™&ˆRJ ½m+$€ Æ;‡h“íc¸æ§=¨¹óÊQç£]óÓ Q µ˜žúʹ™¡öÔ<)¯÷_yw{4J¬Þ÷[~ýè~¼«÷O`Ð|úÛYe:~íGõ¾WeîÊšg\ZÿÊ¡5P¼áyqf(\÷ºe9CÑ#çªá¿§†”Ês¯¼kæd̳õк¹&sÞ>iv´n#%”!PQ!PwÁ€1 €E)çg(§ñÀºãTˆ½.³É"ƒŽ$ ëz€:ŒC`×é+ˆB‚ŽÀ¤´½Œ•J¨ƒ±ë 0L)•@X (ZÁ¤ }S‹Bh”Š•á @&†QØ7¡»"óF1 ]—O&B¤fL@ñAPò¹óC«zaº²ªÇSmGBË Uµ%›*%ý'JÇb`¬kíp:*Œ@œXjT9 O&X5 ’+ Z´Ö!&áZ[Ýie–°­b'kD©cŒ iºkœó¹‰Ñ+ÊTäÆT9¥•­ªÊPŠXP)°¢¨kD‚¢Y[Ag¾«S‚„TΪUOŒTA"(‰¢2‡Áè^¦˜)#ì0uH3’í‘eÅmPJ$ZËAE£ˆ‘UÑ @ Q$Y‚@ELŒ €àOâc/Ò6ŠÆ"ŽóÊ`úÝõtÁG7Toø…‡D’(ÿØB¡‚š"„ÈÐdy™¦³ÆµŠË­/[‚D®Rù6ÎpŠIÓXG€á?Ýè™ñÒ7Ï;EuøúKƃ/¨öûï²O61ÜïÜ•á›~“½õ¡3yŸaø¶Ÿdpõ%+oýõ•]ÿÁ¶Ò…M€™BŠÞöÓš¸­t«ÔÔá …ºßç|ýÞwùË?Ó+Ž-ÄÒ£È'?¥/ÍN¯'é]ߎz»»é5GÒ«¿‹×¾gñÀó5½ôëùoÞ³ý=[³¾‰FƒÂ¤ÀûÜ+jšqhCü†ë¯ÚÂþÁP’:ô<Ý}Û#ô¤‡Ñب’άiÀ©ƒ¡‘_=‘ØõL¦‘þö ^§¸òî+ÕËÿ­%ôoÈàY//t4ºU* ¥ˆîŸžëçbà"BeŒÄÓ?;!ååö7ÜþêW¶Šâ‘wTPgÖ»GlrgË»ßqh¸Ä˜§Ö`³ýÅ1ÉëNld‡†æŸo別±]T ežóhž¼õÈÔ3þ¾úŸgÔ{Õ@2U0ÙGÏ ñÔŽ¯lyÁ&dž“qi•0PŠ<ÿêaõƒëËë_½çÆôàiSåÌkon~sO–@n9€Es£ˆyúY+µu«§‚üì§íô+æÚÝ?<Özgy%kÆ8úñÜË6Åë<Þü´õz8À›~:´Ïß!êÜjø8©@ÌŠ‰IwF£ãŒ8EßTü'" "¡&ò+Ì {ŠZŸÒqA@ö‚ & QÄóN@CÀ±ð…$h8%$“ t­\+®ŠÌ§„‰1s—SW”tA é˜b$ z2Ý ¢UÌ}*¢FDb •Ûµºñ@XQÆ^Y_WHQÀE£óÆå1ªÎŒƒ†HlŘ(VŠQ ­bÛú”bHm ‘b2Yߨ¨Ìô,åJX“  ¢2b|›õg”"m¼,OÚÐ4™P2 m4!ø©–I±·„J1êÜÒÄYÆ#01²€Ý$ÒT>Á±ïÍLúQ“˜ ±V‘Q˜ÙëuÓhˆ±ÑDk&.l‚Xï;º6él¶˜¥é‡•²‘ iPã(3m{ì@b€Ì&‘e SS§†˜:èŪtô¶{RrVl¦©ö艄'ŸC¿¹yeÇæSâïŽÇ•D€îý™‰Ó ÃÜý7YÊ(Þ€«²”¢{ ¬Ý|3=F[^µÁiÙXÄSwÄÕ²&T ™@Y$«›…'© r4­)µ×|=ízöüšæÇŸh¶|bCR™/Xö\½ðä…xËëOÓ¦ñGŸªÖÿ  &Ë¢E’Hõ•ìaˆ Ã=qÍîðË£¨ÙLm^NFÌlu“Ò‰ ±h!_XóðÇýý- Ó¬!5ÈaµIÉ ƒi2òS5®SaÛ§¼‹mÁœ­æƒ^ÛØI&Èy§˜æ¯4Kˆj!lÅMkL•QXÍç™ÞF®×R¿Ä…ÿ¤z¦xÝdüÅkŽ# %Á¶iü˜¶ÉK!SoM¾ÿÊú¡ïìEÔyæàœ—l˜¼ûvœ²:æ! :ƒØ‚VÊ¡bAk\"~Ì¥‡Í.ȌϛÝ—é.îàÿüç‘rO°m3ž:ü²Õ5"œŽºŠðó»Ì–«¶X(<ÞøªÃÉqsö”¼èéG¾ö«È@BQýöšãæ¥Ýúã÷"îýâ¾ÑÃÏoÛ-üÒYˆªwyÁy·ÖýÖ‘éWOgO=ûÄEëÕ®õ÷·rñk÷}õY»V¹ÆwHDs˜yáî(˜~±¶2\òØèÆõ0Y^·Õ™®Œõww»ê™g-47ݾZ>½Ôèü?¥'휾lªzpÏ®þøhóg§u@¦-Óßü¤#åÍ'DQjî8xxáŠöÞ[jfB¥ýø¶;ç>Oʆ#×,·5B¦v\¼¼0ù_8ý~ŠZñ‰Ã‡gäCÆ*»áÂÑx÷wÿ×=P«£w4§d;jœGÐ&„\±e¦Iœ#8mº±û——·†-¢)ƒ¤]€;—㮇Ð^Njí;lxƒ³÷(ÕgÕO´I‘ÊpÒ“t}t>i}jVtÖï%&‰ª‹ µ&#Q§hM;¥’+bÇ—(¥€‘&˜¬ ëÉ”4¶VaqiÔúvsuznj|îÏ”ãse:“ ºb8z>=Œ¾;œ”¥O!®Þ1–ù³¦GSè¨É ìDL‚¾ÓÄ€ „¬x:*ˆ 'RTRU³ô.<7ãFîüÕjÐ볤47*ºÓ•Näc@H£±*—w ÕŠk2ÔLS0ùaÇ]7× IêŸ}|é%›Æß»¦arÇ÷ã“FßüÕZ=™hÓö!9-í¿6$L¹FhR ”mRlÒ ržî¨&tFFQEI( ¨Öjà0àzbAB¿H(a%€ˆœt&yJ{c’k(HòA2b-¦‰°]A,­'Sf»™Cr ¶vPV6$aœÊG 4Y®-ˆ×ÖL¦ðÄ@1fè´ *%cœ×†$dР©E€8Ô ÊVLÑÑ-q…¢Y”¢î`oóÍ@.uMâ\P´QY¥|B§É0³«­=jD•HRcl;­# ¥ES ¹ØÄQg=S‘ÆiÐFŒO„È`(BŒ‘4ÌH'#œ˜hÀ[׺4B¹ ˆ‰Q ÏÆè†?!@´OØjg+ˆ*¤I*—ÁSN_=rå˜Õ7/¥‹žcò3©ùñ†ß”1"Þ/¿ùØâ쿜s'Ø Õç~·öçG?v¨ûä§Ú‡:ùùgWÿ|JÔàýÇÝå¸!žB„büÝ·lù‡Ãï\7YÿªzÃi¾y×äÆ2åÛ6wfO«6j(Çß¼÷øƒžžIóO;3F·oP8Q|Û7WÜ‹ÎÐ1'mõƒ;aöãž”ÓçeU l Þ¬œsb =… nŒQq€´òÓ=;Ÿl zÚxéøÔÐØ¦I«¿=Q?üÔÜp\[¹ý+Ý•Ó7ž>£Ø¢^úáùǬÏP™ÙËN*ïïWÔþ·õ6ßÍê4ºmO³þ­RRPíYÙãôr};¡.Öwí7goÌÏxÐ!³c@@®! )* 鎒»:›{m»¼(h r¹ªvô·LnÌ †»fÕisÉ¡SMô8¾g²§»>mÊ〒Î8 ÔMÖxcûCÔmãE%äšc­Di;A§xd5nšÆb‡¬4¨X©Q3&=ì-´›{Öƒ[‹Â%èPl¥!'VûÒ@XP§RÐÙÁ¨7'P°Ö’L®g}ݺÌêt–àØ‰j:3`:8ì+`:É zܵ­/lj¬®D„K'sS×éB+ x1Æå>–9uu£sF»š:A5ü’¦3OIÖ¨*‹P4*€µ™™û^¿ŠQP7\¸®Ð(¸vüg—],’ßCÕ6 !›¥Ý¿ÀþøÚQçÙçõ¢Œî½nR,ž*Qàžß¯8 ;\@ò•UìoüA¹çY›W¿}kxòSz¹®–þë†&˜Æ½‚%¢C¿xwì=ÑfûÐAtØM£—ë¿>´]èfQhòÕ›ñÅAk4ô’"¹'_á•DA“%Âu$âøÏŒÎd¡ÑàÃ.2±Œ†&¯Õ-o]’ÎM\áøýï»Ç¾d3"•Ž×]½4{öTÌB³ëï+d:M÷øÛvw6n¢hÚ{ÿù@ÿÊóvcjR pîÜÊØ–Å¡7ýѾír{þÕkzª±ÀC=3ÊÄWzBpøÒ7HLTë ÔHéÑów\µŸ!Ñ£ÞÚ™¶5a"`‚0éˆüè}‹óoÛ”³ Œ©&E’ÒÞ—U#]‡LSQP Ÿ’>úÊ»ü¯Ïw¼×¯üCB¬Ã±ˆqÙYHæ%OKƒõšJ ‹¸ãêjüýç¯ù(ë^?G6èääÀURÂö¤ì´µ«8 #=îŠ^óïG²7ž “HŸû®<â =AåyD!¦Ž{É#m›MˆÖùã¹—O…¯þ,"Šåž~ÒÑíƒÒh]C?ƒÑ;rû «ª­YP!À}+n{Õ|æ3ŽQß*€ ¹õq p0ÓΨÙW@U‘QÄÂÂת©Ü+`¦>r o¤ÅÄJþ„Mh˜i`œÓª7ך€¹¶."ꔘ¹\–^×y·l`‰9!…@•éØ*·&4ƒ)« o[ Õ#&HˆÝŠ ÇÚê†MP)Z«)@tÁú&('ÓÆ#GeQë”ë¶hcJ†}Œ¬‹¾U¡JuØj“T›iM‰²qt5“UQ* &+µ–Èú}@d«bCjÚ(€23k[%áˆ÷y˜XCLyÖu&qÒ5JP´¤9Õmð@€Ùd>7¢‚t vz@zÚ0¸²%0!Î ).Œ§}>Ä ª˜›²À.y)õ8øvmÔà솩†ÛÖ f*r²6 KJ¡na¹$@•e" {S†©ž$Ù®WK3š‹q…ˆºŠmê÷6ƒ4sd´™˜­nåË÷¶ 0ض=ƒ(ÕàÒÕQ×ùÉ[D'6ÄB@ý3ÕâñÛ»«ä„¥ÍT\]£½MÏp¢©ÛL!H¶sCÒE¯R}çð¤ûoN÷þ®Ž€€ 7]»ÿüâµ®÷>UñôÏ£ÑõÊgþX>é²9]´YxÁ“nF_]ñÙñÄ—;ãO^]ƈU÷-Áµ”‘¶oV8`–)ÅÖ‘8Ò¼é³ÎÆC®v¼ñ¦æùï(4ªëÄŠNAÒÚ$¢´Bh²,si NQæý¿µœ4ï3úåßi›4Ýû¦ëÂs¿ÕI'Rwñ/ ^ßêaùm‘ç¾®­‰²Ôwê‡üO¬>úËëìÆì‚^¨Îý¡ß÷–Ý ŠlûüQ lãâH Ïäáìæ?t¯{é+»×¿woû³§$.zÛ·V†?xvÕ4b24”•JGÍ B¢ûvhÖü“KFùG·GcÂU_Þg>p’Y“™³¯påÚÄcúréCÿt?û­9ûck@W­çž)Ó³9K¢/<³L6[ÿ…+ªz(1K5! ¨…O\[ý׳ñ—ŸZž{Ý:÷ù¿ú$mÖ}¥Ù”QÒÄÿ0þöYþ°O!8Ôlhf?:ÊŽžI1dÞë›>°è‰²P(zÆ@ó/—Šà ¯imº´î7 ¬Eæ•UÐ6¿æ>:Øq?s ºö»c¾ð% ŸQ•Q1ˆúëg†ÙŇñ®Y=á:bkqãz]F%*TMj¹¼ëû'_w„"„ÓßÕóü V“kÂó“fÓ†H„ ZšXåK‘#E NWi£Ô$Ä)¡@Ict{¥ #¡²>ô…ZµJZÞÙÌDû€k²Lz à$Ê7QPÕý~Œ€@DéDlP5,‚…"&Bd±ÊúÔK)˜@¡©½¸ªcdìã²Ö%ƒMqÊ‚—ø <°P¡›±©}`'iÑÂlœ°h¯©FuÄ«P¶’öM°I$DS‰©‹”TÂc§± ‚Fï"‡ñ$93òAHƒ¡›r4æ*Å&cÐ" ¥niÝŒƒ `Q‚‰€­ ]±_FNÛ:‘0@oܤ½š 2‰&)QMMMn¾Ù5úSJ”7'y¡”£s´•¯8™ÃP w®ÿb\ér¥×]¿Õ­×±if¡=À 4–¶ýuýfª©’õ³ É$GQHA $Jû2•QW/° èÓØŠç[÷ŒèÞa»Órhª„JRI”0Ð:9îd}Å•‹^€=6÷^Uµ^r‚Ö¨Áå)QŒ¦Ùsc™ÜRý鯮\±šØ6Ǧ›AD††‰oîøé°ûÌÃó†éðÍC2 ºQ¡Æ,4á™D›+áh5P­AÛÃŽ[Ú8§4hàÕ;*wŽA±Äd—ö,•ɶ!…8Ó)Æ=FC`ÖÖ6î1÷ŒƒÜ3ßdÇŽ]K£=ó´}¶ëÒ¦Ù³¸¼¸VÏuoi Ïíp~œ­ïˆvfjûbwuç oªÆ«¬9—2±ËË>:S“kÇ ÂÆY#L¥Ah‡ *t¦¬_®6ˆ‰FßšÒî^I“A:›I×NjK¹@„tf2ÉÆ#´ju·n‡q@0¬ÅcLÚܪ²öq‚èuÎI/¬´»Ü+ùXAk¡šlºq´3ê’ЩfAK¡ðƒþî˜Z±§*¿¬s¯0 C‚q1IZ0jEÔmÉ$‚ JÚYƒñ‰7 9MQÈúD»Êût¤’¬YL¦Ä2KjD"hÖ®„4£Ô’  ŠÕHx»^5…Ä2²Á•Æ„VÇh d“’n7¥²ÆjEc»·caëèۙ쵊l JÏësJ ë©23`HIÛE "±îÛÔ¦5”OG¢BÖ* ° Jç TwÖ¥ŠWIÀˆ -Ę%uŠHÁ±KRÐÝ)Ei•c ‚¡PÔ:* É0¦ 2Š(¨”ÓÒ¤¨õ²'W¾@D,áꋇækaÍ‚rùí÷Û‹^DTC¾¹54ˆY7ßüáÅÕoî-—†²ÿªx×s¸%z×{îÓ—<2$^–>xgòÚcù0«/¾>vºþÃ/¬ûÄT‚¤ž~ÎüøëÚ×n¯~ð³ƒ×Ê7¿üúxÍG_{ñÁñÄØeSkHä0ÿÁ;+d{ò6¯{Ǟщ“V3€&zì–UþÆÁ˜ÆúüWgÉëçñ!™²>EÏú™§É®÷£ŽüЇÑ?#x ixöyãÁå«Qi8÷8ýv*@ÝœW/oyͨ<± Ô„7Ùóµê¾8è¼ü –#ÚÍÏèaƒ0×1*êæ†¿,ŒŸ §¶H¦¼ï_ñÀ¡‡>bô¨¶=ây æž_×Ï|”cJ°ª#‚ÊD³Xc“b[ÞJ"ñqÏ^±Wß62Ì|Áˆçï«q ‹FŸI]Õ˜VÁ C‘Љš l,V—ÿzpýã:†rñvF‹éCc¯ó×reËÚº¾ru÷~ê®Û1Ó (V@ ¢ê´‚²1hˆ~¾Ùc­½!=\YiÓæÔ€34¨WYq9™Úõ»—vÔ¸jtÝLºõh)]î­wÃ{d¡ª°ÿÁ%ÕSjqß\ b·µõ¾ùÅ,ݘÿ³ð©u¡ãÝýz=̬•p Ñì§ì8Ý·³ °ÄVrXcFCHoÛ·}vCÄmuLO6Z¢4¡2Q©“Ž)|ÛŠ@,þí‚î/=f"´I. N\P¾ò§%LžþðÄÄ„éá®úüŸFg¼hM’…€i·…ág~Ó?íõ³FbÊf_׌”åHè°*ðsò­k·ŒÀüñòÅî³Ïèx+[_&»Þ|‡ß|vVȘ¢‹^ƒ PµBnŒç¨$*]g‚Ú©Ó »ß¸Ã“È.ê,¾în³åh£œ¥4äUéÌÊPB¨¼u ¤\­,4î¾5>þŒþÛãÝ5à’ò ŸZýö£KÇ||6^öÁÛ»7¼c•ßüFõǯñÅ–rÐĨҦ©ExÏE2}Ù#Ó&inã>õš×F•Ùƒï¼M½êÉQPõèÛ¯)Oÿâ$ yØxyð±ß»ëþÛ¾v8õÛu@@Q']´fé” Œ@èJyøYêó3ãH:ùä#iRˆæmïUIÍš}0ÒÅïXýý'{…åý¹¿òE'Ó•÷F¬Þ÷K9õ«s„Íà}?Ž›°Ei„œUÐX?R6QmЉÒ&¡`*,Zg:7z |Z@ÐÊlugsn"€Õ:Ú‰AM>(²ÝÚhiˆ“«•AEÖkb‘8­¡ñ ¤32d Ê÷J[heÆrep§[ zio€Ú)º,äã$…ñÞ0.í@¹2•uf”±÷êh›” C¢PBÚZ@2J@%2ÔŒ‚‚I[PYçÉ`4(&I;€TTU¢ƒQJRèL“$2D $ÈZÍÙ˜§¢âX1è(+¤$¤uŠb­ ŠE›–I„ ôo0’ÑÌ™Jê®`Q 2À€R¶Š©Ø FMdJ±`¨”>åÒL…˜ +&è4™)ËZ¬ŠCÊch’v¡´¶™éWhHò 3M%5ˆÂ\šŒ)€ ò*U9°Æ`´dbó­Å{N@ †\ EŒd]rdfb¢<Á|íýHÀ‚©KIͤΡš†uÄœ ¡ˆiUÆrÙúq¢›VCy^lÊ{X5˜hPm§ØD…A±mbãy0š² Ií@´Á¨@†ÿÇ@²ï=wâÃß8GØhÐñIÇ ;V´7 Y÷ñe8-wøÆB÷cÛg/9ä6O ¨ºõνüÃ? ø÷õã»_>ÿä—¶'Þ;Ò'(ã7}xyòô‰HÚóÁåü+OØ>?wX+i°Lø0õ¼_XŒw¼¶»ù=Óg>j~ݬ4©bŒƒ›¿2¿ùí h’6sÿq¨Ÿç~ó:e‚×þðÐI¯-2->ñjê¿Äªì‹WÁÜd2š|Áæ¶PëØ7„Þ¸;ñ˜i:éâ]óŒæt €ýT‡éª ƒDPM£” Ô Ž#ÙEbÇ{j75R‚Tš$úT©Â`LCÈÆºvxÊSLœœŒö_pëùELô(Ó#v& ÇNNØ2þýíåþª]Ãi!=Ú“UÔŽÙ„ÉÓ¼†NO(Élc¼8å‹Óãâ÷oªHyŸÌDZiÝÒ öÎf1bªuëüèQÌC©þãï\ýì tŒ¥j¦Oâûý¯û£*˜yÒáµQ¸m›é‹·S˜lœ>U¢¶òJ”T@s@†mËÊQPOhRÄ>E"˨—«Q#GoGš¬®PÄ`]Q‰`´Q˜y}âaMœÀð»ÏU'}X‰Í„9Šhxì#Y*(2©cco¿tÿÔ‘sÕ·¿3š;ç‰ÊÚºZ uB©Ôñ„#ûéß2 }úÇk™)ÂþŠ÷½O™w½ÀîÿÀ= }'‡½km²‘ >â#•¬k£å:ÄFüÝÞÑþع!X’Æ ?û‡š X·Ò éì%­oûä2 ÜðzœxÑ:ŒvzÏÊ{l×{·þ£yøõÏæ÷–ªxëzï·û‡½Y··»ØÒ• œ…k?¿tÖ[Öi6Ø«eÿÅ›T¨ÓXãQoCþõ£GG}p¦óʓٱ8´þ™ÇõOLÈ5 DPÀ:R–6¤ì(í ) P²ä jO:‘“ÀG¥ÅÇ&)ÅGÎu§D¦T‘èÚtX“ÛÚ™–ò¤Òº¡˜¶Ô#ž¬LÙkE½BÞ‘è ˆ@Î$¡¨* Èu¤ ]¨GH*$É/B}êA3´[¤›¦ŽYY«¤ß,Õ‘QX&€:D„Óˆ3Ðh©bê;V’!z’•Ô&•¢Šò6h9F@UôDÀ ·Ž:¸N¬§)шÚ<;Áº!vå„q®(ótˆ{ª:„¶”û­¼å”+Ÿ°§¼&£c¨ë1¤Î7ä´òV¢‹–a‰äãxr†&C•ª((«Ra§¦b5×jt’Zl4 U¶%œ¢¦Å¸@"/`X[?¡™„Ä5q½×ÊŽRDòŽCM{vöDTgÛVU¢p«aB©,©bk_èÕ«ËÆx±-†½*0"2 AädÂz—*AÅB2ÀºõIY¹N†õ.‚©ÆXýåº> ·N:"\sóà° ¨=€•ŠL5¸ù®²(ÇL%¤ Ë[ndP^œÔ×ü)0Óxu"?v»5c®òsÎ6¾ ˆCª@q™€=âÀÊZmA"ï›o)•3gÃ.h£‹ Ï’\_ p«÷¹&÷mO¬©ö—>ª¿ö:™:;ÁÕÇébû yUº:[Û´´weC‘¤m”“Õ݃&âJ÷¨’€ýÚÉ@+fYªÝá^lؤ³1½«x¤ihuiP§書²Cdn¢*ûŽg&«þbŸ×–Š2!¶M1Üèlº.À²[›Óª¿JëØ†‚ú½ÚY¨ö5 ÕÎD)¯›á0Zv<ɪʃân7%ãÌÊh4La¦Yæ¥Ì¥@qu,Ó¹4(³ž-sÝ-WÆÓ²¢J Ö«õêЉ­Ç>ÉB³?O¬‰ù¨Ö±"³ ¬6Keh–µÉã&Ç’« ×÷<MÖ292ÞTÖ5µöÆŠ)Çbý¤ë¡j@pc,ÙÒ»UPhLÐˆŽØ°åØh'šf¤¬G¢8òË^™P‚¥ŠG9+ë Ó Vña1¡~"*dDE À *œ±ˆ5›u;BÄ„{cP a¼›Žõì$Q2ŽÚ—P”H‰ì­VÂJ”EÆÀ*AøKa tëRp˜9‘:Ÿ‚adà&ƒÿ§ Ácšrâú/¹i‰gÿç!«oþÓXmûÚI¾á†:Øò–ÿóº‘ ŠÐìgÎP¿xÿB ˜¾üüÞ§« _Ú>|ÓucÜð­m]GŸ¿¼Ùò?[v¾åÖðìwN'N ©‡Ÿüz×üøÔ°Ôtš ’ÖL£·ÿÌù@Ö¾õ•ðÛ‹®ùÜ ™åúÊ‹ö "H´æãO.ÿòxã·¶,¿ùoõÓ^ÓÊ‘W>û³ÑÓ^?Y]ô·Ÿñn½çâ[è=OH~éJñßg˜ñw/G/¼im·Ñrý“.qdûŸOÈÿò©UbÞô¢IÕ¡×ß(OIû¶íõ@êQïY¿ã-wÊ»žËWd—ÀkŸ˜Üü¹Ýk¿t4’RHáö7ìnêÊИ3_¿btÊ¥›—ßv〉£Õ( ÌêÄwN,~ì.ÿž‹‹—íÃÚ+ pħ¶ .¹zpÁóÚÝÙœ…< 5rÉφ`À^þȲ7ÿó+«ù'Ïá¯séØK·ßqmCÄ€ÐhMOt29—iÈaâ57–J¢ÖMÀååñ@]ùçr¡/ ˆ¯{¬;øýë>~~ëÛ½#/=L@Àxèe7ÅÙv¶|ˆÕ&k÷ÃÙŸ^ã–Fƒ+¿3ØúªÉ˜"gOKøÇ¿,w൯ؒF ÿüZÝ7·ëZäÎ7ìs€ ¢»çå+þ¡7Ó·. ¯†g\Ôâ+îp¯<<.üîŽ2÷˜Ï°¦yé§ùºn}ð‡C9ïárÃëíßÙ&ý}*0ˆG˜é6 üìzwܳ Xp–5¥ðÿiÖ±IqLŒ,$uY1S@¨ÑkD JòeŒÈ$‘@ƽö|b$ö\Ì 5£c“4ÁUe”¦ª5Ç}/WŠ}ôMŒÈˆ:3”:Ô¨D¬¯ÄIÏ12 ˆ‡1Zö"ÞÅÂû¦ñ@ :ëP»runè‚WiŠE] Ö:·ÍÈ3#ÍÄa¥E|‚«#‹VMP“©´.jb]{Ï ²©|Z…ZPX­b`ÕNCÏy ä«>Ž}XîGiÀè–éTMÕ¸BaI¢BSyF‰Q—ºBÙpY®,Žª( bV¦Û‰F9§Ûãj(,Ð+ë~o¥V3k¬ñB ¼b¬†ÃQD2õBk²=Ú†¡×ÃÁj=äj°Ø¯™™þEU›fLŒ g1p –t¬Á’k´(Ê[=(hüÓ• ¸æÈàçWLê]»‚jÆI541&X\Œ÷ ƒÁÙI^˜o8{YH{L’PÝø×:‚ägnÈ|øù@³ol !¢ ÷‹G=E/~ýÖ:¦©çÝÜzêár÷×DAõïÏ5·½{#èç?yú–¿Þ{‚žý[ñø£†ð÷w¯èsOÕ>U¨ªá/&»°ö „ÿGÌ¡õÚ )`#ÀN˜ÙúvgÖ#Ò¦L™ c‡tä\ÌlyÖôÜ]³€x°2Ý­bš6‡Ï¯ ’-Ã[“­“žÁÅÒæÛŽ7ëTtôûú½ÅÉ€Ö͵to¾¦Q˜Ø(lÀ²P}`hÒ Äh¦}œìÖ3° ¨«:2ÚŒš’•M&Ö)Õ2#) ŒËûÖLsš0ìæ«J·|Ðжåê0j×·eÒÎ2Gõ¸^ èÄ0ä,¦Ô„É&LC™MUÞ©T%d"E%j6í¼59UL$ÖZ‡"MX/«.¨(AûÂ6.šA †1Y®-ù•å FÒä" (ˆN¢ÒٻĀ0Pìˆ-“™B$#±¦0º¦Ñ1j.´‹ª7Ž £·2ÛÔ:FIŒŽÈŠr¬<€ ’ÐÈS•ÆQ'[â(bô @P¡°ˆÆ·‚q k0‰‚ L@ˆ,d’* —G”ÓŒ²˜°„HÖ)›àG •K ˆ&0DT ±0c ÆgKλT"¤ÎZ§9´LG@ç*éÚw£í -è%I¼aVÙX…~ÃD høÿWÞñ·øè÷%¬XÁs_Q4_ºÃ¼ù%m­gõÄ»XOèÉ÷õ ü½°2VjH’´s­·®ö¢Æ}-Î^v*cZ$“o{¾ßœØt »ßuâå† ÌlRî[ßïs ­—,ÆKxàƒ;FÏÿL«É ¥Û89ù“½ÞgvèF©AŸgÞ´¿ÿÌ‹6´Ö‚LXb•#\}¯Y÷þaż­è<¯ðÕ`á£åÊ^Ï_únzÚ%ž»_ÿ¼?¿ÕóÏÈLƒÕ7\)éKÎ ¨P=õ¤ÉÓÐóѯ<(ÐTIÅÓOã“'’£Þ±¯ß’pFW ·\zÜã¡ÿ™?¿+¿ïˆ‘Ô'q¤ÂäË nþã n|öØÍýì~ñôÇÅë®wÅS7–??Nx¸Ì]5¯vÊð\r” žtJçæT½ïú˜Ãñ‘o³ãêÎ[ýµ¡9–{¯wÿè{ùõ½OmoE9{Íø–» ašd·|órùˆ-8¸{i`tþѾúÛžD sv|äéªc•`D¸½# Ç6ºkŸ=µ<|"úw¬sZnN@¹w9  9bÖ†P¯¿3e&º¿ñ+Ltâj{ºZ‚ÀZ‹päõvýB#Vš;–5¯MÌp>r5ÑÑ[Q#ÉÜv—à ‘èØ{–=HWI]‹™Þthb´¦äÖ!»£!Uër¥AØhóYæõi صÚq :K‚:º„¤ì÷ÇM ,(& uçÖõÆ«E똄Æiîk˜[ëBÄ‚¼o·ÛªXˆ‡Ë Ba›[œŠ(¡IvI¯ÙÝw^k…†V‹u3A’ÆfÞô{1ÝšN(€@¼{o@·* ‘F{vyÞV´”3FѨÓü‡ækˆ¨&N<–þÞn;k³1zeP úq¯R8Á J4  +Y3wLÒ(üëö4Žd7êíÇNä2îí¸y™‹ÇßÊÜøªß­xPúäSjh=åôÉ„l¢Yú݃ ÙR²Ç6ÊAظ†Q;íú.â‡û{®êï}0FC_×)·þi"ÊU›n.µ2þØã«¾}ïÜç¶VÃ;â/ؼÿ®Þè¬gN<ðîç>µ5O–dê'¨ŸÞ\-}&?øˆImΨ±RQ}ôvçAIùü鋽 ~BöU/lu3RÏnªì ¬Xyïãï™WS[ü·¿¼Ìº»žø¹•(@tá‰b²QÓ°  ËD¿xý¾ÿx_÷ù4ƒæÀÇþ\=î(ÊÞîFŸúa$ù{OÊëè¯yk2#ßû6BbQGyZgˆjjŽ|Dsð-w{@¤ ŽøÜZùÁWiú§jôÊMpç§ÂµÏYõ ¯¾‰cÚq5Ø‹Ï×½dõÌwÝGUÇ(¨=è7üì·Î=ä'δذ³ؽ|&; A­2gá_°0‰R9´‚R.ŒM’étG’qÚ •qLÜ®œV¦ÑYbDDW8fÒŠÀÕz¨Æ«2m Zlj£%pÈkO±„M+´¤AS‘T6‹bÐø( 0¢A‘”VŽ즺ÅéÀS­U@eÈÛI „X!ä¹ö*Paë4U£ˆ¢A¾µI$ˆ©I‡9bMM§fp¸t5Õ  [ç¥qF¢B¯ '$‚8*lj|PÄ m´MëÊâÒÆ&ºCÊH°Á…cÛ¶ÅDOª¨’"ÉÄJéY €$øêZ ¥uÞIi³j‘AAÒÚ4«P‘º3¡Î ¦ ‚HATŠì<3iPSŠ0‚qLb“Ž‘€€ Øî.´p+ ¦¿¢NY% A0¦“‚š'FP1‚ € ‡ñ¬ "|¥µ$$ûVCd%蜦5Su@ÔÉ$„²^D‰I®š: @DA4Œc†83Û̦a(E–„%ñ ‹ñ<Ä©è­B`PÚÌ9#.I@4€&ˆÿõœrË4K÷m˽ý^Yó²¬uÕ×}uéˆ÷mYøÒu0!X;âç?½PhÖ]r¨,ÈÝüÝþàÃ3{kÐu5þ埇®²kž‘v6Kzá–ááësѦ¹ò{ '¿vzÍÛ”ƒ‹Vü÷m¡B|üÑ#¡8±‘#@¼ã[‹‹»=ÿü¾„ò°¯W–@Q¾å9Q~v‹Ûú„uxóïÇ×ô#(çnº¶ÿÏa\ùò4ýþ ýdã7¨Ô¶3Óé;®)]«Éuþþ+é3·ác_ïjþ<’gÏÄ÷‰áGXƒ:="7¿ü{ò¨SûïÙ×0Æ›¼Í›€OÜ Jˆ>99v¢€ÿæŠíg&æÄµœJy0ùÀMõùÇØÞû§Y$$‰:~nî¾áÌâ5dëOë0×·ïøK¾¸¡XsÄŒ!,áØN×—]a%ãúvs­Ø?zrÅ«ÆjÍ«·”ãÍÞ¨i]ž‡ÊÆÊºöñ£ù½Ñ‹àÒÝæ¾n¢«[܃. Џ]îßÜ/ºÈJŒHebt HÀÎæ´<Œì*µn4š‰PøA9˜1ëÅ1k´ÉX@Ë¢Àzâ¨}åJ…L ¡“º[íC" D«Q¯ë˜PÄ$Wn ¸Ð‘}½FDüÒ¡ž"^*¦;ë¨6–" ˆÉt,½Ò䤬 BtNjQDiÇÞhX¸bÀ¸lFÊ’²XÖUÈU"«‚uP€ !ä'ŸÒD1Azt~|Ãhæu‡å­lùöÇÍb{ùOw4„u@»;㤂ì pˆeò‹¾¿[”’Ü n¹zUŽúϹ™ xËæ`…‚®Ãµv2˜îœCáã ¥sŒ`Ï:Å(u–p€êú_/ÅÀêÖÛ‰‘Žø·¹ ð¦±Uç¹8¼ëv:é³»ÞsçHD¯ :½¯];‡ó?!`€3_Ù-”R+?äå“óo¿Ï‚§¾±µïÖÅü9çµäßþG-O{ÃTï¢k+byò›&4d.1T9®‚ÉÌ1ÙM!âïþh˜)?lgƒQ J”ò¸J?æð ëÞ†L^Æ>pŸ¤G o}ÿâÆc;rÔøæˆïÚ&ìðSŸÄ:‘Ñ/¿þ=÷ÃÓ4e—'G½/®¼ë¶Ê@è7ø‹Ï®x¶•`ç²í–*Ø.}àý_/o…ÈÚ4z& ©Vl0yò#ªë?°Àîëÿ£Î¾x.|⚺ €îRKϽ¤¸î# Q †D8õÁIúêO«.eÛ>2ì­mé‘në·þ{=ÑñU4,$(‰"Q§\V.}èæˆLÀdß}Z¢ixà³;šÅšáîW~÷3cPʦ¢.|vë†ö\Œí=Š ½÷w#ºdÝ[Ss”DçXÄ6xÆkº½ËnÇæuLQCâ™Ú6þדFêæƒ êY/<´ø–¥ãß»¾ÿ_»G¾¹„øÿÅsÞ4rD­ hÖ ‘©Ž4§B†Š0òPE ²È>.L ô8$Ö4ÔÌÇQuÓ,¸¨T¶¹‰6ª`b­Ñ£5èû€ÅHŒtt¥Jm½5U¥J: !KPÈ€‚ZeÉTD´E½&K!"E‰#‚`žç×åX%i›$Æ ŠVkíìÂ…ÑóÆyA"µãˆAÀå6'š€V)@ôÆd0"p £l…52J€”uÝĈl Xc±xPSmÏÁKïC‘b‘oHÐa¦œGu¢\Uƒâ M‘¥Æ£uµ+Ò!†ˆBÄh3+]`€LÚt³ÐâC‹b¤¬ƒÀ­ÀÚ¢x&0™iz0Ñ IÓT×,eÖ´6‰D7Ê3a 2HgÏ(À*Òº9‚¨’°.(C¡.(b Ò%¥5R{c;QÂÀ€BëÖÛ\êÑÎ=A öÁ,za,´?üxœÏGñ¦Nd0"Vë6éC#aÒ9&o¾[¬f7 4ð²$c¥¦Îr…ܰª_p~éæÊ†ÒýãV™‚Î$þõv¯š€*PÐþEB8°seÃÉIººk81,V®kŸ áÄS7̯ ¥1N„쮜£}ûͶ©f|`08|ÍHSçà>çï ƒc±V6¶•%*œÛ¹oòؼÉQF÷í_·YÔÜaõ½y‰EѨ ÞŠ!ÞÔVÓÐ-U˜¯‰lüšÕuDRë ^7#˪˜@0;'º½Fƒ’Ðw ƒÕºµ®­×¯ƒ¸2»T8ˆcFÉ¢ò#w(ˆ˜,+ØMÏŽFŽ«k|‘FȦ`NŠ$ ©ÖZÄÕŒ‰™ìŽÆ¢QeÁPê%*§QtªÚ=ÀY• Gèõh~1”FYFFFLKÌ‘PТo‚/[¶ÓÍ›šÑ"Çhâ˜=ÇZu3åA(b,—E€ŒŠHì T¥¤Þ\”a¦š5Q‘¢‘²¡.m!)j˜ƒâRi0Ì 'RêœHÁ¨¨µç%c‹T=„a6aˆ±$æÊ'l’ǵ¢Q®Q`t- )‰ÈœhåJQ•R#Œãá’²ŒÐ#  ´A;FÐÈ Jtž×CA‡L†±›¸¶ ‚Ö4@M:O…Ö ¢a:ºœ®¨ µ€Ž4ü‹DriÕË õS.ITÿ¢;í#¾”ïù=éenŸ÷ˆå;þkiêÓGRËfÙñƦü×w\÷ß]ó…ÿñ§xJ4ú}eá®ÿDŒ^ö¢–nÕ,FLýéË—Ÿ—B¼÷¥êð¯o£—>¿þÛköG@Fä½/(Î=£ï» ïºPƒÓ;ßwãE?æÃÉÝo¾¯ .QÃå¨ßüÔö¬v³/H¸ïâœüðiÛgŽÂwTñÇ/lþàÚ…÷ßæ ¬4mð£Ï®Ô.äoyŒmI7ÿTñÒ¿T¾;_8ƒcÓzüY=Ðt›wvm…‡ÿó‹þo›p—ÜÎÂÈÏÝãmDóÚÇ«[^¿ÿÈmV_Ub„8bd²Tbª9XEÝJ)PŽr‘MøïŒ6zó¦/¯Ž¿ò»òŒ š¯kå„LtÞ¶…§ù–i€«L‰ _±OHã5WÖ2(é'÷ªGaåë“ÉYkÂ×WýCM¾^bY SÎì©v²½sP ñà5½M$^%Õ?nª#JrÁÖ…üvª}¿'!鞥'·uÆ;nXrgŽ«M6¶Ï9¸vß-¥<wß>JOÜ»¿Ö]1C]-üe¼ï@$¢5p•¹#Ïê­»ó^yX+áÑß÷Q»lv5qõšYír‰ÚȸxÄÄÊž½5Æ=*ŒNkÃT´[OíaZ‡lkXn) «|¦ÃxWûEéœVflwu2jb¾ÕÜ‘þG/Q!²d:¢Yct ’Ùy×lžÃκ€Ä!ï¯.ÍGH³V{iÜÛ×NĽ#3‘Sß µÒt¡Þ¾^€t€!ZZ0טŒÓr8U±îÏañ`Ū€6„Ê´µ0‚b!Àl¥ÆL*Ú¬4¢Í¸i€MÁ`yÆ€TYÒÏÌ8hŠUK“ÖødÌã¦ÛVmÐVÿ(0·Ä@CTÇÇ ¼É8 G*Noþjg¹·ž"Éà!~xÃm¡8fƒ5¶Oš†w+ˆÄÀ„­§Éÿ¼nèÎï˜Í)«¦Ÿ$`j³nJº?è7·"bÔQpú)Gš{orŒB °c7Ò³ªä´‡®~äú²ýô7ŽèƒJ!š§c/=ZYm¡€¦@ÑÈ“Fñz¼ò× ÑW×ý©€Ñ ó‘óñÿ;^û™£-%â †˜šHL ïšG!0>ÿä[½G9—ˆøývÄ“×é”àî»I…NzýƬåâU_ïyéaÔÑá1gîxï>~÷SíowV[/ÙT_þ“±gÐ첊խ[t,Ê®tCÒ¾ýž<üÇGÖl=~ w|D Äï6AH½üØLQÖ~É ~óKNFïû¨÷M«¼1>‰K"gɤñN>A€€Äü½(!É?ò6kQVš÷ÀC/-Þ®¼±@"*àx¡"DÊ8î’õʨšT¹øŽûø5¯ÇS¿çF}Å‹–õø"`"ÁT¯»vÙz  4ü  ìUˆMYd‚Jì#‡:0è‘f¡È\Í;Á‘M-*ÓØÆDV×Ã8”ˆ A‹ ˆ˜zÆTGjw¨¨’Qí3ÁZ³I±0¡Ĭi$ºˆ"†˜­‚±®V©V̈1ÑÆ˜Pô‚öÊ„`œ`ÝNǨ ’0Rª[Z!« Ѭi­FAÅ‘™]/ ©Ä‡¾´LÈ: a(9 Û IkBØ¦ë ŠèÜÒPû2Ä¢ðíD+I&¬PR£8Ñ!«f™–D£î²%PkE¦ÁH  ×Y]8JÚ^!"Pt˜“ k¥jD…Õ,"H = 0`T¬£BMTW%0 h0šTÆ1€Á„1¡‚ጠÂùd°ˆ–&VÆ šºÔ” Se|==iÒh,;ûAbäý æ­élÊx‰‘€£5шu(HpNÙ:. ]` ˇF"PÍ&9e•éD‡™‹DíÇ@GáP™ìèíùhT•˜¯G PÇ ›QÀâ xf4i”qÅ«ˆU‚ A@3k{àÃ÷Œ.x5¥ìÜ×®ë7Æ™„¤A,–l[ïnø7㙯Meø¢³–÷]â'ùÍ‹°ýß'BîÝ/¯ª·¼¸Xw´²Ð†¬w¿Û5~õy‚TøÆåsž¨Õä37#J 7núiç?øÏß ÖŠ†»võ\ ÔxP¹BÑÁm"C‘›œ¶êÑüêN»„á_ìp<ž¬V+Ý4’q!±¢"”¾ {l˜c•jP‚6Iìªk¼mö—†ø D• ™ÅV[±xÔ’z±NE+˜°¹ç.X¨Š Í¾_ÝZ##DÀˆˆxÏ>ˆÏ-Amß\^ûÓˆìiû9ŒŒýÁ† çMw;ukÒ˜­[·ÿŠÛøa§wÒÆ¯¾ËŸå:™–™'oÍÄ%Ú,I;¢sã`Íc䘗w~q_¤Q "“µäÀ<<ô©kÝ=; HBdíÊ¿^yRÞ‰c8xåBçñ€§líºxGçÒrrßõ£Ý¾¥¦9ˆ ‰b$­ê¶~óû޳S`&´ŸÕÆ(jêYÈ»ÝðÛI¬N}ãÄhô—ï|@Í>M'lã;¿|Ÿ|p£‰D¡@®Žx‹ËR‚g=®’|5»4E@¤¤ H.Tg!öaᲆUBAA&AÀ”¸RdݹG6ãòGîj’ Å«?üј@:Ÿ›ðÿüæþå‘@ò¼Ç*«lïòká…ë6‰ƒÍiPj*z ‚(¬Áø‹ï—¯x¦¤ “+>úu¿|ÿàüˆƒî¿žóÖbË»úóǶƒóBP4ZAú²ãà´®9ù¿ÿã»ã÷¯”C Ÿš¢sÞRmŸr@‚çŸ7!˜°8sr’ìþô÷_甉Ó4üùWt[¿Ô™øs-"HñOózË‹¬¿íw«º=1hœgÿ£ZýÉžðû=í/éñá!Ö>$Ú4ÿ¼kYkß\šß¬VOÏ«Æ4KßÀ NM#ùô‚©òíab›PÃÿC‚Y‹*Ì­Ž„šƒ¨(L€pô€¾ß-—ºt8‘ @TBy“7™!aêÈŠ&­\yÇ5HQB´–%êDAÑ´†ªDbêÆ:™62*!DbÕ*p0`ãä_ðÐâ N  H5­°(KL « #äQË®hš–U>’ @Æ eÔ˜`l<Kô©§ÆìÚW (k¬W>”^´Í|Eš&›& ClMvulPïûUchJ&Æ•ÔLA¹f$bšöDH¤¬Õ„€µ ¨¡HÓ(”‘ËY7Qâ` ÿB¢XH("%™rκ¨6K%Ø:jgèCÔÍË50׿ºá®ž0+\»®U¤n¾«¢Ù<%ÄV'UUe ’Çúï»d 0ˆÔ¾a°[×ûûÿÙ€ %qxǽaCYËdwSnœj"deÁÎ÷C.±}õ¿·WØ Ü¥Ï|h‘d®+8áñkCôªð@:ÜõûÝz:õ!@¼æ.0 ‡:A$»îÆ“ž9±ø‘û €  àS>lû·l®»÷Á¶ÊIRÝŒþ¿ÿâÓÓ?—”ïÿzÙ«&¢ñ͇®hzGi0_üüH !ñ5ü _Ã[[¢KRùt˨˜1ªd}N{B~ŸöŽA‰ÛÕÙÑ6‹=PÔj–œ—ÃëÃÊ¥(îк˜²Íþû’¹Ùlbíݾq¦8ÜÎ.-uÖM:Y2cÛ…º7'¢a¢Ø0IÇØ“ušÚ«áʈP÷¶Ãa½ÕW{ª|ólL&cw 7úœO& 8äÓß½!gã‡ãHQOöVKn)íMD €ˆ§•4nªRç¥ÖièNp:nÔl»AK¤t¢”§vã¡;׋ÑCZŽröUí›…¤ TEN%‚ oP°g¡¡¢¢Á 8¢¦g€6•!9ÅÄ€VY`Åì]' Æh£4$±Qƒ¥˜È@Ð †"°4ö‘™‰µ¦0MŒí‚ÔmiëŠlŠ"HuèW cÔu+1Q¤œRˆ1P[QDJ@%–¨Ð€àGc$Ÿ+Ä·,C co=  ¢¨l\QAQkËÁ'cÕžÊT»É”¡ªv I˜€²€@í™sT,€!aŠºˆˆ"”IqP9ð*k<"H]5-5¥b ÆK'ò²/Û’²7œ€@ë¬þ?Á©ÏȰtm©û`žõªöÂëïi€€>ô]ë÷~ô¦U¾íE Udó„Ë'9‰Õç¿[æF–þëÖæŸ¦ÛÞ±«QB xöÿýÕäaï9r¼‘B8ýÛå}o߉|qüÍ»FB@½à«“ÔQd|KƒûþM³µ(œÄí_\qúm Ì÷¼’ÔG_Yýü+ó÷¼BÙ?1ÚyæüøKßó¡û?y×0¢HÃd0~÷k‹u à¥ùÍW÷ÕB“Ÿ8=íf$Ìä£C‘våû2ѫ֛¿™^ýüÞä—NPH t.9Ãu¯X™z÷+RG!ƒ_\@9øK’ç¼²Í^´4¹jª{>x¯€³,€€š† D¾ôó4èEѲòó«êGE‚ úÌW¬Í(¸Ä¸»/ÝïP `a».½£o,dù+^=^xË¢•Ò>ï)ñŽo®Œß’äóàö;w¼rô°7f Dð¦ËzéEÇÅ+~·gû{4däÒèÒeg %tô‡Vù!ï\b3Õ©FJÎyªjýáï£s½º}îÿôŸó¯|T¼ÿËû&_}T©^šáëO«Ú.®¹h×A‹tÓJyÎv8¿cöýt8êxì~i¤Šjü¬‡”;þ8Oº‡ÄôÈÿ\©¾¥šµ¯Ô·_]¶ž¶É©Ä3ƈèÿvsÏS¯¸cå¶ÛIO>œÏŠ®Ìµ¡½Wøâß¶¥Ç=ëÁc'X?kûÞ»ö…å?tÜU<øÛiÇþs%¹$"®¾ï·þa)@ƒ6j ÿRe€ŠZ F«DRÉ\2"@`„‚.Z ƃD”AA¼ÈÈ›õ ¶»è%› Î)6 @ÎÕCf¨•ER)$:E®%öç;ƒ:…QDªVN(C@ÉÆ­¾Å¡Z”-5 ĵ+ì´ElJlÔzLq8bì“õ°ENÂpP: ( wYH-­fˆXŒðµ /„(¬§[u¯š<øÀª;‘(¥nIOšTjQ±Ÿ/– * bãêyo¬FÖ ‚Vƒùžg@!FFaXZF‰@M”ûn¨³ ¤GNf ‡Z»~[€Š*ÔÕ{FQkô¦äO;æ#c§{lQ‡ˆ ÉÛÜ/ﯯr7ŽWvJæn½®^w|°vüÀ;b`¥ª";­\½ê–:2EPdö°©û?³/8Û¦Š÷ÿènÞYË×öòú”ÃõÊì>>Ó¨£·  tþZ›Çœžhîý~©?|:þï/–Ñ>Î%ühù¸Lå3–ŽÞê®ýà<¿ç±jíõÍÜ…‡)RQA ¨î1*sþÙãÝïE°óŠÕ ¥á®{u÷¡ë“sO¨,Qçñ\øÎVvq(píßP{QcA„hHšO\…>$N”„:̭ͪŽê‰ ºÑ%Û¶ËF9kÀ<5aM¹s$[VZIˆ h—dÏh¸è¢¤Ø«ŒUeztp÷¡ˆU«“­iCˆ‹eRf¢Ï³mo-£UBÓ˜’Öá œÇ¦ê¦µ‰àY4ÚNâšÈh@'‚`µQ’¢â¦¬}&bP‰‚ÑIa“ÄTGjVMÑRaɤ4æìÑ5F» ÌZ|B‘9RRÁ†ÒÔa¦™²±׌ •4Št§ $I #à­ŽNY!ÅÈ <¢B€’&y:fVŠ"CšN-’¡#¥=¡ÉÌÀyE€b&û(Á¦ hD$!Éóˆ¶hêFc½”.FÓƈ®îjQÝ…¦á„8eL+0צ!HV£æhAÉHBˆÑ)©í˜¹¬B1¤I΂C/&…<¥‰‚É;U«@ ‚ç1Ý´ìR#º-QxÆw“O´ U(K&£À:7b€¢ˆ­]'VXר£0p—lÑq)™–Hâ ‘¤–<ù¨"ŠF¶Íâûo¼ü•EÂ8}ñ*¬›ŒÎËÔ[¶çÐоŽÖ½ÆÄoýq|Ê+æö~fO#(DÉu‰{}ïóò½«`p(n~ͱáË©ÿþÖNoG#¢ÄÔUߨøß?ã'>/;æ=KþlW{Áµ/ÚØ©}q\[T åå·ÁÎ>8V1p"4JTÌ_ùÈê×”%"÷¼þùîL ÁÃêOožñ&O¿è-Ý1Øð”ÉÉ£-Ÿ×ò·ýnY´ÇÒ>o«¾íÆáu«…™ ²¦žzÉxåw»šÈ€Œ˜kuü3÷®=êëï\׋ãïµ&»­8ï¾¹-QË7eë±…Ñu©ÏÏìì3vŽGl4€>☠2» µQÙîë«Î9³žt¼ã¾Òft} (­³‹âÞ»¢4ÀLC&7®µuΞ¨\ïÖ……ém ÆäK Ếˆpì—¸ê„6Ìê¢ò>5k³Ññ;dzw›•é“eâþg/@Sò5£»öM4Ž˜œJDp¦c·”±ÙÕ‡'//¯0eªÄïŸÜ±xÿjß5ph‰g-ó^w7ݼ»5‰Õ:]o¤^ô§ h§’Ieq¾¼ÓMÆý°Ts³s¹3Û‡ÕÕý’èÙTwÖr–iî}"Nºln8G!"iK  BâV›ÅAVŒkÂ(„Ê"USºéÕ5¦(Šx‘A´1ˆ„k4ÙÌ„å ˆJ4TI²4 Èݹ·>‚¦D&”}(N;6•AX\z ž>z¸Ù$S'mÛù“…E«Øø¤Â!ð¸Ú‡´{ ¨üÌÃÜ 7ûÞÍ ¢B„ƒ tI÷¡LSŠÁ©Gnëz]§ ãheõúÚµr(3í-¥ž½Ín#¢ö¨5¨-OÜj3ÒàêCßÛ!x²Üû¾}#&Ô‚³ÏÜdÒÇÛ?¨#ã–Wo[}ÿu½ÀHJA(Yÿüºñÿýo¯d…ÐzãõkùÄ'QQŒ *ñˆ¤ ŠÈúÏoË–^ZÏ|ñÈò“¿=õ›-•e Þùãù·ßœÀÃÞ5í?ûžÆG¹õ*ûÔ£âo?¶p̧æfr ùŸÚæ4¾øw Q4‹¼í»ºÕÊʳ1ƒ€ÍአZŸÞ`>ÿ㣀©“+¾²tÎeEsñoü‹¯@Õ Í§\ Ë#ÞÙvV%mj0mÌůJ7N!(°:f&E)ƈ8ÎYšXK¦$6VAaTìög8ÄÜj¥ D•Ö€YíaØ…ˆQ+lB• 2"0W «ØsÌiÇ8Ãíâ°ˆJ….»1&˜ø,ŽÍêJ A£d˜3›!Rƒ*æ¾eQ@€¼PD5k P@P”\I¥A1H‘6‚e<^ñˆ…u”&Ñ1ñ}(€€S­+ jPˆ­Á²H`S°qJ™² ‚Tbjí:hÓ8b$f6%M]f°/0³­T”IÐ;1 ;¡TñPlÉàBµ\k¶ªN zO] c”èBê¬o\dDjÇ‘Ä[pºQQwŠD]ƒç¤˜ÊPqßHT Y@HP Š ÂD-rÍ,®ÑÆ´ °Ö„1Òí!/QáLŽÔ4¼CÝ+=wÖ)YÍ,±U©nlÀ¡`ÔÊ&>p% èœ¯*­ 7›Dd,Êó㪠宫5…D,ÇAT25m‡Ø8;5 F è(ZĹ‹>r=¦{>¸Ó?ïBE>JŸë+®Œ»w2˜þû©ýc6'ú½{ù[7ÕÿX!kj~øÃãX”/Šê+7Ðögµù7 å9H|b†é·otí2oþLJå¨Nðµÿè]³Ì¡¡<šê®? KèÚ O?©»e6©þpÕòc9Ù¨¾üdgž¥æ3ã¨1 œ 1HÀÂßFÓ÷ïçgŸõ&ÿ¢‹ógÓ»o¨®Ûï‹ô”çŽÚnçžwØøî{CrÚÄÌ1™º÷º}“O(GAÍÑq7ö × „›öŽ__ßwÃõ:ö¸¤ýˆì#GÚ#Ÿ–kC‰ìÞw(Ö„Ž>z}Q5Ú!@ÌSpJ Ô;îìqïïëZ±ª÷9wDQAdDÀyÌ:õê 3†êöÆõêÈííÓ‰ö›2º ÔÒêXiò“ŠáÁÅHSEwK†ÝmËÅúWú)b‡;*Ñ•A„ÛÍÉ„ž®wÖ÷8ˆ XªCÝû8½°›­‰ƒ*µƒÑÞ¾°ˆ›%€*Œë *Kl‹ôì1±9±9uÒIŽWúµèÕC«wW `dÕ;Â8¥&‘Y$Öy9 }%8¡Ê¢hº³˜nüØ Ä¯AKâX…Õ:’,âîŠP¬Î¥%qD ‰$i˜h)aeŠ"ŠÕjb¼@ÕNYa´2nSÙ¨ÜX¬Ô‚ÿ¢ò³O ¨|ʽ›w‡‡[, óÒ-^ÝBªó¸¨ $Ç9üÛŽåï3À¢u¶’4­Aš«o Û³~ïûnSÏ+´m½»îa­¢ ð®½j÷[áw?+p,âÂÕß\‰Ùœòüévêï]Ö<K®ú½<÷yS×ý½ÄÄÖ[gWÌDEmc%IÝuÿÐàdêß·C†îŸ—îÝzÚúð‡¯¼CHÎ;Y Åxxù¥½ã-ÿ±=m‹ÿógúSgÍQøœ×f½wß )ÃííH.>Å_yh!"Ô?õ¬#Ó™—û2‡²ˆ‘ât zù ¿ ˆ$ŸÝäbJŠSÍeî ­Ý¿ïK/^dˆX_ø¶Y—¥Òˆ¤ÂØßp;R„äkä°3•6YÅ‹^Uù«o¯ÿáMsïž_ùÙ·ëµïÜoAzôñýd3ô>ûç ·\Ö JH)¨.ÏÔ’ÇǼ(ÁŸ_÷zÁˆŠ±ùÜŠ…!×IǾK ÿù•ê¡ q(úqn€.¿{UĨ6½cÂ]ø­ïìúäxÌ“‹lÿðêø`-‹ïßXÞY‚ˆßøSˆ<™l@X÷¢œóoü ”ˆíG$+›'òظæo¿Ý¯SÿÎzóS×Ïe•½¡ ©ièºþE)PǾ| n¼"^] ‚€NàÉ›<´ æÂùY•PÃÏz¸ÿåÝ«ÉVÏ }Ëy·=÷t]ÔE4FòA¼ TsžB]Ö EV =«v¥‰QÄ´*(jKJ9)Tê#KÚXE)¤Ð±mãVbL ÔÀϪM¾£= EÔÂn8§ÈÇ cŒˆ3E‘Q&ÓÄSº&tÖ6¥5/Ã]û/çIL#•}JgòD¥1„z14!OAãT ©–R©­:[¦m2î(9‘Q½„:›l÷&yp•®Vk§#O‹¨À€(ÒmI‚b…ÒKž†m?î×u›DqãÐŽ½êKÚ¸þβ €Ü8Å!É:mÔ¡\­˜R°»çt¬|°™%—–Æåe¢ iÄX5¥·Åak®Ï|±å¨T%7ÛŠ(.¯VÂÊŒ¼pjªçâ„$[Û©öÜç#+F‰Ò[EÈ‹„×´Â÷ÿQG«Ì(pB' ë*Œ Öœ¶ ‰É?³þ o:³EË\ï ¿ënÁ‚ǃ}{K„­¾c[HhÀžó¸B®ph7Ï P‰ ø[1`Q§=¯µóUuÛí¨8 ‰(··mŒ_ÿ;PPšSOBñEûùUZ£2Y÷ôdw]d<¦< äU€þ·nއNhùq7ZÔà2 HË{VÞ ¤¡l.z{²£†Èi–q÷¦º‰2eËäCÍ‚ îн“ÓZ'¢hæñF[䤷¦×ªR¯î G§í$pÅæÕÁˆM®ýJ¼«ffÄ2Ô“3XjÂʉ«"¢[ê=ööâFÂj k&ƒïõ!5¾aqU¢]]¯Ö¡Zš”¥&bbÚ`9a§&™îF &.Õ£N ÒV1oSJÒhs{+µá>'š"êÊ ³p½¯"¸¤E.Ö +Rª¬Y€U¡nbË…È Ç›%ZP´êWcã¢)23(––‘ ˜e0ÌkÔ¡J9sœK1‰RêÈç±ã~L‚6Ic©F  bÒ)„è#1ûºBŠÂ¬€˜X  (1Uå®R„ÁCõ؃"T@I¥Y¢Œ=ZH3ˆU‚2£)´ c5r•l"z ¡0’AL4`ô  ˆ5[MH,@ ŠERb(IÑ`­zmåQ@5`ŒI¬­*8°çTb–çYb[ʲ›Vʶ)* IÒ0ÖœÁÿ#·¿zOxÝËŠn¤cX/{^ŽTR³é{^¤’K.Ô #Å:JdBù ¦oxá4b2ûÎWmJ/â߯ðyo›m2ÉF„^pÛeƒñå_üœ‰»^:o>ôFùáç{Jûá›þ1n‚ðŸû‚~ô‡×‚÷™/ŠN?õÕ=«ï|¬ß¦ ‘ø÷§éΧ^ÿ÷·{‡½g“ÿòoF`°‰_øÑ nxßK Dg¾sM«› ¿ö^@Øü‰Ò?ݧ…=ðΪ—~;I:qË×B=gk×÷å ˆ–ÍoÙ°ú麪@$X);ÿŸw‘xzî«Óå÷ß1†G¼{Š Ý€bAnøÇß\Øþö–ÿÙGƂҷ¼Cr‰^„âï^âÄÅôõ¯ ³îÖozI]£¾ûSûüÇ>—#24dÞp¡>ñc~ÍQ¦*H‹8®¥;ðÚ¬sщ¡Ib@D¬Ñ sàÖ¶¿v§»òv»õU­å^S"00#‚Øç×Ýu™éýÝßôV2{†ìy«`¢ÜÍ œý$µ¹åÅ?ø•¼àéñÔæ¿w??úI•ÉTù½+Qtã'[Ã?¬ˆxÃGmuÍX?ãˆ0ùÇ£NœÝæ /[å“ĸû³4Î4«gªnà´3éðï yŠ3 ¨BõÅ0Ÿ|Ípåg­ô¤SeýÓóÿ8¥þõ.p45öSæàûןÓ¦Áž¼Ryç`̉=ÍhrМ‘¯œÓ²\§¢ @ L y˜µU*élš‚ÄÚ­IEè«€m­)¡&†f$˜`£dgñÔÑÄLƒ@l=C†S=E“¨bwªm}”¼j%ª‰ mp8²@ãö €a¤²(f%DF`ˆ‘EÆU„‚Ÿ˜U‡çVÙÎØŒÇ|D€îD‘"•½ €È®™lš0Sä6ø)™Ï:…öC]šµE· €‚‚”"Wˆš¯ ·¼Ô0ÒJF@$@ Põ®ƒãÞܺÑÂ’“ˆBÒ$r%ªL”)i¨û«‚Xš-JÒÅE †œ>èõ<¢ Þ7înž+3¬šÆ€¸üh/ú–4Ý©](ŠHÌ@XÇ&€=á„úšûÝÊÈ.¿|{uã?›@ÍÉçvûÍ•šAÃÁ•>ý´xýmcFu䣧­ "ÜþûÕÙç—§†«¿Ü“?ótSj]·Ç‰È­wQˆ‚¸gŸ`”ôœsÔ=Ú­¤™ß¾EÅ$«Qé]_EÐÉÓ^‘ÜzcCO|Tëºo ¶]r¤H»Aªu/l å½·{_BýÂclö´'¿þÝ ?›h/Ñf_:'~ý›åcNÐ…dé³.À+ÿkà‘Ì{_ÌZÅ oì¹u( £BA©kÕ”ÍEtVÐZjëuS2ª¦&Ùc0¬' $ÄΑ!Á¼mP 0Fjýê`T½2è¤Ã²ü0ôö¦éÄžc|³8ífÒ<ŽƒI½B3òY–ƒ òC´³„jêšÆ‰!59£xb}l<’©*`¥˜l5SMÏÜ?Œ˜ëv`«Q‹@«5+€â#\¡j0 zÿ]µW¦šn£uĺ¤UAÛr¬’¢`£D Ñ0 Fª{++12Pì[·äD*k›º&èäYŒ¨E3QԙɄ¥;ÂŽÃ,è´ hILã=T )!@00HùD© Œ Þ–$ư QTØÀ½AP¤›e EÙ¢]@Š@ÑÅØ„0#(N”IÁh@âéQÍ@‰VÓY-@¢²VkTðÌ•Š 7% )ZÜÔKx €„E„mq‹8i4×Vé8Õ‰" - b ]¤´KC '²Dݯ‰¸2‰dªÜÃH ‘H¢)ŽjÏŠ‡JEœò“â*Yr¹Tˆí”-Õi ZƒÆ€‚ŠÌaù£0«€ °5HG½.[; Ùk/eLŒ:Ò¦ìU–ò ô¸§¬Jª/Þ(Ó½úÑï{h³Ío†êÛ‹ÐøÅ¯Þç=ÅìùdÅ£Ç>¶Û@ÌÛ(l•¼à}¥[wÿ€'¡sÏ0Çtpæ•,ÿvÕhݳf³Ã4>òð+FRmV¯¼®D.}lw±¸íªêºZ¶<ºuXzq㦠ե8Ø–2MœÖ€,¸ö–ýnßî]Žoýb¾éñ…Ò#4AFÑœ²=½ãöré7‡Õ'Ý Èø×óê”útôÔ&€;®ÔýgŒxèªÍûw\sÌZ4Uzd¡N[;AúÜ6ûÖj]æŠFù¤‰»Æg @×Ù&§zw­ÌœiáÞrÃq1Œ×çì‹úÞP†GrZÇ{Ö`ËŽe>a’µÖ HtîÔ'Z=¥¤µ6î,© ƒíÕÄ©i…éŒÝ4~Pˆ0ÎÌdÚ#ûL'ÆnšïrL¥GÁ´íniÅ Ä,ÓÃ¥±K’¸ì9ôwk#a~¶§±‡IôûÜ:f4JÈ[íáj$TË 6vlí`H±Æw:¡&¥ìHIb iQ%ÔL©sWps5•û(Šáà$[©\Õ5æ@…DAUbÊÉ(¨\)J¨àš,©CpXͤ 5@РkÒ¢˜¤õ’DRÓx0†’6&9ÃÆMZœeÐè‡ †°iÍI3¹ýîù&pô’_µ¹¾õæ Ð>øóõäóÍwnZfdó¼ÇšÂÑTû z8Šäõ‰§†úÉ?,G!}ô3¦“vHÏ8m¼rßtáĤG»næ Zs3.osQ€ÆQm]'·¿mG€N~ùZ‹’Ž|át¦%!U¤8x î¦Ë9aºá&ÜvÖŒKU* 4L­<¤ý£¡÷5è^òò~¸ïêôç2Œ! "Üx‹ˆ áC0ÏxÚ!ÃiažúNÐ//I) ZÐÄD ›ËþÆ/~‡–HaÇßýŸÁöK,?þ{ÿøw¯¯ýÊ ±ñ΋œ4ÙÕ/oøÄöÖ“/à?|üàÌ—2ìæ@ d¡þõeý _˜ÈBTS{é­w; êéŸjµ°õ“ßœÞvC H ÀùÛ™$T`è$ñ¼‡Æ•÷^ë¸@ÊÕ ÿ •M¦cbiç‡o)1F˜ Š:ñ¢éêcsä¨KÖY-€—ß{#~äLý«Ëú¶3¤”‡põ»‡É—Of…xêOÐWyøßçOüJ–tP=üÇõí_ô\‘¼>mR¯Îú•8 òÇçPbñ¡wâï/ëO|òh°#ãÅ»ÏÞÞñ2¾ó9£¡õö'üImãLÛ£Nßø÷øê×*2)­kJP€ÇÆ×D¼ñ¥+KžKÛ\Žt–E]ªˆcS×43uµØP1Tý‡y®ÇÎÛ" ¥èÆ’7 ˜·¦Å(Qº­[Ü”{ú‚yßTÆv’è6i5&ƒAgEËÐ\{%¡d’PDYÕŠC$ ¤s˜”@ (@VÅ–‹*bŒ $(”ã¨Dzï, «QIÄ"¹`ê†jV¨2-í„E@OæM¬H:Á.â1 ˆ B$Ps>´på@#ƒ uc§4xê bEóxGªùÚ¹¬h„—R‹Q¤ÚÄZ“"Ì( X£P»Ÿ+'u£@ ‘GuWÇ©n™‚tÄê`DeM*1# Ö`­Fð‰ç±V!v"€IÀ„4‰…fÇ0í,# ˆ€0xa4„Ð0@´Eª0êàRe!3éD{è¨ðŒ;@äëÆ¢x—”ºÃØÂFÕuÕž6F¢Íg–û±w«À%ú(º¥T Á F,BI'ä„vvm“Ê%¼´¸JU[‡…’Eª% »‰UhHÅ‚ ï]ÆQ@Ët ¨Å úÔƒƒW?âŸ_íÝVAÀòoН:CnÿÖêö×)V|Ûÿî?òÊ~mœ²‡6Šd¼|Ç {nðxòS’üŸ÷¯^½$âù¨÷÷ŽG8ÏT¬]ë 3¾áõÿ1oî½RͽΫ?ö–Á.xh8úC+{d"žY¨,qŠL¹•ƒ2öš¿„Çœn"(TGþ[Ci“—‰¢NnA¢uݵÿ/`‘ÿü@¼àHZ¾æ ÊÇfæ™nŒqfå‘°>xî(&¹éîPÅ î~ „‘ž°%©®Ó×,EñU4-oÙb÷pbª²$®ÛlŒ *¦#PzáþŠ7okÏÜ¢€=yN)í÷,ŽéÄ¥}ÃΉ°gyqÃÑâï^„™ãü±Ù8ÞãùÈY•¬ÞÐu·‡Û…Þš»ü^â=mBw…ƒk²Íƒ»tÂÍ¡¸»½¾{…0BØ™ewöë3×Þ:^gíô†j”؃‹ÙÚ®™X?œ2é00 ¨N11×Î,›jyɤ.áQ" Ír%ª#íă8פŒ"bÂÖ3÷=D¡ˆDu‰™ tZhØ•Vpjq1]êEëúÙr@ËjU¥ ó¤ºØ¨€X®›à©P׈¸Ñ ŠÌc×nO‡*7¡A×SªN;Þ…&WÝŽO‹,Ž‚SÔ*[ Nj­“1¨5Ê{_ê¬EÊFM.¢2i&,Z4@é°ñjá/Ãg¯cì/þy_µo~u=æ!õ]W/->?gµüãŠÕœž÷(¸âŠž(\FS~úΪ:é‘k÷]|ÛX†©3Cª¶nD¯9榾þWƒ/œÁwþ žwnëº,:³å´lvNª\JDù 0bãý»Ç¢JŒxJ.x4J”vj…1F&ˆZW‡¾pÓÀE$Œ;¿°#NoÑ×^ºEô¼"*üôm#QrÆ›Öc ú;{ûH8ÿá[š pØ¥Ó+Ÿ½ÙU€²Y‚&®µ;ðÁÛý‹NCÛ«;ÿ~î¤hïT“°òÿd“¾áTý£Ÿ÷"`vyÇèàþqÑJñ±sÇ?þáàÌäƒËÿ̯ÞÜøÑÅðÖ7J{¢ó‡÷,ÅŸ+ëRÜñfÔo~1M&tø‡Ëú'ŸˆdíÛfëŸ|&<ú}<úì>Ï9 qþcºXŠ”_H`µ.›ìÅúÛoì9)âUo®¹|²ó†åfM!jF˜xÓÑùá6+Õ%w92¦$»á/ª¿vmuÒËt÷H¨¯ýÕ'96E…ÍÿÑ…qG®ùþªˆ°Ùù™uå?"qmMe¥ÊJÊ/oLwTÜ~ÉÆáâ×Ã?ûŒÚéÝ¿Úi^åÌ–Ð<ø»†ƒFV'¼¼™úéþÌÆ¢¡ìÀr”?-~¦ÿÏúXë°ïWó””zë«í½r(M 럶”OwÓMáÄóGé¿UöSÚç. UÀ“RuðχZÿ6“Z'$Ü:w}u»D;¯ ;T˜D¥ØIž¶£T Ñ0€écY;Ë@^ˆ…†¤Ey" L«^Y6 uÛHQÁJ’ÑDp…æ@uŒ*DaPEÏ3´ÌĔĮ©´Õ‰Žiˆ*/åÿr„ßÖÕáøÎyÇUŸ¸ëéTPl™½Mgn.Ôùµ{&`Ík¶8u6**ˆ‚t=Ýwߟº®ë]çüøÿ_¯J&c'¬ÂxäwT…Ü„¨õ>†$ ÙI[´IH˜0ÈdR·,ʧ@œÂZ[vÄ% Œ:YÞ¦ªž4*Jì¯"I ÑjÛ ëí½Y7ŽBŠA)5Q¬¤´}tn¼V-³6³ës$£& êÍ…©f{:Y$|ᴆФù±É&ÃÖ7Td9ÚáüŠÎ6êÀk<^•£ž3´ U¹5Ù,Ì–íÚÞeŒ·nñxûÔ¾v©AbL «¬ÑNó(T™6Î#Vï 8ܰ2aSlÞ(D €`$På¹»)c­ØÇLK/<{´Î´3L•Z®ùùþÿPÑi;%Uíà‡kÀ¨Ddr €€"Æ"xÐÑf.Æ\7û÷#3•ÙíÞsU-Hàaõߪ/½tNin¿÷õQ³ñ¹ý[>v0 ÀÿÿêjAÂk2™àŸ>½ ôoã=7Õ¢HFÊ,ü/áÒôºÿäÖÞðKÿ¤·™F–¶øÍ›&½‹7¸ˆÆÛ|Ã;¡Õ…rb2 ¨BJe²å´êy©< E©z«î¯M‰ƒ#Ù ‰é(k7( £,NKU_H$Ûî>á1% ËÙ‘ù ç¹í.× ¬%;žE7®=$œq®kµí€m¯µl‹lÃʤšSVÀMš¨¦ò8¦È‡zù˜£´0ÉúE–Gã:¤ X«»wÝåGkûò/èjvÞª&ßþÇ÷©÷Þ3›Ï¾§}ìå–—^ÿ§öÉ—ÑÒknhFA~ÿLÍãïù¨~â4ëØ|àª5ÓùÀýV?ò“Ñý^Ú‰ïÿ]ûý_R;æÅwç:ÊǾã&í|õz{Í? €Å¯ü·ÇЉ+O¤dõS>‘6Φ©OŽæ7ož>nIÿäRR§Xÿ³¯®žþ–™("WýFïú÷s:û­c'¿qSóÝ®>àÝqWûä+”T¿ýÄäùÊSÈQ&"Áüó£Ó×L¶¾‹ Ëð›ï fŸÒ_®í›_ø®zêc³Û?}ôøè mØTŽ» ïßíN û IÓ´ÿ««ñ‚KzǾw¢zâfKhè+“™Û&¿¹aq‚Ôw>»nUt^'*İR³~äŽ Ÿ®Š âêCkŠõÃvvRJý]*ìÜÂô÷‡ê_6ApQí#6d×Þ}©kþî$sò¿ÍO~¼œ DÈ0;3É}6Ðø–åñ)gY] 9kƒ>~KR}»å‘s+M¦Ú^=‰‹×–õdo`b¢tø÷&>æÄPƒšßã…Q*Ôr`ÿè¯'o ʹݙíœÖ›šZ9Ì¡€ÉÔ)ÃÓ6Úf§Û‡‰ìâ lž-JÙkË]¹’"ç[¿a3±Ë+ J€ ªzd˜C´lóuÚ¨Ëf"@â€èFw6Mc¢úùl Èšj}J€¨Sœ % jÖ¯ç1bÓRfG#ÏÆ·;Ñ XòÞ ê;†Ö·c/@¾ÌÝdmÌkËCçI`Š€†2ɇÇW‡*†(nµYîowCFÞ|NÊ,ñ„qR#°èm'¥ïîwA̶ÓÓ‘ýÇ£nêZ0fÚ¯·‚d=«íçuªÔ‰~ížQÑhS)=Rgýi6nn[”Õž9t×øŒ“еÏ_kþáü^‹°ôÉ›ÕrBA!±°N U¨Î?«}ß­ãüôͪ²áÖkÇçž½uñ-×E¹ ìé±õûàY$¤q^jûðEÌT|l¦‘ïúÍ8Ýçñý»†3O:-'¯þøÙsOØ„þê80’°ˆNšÀ…³ÇÜ¿¢D‡Þ´Y¨ó¸ÜŠ*Ÿt^Wûª¸ø‚ðýLºÙlPQB)ŸyJL‡ê#_Våù§„][Ó¾k×(€¯ØV%ͦÃË»µù—“ô¨…ÎóÏé~mïeO{RX&ïûS³\+¡(¬“æ¯^¥/y%MÍõï;Á @À€˜¾þµú1ïèL6Ù¬ÌIïdÕ¡ÉUÿÝRÄâÍÛp=ÊÚ;ëÃ’ íGÅW<Va´çíôY”•¦˜°:úñ}øOPŠ­DÄ»“‡z‚<`Öp&0(Õçy~%ÐÓNöæË8œ@ùÜ3úÛ²zÏFô´³;×ÿt("é[?ËÏza½çÇ«N ë^qÊ«N,}ÿ8×’ÝùCðíÄnz6ÝþK§2.ÿ~ýÂ99±¡¼vkeöÌs×¼$M ZäÚ½žmäUHiæ‚^upïêðaqæ&Ž7Ô°õ¢¹CׯÊ_±ÜrŸjöÒu "6ý½·?Ü¿3ê]3ùI$›/¹¥¹kïø•QÅy&6{W#ÑpæÌz÷4¦»ñZºïÊÉ=Ôç›áâá°|W-ð狱þó±°|öhÇBœŸwfï ÕôŽ Ï]K[‹¼8m*Ã[›ÕS×6àxƬ>åôÅ“ú,Õ–ÁÆåfŒs (o‹ X›jî Ýí&¡â,¶™Ñh¯‰@݉óõ‰¹i?—ŸÚ2kÖÆÕzñcÇÂ0Dèj˜80]ÜÐW‰T1IYµqbz¶ ›53YpZA Á2ÜæÊsÑ•]Êin›ÈÍ"ú¾N!•sEt’RÏ‘Ž\§v¸ÔɃ[ <ãØ+Ý©¨¡5môìcÝ+, #¢!Õ²%ž„ÐæØÄ†¸$ C™|%š5{¨;vÞe‚@=ªIµ®M¢0HZ•E4>õ ”ÊPW<îYÊÑkðˆ£àÿNÀy“RÑ!ª|ƒSˆ¸2;iH=ø™ë´‰¿÷ IÐ>úüů®JõÈóÒyço¼q~äC”½¾ŽÀíɾþY¿üq ¨³yG\=ò“¨5ÿÎb¶/yÎÔ/o\Pã…÷e¥•UŠJ¥³ÙŸòHÍ)¡E©!ü÷Ö’•m¡4Ú¼±»öÆ¿Â+ŸœÝý–ÃM|Ôs×»ìÆæ[ßÑO:mzê¹Ïõ¬nyÓ>yõKÍo¯t»>p–QNz9¹ìÏáÄjãG§ý×ÿkì6¼û|kL¼ùÍkõ’÷–VñæW¤ñG¿޼žðž·¨êͲ7\¶?8t_ø‚yì•YöïÿdÜ…gÄÁe‘W½ˆ®}ÕBç¿:Õ¿>ë2Ôo»š_öiûË7®ÒW¤ CÎ2~çÏý„ÃÙï÷–Ë=ƒ!õÖ§6?ûØrò@¡“ö¾m϶wÍf%©³>Ñ®|ì7í‹ÿU 1mv_¾óè[îôO~éœî¨ÊKOþTÐUá¿ó©µSÞ±>³MêwpâÍø2DZÿ©³¬ñYOv¸^èÅ/p¿üÈêà…&{ù—û)b>]¨ xþç'Zk¿ÿ=·øw«^þôtð²CÍHøkß³›/›‹y³·¢Sjþój÷ÔW–b¢Ð#þ­?ð—ðüÇ›ëßD=÷Ò8xûA•>¼Ìg¼v–hzðÇ.C«ª0gJξð9·ëŸº^ÕÈkÿÙM®«`ÃH”ÆåôûàEd3ˆ ôýº×í-{ @Ii €„]Déb–€@Hx¡3ŽÂæuŒIQS @ÂÀ˜”e¤؆s©E……ø:E ç‰" µì@¡ÊZ`FËn\å˜BTÁK$Îec ¤A{…ý±„¤l& *3‚9`ò!‚(0)yLÐI‘•=)µŒlrDRYÊ2ò^e> #`ªaä¼D¤"àˆ8g1ƒT:›²$``ŽÝ\ S@Aç%R®@`ªD£ÔëZ ì¹È53Ää!ÅîÆîš2W>f‘…Ѭ3‚Ö‰pL„AÀèÔc`«Ÿˆé[°!K5/»v­¥¶IMwû0ïhR¬È$ñ¦£'*ã[7–õ¡ŠM“ 0`C…­²)ª‹"ts”ÖÎ3Á*¥$Üä#£ŸÊ#7ÞøŒ'ËˉYZO:Ÿž„áX„À§öð ]t*-#2Ɇ“M˜Õ2·®G1I ¸mG~`~H€ÂTÜö—º«D­ N6’#3>vȃ·K×ÿ5$ÅþŒŒ ( ˆµïÜa…Ò*#‚"W4šeê+yAä-Z0)‚dO{Ò¾ñ©¥Î„OzÁ&'OC—)óÚý9ïìxTÂý·ùQ’b,ð¢Åck·µÑǾ`'¦šôº‡·£ÛOf D[ž~ÛS:³O¤²ò,OÎdÝ}›àšâœÙ¼_P}Û(;mN-ræ¬}ú`m·ÕîèžÉ9›Õø˜8áÞ¹+»T!’õøØ·þ4ÉŽÆ»7Uñ؈÷Ì2Ó‘;秪Š*6M¡œHYšò¬bóô´>¾Ô*i—Ê]!EÆÍí~7žëcä'u‹z4Yj¢ˆ`} ·ÎTÂØ¢`•é‘c3Xn̨ڊ@Æa| g¬YŠV›Ye’­ 2ÀâÒ—JÖFѵ‰ÔU׿YAÏRm§BÌ4‰äVcTf"<‰j×ö l·‰7ÈÊ>TѳŸDiª•¢êk†ZW¹[jE$éNDv†µߟø4޹ÏQñªCPÖHTÊk‰™mÓd,JEBäxt8m¡ãÙ¦:w2JNAp­m%Á°µ\Éb©ŒÕ@#e@ë”VŽÚÔ2±×Ó£cÞݬ«­c†Ø1m0-€0ŠÌåUCÉEÅu«Œ‰Cˆè¦0M>“„Æ3!‹ $¥Å£— T”¨"Ny"Z¤P#jT²þ?êX)ñëžõdÕSõ‰PÅf‚ñ÷×꿹Ï÷¹ÖΡ£¸ò¢û´W¿ÿ%›rKN]àoýÈÀb–ç[Ÿ#µMhcÀl^VÛ#÷ÛE#ÊžUɽÊ÷< ã÷.î¼à™nz*Ž/»žÞú˜îï¯ÄÀW<½èôQòãȾÕÌ]¹½ýú‡¿®àºñ¯Öq@~}½>烛€Ai-"IÈzf]nKÃü´Q˜¶ýûc †ߺ}øì+Š ÈlUþçß\X\‰ ¿{u:ýòĆ'_µyü‰{šKžÝÅdôI¹:ÿ­n’™ök¿Y½þ&ƒq|aO÷„€Œ>Ч^Ô¿íS«îÎÀ?úŸóòΧð‹oxÀk:Ý—Ôzë6΀¿<¦ÿ顊û?PÏäÕj'üå„ÝM¤4.nùÎ1Ž"{öáÿ½sâGw¤ç>ÁüéãÇ iTau¢@,ÈãïÜÐc¡Íðý×Ä æž|^¦•MQCdÄîpþW·`êHb­(]¹£>ê˜@¹åcAéÑÏ-:œbWÓc^œï}ã=SŸü#—XŽ\†Ù;>Sÿôó‰ä^Ø)¬"Æg>¿{ôUwxyâ‹æÆ/ûs÷“gçTŽGo¼¦f¡gÿO&6Â@ÂÑ<`>ð„ž§J%¥PPP·ã6ö¦[.URN!š,¥¶)ȵ,«ãf>Š`­¶c‡'VEQ[qlç|NCoJ‰£¼ÔT°«mÒÓÆšµN©aliòP%HÃcUÐJC°ã&ôYBJs®ò˜,LTÊ %Ã4å0nCžŒ¶nDTJˆJ;×…‰î´–”^'mÙË8!Ø,Õå >L"ª,°çš¢f¥2Ô }²d;œÖðXg Å¥¸¶ò‘X  $/ÃP*T ” -#¸—–3@wÈ!ö‚ªM8t, A²]ɘëU@æRg¢…‰9WIÀä HTB€TÉÄÛT©–PÅ¢i ÆÐAEÈ[VÜ`ª•Œ+´n˜€Œ#†2i½Rq«.¢ "¨Ôt|RAEkgB}ÀcoŠ:)’q.Šb1¹I%ämO#%´ƒAB&`Ãã„€÷± ‡.‚pR™’É1·5‰O‚`󔈭NÈ5°óQ”†ØéE„¨m;J )SªU D# € :ùÃkWÌ»žª @!J–:/~‚ÜùÏuö†7ÖÿóµŸ^²@„`øºŽfÝ¢ì™í#ï7t}—{ícm¿£H&Y&à ³¥·ÿ¾~«§†¯½‘Þø²>,]~ ¿ñae œFo5å£>¥õ™ù‰wÜìþþß²T«ô¹fìóñÏ¿9áŽ+·@W©ûýKÇýÏúožln]öd@&xò#òù/ñkN)ë<œñ–Eºñ;þÉO&þ‡ó@gzåëÇêç?üpÿÂÝ^\0lÍÁ/ß=¾ø, ûˆä…Ùés¥òF.™ó³ßhõ?—e†“Û¿2M²x÷‘koj«ÙØÎ_³–A®î©e×ƒÊƒ× ÉˆÞú¢G~³…![ÿ÷{ê‹;¼ù©6m¸†eäÊG¬/ò’&Ö ‹âùŸnT›/[÷rË¢¬Êï\«x¤øôÓ0·‚›¶Y…2¹{¨Œ«;Yh+˜ì97Y6l“^Ò£=#1Vz=De)sû‡‡6&Þ ªv°ì$Ø8­Ž ¹šÂm½Œ’vƒÝîõɤíSª ¤¹§[¸M>"H 5cØ*Äi­†cêwtÖŸå*Vˬ˜a-Y6#æéŽEÒŠ*!Fep8†¬šF”î¥á^) ¤ÉJ=Âåµ)’€6.iW²î6)·'PD(­YD'‚é¶›ªÒ$‘øE ­öyŠóKa>Æ¥ÇÍP¥š@ͳ­®@dMŒ:i*©ýåñ¢2³¢-+;¥‚‹Íwö#·¶)iÒ®ûW󟽱xÑyš¿y`œˆïüâZ>òÍ㘡´aõç{ðÁªtòÇ®ž÷ÿ»ªk óygïþ¯ƒ³O8Ù|ýǃ•K‹áÿüÕŇf%;‡(ÀS—žÞœ¸-:Œ™cÊvn>öíæIÏ[¿¶Å(ÝÎN>}]ãYþ7jN‰E Q¿úÜB&­üêóó ‘éÂçNßzO À|ú.wÛ «ˆH™UݧêV{8é_ˆ«¿÷ža`ÚyÿÍ“ ¨P>Œ?¸«þêÒš0gÕ?½‘‰Q?óÕee¡ÿ¦3JMrðÍ••ª&0Éë÷]SƒCýïÓ¥‡Co¼™ÒZ™ÂÂîX÷æ“:y†¾,þ‡V“ ›Þ}úÚþÎ?á¹Uw&æà…ÊñÖŽÓ¬’KïkÁök_7¾BgïøF(hNfz‚ÉÉÙo˜ÖŸþ~û¸îƒË´y–¸eDæï\Óíà oøÊAw¨F”øƒkÕ©ïØdÒ0SÎyß@+m.ä5x›”„¬RFuŒ´F1+À\Bì$IH–H4¡¥F‰2@Ä€E妤Ѭ¦Ã\Ž~è—Æ1‰‚ž$cÆôlà¡_lÈÈС¨¥Öè}M@¨XÀ8ºÇiºC‹ £+0EÝw’Ç–y°6ö¦­ò®³Ú$ÔCOÄ #¡ Î+ZDüp`r•¸mÖªh ¡ãcbïý ŸQ—±HÅìþÅhI%Uô öB^O*£@Á1»a]2§Å›QH™FÏ&! ei’a®5’x_©,Ï% ÖX ‚(ÀäY„EöEp€˜’ K‰€B‹*ËIb(afv>`½šiªäU…ç3¡f„zì³I5f&ìd$àö¶­· ”FÎA@ ã6N"‰šË1дEnSò’,1ìü]J(HÝ,50Jˆi@D¡Ä¸²6ÉÖmU­“IP±@@˜&£T[^‚mµ-[¯ãì”7¬ÔDµ§æmXƪ]ŸqÈd±mõö-Mß$MéÙ-íTŠq8R, K×.·E–WT;&ªsòP=D° (B¨Á‚‚DzÇ拆E@@B´§¢@Ül¨wßRe·ïôÏéa4"A2äÞÆns×­í¦LM?ôô=ü§C- ÀHdé¶¡¾`Ú^âŽÎÝÁ«ÛûÙÔ­ã.¦Á9ý¸‰3g[·rY»ònj¬¸™3aý¼Û¿šbP“dDÃD˜­Ï¶†ƒ‹‡#L˜sŠÔ9!nÓ\<<„î†2JÐIhãj}xÝÑÛ:¸Ú,¤(ŒŽO¬Dì¯7Ãã#WÍÑz 2õ TGqj¶„%Ÿý±!Ó.¤6-“©©å¸R½ä“ê7Å‘.Í•¾BAH^å¹F];5Z6§‘œÄÕDa¥¬L¢Œ™äëf³zÂÔ±zÕ¡ÊIjŽ“I(¶øfS³f†jÆ…dJÊFŠën Ú·ã¢-4-Ä”¥š' U€:Oã¶U8"$Ì9IÌòÒ%Œ^)kP@u̵Ílrž]ñ±¦Ì²f›”RÂFÊ($ЄÐ1*Ô]ªƒß"«$¶«˜±4¢¢i§±Ÿ8&“¦0YÄ¢ +‘ó"²ñ¦V!(5f$Š”nDšMìŽ[OD(‚©Mª!SŠ0`1D!ÎF-JšEPiLHÐíú!ÇÌ ‰3ªsh(Xòzìñüw¬#€ðÅÿnxùL 8ÊÅÐþ¿þ¯yàYü…/_qÕ8@@”Øþú­kÝÏœ¯žü˜øÍ×Oªžé?ûí ë4û©ó)Cñ gÞ»ÛvØéÿJ÷ÝÎ~ýÒãCelä`=)ôbžøÚÎÂëom£àÄõg^—޽ÿ7£‡½oýø²«ã ž>—LŒèKO_å˜Ô;‰@àþé‡YÓ|ï*DAûæ§ñ?}bçÛ‹,š)ÝïÙŸzŸ{à{*Yñ ïyýmd6éšËçƒ ÒùoÙ²ðëë˜à¯Ï¥©Ë/“ÿýW·î“§$“ D¨÷ŠîêÛ®Ÿ¼Eë'ýÇ4lw”£ÿ’p ÈH2îÄ×¾|íß]~ØëúñmŒ/»Ô^ûÑyÿò¼xÁ•êŽ퉯׶møÂm§]½úƒÿ£³ß9¿ýÔúAïèíxWòâá×›}ï)ú>¿”„€XM<ã‘´tJ jìùŸžc¼k@Zk“eeDå9‚ˆ¦oýRmyÕÌ𛟛F8û>@—¾b*ŸÿÔ‰¡8øÁ×›G¾jÃŽÏ,…mÝ HÓ/?¹¸éßÇ+Ç@’—ooxÒ ±^¡nû;»úÊõánçÞµ“³ƒ‚– ýð‡+zq“unÖºòÆÄD¿<ÏÃTžünËÆ2>íôµÝ[aá§7í{楦÷ª6‘'@Uÿ÷ñúÓ;Ô‰A£ƒ€0‚æ4ifBÁ/a‘žy6MªcŠÆB9–2 `YæÄž Bí3eÉ9/PƒHŠŠ"uÊ‘Dna˜±fÍ"-€² Õ´¢¢Ûwëu:öämÍRª](§×¦Ša+(v× NGpkÛ4j–Gݺ”À——³(nß„APSÝ*L‚¨z³¸¾Pä'ÕôÌ<±ˆs"PP 9¦L¹}it÷D@€—I¯4='¬6­÷Ê¥æGGýAˆzדÊväDŸr޾ö–&¡PlÓüÌëOj:^@®Dm_çöÞÓ.­EÛ(ô•׿»­½ÃÍv>i®ÈU­ 9ðÃÐë.^Ï–«S6›hü‰ÃrÎ¥°}Àåùˆdíº•öçˆH 8 (A¦(:*È¢ÒkßÞ›Ÿ½»Ì¼‘4¤«ªþËQwá)n:&¬Ë×îXºiŒÚrçÔs†;öúÞ¹x…ÔtÒÁ{Ú ­i8µñàîÁî’r¯Úõ§¹á6íØ¨6îiîl§FEݼ©[†ýíŸk,:Zº§¬LoÍvôqý©#¨ÓÔÖRùVdº˜Ã4ZpzÙÞ®ál§˜Û°ÒB-9ðÒâðÎI•[vÕëçrŠªXo–§- Ò ö‰ ­ô&ÇóR…q”§a“d>+Öwq@eHĬÄ=˼ïɦQ›v-! °²6õ ³*5ª¬ª¦©2åšK¨r5;§› H¡ˆÎ¨Š¶ž4¼Ø'Ѩ©<Ç5™,»„µ­WØÎLÒ‰ƒ#J aœŽ­yFdpTˆ!TZu±m”b=ZË¢+ RBæÐ’a`RŒ#`ðŒD&FÍÌ\:¬0Ë øÄ@ ŠˆÖ2‹!&äÒ0–Ý%_¶:Æ)¥,ÙZ±¶›CA¢òé^‹ÉQ¹³ Qg¤”­XÆJgYÊÇÀ¬S1¶N…À+Fj”$ÁØí¨œ0ÍtZD7ÐÆOʜԴçÌÀáC t,k¥YPP1rkÐJË’#ËcN I.¨©¾õ• üöM=dÓ뎨w= ðß ®f]'xØÙtÍåÇ;Ÿ=›Ú†¹W­|ô:ý¶Gå7¿{¾®ÞxNè€(R½¼„ÿò®ãöçáoÞ»úÐË‹ã¹+)JoòŸ¾yuè)"°wSäøâ³ê¥÷í+ÞsNþ¨³¨aÔ;2_XÕ{ë¶òtÓüò“+Sï¹Oùoßl2¸îµk¨Ûñ® ›\?YðÀZé}âx‡ŠÊKýñ_ûG¾£ æì“¿_C†»ßÕ‘=5]òøò¶/.ƒËx]FÇ?®òç_¬f§Ç@¾×ko¹2cÎxã>fšóuˆ6 ƒJ(W¸zIçÐ×çUø õ˽í¡aÓŸÐÙ¹YcˆšB–ÌCï_v¾HÃ9í©&ŸÝO>_Ÿm‚ûÅÁú×C¾ýKëôí®ýæ­ÕaHü—I~`)2&¸óþsÝ?õŸÛxèeaš’@ö yøjÝßÖ‰K¥¼¯*8ò롽ߦÒ+Zýýªzàvuúõ²ç¯?žÝÞHç~뫵?ŸG"ˆ¨¥A[<¼»vð.@Žý¡Jwo­@±VÈÌ“³m(”G«bBÂ]S …F‘kÁ4jóæ,*Öqf—_¿ð;9{Cbpã+£bÇx.B<1ðû=7G—Íæé8¹5Ÿ„•4{ór»1Aâ¸^Y*ç4Ý ÑêÔ¦ª/à!D…D ëÐúÉÞÁT•îSKd!äÀ)Œ5õ`XcZK¶^sÒf­^«èt Ê¤œøÁЩ1 µ:Rß/.8ƒ¬6wjLud螌wxÐNI_Y¬ajªÌ'MR²Ò™®G<’`òY«¯ë´8YÉ×Í6 L`tvön².í?0¶À[¶¡0Òi“‘©´[¼ñ.:Ä|ëf½"IîÄïwÏZbwÊu ˆþFÜtÞT÷©T¢X&·({\›–ò„âÅeÅŒŠ ÉOÛ *UIt*2yy!ÊöGõîþÍPj†ÍÛAt(rÄSž°ÎX+I|¥ó0}ýw:„‚»ÿÞŽ~zŒþæá3ÕŒýóšöíGL,×üEåw¿!H Öª4NrÁ 7ßõŽ»Z9ði$$XýšÒ¯~¶ œŠYŠrçáÛg^~–…¼=pdmî¥ç·?: ê)L»_ºkíW¯0(fA#±zÜ£áXR @‰oø«Bõ¦¿Ë Õ*ÌLGl­#11Æ`¨cèônT6´N¸ûÙúoµ^ålï_žã¯{Ã|öÞK —âÁ—íËÞñÚ2zíÍ×x/rýÓÄ~æqð‹÷ šˆDŸÿ¢:ÿ¿Ö;Ãù_^±8ûá“àóÿàNÿÄ JêàE@j䤑žùsà•ÇòO?¤+Ñœõ¿®Ù¨sHl4DÊ`R$[Õ Áªhj‚™7)ya‡¾Î3jÐx¦NªžTäB@kae̶U¦&ª@‘ ÖwÑÈàðQ—”&3V«+!#MËbÎyæÁVF‘ :1qÍ$"Ê4ÕÜ´L¹i Dh+‰t“[c…B¢+-Ê(ÙEL.%?ɲL‡&bàVÊ,¢ƒ5щ†ÕNšˆZîÑêH @wÆ`êŽM1y‚šA(´+ ‘zèBF5e„&D˜ùˆ…ÎT›ã&JÜNgV{"hK A_GDÀ{ˆ€fAB@AIŒ6#-÷b&@`PCÔ®¡ÚÚHH` À˜'cˆÒˇȄ„¸ÅA I"#BÒJdâ”0rD aäa£%^Û‘tÑ£R¹´”zOÞ^üöwí‰/Ì®ÝЊédFxüíëä¢ÇAr5[oýÄŒ³v?Oô7ãÚÏGxÕ]¼ùoëÁÿ¥³Ïîß Ë3ÝOnþœ,G²Öú:BWkˆRJI‘Wy¢Ìó¨ÉÖÂQë–bI8w}55«½*¸é @š¬æË–Ós½™OL>ĬK$FкÓüÿ'¦îªâÖx"lijjÝ 'V#ÎîÔ-VÝsµf ¹;8X`â´:F!! ³NΫ^ÓüõvwÊ©ë¬àÄrØÇòôüöÉ;j`ÜòÂÝ!lUªÝÿ:d‘E~ÆT`Ä3.ì©B”tèžùÜíÞKáÌCNξü#ïaí÷ŒL²ù‚éÍ¿[lo»…Hxçczá/_[ò¦žt’©oð ß%¨Ú³ÑíÕ¤åaFÂBöîGAÕËß”ÿû߫♯½N?éÅë–öÌãcŸTt€ícxõÿ ˆDA<÷yÉ¡ã­îþ—)­eTu§¿h¸¥qp£.A1‘Ðn}I¿»¯A` §<ö¾oïÜkOR_ûZs6éÿýìÀEaJ±`¿<ðÑ<ùbuô-ud@Ø{Y.¦Ç<½¢\7Φ_}|ÑÕùð›ß\{⋊ŷßìHà¯ë®]vSúâ7Bâ×½H÷»cÑ&00¡oh5G7üÀ5nR L]vJyíëÖ”ûá Qb±õ?ïh\tâ?úÅL´Ó¯}~üÁW‚½f&¤§ü­®?±Ü¾ì r³öú™þÞFö¼±+AcZ;"ÅKw¬¿ú+ãé—ì¨üÎÊãî+ŽÙ3‰PÂÑïë¼â‚œ ºH$ÉH6At¥A 0‰2t) 9:U»hðuË–)AÜ é™@H tdm€Ñ1ƒ¦žh[AÝÒ UyÞ¢²ˆYD¢q£•Ö®•qH*C"`mr“CÌI‹.òN ´Q:Ê3*L‘Z¯bÁèd@Ç€QH’ ú1iýÙÙþ¢„€,@ɨCJ¬xÒš|NˆŽ"!›¨h:Ï1(R6N‹c`[ÚR딄l|)÷ûÙr¾©Ã‘ÆÐeŽ£ŒJÝ–AÈ”d£dÓÍ1 f~”ã¸n=BjBèd¦g5®×k‰ˆ" ¦†¨Ú„yÞd("NÇ£C+ÁåoP@Q9Õ •I©FAAµ£Ë6 Õ#VÇI›$éðR`ʶíÆ8¿Æ Êa ¦rÅ|O GhT4flP$œŒ ‚Œs§wìÝ﹄* áÀÁöFA´Ñª&‡ŸæË¨´RùC) |ü×ÇÌßœ ¢4€(fÓ’,ýâný¸‹&^úÍBuß¼e®:úÒñú?¹Á³ñO{Âíß(ª¨à¡gêC¢»ùciŃŸÙÌîðW½föÝèØóÿîHðxÝè·/e£k]ª$…0:uS~ßžr¾dL`ÏÝ$è]÷÷X>¸ !QˆwžÜwG±ó¡C}pÔlºh084wÞt‹">¼âv«á^‡È€ £»W¨Z}êt¾î‰w½{^P0å•é“§·ÌÛ}ã $€½ž=‰8æä^%l6¶-á–Ù"Ìž4­µØéØuÊ{‡"È“ý]Ê›ú 2CB2S»Šq2‰C>[‰³3&›·h£Ód‘AH†kÞ˜i_Æ'¤ÀMË Pµ}i2ŠiAŨd´ŠÕ‚(€Ê€vdFè|”¤U§9¯$Ô0 áøD/Îâœáv(…Ò<±Uh<1#%eT6±Ñ¢VëN>ì¸fy)™è& !#-£Q1EQTB×ÛÉ@R¯HØNR®¡è™¦±äDˆBCŠHe9Z©¡hý(•Amg“Õ&`‹iq„DQ0e$ÌN’%•H‹D:(µÊ¨$…mŸÅG,Lº¨hZ@2H1!+–_¼rßþÌ>àè—ÿ±˜Õ‹ž1uû;ok²7?©õGËOœ¾øåyAÔ,åÿF]ý†ùþgïgR«$ùòå?[{Ä»»K¯ú«ºìïgd ‘xø«—¾yjøš$ÁéÖ|äç“Ǽmvõ×6À([>rF¡#|÷à ?Òø ¿?óõSû_tWqù*WÓ¾Ën7ïxhúÞÇW‰Ô#ÞߛӸßÿvî÷—ͳ ‹²ot'K… ¾þÜ×Gé¼ï¨ŒýžË¸ÀÀ€$¢_÷ºû½bd@À„¤ô+þ6]y%ƒþzùáõo8§ßÍyÿËo ÀˆFihAÊ÷<¸ƒºM’¹àÒï_ìp{ý™ŸOD`æg·Ÿøæ #!$UJõî3å_< ™!±vòð·mOžßÿÒ²”¨bÍ”[dÂÖÉ%/êšÒÿ|àZØù_;ãÛ?ylæ½÷¯|d- `AúÕÏ‚½¯ºkö¿ÎÓÊ„fM_~›‡„ ²îÊSüÍß8zö•Û&ººÕ-NÙé—ïjnÿÎr»œì+œý÷À¼r¡J·èX|ës:Öáá7í/{jsó««~O=á~ÅÔöŽ[::ùÁU~Ç+§Í?ðÔ+wtΚÂl {ãTò×Íß¼¼_ß:oØ›NÛæ÷ŸÂcû×îüìZöÉÇø¾çØÎOù/^Ï[OYäÚgïhÏ>Í.~úH|äCÊåÏ®OÛÚAÈÂÕCg²³úK›Zv‚"6íàsÇêÜ—+ÏãÜ\>o—ö„N%.@J‚$2¸W"=Îlî@`lTO£ -™õJP„Z¡6j-FçµñÖ&t¨³¤!™(„Zkmî"`U–ˆŒ-J`drYUÖ&ŒžŒ:ŠjÈ*‹¬4ä…›­”sQ­+F^RäÁÀX‹<ÌŠ~f[Lš‰˜UWAÅD•XN„$>¶¹!3,¨”{!SnÈS`H@ ÌIÚ¬Ô./­èÊP×hî­/3–IT$¥À÷Ò" ˜&Z“6J92=) :WÙívÈAÕmr"A"€LÒ ¥‚vÎñMƒˆ,€mð…Ø57r5  KÓ‚ ÷׃b^t7E=òÍd´’„Т9:)g¦H&Þ‡¦‹nÓFª™ü†ùñá:¡¬ŽRHíÖÓÕå6 u6ôV×L±Õj&8iAbJNãäð18^—:Wam@|Þ“ËgŒÜZ¥ê¬MkŸ»©{ê9Ê(R>ÜÚï§`Î>S@b‰èú¬6w½íNÄl´0sÎŽæºäèQ¾íNä§ôÚß,ÄÓŸ”¸úŽâ’s:Áçû6Ž'¿Dýì—÷U¡S®j•háªö çöBîúOy¢ô¸µÞhÊt$ÐÈ,öv¼­`4Mwó¬gÒ[çßTÄ=C®°êVØÜ–Ô-sƒÊÓ´U,ÄÑX–DVEUîÞ¹ºÓb¾n»¬+Éwu]´Ù·-m¥Û$Œ0_;­¬‹m@PY mP±FTýÂ+1¨P4´´æ€]”ÍJTn-#pâX×&SZyM$J˜…]Ì2Q@ê9‹`¬ ð^F“Ë' Ð(€äÀÎ)È" •JÛZW sÁB aRDA ¾ñ…!jI°kP#L@ú9¬ïŒ 1@œ`Â"wÑš $ð,”!„Uš=è!êhÆÈƒ0Ö a§1” ­½ÖŽ­qᤶÅú0À…_‹¶í·^<8ë­É•¿Eˆ¡ÿgž½æç¦¼Í —+@̘ PH¥¨žþ¸ÉÌ&;~Ó8m±…õ?\â®ã’§â¥«R«ø–gý¿Þ_.[ž ƒÐC_´7i¦Nw=ÀàYþ¢çW³•ÙzårØNTs úÓ_6ÍŠ ÀÍ/ÎÕË^ nÝòYo-•èÀ{?|L Ç»>yO@l¸èéëŽ\9ޝ}Üö‘ÅuÏ™+¾ó‹5V|9úî?ïž‹äý(`æfß·©Wõ§þö×®…]¹n“Ùü2·ò³?ïótPY§Í©Mš¿rP­ bÇW]ã¬HûÕ›S_î÷üh$IåO9m¤Çɸ"ýæÃ 3U ¾?úÓb¢S.\?uÍb%þ°,뻃xGÜvñæ…Ÿ/3/}£Úô¤ª„€åC7÷îøÔù!~z½ÁG¦Ñ¢ñMwó/Úc{[ó“¿ò,yê¢|5ï«•ß-ºß/äãK×O){Æ“WÜ2BöZ×׿_7wÝêý'åâ7ð‚Ó£Õ¢u2‘Úü¢õþ¤ŽGP'÷p¦cômûü:‘ëÖ¢»s9ÖNÄ„Êï«=–IÈ&nó]£ c OÑ)C>ö¯žÖ1Þ-·¥IåöIs,%ÀD+Ç7 Œ9ÞQ©˜Û„4Ym†Á±ë¤b½âŒ¦¶£ç¬Æk^­ï+¡$:z ÌyVo†#$ù유ƒl\×Y_e&EÕÆÄO6M¥Âc[°vjÈ4°PJPI¥n§)&Nf·B'ˆEJ>™ p‡¶d·t hkcìnéîYZJMïšÕ¶)CƒC– 1tOét´ä»¶´…É¥Õ\ƒ ‡p/$@ÄžŠ™SÍÞ•ù¹;¢–lÓY7/ÔÀ]×`¤Ä¨ºçmê5‡`1ÙwžØ¹{·\‡&‰C‹SØ¥€eÇK-RÊ5ùßë­¦ „6T Yç©÷ÐàîºÑl¾ïFÈ@YެýðWU¥ü˜rnnýÍ 1¦?¨ì>O¨~ûÇ‘Rw¼ ‡t¨Ýú¯›~Û& &`Dý¨çÚºÁ%`8åÙu»´üàÿ·~Ï=“…æ¿&'Ÿ–$¢Ý¯Ü~äM·ú°ëçiCtê„â5_õ¡•À0þ6êxÿ~°=ûÌ¿eÙ¿g¥ý2࿾¤œî>õ)Í÷øQ®º Ÿø†ÎêðºÉ·¿C~ýìàµ7À˶—M"ŽE£œtåR™+^opÃ[ÏÎ+¯~ûšyNˆ‰aß«xÃÇÿ±Ö,¾îÇ # d—½8»þEG=‚¹üñyWÇåáËÿ=9ãÝÛšË?0 ‘ ¦î¿ýCüí•ó Dáþ‰Ÿû‚Úñ-…ý“w b ÓÏãÊQ£‚MŸØhf”?>úÂù[ÿ~.j•Œhb¢¤Ú•D9Àd¢å/š,¸˜ç1 ey-$ QrU„B ÊóJ)«=‡Ð5Œ­uÌT$T¦JL°ƒ(VAÛ™N%Ô›2ªÜšjÀŠUž¡%$­[:…e‰„¨ÌCŠ>6¤lB%‚"$â@Ø”‰ƒ¨–s…6 ®±¬®•.Š€Xf%6Ï3Hƒ˜$¯É$@t"Æ` ’%q%)ŒØ¸K"%>ƒ-%I1&"­Ç+‰D%뢭$3iÒj`ðÌu099e¢Ôˆ'(½„Ö'« ÉñEà¤}¥ ¢@ã2€8¨¼Ô†u@•Á'4€ÑÚ‘XŒ¹¦˜%fIV…q€à^âcc¢Æh ª8 Š`Åš©hŒÉ„ !OTÞí± ' 9Ó¤Í'h‡]A&®2%8 ˆU®HU‰D„@ÈE«dÚYŽ€AX@g¹õ1á )%Šõ$%‘دĘ(0ëNÛ-„Ø0$¡|Z) £ÀHà^Âlâ6€‚:ß  Lª<Ù`I{ŠVu‹6"ØFµ·½z•Þôxñ÷o\QïzHù‚§Žoyùbïu¯Ž_}Ùpu% ŠT*S`ÑÀ°}ôYA¯«V?ø‹Ñƒ®˜íĦÈC‰:NJ“’+kÂ¥wþuM3>èƒl¦6UP¨T½oÍ]ÀEŸ®½õ =ïbuʆ@yÆåÏlCæé¢ŽAˆdYÝÿú%°Ì¥•P.|òVÇ ˆ6Fœae3fγŒÜ×®.ï^J›ž=]fY}òœÙüòÃÃXÉB‚™>?ñÔ:æ6-ûÎ߬s³ÿ>ŸŸ:«~ûûáÆ¿{Âè}9mw<ÿHï´ÂDPÊ6«?¸u|éç½Âé'Ÿ³ºé‹mÈóKÏ mªuÿ~“Èœºãª#½gÔù§3ö f¬{~®‹jò¾×–%‡À*»_X;ccÞ5¾î6×¹¸ßá¨Ï½Áí¿¹N€ˆ Ë·ìÇZÉŠÙñÏ\‰“[£?óð •3çTy¾ñÄñ‚9]QâBZÇÀyÌnoØž²up÷ZÊP¡fÕo$guÒ×VîXŃ(fÎìÁqãYÇ»¦ËzËÙáà dnúT8}~itnáò½º·KO–~c·œÊ!è²H¹/¶&:Þ €J€*J5<ŽÖ±q@ td;½¬Ž®E¨,„´aí]¥Ö÷ôÌÜt1ªÊJI&L3@t˜ìæP·"þxQU¸i " ÂŒN)C @™Ê-P He VuÉ€†¤sÍž½VãÕÅ©µX”â&ÃÁÔЄ٩áRX<­ªýËŒLØprHêÈÃ.ëp¢ýâx¡iTnÁH@ëÚi ­,ßqGJ‚»§¦ PbÁL¬šêùX“ïÀ}ÌN?·G ¬cP¦îŸ¬KN^'ì’ždÔ¹ ©¶ãyõ´}ž…t*Y”…N•  Ì{÷‚n~ÄŽ¾H›U<õ¨`úFù¡Ý}fJÀ¶‰T&µé ÉXn~ý?õC^73þë¼@ËýÇ9›s`ÝšÑøÎ¯ßÜȲyð#ë~a-T'mëàò!TÖÇ?}iT^²SŸv8 i“ãÔ ôÃܪ–r—à‘`Ê zR;†ýá¼×®W\.ÿüã«)  íy R®'ÃíÏ«›Ì«[ß:|Já‹^R™*t^(Þ"pϦ(º‰ôÇË`䨶_±upÅŸ\lz !µeÛ(ì¿,;qÅïý/­v}j é OQ.s"]ÃÕK›Á—¾=ºîê~h[ù/[:ûm=÷_Ox׿#ÿqO|é?3j•“g’pÊÇýüe7‘(TtÜ/ß¿Ú{Û. 1oAeõ÷?±0ž ;ËJ tU¾ðiÃ^O¹—ü³ÿÖ7&D¶Uš.úJÍÄ€‚{Þ¿gîòMüï·‡^ϼë,zàÇ1$HÇ…¡Äý'Ýßh´Ë:í®÷ˆWN3 )í›JS.%ðˆ–Z1eSÓ8´ÒÕ«'Ò²ˆ$`ÄèegG©Èã)é%Êdœtn±ëù¢ZåŒ5"K$¹PQ’u™†hk­¢¡‚Ñsý²Ù%)1Ç6Õ3ërmÔ¼óZ²F1£xƒŒè¢c„ÕAÔ©,©•JILkL: îvHR.­a] ss"(Ó/;Ž!H@av Z•WÀ0•)*ðY²JORµÎ"h Äžª1Qb@E&¤l&À-(UZA2ý@ëOÒ†ÃÇ|WY£Sá- C$¥¹ðJ—`€©W2qWtH̨TBd`@¨²Âƒ)¢áÚÙV‚ÆÍÖû*°Ñ¡l ˜F8w0$D]“œT·#äIÄjïuA¹hjn+Qž¦£·Ó“„Ö);ŘùÔKË+õ8vª™Ôx‘4i;ïDÀcÇ'eâ ˆ  €†Qvlul6ž”¢ ™Ï²‰ñúØjP zcnsâiºÏ:»9 ç²ÚVPÅX¨YâÈu+²›wêã×ÞíŽÁêZ]MUd%ˆh˹xVeŸð¤‡çšº‚‚à3zÐEJ2BFF¯’@&wÚ¥©ÝsÌõ¶§]9%)Ï …&âôy[”Ôútª]s$dÓ Äê˜÷ÿPK;êdŽâí׬YeœÈåøº¥É˽–~¥fŒ†ÈKäq†*¦ Z(Îî®Û©ýÒ°œ©øÐ9ö{—®SZ¢ã9wà-÷Ëâ݇Óy[³˜@”Ä#77ûƲvë!ø Ù8Jÿö=ËA@„„Xaâ„e‘QÈŸ¹jœ˜@A6sÊè·—-ƾYæ>Ÿ÷•’†RrqÉ´ͼ­?îrø¿÷9Áô{Œ¿zÿòÜéSàML„Úoÿ«{âæ™…Wß“°³>¨àÇ5 ´WFH7½Tu>2×~ü›«ç]9—®ø?~Úó×ë Wüœ/}ýâfø¦?†Ç¼¿…"4\8¹ýUGÓkŸf¿ûñåM<ՠЯ¥­oMe¤ùÙ»–·|èŒdR¼ú‹Óï<)ï¡7ÊŠX?ãéË¢ÒÚûßžòfÅ‚ƒ_Ý<èÓy73ÄeLŽ ©ëþdâ(F“Z¢6.¼êVø×ô%‚$äž…h*„r¸ÀŠŠ·s,;õ­” ”Žæÿìä~›L!F"Y‰…ßtÿÞÌ™;ÞÿóTÌbºO¦%°Þ:Ó»m%v¶œcµ,[7ÐGöÄÓ76ÛÎ[BKíúþuÙÑ®¹pxÍU›õÌô¨:t§ÛrrGÈ ‘=|gb„îI]ÜxÑѱ—©õ·î^˜ÜŽ;¦ŒŠÞzÐsê }•„Û=ÝþÌVWóÌ6™ˆ×FÀìY糸©ŸsµÞoÍÉRÈ‹Ù8{èØÜƬnBˆûGå&ÛV2žÃ4=ˆy°½™¶ “<ß8òŠ7n¶!QgÒ•ãÔ]G¬r•³y.úªÊRÓ¬*Ý×8ËÑqˆ4ðblflÀ&DRõ¡:(£¦¬‡(…#««‘vjÑçäž`jUP/(‘Å2»‰ ï­JÚ×’'F‡-U”YHE>qbÀ‚¨!7íPF&ƒ»¨êà• 1·”HM1Zšxª|ÆZg†ƒš8BF$òhã°èÔŽØ´õäx Eªæ­R ¬}"„€K}ãRÈIÁt¾Ð¢B@EBuÝÈ4Ð:£uj[/‰W• ë bTIPLÂD¢kölI)b)ÉE`D¢0¦ÖDÅ|N¹Ž1µŒp/Éu(kQ A$Ñ A‹†´ïò¸òiŠ•íÕƒï³ë;éið¿½bÍÛ[äÙ—= }ø§“ _4½|p¿ôbsçk–쇶Ì<í’ $Í_~Kû¹¯š4ISo?¹þòwÛ‡½¢›OUÃüzô¸Ë•¢†@šŸ~dϾÿ<÷¼%„¶³©Û^tÞÂäƒweï¹Pcǹ¨gþc©Þ l-Ô*Š¿}e'”fãVX¬â~y¡WLú[§×Íj“Í*r“$ã²ØÀØn¸Ëy¯˜±èoMmšÉ)¦Q&­³ªK22<™xB½ì:Sù,F,ª™8uËâZ1Qè“nÕ–M‰G ˜Ôj¥ÍsGj.Ë E±<8ýê–xØÒ¦ A¬åí[3ò&–Jtr{ä§+sÍX¦mÛì']åÀ¾0šì>)”AÍÞσDÚ²)-)¹Ì>ÂßòßÇyä )óàY4¤o¬×µYsýmÙcÏ(hHóWÝê#ãÂ"¡@öÀópÏ/9’ÀÎÇl.QºjÁ'êú÷­†$ÈE‘ÑFL‘(Ÿ~„Lnß2oýÌœñ€tÏçç7p7±á?Þ°¨5º\¹î½óAˆûœ¢Œ?zÕ˜Eiö¾[òG^E‰’@œˆÔZ̧@’MÀ‰”ÍtM°,(G*–]•Q¦’î=Œ-•e#Z  x"dר(¡g<Ø, 1êg, §Ç†!¦0QYÕŽ@ç&†aDEM×t¨Î2bÎúT£R¨ ¥„˜’ªj’\QÌH IC "äP¡ä&¢AlV`j•V:’ ’`A#$ÔE·0É+%…Šu["’£D´(ëI jÐìËzZŒ†Â(ñìO´Ú"5HC¢8"AŠ‘uÃC5‹€˜T£Q¢•„äÔ”‡\Eð,H M%6€’&D”,…@€ºR€€”gÖÔJ%…Lˆ ¨ ‹& …'v¦ÌX›2¤r4­©zÅP„ÅûÚ4e•k,r!+!²ŽÂ!E0,…uÄBo˜Eª:*W‰LUûèc†FHMë¶ÚhI+ >(mh´S—€ PkBŒ !uñ×]ÚP£‹JДÖ|ÉíC›¥½ò?éaŸ5íÇnhk`mï?GþÓWÖ÷û¤m¿þyóãú`Ò܇à ‘üñƒ ‡žUØ•Ø20õŸK«¿}Öhëgv’v/°þ­g»«.oY0ô¦NÏ~Y~Ÿïî‡3+/ÞîyÛöÕ£FIqí“W;B¾ï+¶d8" \jQ.3Ì#ÊØèô»ÿ\K¯y¨yÆ… kïž„Ûk¸èñÓõÇK~nÝb x&ÎãÁÕ&´zÖ´ ÞºL‰ ÛŸ7i.YÇç¿»^úé×uëÂùÏÜV sÞ+†Ø*õçÿ­‡?ÿ÷–öŒ§ö]”âeÒ‚ ¬’ýø6ÿwgë¾î`ºêhÔ§½`)Y†lÔhTsAtö¾–qéç·ñ©;ªüæ>4ô_®—7ž1meàãàëüÃσ™'#ÙÔ1 ¤]= @nG¶¦0fõ‡éÛÂîGfgMsãp~ððQ ¼î4í(éѵnñ†6Ní̶l-ð¬Å k7»I%N`vu3Žvw©§.˜ï[}ʦÔ4¢£·½ síãÒ‘Õ ©˜Ù®dGa¦ûI´AŒlÒ˜a}¥-Oˆ¥ï”z&/VÆa›ï”ÇÛ¸ ŠNâAR¸N¤KLV$!ŒTÃ|«µGüñŠfÊ“(£å­ŽT{´´+£k™Fô1œÐ3ë$T«BŸYÀn&mùÄd+ˆ)÷SBœÑ„…Y@P¼³íÔ”×+NP¤+½±Œ'Õ¦áþ1.§1C3©¤zL HC@(¶¬»»ž,šBÀæ†ò-ëãp4ˆ Dh5Fžv*%#Ñ[Qî—¥ 75¢ „ÀáŽ}­ÍÖãÊX_pBbHAYƒ‘C‡…üò¾aZdœé6÷|e_ˆŒ/ÞtÏ7ï¤u+tðÆ8Ì9jë;öúˆš/–h£†`æžM‰2uAÜûÕ{©gD1$1"@‚võêcåÓÎq7Þåw<º[FÁŠY@Z?úÕïÕ™gÒÔßÈøÏGQ¬ÙþOT°‘’Ðî"B^–Ðßù‰£øÖ‡tŒ†mÏ ãþ˜ïsÙLÕ‹I±ôA­ýéê¼jÓó$…ï|~€f¯Øže1hŸò«x þrùñÞŽMð¨‡A쇕¯\[?ýUÒˆ3ÀŽŽ~r_3Nô°çWźO~(g&¨õŒ…‚­oØ’§`Ê,¯:Ö|þ'áÜ×ìÄ–ÄXç³Bû¯<î”Ð3ž×ÛñöèN †), <¢}Õ¥¡0eßÿ•\ú&½öãô† 察ٳûS ‘&Ï¿òpvžøñ8 ÿnÙõ\I{ÿ<òëâö¾o-J^´Z¤ÿÒã“ :‡¢6É:íÞ½”½¬›s¹.€µ¨¤ &OL™ÏÀRBjcžL´NŠ<‹Ì„ ATT¶ª¤g›„@Ô±íŠè^¥”!ÌJD%1U®É°Ö†$( £Z$ŒË\{A2PNÏ“’„(‚‰F•&S*À©%ÒÊ$Ôå$ƒB1¨N)’5k` ¼%²‰¬‰” „­ËA—½2kh¶Ë:rŒyeK*æƒÖœ@’@¡3“”¨H˜Œ¡ 5@'M—¨<ÐP3e,øU­5ŠM¢²[<ð¦Ú=²JK6jØ PB3•½£˜*(Â(Ó®;+¡H©Š¨ãx rÀ²Õ£‘´Ö2P7Ë´‰ÓA—‘ëbšTR*Ç@)‰QÉl˜`X€w`¤…”a«t©€•èÆÅÈe/rR)†Îl-Q(u °sm³æavcWçbª9Hm¦ ù\Qo÷&‚,é²U0[o4±³s]¡½–š ¦Y3‹;q,È8·ê4ÐÞk¢LØÄØÑ:ÛqL¬lä¥[÷s¿üú½‡Àg£=׬†v¬âF,ìE1cÖz ¹{œù¯ë›ËìN¾¤,Uk’@@E1Á x”éFa´ÖûÑuûÌýÎ(”AÑ>æ™}?YNOÚÕ‹½`‘u›‹jñ!›%è,ú>@@Ó /2Œ#ŸX!DÛ'mY~`ßt¶~´ FãÛ¤¬hš»ó"šüfÏÝ¢>ű°ƒßì‡këˆ|K½³ž~xËv=sßjà²è®_MÄx×Ïzë1qAŽÎÏ‹“Tò6÷iëm·˜ñ ÌlV§ç`ÅÑÌyujù·åÔ6''$MoïÄtsÚ¼¥3^¬¥?§·/ÐmÇ‚(“g”r1«9“–Q ƒUÚC@Ô¬l±‘‹í«ÃÁ’GZ·m¸®c«îL¹¥´>¦U¼k5—Ä4RÅÐÄñ$ùI×Dˆ Vݹ¸97. ×Ã$˜±m;mé£8àVÝë4LC)flK¡×w´bM¡7×[¬¥|=+ ›IªM!„*Ô5$. FM“h k®È%ÒòJ ÁhBNq¨’Æd@‡8Î  œY p x¸^)1gÓJÇ¡YUÚj帎¤ÈÙÚh¢" "g#ƒ§¤'Árʬ“9tÈg &mݬ¬EK“Ñ>¦¨©fcÚ$:Ôó¬$Q>*†Ë‰ ŸCä–Y”wœ×‘“¦‰R™SE…°`‡ɈÈA )ûôžzvNµVd' fu¥^4„"¶"%§”*gt+‰HP‚ÕÉ/}J&òÏ’DèÆ7OD‘Y?ë²Þþ£üyï–¥FßûUã™ÂÕdtÚIrÈžš#|õM-ˆüþzÙñ¥L˜G«w¿ŸSƤ!­{‡äô·¬Å$å›/ìÛ>ŠRðÏ mÖÞñ;ù§—Έ •…û~>¬]ñ~~ö+“—dßúúËËN$š"pòJemda_DЉÊ)ñÄp¢dZÿ6×|ò[Mfyêÿ»™:í“Ã2Ó~"¤3Ëņ2A0>é‘ û/~cEçÉ1£ˆýw74Syõ‰—ÜäECì|ä!jœ+N’Ai¸ð Ò|àòð¯/ÈÀQç-/窛Ðz1B}^bøêÚ ¯Ø€-éç<Åýá?QAúöGÄ2õÑûõÒîûõeÿá›Óÿû}ìM÷„Q@&ç`‘á{¯ã³W=ØÜþ’£sÿuRp™F´¡Õ’Iºã_ ‚’ǽ|îØ§~_?ícýÍS€§¿9a¢ÿ÷÷,M½rg±5ËüäÃwרôÞp¦¹øÃ¢Ï¤$ë]y¼=v%]KîÔ©oWãˆ>ÊÛI-Áè¿õþ¥wìk "Àw}|ãŸZʲ<¢. •ª‡?¸Ãs‰R8‘¨þm'WZo|Î1ý°5 h¸ ä™Iʇ&O’»h<L**-ÊŠ AWcR®iV bÈ|,"8$¥X‡V'ù^ÀI„´"$Pà5±Yo† QKÃL™ˆ(mo³&›1ž‘%’ºA‡:'OiÏ@÷Òà8Ã1aÞéHD#^+ }›»’ü8Å2IP)Q$ƒ^0B›¢.P šAÀ•K$Qb' £±°8F´±ˆvr¯:…é"i U kFÈs ^ƒFŽ™ëiPM”GEQ•¹¡&›B„v´@¡;œ%Ò6Eò€< £k¯…C®¶…•áD'Æ@ª;Õ’a@'B3Á¤:º±÷â­íE4Ͷj…à‰•†J‘ –”Åja0N+£Þ`~%%ÃÌ8=D=ªf4§Ÿl¯Ý7æQ°†ƒÕ)„*k〕:ë¿=|êœÕj k'\„|)‚ bN=3åºCån¼Ý aêΟ‰gë^E³9mçðÀµk1Ýv§>û!êúß,«¿pa ( Üñ»xÑ%³Gþ´Ê"0þˆ€8¨œ!–4¶>s &BAÑÝKvåäX='ä:gjó¤Pƒ'…™œ¹=œ« Ñ¢‰×Þ©²d²Àøàõ¹°2ª›‚ÑÀhéèá»l[O'ÿ…;÷™u÷küœØÝëqéÐꯇOžæ# ‰š™©‹¦ÛÞ¡¥ÍgƒB Ë{ë‹“×êQ¬Æeoû´f›–ÝÓ0 šZÛgÊT#ˆ¸ÒC\XMµk6.wÖ,‚xhÃÿÇ^ÀmzãöÌœvÉ-­ïf7ž A Ü­8”*P …â$@‹-îJ ÅŠ»$HñlÖíñ[.;eæãýÿ¾ã(Ûz²¶Z'ngw€•ÄtÃìà«%8ajŽ®ùÕ*(j1W½“ú+k—.µ«S Œ½MÜó.ô‡ýI#pˆËÊN—ƒÑi¥™ö†GDTb”@Uë¥ ´±‡Å¬×y (, (-Ö]oSpë_m¤›@* Ê*M“®Ö¬ £±K9€EŠ"±c?dpXBŒàŠ>&uífAÆäG¤˜ObÈ‚0¸˜"§hḴ˜Ž É êj` m3¥Pê©n“ØA>Ì@P”L%™U FC+vËBk NÎó¤kU1×&d`DÎM©˜ˆ)†‰2)hL¦‘Ùáqã4P ÞÆŽDÙ!bF µñ‰u§Mã²(Â$€‚jh’b¤× Êc1Ø0,RD€ ’éX„ÓJ˜÷عN<‚"!IÉ¥7z/¦E0It²”7õ9oç¤ÑVƒ‰«W]X4¹q¨cñ¯}DVÅâä+Žã~”®Ý¯·_yBóùïÔQää7ìŒ_ÿî± ^Ÿi3ã¦Qý™§£Êm¹â ¢´c¤N̦(ZÆþë݃þ> ß¾¶ºiš~÷ê¬÷˜'ð}Üú¡/šf9?êÁ=A• ïù€í×}kLàÃo~<%,ª¤ñQ—Ì`ÐÒ _}|xÆó7$Pé–¯ŽÍ v4¿ý¡Ž´ûû–‰Êé/o9ÄeØúÜ•¹“òИ¹ÿpóöÆÈÊ÷?Qi@È’~QMw<}Þ)‹MÇI€[h×&¡mz)²ÛûÛU÷ÈPI@§œÑ=¸—ÏötN~Y¶å}&ã•Û½œ´µ¿‘?âöê=®laÃ=zf…P&舦œ0¡9zïž&`¤ [d×R}ç®^Çë­;¡=Øtk]šs±« þX„2» ÅÅúîCµÏûyt eOØU¸ÆÒmÖ>J¤´€"¡ê´! =†¦ó:vˆJ:n]f¨¼'-ù¸ñ ”oî¹6¶»2´‰Xwºåq$RÖÎmËRHˆNG¬|c˜ŠHšÛ°¦ÑÄÈ¢–'¡Ë\àf-E ¥gûÊc1b£U77 ´\'=VSD´QªJVF*Ö«°ZI•¦nÃèÐb¿˜ÅåË1µ`ÑPš„µ|vàgÇÀaýŽƒA^/ 7qgîÀŸºº¾ãò·xhìvGàÎ|¶˜;ºåÂdcuøwë´´²‹Óà~ce“D¥@?¹áÏÝÖ‘¬÷úJ–G2óÜó8Ïú¿ùÁ²gRgu³µª{îã6~QI›ä¶¯¥„œm=¿¤¬n,À±ãxàÑý‚'xÇwWž¼Ißøý©0 €€PíáøÇoõ t¯wnrÈͦ²]øëS³¦îÏï;žâ´õÌ(|Ýp×¥9–‘µFJH¦M©Ræ¶ùí;ªü¼ €ú«§f}SZªÿüö£ÛwžîõÀð‡×›}ÝùêCh%ÉÒ;AÁ¶OíN5 0@×cf ,SX~ÙŸ80‚ûæËšï<}rÁ•³ÝUW„çüÓìÕ¯9Úù·wWVûþõîÍ8±èkÞÿâ»Ûh””ŒQð™/ÎZ-e™2_«#Ϻ½üÐý{N„Ðk@øÿ„ª C$m˜\«H ÄÊ”r¸(-ŠéÖÒ°P ±`ae8ôNkÈ•p¢äÉæ@t/Ì Å"a.1“(RëÐvk‘2œ•-•"f¡îæSTLµËuß*-ízAÚfCÅ$ltBÛk!g,È(‘Aû(F˜„ZŠ…FN! (JÉh£3ˆÉ%Ñ*dŠ$*±ê:­E3ÏDAaFNV¢(§'Ó–‰yäüÖ¢Á‚Ñ3‹JÂÑfÇ­2¬(G©´àe'%ôm‘bDb£µê´ŽbÂD˜ƒŽ.-sTBÊʶÈG X8f6b© ¥D$&ŽFãtŒ" ⲯ; Wp Êœ4“e“ ¶ )Œ"!®]̰g5(å…[íò©¹Jˆ°¯L4Vò¨bhÛÞòëÿ\¯v0•læ½ýß§{Ÿ«o¹¤´Š Ã9pý³–·~d§Á¿öÉõ¹÷œ!›-0ðtœÕyèD‘„Yš€b$€Æwõ$x¹åè^{ïÂ%$•XPЉïëŽýéÙþϘ7*¡°” Ç+àöË?T½x³ÂzÝ(Š MKøø‹WoøæJÓJ¯'òç+ú&i¼m)Æ6éy«¢WhL\×pó·3Ï>±÷äÓŽ;“Ž|ùfºf$×¼9Ëp¹ZÊÕþÉX1 c¬£âÜ?Þºoæ7­FÕrv¡ŸûéjL«Bbzð†VXíÚ¤0÷úÌ'.g¿ü)Î?­k­Z¿f5ž°ÛÞkƒš}äiõ:óy*)Ðz"¼øƒ~~ùlÔf°ªáó)-\rxoöÝéë_ìÉÎÛzVô‰ƒÙõqt=Gš{lTG#:ûKE§›(8¸7Jœo²Ò(:ˆå†óK»•¦»ƒnR86&AÔYË«óä {Ô±ö†­ÚíXN(‘Çf œÂR1ŸÖäµ@u$rÌS x¬Å¸Ø3 ÝѶLŒTjܲsÇaèTJ‘((N0X³NõG$ P ‚r]×tx,YÈ¡±V{¡ù-)N±ÍZp ±¢:0 *fib˜•'4^AÒ¦^Ä%Œ†z½¬«èfI‹qn´\G@âf`g8ó'ݬ×ÑO¸Q€`'º?¨TªŽLšNºžR¶C'"À$,BHÈ 1`¿O¢ø»É­ey€˜÷‘1x¥·Ó¶_ÞÑmyܬF Ñ4^ (L†¹O9!‘€âèN8Á¼FI8œ\KÀ X¶ÓÆ­)bÜûãµÞÃwÑ)'ÙÌuþg7Å °ô#3÷¨32&ÑZ+¤V;A@jÛ”˜³KîÑ~ícë! «È»O wÜ=mÐGåS©õàÀmÚæ‚3º»_·'½ä¯ËhåèÁ5zèÓçzqT¦mÅAƒ}¿l=£ïZeÏxµ°$åMÿE#©Oï÷ËïÓóÚuG3o<½ºêšð˜+ÜÒ«osoy„î*a¶òàûGO| òN…š3‰mg â Û“ÞZzã~xæ;3áªù_N  ŠÔ{þ“TfÙîRJ:cY}ÇïÛ‡½y>]q0AË&Û¦í£ïQÍÍùj½K_ÿÅ`å(!¾íes}&\9—? ö¯žcÏx×!ví,úUÝâûoö«ë}ãJ¬lζ¿þxw±ˆã¿pþ£ÛŸRj.[•+3Š6Ϙ*)ñÍ#UÓ’#åeÙï|§ô*¥j3íš‚@9ëÚ:o˜É*g‘14­Ny3Ò¬b5ȇ”E/ƒÊå­ Y9SY]ôH[«Pkf;ÈלÅÅDÕUXM$ŒÈB ¹A†…k£‰€"¢ŒoTÞ@4&ÐXhëˆ#Cˆ$c4iš„s)ƒ­E÷ú½ÄµÖ0‚(hD´° 7›Uwׯ#abcP|’ŽQc2Ĉ$Á í"—‘“©u¦Œ6‚ ´2®qsÁXP¹B¼£8BÅ@:CÑ5Ó¡R.¤ZeÐäNõó€PÎj5Ü0 åºLúµCÈ®<ˆ*OÚPnlƒ½PfF VJÅ'S1(ö·®p¥,¦1u vH®³®Ad’ù:zÀ$=”}€™Ì923ð΋›_Ðm{|5d1:ˆE“¤’C'„'~ê sÛ¢×::Ó½ M;# u{öh¬1ëÓv'Û "=ŸËê463>:Òè‰z ér (ÁëD(¬@§bû³Í} «PAÒú²]•¥tæ6“²Äh)$=xÖíÓÇ÷ýÎç¶ëß\ ?Ø_žyiYˆ‡žÛqKz»Ðe½Õ¨ºf§‚ÈöàOŽå3>éÍ…} Gî )u÷)E"ä²{¼öã=r£`ò‡¥ö·S#Œ,BÂBöä4 T_0áž+ãµµ¾¿òJ˜]·íÌa£©;Í8]‡ìŒ»&»sau:œ;{Љé0Á)ÎÛ¸ñô&¥¸k3Å ºTâ÷ÚXžQù¨IB" »gHŸxòZ—ôܼƒÑúÚþ.ùý½|Èš™M‘@à™„ñ¤Úh qþ”^DoÈÁ‡0è|;©Æ%.·“Ál{&×ë- 5O¦d t‰AµèˆëqM)mzPTënŽAu‘2?ž¦Qd”Õ=WDRÚ¦FÄTÚÄ”3››$•÷¤/%ë -È:…Ñ’t“œ|„Ä1@\v£uÖMj<àÎ%Ÿu¾ã*XbÊ[²¾ö˜«ÖWN“& u$àñÀ¨Á³JxNР0ŠbB×"ˆ &&¥ˆËÄpíZ°N"äA‰©&”HuVB2ÖaB`à (Šh«ž'Š5¶š‹²¿ä'áE½(r6%m©kÝè¥?ñBî¡W LP$À50ÀH)¶H‚Êöã”нîIý¼lu¸D§˜“BMiï n)ßu¿M­H;•ID!cÓ&÷7-z`FRI@ïýÞ“MËÙ$ ,ÖSKê¯:þí©ŒÞhÍNG†}aïzñÍþ_ž; n•áNEe'©BOXæˆUû‡ÝÏ¨í Ÿauã@ArèPuQ|4ÐÃñ?™Æˆ(Ý7D•`L)i „¦PÕÛ¿SGâ#É”_'Í3±2izå¯3Hö±Ækß¾÷¼×moÿy|þßÎßñú»ýÛŽ?|×Ò)ï;¥dÍ‘ºýÿ|Sç€(ñÆ·ž-_ü|wîU[°dM)y÷¿èŽÔ%U¾àE=E J¦ÉS#Z¥b<Š7½~ßà÷¬UÍp 5›yÅkÚ,ò‹]‚Â1ŠheÔ +Aìeªªeë§wçR“§p|’6mn®ÿ÷»†/?1o×ÛiÐ@LŠ%¯|Ø>r2ß¾æ7¤ öQ»¢À€·¼mIß\á…ÿ´1ÅŠ ¥žáÈã˜ÉqÏÞ çi4N(YÉr{íÁÑ¥çùÕ/]Wþã©=±ÝäCûøE÷Ò8µ6Ð$m˜ìˆ´É­ˆõ ÀÉ•YLÑI-Fë6kÙF§Y|,:!aoÄ`RÊ!¹ŠÄ¨h…*¢Š]‡ˆ*²¦X’IPÖ°FuJ èD9äÊŽ­ŒšØ€T˜é†1$¥Ø&AA¿`@ôcår«)zW4ÆRÞ?F¡ƒ¬C@Ö&I!]GN2ßå€gÝŸÉºÜ ÛžtQé bÒÈŠR(TeHgVëA&^ë¢q Tì'-ŠŽM6!‰Þ³OŒŒënšu3Q”KDRL£@1FcÈMŽmdAòÀOÝÁõÀ™†í6j²x¼’&šqÛykt›$5\JcðYOź•€x§Ð+h“PB⳺Ò.Æ`:J•âylû]Oˆ@¤7$¹®Ÿ{ f6Tºå¥n@„€X×5 p Öc¬šÙ`Rh&{–}±½¬ Šx¼EfŸ5ŠãRµ´o§99Â>?ÐÓ•±,uJF„UÂŽ&H5aa;°MÇèú~rŠŽØ!£Ó‚L¼ã«Çq×y*1sh¥P|qù¥‹_úßQBÌ.Þh¤`("‘±G—¢‰Š¹ƒµ\z[O*Ó ²º÷‰²xçHêH]ÑÆ@h[aã§Fź„McÓO-€;vÏš¤Qîzóž„ms/<me¼r€n~úÙƒ±øû &FñƒK ¼2vZXðÿOzæóG_sG|Çúï}|éÔóôýÏu~1PF">0¥L'þÎ××uäüàp1Zñêÿ®§¾¤ê÷ugÕtÿÿ<Üç¡®¨Ög´\²©3_>¼ðÒSU²f²ño—¢(ZýïÃîQ æ^V¢•ÄM£bP<´`°ûÎúüûõ»k–*•|ÊMïóaßÇýcB×Pj¦×® n8w£òQ’D*”>pž{¢¶àUM0zëÙ£M§9:þçq†ÎEÛO’ñíÓèRÍ玲p˜$ ÏšÓGïnæÎ·ºă ÷ù¨ÃÌ^—ï*<Ú:9ˆ»ÐùÚxqäqË<,w1A¶¢ñÒÛFʲÇT—›Ff³²©. @#@Rìu0[j0hc”¤±Ér*‡Øµ %QÑZ:)Is_ƒ¸Š•MS+Á$ÝP ·vÍÀš2qÆÐö3*‰™2(³uK@™EpºZ+Täa2– BzÓ €9fÑ¢€LýJ˜Ù9äTå‘ ’Ö€ÍTŒmÛNßÂÁ+x|ÝÄÅå¹õ-áÎåîàt¶í]ׂ(V‹ûÆ é°ÐâíKØÄ¨ƒî﹟G]& RL 1š’87“b0Ú$e°Œ&ÐpöhÒÐH"+Z±š&R¢SЉE£á“Hô`³R¢À_`h§¾€à%/:­tªz¡Ê9ùΟif"rLèò# Eà¶ëbHžÛ‰/cB“±r)!´j@N±èD  0‹UbÏè€ø«Y¥w<Ê~ëÊÕÝÝ¡Tè¿îE•ÒCÛ}ê ãKߺmá!YÓ‡6ó`|øå«¼ÎòÁÿ0}õ–é¿^ ¯~böí+ß}bý•¬±’þ/ë¼ÍS%¼ô¯×7„qîÝ'êNu.à±÷ÞîÞqß2%j ˆ€Ø 'üåKÜöž“Û/üb߃?g9^è˜ÒÊU?é0u Q½ãí·>·|öÛ‡Q'˜ŸAO>ò_¸6âkaÓM•Zx÷´ÛÑOw|øpUæÀ(ôO'–~”N1tσÝVÌ>z,>ùov¬þ–êö»ÆÕÍß¼™®¸púíuÇFaòm#éô7µù=òîÛ?]}àÓRó™;'éï]JÍûð÷Õû¾²:Mâ²4=ïÙ—$›*9ýeë¼_Á[ï¬ÔÓ΋×ýx¼õñ³ø“ëýïÞ5³í óþÀõû~w³Gl33I;Ÿ¸¹%Š¿ûÓR||=»Ãáµß]ÛõìùéÕ{ê®ïoò‘£ð»ëoor=õ½nãå b‹6Ûù„ãä=Ýëíþ»:Êì£ÎNŸþš?ñá 6ßÿ¯îŒwnPÃèýßíÎGÍ.}ò–:2 ³F@${×ÛtŒ(¬vÝc®e´3ÏÇ‚?xÇRðÒ{Þ…öû{}óY’ÀpÃ4÷‘ üÛ-ùŽéÙU7ÿÛ‘ ½âälšô–xV÷™Wy@~d^}óc~÷œà¤UËì'/½ó:ÿƒ_ÑŽ+O‚VlnSÑz‚{¼tVõ»Ýz%–ªö#?JO1«Žâ‡äúžlïÛUdüyWrÏEI ¡Ó¡FzðóóYßùë>0¹ÿ;Uõš}ã«f ãvë¿íŽÉeÀ°ú–ôk/Ë(Ò‘Xë˜4GY¯d0Œ¶ãPŽpÓ†f4ˆkë5eÑÖÓj&gÃY„ÐÚ¹B uU#-kC(kº“ºQÓT‘&M%]Rœ_kßÌÍ$6¬‡ èQ+TÖÍ$Bò`Û6j—{fÒ°6 #€(R}äÎÄ6ïdÊmÊ#ghíÍÎþ86HŒ^‘&²·-HkÖ=è°«bbˆ¢S»¾I¨DD!:¬†sÇPI6Ì‚ŒÌI»Ž¥]YïLê"±}gká^J]5Ä’”#{Žm¦E$1%£T“wL­bÅ¥ïSP 3zFi*œÉ6‰y:²Xµ z2 Éw¹°çÂùÔÛ’¢²B…Ê•Ü12Iî@¹v4iR„f ¨BDtaûÔÅ®S¡‹ ‰ç³“7Öm€ŽpÒ¹I¨ªŒàzóªó zyê3MɹµAÓD8mMF]SyÊz톬ӛ¶ Ú󔎛 ÁÖÃ&eõfBîíÖ‹‡cÕŠÐâHÖÅÕV£ãìçeîø>Ÿ´¨f§ëB'¹ñë ŸW"ãä¿nèÎ?Ó.n;È7¡–ź^Ϭ„ê¦;`ïý‘E%­@4´¾vI^ö˜.z˱võ ÙS³hƒàÇ?Z;ÿoœ|ö:¿éÕ¾ÔÔ !6ë—½X9Žñû?œ?–ÜîaH(}uêpâMoš¤ÑÇ¿ß\]ãiÏÔáÖ_™È=Ÿ0'˜eÀIÜbNÌ!ÜòÍz²È©íêö×Öï˜2 ì¾ÌØ]vu" ‚ÌADI0•N{®^ÙùÈžÉY¨w_gÏ„ÎAJÔ-×Â…çôçv°¾ýnœ9·{rmuCýªçªÄçf‡wì®.Ú¾…m(n¿m­ çlÖ“ƒÓ½+‘YÔüIöþs–µÆ–]Fùê]‡áæ6%xƒ í5U¼Sñt}iõúšÇZ˜n:£1Y;:˜ PgΚ›Soè6¯N'Ôï²5ïÚ@,lçs›K´ÛiÞÓÆ7Â:"uQ¡.³]xÜÇÛ¨µ|ŒWÍb “i»ÖsC¨ºIG¢J½ ZTÜ|'Ali†õâtlt¿dË&" Lº7W AÓ 2Bb¥D§Ój¬JBj¤Š9Gzâœ`ŒÓ`uJ“µcy¡U­sÓ®¬@Ua;—éÔðxR ’%ÚJ#(§Zg’  ’%¦¸>*Q4cDŠcÔc(( Ù¹¾I.‚ ÍÔDAÃ(€¬ Á²Žd•Ô¢ v(tŠZ˜(Köè-GéÏ÷î%Có—ÅêŠ_¶APiÂàW~þéÚãT{ý/â‹2sÍǧ$ €†«ecÂú~Út‹G>ÈL ]ûÃê}ˆŸÿÜ„£Ä_ à–/ø×ý0Óô2Ó m8=¯N|îN—ÀÂï¾<Ìb õÃ[õ^PîñüҞɅÀG@ѱO Õü¸ºçŠP'’]/;Õ¸‘ÁäÐ|åÛñ±§ÍžðO±}÷~xÈ‹‡«o¼¹I‰o¿B'ÍêÅg©¾Ä'<Ë zˆÑ,}ù3mbØþ±íüí-ÅN@žüœÂ΂sByæ\;|ø§µQÚ¹fA™{ÛÙ rN“W\c‚ßß {W¯"47¾ó€AeÍiï Å÷þ´yÞ³òÛßt§çö?æá̹õsÞ\s£.c…³: GÞTŒÏyóÂè·¥¿ûz¦ µ÷57¥§µÌúå‘+®®Ÿüý¤æ²ÉÖ›³:õm;†3C^ô…vúÆk»§¿TÝvÅÑÈ,jÛ‡vSÒLQPL®îùY5AIßüÌ"0Rëð“xé{2Ó$ÿµ'…‹Þ¼ÁªaJðÿ˜™œBâÏVóWGOº<¬|üÆâ-¯ŠÞëþöL àíïڇǃùçûÏÜöú#Õkž!3^Ê9^ñÒõ­jÓ¾úoí)oÑéKÿJeêw_]=ýo­˜8°NjýS¿¡kàd´¦ ŸíÊ;JMî_ê饯]î´Rðÿ‰Aiņ¡C2œõ=ü?*i°„¤ª§ k1  ŠfBA&è2ðÜ#N€D€µ´ $ãŒàp¢Œª„ISC “N Ì TR%Zª(F‘ÀÁ&„0ɵr ã5k µ^ tO2„iLhÐ×Àmѯû* üE’ˆb=¡!`¤ fryl´€`‚v2±ÇŽQ9ËóÔ¹éQ  ¥LG•€Ydà„AÀZõZ Ä1Æ„Œ‰#™"†<A¨k ö€P«iÛ1“@"“ìÄ+ßø®ž)UB] ·mdAITw {sµÄ@Ö¤Ä1ê^®y­^«D§¤6†$¨¤ì—:v” —ûB R¶}ã6J Æ˜¸ºI Œ¾0N÷Z½Vj¤$4BœÚˆ#`¦d.×b0Ø$Åë|¶W¥ `Ã1+XÌ–Îѵ!Šàëå=Kž‘fN(ÜuÜd§;ò©´Qæf‰¥*0ušaRa~Â\<óg•r¼ò³;ãÞI)"F#¶ Ž}÷¶À)‰€pöÃ3(±u fJÏ?R0³$ÞfR°€¦Ûù·V!²Â]·4ò"u×#Aĸ{ô rïaP$(¢Î8©QÎ8Ä_]K¦Ã­‡Ãîªé'Ë­yò³2má'ž.Ú\âýê?N¿z‚h¥Û{O7_ËÅÃ$Y<ý²ÕîÆ)!¦ùb91"úépf÷ŒœùÀ•ƒñRj”£¿Ÿ3¬Ö÷ú¬pEÀ):t¤»} àÏ<=ɨîðäèþD&›ß±éè:˜­½¨‚Ÿ!³¸Ê¨’¢L;!Ô›zìÑhÚ€]9Gݦn›Š˜«laSéWA#($Al¿›ã¡nLÏô‡"ÓPOò ]»0èUËÕzÓ²*‡š(‰02¡UÆYZl¯ £¶\°-¨kP@aDZѹ){–§a­s¦˜6³™[3y“ÒŠž# ‘}ÛnLÚ!Ôãе¬¹…ÚJ+ öêuÕ–X^_çÜ€’;a@ѽµEr’RL& [©"%hÀ ¬EÄÌ*‹‡C6ø x¥4F´VSŠ*´jÚr‚aî‚Gðsjêª:¶ŽT›±šDK„‚¢TÇ"ˆu;Nš°(­YT<ì%F¤Û¦V”4`NÞ`_R #rP bРÐÍ>+i¤¤;ןÉŴг,ÙjÔ‡¨µZÅÄ”0ÿ‡ûsk;6òÐ7¿üS£)úÿþÖÔñÿó¿ý7>¥0ÞÓr,"³ðWqñª¥úÖÛ5»4{ÅîìGï˜n>#WÁÁ½Ïœîym£,È0ƒüê{ÊGfÔCî;ýßO„r“­“–ëo4ˆIB„ž&fBÊ€«|¯ë­!Èß>™{sñϯ=ÚÖŒ3¢·½¢­ÞÿÓæÁ/Ü(Ƈ¦ %AȉØ,ºâo3ýý‡—UìÈ0þE¯Î5ÈÂË›4ï0(¶÷LýÍÖEþ†uäéÛLþ¦û¶¨ÛÀ H|ÿçÍèݺýÀïF÷x•s1Ái&üþƒ«í*c¯«¦È$Iäœçå=õ”2µ÷ÍÖ¼ô‚xÍWŸõŠ|úC&ßþÉHK+NÇ›_]lzfÎÕxè#wÍN±IÖ/H > ™@Vø4»1ð´c€€È!­/ï°éYD:&I±€0BB[GHܼ™V•ˆÑG(,’@3xaÕлºéá`ãÁÚŠ€bT’4kà†ýºL±H‚ŒÂv¶°‚Ý5DïHÕÐAN›­€¬H¿Æ¬­0! ÍœµQ¡ö×õ®9 ¦sšÆûŽ{Ñ:é<‘wÜwÖ¹ {Ç7P¾Ú©ý7,õXÙ][ýÞßTNe¸TS·Ç›Î1™™üñ—GOxé.×o«õǨü^ÆÿøIÛ<ÝÄþ‚&×Ñæµà¼Â}?^ê¢xÛWDÇ~{„øììæWé=þÄ  ¡ü(^jMë&G;ÔŒ*/ù´]éÆk*xÒcãMo¹Ë#`b8ô9Úué‚'P»_ºÓ(®Ï>' ù£/¿­K'~d×ñ7^ŸvÚÓHúØÏšXºYv'¿‰S‰í—?»&( ÕEÜÚLÁüí³zÕáôúwÍ“u½×Š ø»^~4FÁLÉzGå•çó×þ±ÙùŸó¤ºô¥Ç…MßÌÁæÜåáàóöë=^)è2dí‰È[pIuã½…%•Ù3è__¿ÝGŒ!ãvyEœÇ°†º°)¶ÓÄV÷t™J)}J  ”ä¹VΆ¶šDé`Óñ‰*AÄNP/ÙQÇBDˆÈ¤¸:Ò«ž´×F…È‚b7il1×·86eDð»)2­ Nì…tncYre;DãƒF ]Q´¯UÏ•–$„ÜZžR­˜ŒÓ…Å–'Q Ê@‡ÀØêŒfˆcEJMd©Õ“^¢pLj 01‘R™Òæ{׫o‡ âŸÞvW'2üÐùù"í ëÚ$—¾l>ƒªìYЉ¿äÖAþêUýÉ¿\oÿõ¥=ŸwÞvÛô•ˆm͵ê FV²þê<¯§I¸yÝy2Óµ_úÚÊ£¿ÚÌœŒ3W.N,UÑkïýCm‡RG1Ï|X¹aNͼìyKéè¿/{ÕègþUyö‡›ú×I^(è"U1¤ƒŸÞ»ö²Ëò3ß7ÝóéƒéãÿÝ=à¥[9~ÿ×ÇÜË ·á ÷”?z‘‰‘USÊ´·  “,¿}owÑ›£þÚx|ê‹u®ÊcŸÞ'M@C“æ]¨ÎÛ`UÿùçL/,ÝÚWîr;¯,{ yjqÿ<&xÄyN…>2>w¬7¶§ÎÎ/ìé®:º"¨”&€ŒqžFËÚ8Wdpgœ;ÅFŸºÁ,hRº]Ÿ&Qa4ÞW7Mov§ª™&U» }ŽJæ)‚³zF·kÜ/Ö&cæ®e›²xÊ̤Ÿç,ªÕ̽¾sÛ "&§‰‰@I"©£•¦" :3€½Y«RX«[ ™-€.Ïë…\(KêÐáQ#€ËÊh§l«)ˆÉ7m!±‰5´Údn@pä¹]™bc_'Ì6ïN€¬ë¢³ TF(m»†Bd7n/ÎèM LuË¡ªž "nûŸXˆyn×Í­ˆ(£aËióÆg7ÇVŠ'݃r›Ú½GÝ«×eíÏ?·¢/?§~çÓ6ø~âp,ü÷~/ÿëÙ,W —Þ·ûæÝÇSÒò†‰•…iÅLHЩvÖÖǾ¢v¾ãÄ"q³ïè]ºT†v>5}ãÛßþŽN?oÐÚS5n}9wóv7¿òô¢#æiñʽæ•ÏÔ& fä?¿U]ðÚÙ¼§'B {¾z&Ë A6t:¢ûʧüïŸßørðŸøjƒ)ëfÚÜBNæÙO­~ñ®Øë©éóï¬s…îòg¿~Á%5úâ×jf{yË©tç~lyýÛ/ZiÀÌ~°gŒ*^vªÝ]f[߸ÔüïŸùðÀ!õj~ø–•mÛDD•‚õÖ+Â=,$ ”P{%B€Š%•}˜YˆÀ,(è{QÆ”X¯¨žõ¤ÔÑ&ëQ¡Ñ)oÂÄÆN(À¹7MÑL)· HÚi£^ã$€º MäT+žJ{0”ºm„ToÈ‹8×HQEdE$8 :BRE+IÅd”ƒ]ƒÖ8g[år 4Ši„ÆzrÝtš50õœ”¡¡æ¼,)UQ€¶mJ+“º^ ">–Ì®ž’F€&UÂd*¹,M²R£’#O$Ô¡”@$råjÈÓ´Clo,!ê@ʨ[#S)ºHlŒJ¹†Ø &Ô©g­U¨½N ³}d໢Ëa˜ô!öHxÔ‘êN¡Ä .TI{»–Tˆå<¥Öe{ÓZ‘’ $˜ªõM³#r@F®æáF,Yå L&žc¯ Q˜ÂºjÛq±¦K‘E éÁ¼ÖÁZàÑru­Zß6ÍšÝ܆“Š,ûòÍJaÒ¹Bßß¾uÚ¬¶ë£°œh-ƒí[…cïô¾/ V€È1ª™™sÇ8jŽèÄìgæŸ_ĘŠSv½ó–À€™rN,©Kƒù~Ãîüó• ”Š´@ø ìîñO“õ 9¡ôT<íþ]ñ…0u©»ük(Þ~s%{Ñ FB´LHF“ÉsF@-ÐW@í0È:a²ü»ë×´+–öø Ê"!Öý¥_ÞQ<úÁk?¸£Ùõ€bÇm¿ Çl©°õ, "*òJÅVš)ÈMVgSˇ~5žÄ}Y¾|á,õ,ÒŒM¨UsÇMÁX}{ÝÊöé|çê?ñæ\‘õW"žÝ“«2‡¤%Æ»G‡¶ÂÌç–)>\Ïížn<´¯¿k£Á6r#8·ÐËîH”Ÿ<ˆ¤J' ˆËÛ2;tLa82‘¸xh\nw0»-£ý~HÀÑ‚íÏ`pŒ©ª „4@±!ef•燱·™õ\J„:Wlœ4#HZáp®î¦åCW-wš™öˆé Š®ï§“Öö2Õ4¥Ã"äM=Þ#實9 ©,µ™a‚ s³&H;T*F„œ¯¹?·œ•\%%ÊlTnƒè˜£#!!§*Ó+;€Êƨ«IK_e &‹ Àq’‡.k]çºF)ˆ”« njº‚‡Y—‰¤ÀsC$¥±Àv½€ $šô͉‰«s¬8‚&HšŒé $-6om[Dj¬•,“ЭVËâMެPÌöµÄ”]vy)l~üŽƒøÀ ¢PµÐÊ‚‰W“61 WÁa ’†Í±Š¹êeŠë|c @ ŠEYB’þì}£á'OÝòòE/˜=ô²»íŽržUç‘“°BÖ¢s$¨tHÐ6}…@ð{¯çÍ÷þ0н46(UAKý±ï× €IìKãÈùß½á¼þÁƒ?¿ö˜¼ùÕÚ¦g¤¼î~óŽý'¼÷DÐ Tûþõ~ñ‡èæ·íÛùþYe’ámWž§¿÷²¥$²éZtBXGÓw[ßÕ´ïûþ‹_¥è±oÉ6¼/Ľ{ È€ ÔÃ_3ë3„Q픵E¡^~¿ªzíµò÷׿Ïy]Ö×ë+ Ð½×ù•||9ö_ÿ¯í÷ÿfõ´?+~äóÍ=ß²iÿ{åUOËuI½ÿMûà ¿æ²™°ç-×µ/øJ© ëÂ×>6:é][¦ï¿ÖÿÃßfw¿â®oÞ‘J‰@üèÖèÍì‡Ï,ÕZ ­•õœŸö±ºýîSÇ ÜÿÀEeÁ"$%rL†¶¾iS®Ñ|ùíÿ~Bl#x?í'ÊÿzNQ€£N— U±k6“à?{ïoüñ×”øÐe[gÜDzÍFQ Î¯uXB29BI1 Ÿc°…p˜àæP¦d;iG&T\…è ‚4ùb?È%J ™Œ`°Ð&åyþB2˜L‘Û ú:¯› BHJ•¸.ÓådeL@±6rLÝ•uFèÖX@žµF7¬¡MVÈjU¯ÈûÅü +ÅuCåQ%T@ dÀuY㑱ŠI¤9ª§§"jfHh¥;aPÍÀQšÀ,¨”‰Î/AJh¢ô,iÉROQÕ[¯,¸ ( HÑkK‰&%U@7TYݰ$¤E“À‰èº”^¾Æ1I„¤%‹é!ê((“± ÎeCv¾gÚÉ8*\—RŽ×Ä`?00ìj¸ó\Eê—¹I‘0Ú™¹µØ²êÑ¿<µ)§hª8W¸q~z¤Jb3nü Ÿå€!mG-0æm›YBÅ‚É ¶…ÕCÇB`’ÐU5‘ ‚ê‰Ñý'äØÑâÁ#G¡²7„b!;ŠÉõ‚‡@}rÓ»~?âügU<ë%euÖ¨æ¸G1¾¤Ìo,Ç”Åf1`OB›E ýÚlæ²!ITÑä(øÿ˜T­QšX B°à÷ÿÏyÚ…ªˆQsluÛjûxe+Ž'êtàúxëÈã·ÿT[ŽjŒRYDUnÛ½>3Ô°v°œ£Õ•*J)&Õ·%+·Í°‰½ùÝkÑÞä¶n}úp]^ìÌ—<ƒKÝΓ&‡=oØLåÖzbÅÅÙnCatR¶T0Ýoamë¼ïx¡P}Q¾’ àu ©ØPÖ£¤…†˜fE¬_=²œ ÖS„(ºIXcg#v‹ªè£F6}$©q;‚÷0ãF1©nl‹R“š`³¡?[ôÍܤ”¶x®|Æ L–§r I¡P±™ÆÉȧQ*y=2…ÐÍõDw¤c SBÉœIe쇱.CÈAR;­“ƈ@Y2e±]tNOÖÇ(36kt8Öæ9u0âÚuÐ?ÎZEëµ¥QT^ƒIµ RbMÒ`Ú¢IÁö‰4Z¨ÂhT‹笂`œäºë( âµÊG5i4™Y%Ð*? ¤‚F PUÒ‰Au!ሹÀ ¢fLè ©#ÿ¹"çg€¬ˆ–ÿúuzæß–²jÁ®ý××±eùº)æ7Ï\ûÞõâêÌ•ø¸îàÝK(¿í?–{çm¡Ba.PgÎ "ôŸ~ß2@Ô¨%ìxfÛ-tR§TÄ.D!Lé—ï^ÛùæÍáß–ÒeÏŸwÇŸþåô±¯*ó¹À Q&&²CyàY2Ø Õû~S?èÕƒÄ"ÐZH!v¤"È)/Ý<7PawÆ›Gínèžð×[NÝJ÷ù?Ň¿ØÚÜûÖöÈÇÖ8>üo²Í¯Y_ýÅÛ¦g½Š9¨Á±AZ{o_?â­:4©¿+â;'Já_„ŒϺÜÿà›•ùÇ3œOOí™ñço^¾ä²™èš,ðô®ëDØkööÔ×,ÿôÓ§^2 NX±Ÿ~ívõÒÓº ^2©~¼Ò O3O—Ó7J¸úš•ÍÏ:|Ö¼Ô÷/׿þ7?’Ð-¶<ïV¾8Yðm6 À£>RšþþîÑ5-[Äá3~¿x¶óãDKL ™-ƒ‡‹'~tu•h¶]â7Ú7yàNíuZ¿úhu2ð]·H 3›åîètो«ÍCÓî¿»ºó”îÔM’N¸°Ý}Ç­®”zt¡'„å¤Ý5[N0NïÚ“PÑ´¶^íÈ'i:ƒ‡šuØ9žµÑ¬,u·Ô‰5´\NêÕ–N%PÛôê¨xó&¯½_«ŽÇÁ@XmlÖ§Qª`âŒë%†bÃØÍ3€·IEMÀ¨ ú<„ÀN:tŒš¼ä½£)Š×“f0X‹¸ÙU÷ú.¶óžE Ôqê2Ö¡R£²0ö É{Yf›i@³ÞhºÖ.¢t>¿R!z Óõz­Ü挚ÛÑÓƒ¸˜Õ“0?œ•4·MëNyLàY«¤W¦“z ׌›Êª(Ä1!1–»ç3%2è’ݱi’އ tjóÖøÅŰØ4N‹ég¶Ÿ{ìînÔ]€ÍÓ-wÔ'ì܆ý)÷tÌú¡yØö¸¾ùöJÚX>ôAímÿº··ahNÞ~Þø7é;WVœ{Ô£ðw¯^ (ê©Wô2e›Ï}#<â=ÛĪò©×¼å+ W¼ H ˆè,–Q0Jѧ;^º/ÿé™V,‘³UÈò½ÿx'¾æ}ºµ+> Œ×ÿ½P+0è•7¾ä`|ý‹¿û•G»ÄæÞ™/fR2]ñ«W,Ͻë42:ÝùÊÃ39wƒ—tóKö培´Ö¨v>û¥$‹™ ”Àêi.ÁH ºle ;`쬨Z͖͸ÃdÈ!¯¬*ƒ©ÚUÔ/¸K£o—9 ´¨ Lz–¢JvÙÌöÜ@§C=;PF‡%À¸({YŠ“Û6gƒž²"ëQš[\€°žKÖ"5†RÈ…§yI’|Œfšë:‡. Ò9ù*Ä2²„zBÇÒ+1Vòvzp1"²Ô¤”O 0ÉÊPPM÷ùGýA­³´Ö1ÚdµvVû:ï"%AÇ(7J*%ÝÖI˜´¢ÐBHˆŠkˆ¹ ,‚x„PûRnÖ“ ^„ž}äM[*„DiÜ71t¤°ë²âZw ¼(± 0FLBª•BTY\' SB“ ›FÓ qêƒJyÐÉ…èÆ)Ö‚JHCàäºŬ[—L§ÐQD׊R) –ƒØoâ(AT~ÀHZåzÎu)(TY'Ž3ŒˆÜÙ"2´QëiáÓ8w¤;ÔL>ëÅP-.6ÌŒ‰…•Ÿ¤£“¦HÌvfî@d=(•Dô¦±Òy^žLò-òÒUò¦%³‹ Éå­XiH ‚R Þ˜K¿á+5 ¦õ$ìQ—J³å¹W¾Äÿô½‹ D×W!¨è©t&Ø/_U;çT)uìk5CdL·ñ,Áø‚ÃÊGÞ<ý µãcãÑ—®œ>ퟆ‡^÷ç®ñ’ œö‰$,«\âðí£Éf‚Aô"ßù©>ý=ÛŠ7¯LoúÇÕÊhŒb‚;Þ³«”HI„©B³ñÊñè3?›<οò?õ“ž]Þñƒø¤ç4×¾týœWoqÿð¸É±×®NŠUÆ„4BÀ×ï«4×ÖpÝÛdÇ¿ì ?ûßå£Çyþ)Ûñž½ÒùŒ¿óÛ}ñgÿó³óí·»þa›‚2f 5ŠßýäнŸRšYj?ý#«Cœù§9¸hwŸš„û?:Þ;3Óïì9~—§ï܈?6“Õ ½¢¸Ç«ïæ3û힟­ß}´ÅËw©?::ÿWEqù®pÂ÷ãÂã‡|ð‡o\Må}6õxý—š¶ÀËϵ‘¦l!]Sõ7>´ßÏvžTœ™éꚣ|¯½ù­Ëõ¯¥sÎðf]¹ÑÁƒüÛ5Qýï¸Mö¯%j¥sñ´9}b®1EZÙSݲ–”ÜsxRž.œ3`Û´º¯ùÃ(©¹>m0q|dΚá㸆fT$hŒ Œ. ¦c³ •ƒ.ƒÝá†;l¹is7ªØ,d|Ôë8Hst–ƒZ¬qÒ¦É1ɵcÌ ¦Ê’nê ¯.YrÝêXL@¦_/ÏÎ)H òV#€§¤t¦¤ÒYî’2uÚÕ¹ö@f¾ÎÙ„0ËšÀÀÚ¶N³:*â$ D7"´Hˆ›Z×*ÕÄåº]YÚAßt• ø•uf@ˆûF™&Ì ‹=åmj˜56-mªÀÂf¼aÿzP€ˆ²¶-f@–”Ö&D¦a³e¸e«ÆàæüöÓ¡v¶Ú»Êáï­nôš·í¨¿v×8x V˜…TšDdt³F‚ãë fæk~ÝÖ †—ìxf>ø•Za•Z‹#À£ÇißS·¥*™ÌèþôêïMgŒÅ:òM7#nxêfuŽ¿õ™õòá÷&Ré†Ïˆ]âo²ô(W:%™Í—Ý·0Qÿà+«]÷°ûèï|nåÂÇñ!÷O_ùÒôÜËúñ¾<é˜æÿqWÑWñWW‰ tvº²)þêj}Ÿ{:³óÆø˜'Ú¾‘ýº“_ø¼ä›vòAM/>¡§P*ÿû_uÛ ƒø_~¢j½0f)}ò›¦v^3h­ºÏ}cÚU‚äÛpü=¿›üË Üü0“ñãß‡Õ çÞ´c¸ÙêÛßp×ÖçøýÏMw½ÿÄv,"Í ™ÆBÔ™•wÜ¢ß|¯\0Vä«?tyä/Zi¾þýöôWë«®­M1³Ò|ë÷EòÁ=k>|õçáö·g^¾ÍúHqú|Ò£UX}la¡•þᑪǼüÉÕúç£U¬!×lE!€©}ÍóĈ¬(º$­‰ãžIuž…¦%†PBå”CãTm®Ñ"O:f²L‚¸Ü)C]Ö#©ØËËw¬›^.1$LË\Y`ÒZA¦‹I¨r&!Àn]ÛÒ¶\; “Ò'¨cÔYÛ­GD¤…!N—=˜`…ƒòÂÁŒ ûFHÚÅ¢ñ*èµ°,)—F¥#7Ì'‰|h•Èñ‘ a±‘1©$àÇ^U“€±p‚yÇ MŲ0îÐd!%n  Ê3~-i ZÛ@$…JaÙdCŒÁõS¨§Ü20°ÄŒ5lLÔ½hT ‰ÑÍ™äSL«CpÅØ¦64uŒ­O,Y94Ê7m¢ò-ôÉJL•Tco¼›Ë1UAÏaB@è½n8E1I·“z\ £JAÝv ¤½Ó½Pä©í¥j%Ijš.ŽF „Ü3£ƒ·,qÜ`¬o°t¯6`pÊÖ§îàþUZÝÙ­mæÃ¤<ù.Ö&´¢uÜz3>t¤Œ41ÊÓжÓ1ºº@§œ²ö[ÅÎ-Õ€ é2]E¹kâöÓÏ7]WM®WóÏÜ‚¨c£Áߌtn0ª¯»ë QŒ”ªÔÃL|}QÝóBmÖ˜¨„ÛxûG—Ú+.ÖŠ)uXù¿ù§þ}žÛ†ÌJìˆ#3h €2ýä¶üoO‘ ^;6'cÄ'$ª$·]å Чì‚?}³™}ö–ÞóÎ=rA®Fß¾Íþ±%è:=§Ü#Nõ÷ââO÷ôµE2kŸX˜}rîö\·¾NþªfL(øÎcÓ=­—œXÿêpÿ“ÛôÎ˺{Ì J 8K†¡½íŽêæ ͼÎ43¾_ºIŠ¿~õâåÍ7Ýî·ÓìºÿâÊ-5Š–vO{Ûþ©0Bïä"i CG;LŽÿ¨Û³ª¶níÅÛ¯õÎJ]«Ïšq½³ÖÆ‹KmwwØ€1ýy’¡¢90MÊ)ðQ!Û¤¶ÏY¥ HQTî2£¥Q”êù^‡ ¸`º#²e" øµµZfd˦ W×W¶,…¥DˆÉRß3— :eÊ%ìoÌpsÝV•ð(NWÚëÅ´ºR¢2ó byÜ’ uY98.Û„(Äà¬ÁÛIªµ™qØ$´dz ÎF;5}Ã3L9N( }nTCÑOÀ1{Ô®nVÊ jìEÝåQ’¾X“ˆ‚È1iJý­šl2ídhTì)d!P˜Y‰Š%æ&LuaóÒ$d æ"(¤ÁΖ†“ µ¨²- B.¨ Pœ=ô‹¼õLZa®f ‚}lû°…œ;`"ƒZ@´CôLþ×2aÁÄ@€ÂIº/~Ì ›ÿáôåµõ ¬}B;éÙ…êI¨zmQ¯½ãM†`úõ8e­ï;ôŸ%õ”·êë¯X‘·Ï÷8nõ±HñG>ØFf$|ØKæÁJûŸ_X Àˆ›¸ÿ¥à^öìê—o;¾åmgäÀ@%õÿæù«ß}¿Q8òòk£ KÖ "|Ä?/Ø‚u׊(ž„f(ûªÇ@™¥á•œ¦o¼c¹üðE’)Í‘«W*÷/˨_·¯¾ºé˜BòTh@!¨&è:ß6i×[ÏðŸyj¼àmÛOþP?ü?õu³*6òÞò]°ýÌ{ Q#§[_yÈp€’˜’íO‚ "0!FA^¿òWÍ?éÌ.íK"¥^ú}×ßOÏ~µ¿ù‡ãýç~õ„!µPKÕ%SöИ–Ãà‰g^)ö$7!PQëê­ï‰OýÛh $’ø«g íË/äEfÆœÿõ¯ýCîÚpÑ“çÊíZ?ý^áÖO-ý÷R=ñÒl>K‚L14B ò éHO XÏ9<¸¯µ0U9F ™ƒ (Í‚™O …!‘¨ží¡„€ RP®?s4aô*c+*$•[a zÁP`F‡‚Ð'Ÿu+¥ @I€qP,ל°-CN]0Ãb ë‚‡ ˆ€"¢ˆ!Ûv ‚˜CÈ5²$ζ¨0€ ¶Xlö]Ä•YÐä IK]tÉ“ñŠrI‘Yt&¨´W‘QG!KÔÏ&(ŒÉG@à”[k’$Iq¡$Šu$’«d W:Ïe¿g3!úšµ€Dh˜å™‚¶èrÀºè•$I¢$1N톄[Ø!)T” Ê”VÅæÁT‚[Ìhƒ, §¢k廡­#x6¦šŽ#2@BHA<«Ì!˜V3VM5meÓ¼5®Òˆ "›O‰{«¥•Í=µº§9ÐmTr µ‰šlŒ ÒIÔŠXÛ¨„V×ÈÍm×ýèSŠ­‹éˆ¨»!³Z'l÷¢YUMJÌîŒZg”T‚ùûnÁÜ…][Wú_¢î·Dg_K«Q)"B,Dg=ÉD«9ÓÆSÚô‚±ž…¨ î´ÓQ3hÒ3˜û©˜“W*®­22´=”ñJ{šùͺR)úQ$þþ`¸èR²)Œ¯;>ùùñ`-óñ„#±;ëqÇz7üS×u™ØKÏY½å0¯ünØÓ™«÷/ÚbW:m‰»#e»î·$ÖwŽÍšv”f¶g§.®Og.ˆdâhïMV*)!fFã4$F°…•V É·)²î÷³“­¸ ²ŠþˆÛæ-[}Ê ]FÄA/Û¸4Í7–È[û£5Ÿa›"ƒC*ŒVÛq•hÛþŽ<Ž&<ö"̤g¨%šQ:%µYuÖ RÂx¬²³.gÅ€ m¥ðÑ1+Ý eßbÏ«˜XÚ´%$Gù‚Öý(ëJ"X;—e8H ŠÇÃFk…8æ^Òl E&Q¡JLd©KÄÆ &×ËSRùDDõЗ%B0L"@'U€¬|“4LF>©fš£2‚zv©Ša ý^/9VJ´T¨”‘NÙ ÆèBÔ4"$.Š` ¸¢uètVW# õUÈu'‚Éæ64B\°ìƒÏŠIM®9U(àÚL¥$ÐArš„M£Û™:‘Ü™^ç1 2JFl3 Dµ…h!;í•QØè$V¦ù°@Aá”·€dùòtGÝH¨˜Pxü9°unO”óŸý]룄ˆa¡·„Ä×Yß÷âñ-oÙ#˜àI÷´Û^ŒK¯_nü+äŽG_FzÆ+Íœeß@ì!M}ï«àØ×¥2vfî´_ÃC_˜-ýûåÎu Ú£oýc µ:-¨Q°óÞ ƶ—GŽ]†êŸ.îÏ8»ûUÓ•÷ÝÏûëìÌw„l³£ðùÊn}ÛâÎ7ìì=ûÉÝo?q(Fb@å9¿äÌc“oÜ´h:¹ï«gGï¹Õ¯#–/9OýêKë[^²Pp•oƉ÷I„º7lxÍIYJ’‹|$’õèÆÿ»SýëY4µà#"èž{¢½×¬ðrËg6>r¼ CB³aftì'3ú.T¸˜wi8wÎ`ûáà^§âàž‹z g_züÂ¡Ž‚ Pt‰vñx#-î¿c-0€‚“ÊJ1fÛM®_ÃÝÓmÃÂ;<ݵ±)‡+Œº°iyE"ä& s¹žÓD$"ãýnµ›/—$å “Aª–¸Ýe5¨¤µŽ Å(hÄx šU‘F­‰’T!S;Uº yÙű…<(`LØ X{€X©Fm I eÒ+Û†#'Œ-¥>ÏÍÛ.šÄBœ¤ºA²1! `²X´›H°!4¬ÐÕ³½6ŒÁd9`>êˆLo¶­Á•! 8½*:±ò^a•Hìæ“fÈ…a¯ÑÝTöîí–ʆFH![Ø–\[ËIc¯ð¥$¤ä'­!h€¡InÓÌÒ±Û¦`dqZŽ÷ÞÑDÀ¤Ðí8½ØÛ[ÇSO£9),HP—iËZT&&… ˜T , Dѧ}?:^.M3CG‚óQ ºû\l ‘‘@Ô%OºÙq£ò1/ÿ̓½R¹“¼ôL .}󖆙xÓCNÅ¥[ê3Ÿ³(’£fb@¤ßmxÊ©™RþæÛ¦Ì¡DæêŸF‘D·Ü‚Î_`Ÿ(%¦ÆöØU€ TVõ ànáÜ+N8ò²[é•›ì½ïÓqäA—bfkM‘vmûîïO‹À_x‰|{‹åÁoèÕoø¾ò…b=zå5ø¢˜Ï=*,SØû’}1ˆJ v~t»É _£Šø‰O©3®Ú0~ÓÏCÕÌ&IJ«bøá+Ö‹OÞß™É&ÍD@”r“• ô7¶H:Fp³³e;‘fe½70Q[СìËÜ­è]F@€¤unPb¿R »ÕãÍbD—in½Z_+ú)› ¼¯ Ö§¥ÔVd"«£0eZŠ-k¥Œ¨*B˜;¥§xЇšÊV<àh±»µ†SHB¢%umÀ)Ž KUm´­1ä] –#6`ÉÄiâˆZ÷úh}“dbÀèue›àcåW’XA×H½(4S J‹"Nh„PEi¦P¨gœÛv{” Q[+ÊCé1pç{×µ "«ëXzAW“ Öu¶¹ €•DÒZRpÊ’bœ¶š ¤è"ùz"è)‡5£V¼@BàÀj!—\RKJ{ŒUMÄŒ|…ž©H])NØàñ1$z=¥J›µB…QF•±KŠ)k™ƒ²Éëþ°b‚qY P… $G jÏ‘E[­S°™v`*X0%TåfŒB @pªãZ-d‹^µ"æ Q (&¥h/`Œ ¢0$ Ïf!Q»Î$"IR v8´1Ÿ6vÊÙT{Ï1vĉˆX4Áÿ_÷ƒ×ŒÍ»[D•BöÞiû±¯O~ô Úô±³Tæ]eÜî/¬/½ý¶öñŸí“·C–oP,nðѦýîgy¡¥º“Ç?w~ôæ[Ư²îYÿ4{ï/Wã7_Ó~ýúÌ÷n‰{¼zü Šs¯Š9:ãªõ£Wí…g~*ë2›4¸ŒÛ…÷Ç_ÿÏúֿκ5Feø&æ¯}¥®–‚)u~ý»÷ÃKþ9ÜôÂõû½tó¶wï D¼pB>ñ—¾±~æël¶Û 8.í[ëÑ)…»ú?ÖPï;&;^têÚ_5ºç«©Ø kßøÃòþãáà›rué[†\¦ºQþžïûÌÑÕ?¶ðÀ‡Á©óvîòûšŸ|¿ÞðÜ…™Ý:ÃŻ߿R›.r¶ª@ñ‚§§ÁußÀgœ.<¯Þr—iu  ûî2ûœ®ãÕþòsôůºCŸVv_%€æ¯Q=×ýíÞÉ9ŒØUvvšPPhþ™{OܪŠ©#ÞhO|Îíþú»¼@šü`!7OnNþm½ð€yt­Úù µ#·UÁ hÍÝ !ݸ§KÜŽ{ñúͰ–ź(l˜y€¨ý=¾mcÒØNðì\|Òf¥½åÈÑåîêvnÏ'Çô(ßÔ+ƒ*æê`ÃÙ iÒa±•á\á·ìðë#…áöIV'Ê4£Ø×ÛAŒqc¨Ž&ó#…R”afÉ@ìaÒÎl“ñá?Ö)Þ“Xœ){M9Ë¥x´ÖðIaT:—ŽcêLŒ¤­è¹pŒz´šÚˆ Òli³ÎÃÌP%I9mcɶ:mô'&LUÂ4»a¶u‚Ax„S“kÃ-GJA8 ­RÊt¥Úœ)nb³µˆ¼J`½Vùü -5úEÚç¡ÅH‡&1Al+säöU]œåwtý˜¡Òl­S©CHÑ90ÝzÖX’Œ‡šNF(ª£wEA.Þ⯿¾ÚðŒÍ:ëº;¿çC’ú0¹w¯ˆ ²EkÛåßßÞ‚¨s/íë¸ûûº»ñðì%§Ë6Eh~…¤fCºEJÀ§Ü/?þÑ=åùÛÊÓv©ˆ&X† ºŸü‚ñ/³_w»9ùŒlóãZ,¡-W8IûMez§Ð<¢ßq/°(ÂÜÅ€€¨JØ}F­ÉÇ{^Ä¥K3O™ÒJ>úqm^õ úÍ;V¶9Ohàü“dïÿúéè¿!)Iäÿyøýõßt@šio9 ¢`RL!tþH…ÂÒ½'ƒç¾±@‰Ôeb,HL®½Áœö–aúÄ÷Ò^ZÞþÆ}5ñÎÈ A(I ÊCžÛwJº+ëÛÂõ_1õû^Ø‚i>ôéÏý»çõÎîwkK äÛ7 gþn˜ÈSŒi~¡Ã.Á$ À£×o>4žî‹ðëóuÑ[_}šMŠ.xç±xbOP‹ŠICR 4HSfV[Óq,VýZdr5(&g½B Ù¹„õ@@Ý`ÆaÖXÒÂÂ’ÙÄ­´ä‰-À@i+ Ъ!WëÇ";­˜;ßCTf2 6 ó.›¨ˆÍ §­“à­J…˜’E¡Fµ°ZÖ` ë5HImΑ¨×ëÆ‡Ñ>ÅÖø*#Ñ&5¨é´ÇŠD9•S« ¦]CÀ¨5BÓ´«Uh’ë"“O‚@@(q,t¢@²2òJý~[­¥·<òìPA£š!kr&2¡ß³!»°¦;›P"è¡Ý´ñAcâ@O' ²Æ Šh K*Ú–¹‹‰*ÓLd'mË:ͺ£¬Ý˜Õ J„ »I¬€jÉð@«d c   JdBF¡0¢rÂPY‘‘H;!æ]šésàÜë<¯£W(I Ê·hå@ÌÓzÓ2ÀvPÌŒ@d«MP^”Në ±ë”Ýù¢_ÔÒ­F^†@˜m}(iu—H„«=xòÆ€ÊR*låÁ "žz_{äŽÛSBØ»ÍBÝIÙÂ¥ÁhV 5hI þŸÈ÷ø—ã|FVÁ O>û;¼¹Ng<~Nÿì'w'S=ø$&º¿¾ßÊ‘6¤ÒÌó{ðçkïÞöä0‹áð$ž|Jû;ºë¯Êíå—*W×—:µú‡W÷TpÎýÆëdõ`”©ñ÷Í>ù4ìÐ-}qÚ¿çy#óµ,¶aæ‰;t ’#ÏZ»ûnçqöÍÒ…fæÚpý4 ÉÖG,æ‹wÄÛ[ïQ¢Ãpçžý'ÞOáž»Nwç;nÖÆP;50HPøãw÷ï`ÇNòÎên§Ê‰‡ ˜æH6»Ê:݆hb<§—%–yšëg'ZªMY//7ûŠTv«K“} fÍ,¶QPÀÎ[ÏÊÇÄ.Wxã¼l."æ³8§ ¡K‘«¦ë95ž)êõ€“•qíÀj€•‹$zªŒ„H°GÙMI™õª³£¤‡…1£¦Y,”+·ÐÀfÐOSÝ$œJ¨;bÎ `À< ²Ÿ¶MÂj¤GC`t]Ó±Rbû©óŒNtÖ’ŽºfX_.9•2Ò€)·Þä’•tQ  PÊÆ©R=ª0è¶éüÝ}W`Ž ˆ¤!šIÙ€J „šëÎÖ\ÔL5; *.'P€½`BE>pBšŠFOç1iÐh½%мýi­! ›_þ¦aQsÝ<~í/ )I}ÉõEg«¯þû"$^vB¼íªjþþ] ¸¹¬ËG\X¯éî¸ 6~üœ¤•M*üü™Î}~qì·úÊOôñïÞY\rò€‚_þÞ]åûÎןùä4,œ9F…Ô%JäÀ />5gô?zÇÊö8ý·Ž!‰ pfÏ<³[|ÇoºŽÑ¯•E”öËÿ»z¯wMßýcÿ¨·ÍÿéʽžÓÅ;w•šâÿ"øÔ¬,<3o9í+·oße–¥WQA1*bÁÞ°D½ÅØ@±×¨1–šbbIL콨" ½.˶ݽík眷ÍüüÏó£Ï¬ÅÈÙeO¢~ô?qCûæ×¤ë¯8šD #à¶m£¯|qȨŽûT')ö-àôGÎÔÝŠRrKo¿¥ö‚ÍÄ7Ÿýé°Efâê­ÍË‚Ö`µ¶,‚É2iî˽êÊÇ›àT$ÈÞúÄŽê†"C·Lrõ{Ž•Ÿ?WÞô6ÃÇv›÷\þýÏW|ÍñÝ&ѹßÜDHxòªénþ›c) <ò£ó‹ï¼¥­SHÇx»^0­‰‰Yņåæ+»&A …M,êϲžaùÆ7ÆpøU]ú•B;n¿üË5¯œP¾îÏÓ>²Œï8Wî~ÝѨ±’ÙÑ »¡Ü¨ñŒ7mËÖæÕÏ_^×ÅSÿy¼úÕ§Ä)Âg=3sÿ¸Ï¿üõ&àÕÝaŸûò哨žüÓoøé”í¹,€iç‹gõ)–)eg¿MÇoÞO~1Ú.:›umÚòúù¹ÚóFˆ „ /Ü+A¬úß»*#3¡¤ví·Ê_d4ˆ†¨2rAaÞRJ,~Ò0Û䛄¢x˜¹¢ƒÑ#Ä0YP$Z9À|™bòÐD¢ ¨‰¨n’çÄH"ºI!Í–U&\kˆ©ì•ê(¤(,b¢ )ºN>dS‰N2‘8w"’bhUž‚'êj³êÆA\ ºÌ²ŒH#ÓÄ: (\u$ÂØc™QN™È6˜OóTŒœh2 €(˜•zF AÂÈ! #'˜¢$"&Õ·ÝÂq „]¬‡À.¤¨Z\•2Q®B¨@ÆÎ™„½Æ`FЦ¦Â|SGAö‘IIÓN´FL‚ùÂf­C®Hê¶N (IÖ–Fu¦tn:ɉʥpl'>Ê ¸€ÙN¡m° ê½»áICÃÞ4s¹´ëÆjŽÜÍÓæ ƒ4<îÞ¿”$DÀÞ¤ÆÆé“6¨2SÇ­‹­ ÞîF§^½ì![ÇÎû÷Ý^ÍžIæÃ·ÞÛ“Ê*w£_Ý¡ŸôÈ‚Á(À­OîA‰‘×?F·ÝÉÛ>wôëw¹ˆ›^854œZ8ûTgl„c˜$FÛ>¾R>êD ÎBDÍMGS¸÷ëd¯8»µ¢R µ#{þ¶S]ôg;÷½AþŒ ©‡YEÈ ‰eèóáò—6ê§nëÿòåê¶Ÿô¦_šµ“zjA3}ÛÍÃŽ9súöþºÂè¼ó&úQ&M?ÿô¸Ã•® ùÉÝJžæ^;a,2¸|ßþÑÔ5kl ÁîûÇ7Öœ+z U{zwÝ©9TS¶¦ HU¡êt¬y¤œV²XLØ[0§¡ëÉMïHõ} ¨`Ú“F!ÞÿUs|?E`Ý*8aAÁÔéKƒÃÑߟuêÁvµžïß·~ÖR Ð_ïêATäC…‰5£H<´n°3'ÃÄËsUO©öžRAZ>M¢Ð‰‚€*§Ð4ƒÕÅÄ>E·­J·œ–]ÒudžåfÈw˜€»¹-‚Ñ–·ÀÙÔ8¶2’NÈȤò¼ã%¦jbcpݬÚ\˜EtÔ‰Ž–ûŒi!W"ˆÆLuÀ†#‹ÿ{,Kºˆ4iÙ¥„l’.´`EZ²°Þ42èÜ †ØCñ^`©—à("€òâöºÈvlÌéŒ(_s ‹‹Ä€E´íŠHùÞ_®x4ð2u “~8bÚnØè§þo‚ç>Z‰ñº€´4&fpQ#ATà{OrþÐ=~01A"s§TªŠÇï@)®æÿñ´ì¿öù9‰¥öMœ$øŸïâIŸÞPš"üèSíÌçO^ymxÆ{Uõiµú©­=ñ£½ñˆ\÷Gªþá"d›þûýKA˜Æ1ŸÿPã?ø}Úg§¾ýÞøê7†TGF’þW{ò—7%ˆî°¿e4'ÕÉK{(ØÜ},ƃëpcE•¶[©ŽÌ‘CÈõÚ06¸dçÔºÚƒK¬‘ ˜¢Êûm7ש]KfT1 !™²p8¯”±vº‰ÛN©\Ę¢ã%0 ²ÉU¦çuÝÖCö«)”ݤ œÈ˜™lÇÔ²Î[ÖYPU^¤6ªi£¼šŒ¡‹œ±Ês¶¬”$Ð*!ªª°sæ€&5ýØ·Á H€~í©Nà'JER‹N®rëÛŒ°€"‰ ¨ØA–‰æÝš#“H”rpÃÜh'”ÙT…:1j@Cc±Ê´õ X rôÑD]ðH|–k­[0€AX'3ò •(‰„$ ”"âZŽ,F‚«:Ðò$rdõ Qd‘ 8¦i…3£M­ ©b F"éx +d­9²'S¢ 0*©=K–˜VÚDF#@&c§ÑÖ1CŽž-STU!V¤ßd4Äþ$çs‰ˆ…YådTê®VJ•¦kSàɸÐDP€£pé%¢VJ'T¹ šX •‰Y° ™ @ šÍùÿ-jŠÄÆÂzžùH[úÛõE—Wþ­7TYæµ7èÎG/®:ç?yRgÊ„KãÒÑÜê™Õü'Nl?våà¹Wv³˜ïç ãÔŠ  (zü£<÷Á_yõˆ…˜AáóÞœÇ#<óÑ“ò_\¶´ãÃ3ùœõ¢ù”¯×Ç.¿Ý1“±EšVðì—åk_¼Í¼ý Uhñþ<ÐÿÛs± 1Ù—=©?;mW®ü}…D“¥=õ«~ø©k#ù/ݵ˜_øÜé]_X®¶äÕœ’­ïج܆̼o¿þ]W¦v×;6¦oýÐùQ2Ö¥oÿ|åê½…ÜÕb'S 5ëäלýкtÇ01ÉÜ[¶M¾qý(Éé:uáÅåæ®:þ£‡¨’ØvéßvëN‘¥‹—í´Î…GÍs¢Ð|áp uñÚSâk/Š?ýÞPS5&]jÌÁïÿÑý§¼rʧ:N}çÌø“·Åµ¤ Ëâ{ïM/zoÇw_ò<þ‡ÿò˜\™ˆ†­BJ ¬Ë_¯ê¼ê¥ë6¿ýò DÀHíCŽ_YûÒÕé··ãÎu¦^ú¤v¾Ïóo:Ÿb˜4ô_{b©^oôê?ß¾zú‡H)ÁYòþ®Ï¬öÞ}±#†±&øÿ@c»Äë L tdK±*º" äTV… £1P‚ŒC#†ª(ajce«rMÐike Ò.@®;q-T½`$•}d,A‰óТš7¬:ÖbÑfyôºþ¬Pî…DòZÖ´îè&!…lJtXèZ›k :uDÑ´ Mß0µäª¡V•³ÊBž‘8 Dœ$Ç`¸#‰‚&aÊM¡ N §8õ²–E‚!‘jjzpu”Ä 4¦„ÔˆA=­US•.‘¢¨ª(@ŠØÁw5Íå™ ÖKƒTÌM+«ôš|Ä@’„\‘¸k”Î ¶1 A+¼Õ²O±Ž36ó•„N!dFƒÏ­—:(H~˜1W:ÃL¼²«]ªº¥N¢Ô‰nOý¥'ô–²äEӥ܊ˆæ¢Ð6¸ëôGc»0—Û6Ni,§§K*ÃT¬×€ŒU`6õ÷^cÐEÕ®…6VE›×“)¨M^õ•*°")ÀDµJÇ¢r‹Ôl9Áûƒ³â°—§2ëmlv]ß4‡È ¯ßT“òÙCÏNT×?fgŒº[¯|o<ìB[MbÑ5ªQsÝrw÷.«Š”AG{+(àíÍ_ÚÇïyH³I©Çîó¿×k»¥J#A•… |Ùæü¡3±OÀ€ùÕÿ. ¯›ño>4¸ý'Ë ”’¼¼ÿš{åw¿wž³±¸úíã/Eí&Æ3‘‹1ô­Ýœi+!ŠÙ㫽ú§ì¼5<Ï*âäEŽ?NžÃÎã6O6\;¹éPdêZ¦Ô»`®S’”÷Vò±1IÿÏ‚Ïý¶ÛfÚ±R øWõT‚Å›˜øPr€è­Ù¾¾}àò›<ˆjNG.r#=â­Ó’û‹¶ùê;Ç>¡t,eÅ{|,•J˜oïÚà?¿2N ÏŸ§$¶w¾÷ ÿ݆FqÒMÀÜD@ô-‚™vtÚŠQJØ«|æ'f$p,9Â$¾7Ýǯý¼÷Ý÷¬ÿðIðÍ—OÎýÛ­1ê8a$abB‡”k6ÈP$Ûa9úÖ[âþÆTW°FMšØƒF%æê÷bÆ‹ÞÕïj_ý·áùÿPÙ©|øùÿŸÿ/U‘Ùš„ ê{íÿ¹#™¤y‚Ÿ}råÄítŸû”ÌûònÊÉŠzÜúÇ>x_boý¾•Hâ1z½îÍ5¯_Š„zâÓuÏ¢ÿpBöÒ§®ÞôÚQ:€"|çïÎå›mQEÌÊ—?KxÕaüðãÌ%kçæH‚×Óçü×$üýOS_óé_Y•?½leÇg|â–øŒ¯@ý·û{8µyÞEG}jw©:®ËËß;zú³C4¡<³p¿øÁÞSß©øŽÏÖ¯xFy×—ä_ÄÄMw“‹¸ÿßö¡|î£òœ`^r.$°îÝdž‡ß£'y¥/;.ËU}Æ_Q–-€N‰˜@¡DBÔe$¡J¼f„,ä& fNSŒ› j’ë8gX‚_͸Š9 š1ñ8‰£…©b‚% F)Ę@'4Ú©Î4R[&â(Bò àè«Ü;«EaÓ÷Úd Š¾Š ”†®oH¬1Ñ`°>Q…$ÈJ¼HV’6B.h2ÉG6­ÃV²f$À€T¯U$-˜H[)Ã\ÆIEPD#v¢$a´¥Q„1r+Lâ WD¤x©dc¦¸­‘A…§kÌ‘"T Ac€! íh%|4Jêôis©ÀXݸNc;¥A)m}â°ÌÀøè¤ä˜½ª‹ÐRÒ­2lRôHfª2±¶ì‡:1ˆ’FMÆ*ÂTqHš¨€@4ad&¥*DI>¢ç²ìàÒ ¬^×i±¥F¤ècÑqS: ¢†¹…ôƒ{C±ZŒÿ´OܖξC{zCê­nÙvÇî#åqç™­Ýp—¾d{W17£ßÿ¢é^¶~øÝÛx_ô‡¯[ƒ§ŸcÙøJc&¤oúö à©§$,·J·¢¸ºÈ-é§ž.Õ öž³¢×åYè-“ä§^6'e €²^Nq\´q¦@ŸsvAÙxrÛ5ñÉÇ÷’p­('#–ÒÚ·6£Òé7G"HÑžñk¤˜‡LÜ}7ËVÒâ6úMÕç¥`1IP`ÃP ÖÅl’³WAu'ÂTöÇ©Em°á¨À @ ƈ»çhýÀ®èÓÄNQ69²z犧ݿžÞºQÕ‡WV²›;dO,Òâ”õ á™u¬ ˆ‹R) %Pªoæ;®ãúÆ•!sµ°t„Ut©Õ“9ËŽªR#Â: '}cë™2¤°ætNˆLjºï«œx0’Ùn, ¡ÖF‘ÏEMNyFúyÔµæ©<ë眇cv^ئ«nÏWi%Ø•ܦª±£öyŠ”g[6¡ãQ.`U®œAJ6†^FnqKI¦®æVBH¬5"D°£q@e£bŽÒ®­Ö¤ÌŒ‡¨1ZçÃpÔ£8¹¬—A -‘7¥è¨gÖ0׉³ngîˆó¹ª'VÛytFX™ñ•!y§²@nÜ €+:X* ÉÎa„ÔÑÀUTYTä ŠÀ‚Á͂ѺmU 0I'Û¨¬ÙäÌ dT.Ó@ÀQ&ÑBœä¸×§P¢(ñàauœý4ŠS†ô‹ÏŸñ˜x× zãÖfÈ 3É¥€Tÿ‹B€$»–H™^ןùÝ8¦>pAif%5A@\^1 <e¬DY YBA¤™§œP“`BiÀ‡(€+ æÀžÆï½“ÿâ²B‘ȼŽßþ÷E×~Q™Ëþª¸ëƒ{äòWeë3ÙñÁÐüÓwÛ) «¾Ý½úÒb¶D[X @Ñ#£B8íµ3s›¬_¬ÚùÑz27ã!&Ð)Ï0)eÚÿúááG½Kßÿ¹ûôË1•LÝüû]ðÒOä݈¡²…¢Ô’Yÿ†e¿¡+“¼ þú¢^LÔ(ÝÁ$ æ9éÌfš!ég>t°öù¥ôösõSÏ7Ÿ;Æo?ˆ1CNO=ÇMþai½ø‚â‘ó?l&§¼'혜i™Eöý{U<³ ygÏ$¡¨…:ȶLyÜóŽ~rñð<¶iþ$R÷ÿrµy|·Æ¨ÿbº31F!ƒtÜÓqö+é’]ŠŠ£²aõú£ë]Ô».ë~E雸„µ?›Ñkw¦ìñ““¦Rç›—gvOnZábÁœÔË69µtPT„“å;[.z¤¶oàͪ¶"‰ eìÈcJë´,9!q‹-Ü}z½Ud/Wçe²Ó°"lŽç¦˜€\aµ‚ Tj2Tât*!™å&EÉìêDhRNòå IÊ †€Ör˜$@aÖ &©$mvMOs ˜•Ž.S J ‰8ƒœ‰puJΛº‡««*)Ö©„:5^+#¹fŒbb2 œ¥.5mf%h‰Ts3=dÉ´“ƒ«@áü±aWF·e¬¸›ûb˜ÐCjã°ÍGNBÓ¶Ô.7 …YOmÛlKM‚™ ܦ!vó4Šà›zxÕnmK‰åÛ_`h—&•ÙVZ hÕN2Êp£NØ)!éú{Ôa¨¥ƒI+£LÄÍçv,Hå5îÚ~úûe:pr¶}SúÕu+êà©a” æQ}zû«?ó8 ÕCκåû÷àU™Qq±pè»´ùÃSJs³†½A/+Ž(…¡¥´ð,{ÏMËáÜçM@}óóª·~aæTàî½Uá¤4Šlhñ©Oáß]yŒ6oé2#&Ñà³?^¾¼ëÄM峟ÞÞüŽƒ P¿þ²ªÐƒ½—ß_ýnK3Ò}þsÇ_øË#rëjËé„Ï8ìRH3*,]Ê{‡@!*ëËNJ‚@ˆ†+ ‚ZÅŠ˜G–8ZÙ6GŒB}‘h˜…B„˜[cÑ@²:Áر@ì&Ð-i•PRÂ1»éò{ã;Ÿ5‹¨)•·¿ûürä%¿üù=¹êÇÒ[vÎ,Øá“Ïûo¾ß·/þbfŒæÈf:ßÀY%2Ý|üWñE¯´M7zmÚÍ€Üø7ÓË^M3YZüäôÀ þìÎ|p ²(¾ëë»Ý+Œê9uèCG#\ú±vgàÔêÿ49í½©)ûnñã{ùZ㬠¿üÑ“¯(©¤NhLhè9»†‡¾v40ðR ÝŵaGƒ~mÿðø“Û36êc @†­¡gþUCL£§¯]‘gnrOèéþvÏüS¶É­×¶÷áñ’+ÿ m›5ÅbOåÖ¿ø“œ—·Šö þÑ{ò£ró¬]­úI’&ÅëÏ*Œ ¸Ra„W'9Z3u኿s†þèæzððuÙâMíèÂ%iþ4>î$}æã÷·ÍŸêÝcnǬn˜:ܧí÷ùÄ»ïMýã³8:68Àn,·TÄ‚9î=”vlv 3¼¾í§€ÅÆjóüÝÐj‚ÃbG«f»=¢º#˜Ï²™±VmÛu¨ÕÔê¨Yc†5Vm³¶˜ÏB%fÂ2:W+KâD Ô*.ŒI1¯2¹"Ç“"!òQ ÉÐ×Á‚L„¬Oéà¡~¿’$Ê(#šÚI˜«@3‹º™òP{N¾c•צ—ÌGöÏGPcc°éW|T5ªŽU ¸amr­…4k‡GWS"ÝÛ9™šT!•ù©%Û..Ùõ§d&+&ëfÛf_#@õ¦Y¯‰a½u¹@LAsàìm-}¦Q&…¶( ö´Õ©ÝL÷쉑ep;1#ißßÕâÌü鬕ÛsõZ¢Ôëîš–L£š´{oo>mÚŠ|áêáv ÀÙèGW5z˜A¬44P#Í?BnÿÑr@!ri¥nk‰¾¿7¾ù™* BTÅ–’­’Võžy•4rÇGLŸ1ßÛ6E·¼ïØüCÒïÿi˜’˜Âè3Oöº àPÄ(ºøâˆ¹ò™É òo~K;[ëÇ=vòùµ$€‰^t¥Ls‘[P¤,‘JÍη¶ÍGB?­ÝðÁCô¹-ͯ?½zö•ùèUée›û;ß1|æ÷M›Zsj”À7ÿ'•|-ðÍÿ´½ñ¸Á?o©NrÚGæóŽñ!æBnÏßÜ#¯¼Ìvs|$31ПØVdœö½sïܧΨ)z«ÒJä¯Ã•$:?÷ïëÞ´|ñ÷ÃÕ¥”é:ßóɽ³oŸ®¶õÂ#kËM.|ñçãá Ì_¾Iýä5Z•ÒÞà§·Œ¶l«ûæ¯dgdE¹OÌ¡ßa^÷¸¼¶ªöÂ?¹.?ïÍQ•¤/¸¤ØºÒ¿Þ<|ÚÓ¨*²öÇ»|š¾b~ñ½ÑIož9î­ûŽœ¥Í¯§áõÏ…j“>ÿÑ“GÍ4!+ãÖËöÄ3z.rîµ  ü™Í,”&«’oÁ³B) 0„”XDãäÃ蘊ÈåP˜à‚ºNÂa?YnÕ¤0¤‚D›€,æ-q ãZ9URD&5T†e¿š6ŠÃRÄhSe,"“kûaHÄ‘[ä@1E žÕ4¥¤š†Q  êNu@°L“žx¡¥_š gŠIOópµ;mb/°³©ŒåÈr@Íάk×­[ô©HyŒ1…‰¡¬`dmE“ˆÑD\ǵR ¸U•°ŸQA3P Ä|£š0JhSCÕ7J¼äØ6yÛ¸ÅzÒLæSî‰n™5At‡]–Z/L,& $¡%¿–‡æ¦ccŒz޲˜kàn­y‚™ª(¥¦P¸<*  ’ÑÚHy.B ‚¨E7S±RÞ.ˆtAí¿kˆ’C\¼çhuüúžeªNc¥]Ùí#­;CþxtÀ𠔣ËMXþõ mb Ì[Þ»ÛÔ-äû°¿Ò£+ ª‡=­cóÉÒ-?‹[/ÒxûíÄ 6ì/àΫýÚ²)Î=Ó¤ÁÏîsàžû§þþaY©s]$uf_K¡ 2F¶:„U³é¢| CÅYBË·Ý1Øw!º)€-¬¡IÁX[ŠTûïY<°;ÐÎ9u¢rrÛ±töÝû@vÎ|p Ë·V£C úK7ÆÚ’9y}Y´„;2<ñÔ¬Ö€IPP" F4"Ì»ÇêôÙl0©ãïæ¨-œžG¼¶7§“KÐT†"‚ @*©Òf½€%9n6A 6†dR<ç‰$ Pd$Fd 9ƒ 21¥ gAP@y““´ƒA²J‰kx¢²šS¬Ç5#€ƒ¡NcÆb«€DX9 { ¨$K™‹ b"`݉õÀ·J¼NÜf¤˜€„¢¶„üXø`ª±±|êªôÜ·v®¿¢M£+¥$&ªA¯¹r1Dî¾ìqefӑݬ?2_^óÞAñ™Gªí®¿ž¤(©ýÕGWB‚ê£]`ÊVõ×¾¦žõÎi]j‰ˆ@‚3.]NÕûž0ÿœgÖJÑÒ‡þ·fV Ÿ9 ¦ ]õk=ûŇUÏ{J2ýiÒD„ä}«3÷_ßQÌÆ~ð ùÏ>qì¤Î)åó>[×bøøßfÏyó,"‚ØÛÅ$ÁWëAö¿Á¤7½¤{Çå÷9`@¨9yáù¡K¬*멚8’•·]öÚž¦•$"Q…>ôÁ«@Øÿè•“.;4¸ü¦fäqo¨Fï¿•^aÕÝ I¨RA{yÅÖµçdÆüó¿ÝR;@Ê»¼ÙÈM—Y7*ßõÁ{ùo¡a¦»Ù„:u52PB&PÀ(àa¬<3R^DSEÊ¢ÚóÞûf_W™K8vPàAO¶™?Á­ûèAµ3K Akœ£$’ضmŸ¼'\ó5ω6¼{S9((«ò´÷­­ýëJóš i÷·öÌýÍ:óªóø–ï¬Lþ­WüqE™P4f™Bÿ)Söþ›³q–<œšÝç\’²nJbŒé>õ´å3”]»áÀâÆg7ï*b Ð;«3·t n¼tyËTl5º B¸ézƒá_ÄÓO‹m´Î2ØÝÐÊys&jAк)àÿëЫ,QC§‰œ4jb0¥°nE!$¿\$EÀj›u¤)F­’CEZIØ…1&mØ‹Dˆµ$  ŒP€LSÇÄ"ˆ@J[ñ,Œ,…vdz¤ƒ0p‚„ÅX¤“ÒVC´zܸaŽ †‘cJDT:TÇsC¬}A†Ø¸zìÙè,S’¥p¤%ðžbâq휀€ $P׫Gi“òŠ™ÑCiÈM‘Mt®ek;9±i´Ö¨lfvØCêÏÙˆ4±0¶Ña§3^Y01IEÔa9€HÂå½k43o¦¬"P^´I@EA@- ÈŠ-’¬*@€R©dÔÈPsÇk<zY†   œø±d'î €½Óä!C@4]²[Ö¾uc-óGÖ©‘ˆ (ÏŶõíÝßÞ“žšàŽÿY;a¸7÷yö7«£Ÿ@R€(JJbš1Ž{ÙÔø#×M„$ ¦Ÿ(=9g³ÀÖŠ§Û•^gtÛ»–ÍGÏêõhÂSYâ³Þ=ìò{ÓÛþ:~ëù3Ø0ûR ÐÓ^Vœ,½}w|Ý© ¬&%Æ9s×›O¥k ¤¨‹6 9ZïÞãr 79©Êƒ‚¸øÇ|ßYkz>7M° ¢î—pÖ&ˆ‘cZ¹A6žbÚãÔÔIÃÞNKyf8Ý6—íÈÍIí›Ü7Nn0óÇc6Ã("`B`Ñ1awkÏ©V÷rd4¶ˆåúÚµeý¸XW4MÀp‡õ[»:Ã6+mb²jnAFÖÝ9^p«hǺš)³þœ›ÔÉ-6‹,Ю)_T€ teç¶ €”ŸÛÞ4ŽÌd ˆ3Ë€™ªÒ ­`‡;Ì.JBe@Z$G“;(7d*ˆFÒ(@Ö$Ô¨º3Õ(åZa5©Ë’Jé–šEIéBBf¤ìæ#LA'TÖ ¶ÀUb“T„ªN¡²JD9$/HJ% NÉ›7Þ&€&u&y–$Î)Ÿ ¥BB—ŒG@¯3PŽ2“+oµ ‘DªúN[ðA)RJ )HÉå¢Z5% ÑT7¯#"*$@ äÌÈ‹ 4j>Ûrm@&17:©è€Xô3E Ú•”¢¸õh«$¡šê8•B43#ÔçÏzfﺴ[{ý‡œ^_³§MŽñŽÅ$âãñIü•¯£¨‡}¬ðÿò­:1!=ÿR{ûfÇ•ÇÍÒAYÛÊ=ïS›?[ZM@$Ê6A,rBHÊßyÅý?}n@fUêÖŽÓ?µS–q¶œ3î©o±½,›t-"HúÖÏ}ãÔ 0XÄBëñ?~³å(À _ól}û{­ÿüæÅbNP(A}*Q.yG×K>üÒw‡mMÁ 2‚ÊõÒßü¾%‘ä¡y‹ÁW½Š&CDKÒ*þû/´" +³Ÿ8Ùÿò1éø/¯Ÿû»Úm,õ)߯«© RÄßwi›$QÀj ˆÚ7™ù˜5@ëë$’ªŒÆºÍ‘A­8Îd% hKÝ&„Öó%ȸÁ)ã=3¦¬#S#±®kTšˆ›¦ñ€‚ÍrYh•ÄÊfb%Ô”QŒHǹ6 ¾“À˜\‰ÖV(ÏBË”F1:€NÒ8›X€"fJ#Iœ´‰‘JQÈÊ‘¢„"ª[åÀ‚qÐ_CCÀR*bÏhtÎu%Ä-11ìT×bŠ~ìQafE¥ý^22 åD LBh¤{Fg ‹Œ»‘-’¨'qЬ%EÙ Žµ5¶4Ñ#ADPž<¡“EF‘È&ZèµÊ’ª[RYEB°f|,è„„ʤ$VRZÅ óvm@€¢2'¦Ž)…ŽO°Öé\ ÛµêV&æŠ}} Qf+QAiBˆd:e¥R¥ˆÎ×|“„ª¿IPdÊŽ% 6‚_ ˆEçnÂdó*ÇTÔLXf#§HËœgD!*¦ž&RI¢ˆ @Â5‘‘Ìì†P·±n3ÚÌ óoòÑB$»9¢²Nih2Ô !{Ì÷uŒ+tKœ<'!à´ü¾ë‚Ç slH%ê\yVuí³'óÜ æ3wõUŸ?›´0HÀá~2¤Ä2Šù›ÎŸªzfb­Èßû_½îòõƒ/üfÒJ-Ʊ zƣ꣟º©¾²”g½rÚsÁùù5åVe^zi¨E%Nág_®£1æ•Uûï×ÖIpömo¹$YwN/›[¾s×òþDÏ=«JŽISñšçëª{ೇÒÓάN-ÑE]–¶eqÏW±‡ñžo¬^³¥Õ@ ÏØšýøˆ?î½²e¡í¾n÷èÌ<øáÁjQ[Ëu€“Ä ‚ÛŸg6'bL»°ˆ½0ž«ò”QJT÷~i6æÝ÷›Ã{÷8F”«öfæ çŸÌÂn]ŽaÌùê/Ò¤gëê·8päà1“ƒw7ì×çáRÊØÉN5lOÙp\Oñî;FÇïšîò°g™_Ÿ ¹ÁäèÊRst÷©Îæ2І¾6Ôzˆ3'UãE˜+gzÁ­;ÎiNIº {ÇñÆpŒÓÖéƒíº”BìXlÕŒ›­ŠÉêJ½ÚÑ90p·D†9“LÞ-"rt 5 6¤þd‚ˆœ’J¥áHˆ¡jË2c´9:E6÷B® ©EDË™[ÕŒãŒ)bž’@xPÔ™h£¤54âÑZ®—×bŠÂ HP¹Ôk=@¶i«.¡t¶häv4¬ š•Ä€Ö$5%0ëvtż¯QZ§Ër¾ØFd4aT &vuÂÂÆáЬ‘„€¦é*Sä^mñY1´MsÖÍŸØ^“3½·‡@Gˆª#îº_¯Äˆù™éu„DÚ .™RÑÃÛ-t¤º'ž0û­±>;pÕá­MÒ#¥6=ióâÝÞt~–uˆ;;ðàOï À6 E†¬MrJ«µ¤NúT‘Ù¬U|ó®ö>qZêMyÕñS·$¹oŸžÄ´û§_Ô!ˆú_j¸ämо÷–€,1€²¨Î8I"¹$*}û3+ £½òŒöGV´ÉÔygs(`è×wÛ]ðÕ»'\‘^áXyÁ¶™îr´#{ò»Vööýõq²é¯…#áÂô¤ÈÂu_<ØN€r•uÆšò:[@´½|o~Ù ùMïróÙfžñf_Ìùæ+ƒÓ;ÍcNš¬_ ý¼‹cÙõÆpBŽ»ò€þݵ%åkZ?u«°s[æšî«÷ùSJï¿q³œÿ¸tn7åu„:­ßÒóç©Óí?á³váEZv¼muŸêºSúÐyíQÏ;Ídzéã‹óÏÞ×ߥäô§­žº0í¡-” ºÅÌ—A\¾z¯n4E2Í$ÀÚ;…˜,€†”¦ÖU:Ð6ÓAhUô”ŸH®ZŽË“¬õ &’d(íýA—Àj«(BrHÄF2móB­­˜0 °—Œ]–ì¨ò-±O+ Ë>ïOÇA[µ]È© !ë`Ò†¬Á!ŽI(so¶µ²–AÊ”DP¼*ÙeQyHè…hA”…a);¹7}eNO…ª ÚÐEQy§)©“u£ö¦ß]ÛÆ1ŒG¹Jè:Z´)Eyéæd{]“‚Ï¢o\dÛÍ@[LÒJjjAˆìBT›ÐGF$ÅÑô¤ÓrJ‚ „MÉ`ÙËØóÊ@@ _‡@²Ìå9‰0¯ ˜Þ´Ïò8nÆrÔ‘žŠè´eYb“dýúHž›qw¦£%Íu´B&áê±ÕH@í°[fëE\Ñc§¥¥•jËÙpÛµKFożf+@z¬··@ÞlÞ€>‹zÓqIR-ÛOxàË×6JçNÙ•g‰N: pÿwÈžùˆŒ —Ÿbæ)O ƒ”ÔÚüÏÁ\ü^²0{a¬E4~ú‘JU>üÖ›|y^6ûJá±”B t"G5.dNÑ=Wé>lSÄB€ “ý??T?oGTBgùasÍŸîrYNÝ‹7Äw{AÉ/êÌž=Eg=iñ·‹ñOM÷·kJ%{n: ÌØkîJ²å\ÕÙœÙh麵¡wZI©Q•! @&!:¥nN›Qch@CÖ$ LΩ ÷ `]'Ò:¯m À“FÓ°¤Y²&&ÆÁ¼ª ¢Œ”MºáDŽ®“AÌÈÆ”jN²vĦÅd,Šác`ûÌœ]Jä3/$’Q(„Á1ТH,©º‰"9M´ÎóI2fz^³m’gnD•Š`´sJ”ò&ÑxJ†PdˆŒu(±%$ߌ"²#•I](_T ¬D3±×YÛE*9ATÈM‚¬S² .S¯ÿè °eÔeNcm^–ÿã¨Øgî—?ut§_¾½Ó ¸ð2`qXÿ+3Yë×þý¿'OyW¾ôÞ?4)©‹ß®R—y ô¸×M1ë\xå«‚ €‘ÔÔ žßÃj˜þô9s”ÊíïR1á‹oïøÜ‰ƒ^5 D›?;ƒlÓ·¿0`¡Þ‡žÏ?û×£µ~í‹|§Ã­D÷Ŭ1¨üsR—õ?àqÛÖ›o½h¸ŽÑƒ*[¹9ðŽÛó?Bk4®5¶#RR>“_5Ý^y«~çëLO+…1¹«/õ?ò®É¿| À˯³Ù»o˜\sÅoù¯¾Ö#i³yÓ_L "/x}qðC÷B2°ëã̇ÇÃuƼçnÆÇ]¾‘¸ª™Õ·¾°ºýÝÖ\û¦Aðê„÷n4ªÍóË÷¿¹Ê-ŸñÚMñÛw¯½ø…ÅÝŸØ$¤W<¯sÜÇV×~òåüžˆ1 †®ûô!ùèYœŒýÓߦ·<:·÷|v#¢dR¿êâtð;÷ª×Se4ö wføóŸ´EMUŒÍ.ÉN~çþrWLäiòõ»ä©d»¿·_sº»éûúÉnß'3ŸO7ñâSàÞkWžYá½·Ëݿߣh°Óí}Ü£2;6€ƒIûnZ OZF‡ò‰‡p½j¨µA{­4–-³ åʵTpÂ@™a2Zåeƒ@°Ûé– ”nmi""Šh¥øc‰µï(HÀ„q°G5XKäûäŒ$¥X’¨4Òõ ¥@Ê2›‰h­R‡ØSrL9iÈG#)§”«®ˆÉÚL0ÓŽÈ“€0g±É @ñ:MºšYtÖ¥$‘…´&maÌÝ:/Zm6 Aƒ™Œ € Ijذs‚º3¥ú>E!ç:6)h†€uÀA/"¨\6ãLz™òˆÐ¸0nIG=>6Tf¶‹lÓhÙ- ÚIkß} 0 ®F¥lwƒÅb¸-bÒ‹"¾LÙÄŒãêÚjw»[ºµI¢Ê¦ñ6é¦áôÎnßzè®;x påα:„úäw9¿QV`¡Ð˜ˆCÜðè¥æ¤žnµÙwí: ¿X`46vgÏo—îsG¯9 ’Š[‚ÛpxirWÆHý)‚õ ÅöýÌIòœ´X8âÏìºVW×í²:'šŸëØÐlÙó±¥vÿ$‚€wG[í˜7ÍEÀžFa8œ)ÂQ'Ø+û3™‘€írOr?Î%W¾ˆÛ7ÚfœÒXQµi.ÅÕq.»ËÍÓ9'ìðŠ%b3%â›Z*B¡—Æ4cØ µ€@=+³Àƒ9+ŒÕ­[ e׺(«ºL Òñã˜1$c2;jRˆ°r¬“µí’ò™:¦ªT½ Ι¦äU¤U탴B8שÑFˆ’U¬Sž„ G26¥I\å,E 31€†T#µV'm€5#9'&q…¡ÂT‰%v)ª[`AQTöUV¨ “ï*!ÄÒäœÉ‰·µ@*N’)úF£¤6gV*µ“¶Â˜b@Å AJßAÆ"Wy79“’úP( A°ÐY&– ’$ C 8òfìbÖí)ËQA "Šw Â0ò̘…*•wjíV'£ÏµGLj¢¶1] *ËÈÛŒ'¹Ö¨%’Buú\§Åz¹êc+‘€êHb0¦xã(üðS~òq-:œðþM”M´Žá÷ïuRS\+ÕkÏíýñCû7~~ÛÔóž;ùÖ«šã>½)üýo‡Ïúµ6‚™wž6 1è~»|å-õØI±Siøý¯b ³ŸëÚ˜|Ó¶ ÚóþR² –[ÞúŽÍÕ:K„²rål ÖF(’GõÚ+åº[‘î$þ쇇Oþë,}üFÿ£«éÜwÌØ=.@?¹ å8^zÉÜÑÏÝîÂ%/“;?w0¾ú±1-¼t“hŽ;K?j]ú¯?ù)†­/^çð«Õã_ט?~³>ërìÔì¿}C{ãç;œªå³Îaø2 îMð?׿;^9Ò?ûAòÊF©7]¶µs陇æ¾n–owé¿›ÎyÜ€ÆD!À\ÅS_wï¾ß ™8Ë0ŨœbþÝ2ìzä4Þx·ïpÖÔà ŠFÑjÓv#¨15Ëu4áÌb<¸9i#hË4¥P€Ó"‰€&µùä<‘”x𰀨„$öÐÃû®ëÔ‰‹·-ÏõçÒ‚Nu«ÓnØ•—«ï>QÔÝOŽÇn¼/˜»FÕð–C²81] åy; È5õ Âî=ŠN}Æ”»÷w£ü%›/¿©=÷q%$\¹ùŽ´{7Áôϰ×üöpHn¾Ÿû¬r튒 ¨ Oìçªþïk‡Jø5ªôÄNJ„’ZG «SOk~uËØI„–Â/~.OÜU ?÷Gzó+go]¼/½¤„¾›?>&¶ÌÒ m¦£×pâët …±—¸ÿå_ð#?¾`3qS¼ÿJ&@†(BH¯¼¤Ÿ£ï¯¿'NozÿÈ›Ìýӫݦ+҄噯+¼ýžüï9uþyiñ}¿÷‚Ä D€ú·‹1Ћ^Qè ’1uOÃÞW‰½ò¹ZHßü†Ýø–÷Û}o½³ú¦¿>ÖùÜó€~î?ƒXÉžó´H9玠@;ûéAý™O.y[%Ÿz[|þ¿MÝðæ£øŽË«Â‰•f" ¨ɨ(íû¿§þËTµ¥ÕâÞ¼4óogå$Ähøÿ´2G®Ï¬RºLLì’'É£DQ* $>&¥©gS"sK1ë D¢å|é¶kÉÔQd0R)#1‘ŠÎQfk ÈsÔ ›Rk +C36«ˆ0B‰ƒ„@ $Âtns ¡6 ˆúˆÑ%º»¨ ˜ŠBJE„BEaDdÆ&*•dÚø5]äºUé`râ’R @ˆÈ)ç•(l#FHP€­AD\Î € ÑÂŒˆŒ@hsŠãŽø 1Å:vÔ„jE’yR­ “€“ÄŽ3³*€î3ƒ0Z˜8`ÒPŠj“XáHEKJ…l8‘Œ*…¤¨c–¢…z«ÖP‰ (]å¦fV@.êl¢3c¬?Ê Z‚˜7\$¬ˆ‘… «ÆËmA$X–d". A3˜”C–âÁ0#äÎj )øÔÁQÎ9g ¨:!6!©³ÙlC^g3yð!Ù ;èµY`ÕÍ]" *_s†’OBAb´n5lØ$ä@@ÆC×´ ^L&¨áA‚˜¾ÿ¾Õü™Ü /¤¤`ðíŸ8a›,¶Šžÿä1uÛÁ¿ý|鉯îNMãäý׌ÿü ö„¯¹ï½­ùïZ½ìÇmáðeÅÔGÎÉ_üô‘l Uñ¿~ޝ˜O›+úégŽmüȉsŸ\K?úæ²x(<[5óúmå; À£º…ÍUÛ"$ ‹ž;;·>?ó§úØHfÞ´sò?¿1°}õ)å‰y~æ;×™v2!mÓëž9t–?½Üû«SÝÝß9²åuÊqgÿŽ;Ñ”­÷ðé ¿FgǰP¦¾`Ôs/ˆ¤ÏJ‰'<£R7ÿdüûesçè„9 i­pHy”É·wáíG¹÷¨êW÷Mný7Cv®x¨ÜÔõ×§ðîa0o ¿8À{¾iúæÊE üXõ§ïûð­òž‡²(ÜòÆìñ=mbðG=~ÿóÓ^35üÜáW÷†Ù×”Ç~ö5²³JU€3^›·?û?üí.ͯ¯ÿXcQÚØÓî×_»‡UÉA®›Óš8œzÂE+ïÕ{þ{­|Å&(wezã3¦˜-mzÂpa“nŠX3²+ò  Ÿ{ f£DBÆ©™è\ç±n…žV()©ÛP†Yl+ôN–Ds, %‚è*Б]‰³•óÀa¹ìÊÖÈž°.sÈ FVK[@Œ€ñàÊlRtk‘µ™©J¢/š4MydfT9;Ø%‹Ô¢ÖŽФ°i+ Mm”Ã!·1ES X‚ˆŠ5‡éEL¡žLŠ€"‚íTnm’Pƒ÷D °§Àõ°U&0!H€™ õÖŒX|HÑ©šõ£r„SÎ5ªb£UœÄ›~2)¹¤3ædˆ#(åZôKCÉ„LíÄ»aS£€÷¨ûÚ›8œµ$AÓ )ÙÀ(à\L Ú‰Z =€TìÆõªKfÝ‚Pò³ÕÐzé.Ìô~ôÀ0!ŠÔ8{l=Ḭ̂mŠ ³ÝÕIµé$Rm3^Z€ªwb¹V œª 5ÃÁžý|°L3§±> ”"%ÈtØ´pv¶¶a·ßs?îxõñGþûONˆ…”Zî ¾u#<îÑó ãê7nŒ"è¹n¶aï~<åo汨8óIE‰ÿóƒ6)ÙöÙ]…QöÐ7—v¼$@<ú/jãçl}Þ©b3Ì4iA@T[žÑ¨í*ì÷ýnœ"ÃOGlFU¸ãÎøèízùiFÝáo'éàMm.8Ø2ë/¨È[‚yD¥ëëù›ÖìÑsv)íÕq9ì½³™yF< nÇvéô¸ã;ÕY3nêÌ1j´és›‡öΉœtT}î‘ð©o×ùÈzÊÆ“o}eðþ”ÿâ¯Ì¿ÙãQENˆ†D=ﲩÛß¿ßüBE¡Þýá=øöKáÀÛîh!’"Bâ%iE´ãý[¢¶ío?·À_¿(¿ç÷–o?'ÿþW–"‹bT°ý“§Åÿù§ƒ1=ýñóèŸ_ÞtåúµOÞàžõåOÜ‘¿gWAÍŒ=øù¯¡1–(ŒcB`%,¨Ë,2—o:§sÓß­9çYþ† ½~Çáá´ÿããÏQ©2 †$ÙÄÍÁ&þã]Þ[·v$Л‹ÿ±ÿ¸7öëÏ^•.½b!¡0aª—šb³}ò[cf&záãË»>»Œ °Î|÷üẆÅ_=©ù÷?®žøèé„É?´F·®¨‡Îù_~dßö—žÿõwñéïî{Ëuqë&9og½õá™Ñ¢£çÑõ+Ã]s§•½ X×¾®†{Ú3Q1h;µüÝ;Ò õVÿ{•.ÞnO½0÷WßšMÅòj”r\÷¶d+ƒgŸ^W§§ÎËu{'ð𜇦ûÿýÀƇøì»¿¨çÎ,·½¥SX­ÞP›‡Îåä3ÑÂªÕ Zmu`EY’"&;Ÿ(Dn8±"Å€B)bìg²œ)E-ÐØp´™+ °G,”c¢D XIªÒÇÈ ²6ÓTǘE|“²Q¾$@Ò¹%"0À:.”‰RDæˆJ˜Œ.ÆH‰Éçq(ÉtuP’ôïW@1‚€0( @º´ÌE¬¬Ï¸I„ŽŽ£01¥D„!B1GP¥ L¦‰‘Ën5©ˆ((€‚¬\³· Ä[çJ_7µïl¼9æs¥…VÂ\ŽŠÅ6‘ö©E”‘'$‘8Da?gÊ8LIûÛfKÍ™ßì×Ú5A+¨˜”4zë(ô4í1¤gƒ£÷/ö« nA|PÂÆ Zè¶a,À@([OœRÓ+á!õFÅàÞÝã$`,òkÇ3§ö•¦HŸ…Ö Åæ.ìûyÄމȾƒ²ðÂéÌ“˜’SŽÒî?Æ•ÿà —Í€ãCoßÛûÈ™9%Ñõ‘ûG÷îÑ)`üš§\˜ŠÇ<ÄaοýЯ¸XÒ¡wí…ÓOå›>±²å1ࢠózï‡ï€·?Dm{C³xÅ^qÑœùî…¼§ƒŽ|óÛF3_^Gl4ät°÷ÇkõsO´Êù¤02áñ»f.@Õyä†nóSÿÇÊ Ž“dïÍuŒl{©Ö¹ÁoÇ“Ïåñ(‰J²ç[Ýþù}«<†È¹õ>Eà쬭œÀÑ«º¶ImTâÊ`¦V4‡÷·ÌHÙ¯WÌIËmT°sž@Y=46;¦…lΆ³]9š›Û¥í³`Æ8»qj‡%Y\,O÷6@äR"Cœ>IŽŽåAù:“–ÛØÆrÃ6rù¡5¯b»‰Ã¬bÓµ‰AÙžÉp¥fQs4S°&C3sÀƒ†Ýk÷Ø©¾Û¯÷­‰êd0i’-Ôúvix ›Ža¿¼6Œ4V×êg»öXPØ.q^€/GÊ,¡jbDÒÆ €x'¬M>×éê"gd„é ‹h\hv«R´EYÊO/’ˆA6ν(¥cDÈ Yá„l×R Ñð ­ ÉJ"Ò^¨#À ¨Híd%±3}­£OÔghatÐKJÆ¥-Ù ¨¼«b6ŽºŸ«‰ö–'Û*—f™~U°Ï2öQYbŽ(ÌÆswÊDKèUVq°rHðšÕÞ§&ëÌDhÊIL© Fto©5 ÄÎÌpÆPxl=8K˜4 ZÀ«?3TÛ­é2fqa5U¤î‹Óä3yÏs¹ LH¿]ÜïAt$QÑe)üüýéyg”Ó– "üáf8餅Ș rŽÙò’AÜøšm9%Õë×›_½Â2Z% Kßþ¦£$£Ï8J”Ê'? \º %«à~òÍÁq—w”¡J²å õ¡ÿØ˶<<팴y&6ÿ|Ãäô7— ½$#Æ(°ð†C«_º9 À)¯ÍÆ_¾*K›Þvx|ÿÏ‚ÜK›ñY´B‚}Bò¶Zû¯{G²ëÒ¬?(.lye»øõƒñ÷ÇdÃKâä–ßñÌ>có»ùÜG”|•ƒ³/ ·ý|ÂñêšÍ—-µ?Ñtê9SIU±ûßÛ¦2›ò ‡Þ-€æŸ ²íü),4‚·]7±çoM;³´îQËØæ†½áȯ§ø‘'ªÀ‰4Ä›1;½(#[H‚Éc(ƒ2 @ø@¿ÝsêÊŽƒGãžÄ¡LÂÁ¶¡Rƒý‡£S³Ã{#È¡›«; H·×{ÔŒN"Ø›ƒkfíXÄÒÄ$ãå¦Ú¤ÃÒ2¯1ƽu;µ¥ÞØÍ'KIÊiµËN×û—yÞ"™z|¸öÍ´ÇÓ 9äE•U/ªš¤ú=²•VI€ óâ$“ò®[æ.øƒÆúöÈ ©Ñ˜ Ë;…îÁÐÀpÚö;M&­ÄÈ‘lÉ9ˆ‘Ì7¤l' ؃Öð aŒõ)·0Ž¢8 ëùn†7„5;3Z×SŠ£aB$ì$ËÄœ:U= ËÉÕ¨,'ðº&w fŠ)eN4›OQ>”J¦ ï^ȲË‹³3ã­3­'ˆËÀ$h7Ì¥BŒiXéÞhrhĈÁU©6RœR/|w©=aýi´Å‚I&,Þv[zÄ#»&©:1£F»mýà÷Œ()sܬün_“4•;·~í„QVŸ³S!KM"Búìó‹Ldéÿî!AÚrÁ[å1fæämpç–øŽ;ðÏž»aõÃWO¢åÅÇÕ7ÝçOAµçò»;ï9·X¸ÑyLõ_öWÝÅ·ß\¾ï™ !—؆ø3FFÐSzD7Ñxåð=Ò#^9mP¡ÿÓ;Ûî+Ï4ùÄ÷Ô)Šûî—o½ƒÌ‡Ö‰€øûß³ÏßL:®ÃŠÂöB§A?çÓ»ßw‡ @“d|™”å¼tõÝoÛÃïz Þø®EJþå_Y@!¾ú…YnFÆ?íyÏ}IŠ¡`ôø‹ÿ:>÷æëwÿÞ–[^ Å'ÿÚÖ¹ƒøÞg8Ý•»Þz_xçËŽjßËÓ__a3Fèf­a»ë+ƒÑ;÷újÓ—vF ^ø»?Ô*IvåSÊýEsðCæ`ˆÇ’®ü0>ú«Ý™YjcNis˜ûŒoÖçáï:ä›DÒL“§ Ÿp¶Ï¶å @Ã$¢ £¬[d5Z㥊~’–¢›‰ØN–W‚h*;E!aŲ`¨d(]•ƒû\{«ª‰”F;I>(È”fbžr™¤S2*äV™¶m±ÒÑC`C˜˜UýBhbM².…U]ö¤UÊŒV0_“Ì(F· $R+ŠÇù‹g2Ê„$n, Í¡€ÓYÑTk´Î#&¨Ê Š×F±?¶Évuž³kh#B©q-Èb „Š;štÆ TVEÈ"ÛÆ%R•¥A Š2P*É (% 4nÌ*2"1ppl±² ) v" $… PŠX2‘ÑkqÆ$aRÒЀQP’óq¬+t:@tÐÌ‚”S!* £([Š£‰PA´(¢É²¾¥Öƒ 6:·H´N.—WBÈ’ã2f•D…Ú)K 2µeãâb ˆˆ…˜4$C!qTAõ¬í¤ "z–¨#2  @ˆð ­@Sgºò!9@ˆc¥fg¡Í“iuÔì§-êáò@@ll ˆè¨ò ˆØżьQ“Ëòg<Ú©^_M¤|þ“Ú¥+þÞé§} |à5w± ø”×—³3´ö¶ëêK¾ZUNVþáZÿÒ×N+ Yž«ü¸­q’ûïvı­4!)Ùýr˜}çÛÉX…"g>¥"¥á[nq—¾ îúÀ½ ŒY/ýs3ùÒ-ηæ%/)—?psçýgÙ—]ºtÏG&µ×ê9UD.€djð®›Ì«.ê_ÿ÷kø—•[5XŒU9©êõ—5ßüåäοéÁ ŸÙlëMîùÖ‘úÎÀž÷T™D»w 6¾>ÏNËÓáoÜÑy‘+jék[_» ~ðÓZ±lx‘ξþg)M8ç’™þõ_vɱð‰Iÿ¥8¼õš¥]WL†ßÜ“ŒæÀä?¯Ê*5}äþ`{æúßü¢±—œÂçÎÉ=×¹ý׬%…¸û{`.í£­xçs3'D¼öÚÉÎÇw›[n”Ï·ŽóÉOÆ'?"ï]|úµìüC lâ„Î>ibò'l£‘Õß %1¦-ÏÚÛ6þÖN?¬pk,¶*-¹Ñû_)ÿøaÓØ¤×n º8êh0ÛÕby3ßwÀѦ™lóîˆ'ÏT 6Ê  Jù† Öuhu÷àhiåžlÝ\Üò°[Ý:á Øäå#]Z¥ˆfÞgCŒIÛÃ*ž™š,¡tªLšU–*7²,ùŒªò’šZDD°k³A0Äɨ±‡˜s^–¢]ƒi³©ŽRYÓDH±0Piiµa*zÝÉ3ãHê4ÓÚs4͘ƒO‚eµ.G¬W‡-OwóyØúIjÙdh@28ï´ÔAaLÈÃŒô¬Î½H‚H€]ÂÑpâ]ŠþèÐË 23 MÏví½ßVË,ƒûöFŽz¦Ó¶÷{u¨îx•À‰ @~ìh:(²rÿ±lêôž4m]  ò'ÍŽ¼®÷QÕ9Ñ—~³" £Œn!b œ;{®„¢¹þûOxñ&¥¬ûÉM«ÃÁœúÓµ-³ìxÊõ™¯¤·^í|ôBì£:y—ÿöO‡;Ÿ»nåS×4Õ%Åʯ$T]]•T_­@¥6U» ã®óó/8Ž·r}ÃÖ‚Ko¾‹7>f㎗šÕ«ßùYóØÇÊøó7ᛞÞñÖÕÿ~ñùfÛK¢;üéW†L"Ìø’í3ÆK÷I¨Õ]ûî  •”>ñÌöGŸ|Â:üö÷–ËÎ÷dðµ/ñSþÜ`ÈA]÷‰‰ˆ0¨ž"šzåjúùGÇ£5è¾þôâæé}zª1 ´W5%b^»9ž|ǧ—h_į}W?ãÓøÚ£áÅ™‹±ŽòóýZOÚŠX³d.ÝÖ¢¾TåO¾H]óƒþ ¶­ƒ¾áÛCóÂaå3púóµ¾t§½ågu!`ºáKù ϘÕÞBP°úó{êgŽ[cZB5¥b7¶¶®cD“°©)mzÙlfE[H¡,baЉP bTܤºÁ˜¢(*ólFCl˜9±`‘±Õ±Qÿ$¼ø´¬ÇýsÎO|êí馻±”µvíÆvµ×µwLl±±;Y)醆 fæ·ßO‘ÚbÑ'A¶±.£v!Í]SéuZ9@,}"±-:ú™bPTe8¸· Æ2ßìüÈ-dSYƒÊgÕ4(Q‚ìGÆÚdfÜǽ5 éõ[÷í]]:´Ã·Á€ITd¢‰×[Ëõ¾{—c؇æ„ÍŽ# UÏUxàA` DŒ‚ <¸Jeç<6ñ(“'ŸT¹†kÊä1g¸¯üºœ{zKÎ< ®ùG HÀÈ;wÒÖ‡¥Òâtß×kOMwlqWoíÚEÛÏK3Ôtý»W'O›±•jÁ&:­²úÞÌM½l‡®U8üËýa`çåüÇÏ{–sI™’—µM:qôhìWÊÏîrŒ¬ŠÀJ™pÆ3GzÏ]áQÇTÑCö˜ÞÄìo«cÖRS¹ï&N}¶MãqÛŸ¶—Ñܳ3êÓ&”‡æd £hÚ|óÍøà¼Kfÿ‘N­ÉF¡áÜ;)ÍϬæŽoûôÄ¢9ʈHj·oiݺž9~ØLاs—nëñä1³PoÈ Xî^Â@zmšDfí%’Ù¤¥£¶Û[²›íX„×ðÌ/'›Ü`ÙûÕ¼ŽR·~ýÈ.fI´!&´=&ð£¥r%ßV Î÷6/EOâ O,œ;ŸO¹VÕo12gí(D3"àpUuÀéºYÉô ÏŽê/ù¬Ód Ñ ƒ¸ˆýno@yˆ‘QHŒu·S‡{åöÌ;dDÓ¬º¶ =vÍnÅŠg`iG{m$ u@`Sd±›6DI%¶&°¡V&J´‰BB7ЇÅd ê‚ ŒÑ{íPˆ´­=SÍÑH*@B" š‰H“Ò‘VjŒ:©s,‰æ2²AÆŽ šˆ$‚d°±Ä¨›Æ9SEJ’"õ5A´™5®ê(@vP h‰H JàÞŸ÷Í£á&¥¿}a¥‰Èišýk­\–5„Dɰïøö;…&?sÿæSC£¨†¹I”#Egœ><ô¾Û;SëÚ)ÁÔ9øÔF/8RÀ@°ôëo #ãä§Ž7©Õ½—9Uý£Ï¶¼}KB ª[²@÷]g˜?\´ä< ?É3Þܪ‰"ÿé/jú’cÛ/£E~Ó›Å@h¢Óï}géô[óÚWûßþçª×h>v®yüÙLM'Ñ.þõã‡C@À}˘T€ÜÅÝìuÐÙó&°xš~ÌãFsÝ'o¼TÝü¡Ã{_£ô[Dã–·¿ ã7_P­½äØ$r&6+e ~ý[µñcÛ_ÿm?t?5(Íå_[‰a`Õ£Ïp÷}h·ýŸÇ·Ÿú„ d´òýËGiñ*}ßc;×êÁÈB•ç˯ ÞG¢Ž ª1úC}žèÊÍÿ{/xÊØ«_M ŠA®}ÎêIÙ ?÷“Dí†@"üãÿCÖ<&”Üû²”W=žóÆétÊêÿü÷⯯]@|Ç ñÌo{>wWóù¯«G~pRéuϫ˶WÇŒùÇý¬¿ð»ÏÖ/üj29&ú½¯/þ³ê–ë좰 ú¥çñÿY’|ä;Õæ9÷«Á¨Ö¿u†/¹§A„î[7…ý׸ Y¹8It޹h€ÛbS2“W4Jõ’£µ/ϳ?^íŽD:}ïÏ—^|ŠmT0Æ…Ò%MJ|ýNõj€@äQ“É·¼`±s\MeA¢F ¬À)A¡4H°D 労£ ‰ â ¦`€|@&iJ‚4 h=LsסbìåY(¢}eUâ•é´¢00%Yׇ؊”€©nO¢ &]Ô*ÏT‚L* 2'ˆÀ‚ÀÈÊv"JD#ÖSFAÌT,h¥ƒåª“À4‡”`,@P¡_ ü²$¦ç9É8š`ºâèt`@‰"ÚÈäB…ŒÍZ¶&cZ †º>ºÈÈx• "Ǿ¨!³¶MŒDJÃDi¤j`e•–,ér£ k5ªK}«#B É›fe¹Š$Šˆ?¶©¶Lœ:è%¬5qÑ`•îØB‚Ƥ_VEÙøfnµŠ€âê¨HlŶòÀEQprԵʷì¤9?]þÃa8u“y´å¹¿ìÔÏØNücž9cŸ²=»ûê‘3K{Ls~ÂzhyJæG7,(Å(„:Ù¯þA®/xþo{›Ù&ìþƒJ9ƒ¼¢Ót$‚£¿ïU6¯G‚éÙ=š:stÄÜl Çn üœ½ÕüÕõÞcÖsªüÞÃnþv«ŽI«Ý³![“%ÿ nBÆM¾qªƒÃ‡îI辊£OC±°¯Œ!†É•µ-²0„…ÃÙÐàš³÷èXct×NT56Q»}j*:;iºÝ„fz:Œñêê«…ÒŠ÷JŠA´®Õêa‰¡%Q€„…´nOzT™‰G­wºB®+íŒ e£ƒÃ¸E Z UÛ¶z&V€l9‚QŒe„c) ’®œÊÂÀQž›’A$ð D×…‰ÌP æMÛ0 ±BàUËwtÀ²mµªH,w­,±¯uDÔÝV±F»ˆ —­˜–zs·ï Âÿ“Nu«YF͈¤íœ(`„«\e£àŽý£@:Ò¡Ž­|¨º™b/¶Û¬ÖÐ,eÆ&j¬SDi¨É¥,]@r8"ÊõfuÊ>I4üÿD1²cCà\aDwÂÖtöžûòSm/•Ù¯ïÊN]§¯üì`Íyë“§>~uKm=*`Ó»×YÔdƒÙuá\ "¨xË'7øèÝ#_Ëܧˆ| ×ßLGžæ[‰T¬T@(¾Bʲâµ—Œ«sÏâ…ïŠÌò†·¶½­Øsñýþï±(qõëWú«nÀïß0üÜJñøgÛÝäJ±NÂØÇ×6¿ùålÄÍ¥9­Ô¬±l~ôûár‰¢8^šY!ÎP÷ø ”]_z…¯¡c 5háï;4^ ¿áÛK "¿¾- 6¼¾íoºx´¼ÌÓo˜éÜùáþÃ_ÝVðÌãÝòæÚo>®sÞ–ùéIŸ¿âÉIþ±tø®š¯˜$6iö†F ƒ°ÑdŸ¿À§(%6(]ÅEuž±1­)wE`B‘£ÏKóªzàê!T†Â9gS¾uÎÿåPÊ%8{ÞVIŒFU ­;{mß$Bâ\;ìncvoñûèž5%·ís™rþþ]ýÇn'ŽHʃ$u½wßðÌ#ªHy}7x§ZÙu°÷ˆ1ÅÈ1 DuRÍ…ÒZCûÄQˆÆ¶vúâ¤EÖ…ÊvÖW¯`PbSÒý¹å]CŸM$Ò–&`œI’df£§ˆG–UÜ[ Ðd+Ž R«wWÆÎb¬ÆšŠÐWF².¦ºíÐi óU˜Æ&„TUÑ*P—Q+-–A BpZ¥Ñ¤`A¦:a„ ym‹oꀦ†ÕÚ…²0œPkr˜4–­H–i+iƒNü0 0 ŽØtmÅ.’”@è=ÌSàE±09a…B޳¬=Ãfä„iqÝdZ¸ŠË±Ôm!(j&6#H+ì« !Õ¥ðÜý‹ÌŠáÿAÛÆ{Apó@À: ·L€rFG2ƒ’2õ^©^~,ßTÝQ{öGª×mÔ×ßTÕ‚Ý3¶º?ßä§=E‚ñdªÚýÍ{Çç¶u6l D”Ù-wè+wÖzï^B‰("h¨¤it*kž'R_;ˆZE‘ì_s_þ¿UfAÄÎkëDýê :;jº<,ü‡? (d†tûF4Q·@&ùöžJBÚÝ´wç¶÷l,/ùÅ(n{ïýép÷ÎòØɦÞ2Ä©6Üú΃k/9Š~ðÙÁwàÚ/¾ÿµjëw×FD$Ć„¨´4:Eý†Wdž ÿá?øç^ØUÊT¯f`ddPZíyÛ}UdzüÛ&‚Á¼è}ºÅÍÂ[È [?·Éÿò«ý?]!‚*F¦¬×μ^]hèú'Ä m2vÊO]øèݹZ·éÒ0ÿñ‹ä±Ÿßv•—~sÈ‚Žká?¾£?ý“K°:0h¯Ð'‘"P½©—€€"ÐÛÄ«E»•ên«¥|92™-K¯\e°Õ÷(Ä!¦c^e¶äž""Â4—†"¤ŠêA°Uª°³ÈÀ!"(©…F¢-®æM”$mÆ+°Aú»jÑJ%‰ƒ B8,"#ŠXÑèÊH)fÔ‰fD:‚2þŘ`i‚­–ƒäU§†Z”3Ý( °„e'€„h´¤M J#§ìX!¥ÄHPI$²„èJPb(ørí!( ‚ZXP IBJ…‚"QÉ„`+TÑp! Á12£è€$LÂ,Z V  `T$Ú €bp%G æ=ŽJ+@84#.ô3¥m_ŠŒ+  ÖD*,j (ÅÞ£Hˆ …¯"×I4ÖbÇhRÍÒ¶FÁ2³ W­ƒQLõ?©HRÙÄ)Е`¨$Í ‹ŠD)dT³ €¨„¢sÕÈK (IÈSy£µ«jDS7d¸¹œD‹’¨ JŠ Èÿý÷(ûÊã—£ÞrÙòêÿ~Ð?ã#ÙæŸT{?tWù’Ÿ´¾o?ežùZE%“Ì+¤nx¶ÞòÙI­@ÿWšl`ÈïïÞä¿O¦_|kù¨÷OûOÝ0ŒÀ»_•GQôªYCéü§¯¾ìÅÈÌqV„þŸ]¦øÜôú¯.““íï½_µ<ùåcÙØÄB%„*pȧ¿fmoS ø´ÿš_ü›ɹÙä„ÏßðüxÅWã}ìÖ†Ž{Íúæ»w‰j¯üøš•5 “töË»b.O}c è5+ibØò¢õáW7ÕG>bj[+é#+Á–Ý4_ô¨ò˜ŽŠ¬ÕÍ¿Z™¿Ûõ?=ÃO ú/ÞSäÎ}ŠGéó¶™kþZ¿róèç÷W§>¡£¹LNƒÛ=»þ¥[ãMïŸñ ãþ¸géî¡âá¶¹¿öãÖsgàw;A ­.ø&û×cüÈ£¦^ÿ‡QxÜc‹«÷Ɇ3§ýmþ¾ ×, RÄɤªM[ƒè»ïIÿ¾,óWŽñå! µ´µ¬Ö33çí®ŽLG•7ä|à¨õÛ7uš‡óC4îÆJŸ;w\Dq5{O¨×ÙzG//îl$ŒÆUI)Êp¿‡ùûÛ½MIœNœ#Œg›Ïw·‡èôÄÈa%*BwfÌ•./¹þx¥QxØž¯òMfˆýŠE°ÿ`¯oÊûª“KQBD°ºñ±&©æMÒV[&ªÖ2P;Q­ñ*(jOuTn3¯[:gÀ4:Ì ÐèF¾6®Ñ" PJl1Gï›6(YµóSÝíÈGOСd"µAÄ7¥«r‰Ú‡Y×ëf„Ø ÂI×ÅH*NYTÜÎìÔ˜°B$U•»€ËNTÛr:>,-Eì®Ïµq<`F¥•@à±í3mí<0uÆÖ¸–к#ÓÌB³fm¼$_³®Ywg£ÆÝ?!`æƒØÝxAÍÁkÕê¸%—ä £Dì>lFnD8ú±=ã;^%Æx£âÖMBºŠËÛ~µ9Öw"X'÷^vÀ³RkŸŒ$1?ãT»ðw¿ã‰ã£«vËIϰ Úâöüf8ù̲ºâW¥z|ëðwïAú¿Qà…Ž{aKvíFJ1h6ü°³Qbt”ßÿÉàôw´iþ?ù™½;î/›Ë~I>)¢º©ÅÈoVÕžö}B±à&R.ͺw.¥-ËM„ø‹ßàYïꎓ<åqáòKÂÒǬzã;yºWYqò÷Oò‹¶ã´…«?z ¤>4àV"ÿþJuÆÇ´ª¤h^ý/<øÔîé·L²jp÷éÂd ñÉ&*þáOýÄë'¬Öá'?+–>ÜM^þ$žæ¿t‡°–ëß•æ^àþ8êºúáN•eK{~Þ9 ‡?¶¼écáÙ§ Ôoö¬{}Û>︲°jbO|ËáñŠÉi«C Ã%Ö':• çF°YCWØq@ƒE†&׊¨Õï§k{ÂÀšGUÌN¥!ª¤mÂ87ÔðØ oeÜ ¨}Q×5›ÃX¥†W[1ã‚H„±íÚPùr0Ÿæ)ƒá\%é¨.;€”À Ô}I±é/4£Õ„D` í–'d7Ö^ Qi"……tP8õM,°²1K9Å‘ÐX;Ñíhƒ,”Z‹§©ÄÚØNY·;I)„9šTi)ƒ"`/Ji÷FQ€ ±È hDñ¡t­Q`l/u}×® &”gQyYÎ} 7ó^ª¡añ^1ñ@Ä„ªÓk×¼è¤hX‰Ò!"އªß^_´MhºÚT„…žÒ&4jĶð¡*@r€@ ¾² <$=Ê!Ÿ4Ê+çT“Œ)ô¸¦Á#³>ÆR3 †<`CY„fknÀÅùUˆ€‚‚"Huƒ‡‹ ˜Fbé®ûî=HSG˜qσ+A@@ƒ^h™@>Ì6|Ô:QNpÀLì Q~¡½X^B!dÝ9aº¾íF䬅#L9¶úÉ_‹õ/žRGî¿ùÖÒö—®ç­[!B2­bÔÛ6ـʂ(ÖZ‰QõÉØ—lO¨±þŠo&Þ¿–¯Ÿ]¤GBR8üÉäŽFNyToÿ/WòG•µ®[õ†WŒ¤“S­ 6ˆ÷ü‹G€n:,q娩¬¸õž;=Ò5#ïùk½áñ:FÙ«¨Þ±ƒÅùu7V½sIE ÕÔn«#%„KƒËWLêìl ?޼á9­Ãì"̬…Ó’²uRg´o5vm†ì±!jÙ[_ì]9¸A—A½¸À\Ç G‚{` l´xlóó5áXKmÑœM–q¥%¤¦×´; >n_Ú:®;ÓÓÕ:˲Ԭ¸N½Ô‚©fe9ôÜxuxn¡!4=TÈÆH{dôΗK2Þ…h"úDd5CèøÉA·©Al‚¤x–›¥,N.q‹tµÌ”Õšˆcɼb«¹ M5°¶Xà0X¬…«@u’Dݨ¬å•+#a‚"k5ÒF$2j"‰µ‰AКªH,2"G`ªb…ûƒTE“e«$ ˜qÖÈxn”wJ{$Rʈ0¢(ÊRCK )sôÐW¡m;…ªŽŒ)ÔŠ2£°F%–½IA‚†ˆþ‰„X’µ›«ÐŠ\£ìº±èÎo”BÛ=m˜~É1iJ–ó¿'_h;ïÌ^tjûGŸXE‘†ÃqÝÄ?»ÚþñVkå•qƒ¯ÿÝÇS29Ã-·ÉÖ£Ú‚·Ý†›>{H"¿`1[wv3Œ€¢õTV@TRCÑÞaò¡sS$g1KÞò¯*Æäç)C[þ·|ì×bma•šòsÎôw½ÿ ¼ã"ÛÊÝoÙSëÇpÍÁ÷Ýç„Q@±ˆbæÄóº OÎZýºŸ»à¶JÛdýÇ|øð_«—>Á–2ïaªÕíïÝçEô󾯿ÿÖÿ¼·uå+WBTOùÏ.h!h“˜åHLZùÑ…£÷>S[b/ D¹ùÅÜúÈ»«ë_·Ü”’àÌ^Ëáuo^÷~ \ö‚aP$5ƒžö‘)ß þÞ‹¸ãE$ÄŸýZÎøÜÃQ¿ø)áî‹ áºgᑟ>J匟s™Hõ»®Ô§>}‚ÉH`Ü¥±ÆÆ aÔÿùäÎMÖ=£üÕûÓüÞ1H²zîó·>üUU,ʾ7*ýsós7×Q±vW>üàäç7ÓsÎÂåw-˜$賿ÊFb}´¥{.Y.v:ýŠGÒußâ›OΊ1ŸÖý‚¥T±ÿ÷.2ƒþ‰öÏî7À‘=cZó¨u98i-³(SßõóÁìN/(pÛ7º«wz3–¥ A)ÇàôÚÔŸ2æ¯ýy¡ÆsJ«zËËw'%æ´7,ßö›!>ód¾æŠ"ëPK‚ÃŒ”0€?üí±äYG§`8eY{^23wó@q;…özˆäÿöP¿ÿäÅ镟ªs·äma€=wým÷(»×Õ#ÍÌ>`9M«»é®› BœlHñ–V™@ ä†å¨É™ù‡ÝlÄ#‚-ªC’;×ÙΦ\Z)êD×€yO‡L»FD¢Õ”of?¹÷ŒD‡¨ìÉL›lÐÄ«žëµˆœ¤œÔ,DÂrÅ+³µÕã€âpnu†×'Äâ›Qcš £AUƒÒAfI@1@ÕÇŒ˜ QÕ£¢—8Ad ,nTûE°ž™D¤¬Y9FÁâ¶ñÚÇÆ ‘6^kã„”Z—,Ó0DPeÒIýµ«zRAæL·Ì]á Æ`W D]MLJ´–P%1êP„~¾Éº"Þpu¾ßE\‘A±v®Y®LÎ ÷Ýáºe5š£ó”‡ØN4Y§t“%¨Ú­ö¯ºåeup˜Q6®.n¾·a‘ùyDTûn;âÁ©4:$–ôú5µ µQ$žSçøöß,`ÂXÔ 4 )òAÃ?ár‘oÝê&oÞÉuÔ5ç<¡ ŽÖãÖ*sö£Õø}†‰BéD3|¯OŒÒ¶¶--ßù¿äät–¿xC%€,0õŽmÍݯ]=ñ½3›>±P•š¢4ú”<^~ÙjåÄ;Oê SFÅÁOܧ^ì‚Eùú­%‹ ìïúæuÁñ:AØþ¢éÖ™TÝú½¹­¯µÓ'fpíO•S:ï·ëͯ«ã½—×÷/2ŒÖjgcßÁÖ玵QJŒÙ?YŽ¿¼ZYsÿ½u€Düºwï[­)¹ûOÅØ“7e¼Åïø—tù7+aç7Úòo þaSÌÈ€¨Î>‘ý}Uµ§ïÎsêHž—o^ñ*Šè@„õÛÆÅÅôÎ]ZŸä·ÏîU¨*ÛÁó6Mcªµ]‡»›Ñ#yð÷4w<±ÅèãÑ-“îH«êT ƒÝuÌ7K1¢ ;t¯Úº&Ñิ…_´6ê.ƒÒÀE4 UÔ]“6AFC`•éQ0@¢¬ÉG +žJ‚¦(\ òO¬”å ²ÞÈ™Å2p§§J¢¤¦S[yІ‡43Ý.³ ‚€™Ñ‘< t²vb“è9™@ ¾ÉÓP¤™KˆÊžËÀ³Ål0ˆÑôZÚ»À Êe™BñýëB ")¥(ˆõp©h8Ó9¢hÏ®¶»è3LllÅúK£Xô6Ì—c¦Ø W†íɪ:ì ©‰„Ä'\TYÄn·n£€q" ™ÆÁPojOKªQ@Pp|ûŽúŽ½ÅºZb·í€ ™âàþ›FÌ<Ýo| 0ÍC{ÃiGg(<ß3H‚¬ºMºûªaº¼°áœq“…úškÊÞYÓinF×\5”@(Hüèç¥ÅÕWÕ!P–"@Õ,3lzb‡r*tÝ™ükß_s=±,˜¤JŸrzê¤um±æ¹Ù®[ñ¨'mØsÏ}£û”õŸÊÇ1”@Ÿó˜ì¶{Kýâ3Šÿûùê™ïLßA¯y¥Ú³PDÁHÌXaS× ‚@Ozv»jþ3‡ù%ïÐsŸŸ§>éêád¯>*¶ƒŸšÉG?¾ºyâ›\uÙ.oAÎyí„}á#à´–ßú¦*iýίð“Ë·ü¸ üÓ+ùùçSL€JÇÿøéÍÍ6Z jêwj 9 í–˜HJ6¶cõDÀ$7íãâš~„ˆõl£í0ëú‡¨¤¥Ú…¯òá¢ÖJa’u­Ô«xÕU£ùá|/‰Í¾C£^¦½¸ì ¢N’ "««œnÕ¡…‹CnGZ©XìˆL¯ ¦Q½*8£’58ÄR•¶eíLS9Ž@Ò,O•™ƒ‡ÝáBAB”5 iê£(ÕÖäÄÚEÐP4AiŽ£À#°ŽuKKw Rf%ØØF Zgm Nl‡=4yÙšª½ŠIêp 8ªÇbi‹ù’}Q ‘R‘#T”àÊQâlĪÀAX42 2 ë•Ka~ÜíCF(TS£S¡/¬(ït¬.y)º:­ê(,A˜XOæ” i@Êq"­p|\˜{ª%c¹ 1€ˆ@ˆ¶£)LhÒ½K!¬[o×﩯Öw@òÌ¢™É-jï(ÚÞd'ê"™ž¯Äw&h,©…•(€ÒNæe|¦m¡éµWCû¸ˆ«³A˜-Ƕ¡2¨Šûô+G©pÕOj¬~ûN«´s”²5éRÍíæ—=6Î\SDx`·>©Ö¡ÑvʽW/Îî&gAs];awÙ¥å¦/­‡´ˆ†]+Çæ€‡Ç?©·ü)HîwÄ ÷üw’ø^ö^qœupÌ»*¸ê€ß¹·¾|ýø‘bàX}ëîÑ#.Zi~µ«óLÄú+þÀ,&"›Ëkçê/ìaDØsIºíßgð kÚß¿^'–¾¯-%"õÓžÔClÊïìét£Nû窱#38öe‡çÿrdïeyŽÑ¯û×áþß-»…ëg3«ü¦ç>eLK¥–¯˜¨¦ƒÇÝ<Üð°l˜j—ZUïpÉžÇC¶õ‰÷ŽúWÊ ƒÄÎ1ê ÐTÞl¡ëM <ˆUèçV8À õ]ý>S'䫽%¡Ðdgäî[Ê·Í'èä¥0Z7¢¬ãD”,´Ö4Ó‡ªÎ†éÁ°”¼K°Ðàž‰ÙZdá{¨«¦Òl›6ư»e¶f•ï7 ˜$Ê8Ml96Ñð„Ab.Fº£çð$#s0v]"£P›TÑ@NÛ„ C\¯v´7b¢VNT.½¸â8pw¢"ÙDŸFiÖé4¾Lƒ …[¢ê•}»K@P*©\uÈYò#C ‰Ó`Œçˆ …"W’ £x¶ÊÔ‡cD•¢å ×!bV$Bf‡B¡4{„HùªËMŽ¡ˆÂ(‚–+M@cMìϖ͵†òÒ’C_ª ´ãIé=ß¼›™IF·©ˆ¬÷ ÚT¥*4®]èÓýìg¨«µ9Ò“)QB¶ºóïõ§ËM_˜]ó²£è;¿ª\$Üfêd¿òÇ…!‹,]©7?s¼}êqåu_›Æƒ®ºãsN Ýñ¨Ô²"gmmwþäp ŠAô–O™“˜ÏvXdÞóuô½Ï¢[oÛ률f×—5,é_‘°-@ ;?Iù§~öµ…3ŽJÀÕR¯vîúÀCrá[3ÉpýÛ†£ ¯lØ)%”k•P¿üÒÒ–OwMFœÅD[ÒÚ6·~hOáðλaëÇŽ5âáþ÷ìQ©²Ðð]ÿ…ë¾Ðî4Æ@´÷¾}7¿ä+]\}ï­5 ÓØ/¤¿¤Zikžý:»ôß· .Bâˆå{(ßµŒÆ¢-X \wM~ê”É÷½3ÞtÑ~ýé“ñç—®6ìÓ·¿M§^ÒÜ‚ñcÿùZsÏ[”G|6 þ!ÒYIõ‡.÷Q …ArË ì9ߨ·ýVuZl¢à3ÞÜ]¸ð^ÆOü\–:áï_0|Ü·r5mâÛßT^ûïu½ðsß°M?½âÝ=o™Ã·¾$S’¸è®æ³—Ú'¼}j¹ Äîø’›ûðͳ^d.8ØGÇ¿úÅ4û©»ªY,a€$]ùè}N)‘á‚Sèß)·\ÄêŽwùÇ6g WræDÖ·Ž’–{Òúý­í6 !iiøÿÓ‘=a¢# ›f<ØÕh%¢<‚  ¢Pà¨#’æh•c¬( "ÐâˆÇ”¸0•À+ ˆµ0 5%*³XF ¨À$¦B²%‹%²-& ˆxD€ˆØ@DŽX@ÄkEDÈUÈ’T¡Žš‰)" !‹>°t%¯ÝŠÅŒH2åcɵ´¤‘Hb+21‚D­´á@ãMY£è<ñ >µUë†Cä´Îz ‚Œ¬,bÔŽIäÕFDX\¨ÈÛ&$‚"YÇdQ}(ˆ˜fViI¹F•ÙVÙC@P­Lë2­Ô!zpi‰A[²´ÄEÙ”ˆ1é&@‚êz#ÚÝ®·A‰ÅHUÒ0ˆóÊØvËQ]LƬ)F 8m2ÆÕ¹~':Q[kÛÕ¢0@åA…Æ7vfVlº Ãä”’²ÂÅÚF–6ÕÒÖafK ñ‚žGWÝÿ€g€DA–ABMX½³B@1s¦¾óÎ2Û2Qüàºpö‘¡Ò5È„**S›tS¯°c•Ð À¢™ {ÖöÃk׋×`Ÿ¹a.þ|Oz¸y´¼eþËãÒ¨ê¥ß?èlKÿîÃðó˜U”ª ó{jù§Š ‹gb½mJÕ¾æ’Ðf¢1§ü;îþýá/™£Ÿ”gOyØ*Ƭ7èO(HQ&Ï]]·Ys Å$̱¬ËQ ŠÙtÞA—Ý¿+&-[íÝÝ?úÓ1^6Ñ]¾©ÉÇS Rh¦u¨Úµ 5V¸­©• Uºº¿¹cÁvMŽ£Ltq´Úàƒã]=‚(4·$ˇšÐD>n®˜˜[¼w1ò=:™ívÖ®>`ÖmðþÁòî¾À @15jsµÕTºa}Ù욊Ó4èum¿ÒÄýV§[Ջæ‹ÖfiCxÓ3 2–¥!í’5ãÍ¡&ö÷w ßI£ˆI€NG‡›Ù&’Õio¬¬¼ï£ðpV‚Ê“a¦T\¬É¥äi…‰Ú™žLœ &)|]!::ÓrN”¯¡A¨ÕtZi_›èf»¬Mâ‰Â2¥£•¢"’ ˆrRõH¢i¬ÈÚVLT u®B( $¬gZ]™ÃjE’‘Bø'Œ¤ÈÖÔwN„XT ìŒÁ&Ïh#I­òRS‰–JZªÁ ú:ŠUBLAƒf%L šk}F$äÈ5~ç=8ý®³õ„–Áȃ=ó_±¸e¿Ë'ÞòýQ€0ÇH@H$H‘Ï~ØRÐÀ”aä@LO?eø·?‰„k®Wt:ý´R‡ØÂ€¶oK™<ì˜ÚLa €ÈTÊEAÓZûæºI¹üÞCµ"l¾zUù¬-B¥Î?O_»{A8‚…¦ª# @à¨7Ê¡ Gœu×'çÇ?ð£hôøý¯¯®Ôpû…ïkô¨êŒeä¿ýk2E$ääMÛõå?XÎHžÿ/Õuö‡ ¿Ùë<ñƒÅï=ýÇyöÖ¯.ÏÍG3jû;†Q üégåŽÿè®Ù¢ñW¿¬Žƒ²kµþ×Søö¯Zùüxý‚g¶g¿q¸zfOÓÚ@,—™Î~FÆ{'›ì13Ù ÌJÁµ³É¦§=»Q¡Ì8*¨~ZmzFopÅ}s76räcÆ6É?nrwÎøóNý§‘ìüÆø–þ)G´ïÿ¿~Ù6ÕSOƒµÏ†˜É ÊI=]€ˆ˜ ˜ÚIºtÏóOÝ¢~ÎêÂõƒp= ˜^qò±‡OK¤ûØå­ónöï¦ûØ1{ Þ|ÿ¥Š¶‡Ë³ÇÅzg6¯×Ô Þ–êˆþðŽÊȹ*’…›û‚Âý½ƒƒû¼Ü›ÄV¹:„’ãT½¯DÊ*Ÿlð‘dŒ­‹®ž^YX\žEµÓ]¥ZkõÚ)jfNÊ2]§}9Œ©QkRØ•a™mµÄ µFŠ‘’Ó*o {krŸÆ^@‘±–5%9#»–Eר냌Ú)FHB„vµ‰0Òª 9& #dlÖ®) d‘a¥’d ¢$Ð×mÁÁ”iŒ*Máÿ1™ñPW¤N¸Œ†Öã¨,\ÙT#ª#ªu½Öq[Š‚£†Æ®d à°eõÆ{+‘§1j¦þünÇ"å`Qqäˆ`e™D¡DJ[[`½E(·ÆË뮺€Øês¶Mï_9g™{hWdÐe¬'ÀaôwC3§m!D8toÝÙ²“ÈkzTk¬w>z{¯:¸æˆãº¤yÅrm^•FÙ¶*W >t7>k{ÄVŒQ¬ƒâ“—Ç'G+¿¼Ê„¯éZ—ñ»>3Çß+‘ÙŸ˜¤ãö_¾·!1›Oê}4, E.PB¤±^qÔÌ]ûžUY7“}zsç®AüýŸ™ŽúÌVÊmè¼Â6ŸºÌÝr+M|·+/|YýƒwADÃ#/n-¼ïúeÿÚ¥Ö ¶4úõ‡VNýxÏ¿ë†påU òo³€ ê„6ĸøª*«;Ç}•{Ȭc É۟غá%‹ù—N!fãSn̳žUjf ¿XvÉLóο€ø°¯¤}õýÏÏúê°,*¢À¨¢RR×+AºÂh%(µlÆ:é¨ZÓïA·•m7C™_Œ*ˆÁè2Ƭ­\á1ÏUUE^œ 2æËJxœÒ($SëËÎXO#¸ ™l¢\:cŸ‹)ÀÆÁVàHOa+Šft­TE@AJÈrˆecÔÀYtFtcCb¸ZŠ›jeU%i›b! ¾*#€øQnÄ8Q@M°Óx[޼–HÀQ@¬I )€I¡²)#FÊQ“baTi-¢çº©u Ž R!Cjç‰gkG&r´ ]&9 V›íF †Œ@%‰Ò¡ãI)Dbe#ƒ©Z€MˆI´F0 EFË„ Lž #2( aÓMÜpÀ(Ô¬ZqÖ»4w‚*š¡¢AAÔÐäíeh2S@í@Ä'3:›…Ȉ¢mD«¬TBðO†}«€I œe•± ¨,EfD !ŒHL ,DSíÛèܱРQYHcŒA§9M’PòE `RoR¥ …h‘D•CT10íÒ¬@B ¬RšÂÆ÷ů¾³Õ¦Ð¤5<îìáÁ·?€¯~MîP޾h3þð‰ƒ€bT]¦YÍAÌ›Ÿ“\û‘¹“.\~þµ•+®ÒG~¾Ó|ÿëÓ>= ]’ìß`eiJÚð‰uúk?hªFnJoT ãè’ïÅGüÏš$ê$ •0i×+½oo‘„Üú«ÿã̓oH '¿ü½ÿqÉ”‰e嘱üàGr¥ùäçÔ“Þ>VˆŒÔ"Y|Ǹø JO½7¼1¥núìr…L]͵ˆ˜—>º}çW¹f㜺õ5*¹àTû²gÌÞý¹EEO-³øïü‡dÍ›Öt÷¿yéÌ×£ÂV帆˜Ãù§W+» cöÒÇ)±÷Ò­xï;Âñ¯_œÙ˜è«ÿ8wòs§×½ê_øÑ- Xz åU^Ýüê5×<«_àDû–_¨ó7•wü¹©|ÒÝöÆÅ5?-Ê»kaÈràè#sâT®“¹ßk÷gí—-CS§é Óuœf¥ªâ¦Ç§ÁFÜ~Ìä1)ZB¸ïÉžÃhVÜÝgµõå1ž¶GM#÷ï+ל]E5SÆèØŒU‹F"Un} ÀéSâæ^ŽõÞ}¼gMozyµÉ¶GîD%Ô°Žº>8ÂîT>:èdm‚ÛzÎÍÕ»÷ÔÒŽ®ƒ€^Ñ`4XØåu3/7/{X5+L“Ç&Ç^Ž\W†ÒìEìù8"#ÔFKê­U,Ê ‚VŽ,‚ÆhŠ&§R‰Üp$Ý]T(A—ìÁŒð®ñZD@uT-5К–ÒZ¢í8‡Šßø:_qA<i5¦:‰LÐÌ:NZcL:¦¢ÑD“bŒ2[Ø„45Q©ê‚6n4ˆPkMÆt†iU/ëm\¯H!Z¬APú@4®Q`$ñ‚°´HûÙÖ$ê嵓b‚ÈÊ®½ODhÝŽnl–(( ìVViÛéçB”6L*˜ô2¾å(ùÛÕd9¥i2Í*¤¾Þ¾¹þã‹"¤õHÍJzg#÷ÜѨÍPîê[~Uÿ&É#Ñç†s&¥Ýø»úˆçç§ÕS¿ÿ»wv¿6Þô‹2ˆŒðáxïÿÎ:/B‚81’ ˜§±7Ú1abH4(„™Û´¹Ú4ƒ,`qxnfs?8&Ãztoõ¡D4¡ñûä“Xc’‚çö¶#GËn´/ ef2Ojï Ž,5&ÖLÚîLlwª-ëV¦Ú æ´«‚‡Ã qT§,‰î¬Ö­¥3\"żž²Ýõ+y'‚D¨ƒé4YǦ¬æj«Dˆ¢ E]2G’á0ËàRÙÎøjÁ¥Q¤ô˜xÓªœôóâ}‘¤ª ˆVP¡RQxØIÚÉ“4kàÒ7ÿ ¤¥j2 º%P$Eî÷ã˜ó<‘¡ˆ`îû“ ,%:ðÁ(ñ‘¨ÒB±OËÚ N ¹®ÑS6eäF¤k#7 w虘Õ»e?*b@Aëe}ìhfF×êD­Œ÷.‚0c³8 ‰k´J(΂xÅ"¨JHWû¨Æ×·X‡RÇä‹ÀÓÝ-¤º¶ “¹×$5ûnÈ#€U°ÍÜ@ú;ÚîÀaЈˆµ7„R NrŽæØ]ÊŽØ–¤zõÐ ‡ ±¨$`Ê ïÙÕpÙQ€C²rÃ_KŽHtOá÷^±¤Ÿt¶MÿV®þ ²gŸ öep¥Sä:"ll,hP€àŸ´me¦«1“ÂÅO>0õ”éþáo,÷ÊÈ¿œ‹·{9âe&­ë‡gñàwWVæƒEôN“í&pÖÚå;~²´ú­¶>ú•ÕY9pÁøç{rg³PyújÛù‡×¯ÍÒGáò™)ƒ'CYµëûË~’—'žÞjÿ¾Å-·ð”ÌÖ—ÏúË,_SgÛž4>þô“ú·ÝéD(„À-Á£ÎYj¢dâºÍmÞuãBöÈZcÙv(!§úºù €¬¹ŽB=Æ^;+€‰Y”¨&1’Ìœ¶âî?({ï=tëª(rpçÔžÂÑÞ$½¾Ï‘)¾5[?eÚ›­ÄÖlöàáÇ×ÛÕÙÊXåfkûjéå ËàÁ¾>r¢\z(ìïm"³Žg¡0jcWÕÒ÷õÁ&€JüÊÀMp1¨h*o&§ãåÇÄÇv5g;ã¸Ú„)]IJ9˜e˜)Í €‰ÉL`5’f¹èxFÂå´Éç9G@ ÈR#  ·Ë_‚ Å.òìBÚ0YI"œ„e4 !3àªZ·DŠîË—-Ÿû±Éø©aØÔ6†Y¥‰úõ¥}50¨,Æ­oVæö7ø½‡ù¡·æQ:ñâöÏÝë|¹ßñ¡N¥ðüs`î3÷OR)]÷þýáuRUã}ާw²Ç}aO½páèîÅ (Ã/oÖ;oPEÁ;òк7l°€uª”FÍm®rb$ÅèŠCˆ\mP$”zÜV“hŠ Q5#F£NBó)›ŒÌð@ZTª•o0 j L,j%bl¡r½ö2T³€Òj)Š,àKÁÈ*XAö­QA QÜX -± )rM Œ1yk@€C¨tM()W¦ûQEÀ—¹K£bB,#€2‰@Q¢„¢uh$÷`¸b`È1A$i˜–AX‰Š"H¾–$x1‰eˆê`Ö¦#ºòu i2ö£„¤^1É”‹Œà€FتóTÇ´aÏ€LÈB­@HéÔIŒx0l"` íD²ì¤,lTm…u@A&‡Úov¡XˆBÐ_—ï<0AÒ#m+2,.ÀÂ|!\–Ä‚€äkˆZ›þþ•ÀŒ(‚AK1(Ë¢—¯‡`GA.”;x`QˆP€0é­ÑWÜVD„’`&6m¼æ4•µ´7O…錉Q|ËNŸ”V² ý)'.~ö·ÃÈ€ rÃÍÀ‘Tp]‚áC¿ž;âåÆÂ01€¸}«¿íâ#"ÿ‰_—Sh7ýÞàžQ¼ë]µ¯~]üÖon=ø¹û½Npñ@Üô_Saö½ƒÝsì±þöÛ=Ç~X5zD')±^rfuþÙ­»¿¹ˆ üãF¶O­÷obm`þ‹{Y|ó’3î¢ý°oúßòÁï Pbìºÿ8Œ ›þw|äVzÃ|#€ ;{Ý߯{þÚÕËw-Ÿþ¯ã£?^ç¦^ŒýtÛE:; ­áÍC8îèéפKKnlLóD¯ÿ¸ŸÁDáFÜÜ£FÁðˆT£4_hJb½xk¢Â 'ÆqUÓÀò„£uÝÓOΔò®UÊ´S¶§LT½Í¡Æ§›Ç J5¼~M6~ƒýcÆ[Ã{æqDZªå66£ŒÏîOŽLôºÂ/ÎTjò„QŸö…îi¼)Ù8žÙTIk¬½²un&Oø‡º'£É#ŠÕ•ôrT€ÓÖð!®Ï´ –†Ã cÀê`¯Ôa©Iÿ`.DIÖÒÇ]Z‰ EÐ<µÁ4"zÐcW)ŽJçvrÜ¥­Ð¨8¬œUT¦Ñ— XE Ió4”`tÚjõûº•eª’:9±$\ÌlÀH8ÏRŸA@b™1  ˜ úèœóh2Þ (`„JƒÝ$ÔaT+Ì´Y"‘v13£NßÝ6 êBmc5Ò"±JÕü®V 5ÇÙšf¶/|ó¦*0÷àQ²Án5Þ;–ý÷V‚è{G®åÛ¯]õìŒv_¿ÜÞ4•I£ˆ±FaÕ–Û0QÔ$²ÿ Ɇ•5HÑïüó!¨³æQìØ®¢õkê™?Œ…½ËŸ´Òˆ·_6ËÄ*alptý;ž õå75ü¤Ðÿùíò¦Guïøø\D…NE£tU>÷_Ö¶r±ÃÕ×éG¾%w; •(¼ñ[ É^ô¸”£‹-–Ú¾cWHá㟞gbšH8ž*§0|ÿ/å _«~b$TKŒ°æU[üŸ`üuÛ¢U’ åÏÛQÌtyå’½ñß·fZ‡É× ðºÏ®lwwêÕËå¯ãµ–öKÎéïýL³:++_oÙç<_ÆÛ’<ûäî]³³õ~‘›–íÌcžÐüâz9ú©[›T—eÇ¥Tþäö±—ž®A£¿âÚÁÍ•BøÕ?:‰7÷ ¤þѦ®Q 'üÒ(Âigæ÷ÿ¡ÄôŒÞ¾a;ÆËö¢Ëó\ ÂúÇg“wîëµbË®Ü{_qýIÄž¾±wûMAŸÖË·«THN™p÷âî±ùødÌÎJ—Îêrܵwpò±ÙôcvÑz Ýãíc¥9lë*Yñb·äb¢)J8zZöÊ/fW=½Y3iâ™ÕÂÒiIÇ ¨ƒ c;º¥ŸMQRg‘Ae¸\G…ìSÇvjjuœÅ4]A@ 64†¬åµ+TJ¹esÓ[G^@ ÄÚ´ —UhRôV;¶&Õ&ŠQ ^ZÓRÁ&†»L£HË”•U3c{%†¢´["UÅFi±®ëY:5FF‡If-Zh„ª)‡Ák ¡Ñ¬‰5‡ÒS]{@lðäÔu£& ˆV‚Âí “†A·|lJš‰k“è0b(–W–"BË·•j‚ò)ÁblÕx!ÚØ³ ŒMu *Æý‡xuj [Hÿ$ *³y ð€zû ‚³i¢ë‰Ü‚ŽýC³°*è¢cßpsËh‚ú®D(š™ ·ÜV{‘ø èWsçuû±§Éþ?7¬ëªm`~žzO?­¼ã.¿á6U,`Û¸rÝmtÊö©šÌÊo¯­½!‰W  Ç+é çN¬~~çÖ»öª 騣1z^Ù}É“!<çõã¾û>ìº÷\ø€s€œ¾ätûÙÙÖÛŽÑ9V@aâ]uóÍï/Ÿü‘ImX?çà“P|ñÊðoÿ›ŸpQÔ-´O{ªpÆÐ(Ÿ4F«(M¤ã>³Ny@n7@zâÃUõ×/Ͻ ƾxVjmÿlQ_òãêáŸÊ-¤å÷?³²/žƒ?ûÄê‰_Þj6Œ ÎüÄxøàå,ÈU4–'ùßϯ»çˆ`(©&hrvã›Êí*QM¼},²Ö퉬8بÔ$1rãRÚËÆ Zœ0FP1¶[‘]¨j Z©Ø'‹CÁzè˜u‚ˆ1í¥›6¸²Ü^S¯w›•P0P¢†3“¥]êÎ WfPÕsCÌèº`Ìò..ñ|-´ÚZœ‚+HÕæ\'c¡öRÂÚcK[‰J€ÖºÛÉFq\×UDm:ㄹFÒ:Ke” ©HQ©–j"†)ÏUÔ˜ \&l)¦P÷%K’à4„¦^q”ÎR‹â@…ìˆ&#z"Ô ¢x‰Ö™‚Ôµ>kyȬSÈQ€TA“1¶U¶ÔF01{0H&¦ `–tŒ# Â>‚P‚I£o*A ŒÆ8åE¥Qƒjc@b@´yJ)WºÐ¬!2¬SÛ²‘­ëò§]¥ã•E‰‘JÀnÕøÔ6¨´q¢]Î& œ$” @©$1™ ©J$xl@ÎH ¬¸ N6m´ …°ˆ„¦Læ](EB0Ó:'@ Ðè'ª¥mi›6LŒŽªˆڼì¹!Ɇ`ßùÎQN¬%¿òüÎýï½ †Xâz‘^þ*m<è6øù2¡´Óx5iJ€/k$0\ò%Ïh¨‡½gíA¼ìÓ«g|r|î‚»b#þ¶÷í @ÈÔÖl‰?}áJ„¸ác'Ø¡Œ¬½p«ýÝ¥ýSß¿ftñ Mðpûù:Æ€Õrwë7‹$GzÊ“E⪯ÿqùÜÿ^zy3ò)°&ûª§LôºÐ¹À øÃþéoÜ”u#ØÀg¾s¦ºäî•竦iÞu£¼ðµgü`X|öʦ¨ZÆ8\õ'«g~`Yào_¦Ã²Wƒ²)ÅíûÏ<<â5c­5ÿýù³ß¾^«( Ûpä%‹z« ÷éîÌ Aƒúù«Ö­´Ï{ü\‡ëÕïÝUýòVÙúê×Ð]—-?ús«ùåßXº{ãè¢qzô…ì¾¹—K‘£…öø ^W/8tÆë;AêÉè%$æS·ÂÏ™ºûûKQ1Ê®Oéð×HùXvìÛæðÖß§ˆ?ì«SÏòç&ìžD‚›xÝîbñ+å1OÆ#  !×ޟݹÂÕÏzîYǧ`ÃÊu‹Ãk*|è[i~ÞzÈVBáüÍÇ/Ï£·ô˜õF€C†`‰:˜¨ù„C£3;ÆÝ_¬l9ŠFw-Ã)SÊGH¶¶ÆùnXѱµ£m¶ÛŸ^:¨Ž÷SÛÇÊÃ1†$Œ [iºí52o˜É’“÷,77D„t´©MŠVL ›¹ÔiÐÑzIK_GaÍ‘…U u\bšè¤Ú©˜BµB: jT)ØÒÁÇ,$ÀQ@1Jˆ‚@ÒŽÅP-– »ˆä2m‰£G$añN™TW• DÐE}A•«,˜|,Hh@"3¨t;Kc’ ÛF›Û«vl,M!¥h€-S{}O!@Ö ¹¡|ÍtÑ/²˜ñ©e*cH BQÅÐDÝë¦IçVA0¬—£bHª¶©j@-êÐ 3&k&r#pèÁâ¡9𴍙’#6ƒR~ù0j&ë`ªKyêÀ!®›Ü¬€–ïØY.,I3½nðÝŠ7î8|÷­µ‹V„dÏîüg™+¿qæédž¯\ןtÅ¡¨ãžíšq'<ªg/DFÄC¿At¬°H:¨V.¾.´A|þ„‡é¶íÃäA¬ ì쳪¯þ.þÛy¬síP˜Ü¯,Å*Ž~ˆÙÙÇ7¶üÊ.7 °s¯é¿&å4z–ö£NüáËuô6Û¼Nµj  Ò´õÓî''ÂÒï)^s4.~òPïCk1aX÷Îéæ²{ü*ÙñwógœÁsŸ›åß¿tD¹Oœ ¦/8·IkgJ=þ¤Aýz¥!-â_~¸rÔçÆ# @@ý–™]¢d«¶Ìš¹âÞÊ{·ÌA~H‡•)ʸ*<ª^&U 7ßZ_Ô+1Œó]½£:T¹¹éVŒ u¥ é‡@¨Ú™9uí˜söWÞ®6‡|¯»&ôwU Z™T[y«FèNSGu1nê!îr/K)˜Ä K$¡MEUB> ƒ²9Èk‡Kˆvqy¼«Ã¢ÖXjVUÈQ [c*BXö˜ù¢vVºÕŠisôLd„8gèHQyn0¦ì2…džÌZ…«bX xÆ5 Aõ}ßq'öM‚CGmÕHj|­ç!ˆ"öšš´¥ªºRªÐ9¹h7ÔÊGÕ± Á BŒ )5žè\D%ȌԶµbÖíœVÁLtºêB[è*ONPH‚"V¤PÔx+U±fi°”G-‹%*ÌLb[®5¡dNg€ñ€QÉ;›¹P.33…X¦Ñ3¨–¡*´» y)›Ñrµ¤Á´½Wuc…}gÃ~p`Ôjq~Ö%q0@Ô7Vz_–J[MôªùŒ’ÆÑÌL¿þUEd*¶*¥J¯ßÒ¤Öxµyn´ mí«ÎüÝ­ÎÒ$ i`ˆãð›—¶n#!xëà¶ÏÍ/ôøÓ+[«‹î®÷OáKžŸÏ´"úeÝÚõ±NýŸIxÅ¿…+¾·¤4ÚW=Ê-}t)IûÄ'傲 ^è_^FÑü¢ópCF¦]c×Ö7}Po}ÕšâÈÄÏ^ÿºu­ïý5HQs` ‰Nž´cUG +Fpm%NM%õcž˜ÇA$Ëá8$KÚkŠ6•‡~²W{¼ßÚ’DyåÎαOlµÇl¬Åø]¿õ¼MHœê4÷Ü2JžÓtoY5goo¦ÿ:Ürnj3¹>l{x„!baDÝA8týÌÊäsª[¨Û§÷ÔŽŒ§ÏÛ¥sO·>ägï9D ›=N–®[«NƒÝs~êÄÜ(t1H% ‘†wê×Ѿ¢hiaH»ë²ŽËæ7«¸r0:cϬZ`ËF¡3–(í’1Ǻ‚ÄÕrð‡²ºÏ¨Ÿl[…62Gäëc{Ù¬N‹CÁbäTÇZÓ^šoo$VÒ߯ÚYj$@–èl±¢KŒñ¨Z€ êª:4ÔVÙ´PƒïPdD‰*†ieGv¼[}âÉrõןvâ´œušÄ<ÿEÞBŒ’€€·=ðHÿûÉðÛ¯Úòîmš ŸxtâL¬¿þáß®P‚Aà–ÛaÝ'Nç¿~­>ñÓ›3ä¨Ù‘ “F¼õvµö³§7ß¾´™¾òM¶ ÃÉÚú;_ö}°ñR“ë„_ð²1ÒÖ‹2=%O3ØÝòчæþCId9ž¼Ê,X°uú).?ößÕYYc¹ñWêÀ£/˜BÅÍ>øh}ó+BóžÆ›^1ç› dê [ëÏÿ¾yÖk{©×˜Êj¢âØzãH„–_¯Á¸øˆÏŒó‡~金©z#ª—¾-I=q£«¢¥ïúÏþç›ëþg^–#5J4AÑdŠzyªæšH£·&:&E9>ìùªK–F ¬Eéh˜1MÉ@ɆC2Õäõ"‚P+ó1 Ÿêaˆi»1J¤ªàŸD°F€¢šbWVH@ ]€E` R4òÊüË Ãp%2€†ÂG¡à¸Ì‹‚(ˆŒñ 1€Š‚@6ÜýЂ S•¦8éïqL¸Óåsw¤Òȃ;GÙpR¢Õc2”‚ (­4€4i|Í“›ü¸X9%5Ì"(ˆÇ¿{jé÷¹/ý\÷úIÛV±tÉ£~<\¸ô¡:¯ÝñïK::†È#üìªD7ñ_‰’“¾´:øôîÇWÓIo^GÊu7YA‘ƒM5ãv´gN§²×?Íõ+¿\Ìnïã–ó§Òý8ì6¼bÓ–·=°píÇ.½q;s­Ý÷ÓþhØ#€²÷š#‹¿ü}tòs:ëÞ¸Óž1T“Žú Èöº—œPœn`ÝS‡øÐwKýLİ-åïùU¶{•›–ðKÍ¡ßvDŸÎ\Óæ`ﻥÞxVλînâ9æð? ÌmhÔÒ¿­”¹Ìž6žœpnÑ@3ôÚ Z¡Þæo_å9­ :‘D­2™´ÊJÆ&Òª ("jrM\{p·ŠJ6Œ§#ë‰ùÁhÎãÊ.½ºvkÐ MN·8ó ¥L݃F¹Ž^6‘• Àpw']ßUýÕº;Ñö™ [h½:Þ?¤Æ& Z395èM¶. jTB«u(Pz›ÊÒÇQE¢R nTÕkTˆZ­µcZ@GG£eMÊ©EÝ!’‚…š²Œã¶ªµP׎]Õ fÄ:‘ÐÊ…ë»F+àÐ4!I’6§iÉ h(F‰ QH1è<ú¶xAá:xŽ…á@HYð:.ùE…I²¤ÁVSêÐA¬³BGM€Aäëzu™Ô„ØFP…²õk³TÅ•½a”B®P'ëÖÒÎûEìl^“ä, P9ÀøÐAĵ+Ê ‚:nÕÚ^D(64XB‘Ü-Š˜" r8=UEô³?¿»öŒë³íÐÿÞR‰è£_$°}K9¼Ë+å?šÛè÷üê zâÙkË˯,ª§é5çž ]ì:ð”ER<ë ®Çè„cVÝŠ/~n'³„ño×ëºfù…ØÈþ/)ó_PëH i´“æw?±£=øÎÂÓ^™ÝyW…F¸AÁbкæ;óu” ŸžÁ‡àXs°¢Ù *ZùìÞúùÏÊÖ¥µ×Œ¶œxÛ‘6KdYn¦ˆ`âõ'™ëÞS€„5wgì¨{e¸¯–+îÏaÔ®& Æ …>GiKT;?¸Ì¨@PøÞOJ~A§¹ìo³g¿5McôC´•ÿwïàÆ!ƒØ $ý·cW°#¨³ÝëP£¾u»Xõ:üéöÞ-KaìÓfüw±÷ø‰qlM—hh¿?@lFhŽZCÜjïýÝRˆL6±}N;»ù†fê‰ÝäòÝ!Hë{wJn¬@’PrÚŽVUU›n-ú;Öu¦zšl-zËToß.`&ìlI´ßD&!%sK󇆑"c‹›`)®䉣Œ¡óTÔ‡‡“냩T0*ÑPÑ,Ô>"ݘª/œ"‚!R­I8yãG1DEJÚ@Štt†M®3 :Æ„A‘0Ñ 94¨“MãÆ`_Z¬„¼(D@€(@ ¶R³4¢/ŒÛ'¥A e¹šeg²U‰&Ž’„0L·X¢С¬DIÔˆ“c\p_b@kp Ãq›²b Ø_ƒÑsazÃÀЏ¼%Y5‘ئÉWzMÃe¹TêÕª‰Þpr€MÈÓÁ˜Ð?0Ç™2“« ªŽ¬£aálÖ…5ݶwÚ†€‘×&J­Ù˜!çkSFHœ&#QðÈcðÚ#ÇÐß¿½µn[½ë[wD`X\¦¢s\ª‘B¥I ”4…¸PHWoÂö±僷”ÓEÇxÓiƒ4\õoøS͈N¢Û#· e>ˆ'>£—zpwß_÷É']‰E¡©å>û½Gè½fK‡#¢¥# *W|û®($Ä0þÉ3}ܾŒE€f:æ çÕ¿Ú5;óêÍM½Æ“Øqßù;ù›)ichý¡@©wßyS¹ù+;œ4­Ò‡(*ÿ¯ÇÙßì!0oz~+áHhh†… °Žü·¯Ff¾˜,µÅµ~éç:‰…Ú”ü­Ï•›¾³&¤ZÒ•OììmõØ™ÀÍ>XïmhK×°ÅSM s% ‡êÎɾݮ¦n‹G¶ìºdth)âîA{Û”Q\ò@S“´:ïq]¶n\KV&ÛÆ6ñ¤Lx€™^ Fd´A@\`RN)'’wͦ•QΫ¤+c«& ^Ï¢´E?oOêÆô\ÑtÔú)Ó̌Ѵâ(Jãª8\)r5 Šm°1G-§HÄŒ0KÃjÁòO”kñ޵Õ\1@UU*8ЙÔÃa8(1á®V¢4ÅÒC5kW»‘@#àkC…딸FǘÑh>ú܆:ªX)à‡µŠž#B¯A©¤ Á&*Ž@È ‘ö@)“C§=Ö:eTŒ €J(D…ʨ¼%¢[‰Â Àxp@ÒŠRvà“`ÈFÊ[]±Eµ(’‚u@CjYi V)$P‘ðˆu>œ€¤ò¼˜˜AF‚Hì l`e,)¨C4y”±¢ç¢ VL 0"ˆ&ÖÊ‘€±­jT ¤ŒEÊq<+‚¤š[Q¢T3'Lw¼‰Ö~ú(óõÿðÅÉã¿R”ßúæð–ÛiË%­nž¸5)O}ô$ýó/õ·jc(~ïkÅñŸÙ²ùóoÒªæÿx©)“ø­KûL Ä6 ‘zÉ+ó}ìò˜¾°»çC{dÏ"P]xMùâ·e'þ´8ðÁ›ýã/˜æN–¾ýM“èRNþú¡õÁwû¯ý|#$ª§U»GîëßÓHµG!<ý3ø…Ë›çŸ?ußÿîuÿó!$€“>29øêŸ–ûÜñRmßù.žÎÒ#¾âë´®G¼ûµÆŽF £”-_ýñ• Q{­ î©å ßÉ"EˆøÿQ€¿ŸÓáøÏ9Ïx¯Ïø®»Grs³#[–H$öÞ¥¨¢¨ÙaµJíQ¤ªªV)J©Qý¡¶±C$‰ìÜ}ï÷~×g½Çó<çœÿ¯—5ͱxìÕ¹rJ{ß´« Ïö¸#ßµcÑ{òêý×½¡²}¡–Ô{þ™I8ûÐ=îʯûÜÿê³ó¯]×ܳþEgÈ—ÔžþìͶ6úײַú¼ŒOîÒcÏÚØÔã•ÉÊïÿ®×ÝØá•—å{ú;;ýê·ÖÎ{Ѧùç]÷š#Ÿ>(?ª©“†@ñÊsû†g[·X|ؖ١/Nº¦™ˆP¦‰áÖ  íÂy`jJßoeФTòÛM¶}!Οu‰÷Žðè­›n?0†Mý¬¿1«¶M/¶'oÍçæØ°D…mÐ(j¥®Ð`&*RÞb @ÓVHÔ;Ð…hêÅõFIP©è;JABD×ïùÜaV,äp¬¶©‡©­Œ´¦ìB¶%¥’R"µˆ"¦v‘•’F†aÙÏsf$,¥hèTQÈJŠ[Vg²qiØf¹·­/|NÁª€ñÐä.€-» ¡a[B 1`B#ª]dTTRõ[–¦¤”—½"3ÜZFÅ.eñÞÃMTЕ’æ’ ó8Z[k€ŒHP"dyÝÎV"* ‚(ŠlLÕ‰kD€ÁyE ˆfP¹žEƒ©WÅlþ`\]ÆûÿçpbДà´YÐ}øá'·eÍrr~9ýúµ+¼Þ¹šõê=+Õt>Zk ÉÜigO7oï¹äÂŽK×Öö7QÖÔã0\Ûá1osÓÌê{Ã=)©Ø|²û‚YÃp’ÍüDŒê‘vÈ!ëÒÖ¬#†ž‹íl}¬b[rùܦ©ávܤ#£Ö™Ìn·˜¤ ֲ냙Ë:*‹P3dÎ2NòQ”Ö–z´‘f-Ç¡W¯(~a»2„ضі†”™DSÅm›;"Bj˜@ °e°N 3A£FM Ì.ãŒÑ;OÊ™o ÀÖ vYP €J1ÏØ6N挶6«F÷rFÞgc q5MkÞCËÜN ” ¬Pm ðh¸ë @SoÒÖS®ÎeF@QY‘ ”ó}Ðè-±ô93(칋V;gòÌú-¸"Ÿ·`UX´Å¥v‡ÃF©ñN×Ln•m±)xÖÉÆ UÏt<Ê2NÇcQ€&ƒ-Ù  Pļ2Ytš$(Åœ» ŒäOÚás“øt©•’x2b²§œÝ.ß»\ÖšŠÈ ˆI=ælA, üÿHå’yʶ  Ñ{'7¿»CBúég–§@ÛŸß+ݬtu=¾óÇkwwè|m”‡^ÔŽÅnÚ”QĽµ#WÆ€ [VK@m€_}õøÔbð9?åA™#gÈÀýfj§ÿµ Ï|¤9ðك핛íÅÞ,½àPÛõƒûÊÊÚj2st0e±©³b«GìåK{Õè¿îÅ?9ÏØDEüýõíë‚}ŤXæÖÞøSÖv_ÝÓJÍÎûoº÷{µžuœÉm»ëwõ] ÞÊÒƒ‡pàÍô×èæ®jf  Ý£N :ð‹‘/†ˆb#€ˆ ǽ'õꟵ¹»k ¨"ª*º]óæÐ1Í·Ï¡ïP;ؾ&ÜÜvRG[¦UŸ3P˜6Dó}wBÏöw®—»æ=«Á)—[cYìZ±ÛÉÑ–"‚–0ߺÔm›[ì–ÓÑ[[à•`¡¯ ›yoŠå‚š*Ë„iÛ¼u†‚5D•Λê7× É÷CR35”î–„)3Y«qÙÏ“HÅ4”™Îe”¹¬è¤–Œ(vˆ¦‡ÙrÊæ£ë”ëF-!aYD ò&CK`Ñ +$Ô™8R4 FQ²*ËÆÜXe“·3›O[ÃÈNY5ItSži%$ *Kƒ˜ˆÑ¨&k´vBd™8ätáÊY›¡°×á ƒ…µ´>M¸i¬Œ“ì¼B"Ñ/_?5Ð,Æ^¶SP­B»4kã˜duoD„ ]ËØ$Ÿ2loþÁzR%{ÞU‰Ä&ÞñDeõ?w»\6*ïüßc›žwV•H{—wð쫟Ye`fBH-Dzá¶'Æ=ø µU×ýò—tÆ=„ Ì“ï|yƒA)ø6·†Ó}üû‘.»ï|ÉäùŒá-GnIO¿¢$Ï¿|ãáÀ„*n÷+g~ÒðÿõðÝo!ÿÆç D±DFÛ"Noû‡eyÃ_y«&)AD¥B%W±e}ñþð;~NYéÚIÀæßzi–g°í]-a*Yc=Å5§?uV˜¼}á ¹cÌ+ì½ì¯SVÀÆË~1ÂÏÿ(âåïÚ–^}]×*\ôÖ-yÞ(e%BÂÞÿ²A7~ÝõÅÏß|ñØó¬r¥_üR“†=õc|ó—â›7=ïr”Ú“hCŒ¼å#<ý§wN.ú¯,Z_þ5dúÓ'Íú âL*^ñg馌TÕ_õÁlxRL .ýË­´¤*­?û “£ïº%}þkÙI¯ž3ùÌÆRTc¹ÂýÛlø4ßøô±BÊû¡¸¸­ŠÎ‰¹õ–Ã=^ùô¾g)‚` îËŸkö¾j{gÄ \‡x*–ƒ/%Õ¦µY¿£&©øEUP ëGU'ɦdÉJÊ½ÚØ¢suƒ6s¬ƒ²ô©i‰ ª+ÐD @T²6v¹;ƒ"Pù¤jÊè’)\ÂBRMP# ÑT}ÑCŠÀ`Û¶&3g°³©i§I¡ó3—›º&Eµ'Õ¡3¦ןs¶ó  6‘Ã~oª¨@Ei-Û̘¤YÖb•±ˆ=‹µWá Å":àÄh¦P80¢B(¤FHÚ…r Æ-$‹I@Ѳ)#"0d©©Õdyf¥õÚc ˜S¦ 胈¦€®Ç­3Y,1±iGSTV@“Ò¬3¡U…l8—µ ¤šAgDIh¡ãÚ†Õ[NØÏ¢”©gg¦rjز1„ÒrØÏBð½ˆÉS”(¦¯²½©óá<Ä‹$ Œ«Vm¦X¥­Ã¸?NYÁòæ%ß!«µó'ÌW@³ÝS纠 ½Ý^½H†ÒÄ^»cËa:AüýÍmTOœË[â,å ³ã¿Yf8í;hM–a]·à=Q©áÞ›GGþª(H¢:µˆ0ÎÓ¿}¤ÞûîS½´šwxÁ§GùîÌþé£6nxïšLaöµON£úÅobjqòöƒƒyÉ“²j¥¶ò÷ϸØFñ©WMÊùní½¿i®zíÜF+¼qí!ÿ=v>o&goEX~çþÄÒó×;†¯8>½¼÷ýÇÃÕùýN².©?rËøPË›žrúÊÞ/Ä\ýïkƒ«,Gßb_2?ûêÏプ ^|·¹"#“Ärn夫æû§{óÈÍk{·ÐÜÓÏ™©­ÏH;Óô“‘sO<{½)\»ë©‡6n>"S¢N2þþÝøóU^æÒéeD!usýe…ù’°ÿ|ÿì’s¼¨a‡Ý›qÇiˆëÙ¶§šÜ¾jÏÚ†wîåIÅÒ‰‹èk9x[÷.e”×s™²BŽÄtL&»zÅËRi¯·ïBÜ2É·fóÌL*¼²:!ŠÙž¼@04Û¼+‰ëŽ·š—n1ïCU!0ežuÞ m !—u›õ `Œ¬àÔ§œ%Fà‚“M¶[ ÓÈã² £Ü‚l4Sì奛NuŽJUÀAL——Jâ¸dš°‘d ™h¨—å¬Je¿îÚ„Þ3rNg~˜æšÜ)°}MXwóÐy6.-–Ò© ¦†hbLѱ¥º«AŠ9S9¨yÄ,©q‘XG!Zè°ÇÝ2; èÈ𜱉sY,·ï|tôÀ(tƒíÁì–;÷3™X,D11ý ,6Û· 3¹ñNõçúêÊ¿íü)sA›Âô Ø6«wÜ’¸…:,Þ·3ÆÁRu.– ƒéøû·‰¸õŠÓ\{XϹ²:òß·n~â ò‰µ§®Ï¾rs<û—]ÊsŽUX '³ç sý¾‹§ì˜õ<ò¥ç#+¹tíÏo´—üUQÌÃŽ·?y6¹fYzäRó¥§iÒÝÏ\È·“¥h€hb›Hƒ Gfp‡ßW¢½óE0ZþÒÓůZ„ŽÌCZzïÆâŸoÍ¿°"gþù¦b©ˆdàÈtþM›ƒé0$D!È”ˆ†L¿ûõ]O˜]ž~ñ?Ë»_QN¾ô‹•'=¡þÙZvb€`æüè+¿Åáßõ3plf]ùÌuƈ..®|ì6¹øÂù“3ƒ9Âÿq&ã@з`(ã{>; ·+ä~R8UW´Ò‚,$4ãú·á­ z’6~v÷ô¾Ñ7ކ‡íõãëïì=p‹FQÛ‰äÂg^½ì|Ë»ˆo¹kmÇ4K.¡-WÞÁ¤r†Çéþ;GpÅdÇ=²Ó7«fž5…¥ÀºnÛ¾C)[ØY!¬ÏC˜ O˜úEÓ®‚ª"(@ÜwT ÈæRwxýØ¢R»­Ìëµ±,Îól`æÁà®Gó ‚z² ÀFò®ÂÖ7)ø-,Ù–3: SqEPͳ@ý¡å¼Úàt¦Œ¡„ZÑE‡96ê@eXQ&™G¥-R¯ÉlBN\e…y-¨TE° ÐÀ© J‘ÊF´(Jq±¿mkÖ™-¾)¨mÁ¢Çvš•¦ï«ˆ .뺨D:˜[BžVf€!¸aL›‘€X IŬ/ìVÀ¡@Ûë Á5\gUêºS·ewÑFOjL´„*Éä€mÔ ;žù¨Zµ¥FnWÇ»šÌ @gçjÐn:9íðOšï›†ÊôVš;¸»cL,è„fœHšÕ[¦Í g$F=xýôð§ßûu:KÍÜ¥ÁU¬U²‰ÿƒZÐ íâ*&ÊMÿrP™á.üð¾øéó[‚±±ë*Žâ5²‰Q‚I7n5ÚCÔε¢1+Ç–‰ÌáJIi=ÈôC¿ížtI¶ö‰{Ìγã×ß<ííÝ Q¥ëWz³K/œ ºñþk»ó.`ž¬‡tê .ºÜ88ò‚Cé寡ïÿíê œ÷ØÓNuÏGÇ`l{× Š¢}Êßc2ƒ¥¿x) `6JA‘?úïB(þíá|°>ýý ³”ùö/]Ákß᳌¥²I¼àYb2Èò@M-@P d;ç6/zÀÞãôð*ìݬ”E“„Rµ«­—³Ûô ìluh»R’o7ŽÍ¶í(@¬¬ÇÅm™ØÜö6‡Á~*÷¨$ш¾;:¡]6Yǰ¸ÐÌjqË8ØjËõº¶;Jqœ%€ä45"Š:Ę%Fo‹þœ®kª²ES­·I¨“Ùx½êˆyJõt¶bw<åJÓ¾5±]Ã9ŠjWóhA™±‹}`I6™­ÇŒzD ò,–Î+LM‘2ÃĬÍtUÓºï Ú(ÈN•#©Ë:ž*ª Ü†|‘ 5ÔMˆÐ#1A“%°íj ªÅXÃJ³ˆè ‚ œ²Æ´àzAØÏ¤‹Òu*l2HY#øÌp]£ÈE.GA”ȇ̦V6µ 6ãXyE¤U3tbŒm,‰'uB$QR“¹Œ6#*ø–{ *B^Ã4‘µ ÛÂ̪† bjR¢V:ンÆR‚ "1fŠ HY;¢@É‘€m &Ëj±&«Y'N4Œ@ PQ­ !ˆrŠ~hx™¶LLÉ@‘¸zˆw©õFQ«h €É^òG9,˜d;o ½íE÷ôþé¹ëò¥ù£’ùìùO‘;ÿþVJ.ÿä¿OÏzëÎ㯾¥Uè†;^z7?ùu¢]yÉÍÝ ^æ5ÊΦø/OçS>°É H!ð±WÞ4üй|fð”4ú¥÷.ßô,ÚýÞSËÏ~dzÖ¿lî{“0¥YV] ¹Ý…ž©ØùÑtôm? ûlUΩCR¤ÕWÿ _ó¨Mìôo»H_ÿ¶Cú‹?éÿäm‡Ý{®v6ÅÞx¬îDÅ`ôœdsãðë¿?¯}UYæÄͽ«aA*vôºŸ6úÛEeŠdâ}h'o¾Æ>óYÃÜ)ä¢&3ÜæóóÀ)2Ì»¢™÷TŠì¹O:~ô-‡›Ìºã«º÷¯¶'çtí'ƒ¿^ÊDÒæÞ󎛯9· пò¿«ç¾Ãó‡Ð_èOXH‡ßý‡ìegANéà¿ÞÜ^òVŸµ°xöB² ŒíèÝ7Ç?yäà7Ü>6]ÐÓ;>³Òü:ÁåwnÉ…t&ûöÇŽ¯¼05ç¼õøŠ«äò‚}’Ù§Á~ð<Ø0ƒ}ÿ³1~È\JöÎwa5)7ÙYoºaíl4CÌ•¶ “ªÐcpïwVO}z¥¡ñ—UëçÌ'›œÈV~9é.=É$gm.|S¿ßwuk©µ+uý§+r¿-Ôß|ÎQîNñy¼å°;k€(oýƒ-Î Sk]'SÂíž^]¡$¯i­««mÅ–ÝË<ïË,ͼ3mû›­kîLŸC!œ h”I…(-°ÁÄF-t)¶Â]2àC×pNM!/ãD™uŽÔºÄd¤ I+s‘I“$´½h% FQ£ŒÏd:N¨,) KÔ6¨²Š´©ã4K,! §¶.í¬SÔªgÛ±QÐ ÖÄ“+AØ Ð&"˜ù6ŽšØ&`AË`u–@¤ÉâlÖ)€A°4j…¬ÃÁ6kma¾jÐfŽœ5*¨UNÐr7íDiÖ¸1ã,"æ™õR‹áZ ûRk^ãV¼-¸:¸o%ˆÅíâI›ŠLdß=³wœ€ à@§÷jÀÖ à Úÿ¶¾ïùýýwÝQ ÏË{ýòˆŸxÕZÒm·Á£/-H.`Ö A‹ÍMÀ¦ÈŽÿfÍþÙ…•wpïµÇ$ª=ûþòlŒSr!¬ülfŽªé%Úöàz–eçQ;ž~ï'T=Ô ê\ó“ÿíü‡²”IYAl\Nrî™\ ™”¶úÚW9%ã>û•ö²ÇrsÝÚ,-ªŠÙÿkúöÍ•¡$ ñg7ÃE^ÒR"P½ém«ÃÝ‹:Üñ2¹Ä;óîø;ïè½í<Öä'Ÿø™{ò_Ñ8ÃÁLÞÚi—Ãé!k³ ü­ïtj¶ãùkx&AÊL4àM¾qëgF§¼)7Ðyµ58¢Ö¹Õƒwû"z‚Þ¦Œdb éìNÓŒË#nbf†ˆ)«–ç¶u²>C‡ç–RÁÖ$; NÑTÜÉdcR¤¨lNÀÊ YIŽ:Ä\´h@| j“[à0]Uiiב¶›a3“hUfQ‚o3èÇù€ ´Ý _–«“ÜÄ)8P4:¦µà¡È aϱ8+(¨Æa¦«fಔMYžeÖu=µY•ÔEò5øœéL»dÐǤ*ÒJª¼bª3 )BL2ëÆã`mêŒ!ÇM0±ßøœ¬ ¢!Po’“¾rÔùÉŒ°TfáveêKBf6Bt¾¿t—RÕ‹]›»hF&“¹vΘ¢§µ›(ö±íB,BnQü’74.9%A°Ô#ð”T…”!©4¶Ž¶7 ,ZuYcR¯¹q<;^·©Üf `àÖ¨C,{-rœUÈdÚO¤¨I]»Ó¨Y*bKCÆI5äÒ±ÂÚ5‹™a?YSÔDS™)v¼jc|ç»6Hxþ9)—›–`É»ûOãôW3có^Iè 7q®x\…ÖXq3_ª˜ÊêCàè?~³VÅÁîc²(Á™éþ5†Žw½€ gÎgôÈgöo|×=0XÊÀÑ þÆ7íÃO*¢­}Œ„ÒÿËçq–Q{üÍ?ÑG½jpÛßßµg³MoÍ\ê(Fïþþå´ý1g-îywt=´‰ù¢óM×$úÚûVn~n~Ï9 ј•Wý:=ý/úƒÊZ—ŠEO$¸øvnó^·ýßk›¥ðïk¶¼ý Ó« 5©ÿnÀžÏZôG_|#>÷9Õß¼ÑuŒdó‹¿˜Ê ;´`„ì$‘óÆMhò^Ú†E æüËoY³o}|eÙug­BÓv1OªLC•yƲEä°­g°yç—»YMõó0{ùK]5,×þæ»éO¾bª¢íþòüÒ?›¯K]û«ëÓƒÞ´¹±aæ »>ÚM?øM.çÊ{ÿúÞöåïóÅéø=wE$ÜûÎØb’Ž2R± ³êÝ+áO ç¿vÿøóôì§U>fˆ’ýñ9²üæ¶½+ ´eNhbHÐ(“Æô˜M;w hDKb ("ÊŒA-z/"†sI*RH©a²*$Êjб 8‹ÖÛ΢(’(MJ²Y1‘YK¾W¹DÖ*'Ö…¶mT½áYBL]/v Ô]°cïÊ $IE'•¤A D>Ë4ŠÊrtCËN’eUDMNlÖ‰k× ,2`FbÔ+”CR´%É€@¥Îˆb—‘Ô¡!'ˆ \Ro[) Š*hÉ¡`Jœ«¸ÀMè‚ @ sÓ¡z´¡«,·Î±3±‹ ª`+rD«!ÖbAã8€+²GÎm°µä\“zs¡à@Z0@b-f³)cTPRÊ1™ÊŠã:´D‚ µÀ$€†P½Z¢P¥ØRd%‚hZ$‹4góœ¬Æd¤èUŽ“ÍÉjʳN›õY ͪ^éb³Ü ôæiºÖH‹’RCÇÑö¼£”Í•£Á<±•ÙÆdC¦Š‹Uwxr<ªçèÐ ¢Î`™¡æ{vξ{¤Ý­ÒÞq;,+¥ä‘¢ÝVÀ­w‰Æä%g=YP!'ìú'Î9²ê)0[TLœ8{öù³b{b° ãà”·n虆ù©ÙÜËL ¾ôƒvÛ3—ú§÷øIgŽv.$ Óú•Ë¿úÚôÐkçð1©R[îzÍñ¾eðæ^²?\õ‘¯ªïj¥#©ÁpKÓ´²å© éë·Lv¼ÈüÒ†(™Kã±ÝC…ŒáÒÄñÓ•yä®lŽéÒ¥îŠ!y-ÚçqýûwÆßv:Hžæ/é× ˜»MºO8§×¿l~tÖ @¢kàNqÏærévüÍÁÖ79®Ü1]>{!YÀ‹&'NéØ-muŸ^Ú·O·Ÿ X†ò„µvï\¾TÁÖ zÅãwuîü2‹hË|"XœóÚm4°sKæRȸUÞ¨r2—y;e²ž¼>ózðxŒ£#:«²*4°*½Í9¦Ÿ„‰ï «¾®Œ9Û‚n:µ¦ßUâæwJÝz{Ì:JQS¡zŒÙ’Œ±dd·d³˜@L@85qb†“¢LUžQÙóªV{m‘;4³å¤Ê^ìUÓX7–0c ÙüJ¢<Œs‘…\¨Q&å./=(uV gŒ×#B¬ë(`¡"g­‘©¥æ"Ì’ïW„ØÁ 2f†>¦ºEvÍÄ4à’Ó'‰ÉÌDdÒb›¤\©·"L‰“˜.€—™óÜåAmÐ#Fj—l-‚M™Ý=c­e pï2 8½áûõ©ÏÜAe›~÷Ó°ýa×wqÏNLeÆ’éY'Žú?œv¿"wÊCJÌÍüƒ.ò ‚Ø{H…éøÿˆA0óPy¡Âò÷?™Î|þÔñ¹O£?| pÆ^6¨í¹§â¯Þµ²pÙNsÚ^È=ÀS[oTfâ˜Hùö÷Ý©­€wà dOYÄfü–ßFPóÐÓÊü)Ü-y¯V2Vrèž¾ûÉ;×ë‰j–7ßÿÈÚ/ËÕ¬ï‰5Yæk_?û-êéI/êÙÖÍ=oÆ[3I@€¦ŸøÚ좽Cë»òO®– an'æ1ënϾÅ׋ Žð÷Ý•¯ËMÓ O.š˜ £½àÑõþ;.£Vzú+qÏ»òÿ®¿çiOÉ\ÌV>ýëɶêI{ºé·¾ß^ù§Ò~ìwþ.sÉ8ûôKÆ+ïŸ->)Ò$ßzê>y½ûã˳û<“QBõ03éÀÕ6R8ð­ý©p¿ûÏï|Ê~9•ÄÅ!£ûÏ“ûš…àq§æ[sï\Ï$L¨±ì?ü¬S®›²w±x øU@,¨%8gËøâ5@þRéN3¹if«=zºw½³6…yëÇbM­>Mнӏu²o:ì+«è%gÚõqÕ Çö­¢hZ˜CvËÁ¨Aðl!a]®!6u šµn‹ä”(‰BœF3WZ .x´J P…”l4™2ÛYj‰!ÑFÈ!uíB£Æ•’Ï(z2„ÉÏpf‘«Í½,`ÈÑ›¤,&2‰ÛÕ>&µ ®R@cg¦f ÅÒí|9(½ÉÅ̉@ÆàúYXÔ®Û`× êÄø,DL*Ô²Ó”ËÊD’"Ùia©¥2×ÜÅ£BD·Áo ¹¤Ü `ÎI"àð4þÅÆF4Íh:2§R–!E5Ô%N!Ž×§¹‘f5mæÀ¨ßÛìl‹eÑ’Mhøx¸g}‡R®[·†RcTJEì–ï8:™E›bâñ¯nÓž½¡ë¬&òý 'MoûQÓïïóàaÖÙô½âÝlMúɯâSßWï&ßþq·8ö¿¸žöœ»I”æ¯xÀø ß®/}ÑÜÚ ‡ kÉM;ûÞ²ã’âÌ@Á`0ö(éjonÿj$Íô¢îœó‚:Ë ú³ëðÙ­’€Ût²¹ð>†z¬Æ׃­ô³o؈åÛ^H?8x,bßdnñ8_hæÿâÅí0 ?zͺ}óûÓ@äÜçäQ¢äÄUaêømˆ€øû—.÷?xFûù×cÛyóÕk ؾ dﻟÏn| @I †ªýÏM$"©¡Ì–]*º¿ü.?îÍÖ YÔOþãìÄOe}²³¾WKÿÇu“é¿¥B´Íä{B‰ûfF½Y§~²†¿~‰Z¬cÔøñO™‹ßµ£ðâ-SšêµÓügsâ¿îô¾h>ü±éöÛÕ¼î#%Ýó¾3 •œvùȵÏY«>v¡±QXhÇÇÇûÆä»?†òŸ/¨Jj¾üžu{ÍY ~å2ù*PCÙ¦ž>û±:zÆ.7D†Ñw¢COüÙoÑYo999ÕÿýÀÆ®—,ò¿]—Æ¢‰É>ç¡®¿Ò¦Âø‹ÞE³§?³¼âšI¹7uŽÅ9d”ÀªÕJ…ò'ž1+·—±ÒÞãN[›/pò™Z Ö“Y|îãÛ36¹°[þîÎéeE.Í&?‰:_<çÑëï4,y9(g$ÍâVƒ.nzù/Wïçrèl[`–ȘFgŸù{øù}Ëb.=Eï7ŸC”@‘­q töãÛºŸO¤¸dÉÄOLκzÀlaùׇ6=l)B$IHSŒ+UÃÖ¦>÷’H{9{Ì ù~–@˜±"Q.«,u± F»¸’.ÑжI4ëÓ(@!sMÕLψ×ÎMâ¬ö‚DVLÔ2³´@ÀSÂÉ´ÀTt³Æ3¨ IAI°ŸrJmŽVÁŸ 5-‹@7Ž‚Ô@R‘UÝ¥ ’­_YÚº+#}gUM±{ÛÕ˜P/߸œÜ‘6ÏÏU[µYXjQ5JmÑŠvóŽÚYp­Á›%‹iyÈHrÍ%]WIîü³€r‰–SÕ„.¿ºa|nÑ0Óá N&B¯#‡÷=‡z.f¹ÉºÜºèZÅÑ—o6›/+ÑóÔûgýØF5"Ÿþql#ì|ñÉüñÏ…‡_ÆEÁòÉÿç_Ô'…0ŽDDÉg¼ .fÔzrÐ…êO__³÷š?’óÞÁis¦&—ZR6ðÔ(';ÿ®Úþî%ðYwæFó'3>è>qåýGª7Ÿ›?`›ÛxÛ=ÙKN_‡0ùòª½ô-ùoÿeÝ=ÿÌlù½ÇÎ|=Õ½ŽÏ|UU3!d§k8ø‘{ìõ ê܃í¢\Ü4;l ^­$  @inSX¨,Æ*;}ï¤=ÚÂ`!'ÅÉrcªÂí:ÙÞ ×ï®¶nÉNÜa;#f©€´> \ÄÁ.äõfHÛš•þMÓÚÝ;VGQg«‹Æd( ¬µ‡7Äa‘ &ûË͹䞺¥XšM•Íæ M©·ËׯèÈ Ú@îX“gSí{\—,ïõl×5=5Á iVJjg¡Â¥ap¼A™ð æÆ`È,[©¹O•1‰ J•Ãr*Á·Ó‰DPA#…&0¢bØÀ!F¡%k*¼ûd Š0Ë]ð^¢Úظ²C‰ u%ìÈ ôf"H•ƒ‰l^˜ÁÍ@˜L´ d’-[Lƒ¦íf ÉvPæVºÜ&,93BÒrß#·36"ý "bQg5̱ΚÜzCƒêfÞE¤ lK @¦Ü´FѬÍv ¦é,tÁeG+0`›¹^%k5X1 ä.ºvÓ„h´U(Ñ(…[g:É":ŽÀL+k<Ž9NtþAµqÒìØÙì[¹s0Šö„=³ÃÛ÷»½Wgxýû?ÒsÏ.`0¥Ó®h¾÷Ó¸±©½õ–¸÷Ê&Êš9³ò­CI‘4+¥#AÛ¿ìb¬s‚hCÏ €ÌôCl ™0^8×ÜóoGóç\€ÒÓ[>Ø ž±X^Ni럔//Ç?yt6÷ìQZÜ óÅÿÔ!úö©›1}îØ8ì”!bùÀ–_»Nö}tÏÊþ¨2gZÏ ù.þŸÕåÛ_tS|s4|nÏ“My§@-_ÚlœQt$†WKäêA;¦Œ7÷ÛÙOo™=ø2 ´¿¹s<º´Î+&é'¯ÆQwNL÷þ¾ãŸ¯˜KOɶ^q¤ª¦ç¯óR–:g×nZ£ 7G Îç!éÆ-k½ó*¾g¿ÜÚ‰X¤“N©Edo‰ ‘î–57Ú)Û­¡VE ÍN]„ù¶]©£#GÍñÉl뮣úÎQ¹vÈŸa™±\ô¡Rç’ ©a´±>N l2:ݨ+G¤®opn"ÛÊæcù9ضà¬K“z=³y·³ÈiíMÆ@«Æ›í™Ã"÷Öf]“¢`iª”ÚPæÈÖŠX°׉‹>w䢱 ÅTAÙüŸX£*‰Ç.±åPç¢!O@¤íSdÙÖRn˜[cC”Ι!&(fÒN§*i‚Î¥n„F‘MœÍ&bÑ6V¨ÓÿO2Yr½Æ#¤–Q d2Ë¢§ÀH‰˜3ñµÀ„”f{Žvè[E:ñ='µüv×±vÈÙóžM†¦ÖºÄ'bîzš×¾6+ ²…M¢ w¿ò^xþsóóÞçŽ~è³ 8 ÝÑ¿ü=?ëææWYxËîóOœö¯»ýíMé‰/ß–:WP˜á^qGLä§¹ãc}SûÄ× uß«~ËOú›Å\añšV¾øäàÞqUE 0³¢ÝL„¯ýžÉÞýÞ|L@@ ™Ë®Y¤—'0*Úw\S.9=ÿÌè3ÿ¾"ªù‡îŸ>÷þÕóÿe[ ´ƒ«¿ÿ;—MlÃlÆÛ:íþèÏ¥Yâæ[:¤Œ<ä­K¥ÌÐq~Åÿ޵H¼-k%çWÿ¤}ô+ ÅôÏßLÜòÉïÛeþöy£öO°j:UP?ûŸi§ûxô·Kô¨?)ß3Þ¸Àí0ÂßÜVìéëyÿ~tvóçÛ»W¸è¿ôþrÅÉu^g×}aºøg½R1ï=ºûe›H0ýøs͉/ÜŒlsoM"²CU (° ]ãrë$‰sãI H‰tjA©tØbã¼Á¬ñT6¢F!˜#¶ÎC"Q õsDDbP¨œe`“Yîc„ ¥‘„œšÌ¨Ø€‡ÒPª¦àcDÕÊv`ŒAî©8ÍûÎbž4½*<œù,$rÞ[@˜‹Œ¥˜‰ ¨š¼Bç˜Ä·¬b9T¨`RêÕ (ä™è@’ä!T'‹CŽˆJ…Ï Ô¨¾ÍSQ*Õ¥‹¼*;UΕ³d€«9H ¡ñHØ:ƒÚyS;ɺbTK]cHÖØX)ˆ±¢ì{ù´P‘"q‚&›´ ¬24YÁ0¥&ÄÈÙ'Ð- "Ûƒ.™Ž°m¤8vlÊÊÇd 2*"xßµS£ä•ÀpaKã`:>2UÀ1#&õ ià†•‰è2×™•U˜X#ÊÝÑ{™IæÆÉmZJ)rU`I¢7Q‘ïúmˆ|dÙžMvØ×Pië[Ò½§‘¢ÌW;6þû:eQˆ{vC•JLñöÖg¿pû\˜É¿89㘥Ôýî»ÓÓ_žùY´¤jÀ*ëø«à¹÷í1®!ã ïYYþÌ;Ó3þÔ.€@2ríŽO~Ù¦š“$‹¨:˘㠫 Êd2·íõñðoo/†Ç8ÍýÙéio®BÉ„úŽ¿›n{åNëš±G:åeÇÍçïè¾v—ÝþçMsÃ¥k±gSàÐ=þJÓ~ëWM´ƒOxš<«ÎtDqcÔñ“ßüˆùŽw %f#bbŸÐ¦ïÔ±t=Ûö~Ê,2l¹ù{æÁ;Œþd²®¥”B ‚=éüñößÜHí…zðÞvFÉçܮܲa«Ý§†½÷%3ÒöûxÒ)…h«¹&"𛿫XÌh&ÒÛÍ6íèð¦âîþæ¥úV9>‹áÎé©<dÁ›>B–GÍ¡Y¢~æáðñþPý‰Ë[‰Óbót µX¸Ù(h\œºÂh}´ñFqçIzñ`Xˆª$M+ªÌ®\©úN-+bÑëÁ ™vÆÐæÓq‘€Ø[+óƒ ˆà¤ŽâZì6•±k<ǶuªÊmÛrvi®7cE­ M™S½’g3PÍ5ZÔØ†yÛ)’Ĥ`¢FT3+<ö‚•lêÕxˆŽwž‘Q„[£ јƶ®)|®PµqVV6ëÚ`8¶YkA_€ö&&q¬›\ë†Xf+V­…  `rG÷· ë;ÑdÑÄœNÛ±ü•ƒi…}ŠÛ_ýfFl9ðe Æw1'­“!VTŸågÊpÇÝæ´ †ôÐgÃg^â-æ1±¹óñøèDcr¶­ßúˆÙòw÷7wÜe/xÌâ·ßÞTPØ{?=ö·´ØxH=² àcæT~w»Ý{ÕR› XãZõ!Aë!P?<÷ÄzzÛ"’Ösï1-Ö.þê_›Sw;¡I`1ìTˆ#ää°nýÈqÿ§ůþWðàúîZQÕâµ»ì¹;9B=ûŸ_ÂÓvL޳¨(3åëît®ví Ù¬#Ó Ÿs¸¹é_g‹Oµþ7Ç»&p÷aÓcÔž†VÀq´ñ»ßÄÕƒR>úl¿òþöŒgeóOºoÛ|rÅ&ög^ºqyfrüáoWv>§ó'‰üê;#Ÿc]FØþô‰”{’–ž‰ûÝ7~0a<|H™ PÝETW¿µ>£ÔÂÃR6IÕž„}DXpØûår)Sû°Ý™è¬¾iŸi.Œ÷;Pîú]4EÖ@Cëç¯ÕÜoïXA%Ó±?øI}ɉÆä@8°@Ðz ÎùY ÂVƒƒ °^¯cÍF…ÁQÛ8¥Ef‚.=Þy–Å¥Ž3jD§n²YŒO2ZÛÕ…,{]~"‚D@…ªË3!€SÛd Àž•TPðƒëÌp2…8)h'õ¢„Y˜™4ÞÚX¹îT@ÉD%qÐ7Ö¡dÙI%bò¹¦‚Šc4À‘áÑ3Unœ °¤&ØMsª " *¢©cU4c`›yHVƒØ›QçP¦Ê&òÔaÁLžbãû:§¡./t‘ÉÚÉã‰ÝD#*È€q6hÊ= B\ÌÑé:…õêoÏ8u‹Ùp„¢n™ýÜ–¶¥.}e=Þ3Y Ñ(™;†  ŠdêÌia.âÕÛo™í=ç„É×ošèøW¸å™”&Gñ Ä}?*ƒ¿ú‚òÿýltûcwéÅ—vŸøú„z}˜·•È6¾~]û¸g«ä&?üÊXU5{É“KëñÈË®/}âГ,Ü·F BX=ü!`£IÊ&Wc[¼áëšÐ<ë¯7…`sŠép#œ€ÁëÞ=V×Û“E×yÇ]ú×ϲyOpüοÌáAo_4„øbTmÂ|~"Bù{¶åå33CRm ´’'VÀ0ÙÅ SçˆBÎò—_øû ;ß{J)~ãIU*Þýˆ¢{üE¿ˆŠtñ?m)KËrãc¬×#!Ÿ™ÿúˆ2âƒ?ß³sb(ÀN–µ!õ/z’–ƒªÉ:g;g 6`D˜taÁözÆš†FÍ;çãQ·œæ‹Ùt­œ¤I¹0Îצ½% mMµ›Êbh&‘²3–Ê÷‹É†7Ë]‘ò>,f5æµW¾u“Ïm–4Ù˜5ª¨0žAA P &T¬t£V4¶WäŽóV$+Ö€ñ•tXùÖ„¹ q–\Ì ñ¼ÓÐuÓ¾“œI«˜7ÄÖ’N: ˜-l¨7]àŒ…ÙÔ¢#幮ЩL§Ž¢sbÁ`î$Ÿu© `¸;À›¦º÷ß7däEÚ’ž°3r·Í;`í@s¶rþË”BòGß±zÕ“l̈“hÀ>Ÿ´ç`Æ ¦Œ«ÿÎ|LîÑ»ÇWTÎ&žã Àù°Ĥ枯%û¸“´6þ„¹ 8o·^^jåpú‹ÛšÑõyUË.ïv_µß!¥“9vÓúÊÎ2î-Ŭߒ™O¨°c+ªò9=ƒÃâÙqOå›ã‡Ûc­¸MÞôÈi‚Jëòœ#Mw×ñ‰£éò»±@µZþC–mÊfÇÖÚ­[ªƒÕ…-ÜžA} zY‘îÉç· CŽÖ”³š¥ Tc:lÉCÌbd#ø•5òq²³˜@$6cQ72ØÖ™*Ùß÷uz⋇öT‰ž$“G]>:òžI0†ÿT½îóšLøÎ·F{_¶iõ}wÌžöÌH&æô õÊ·;– ùúoäŽZ«?:%ÀGêû?a0|Æå<äÅÿŽÚ­¢‚ klºŒÍ£íä7+u¸vÝzà ýz•Ñ`à£?¾ké ›5‚o¼·Ð‚¡®]iGÕE°:Ë-ùÎåŽêÕ1 ç}ÌE8\-.N²>–›U„ÒúÑ|R ó<4Å´ÓAóÐeÕÜœw²A ‰9Ž îxû–ÕÐ…@ ’;ë¦Wk‹(*:í R#¤s4 ®!ó—WafÔA8áÐnêPs6ùvuœeT»jÍöú²­ ic0›KHeô&t™OI”×JÒ³¢q q+¡ 7Ûº³@´}×Ѹ¾ºØ7}ΣZ7ÙHf!5¢*‚HÎ7BªÖUYÙrÌ‘Ñzš(Þº­[#¶-#ŦH%Û!€éj'@ýb”„ )‘3cz ÃN›¶ä3«ˆÐi;è ¥äD6K¨i\/Òx%!Q×&¶ÒoyCœ0äcǪÜßRØd +Íê@{6'41~ó܉âÀpdc­·ó$K½XdQË¡;y¯ÇœBMYpÅŽ-XE^¾ç÷1 Ï_Ê àȆ¦S‚ýáË,`Ÿz^Î_Ÿ°éòÃ?©W;jo¼“÷_pç¯îy°¨|Ã÷-u:\óÍ:’TW)ˆioþçC,*Vð‡?¼Ï¿næp[tžïºf³ …6ãëo¾cºxQ¯h³iÔªRžäçŸY¥·•ª,œùH€páãiË·ïjo‰tÕ£û¡Mõõ_i/{uWõËé²ûä ÿà«Û³ssô‹·ñóîm‚ì)§øy…ý?8TKyBƒ9M¿p÷ôŽH!ÇáÓñ7ne>xûæÃ×ÕW_žI†ýþ·³Õ»™QA!ÄoäÇŸé»(šYz×õ¾l§Ý¶«ê…k›ê¡'Ô—Î&§ýn¶Z]äçoû—p üåwÍßu{ÿ¼ÍŽÌ,Ò9±Ûw¨kn9¦ÃmcÑYéÔïÝ8u¦µõŽR{ü@+÷Ú²KÊÚs<¿g65QwV@›«VÉ­­ ͻ틈‹'.£–’6®6,fºÚ¬3K/³½U;nÈlC'Ö‰Ý:ìÈ…p|l7eMhÁ:ˆ¢)¬!u)™Å­Ïí§eg§aèG2ŠœŠ¹<Ë­HÄ8Ãu“™„ó]R0Æ è¥&ðÖ"pó¦UiëÔ³*“6U™¹Íj4’•hB¶©k=e½zJ2êÈÌDqZ'‡–1¤†0· îgĈÓyÕqƒ†¼áÄ€¤  ଙYTä\ÖYí¢)3BLÐÕH*HG„ c–†Œ0ÆVÿ! ¡q8 °^¡çPDUQŒ5•KÔåT¤ºg•@À¤bõ³êà9Ú–Q€“í:Üù(;úÈAÔl¿rÐæZ¿ÿÇ£¥'ô±´¨ˆhdt-l{üÙ…ñÍ¡O,®Ü=X(g½Çœ[2Òï>tœzWmc|ñöÀŠÚTæa:Y¾·Su›žsrûÚŸ¼ÜúHb´¹îýM ˆhJ3ù¯ó O%”Ìæ%ѯn$V¾íé½kßµR²»xò#íWÞºîÞ~?øØg'—¾q{Ùkà‚û൯[Ïßô[», \¾Tê¾íÞ[^I ŠÒ1Cëòg<%@.£ÏýÇ”UA?üQxè»æ;j! ù/·ž÷ÊôÈGwŠ:ýò‡F'üˉ6G8ç… ¬e‘d‰f_ºfœXçß~^õÓWÜZ™½ þj°wÍU Ø¥{þêwù›Sõr«.7‚Ýÿ\3Ñêu/®®}Ú¸úðEKoŸµß~†{ëcÃ?7Lùû®öc’¶yõ3E=ï}⌕?ý“~9ÌŽýýµúèWn¾ïÿ Ížáø™v3ÅW“yÔë¿|Ózã_ÃæLoyÅAQøÿ¢XåKßÓ[yÉ]ú¢çy˜£1I@†•çûüÕ-où›ÃŒ&þÙŸÌS#kã¤úëQ$#ÂÙÿ¨‡ß};Ä£ÇàèË]µo„†Š>ph|çË’ª«„U+¡zØÍÏ>ߌÿiW¸n¦¿xc^„˜®~tÑ·$@ªÛŸ9¬BÎ?½vL²mý¢Mù³ŽÛ¯ý>)@`‡Î¸+Ÿs÷ÜŽ¡*õÁšd:”šH¥õ"š6%£ÂÍ\›Èˆ³®ö¶)Ú;ZÉb[t+0Á­8 N¡ÊëÑQŠ6ÎÖ:éÐ#ã0r4ʲ&@D@Uldš»|F 3Q@U°í×Y1Àpf:v`|Hð´ôÏ!±0¡*'TefÑ6@ Á#Q’ ¤lhÕqJ¶ï0)–„N‚ˆÒHR±”â¸î Ƙ%!7T¨Ô)ºùnS X†YDж霛ÕÎ/úŒ[ë[ Š ¤ŠHÍæ¥v:¡µà(²±ì#ÖM¯=.(žsÍ;.z‚€’(!ꉻzU‰¨ìŒ¾‹ˆ•„ ¶Ò¿­“’+€Ðìñ—G-´×ß ¬zx©ÙÕFn$UÔ…‡÷{]ÖÒ#N=æ.>¹ží¿g‚ŠÁˆÐ³°]¦Ñ±Í[¸JÑ]Â`@ƒàøŸn…_ýÅë‡ÙÓ[6P®|v m¹vg¾yÌm{ö¶âùWŽnøN³ôØ­s·eý~¶[‡‚Ð ïóÂqñ“¯9Ê[÷TÑoïŸý=õ lîùËá+·u·}6÷ºl6õÖ­vî±çí¿ßæ¬. icÛ³y'àÎÞ§ýl¢',wóZÎfü܃Nظíwª(î¸âîÞIBý¶›»tìÍ«ûÏàÓ—l{øÐlˉþ„+—MüI±ý¤¼¹eƧmÅzš²í·oMüÎÞY=“2 ¤ÅäÞã“{"»M%r…G7Ò¤3ÜR#Ç'Õ‰•„XbË££bç–ÐïïèYÁoŒXºz°0ta¹SR?ö¸zå&Ø:…D‹@APzŘ`%oT)Ù™&n"°_“æE¶* GM‹¸Ìq’ â|tYÖÏú9«qdÈIUÆ®pb¦I(ÛRYè ó)NE¢Üƒ1VC6‹Ó# €‚€Œ NDeâDûÉtV“)¢(™CXˆˆëe @ „E€Áƒý¹ùe“PP´*¶F&3jEE‘€H‡~Ñ‘£"@H“ÐOHÀ·s¦™S®Ç m¯ï k³¡(@ôâDqGßA.V CÈ€mØòDò¹m‘ضîÈwïˆIäлóON Õg??b%Žª™“ÿ8ågìˆúÓ¸ýñ;ë×ý¦©‘Û 0A³ùaþÎ×ÝÌsž:ô7‡ãO~nž|?•YÛ0þê7¸÷Á ùC`“i+Tz|×ù¬È’‚¢gè¢bÿÙçd×^3Þõš“úý2KfÅSÂÆî"†ïOzUg,æŸÒŒßÿ3yÞKórÎןúêô¹œýº8yß/ⳟÇ7¿å0_³5S‚Ýu2}à[Ýý_¸©@.ª áöwš®µt¿§m5NâÇ¿SgŽ‹¹üæÊ^éM)*V¾õÙéük²üÑ—Ìì’1 èÚ¯6m}åò«Ïí2@Ôþá  /<ÉÜð…öØz…ìçæÐrÛWsÞBºõ¿Gˇba0ëyĪDCñN#^ÐK÷O÷ôö¢ùÕÇôŒŽ.ÜT?z~%Qð"žó§ã½žs9óÂüŒ­ExD9{Ì0V¸bqúAqàç++8ÃlyÄH+A´ë¯Y¡ ‡~t|î^4±?KTQ`­å²¥ùî¡·MÏø:ƒ¼=ý²6`Îvè­Â¦ÞðÜÂÌö5£îTNÞJg!µìôÀDæñ”­ýüÄvºP¡=±o’DP8i˜‡ã Ûb—Kc0+›Œ± Y4j…QpÒBœ5z2¬®5è Ì!uUF½Å°‰š^L…£9µ ‚X‹AìfMÐvŽÀàHÔ²·( §y–2 U«¤h <Ë””ˆc×Ù”å ý)æE#X›;ŽQìÀìž¿=€ÚY¿,µM$ZÏLP^tÃ$töøúNZˆY£Cí‚ñP• Ñ&ʦu`@Rí- ç [ƒaáÓTMJ$Á˜Å>ÚèÁ¹D~3IÆ)i0;âl2ƒé–ªŠ“õ}Çø(õù¸*Ë]¯]]…• –†üŽíºÙJ±cGæx”‰ZnhãP þ´ÁÀ7³ÝÚN¶+wü^ï-™dÔˆà•¥¦ïÜ0y`…ý7Žp´2)nùþ˜• Uhþ²“Ú\?%Í/~@Î1WLÖF½ë›Ç…A˜¥M-ÛìôÓ§–°ËlΚ¯|möÀ—õŒã–gDC„äà’ Œ¡,À%>i殺 É(z3÷œ.öÂäŽw¤-'y€VJ‚½h[šÔŠÃ÷þycχvç¨(¼j½diø—¨P³ö•Ýeûˆ'£HöÈz1üü5ÇìëR‰zS;T ròÛWÝ©ù¨¾ÍÃÎw9!㯾? D;)AóîÈ_Ýœžýÿ,XI%C,êÄ)ËPñ±–³\zXÌ>ôéîsŸ7ç\3¯ÿöí3žSí{ãøOÊrædãuw·÷\K ¿{ñ!éH©¶! |ï5Çÿól@2R+dÀCs8È®²ð¤Z¦¦–lžš5“ĸMyË㩸Ȩ̂ “À4dµœöú]é•òú±y=2VU`\kVg†MÀb6;4R 5jQ-ÄúÕuMÓÔ¦¦žÏÀ¨(L)\»®Ô¯Ð¨Ÿ.£Î$j¥­Gà 6Ä©%'IPT)Μå¢$ÔÜ¢$Œ]´âÕ{«­j„¼$Ë$3¹¥&1¤¥VCž…ÌÌÄt=è´ëY_ƒZBG¢†0 *¢—mLP0a½¶T´ r !)Z€FÐ&ÓLؤ< •V»…ƒ*ä Ó°’1ª4H(¡J¢yÑqÐ+ÓXqÆDACÐP4ך“M]®žc/2ÉPΦv\Â@F-[oÑTÖÏœˆxȺ*TƒvZ©qZk"öŒÂBÉzpˆ $U¡"–$t%ÛÎZÓÚ® 1ÌÀs±êcW7Ngˆ¢À¶Jˆýõ.r£(›6ÝBÇµŽ€ $R¨µbÐØa–X‚E¨¥‚Ê_~㤸摹ÑN mýhݾÿ “«ÿ~°ü¿Œªæ‰‚M£¼nòÈ—•¯ÿ-&•t˳qø¶w•&/ÖÇ\¿½‚J§ª¤Ÿú´ãƒ7Þoð…§úï? º¤á¦‡-¥{_rOõ–ûå)#›püÚŸNÿ©ÒZ„¡ëiåùX¼ñaÅß·‘¿ïBç@ êÂÛO+6'u¬¤É?qtß7ïÚö¡¦ïÉõïÜ׌$_Æd”ÇcÌKÕd5ÝõçâŸÿ¹Ô[âÕ7߬ñØÑÏþùø¦—õÜ'¾ÙþôO³AÁæ®5ùÁ­¸ç {Ï}b[lO"Úi¢…ÙÕßÿâáÝ/ßZÿ÷uãËÿIÈÙìÄÜ?úŒxì}ì3ÏúF¿üôòŸ¼‘ñûîÂàõÿ9í¿|{úÚ]‡ç^UîëR+ ¢“?üò÷qh8æ–ÇÝOmЋ™‡ ý7ŒXÙXO:½PÊQmL?ï &5ôsºç¨¿ê”í³Çng_j}k¯œË\íïþþôèEçéI^99¸cg‰û~4mËi(<Ã…?rwäiK÷ÛÑ®Þ]¯…Ên¶rÑQÚRàê¡é½Ä°ÿ÷ •ß82JW‹»üâƒvzx&.VÑζlsê9,o´›v:8º±ºÑaœ¹gjve>MG´i®›ÔcŒ€'ÍÕN15‡Áo ëv‡šöÞ ¢Ê%pÂ6NÚ¤MPÎôû ªBÑthd-Q]w…˜£UÌ ‚WèM[*ˆ%zJ‘õ~¾Ò ê±Y¯ŽóDf‹I"¨‰B(æ[jaSÞ%ªT ª ¨J^òЈpÞ P$›1ûĺÔA-ÞkT+š®]*­E& M »VëéLÔfªd eqg‘CžÐ$3›¥©É¤ßC”V7Ú„6©!e ÔEB7쎪›ÊÊ·GŽÉú˜VŽ­PïD¿Éât Xqv/ÚͶ-¬#µ¬¾cƒì£ÞùãI=%¾þÆfï™eæ$;º;æûs.ËÈv«ßº©xÜY9 ¬,%:~Ãúüúöñ2}øE‹Ž9+²*€íøûŸÃ&™êÁ‹ýN!Šv€ãï³dtgì%ɨ+ÉÊoo#%ö»O 0éð§Ž'PÕóþ~)|è;­ˆ=ýÜdl®{ßhÏ[¶[¤ºðäio˜(’–ì÷ÿó  ÊÎmÃâÇYm‚,|p“ûý[EE×¾ævUã[ßwÏlõÿãÿèOóõÜ2kÙ=ñùƒm¯Üßù k"’b|ébÆ©\ùç;VŸù§Ù½ÿ¸?Ý-„ÎþóûåÏK?úòÞ¶­½þÚc Gô¦ó²Yøäzÿê~ðõöÈûÙï(‰'kH}–¹îÞÕ£-XçHìÂóîj˹ˆuÚº³¢ƒ³Ÿpdñ>UލæE(Q‡Ñl;yÅlëÔP/äÌ¢×Õ»zŒUí«2Ígüa£·œº¨ óÍäX=aW¯´««öû•¬L“5ʈ~‹m±9×öн2[(fãöy¿4´²:çÚî?xl¸)O¼ÓÊѬGU»iÞg€©8ýg¼Ñ U5àR1CŒ@:I$,H¤‡ƒ—œko©k[š“”@TºÄž¥`tœ:€¸_!¸0·íp H`5ß)=Ž¢q=¥²´[1Nª-K”. R;Á¼Œ;EA•.Õ“}š@œ*au5Áÿ!\ݱ‰Ý”o½}YX`uoxÔÔû¦¢x×$Ç[6fVÚŸ›(Ópû-éÖÔ¬Þt(±J£*·ÜknßU⇳۷µ×}¢‚ÙŠ¤ë±®ÁEƹ_ýTÄ^éwìa2ûÞw¸U°c¤TÊð à‚¢ ”{FtñÔ×i[RD“Ú¢³ VI<ºöü¿Yîr¬BàâÜZÍrë?mÝÅ ßöT¼úÕiké ÇG·T… ×w¸Krsè¿Fp[p¹ßüoþ_ÇŠg?±´âá¼R‚ÇîË?O'?Ëßüµ•æ¿wÚG^DwÿïÚÚÝýÙÑɪ#ÑÁ/ú¾KhW?¸²IúùÿÎÌÃ6ú§ÍO ‚"¸<‚dJi<Ä3r|ç‚ݸùáìû:F6# È›°ïÎîö(£ŸTñ¤^]ÞÀ‡/Æéõëšy ™éßÖÏÊȤ„ÌÖÓšÉ&ˆØ…¹M·u‡ðøøz›[:a–6÷n6ʇº»&É«Ç&I{×`¸Ý›ÉÑPîð²s6;ÚƒzÔßöðÑ­[ é¼)âFs Æã^ç oŒË~?¿ÅÎMju…äb:€¢Ä|Cω 5ëlÙYÇ2oºþü4´IP¨têÙtÕS mÕè३û,’ù*8`¯¡­hÚš©Ì3(  'ÓÍ0 ’Ñ™hxJZA™CêêÃA›h9ŸÏJ,¨(a4Ó~.Î (’C@e5= ­Úùʈ‹³¤¨ˆÀÉÆr$ªÁ[$T$°ùO¼“m0˜!Y÷åT<›( Å¢Óœaær›$°V,@l,8Ó¿˜ã¦TDo€Sà˜ˆpò+"£GØÁÊv¿g+^û­µÀÀ ´é!•¯:%.ßp[½XÜô»QTÍÓ–‡Ï“q\µ+š~HùÅ+æ~´ÑüÊÅ3ó{ÿûX’ŸüŒè~Å "·(wÞŽ ¨¤öŠ·nE'£O~|tÙ;w¸,õ³ÚB§Ür!¡ ›:ê?üAlð“ßáîØ¾í%„8Ís¿~ÃÝ üöwtÒ{Nàw¥=ûš“¼îú* óÏ}9§£™Æða¬¼þ·ˆžþŒ^ÉÞŒ?þŸ"´õŸÎ©¾ðïíoÜuìCo˜°h›µ¶g͵ߵ‹ï¿ïä_œ=âm²ãÝÝÚ[þnªóï=ôáwÖzM_;ÐÖˆ2l¼”0¡|÷‡ØÿØÙòw-?ø?–ú^AU¯xý üÝõð²ÇÙ|É&ý=WñÒúëÏg`ºýÿpsóöw€M¸÷ƒ§Ókÿnvý»t€@uúõßïïZ´÷Xüî;×yðW/ 8Ãå¿¿“ÿö)ý‡Ü·;þ®_Ã+ÿÔµyÌ…ã¿|"ñ/»æ à‰o9)~æãfªŠª™$ É¿ö eº÷wKTû€/ÝñúÌ$?f¿9¾{“;ým ôÂ'‡ÛßqX@Ì'¿šN{ëÉ{þõ°ììÛs>¶¾öþ›¢˜Êü‰oewwðæm|ÿ‚»?8âÎápÃlî­‹™§__k›_ú~sãÛzO¸œûŸ?—›òI;(ÿ÷ãg>½—Iì×Q† µ}qÅýñ)€ç@VP3$, mƒŽ±MÚuâSR@´ŠœdÒª±,Ω*ïwp…Ñ{Žm=cSRh6mÕ“¨$ Ì ͵f$Æ€aL$΢!UT1–ŒL½$«­ƒaÚ±‚‹-vYrØv•!z`¨ë̲ šuе RªciËÒ3“iÛÊ%‹ :E‡•M›X [Mj3@Ô¤&NBèrß“Qß"ªjjSKmHÑ@‘#€rP–¶éu*Å"Hˆ†Xqõà¬kŒÕ6ïÆbЬÔhêòB2'†#¶•sŠŒ$ƆsÑL(Íê.‚ƒ4À-Õš—ašsó@¾ýÿðó|>yšõ¦’(и¿}•S¼ý‡¸þuÜýÐsðÓŸ»Fª‡îÕ¯|ªþíÕ;b´£¬‰6€ó TÒÑÿ<Ü»d— ^€’¥IÕåVåÚ7N³w]VÚ)}󫤞ñ¾üúÔÙ+ÎË$˜_ðøÆ›ôü‡ .{ojþõFN$’|Ëð­/N7nŋΑoœžþÂżžÊ×¾9ã>¨r„”õ—]i)«,O?/x;ŸòšyI×þ¸¾áå½Þ‹N)º}ùð×6’á`l!O´É[W(Úˆ~s9%Êz”<$×\÷ëåÓ±”G°¥Ñ;ÿ³ÜýÈEãZ:Ýòä™™N{g[O<¡{­Óoz?1î¼ncËC†Ól.ºP.ß™M¿í%™?ÜÕfgÍÙ¹[Ä›ÚpÁlvûlòÝÎ]>ÚuϱÛÇIPå—©;³³l+»íVgª¡ºpu}z(†»Ê´ó¼µÍÇŽ„ÅÓôÄ¢õ9š¥ù4^§Íø¶y<Þ2G&P_uzx²m¡XÞè-9éF¡œÏvœašü˜¯1EWaU˜þ ‰€ ¯òÇz}f¤yò Ö$lÒ„&XNFe·s¥á ÖÊbÉ.‹9šlq~Œ7v&`A"K1·0®óœ}é¬ ´™?ñÜfÔ%ÖÅUU5¢¤“ÐóIÔdƉ¥N’âhl°Ö¶Úé»vfò–@u²ÊÙ¨6  µI¦ÏÐùzÄŒcY[Ê€T›qéLùäse!Ѥ( ô‚#¶«ÈiTˆæØtÒÕ‚Iã{6’¢§SŠ»å§j#ÚƒŽÒ>SL÷ÎG Uð`¹¸ñf)iuú™ü“ßLwÞgÎ&˜ýÊ.hM)(EE7—ÖF .¿ßù³Iþè2Ÿ!î¿©=v¬Øšò¤m;ƒ¨M^×eêŒæ3Åžf lÏstÿñ ~vY°ÁéÈÈÝ÷Úó®ZôP!û´ûÉ™ÖuE ²-½èœ6§P=ò üÒGFWÞ·Ø÷Á{š¿9‡6ÿùèðGîVÛŽuÓ ¶ºëþAhFIžöRùí‡f“Oø¬—óžtÇ“ÀøÃnîÏ™%¤b{>:¬ÒóŽ e?‹¯ÿÔñÙG·Ò3^öýÛÊàÉOÔ3­mk*_°Í}û;3+ _ù¹û]Þuê0ÕŠû>jí¥WñóËg=«Wå÷ÓÇ]™ïüÓ»gŸØ,;t˜•T÷\í¶/ú¬?Ò¢"êM5->u½Ï/dšÄb‘Ýù³YÝA¼¼†êÇ«Ylý…Û'p­OM·é±Ã¥“/Æó·byÕâ²&Þµ•Ì(ªE´ê¶>ðŽ¤·LN<Çô÷ÎE&V岫Ýôö»¦ˆÔza¡¬<Ñ%îÑÁc€Ü³1—ý ‡©¾¥ƒÉZ39²ùL—[I«³#êÆ!Ã>®sóÙq3kAÙ-t3Ðb+TÜrBŸ ë¶Û&¦¨š6¯,OŠ.f™µ‰Øz7鑦ÚP™ˆœÕm½Ú ¬ëw‰Ð‚JŒ.åvR«OzH½ G&F£NÍ´¬(c…: >Æ¢*NbÖ po.Aì&’y—Z­§k{±ô~GŽŠ`”\Ü0¶w ƒÂ0׳ÂHÄjºÖFY™ô¬ïe§QAY]caKÍYÈ‚zqº Ò‰¡¢¿¾ºÚ,w1Á¤ ³ÒÍ/Ál%¨  ¸¥]½6Ö:EE²º§r} Ó è¦ÞúäpL(ŽÃTOººiðFÅÎÒð‚ñ]jãþUwZ¹ú»õáÖ3\jÿ?šð`³³,¿¯r—sÎó“™ô^H€Bo"HQAQ@VŠRE]PDP¦t‘*‚ ( º°¸%” ô23™þ¶§sîû¾®ëËî·ÿßÏ™–¥ ®˜ßõ­±”!e€~R™âl¢pø /<ãòù‡?¿Õÿ¼Ù¿_».ÒÁ#‘ßõïCPEà‡½hXÏC¿Jà{ßóOzÊN‡FÔV•Y_º|vVœ÷ÎÓºÿÃLÏÿë=éSXï€O¿|àŸù4JZ|æÓEÁJ…íMs5%s.¤åßǵ߽Î^tæðÀû»`mdšŸöÔÉ?ýíZnÙÀ Ñ•ä=§sÞ‰Üì­Ÿ*•PW>õ¾‰‰~å¿PÕ‘û'Õäµ×vo}™½ˆÁD*4œÞòÒƒY™2  [Œå‰Ÿ}ï7Nþýä{Ÿpç‡/1Nô /ƒ F¹ÆRràçÄÅõš—/>Ngy2‚…³O …Üþ,ÿlïJ³L}{|íÖí{çwN­–Ì8è"›€¦Ã'—öZ‚bùè]Ú»¹;8q(P m{jvdCà8ݹ)‘‚åéÁI„8­„Ɇ);TªºŒ4"ª§¾[•4ÏæSqm7^¨-+j»y*ö1⎅vµ^ž¦n’Ùßgu™dÒûrUöèKO[œ%&·¹U¦'$‚nlvNÒña… ÔH}(“┋±«œÅº'u%ŠxEC-†¾ÊSXRשÛÉJƒŠ+VÈ"CªêJ”MîYÑ1óhj1+" B]5~‹¨ ¢³{žTh!2”q2@@2ˆž5]ß"™!“wjÀГaA?"o`dä\[í¬& DU…® ˜†Á¤’vàU °Ë½ïa™ÈÄõìiÔR㺡)" L²ˆ"šƒÍ3óè€2…˜wõ ÷Q.Ì¡ Á@H¨RP䱪*¢÷p¯˜)„ª†%ÅýÖ4÷…"²J´@Ñ@ jÇ0àâÀ?úmfâOy8›ç·¿gþè·®”ÅfòWÿ”žðwÕÖ+n`l¶æCŸÀ•/}¶}èrXvN¦Í¼ÔW5q™Ìr ³¿þ_kR ‚Ì^‹®˜y#]¼æ[dh ¯~_óÎãB(>Av¸ô7{ýé+ÿæR·¦ Ýñ×\_ýÑÃãj Ób ³+Þ¼{Ç_ÎüJœ{‰Õ‚/O{þ¢$‡éËuPÝ~|B—ûþsï\/ˆ2Ïqìœÿ1Ú _}÷úip®}îïŽqÍ.s>1³2[`éÖßyMõ_—µ÷Þª9W:W§º+c•ð6 ç/´ÏzÊz_»Ò~ìºé5/ÍŒª'½Ï¶šÎ.c\û{ >êÉ©üþúýŸ¿Ÿv嘰„%8ú©Ÿéx<ˆìå“?¼wû+\ïcL3•[3Ó¸ü“»B¢QÖ3»¸ô#öý±ê¡w­Vÿk«²ÊM?<µôô_:4#†Óyq‚DŠ@ó/ýÎxx®~nçñ‹± 6'´þÈOï]èõÄã×Ï«ìl®½÷7»óxðî¾=`Ñ]|ÕúÙ˜Ýs\މúóWfwŽueçÈÿlÓ·ÑÂݘŽ‚jW §Vo'£ìî íi#š’¸céò@6Í$°jY »»ÝÑ\Túâ]ÊÓc°m  TÌêœTŽ-JF´uZ öûé&) r{Ž3š@êúvœ© ¢pí ¬ËyTÍÈ5¥–Á C&DTÈ$h¥u.«aª"/:NÙHW€8²²(yš2+9Š^JéK^Æ‘+2+)9\©#q¨¶¦Š+‹;\ªjÙšÌK„’Ùµ¬Wë'jˆ‚SCì{4†%·›wÕs- ã©¢:ìÝjö° îuÅXd ¤»ñþ“£‡6á>b†0!—¼9µþÄ"øjy±Ü}ð–„Šgï[d×¹Ý+{38²xê²›ºñÍë'\ãÚø<÷ŠöS×Õð¼ógý{¦É÷o q>ý¯¯ä§\½BN”óüº¹ÌEç΀èÒg-{ó ­°­/ ‰(âËW?6¿ümãã·&SÑÃIŒ‰ !ýñïZ¨á~¸mÐRSµ\ó-Îèþà™úí[ç§½l—ɽ݃ž½s´Ï•ïümk&ûÞ½´ü„ûm-o«¦ü.̸í÷Wóßcúg¬Nÿbj¿òàzý#m¹µ˜ºèí÷ÞÄ¿üXsÜÍú#Á|wF`µO,Ûy/§£?IÁ  óÝ¿)ý Ëö/ÌoÚðÞ¼âÚ?o~{ÕcpVPMº[gþ¬]ÂPb3ÓC‡zwÆÆÞ¥JO?µó Ýq˜¦ §'Ó"†mÁµ^áå…¸ºëœ- ì{úŠgýÚd|O‡‡&DЮœ6ÙÚP-éÖÜ¢[Y@˜—Ìu㸻cœû{bL°ÉÛëþ¨¶x£Q§ ²v몆¬ëcYÛ,fXq=]í"t‘È2'ÑMœúq”·æ"ŠåÈÖÔo¹6O]DÏ.¡± Šª‚ÀüÔêÐÑÔ@@±ëÆ.}‰æŠðÄ»JIt³—i` jb÷!ëÆ”Yˆ‰ËÀ%´”[/ê½d°@<ú‰¬ ÀÔœ£irˆ-°¨•†#³Éx•›²Ók*, Í62ûT²Ïýœä å¶&-ˆ$Š`lAÛÁòÆD\sÙ !‚±¨¹»îÈæÇ}RKÓÉ2ï£bH¦Ñd<äfO\î³” ¤Ó#kóbˆ²„—íÞÀ…m¸äÓ¶ —‰¥ÅñF6Œ»mq9£m´|rlBqï“`ƒ³–û톧]éxãɬDÆ´íÒaÿ_7óÅŒqü©o®)ÜÇP˜¹ýOpgÿÜðè ßÉyê«¶ÿšOhí>:+ZÊ‘>T?|wðÙs2Xı3±kÿtß¹!ë«“ï¸A~ëµiwM[ï½^üt÷Ó·ž=ïÙ弡†"êDÕðÊg.ŽN3÷ø‡v"Zu§¡øpôû;¦rÓÛsWô™¯ˆßþÔZ|Å…›ŸþNºô×êáŸÁà¼_Ù]S’“Õ›ÇÒ~lÛtÝé¿1ÔoÿKã;<¼%VJÞ¸ýÓ§ëͪß>±çö‰šY¸úÂÁö/nÅ__QWSÉjè–7¿{ˆNí鮉¢•ïÏê‹®^¡Þ—ß ?^ÓуvTkÜ´Ë©—˜î¸y¨Ý´¹~¬,€ff¦wLñ‚PöÙZwäöñ®KPü/ÚØäÞÃÁu ­[ Îqñ’ã‹Çî=~²8§=íž“¼kÒÞ¨¸ªOgÆfçÙ[Ó£ª –tÇJØ>¢¸=*k°XvùåÍÛÂêÈ·Žò)h ¡ëÓÖú±Nű‰ïfzò® _G)SEV „$®Úy$)5#å¹ jê€4éRàœ5o.­Ý0WtjÎae3T.£Vm™ëFçcÁ¬lí` ¡òÒmv–¶š2$wWF@HBÝOòú™ bÔ#ÂÓ,¡+XÕÑyÎye )s¯'憄&TД€Ì@ÈR^k]‹>ã@fÖ°¨9C èSЬ؊‰AÉA¯ƒ‚­Ô6ÝÚâ;.jÊP ¥¼q„Æg¬wéÖþۻxø¶SÃÅ‹"΋ƒ›`nኅ¡Y9 i Õ ©+…ùÚd¸q-ƤËWŽÚÿØ¢³.…c?]ÛõˆŠŒ'…w$|Âo­N¾ø É Vê†ìBg¢_ýš+@V=õ‘ ?ùÄ|Åž*ö˜æ(ëÈmíÚÏ}®f††ð•¯º'\ÔxœÁç>;-;_¾—†}ñÖ’ôŸ<˜{°SïW€*’½¯Áø{¿¢Ÿ›éß¶à[VtÉf“ዟ/‚yë_S4¸æÛÃWÿ·ð¿_¾– p}Éaÿ{DŒ·¾ýŠ£aF aXþÀEƒg<#åÍ'ЈMøòëÖâ[~®~ñ 2Uyü'ß./øðÂ7ï8¾îÙ™-Ýòê;ûbL¿é‡S*d„@oÿlkÎ~ó¹•)ÝüÊ;¸\!¸‘\ð‰¶wR~ðú[¼oŸc›ÿøõ÷ø*»]q®`þ!—{çÖ-OgIÆ¿ñ¢jüêï×þðá7žyŠß÷ˆìÁ Âä÷¾&Oû—Á­q[÷çoÂG¾Ë¯ýÙMÒ&ûìÿtg½ëÌêÅ¿¡?øÓM! Óo½ùd|Ý>÷Ùµ3Ì÷l´×<­mÞôæn÷®þ×|ôM?v/|²~ëáÉ=»`GÞy7líª—î>üºƒŠ¤W¼déø;îÔ”4o¼zaG®¶.yÅJyÎû^¼7è†XåÓÿò¸= â€¨s+p…Y80Ò g )‘‹‘rÂuÕ€læ]âŠa€Ž9‚@'ÞçÙ‚¡‰‰½CB j"ÜuÙù&µÆâY±´ì@ãg†™zQª„Ä)õ,ˆ¨H’¡óŽHM "ZF¶”³$ߺ*r;CôÎz, ˆ†hdˆ¨=0B¶‚,Œ…Ï\-¦Š*EÑ” ²¨"0¨!hé ¬ÍÛzÌ2ûÆs@Ëê‰xË9 UR&1I¥24+2ˆeÄ@m³ŠT@ÅB‚Ö¬,Ò)™9F"Ù´Bí¥ªI Œqë†V g1DWÚ‘­T b] ·3aËÓÒ¡4©”H"Ñ,8ã¾6µ1j«T©Z½4 Kˆà}enuˆ.'ž“Ì9¶9õjM½§v2uÍâ<·YµÃq*nuЯ ¶(¸Ð–õõ…Á^]=¦ÆÂŠØd&ƒeô}Œ{Z©I—›wÿ¬-€ÖÉ‘;î”l4<·–'Ô —÷l«÷¶yÚb¹Ãá}ÊV=m3ж«ö6Î[>ÒRE¦P 8 ¤Å|Ë#?›Ênb±J„V>t¤ì^àÿzÓ¦M´¥óAƒë/®‚jzÔ5Õˆâo?x´g§¯º^ö˜æ§?ûD÷‡W•úòTg!<ïéú÷ßš^ú›§¹Æõ7ýÅÑ#¥´æŸxù©Óc‘_ù”ÙŽ|êÝwçGýb K:&þšY½æ`K¶L—/pÛžqN{ãg·! Ÿwºÿ@:r(Ë?_ãõPYûG_ö°þ¢AO²ÙùÝ Œ4ŸàEÛáÞïݱ¾øJ% øŸøØ‹±*ß;2¹¾+Š8xðiþ‡7eC3d»ø‚•þšCE±üô‹¶ýÁË[wžó£N^zóMûù]çíÜ·ìò½'Žn»¬ª°-œ¿Øþt«4!œöÀSÝ­[:™Ž V¾m<çJNîZÊ·¯ÃÒvOÉ´öØ´?saø[øžWïä<¿§¯­o–<;²qO[„Кhj^ÁʾY×7áT1lMÝ ZÞQc;Áã´¦'ò½Mg“Qð6Yëïê–†MÃã­´å†åälêš*å~ž<Ö ˆ"@\W[4ò)h±éÁ¡_œÎŒÙ7m>5ÏfPÊš§Å h¬€æ³™‹°¶¤­„P…ªª’Ŧ¬T3‹a¡÷J‘0t¤|²–ù®¡Qb%–y6p Á…¢ŽjË¡¨ñ$‹´°¥öîQ¬³ û4ˆ"dp * Øô9œ¾#_ϵ­he€$X+‚nyYŠ™¬²Æ±ñ ™Î¹x eëÞîecgÇÕõùðZït8¼0_úÃvçýv¹Ø÷ß½~#ƒhµg£ÎF¶8…îG?ÅŸ? ¼Î”æßBv£ O7%(…²éê#7%¢’‹O„̓.ìþù?NJVø/‹W4w|ê„=êÑUSg6wÅÓ¶ic&DØþímøÊG5ª#¯ÿ©- „þØûînËÌpÇóöÇOÞ=ObhÄOz\sä{`ŠôÕkø²KÆïøIzî‹íÐ{î-húØ×Ë+6ÿðµkO¸4·§:U„ÿÎò©?›¸|þ+óÆ[~„ËÁŠØÆÛo­úÎa$¸´Úd¶ÙGÏš à¸-ªÊàÉÐ#¹Ö¬€±'ì…–­¢ À”UÕ€€@QŒÁ:«Cï¨Û˜%34Š*ë'³PYë²§ˆ2‹ë”]Λ2eF6dc.KŽÀ欩š •vГ[KèÄe21B2B—ˆI¸˜0c”ÎLÐ ÉŒÀ˜WL®nN™dõÖ* *R`p6O‚DŒ €Eo U©ž¦€ÉȰtMg£§Š€¦`dÄBPq¯HEŠïÇb‰@5Óªéµ%( @”)ƒ¹>)s™À 0"ÕTHQ㺨t,ÁÔ¹ÆÜhŽlBe°‚ c¤Ü#”lš’×™LväZ„ó½jÌù”‘úøÙ?„w<Þ«¯õH˜±n¾õÎÅÀÐ⋞°ìk^}‹mþõÿ˜>ö/Vv½%¹€ùê«Òô×å"ôà×ìêÞø¿íåï¡ë^qbôî•᳞5Q—Í7§^ÿ•™) " "iѸhΜˆqÞTÊ,ƒÍ¿üÆ“õ{¯ù>í ýÚŸ}“^õ¨eánòÖïÎJ†+ÿì´ü®íB°K¿Ö^û'öÔ?î{g.ïýŸùÍL A‹2V‘ €iÑwˆí¤ðo?‡ŽüÑ]ºuÀÃ8+Òi¯?/.»Ô!Bîhÿ{6ú/>c­tEQ oýù&[¦vÔ­~ç±£¥E‹#§½tÎJ¿·öæ]‰/xh½}%nÿ“m~é¹›C/¼í~~ òõŸðè¯.£W<½»óµóQwÏ/yù’Y±ø­1?äc‡n}ïI ¹¿ýãwŸýÒÕnµIÆ h`€täŸoٺ߫öÑãÓ›3>î’¡ûÛjßžÚ 1@håì?Þê>¢ù~‰ò®qóÜÔ}þî|Í„üÊþSßúÞ=}Z³ö±i™Ô²ü¸ÇhÑî1 “YÕÐþ_Ý!úÞ­= nüë2]yº¹+ÍîlõÔÿÞ>zØ6[‹˜èÎCã3.QúÉ©Rꎻ›_W˜5k¸—Ö®‡…+¤S!)Va9pønzã»ÇëÛkÝ¿*g^th¸èkV›ç€N½ïJÎÕ|ÚËxk½iTÝ<ááb¢¸ˆ€%:«MÄ€³(xÇEÚ>N…Ú:›9Ÿ’!‚‘z)Ä(¡o\)”¬/à ’¢é’™‰U)JâÜ" dF´ê´¶‡ @A@3rb˜|) ̵”>W‰ ZWJ‡Ú‰ëã(dn|-¬±ˆb5ìK°ÜtTP'ΦEË À Ð2V j(º¹/ ™j4CÙì‘ Âê²§¢f`@ÈÕ`Ë2>µiˆ¨8_h7ÏU!.¦ÊÈí<°è]êï5fWj-q áÐet§Ÿ‚W¿º¸µplë¨Ùt–gÛ›,X¿ë`2R4Û}Ñ )À,òÉŠÐÁÀ¾? Ö) Ë_?¾9Yˆdh lÊó¯ÿ$?ê)ôå?!ü'TßúÈñbhEàèÿpWüêü[Ÿ=¾÷¯ÏÑ÷ÿËììgì[»öXºáF¸èçºî“ßì‡O£ã_¸»ūް‹I]lÐZƒáÜß• ¡Ë]¹œx…7œI?zÏ©Ì`©Øñwùç,*v0×üŸóß8/¬¿ý†Ì\~ùlë­7jyøK1¿ù÷’×衘ÏAáæ??ô„ê‡o;¾çE»Ýþì.üóãea_€ƒ º„3„A° €}îú|úëöM¢¸ÿUÓáAuX ¨Ýû€ À·háŒ/»ëìœW„–ÜýmýàíÉ ÊáŸÐ3ȉóËg·ç.ÇþÈÆÉ ö{WX·_©÷-ǯ_ê&¹ÜõÃ&Ÿ½LÓó¾®ß*ŠýÝ- Õ»¹:²aý¸‘äYªn@8½ãhhü¦Unº+øö¦¸kyЯµÇîóìHC¤:Ú–z„íÛ\5ØÖ/„˜ û…í©Éù82lõhŠbŒ”IÑhèxØI§ŽP£Œæó £Ž… ÅA™U%¤Í^€Ä¨¸:Í— 81vm\Uca‹FïÈr0‡Bš—3ê̆ڪC5ßè„:ÂñÝÆØ#(ê:zCs2…yÓ§I6D_4T:7èJŒ 6‚m;Ž—pÒËRÊxÈ\Ɔ.m¬ÏŠÑBwZ¥b nÕí EÈPH S3t¨@¥„Åí¿ÙKÆI×OÛ¢ÜA'I †‹•e‡Iæ`4MQbìfg.&@³žŠt| Ì3 &hûÖÏÙØª#›³yÛŸ<µB˜šèêioˆ“°³ßyLW< KÄ.ØôàúqXÛêNÜ»¹xÚéê½áö]¤ëP— ŸçÐÍuï=‚Ý´¥YGÕöŸ3çœds.‘S %Tʃ³ÿHl/„ ³+öMe§#q)0YIúÔGŽ¿ò·›Å0ÿëáÉ¿§\ýŒÇ÷Û¼›þÝõí+wÕ} …çtý'þ#ÝöVGG“üÇuzåoÅÿp”^úðúàïHÄåPŠd ç?¿Ö|ß\T †ÖÞö®fàlžÅÎyv†¯ ¿óP9ø‰é"_º£Ð”›«Ô¦jrîj˜?íÀøQ 9uƒ§]<üsŠ5ã÷{PD¥Â`+OYJ—2̾õ“ã—S.C¿ñµ“'p^uIC޹ÿê^^x‚+ÊáÖ;aÞÐÝ·3#Ðâ 0Z1rDýzÁ³wÙö;óæîÚŸYªWbÄ\ Fqsó^É*æÂó#˜Z·¾xž8œMMÎì@´*?%æ‡ZµÅ%3”Ý•ðÖ¸Ö[ÅÍŸ-¶£°ÉñM<6Sð‹ y5ÊÉ^ AÖa}*V›Ï"fš YUq75nˆxÉA.ó-Ý( 7¶ ÌR® ÂŠ›íUdTXàÒyó%2Ô™&ÓAí±Ãè S¨›*pfDCFö«qVumGjÚúi†JÎ7©W0Ã*H—H\LÍ0¤á ƒ¢ÏÃfK Ì;eV³³³¯cΘÍÌ´h "Œj ™sXj®¡žHK%â¦%²il±g±vœv[UmêÖ:ÞÓ™ Ç3е“Ûoç£Cîpw+÷ûÁÖxffÇOòÙg/ìÿüÝ|Û#cw˽¨’qÁ®Îw ‚0R_šœVê­“§X 0~guëß?ºßþåã½üà€È‹Oxà´#MñÜ‹Aü8bv{èü£ŸÛÊ®p4 Ê ˆhH;žqF]Ãì{o¼wÇßœS5ótí[í|ûùÌ`1鯧À½ø%ÃÆú{^ÿÃÎ@ ‰ÐHÛ”4pÞ@C€ñ¼*‚ƒß}ÿçžZ~×%KhÁ²®M¼?o²©²…†ØÄåo½áD‡þðe£ïüÉqBø}Â6{ÙuY Ìlá]—»j†ƒPNþáw³`1ü+ä_|õ2 æ7¿Ý @éÖ¬þå—.ú“›ZCûÜ¿‘àI.ƒŠ µ²ñXOû~÷ñŒó§;À'œîÁí¿Î˜”¸Ù Šhá}"ìû´Š€£eLPC›ÑX*ƒ¾çÔE‹ÕKžYË‘¿øQÿG¯¥Ü€Ñ ŸQ9 ~Çâ:Þøku8ÒÛ§þ-ä 0C;™V\&Õo¼Ó]½ã#È&šKõÂ_ ½ª¼óèaï¥é;O”=ŽnyãiÝÜÒÙ ¿[ï}ÍþÁ žxl° ×3qêÉ£e»ýwlÿïÖ2&pè• Co0Ó6-,B°P?å‰lsYKòÔ… è ‚”4ê‹i1ô­Ü²7×J߬m˜c4!Bƒuò˜œ*j¨€J¬,ª2'å4«“öY¥3@‡N‰œ#®°¡¤¨jh`AˆxhsbƾIÑK_¨«‰ cccDE%1T"3&h<€´ÙøÅäÛ­bÜ dvÊ*!2ta9ƒ3q.¤h¢LJD ØfU1ÍBhgÉœÇÜÇ<˜#%@}k¤8›F®˜uîŠ×@4i@IH]1iöˆ‚84`!4sbX#€E–¾C47˜* t.«!Àœzg†dìr½#€\Ð+˜O7ÈaXU¡%¤-¹€6Y) K1õd§lžçG‡Î×bn ¡24€zÉûàöHÀæ:€AÛƒ()Qq™ l~“nm1P!±ê”´StúÒŽ[î½]Ö l:bh`ªíívl epÖþšTˆYU)“Pwø;'«£çW¹o’‰ªÍc ’¿÷ªuü³_%¨¬÷™§ïûôø~oÛ½õªkõÏ-Ã×ßù詬ÜFâ½_X÷šû•=µ}çMÇ3‘ßšÊý^½hüRzÖ“?þoGšß­î©àœ˜·†ö¹On"*¢’+åë?|bŽïùÄgŽ{N¬Ùå/ZÎïúqyÒ“†ÛVáMÇ'˶˜æñÍÛÄ*ZÿŸÇ'û~®»q¾ü„íÅè‡×ne.å;ßï¿{R–¹¿ß¬ªßÞܸàܪú}s\ú…k*.ìù¹3óü‹£8M W/è·vg\ªKê¾G?ÚÌzöêâ%Ûâ¾'ïN^oExÇ9nÈÃ3—´í—OGìN®÷O·Ÿ‹QÕkÖ£'K‡Ü,!­,2Ue÷Z7?šJxñØñ¶í³CI eýÖxÏÒ3d< óEÝVNö‡[›+»édk1÷?=fF6=<íÝvߎ­=fÁ …í(sÕ-¬Ÿd·‘K°¸«<Æ’m~oÀZs”‘ÎæÉ¦›C?W ýæ=™‹ªG„ÖC“ª­ÆË À…<™d¥þØï@Œ(yȖ˦31&R'ˆÎÙÆG”:vN ÔÐqWÏ "#ç£~Š183.Ïû„š#CöŽÇãY—‹ô3œ‹mö«ûdæµÆg›c\\\qCY_K ¬õ¾QkDË»—Žom´Ã]µ«ûʘu¾#’*™†VgÉÌÀÖ6L¨ØÊ9K°ÃÁ9çWËÜ.2 "*®^¹T¾øƒ™› ?|nåï<ØÍ{€~¸sµc+zË÷K!¾üê†L|)ä¹"†ÐŃ_œ^ò뻪èà+Ÿž]þºåõ£w›dwëßß»óMûµ½‘Ïüµ=*‚îÇSìuë¯$±3ë4)Ìß}ÿ±áëΠ}uÖuÀ{›GL¸ôÛ[GþözÃ;ÎY²¯~zò„óháyó­¿ÿÇ<Ÿhý‚‹÷5rö‹&Ç?x÷\ ý‡@¤ôä_ˆuÍ^(×}ôD ÎýöãFÈé£_•¦ænMð×#LN~â”ÞœàÛ÷Æî`¶_z\üá‡O3øÂ·ñÒçöÜy;öŽñg7tý‰îº{¤üŸß>˜îÜT@4*tü“´ôøGÊ׿ØM>YiÇ˹š~öní*¬“Oõ˜ñиýYGðÞïüÁN}ÙBg\“ À®Ç/¯a]îúÖ +èØÍnÌ ÷]Våol Ær¾—;ïHb¤ ¸k£ÇÜÁië7nèæ;­‹Û¼ÝîIÀÛG•ôÄ¢{ô¬ìvý½í&œ6ß[AÊBÓAˆ‹Ûº…•L„ º=JvÃá®nXÖ̪Z¢SÌG‹Ml;1°uîNM'©x>`Ó½ßYS£êÀÅ“k+ÃúPŸNt‹¹DÙ}`•¹¸þÄm§¨áK+ª²º 9§Ú:ÇídÄ&Z®¸zräµß™©AÙØX§§zcÃùÙÿñ“—ƒT/{¸ïÉë°¸dJήººœzóìÙ/^QG:„åÀZpá HßÓ‘«^µŸ âÖ»?;Ãë®ÇÁ_>”–ùš?8éÞùèb~øU­`-nâ®ûÓ{Š*¬¬å7¼Õ²0££¿øL+€—¾»‚¥ª}ÂK¶;¥ü‘7LÕ€ ù?|Ž÷º‰§k«Àê¢zý3yé//]à_ñéÍfÁÙKž£~ǯ»v3%F–ÿZfŸþȬëº_y|>ù†[RŸíq¯nê¢âéßß´¹øî+–þ"•¯¾ýøÚ‹BýêßâÕ…šËNGxÙ’?«j?üùã~Ãr|ÃtëÿkÚ¡-¿eºùÙçeí-üåCigÓ÷g/¯ão=ƒ]e6l6{ȈÙë]ŸüaûSqÏÿù„± TÓ¼ï9.»^¶·*š.:»RÔás2?°¨˜À=ñWaçÞf4B5.`hΔ¶¿`{¼ícã3_¶­™õÀ¥¿häûÐBÎNÓ°üûOówÞDççØhÇ.»úŽ]Qh€ ³ƒ‰Î©#€&TÅÀ!WPšµÀ JÊbè,„¹Z¥ˆêF©¢ì“LAœº’ZAöM¹ô…–%Gƒz2jkQu ê2b¨Q=xÐ4Ð9L½bU @ñ„}ëÐÇ⪾Ém«l†…¬3#,:-ZKêŠ% q¦©'¨FÖÁ!òdƒ  å4ª}cEÐï2GØ$„qjû àû¾ V’–ñH:Å!là¼W@?ÜÁd–þø,õ=Ђ”•Êɼ7ŽöN,WòíGÛI*±qõNf‡¾k‡û¦IµêzEo†fã‰Û”’'ÓÄʘ[ÌräÚÛK:p NŒÖ_ss› ¬\|Àê2 ògìtVåÖ€/¼¬ZdÊ㌠ˆ†`@¸çáû§oþFwΆÅ9PÐ…ÆVžœh® lüìÖtðÞpñÓ;d¸óé{ËÆO$7Ãc÷$C°»ÿOó Ã›eßswL¼Š 2À8®8¡ðë4^D@‹Ï¼À-k7 yúÉïëS^6쫉OßýPO@"l°ñÞW)ØÐmÞÞë·ïnºóóé«o<žø…<Ä2ë7íùï=-Uiþ¦káÙE?xÝ©þíè^úÊæ¶7þl¨Ÿþg@ÿ’×.Tö¿K¢<ì)h_ê.²ÉBVúﯘsWE—²޹ Œá‚ xV½øÉŠI@ }«‘ÿª…¥`kÄXjõ…æD*mõ/ɵ ±)Ã×ü~á¤Õ°÷ox…–üéÿ(½CìCÕóo<Îê¥Fz…˜uÊ®¨¡˜;û3Õ¶NàµyÑ/ µ6ئl‰Q¤yÛìO%WZ]ò§€”< fnu˜}I¹*Ñ,˜àR £YÚó€è’d>ÿmyv¿ŠKI³ "ÑÔk¬¢ÖCîFÂ…`D{·u‘ÔAïA$1ÆÆ ; f&MÆ~ˆ%„¾ àƒÏÀ,èhTå37d+6 uòÈ@¢AÙGò½àåªöfj\”B¾˜87 È¡8?g âåv¨†Ø›£F|ŒfÀFÔ9ŠK`,4h, è³z§Ö#j]M‘ ‚-F&ìk«r… Áù™93AEBP Ì,S¦ˆèê!&O¤“‚¤Qƒ¡ôŒ½o•ÔLœE2'Æ*λA— …Îu1MÆÁbà 4× ûbHʾ0ô ž}ïCR7âB⓪¨%ŠS+ 5'%b—™º¦ ˆƒÅ¼] Q2‹Üš ‰…kåBeUÂ\ Ôš.² 袃䜤&˜©úžv* êŒ{È¡*y›/<L\ lÉq˜¹W52áVB„XL«ÍвÛ9tÌDƒ Û@¶Ñ€ ÀeŠPA#–˜*à $‚fÞþð”– °¸ÐƒËÑ r*WüK’íˆX»!¤ì}ŸœòÒÛ¶ºCʉ|Â%ºúïTX¼ëòh'_?•m¼øÓëˆn6æs?˜;%Ÿº~×.¾öåÝ<”Ñ>Wkò/||1×»³B‹ì¯þÀ&’ òs– 2@iõͨÓÙeήz߉öÊH8ä'î>¦ç¢æ¥'°Z¬?E9ôð[9¾oD’7ÑÑd颚ý{¶-íyÅú‘‡ŽŒ)Zºº™X¢mϾzó1 žó¬ãÕ®M»f×/ݺx—+燥xSº™¢¬=p©BgÍUœ2òƒ'Öùü…¦w…B‚û æ—Ô™‹Ã|WíϱJyJ¤Þ/œ¾êœ— *¬î7N+ƒÓ2¼$˾A½ëÁw¾`WEW ’Ja7§¶¯X®ÉBAð@²¡¨a+^ªŒ9š*8Á¤œkKfL)¤ÚwÔ9æ(«çBÉÕÎ%‚®)ÊX´wì+áÌM{U´* /º$P+õZ “ (5ƒ6W U·¨D‰û:@±²ÈÚ9—9”  ®ú R êPÈ[´Hf„ÕÕ*”Ì<¢öiTJ]/ˆhf_æªV£TÀ«¦šY:u¶œ%7MH¨HTTCèØyƒ(à@IŠƒÛ˜M°•à]—è{N;Õ6{³š /@‘¡c‘(A6+oÚ:.䨄R,WÌè:ïû¶¨÷À…ÔÆ ˆ>zJìç[]µžMqÞ’Bq±Ì-F4†^aF:`S|6Â(uÀ\´O}#*<˜c‡ié‘¢±\×X厤ï©ÝiÖGÁå–G(êt#EÂd–ba0°ªJ^XÉA æ3 «(›sY2š¢ƒþˆ×jªÖ ˜p4RrŽ{†¦„k÷Zì*Ú5ôŃNØ,ˆÕ" »Ö‹r¯uâ@)‚à =po²VÙ°0f‡N¹”Ü\\…™9%ªµ’(ꃒ9KQú@=80óVJ¥…:ÌX‚™aæ¢dX]ìMctÐw˜²û©Ÿ7Z 2hê|¥àÑ0#綪{ E$W"÷.S!Jƈ¥zÎõŒ$´ÎIš kÏÈ&1Õm„"äœå*1çL`€9Ì 2ÙPÄKAJèT!s®Œ‹cË ÕÄâœÁ£¡“D@Ù‘(}F—â@°ë£*·Ír¤H"H1¡ "¨34ª€æè‹añœÁHœ©¢ç,ýP\aµBDRÀ¨J½U` BºÚ8—\©ˆ]´$õÔIS#‚XXB¯†NµÔÒ!²B`/±@£Ü6Ê:ì@QÀ ©z0ÐÞ+ùDi>ÒR ’‘)°W° Dt-¢µÑp‚BFA(BËËÚ;.³*»ÒפF³o½äxówâ¬ðE¤ýîïYÚAêÐyE¯šH©b­©JèH­wˆ&AAI}b–>c =ƒ úl.ÆâÔ1aàz æ•Ñ'ŽÁQÅÅ‘V ‹‡ìµ€ï‰bfW :‚¡57$¦€âØeG0YE8?H>ƒSVÇ>1x²B9º~æ•À²s„Tȹ¢À”àÑ1jÇd‘TÄ{ŠJ ÕÐy”ˆ£¹R Ù0–‰‹¨Jà¡V,”PÐz#-`T‚ψÁ$d‹R‰ÅÞgRô‚œú„žÔûb¢®ˆø€b¨³rIêÀ4˜Wc£âK!Á"†ŠŒÀ* ]ïQ€3%o’£Ë …³º¬È¾Pò*à}FE L¬\ P͈¬}mÜgÎ9©:'˜H”@;Eo1ÚH:—•°[eÜöÄ lŽÈzŠjŠp!Á…\ÂÁ @r>ü…¹{üy19Ÿ ùÕ\›ÚÏ^ý¹ÿh.ô2/KÁH‚EH„ µÞ²± @6WZ/ÂHu›¸ÑyB§>ƒcË)do–³±ä\ÐPòšÑzñBµyUìÅMk¾‡ŒÐš:óÐ!Ù<¶)Q‚LN¸ÅAß;1é0:Ë´ÎP¨0;ÐU"N½·bHªÌ–ÈU†Á•ÈNÛ –Ì€„4†¨¥2Ô³ºÊ50bväÔ™'¾r”ƒxÒà *Œ$† ê;‹Þy -æ#ƒ à=ÕæµÐä’Væ°ˆ÷Q)ÖfutF‚¨V¡ŠžÀÅXÑEPcö†P!9%³hЬìØi´ì3EiМùÐc%0dª" V$Úâ¨À}J$  ž‘k5Œè@­rŠª8 …ŒÌ¡¹ÆC]0@å2P\ˆ#aDë­'Åš¨Ü×BL^g&Î{CvÞ»` yB@@3i¢#†P›²ËB*H*^+íºHðÕÙð)ûaÀä½ç7 e(™:¹ëõ²+ªHÎï9K)½˜¥Q1 AÁ¥ ‹Z ®×&Ĭu1MØxÃâJQ LhE'\œ«”Ñ´× $IÐÄ'(AÍ’ªã@(âSî$WÔu 8ƒIvQK"à⵪×nI 7 Z°’±v¨€9gUi sm`sGš„P!!‹àŠi6RJ•)‹ŠøÔ#‚ ï-›$å Ú»{@%“¢ "¹«I͈õˆ˜aã:!D3šµDˆÅ ˆL°IΑ˜@+®¥ –Ðã̃€’‚0 ³²dQ‡j-R)æ‘ ¢¢5@ËžTAH½4@IkÈh"]¨:è$f'ÎYï ¤äŠû\D… %±Ì|/,]Ê ±u’ …¢.Ë0sˆQž!£!%Õ¬›*¦$š@U @RA u²ÌjU)ÞX¬Ÿ‡úÊõ‚h ˆÔœx×Ï+ÚõÀG\ÝTh3§„S¬¨¸»Þy/­û >غá®ö¡ÜøºSÃG-ã7lyÙÎS?=8}ÐiÍ©ŸžZ|Àbºã®tú¥´öãCð ýzä¶°Sܳ±xiß¶yâÒsa|x#^8('æ½g…þ¶ãåü}nógitIÕ;>_>s4¿÷N½loÙ¸}¶röRwä(ï^\°{Ç霶~×xy÷B9u—ìß…vïDö,TíÆ–?äøt¾sÍNv¶k û)œ6,ãÍõá—%^Z²tonvQšN´Ùîˤ¤Å%ËÓMªWe~*¸í¾LR7\"™ö}µÈÓÔ…mF[©T ŒÓ)4÷š•i«‹&¥×aU,Íy!º©¶q K7:n{.µ3“j1Ã|Z†¡ÇdiÁ…VA.[J5‹„‰ÖžL\WQ1©hÇžfÄ.Z;ŽØÀXL…[hÔI–•œ†®p_˜+¥¬„ÞR¨˜×}}A?ìû¾rä¾@¥MÂDÁĺn! t®¯{ eè’kÛÀ Z­JÓ«ó0vyTpV9£ÄBʾ¢â@´É= +-œ=[6r…¥CâaNɳjЪI §¢ÖTlìÅÇ^¼«BÑh\@Ñì%ûÂqì'K ¨TH"_„%Wžµ˜ãœ¦~á>É›‹Ò[­ N–_ØM?ö_é±—»#ïº5/œk·¾ûðٗʧ>ßýüùíy´ûó]ó/êÈ9çí_¿¾öìÓ–oü«ãîÀ^ûîGÆç_ÜÑ¿}fòÐ3—¾ïîùïðßùûÍ ^³Ð|ôßúÇÿ®;ö¡›òï&ßøØæYrš|þ››áâá·ÞV^·R¾ö‰õ¼6ÏÿéÚò¤gÊO?p,ÿé(ÿç§O\öò¡~ü¿à©¿¶x÷§nN¯¼¼ýÑÜzÑo¯–/~gþä' O~üîî¹kîþ§õ…r¾æ+é’g×ÿýÖòÄGÄé¿^|Á6ùÏï– eeúåƒÝïç×?{çà™‘¯ÿfÚýä]óoß½ùà«|ÿÕ5yì ¿ýöåGílrëäªXÿ½[ëGÖrè[yáqƒö{÷®Ÿ™æ›î­Ï¼¤Z¿î˜øÞvóàÆâý}ºõp9÷ì°õãõpy×néöŸëõžCíyÂüÈÉrÎ.,·÷ñÜÊNœ¾'¦»Ãy»ùä]%ž]ÑÁ®­Îä´±>?kD³Sö6í±± ÷ g§NꮥÊNn¤3Ûy×ÅmC;¹ÙîYrÝŒw u'烥ç§laDíz¦¥EM›ó°+·e¶9¬µ÷y¹IÓÙ¬ÙMØ®·q¡ä®µ:ŠœÂ…g›˜—}žÛÖBmYæZWhn³àú‰”AĤUgƒ4ÍÕЉ%‘Ø*$ 5Y+<Ì–²`¹¥Þ×’À•ìÑ&ö>—5äR…©žAi+Êšç:4΀ÊÄ »œ[DÆlÌñ¤ê½p’çÁ«r @É”PDr ðÀ êº @xi¨'«‰Þ•lvl³Yœ8¾~rš´;QNH­k'íÄ(WÇN,+>v;Ü€67趇”“ÇÇáø²?v°?™æ±ã|Ï)9º0?xÞ´ÕlÜt—MÖß³aãÇ(ûr¿öÓCxRóÆÝãÑÖª¿ùÇrz¿8½v n¹|Ý–l­¤Þ¨ç§rógNÐ/ÕoþÓlöí®¹¦4¯·þëN½úÁÓë>»¾úÄeýþ¿¥;7šüûÍyÏcì¦ÏY}̶êÖÏ÷?¸*žüøM2ß»tçÇïiÎy\uý'Ç;¯Þyøý?’Cçî|çíõÊÊð ïŸïÜ7:ùöÚ_Ù¿xÃßÓ «_øðlñüÅãº&?õòæÖ7Þêç´…¯¼aƒÞ·#è·üŽí³7|OŸ÷’åëþðDxç/äüèä!µ}üÚo _8úÒ7ùm¿û“ãKÞyöÚ«¿Vžõ²Õkÿà½å‰ô÷·ùÀ÷‡ô'ß,Oý3ºî5÷àŸê>óŽ‹ÞÃéoþgÿ°×ï»ö¿Ãç¼hå?ÿìøÊ__ÞÿÝyïß}×Ëo³¾$~áõƒ·>:~èÝÓý{áñ—Ü¿ñ*ýîžÜÿ–Kã›>^ÎüйG_tKþÕWU7½ìØà=µ·ý}ZýÄ9ë/þQþ¥×ìºýE·ÔoyÔàß<|äêcöÕùãÞ´œ^x-¾è¥ƒë^~D^óÌñ×ÿd}õýÏÿâ_äþïÛ~ôe7Î^üŠtãËî]|çåò·ŸŸù¾³Ö~ïdz§¿záè‹o¥¿~¸ÿÔÛg+¼´ÿãÿœ=öM«'ÿèûðÚÇÇk_»æÞy5~ðÃãû½c‡¾ú+é©¿·úÝ7±W?5ýÇÎ}ïnüôÛ³Þ¹ýøë~Tžó‚p÷Н`óµ·­ïþ›ÝÓ÷-ÿÂËâÚ+ï©ÿä*ûö?L›×9yÏ7û_þonüwÿé^yuå&gFui4t(P 9Ö¬¯òÐ pCEvÁûÀe\èÀGk$gBà2%_ÃPȉC׃+ù„ž {õ†=š÷F9q•<-°#âܳ&˜À\±#t[ŽŒ “ó੠Ω@"¢eI€®jLD-"8 b‰AÀ «àsO¥~ŽÌuÄ`ÄÒƒ!°¾xg¢$µ¹ÖÒF¢¨Š\A0DBu¸œôÁYRäÄ03•”28çØ#ââl€c‘*0d[ÊU ñe¦JfæÄˆ]ƒˆ®ñC/JÑy²h‚ÎK6p"†•õ-/²¹–µ öªà*/ÆHR%ZLû‡øÄL®à_ûœÉ®Ý|Ù{×6/Ú£/ØhÎiº—?­=o›\öîÍrY„_¿êøò®A|óÝg,ðUï:’é—.œo;§Æ—ÿR¹r^üÖƒùa”sÆlçj]ÿÁÏͯ^mÎú³[òÕÑ]ýû'VN¯ÜÓ÷— ÷»¥_=Žc<ûÕ7¬žÛÈãcÞ¹Ómûow޳HWüÎÍÕý«tñïll;£9ð¼ï­=|Øì}Úá¢J.ý…öÌ3üàþÛÚ®ÆKùFÚïáêã«{ìç·¾Ô×Û}Ÿã9O»ÓŸ‡°ÿñ›- óƒºË£žó 5Úïó¹÷?uéJ´÷³óB9çÁwÇ3Å36΀VœÎð²zÁŠ,8ØÖæþUû´»½÷»Iw±.6Ú½8ÀçL÷„Bû í®­ö«Û½ãÕÙjÝvm¶#ÃárîªÚj1,2Žö íÁµ ýÊ¢Ãf%©Å¥E]Æáââ`«ár\:·}”ÈÜheÅ;ξ±ájÝÒ°óÝ``Sï˜'TCò£–(w>”Å… «¡/UÝ*oXaÕøÎ¹âÄ8t©s‹äT‹óLyŽŽ“u=ÃÆŒÚÌ0÷bì#fe3YZct^7'¤úê¨Ý(¨–•#J# Y[3MeÂS}äÌæŠSR#(ΨÛ–‘C_ïÜ :¼j€öîò,àö(Tþ@š·ûäWÃJ£s°²k‡3×Õͪ:Ç£ºPyû‚çç& ïà ûš‡öôK0‚Ë2:¢æ¬ì‹n[ýÂý/ÆÕ@û¶‰¯ _r!DWïj.ð£àNßGU…þܽ²Ä¸|ÕeÕ`¡Ýó¤–AÏ?Ýêºþr« ®<ìòfÅËÏ8‚•'õi!Hýø‡W ®¼˜CSü£¯œ-0.>³…].=F 8|ÆVGºíÙ'Ýi¡¿xoW ið¤«çÛqçï¬ûm1^´÷ˆ?â/>f¶¸@;ž9í÷UáŒ?Ó9¬=s²mžÝÅÓ˜w?::3´?/-ï\g]IFwÚ+O¸‹¨õÖ•P.}Úæ…+Ÿ°{ëA®®>cñ|†33Ù¾#ñƒ›ñÕŽG—¹Èg<èÞö\¢ÅËÇgìŽþ¼G¿Ÿ×Õ…t'¼lwsF“\Ôí_ìp÷¹ó3{|ØëÃðÌ­]{ü|åôÙÞalwœÆ¢_>ã”5{6ö¬zì„=ƒÛVSã–ÃÎ[)«‹ƒj׸]Q_†#Žhܸ…0..æÅ:ŒcÞ¹Åù„—ª¼<²¹¼ºT“Ã[fT*NIr•|‡AØ”²b’è)Æ£¬/ ŹcîcWµÅ;")QU“PÝx«:W<ô :vD-×Y¨g"ó’«L$‘e$ðØcªRìb¯ÞõZq%8¯–5ö¨uq9(! fó=ZäÖˆ|o)° ±€‘3ê 3ôV9風#MŽs]@Øg×!†„B¨qæˆÛY‘ÚiOP£1u œd01õF.£syØ¢±)¡£(J$‘T!ÏH)ô%åN}F¼/ý`2Ĺ'"LH˜\!ðUÉHL‰1 ksÅ O¨—R%‰±t\êÐËt$ÞŒ Ä{ëE|¤Ð”(¶´JA ø¬•e`F(d¹™Gg}=uÛ† D=B‘€– i6@° ®8Ђ¨Îµ pö àШ«øRá6€‚90— ¢‚j€Nk@- ÑÚ©IC(Ve¡¨*Lš ]²HSb0D¯¹šS H‚¾" ²Š©WKäœP sÏœi}`¤Ìšœ:‚™RR©|2Ï3mÝGN@Ù‹xJ”Û†€zW,šß¨Ã$¦Þz ±ïˆœB%DË^˜3{4Ë=J:«]Ñ P à  ­•DÔ‚©¦9K(d`Žœ+"µ´.*9xìÉ“JT_0´Êóè­ EèH¼cI¥ JIY½ªHÍ6(h¨A|T‹EY|OÆ*ÞKg}›b„Ô¹*;iCÃEJ/aÔYV®@rLµdu Ñ zP@… ÁÔˆàÿOÄ‘R‘¨Å#@ • » ‹…V#¨/hÆl½úbP#@Zµ‚YÓ;n)ô° tî•€*%œ ¼ºÄ’}Ѐšj„R|Á`šzHEêâ L¡ #Ó\H ±ÆJ=«CоéQÉQ§”›Ä-y*®ˆ$…9 DLŒ}U4&%Õ¦kA¯¬ƒ\È"˜ë9Í…£Î9ra„6°aïML½È¡MCSßÕ‚™ûE¤NîcŠÅYÉMŠ`ÂʆZŠÕÖ ïÙ|Ó…@ˆ," ZvóÐzSÂhÀ`ó +¢‚uΨ:%4òJ€Bq`€ æLÌÈZôÜ—H@š£ 檈³ EÃBÎ28D‘` 9p_*NiØrr@ç„æ%Z]²©–’G4aDLëNÈhLê  –ÁÒ€eO†P„Y9ô±KÅ´â|æ™Y2Q²Žp¥=VB…28¾4˜ „•@€° ©#¸€*  ©c0@€âÔŒ`@`.‚!HçIÅ#Xrfˆ¬€ùd¨†(ÂTõ„T¤*@-E’™kÔ Yà>}¨–€ €††J-zV´±½§ä(©8×%DcA2S6TH4;°>J¬… ²ƒn² ŠÓPÄb"pb½p`à ´#“bZ£'uª¥w\ 1³0ô•öì”±s†lœ}ObìÁ@„⊖@êÁ`,vdŽ­ ”œ)B˜°ëÐ2‹öÌ슂·ÌŒÉk§‰‹‘grÅAëAC’J x+ê‚pbTj”¸“Š@Ñ `â„Ô+t¥1Dè jáâ;ôEcWîŒS0Ug½¶Taµ˜),ÊÎJ ¥`(m#fT¢e¢u \È5CãYL"`Zc5CæÑ6kR/¾¨Ô͵éÁ"‚Y!¡¤‘uä°pµ‰zœKôjø¿„Ag®Öì3© # Ââ Œ Lse¨ ŠƒŽˆ 2!$AÌ@,€2‹‘Ä©2,N0CCë ü_†J`˜ÈÁÿ# †‰¥ —(d`@4™1@2W)ƒ°h%ø?,{-ä b!p%A£hêÌ0[`eƒ¢Psœ™ &Œªà„Ęþí9À}z“¨Ä(„Ð3£€¥hhÆÚG’vXJDHó‘!ÃÿÕEóÙ¥¾ª: JB¨$Y'±& õäYh –Ñu¾ÄŒL‰ÉÈ’J…$ |© “#HRœo¹"(,(„P<å`)¦ÁÿaV¨x.*¦P2ÜÇ” `¡CÌØ€!€aqZ˜•” $G‚û¤h™Áœ$…Í€P±ó@21¢Aò` :oFmDÅÞ¡q_R Z 0¤%q0q ˆ3b¯ ª®7ç@XXÕ0(™ òë )™¥ ±¢JáÀb ¶MЍ¡)ª8ÍÅ\1d3Fñˆ} Þ! «9E3´Š‰,y,‚H(Ô×LPÁ˜àÿCP2qr–fl¤Æ¨H ª7³Œˆè@(’*Bн²f!FE‡hŽ“£2$b6a44‡˜¨÷ æÁ˜I "Ð}Dà>ÐÀÐØHÑP¼1+c6)5Îb$2sŽ $;uÄÎFDoŠ”‰4‹óȉKôà¨B@uV(:“Hˆ„hªq@‡† Ö*EÍ.°Ì1kREBB3ÎΩDCC6GÀHÉûh Å!`*Œ™"Œ–çU‹øÎ£aQB)^ ’FDPB6(ÞL•X¬3J¦ÊØIÈ-Ç$j¦Ѹ¾U+`˜ ‹'"$0,@hêŠ'D0,L`Hj@@˜[@A€>‚—<Â}„»ˆ†Âš%¨‚:J ÆfBN¸–|ÖÚаbTúDæ b˜¸º«JØ#sæT ²œ]@KA‘”@L=(eŠÊðÿ1EP6,XÐkòhZ"Ã}”à>¦l9'hˆâ”ÀÀ29C¥ aNž!…0fŠ’"ôPA%*”Ð9 =:c5R‘Z TKбtÞ¨8Εå Ù‰&眀!`¡u,Eq}ÌQ3€4J‚êÀ wŒP›OÄ-; –¡Ö”**‚Îå.úâÄ©íµFì¢)$¨AÀ„&T§LìP¸£b[ƒ¡eŠÆ]Hƒ€3•Zæ5jÄ»L ‚(Xjvâº(Ü2Pö¥€³€R‚jqÐ5¥)d†–œ.È…TM]6( ûŠ !HZAçÄ™Zœc`ÃÐw5•â0WPı’!ÎMx ¤æàÿ0(ʬ½w† ˜#  €dC胸¢í{p¦°8ÚÆ¦µDKèµXÐÄ¢¤[â<ˆëÑBÏņ‚YË€ …B%h‡2ô\(¤` h"ÁPDÈ™0( ƒ’ö‘@ + %0HÑ:”`îœ dÎ A©0*H‰rÆÞAÁ .²ÌŒ%qT…¾b(ˆ… x‚"H€ÍŒÅœX ­…@$Å«DCëÂ|Ð#TÅ%/ Œà>†©D`(½6pB–1$g³Æ‚™0rï Ô¢fOP´ ‘@‹k}@T2.X\ˆª,˜"©"+Õhd ˜;©RVV2°Œ{"2Òb(¤À!€)ƒˆ£ÒyГG*,EPRDìÁœBA‚âYà¤@áDH†-TXÄ;¸AÇæh’DS¬$—¡–âˆJ@("‘Í Á ãlJ)@ ½T04@0#% ä@zôêÀ° 1˜bï\a¡’A!"*g’늎û  ¢JT0E (È0·Mþ&D–Ø€0!Âÿe€©¯•@ ð( ˜Š·Â`@ÙeŒBÖ{.@ ŠHpðÿªbb –j@±ÞSO1÷U((`žÕz¬ “¨×žÍÉ1;Ì Ü[ÆÄP"*)B/‘Œ„HŒ(94L¬$Y…"¦ä¡‚¤fl}_GèK‰h-” H¥ÄDNQH©ÎÑ8a­+´„!H¡(srÆÿ¿¢à(KrÜ`f¤T3ûáûÐÞž’(éê^¿çˆ¸wæªà¦s‰ÞÇŽ†+k<%>ôÑíÞþµ³A^ëœxÏyÏë‰×¨ÐO²+ ÕUe?/?HhÍŠUØððzøúý•±[Î5Úæ ‰ÞÎÂóºÖ©y­ë šO¸óÉÇG!-ñˆ®]ˆ¬Bç×Ks{~äkVfgd Éíà Œý$…Þ5é èàÚ¡ (‰{”\9&@›„/áø:ÊÏT¬{š°,ÖÖ7¢ÙÄÂ6÷ˆHL€½3k#×.U•PbøØÃ9½„ò9kP³TÀ«¦kÁÑÕ=ïX\g9Süxh¡è }³{ôÍ t53kS a‹+Å">šDlò>ðÍ0iâÇ`?>Íî Ðîµ…¹wŽþèØ5¸^Ä>ÖDkwš@^8ö§K;A®{ÄZÌšhõnòšÑJýœøV╉5X;k€Ê5ï~pk¥Ø.eï|«·lmuh¾1»£ÄGüwzâ™"VaäFÂå„Ý'Á¶uóÕ{Ü<ÚКëy! Ty®Ü¹si²ýLz2žƒÕ"`®ë¯ ûIB®J/ T>ÜjêýjP(PûzÝ“…'Fúáð:ÑׄH ÉîkÌjnZ†…­`ú>ˆo¶`€øa°…âVßúâ TVì4KÆÒXG;LTàzì[c1­  ß**ð üØA …&ˆ-Ó*L&Zpoøh™f 0MÀÄÓůsbç{ÔQ;@ øð:šÕÀª³iÐê0¯yõ_Àu€è–Ö Ìï :Ø|j´‡ÐŽÿ¼²¸Qý ÷üO•E–œ¹Ð§i·´RX£wîÙ4žÃЪfó™¶–­çÔ[ yøv³N^Ç3îG'¾}AÀhwò½7ØÑ‹)ìˆKω-¯Þ 2Ö/f§Ñ÷øa^òìlU±Vëjh€~YÅhñ ÁD …çx’_¿Xí~-;Wq0poŽ?y¬ %>švâÃül( -á¿‹î ü·?§IEND®B`‚zbar-0.23/examples/upcrpc.py0000775000175000017500000000243413471225716013021 00000000000000#!/usr/bin/env python from __future__ import print_function try: from xmlrpc.client import ServerProxy except: from xmlrpclib import ServerProxy import sys, re server = ServerProxy("http://www.upcdatabase.com/rpc") ean_re = re.compile(r'^(UPC-A:|EAN-13:)?(\d{11,13})$', re.M) def lookup(decode): match = ean_re.search(decode) if match is None: print(decode, end=" ") return ean = match.group(2) if match.group(1) == "UPC-A:": ean = "0" + ean; elif len(ean) < 12: print(decode, end=' ') return if len(ean) == 12: ean = server.calculateCheckDigit(ean + "C") print("[" + match.group(1) + ean + "]", end=' ') result = server.lookupEAN(ean) if isinstance(result, dict): if "found" not in result or not result["found"] or \ "description" not in result: print("not found") else: print(result["description"]) else: print(str(result)) sys.stdout.flush() if __name__ == "__main__": del sys.argv[0] if len(sys.argv): for decode in sys.argv: lookup(decode) if not sys.stdin.isatty(): while 1: decode = sys.stdin.readline() if not decode: break lookup(decode) zbar-0.23/examples/codabar.png0000664000175000017500000000030613471225716013245 00000000000000‰PNG  IHDRœ82ûöPLTEÿÿÿ¥ÙŸÝ{IDAT8cø >0/ø¥ÜõêÑXÑ+®¥âî¡%!¥1±GGGq R˜ãÀÔŸŠƒÛïÙT~Dü½=öþþ¹·÷¾C¬Ý¿?þ~-Šà‹ßí}÷íþ¢þß^½ûÿ]4ÁòòÝåwo£ þøñýxŸ…A!yŽ'Fšpº+ðK IEND®B`‚zbar-0.23/examples/ean-5.png0000664000175000017500000000026313471225716012561 00000000000000‰PNG  IHDRž¶ zIDATHÇcø þ0Œ Ž "Aƒ?Æög ŒÏŸùo<*8*8*8*8*8*8*8*ˆK #hc‘Pˆ.øïöõýùè‚__ßwSðvÁ9/b¾‰®=‡!øþúî{X,Âüw{ûv Áÿ6å)ðû¨à¨àð¬Î´yW³‰IEND®B`‚zbar-0.23/examples/scan_image.cpp0000664000175000017500000000261513466560613013745 00000000000000#include #include #include #define STR(s) #s using namespace std; using namespace zbar; int main (int argc, char **argv) { if(argc < 2) return(1); #ifdef MAGICK_HOME // http://www.imagemagick.org/Magick++/ // under Windows it is necessary to initialize the ImageMagick // library prior to using the Magick++ library Magick::InitializeMagick(MAGICK_HOME); #endif // create a reader ImageScanner scanner; // configure the reader scanner.set_config(ZBAR_NONE, ZBAR_CFG_ENABLE, 1); // obtain image data Magick::Image magick(argv[1]); // read an image file int width = magick.columns(); // extract dimensions int height = magick.rows(); Magick::Blob blob; // extract the raw data magick.modifyImage(); magick.write(&blob, "GRAY", 8); const void *raw = blob.data(); // wrap image data Image image(width, height, "Y800", raw, width * height); // scan the image for barcodes int n = scanner.scan(image); // extract results for(Image::SymbolIterator symbol = image.symbol_begin(); symbol != image.symbol_end(); ++symbol) { // do something useful with results cout << "decoded " << symbol->get_type_name() << " symbol \"" << symbol->get_data() << '"' << endl; } // clean up image.set_data(NULL, 0); return(0); } zbar-0.23/examples/scan_image.vcproj0000664000175000017500000000246213466560613014466 00000000000000 zbar-0.23/examples/ean-13.png0000664000175000017500000000202113471225716012632 00000000000000‰PNG  IHDRâd¬' fPLTEÿÿÿ̪3fÌÿÿÿÿÌfÿÕ™33ªÌÿªf3™ÕÿÌU3€Ì™+fªÿÿÿ™™ÿÿ+™Ì€3UÌ+ffUU™3ªÿ™U€ÌfÕÿ3ª™€™Ì€ÿ€3ÿª3"÷‘^fIDATxÚí–Ûrâ0 †ã@˜z!”´,e·íû¿äú$K6vh/v¦¿gJRY’õY²â®«¥èÏðäù›kФQzâÿ؇”–Ö,çòç}\l»8€D ˆ@"D ˆ@"D ˆ@"D ˆ@"D ˆ@"D ˆ@"D ˆ@"D ˆ@"įª~{üß?$ ±½=¼«uUu©Wx©Y}/ô7[û¶k†¡ƒêþ‰&¾–¾Õ/¶¶ÎÄát5Õ‰]l¬™Y±<×ïÃës}ûÒ|BìÃkÍ7ùÐ)_çbð«ÓB5U»è‘tz¿œ´’r©¿Ùºpì†Ó ç/&Õ Fïƒo[ ¡΂)­óqÃ:ZÍmÕÞ¯ÐÇüíO¹•gú&¬Ÿ<—¾‡Îq¼¼:¯ÖÑm9ÝlŸý¯zy•6½8mDk¼¨—uK5êœCÈ.°ÌJÈ¥~òØ5ÂÆYÌ9àƒH«'Æ´atúmµNe\/þ9«"•Ãfë¶ôì’’Y ¹ÔßlgªšíF«áùëþ$ ¡»ª7å|ŸyY¦KˆÓ¸¿…õâöÜ«j:e¾A*—›ÜŠåR_«?ãb»‰Ý&Ì»jRGî¢l¸rµ’e²ÐnL<Öjµ®Î[¯´Y†`fe²ÆHú±{ؽÞu•çðØÅ›#Š­1êv[$qiÄýWy6RÅ¿ûE5ž¬¤\è“ œ£…ì|´¹Êû®.sÚ.ûÍwÓ~ƒìBij[C<­±C^ÉjÊåöPÆYÙãÕšjV~h½pÔï³xnUGkL±T"(²#5'Û ùþЬ¸€=^Œ(º‰·ÓJ&‹ÏâpÈ¿ª #‡mȨÎ8[oé«íÎÑ åBßÖ×- ^Ž)KÄ¢&ypĺÈâ£úãS…ON«šøËm|i³ê…•”KýtjuÏÆ69­lî¨MiUìO* ³/Ø8šYçÝ}çÂJʳ‡‘òZÃüŽCÉ¼n§Òàëù7Ž¢Ét9>DŒ¸¯K+)? }-ï÷•Ë M?ÚiU"¦³xþê'ãÿ0|A[KBŒAIEND®B`‚zbar-0.23/examples/code-39.png0000664000175000017500000000405313471225716013020 00000000000000‰PNG  IHDRdþ;ÉöôPLTE3f+f+™U™UÌ€™€Ì33+3€Ì3€ÿ3ª™3ªÌ3ªÿffUfªÿfÕÿ™+™U™Õÿ™ÿÿÌÙ̀3̪3̪fÌÿÿÿ€3ÿª3ÿªfÿÕfÿÕ™ÿÿ™ÿÿÌÿÿÿaÀ‘{òIDATxÚíÙ½uÛ0ÀqØ•]YM2«Œ QÐYA•P¥-\iVQ¥l !R™•U‰lâî€#M%i̼äýñ^,˜à‡œûñp C]jýgHÍÊ?Ÿoû³sýê|ò{ÙoØŸ>n|ÌÛ±ëãò½üù§¿ïõñkcãë¼ý»õ2õ=§ÇÃë{€<àxÀð€<àxÀð€<àxÀð€<àxÀð€<àxÀð€<àxÀð€<àxÀð€<àxÀð€<àxÀð€<àxÀð€<àxÀð€<àxÀð€<àxÀð€<àxÀð€<àxÀð€<àxÀð€<àxÀð€<àxÀð€<àxÀð€<àxüÇ<:íjƒ 4xÐà‘Z¬Ýˆ9%ÞÈùæ_ZJ( à\=ÈdÔ:Wým°²ÅÊÚsµH•ÅJ‘Õ¥z‰§÷É&¦°>³, ¢ÌE³«Á“°R/ü뼜~xçò·ÚKðÏ3·®½ä uËSÓKå_ÚÖn9Z»º·Sã¶×Ãçåhû¢ÆcgE oliÿkƒ 4xÐàA›³ý¾býv‡¦IEND®B`‚zbar-0.23/examples/databar-exp.png0000664000175000017500000000030713471225716014043 00000000000000‰PNG  IHDR Îã 5ŽIDATXÃíÍ1 Ä0 DQZƒ®bØÖà«Üt[6X6$õÿí<©»B ä5qÛ¶Dª»EêÕ¥Ôk@ ¹#-FÕÇ{˜æZ×üÉ.kÖ#rþΟõ¥y=EÛK渞tîzDzö‘&rÚnj£É<šN@ Èù¼#_^i­X™p9ñIEND®B`‚zbar-0.23/examples/code-93.png0000664000175000017500000000362713471225716013026 00000000000000‰PNG  IHDRXdô}ØôPLTE3f+f+™U™UÌ€™€Ì33+3€Ì3€ÿ3ª™3ªÌ3ªÿffUfªÿfÕÿ™+™U™Õÿ™ÿÿÌÙ̀3̪3̪fÌÿÿÿ€3ÿª3ÿªfÿÕfÿÕ™ÿÿ™ÿÿÌÿÿÿaÀ‘{^IDATxÚí˜=rÛ0…!Wve5ñ!Xårå<€¯ ÊPÅ[¸ÒPEs"•P™É&ö Z3i¢iæqÆ2„? Þ.霛gú£‹¾É÷ÒVê¥UÚæÙÖ”^¶dg°íeô²¶î[÷¬É×ñËò¿î·¬¯[.X2X2t ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °ÿìŒë*À,ÀâºX/îVsòŽ[§½µIÛèêcÍÃiQžZ霿M,mí4ñ^r..çq›r ©¦Ï̓í.‚ukjHžO °ŒHÀØ^Ëc{`NÎ=f-+ØžŠ—æyRœ Ó/öä>¬À§…†66üóýê;—¤)ÌÒˆK0Ÿ½½ME¼3Uƒ¹‚àõù“æ‰[J7<ÒîÈòfþ{Ûñš^g^M^ÕÔ>ÿÖ3üª0Õ ¦–8…¤pªŸö«CÁ¾Í[¶Ó>Ó¾:ÊCóø–fˆƒ>Äd‚¡y¢#óøFchž©»†d¯öLªPYžÆfjiYÚ$ xñ'Þ€SÜŒ\_ÐQkn+;±ž­‘<œö†Sæox ®i´w?c¯Ã\öäh­èÖÁÊñ2èôFGñ¨à6"Ã"º¡y&ëHô‡&Ií(ö,ohÖÙA·¼=¾¸tœÞ <›«æuÁ¯ Yùw6ž7á§ dÙÕ²ïæ}^ ^c»zçørààïTŸ<0¸­#Ž]Èvj4zS«™K]VlÜÄý¨»ãÊv™SmõÔE=ئÊ$=[sþWGí©©;²Ñ4™'¹ùTfÓµ`M`òî½FLž[NÉíƒK^«È¶Rµ)9P5ŽÐ“#îò-ÙௌE“ñ_©£,en¯bÑ/÷¼ÌŸ³käøX‹¸y°=½¯eåµH¹‰“Ê Yg’é.v'Ÿ5xÔÔœIR¹w6וÛ>0<ã¼°`´Í?pŸP݃=V6¦·N|Ã`ƒ5M ý)çùÄ¥¬KS1ä¹ä´%/{©N~Ü—wñÆQ)䈿Œ¥AÇ:î ÑîKž|Ë`‡ÆzœzlצyM~ 0O^f'ÎŽ’MŠ]IYÁ™ç“Ë‘î}6Që ´5Ô(À·ˆN,õOwOO^Ç’EEIs<4’ ‹ýî 8xÑó~k_3ôEؾÔKŸmõLPâäÚ¾ÀQÉß㻂³³ùi0ÙÖ¨Ç5Ë“×ØØ\Þ$IÞ¼ü:šNÁÔûšZq/}Êæ ØNÌù®ÞnáX€X\{Ýë/W(Ž‚̇¡IEND®B`‚zbar-0.23/examples/code-upc-a.png0000664000175000017500000000202013471225716013562 00000000000000‰PNG  IHDRâd¬' iPLTEÿÿÿ̪3fÌÿÿÿÿÌfÿÕ™33ªÌÿªf3™ÕÿÌU3€Ì™+fªÿÿÿ™™ÿÿ+™Ì€3UÌ+ffU™UU™3ªÿ€ÌfÕÿ3ª™€™Ì€ÿ€3ÿª3ÿÕfE»HõbIDATxÚí—ërÛ ……bÉ•|Q"7nÓöý²À²ÜtAiÿt3‰•5öc/"U5BÐOxNçŸaVl›+…™Á:ß!ÿdÕxæÜ§|·Â"D ˆ@"D ˆ@"D ˆ@"D ˆ@"D ˆ@"D ˆ@"D ˆ@"D ˆ@"ÿÎø7v©ˆÿb­§½v ú‰MË Æþy<é§ÎN‘d>¿ò37âmͳø¾b»ŒæÄö¢Õëø¯¦'¯†"¢ò/ñêô„¸*ÿì¹j±‚˜l«" æPT*&ÅNÄLœNh‘¦Ô~¡us014ëÀiÐ\VÉÝÚþ&e tîw:9}’'cW¼£·—3½¦%¤ ˆµehú³ß¦¶Š"aš>:g³ËÛû2¢–yåf’jDŠo­/n×m¸õ >!—Ü0z¡‹FÍd}ѧo ¶ïD zÊU¼Hªhi¤ý­™¸­IG²3SFšÙùâLûOzÊQ×3‹ž©s¡–8qú¢‰»AÏzþ=ÎóÅñiÝáÖ님 œVü쾟ÖI”#Իס\môÒZªš¢q #=A{UXCÅê+ãî*މ Å #include #include #include #if !defined(PNG_LIBPNG_VER) || \ PNG_LIBPNG_VER < 10018 || \ (PNG_LIBPNG_VER > 10200 && \ PNG_LIBPNG_VER < 10209) /* Changes to Libpng from version 1.2.42 to 1.4.0 (January 4, 2010) * ... * 2. m. The function png_set_gray_1_2_4_to_8() was removed. It has been * deprecated since libpng-1.0.18 and 1.2.9, when it was replaced with * png_set_expand_gray_1_2_4_to_8() because the former function also * expanded palette images. */ # define png_set_expand_gray_1_2_4_to_8 png_set_gray_1_2_4_to_8 #endif zbar_image_scanner_t *scanner = NULL; /* to complete a runnable example, this abbreviated implementation of * get_data() will use libpng to read an image file. refer to libpng * documentation for details */ static void get_data (const char *name, int *width, int *height, void **raw) { FILE *file = fopen(name, "rb"); if(!file) exit(2); png_structp png = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if(!png) exit(3); if(setjmp(png_jmpbuf(png))) exit(4); png_infop info = png_create_info_struct(png); if(!info) exit(5); png_init_io(png, file); png_read_info(png, info); /* configure for 8bpp grayscale input */ int color = png_get_color_type(png, info); int bits = png_get_bit_depth(png, info); if(color & PNG_COLOR_TYPE_PALETTE) png_set_palette_to_rgb(png); if(color == PNG_COLOR_TYPE_GRAY && bits < 8) png_set_expand_gray_1_2_4_to_8(png); if(bits == 16) png_set_strip_16(png); if(color & PNG_COLOR_MASK_ALPHA) png_set_strip_alpha(png); if(color & PNG_COLOR_MASK_COLOR) png_set_rgb_to_gray_fixed(png, 1, -1, -1); /* allocate image */ *width = png_get_image_width(png, info); *height = png_get_image_height(png, info); *raw = malloc(*width * *height); png_bytep rows[*height]; int i; for(i = 0; i < *height; i++) rows[i] = *raw + (*width * i); png_read_image(png, rows); } int main (int argc, char **argv) { if(argc < 2) return(1); /* create a reader */ scanner = zbar_image_scanner_create(); /* configure the reader */ zbar_image_scanner_set_config(scanner, 0, ZBAR_CFG_ENABLE, 1); /* obtain image data */ int width = 0, height = 0; void *raw = NULL; get_data(argv[1], &width, &height, &raw); /* wrap image data */ zbar_image_t *image = zbar_image_create(); zbar_image_set_format(image, zbar_fourcc('Y','8','0','0')); zbar_image_set_size(image, width, height); zbar_image_set_data(image, raw, width * height, zbar_image_free_data); /* scan the image for barcodes */ int n = zbar_scan_image(scanner, image); /* extract results */ const zbar_symbol_t *symbol = zbar_image_first_symbol(image); for(; symbol; symbol = zbar_symbol_next(symbol)) { /* do something useful with results */ zbar_symbol_type_t typ = zbar_symbol_get_type(symbol); const char *data = zbar_symbol_get_data(symbol); printf("decoded %s symbol \"%s\"\n", zbar_get_symbol_name(typ), data); } /* clean up */ zbar_image_destroy(image); zbar_image_scanner_destroy(scanner); return(0); } zbar-0.23/examples/code-128.png0000664000175000017500000000501713471225716013100 00000000000000‰PNG  IHDRðd×ô4ôPLTE3f+™U™UÌ€Ì33+3Uf3€Ì3€ÿ3ªÌ3ªÿff+fUfU3fªÌfªÿfÕÿ™+™U™€™€Ì™ª3™ªÌ™Õÿ™ÿÌ™ÿÿÌÙ̀3̪3Ìÿ™ÌÿÌÌÿÿÿ€3ÿª3ÿªfÿÕfÿÕ™ÿÿ™ÿÿÌÿÿÿ†è°ÖIDATxÚíš1v7†!vªÈJ‡`•2¥ÒÐ`åʹATù¬X¥È{y/›ìX™Oð©Ä*ªH6f0À`¹e9Èï^ÍîÌÜo‡?° !¶ã1ý³¾é¹j©ÖS¯!kÿŒYÛ¿ÍÒÏ[¯õcyÞêýü,úgÎÍ⥷ÖáèíœúñZßvþ/ožñs×>—mhnýñœûNÏ ÃãíúÜ'ù|¶þì}ÄÖoèóx€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€x€¿à4Ú5€§<ð4À¿¶ºùRŽ¿IÿÇ+¼n·¥·¶ ÷æíƒÖè‹!ë+GÙdzigͽa¸Èß3@€/myÓÙáÓtRú—Ûa>+½þƒy» ®-­¯i½L/ÌáæfMä·àßc…ßOÇüø¬ÓÓô¡ôý3ãg+üòÍt(Ó›+|3 ù;ðï¨Â©7ÿ®ô/·Íh[ú>šwmÐÿEÒ ežÃys; Is “üzÓ­CHwz^=Üo¤?,FÝ*¥a'&‚Äa1©ý<„™™¤áÕÛÍeV.ˆŠai1­[äœåAâJîI!¤ÅÝ~žñ-ŠFð ?&!³ 3½væ‚f!”N, ?˜ÕJjÐëËaB9æþ”YÚɧéçS«svéä)Ð8ެÔãf)²?ógœCüø¤ÓøKÐð A*•nÑzXJ•\¥Š*7ú¶*šè(µ=ä ŸcXЙUø}4ǘéxÊ¢x“*èÓT 2Ì¢Ë2™wÂØN@ÛŒºS«svévR”cª‡vúTÍãÍ0Š¢Ù¤îŒs8þ®Dê\G…O{+‘“;[pJ¯˜Ä>ÚÆªÞ n¦>^,ì'÷¼K3vA'&¤“´1rÌF3oÂOE>?Mo·zÝAÒêÅ«Ûã±ouÎmºNµ×¤1ç¶–Tn¶))ÏÉÉÕ!昡á/Hñ š½Tgí3€«›Ï*î‡7%uï]1—cõþZÊz>”  Ò*køqѼ‹¼Ã1‰Àô»²1ç_³Fͬ»4UÃÛ AÖ¶AʬÅô»4Š™Û¥É²ÅÄK—3µÖ­wvbý_݃ߤ|uƒH·Så•AÆ8ÏaWÔZt〆¿X Ÿ$kêË–´ìdäé.ïÃ7¯Ym¿ú®høÄȪ š6êïÊNºŠ]%Úú²d¹ÝZ-ÿh^3õ­ÞÙÍÁ⌶ÍJbeÒ~⇱Ñ/²Î]Ö.«þwiTz?æû‹ßâ&½×¼­oZUíÎÓš²¾fÕ­ê0ú«hxñ« ºOQÖð%f~ƒ% æ@åMkQëZËÿÌ™ZkçXÏq&~jå9˜eÅ”‡‘çP7vÜþ Ú7þŽJä; àßo{åï¨Tàæ×RþR+ü+î~Cøk4«"½iO£½£öÄß’‚ìi[õIEND®B`‚zbar-0.23/examples/qr-code.png0000664000175000017500000000032213471225716013202 00000000000000‰PNG  IHDRddX™¨ù™IDAT8OÓ±‘Ä@e ü³œ ôÆÞ½<^; €˜ñ©—²,Ò: Ý0ñ¬ÀÿÈyV9°ßï¨ê/³wªr¬j1ñ¤{lŒ;¨PÚ¶8h[1.B\&Ÿ©ßŠç,Ëí¢öøs–·RçœÌ“|c>¨Êž}/ܦYØó”¯…šO³«Ø8ªÙ‚“J'›'OB>}^êlô°^„QeIEND®B`‚zbar-0.23/examples/i2-5.png0000664000175000017500000000303413471225716012327 00000000000000‰PNG  IHDRÆPuzú1ôPLTE3f+™U™UÌ€Ì33+33U33€Ì3ªÌffªÌfªÿfÕÿ™+™U™€™Õÿ™ÿÿÌÙ̀3̪3Ìÿÿÿ€3ÿª3ÿªfÿÕfÿÕ™ÿÿ™ÿÿÌÿÿÿ`ÂãIDAThÞí—+’Û@†gÍ„,´‡ ò tùBF¹‚‘/ ”A:‚±h…b$‰¤_Ó¹ ²IMR•úUµ»­Ñ<úëçlaYÒ?Až4¦²Ž?Î{œÿø÷ùúgkžïŸïó gÀ0€ `À0€ `À0€ `À0€ `À0€ `Àø(Æò_<ÀƿƘ;J§£Ê=‰5µšjaw£·„Š‘ÖÙ˨R¶ƒ,Ô¹òf3Û·†i,ÊŸE$-&Ǹ*›õ Zz\w8xoÖ¹‚wtë„°/‰Ñó¡ªÐ(âY’'êh-ø÷þ¶YN2«f€—‹ÏR˳“Nê4?¢ÆÜ²Á—©¡“{Ò„JîŸšŠ±Ä¶*·ydŒá3kf’çVâ‰ö¼ñgýžöšº†)=wtò §:ÆÜ½\—ê÷æ 2¿­2mv•£øPŽ(…15²dÒ+i)Ç'}$šXuŽx1ó¾¶žÁýîš©>®‰½’oí¢N)„¡¦’Ðæ8Ï⌋è÷ÉÓvÈÊ×½9.îH ¼š:¦-¢ahrŸÙ¹åRœƒ¾ ¬sïEËÁh•Ô–Á)çIﲂêÞÓÞå{JŠï½a5²úFgœÃ«pío-3)m @"`޳܈© FÙeãWóÆ¥dûkÙé©ÎèqIïæ~ç!A¢&{Ì0¬`‘cÖ20l‚ª/Ša)RùqqSwm4«3,Z–x§sÎ>ïŠ9™yº]¹Ü˜;«AVø¶:ðë…9§ºy[¨¨”z›ß4‹ E º¿Ð7iÚcÐ\Ë€¨Õ§º2È{äiªdô°QÔ>R/¶Ú‚.uñSAŒ©ñ‘‰j}¹øi!² ^“Þò;Õþöp£t*»«}ðnø)nÉ'«’yÏ]ï§2á1…u´^Rß±e^ΛeøÀø“ç'žÜ?,$SšCIEND®B`‚zbar-0.23/examples/ean-2.png0000664000175000017500000000020413471225716012551 00000000000000‰PNG  IHDRh¶SõSKIDATHÇcø FyC‘gð™ÙàÀ(o”7ÊåòèÆƒ¼?õH¼ß×÷ãæÝFQ9Å”hd¹ÿøLÙŽÌûS¢hWò†#FG èf¿ÌIEND®B`‚zbar-0.23/zbar-qt.pc.in0000664000175000017500000000044713466560613011647 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: zbar-qt Description: bar code scanning and decoding Qt4 widget URL: http://zbar.sourceforge.net Version: @VERSION@ Requires: zbar, QtCore >= 4, QtGui >= 4 Libs: -L${libdir} -lzbarqt Cflags: -I${includedir} zbar-0.23/Makefile.in0000664000175000017500000041122213471606247011400 00000000000000# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = $(am__EXEEXT_2) $(am__EXEEXT_3) $(am__EXEEXT_4) \ $(am__EXEEXT_5) check_PROGRAMS = test/test_decode$(EXEEXT) test/test_convert$(EXEEXT) \ $(am__EXEEXT_6) test/test_proc$(EXEEXT) test/test_cpp$(EXEEXT) \ test/test_cpp_img$(EXEEXT) $(am__EXEEXT_7) $(am__EXEEXT_8) EXTRA_PROGRAMS = $(am__EXEEXT_1) @HAVE_GTK_TRUE@am__append_1 = include/zbar/zbargtk.h @HAVE_QT_TRUE@am__append_2 = include/zbar/QZBar.h include/zbar/QZBarImage.h @HAVE_MAGICK_TRUE@am__append_3 = zbarimg/zbarimg # automake bug in "monolithic mode"? @HAVE_MAGICK_TRUE@am__append_4 = zbarimg/.libs/zbarimg @HAVE_MAGICK_TRUE@@WIN32_TRUE@am__append_5 = zbarimg/zbarimg.rc @HAVE_MAGICK_TRUE@@WIN32_TRUE@am__append_6 = zbarimg/zbarimg-rc.o @HAVE_MAGICK_TRUE@am__append_7 = test/barcodetest.py @HAVE_VIDEO_TRUE@am__append_8 = zbarcam/zbarcam # automake bug in "monolithic mode"? @HAVE_VIDEO_TRUE@am__append_9 = zbarcam/.libs/zbarcam zbarcam/moc_zbarcam_qt.h @HAVE_GTK_TRUE@@HAVE_VIDEO_TRUE@@WIN32_FALSE@am__append_10 = zbarcam/zbarcam-gtk @HAVE_QT_TRUE@@HAVE_VIDEO_TRUE@am__append_11 = zbarcam/zbarcam-qt @HAVE_QT_TRUE@@HAVE_VIDEO_TRUE@am__append_12 = $(nodist_zbarcam_zbarcam_qt_SOURCES) @HAVE_QT_TRUE@@HAVE_VIDEO_TRUE@am__append_13 = $(nodist_zbarcam_zbarcam_qt_SOURCES) zbarcam/moc_zbarcam_qt.h @HAVE_VIDEO_TRUE@@WIN32_TRUE@am__append_14 = zbarcam/zbarcam.rc @HAVE_VIDEO_TRUE@@WIN32_TRUE@am__append_15 = zbarcam/zbarcam-rc.o @HAVE_VIDEO_TRUE@@WIN32_TRUE@@WITH_DIRECTSHOW_TRUE@am__append_16 = -DDIRECTSHOW @HAVE_PYTHON_TRUE@am__append_17 = python/zbar.la @HAVE_PYTHON_TRUE@am__append_18 = python/test/barcode.png python/test/test_zbar.py \ @HAVE_PYTHON_TRUE@ python/examples/processor.py python/examples/read_one.py @HAVE_GTK_TRUE@am__append_19 = gtk @HAVE_GTK_TRUE@am__append_20 = zbar-gtk.pc @HAVE_GTK_TRUE@@HAVE_PYGTK2_TRUE@am__append_21 = pygtk/zbarpygtk.la @HAVE_GTK_TRUE@@HAVE_PYGTK2_TRUE@am__append_22 = pygtk/zbarpygtk.c pygtk/zbarpygtk.defs @HAVE_GTK_TRUE@@HAVE_PYGTK2_TRUE@am__append_23 = pygtk/zbarpygtk.c pygtk/zbarpygtk.defs @HAVE_GTK_TRUE@@HAVE_PYGTK2_TRUE@am__append_24 = pygtk/zbarpygtk.override @HAVE_QT_TRUE@am__append_25 = qt/libzbarqt.la @HAVE_QT_TRUE@am__append_26 = $(nodist_qt_libzbarqt_la_SOURCES) @HAVE_QT_TRUE@am__append_27 = $(nodist_qt_libzbarqt_la_SOURCES) @HAVE_QT_TRUE@am__append_28 = zbar-qt.pc @HAVE_JAVA_TRUE@am__append_29 = java @HAVE_NPAPI_TRUE@am__append_30 = plugin/libzbarplugin.la #check_PROGRAMS += test/test_window #test_test_window_SOURCES = test/test_window.c $(TEST_IMAGE_SOURCES) #test_test_window_CPPFLAGS = -I$(srcdir)/zbar $(AM_CPPFLAGS) #test_test_window_LDADD = zbar/libzbar.la $(AM_LDADD) @HAVE_VIDEO_TRUE@am__append_31 = test/test_video @HAVE_JPEG_TRUE@am__append_32 = test/test_jpeg @HAVE_MAGICK_TRUE@am__append_33 = test/dbg_scan @HAVE_DBUS_TRUE@am__append_34 = test/test_dbus @HAVE_DOC_TRUE@am__append_35 = doc/man/man.stamp doc/version.xml doc/reldate.xml @HAVE_DOC_TRUE@@HAVE_MAGICK_TRUE@am__append_36 = doc/man/zbarimg.1 @HAVE_DOC_TRUE@@HAVE_VIDEO_TRUE@am__append_37 = doc/man/zbarcam.1 # TBD add manual content #dist_doc_DATA = doc/zbar.pdf doc/zbar.html # distribute all documentation related files to avoid end-user rebuilds @HAVE_DOC_TRUE@am__append_38 = $(DOCSOURCES) $(man_stamp) \ @HAVE_DOC_TRUE@ doc/api/footer.html doc/style.xsl @HAVE_DOC_TRUE@am__append_39 = docs @HAVE_DOC_TRUE@am__append_40 = doc/html/*.html @HAVE_DBUS_TRUE@am__append_41 = $(dbusconf_DATA) @WIN32_TRUE@am__append_42 = README-windows.md @WIN32_TRUE@am__append_43 = dist-nsis subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__dist_doc_DATA_DIST) \ $(include_HEADERS) $(am__zinclude_HEADERS_DIST) \ $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = zbar.pc zbar-gtk.pc zbar-qt.pc doc/doxygen.conf \ test/test_examples.sh test/check_dbus.sh CONFIG_CLEAN_VPATH_FILES = @HAVE_MAGICK_TRUE@am__EXEEXT_1 = test/dbg_scan$(EXEEXT) @HAVE_MAGICK_TRUE@am__EXEEXT_2 = zbarimg/zbarimg$(EXEEXT) @HAVE_VIDEO_TRUE@am__EXEEXT_3 = zbarcam/zbarcam$(EXEEXT) @HAVE_GTK_TRUE@@HAVE_VIDEO_TRUE@@WIN32_FALSE@am__EXEEXT_4 = zbarcam/zbarcam-gtk$(EXEEXT) @HAVE_QT_TRUE@@HAVE_VIDEO_TRUE@am__EXEEXT_5 = \ @HAVE_QT_TRUE@@HAVE_VIDEO_TRUE@ zbarcam/zbarcam-qt$(EXEEXT) am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(man1dir)" \ "$(DESTDIR)$(dbusconfdir)" "$(DESTDIR)$(docdir)" \ "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgdatadir)" \ "$(DESTDIR)$(includedir)" "$(DESTDIR)$(zincludedir)" @HAVE_VIDEO_TRUE@am__EXEEXT_6 = test/test_video$(EXEEXT) @HAVE_JPEG_TRUE@am__EXEEXT_7 = test/test_jpeg$(EXEEXT) @HAVE_DBUS_TRUE@am__EXEEXT_8 = test/test_dbus$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } LTLIBRARIES = $(lib_LTLIBRARIES) $(pyexec_LTLIBRARIES) plugin_libzbarplugin_la_LIBADD = am__plugin_libzbarplugin_la_SOURCES_DIST = plugin/plugin.c am__dirstamp = $(am__leading_dot)dirstamp @HAVE_NPAPI_TRUE@am_plugin_libzbarplugin_la_OBJECTS = \ @HAVE_NPAPI_TRUE@ plugin/libzbarplugin_la-plugin.lo plugin_libzbarplugin_la_OBJECTS = \ $(am_plugin_libzbarplugin_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = plugin_libzbarplugin_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(plugin_libzbarplugin_la_LDFLAGS) \ $(LDFLAGS) -o $@ @HAVE_NPAPI_TRUE@am_plugin_libzbarplugin_la_rpath = -rpath $(libdir) am__DEPENDENCIES_1 = am__dist_pygtk_zbarpygtk_la_SOURCES_DIST = pygtk/zbarpygtkmodule.c @HAVE_GTK_TRUE@@HAVE_PYGTK2_TRUE@dist_pygtk_zbarpygtk_la_OBJECTS = pygtk/zbarpygtk_la-zbarpygtkmodule.lo @HAVE_GTK_TRUE@@HAVE_PYGTK2_TRUE@nodist_pygtk_zbarpygtk_la_OBJECTS = pygtk/zbarpygtk_la-zbarpygtk.lo pygtk_zbarpygtk_la_OBJECTS = $(dist_pygtk_zbarpygtk_la_OBJECTS) \ $(nodist_pygtk_zbarpygtk_la_OBJECTS) pygtk_zbarpygtk_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(pygtk_zbarpygtk_la_LDFLAGS) \ $(LDFLAGS) -o $@ @HAVE_GTK_TRUE@@HAVE_PYGTK2_TRUE@am_pygtk_zbarpygtk_la_rpath = -rpath \ @HAVE_GTK_TRUE@@HAVE_PYGTK2_TRUE@ $(pyexecdir) @HAVE_PYTHON_TRUE@python_zbar_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @HAVE_PYTHON_TRUE@ zbar/libzbar.la am__python_zbar_la_SOURCES_DIST = python/zbarmodule.c \ python/zbarmodule.h python/enum.c python/exception.c \ python/symbol.c python/symbolset.c python/symboliter.c \ python/image.c python/processor.c python/imagescanner.c \ python/decoder.c python/scanner.c @HAVE_PYTHON_TRUE@am_python_zbar_la_OBJECTS = \ @HAVE_PYTHON_TRUE@ python/zbar_la-zbarmodule.lo \ @HAVE_PYTHON_TRUE@ python/zbar_la-enum.lo \ @HAVE_PYTHON_TRUE@ python/zbar_la-exception.lo \ @HAVE_PYTHON_TRUE@ python/zbar_la-symbol.lo \ @HAVE_PYTHON_TRUE@ python/zbar_la-symbolset.lo \ @HAVE_PYTHON_TRUE@ python/zbar_la-symboliter.lo \ @HAVE_PYTHON_TRUE@ python/zbar_la-image.lo \ @HAVE_PYTHON_TRUE@ python/zbar_la-processor.lo \ @HAVE_PYTHON_TRUE@ python/zbar_la-imagescanner.lo \ @HAVE_PYTHON_TRUE@ python/zbar_la-decoder.lo \ @HAVE_PYTHON_TRUE@ python/zbar_la-scanner.lo python_zbar_la_OBJECTS = $(am_python_zbar_la_OBJECTS) python_zbar_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(python_zbar_la_LDFLAGS) $(LDFLAGS) -o \ $@ @HAVE_PYTHON_TRUE@am_python_zbar_la_rpath = -rpath $(pyexecdir) @HAVE_QT_TRUE@qt_libzbarqt_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @HAVE_QT_TRUE@ zbar/libzbar.la am__qt_libzbarqt_la_SOURCES_DIST = qt/QZBar.cpp qt/QZBarThread.h \ qt/QZBarThread.cpp @HAVE_QT_TRUE@am_qt_libzbarqt_la_OBJECTS = qt/libzbarqt_la-QZBar.lo \ @HAVE_QT_TRUE@ qt/libzbarqt_la-QZBarThread.lo @HAVE_QT_TRUE@nodist_qt_libzbarqt_la_OBJECTS = \ @HAVE_QT_TRUE@ qt/libzbarqt_la-moc_QZBar.lo \ @HAVE_QT_TRUE@ qt/libzbarqt_la-moc_QZBarThread.lo qt_libzbarqt_la_OBJECTS = $(am_qt_libzbarqt_la_OBJECTS) \ $(nodist_qt_libzbarqt_la_OBJECTS) qt_libzbarqt_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(qt_libzbarqt_la_LDFLAGS) \ $(LDFLAGS) -o $@ @HAVE_QT_TRUE@am_qt_libzbarqt_la_rpath = -rpath $(libdir) am__test_dbg_scan_SOURCES_DIST = test/dbg_scan.cpp @HAVE_MAGICK_TRUE@am_test_dbg_scan_OBJECTS = \ @HAVE_MAGICK_TRUE@ test/dbg_scan-dbg_scan.$(OBJEXT) test_dbg_scan_OBJECTS = $(am_test_dbg_scan_OBJECTS) @HAVE_MAGICK_TRUE@test_dbg_scan_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @HAVE_MAGICK_TRUE@ zbar/libzbar.la am__objects_1 = test/test_images.$(OBJEXT) am_test_test_convert_OBJECTS = test/test_convert.$(OBJEXT) \ $(am__objects_1) test_test_convert_OBJECTS = $(am_test_test_convert_OBJECTS) test_test_convert_DEPENDENCIES = zbar/libzbar.la am_test_test_cpp_OBJECTS = test/test_cpp.$(OBJEXT) test_test_cpp_OBJECTS = $(am_test_test_cpp_OBJECTS) test_test_cpp_DEPENDENCIES = zbar/libzbar.la am_test_test_cpp_img_OBJECTS = test/test_cpp_img.$(OBJEXT) \ $(am__objects_1) test_test_cpp_img_OBJECTS = $(am_test_test_cpp_img_OBJECTS) test_test_cpp_img_DEPENDENCIES = zbar/libzbar.la am__test_test_dbus_SOURCES_DIST = test/test_dbus.c @HAVE_DBUS_TRUE@am_test_test_dbus_OBJECTS = test/test_dbus.$(OBJEXT) test_test_dbus_OBJECTS = $(am_test_test_dbus_OBJECTS) test_test_dbus_LDADD = $(LDADD) test_test_dbus_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(test_test_dbus_LDFLAGS) $(LDFLAGS) -o \ $@ am_test_test_decode_OBJECTS = test/test_decode-test_decode.$(OBJEXT) test_test_decode_OBJECTS = $(am_test_test_decode_OBJECTS) test_test_decode_DEPENDENCIES = zbar/libzbar.la test_test_decode_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(test_test_decode_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ am__test_test_jpeg_SOURCES_DIST = test/test_jpeg.c @HAVE_JPEG_TRUE@am_test_test_jpeg_OBJECTS = test/test_jpeg.$(OBJEXT) test_test_jpeg_OBJECTS = $(am_test_test_jpeg_OBJECTS) @HAVE_JPEG_TRUE@test_test_jpeg_DEPENDENCIES = zbar/libzbar.la am_test_test_proc_OBJECTS = test/test_proc.$(OBJEXT) $(am__objects_1) test_test_proc_OBJECTS = $(am_test_test_proc_OBJECTS) test_test_proc_DEPENDENCIES = zbar/libzbar.la am__test_test_video_SOURCES_DIST = test/test_video.c \ test/test_images.c test/test_images.h @HAVE_VIDEO_TRUE@am_test_test_video_OBJECTS = \ @HAVE_VIDEO_TRUE@ test/test_video.$(OBJEXT) $(am__objects_1) test_test_video_OBJECTS = $(am_test_test_video_OBJECTS) @HAVE_VIDEO_TRUE@test_test_video_DEPENDENCIES = zbar/libzbar.la am__zbarcam_zbarcam_SOURCES_DIST = zbarcam/zbarcam.c \ zbarcam/zbarcam.rc am__objects_2 = @HAVE_VIDEO_TRUE@am_zbarcam_zbarcam_OBJECTS = \ @HAVE_VIDEO_TRUE@ zbarcam/zbarcam-zbarcam.$(OBJEXT) \ @HAVE_VIDEO_TRUE@ $(am__objects_2) zbarcam_zbarcam_OBJECTS = $(am_zbarcam_zbarcam_OBJECTS) @HAVE_VIDEO_TRUE@zbarcam_zbarcam_DEPENDENCIES = zbar/libzbar.la \ @HAVE_VIDEO_TRUE@ $(am__append_15) am__zbarcam_zbarcam_gtk_SOURCES_DIST = zbarcam/zbarcam-gtk.c \ zbarcam/scan_video.c @HAVE_GTK_TRUE@@HAVE_VIDEO_TRUE@@WIN32_FALSE@am_zbarcam_zbarcam_gtk_OBJECTS = zbarcam/zbarcam_gtk-zbarcam-gtk.$(OBJEXT) \ @HAVE_GTK_TRUE@@HAVE_VIDEO_TRUE@@WIN32_FALSE@ zbarcam/zbarcam_gtk-scan_video.$(OBJEXT) zbarcam_zbarcam_gtk_OBJECTS = $(am_zbarcam_zbarcam_gtk_OBJECTS) @HAVE_GTK_TRUE@@HAVE_VIDEO_TRUE@@WIN32_FALSE@zbarcam_zbarcam_gtk_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @HAVE_GTK_TRUE@@HAVE_VIDEO_TRUE@@WIN32_FALSE@ gtk/libzbargtk.la \ @HAVE_GTK_TRUE@@HAVE_VIDEO_TRUE@@WIN32_FALSE@ zbar/libzbar.la am__zbarcam_zbarcam_qt_SOURCES_DIST = zbarcam/zbarcam-qt.cpp \ zbarcam/scan_video.c @HAVE_QT_TRUE@@HAVE_VIDEO_TRUE@am_zbarcam_zbarcam_qt_OBJECTS = zbarcam/zbarcam_qt-zbarcam-qt.$(OBJEXT) \ @HAVE_QT_TRUE@@HAVE_VIDEO_TRUE@ zbarcam/zbarcam_qt-scan_video.$(OBJEXT) nodist_zbarcam_zbarcam_qt_OBJECTS = zbarcam_zbarcam_qt_OBJECTS = $(am_zbarcam_zbarcam_qt_OBJECTS) \ $(nodist_zbarcam_zbarcam_qt_OBJECTS) @HAVE_QT_TRUE@@HAVE_VIDEO_TRUE@zbarcam_zbarcam_qt_DEPENDENCIES = \ @HAVE_QT_TRUE@@HAVE_VIDEO_TRUE@ $(am__DEPENDENCIES_1) \ @HAVE_QT_TRUE@@HAVE_VIDEO_TRUE@ qt/libzbarqt.la am__zbarimg_zbarimg_SOURCES_DIST = zbarimg/zbarimg.c \ zbarimg/zbarimg.rc @HAVE_MAGICK_TRUE@am_zbarimg_zbarimg_OBJECTS = \ @HAVE_MAGICK_TRUE@ zbarimg/zbarimg-zbarimg.$(OBJEXT) \ @HAVE_MAGICK_TRUE@ $(am__objects_2) zbarimg_zbarimg_OBJECTS = $(am_zbarimg_zbarimg_OBJECTS) @HAVE_MAGICK_TRUE@zbarimg_zbarimg_DEPENDENCIES = \ @HAVE_MAGICK_TRUE@ $(am__DEPENDENCIES_1) zbar/libzbar.la \ @HAVE_MAGICK_TRUE@ $(am__append_6) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = plugin/$(DEPDIR)/libzbarplugin_la-plugin.Plo \ pygtk/$(DEPDIR)/zbarpygtk_la-zbarpygtk.Plo \ pygtk/$(DEPDIR)/zbarpygtk_la-zbarpygtkmodule.Plo \ python/$(DEPDIR)/zbar_la-decoder.Plo \ python/$(DEPDIR)/zbar_la-enum.Plo \ python/$(DEPDIR)/zbar_la-exception.Plo \ python/$(DEPDIR)/zbar_la-image.Plo \ python/$(DEPDIR)/zbar_la-imagescanner.Plo \ python/$(DEPDIR)/zbar_la-processor.Plo \ python/$(DEPDIR)/zbar_la-scanner.Plo \ python/$(DEPDIR)/zbar_la-symbol.Plo \ python/$(DEPDIR)/zbar_la-symboliter.Plo \ python/$(DEPDIR)/zbar_la-symbolset.Plo \ python/$(DEPDIR)/zbar_la-zbarmodule.Plo \ qt/$(DEPDIR)/libzbarqt_la-QZBar.Plo \ qt/$(DEPDIR)/libzbarqt_la-QZBarThread.Plo \ qt/$(DEPDIR)/libzbarqt_la-moc_QZBar.Plo \ qt/$(DEPDIR)/libzbarqt_la-moc_QZBarThread.Plo \ test/$(DEPDIR)/dbg_scan-dbg_scan.Po \ test/$(DEPDIR)/test_convert.Po test/$(DEPDIR)/test_cpp.Po \ test/$(DEPDIR)/test_cpp_img.Po test/$(DEPDIR)/test_dbus.Po \ test/$(DEPDIR)/test_decode-test_decode.Po \ test/$(DEPDIR)/test_images.Po test/$(DEPDIR)/test_jpeg.Po \ test/$(DEPDIR)/test_proc.Po test/$(DEPDIR)/test_video.Po \ zbarcam/$(DEPDIR)/zbarcam-zbarcam.Po \ zbarcam/$(DEPDIR)/zbarcam_gtk-scan_video.Po \ zbarcam/$(DEPDIR)/zbarcam_gtk-zbarcam-gtk.Po \ zbarcam/$(DEPDIR)/zbarcam_qt-scan_video.Po \ zbarcam/$(DEPDIR)/zbarcam_qt-zbarcam-qt.Po \ zbarimg/$(DEPDIR)/zbarimg-zbarimg.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(plugin_libzbarplugin_la_SOURCES) \ $(dist_pygtk_zbarpygtk_la_SOURCES) \ $(nodist_pygtk_zbarpygtk_la_SOURCES) $(python_zbar_la_SOURCES) \ $(qt_libzbarqt_la_SOURCES) $(nodist_qt_libzbarqt_la_SOURCES) \ $(test_dbg_scan_SOURCES) $(test_test_convert_SOURCES) \ $(test_test_cpp_SOURCES) $(test_test_cpp_img_SOURCES) \ $(test_test_dbus_SOURCES) $(test_test_decode_SOURCES) \ $(test_test_jpeg_SOURCES) $(test_test_proc_SOURCES) \ $(test_test_video_SOURCES) $(zbarcam_zbarcam_SOURCES) \ $(zbarcam_zbarcam_gtk_SOURCES) $(zbarcam_zbarcam_qt_SOURCES) \ $(nodist_zbarcam_zbarcam_qt_SOURCES) \ $(zbarimg_zbarimg_SOURCES) DIST_SOURCES = $(am__plugin_libzbarplugin_la_SOURCES_DIST) \ $(am__dist_pygtk_zbarpygtk_la_SOURCES_DIST) \ $(am__python_zbar_la_SOURCES_DIST) \ $(am__qt_libzbarqt_la_SOURCES_DIST) \ $(am__test_dbg_scan_SOURCES_DIST) $(test_test_convert_SOURCES) \ $(test_test_cpp_SOURCES) $(test_test_cpp_img_SOURCES) \ $(am__test_test_dbus_SOURCES_DIST) $(test_test_decode_SOURCES) \ $(am__test_test_jpeg_SOURCES_DIST) $(test_test_proc_SOURCES) \ $(am__test_test_video_SOURCES_DIST) \ $(am__zbarcam_zbarcam_SOURCES_DIST) \ $(am__zbarcam_zbarcam_gtk_SOURCES_DIST) \ $(am__zbarcam_zbarcam_qt_SOURCES_DIST) \ $(am__zbarimg_zbarimg_SOURCES_DIST) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac man1dir = $(mandir)/man1 NROFF = nroff MANS = $(dist_man_MANS) am__dist_doc_DATA_DIST = COPYING HACKING.md INSTALL.md LICENSE.md \ NEWS.md README.md TODO.md README-windows.md DATA = $(dbusconf_DATA) $(dist_doc_DATA) $(pkgconfig_DATA) \ $(pkgdata_DATA) am__zinclude_HEADERS_DIST = include/zbar/Scanner.h \ include/zbar/Decoder.h include/zbar/Exception.h \ include/zbar/Symbol.h include/zbar/Image.h \ include/zbar/ImageScanner.h include/zbar/Video.h \ include/zbar/Window.h include/zbar/Processor.h \ include/zbar/zbargtk.h include/zbar/QZBar.h \ include/zbar/QZBarImage.h HEADERS = $(include_HEADERS) $(zinclude_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = zbar gtk java . am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \ $(srcdir)/doc/Makefile.am.inc \ $(srcdir)/include/Makefile.am.inc \ $(srcdir)/plugin/Makefile.am.inc \ $(srcdir)/pygtk/Makefile.am.inc \ $(srcdir)/python/Makefile.am.inc $(srcdir)/qt/Makefile.am.inc \ $(srcdir)/test/Makefile.am.inc $(srcdir)/zbar-gtk.pc.in \ $(srcdir)/zbar-qt.pc.in $(srcdir)/zbar.pc.in \ $(srcdir)/zbarcam/Makefile.am.inc \ $(srcdir)/zbarimg/Makefile.am.inc $(top_srcdir)/config/compile \ $(top_srcdir)/config/config.guess \ $(top_srcdir)/config/config.rpath \ $(top_srcdir)/config/config.sub $(top_srcdir)/config/depcomp \ $(top_srcdir)/config/install-sh $(top_srcdir)/config/ltmain.sh \ $(top_srcdir)/config/missing $(top_srcdir)/doc/doxygen.conf.in \ $(top_srcdir)/include/config.h.in \ $(top_srcdir)/test/check_dbus.sh.in \ $(top_srcdir)/test/test_examples.sh.in ABOUT-NLS COPYING \ ChangeLog config.rpath config/compile config/config.guess \ config/config.rpath config/config.sub config/depcomp \ config/install-sh config/ltmain.sh config/missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 GZIP_ENV = --best DIST_TARGETS = dist-bzip2 dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CFLAGS = @AM_CFLAGS@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLASSPATH = @CLASSPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_CONFDIR = @DBUS_CONFDIR@ DBUS_LIBS = @DBUS_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_CODABAR = @ENABLE_CODABAR@ ENABLE_CODE128 = @ENABLE_CODE128@ ENABLE_CODE39 = @ENABLE_CODE39@ ENABLE_CODE93 = @ENABLE_CODE93@ ENABLE_DATABAR = @ENABLE_DATABAR@ ENABLE_EAN = @ENABLE_EAN@ ENABLE_I25 = @ENABLE_I25@ ENABLE_PDF417 = @ENABLE_PDF417@ ENABLE_QRCODE = @ENABLE_QRCODE@ ENABLE_SQCODE = @ENABLE_SQCODE@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GM_CFLAGS = @GM_CFLAGS@ GM_LIBS = @GM_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTK_VERSION_MAJOR = @GTK_VERSION_MAJOR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JAR = @JAR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CFLAGS = @JAVA_CFLAGS@ JAVA_HOME = @JAVA_HOME@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBQT_EXTRA_LDFLAGS = @LIBQT_EXTRA_LDFLAGS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MOC = @MOC@ NM = @NM@ NMEDIT = @NMEDIT@ NPAPI_CFLAGS = @NPAPI_CFLAGS@ NPAPI_LIBS = @NPAPI_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYGTK_CFLAGS = @PYGTK_CFLAGS@ PYGTK_CODEGEN = @PYGTK_CODEGEN@ PYGTK_DEFS = @PYGTK_DEFS@ PYGTK_H2DEF = @PYGTK_H2DEF@ PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ QT_CFLAGS = @QT_CFLAGS@ QT_LIBS = @QT_LIBS@ RANLIB = @RANLIB@ RC = @RC@ RELDATE = @RELDATE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ V4L2_CFLAGS = @V4L2_CFLAGS@ V4L2_LIBS = @V4L2_LIBS@ VERSION = @VERSION@ XMKMF = @XMKMF@ XMLTO = @XMLTO@ XMLTOFLAGS = @XMLTOFLAGS@ XSHM_LIBS = @XSHM_LIBS@ XV_LIBS = @XV_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZGTK_LIB_VERSION = @ZGTK_LIB_VERSION@ ZQT_LIB_VERSION = @ZQT_LIB_VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I config lib_LTLIBRARIES = $(am__append_25) $(am__append_30) pyexec_LTLIBRARIES = $(am__append_17) $(am__append_21) # automake bug in "monolithic mode"? CLEANFILES = $(am__append_4) $(am__append_9) $(am__append_23) \ test/.libs/test_decode test/.libs/test_proc \ test/.libs/test_convert test/.libs/test_window \ test/.libs/test_video test/.libs/dbg_scan test/.libs/test_gtk \ $(am__append_40) DISTCLEANFILES = $(am__append_13) $(am__append_27) MAINTAINERCLEANFILES = $(am__append_35) BUILT_SOURCES = $(am__append_12) $(am__append_22) $(am__append_26) EXTRA_DIST = $(am__append_7) $(am__append_18) $(am__append_24) \ test/test_pygtk.py test/test_perl.pl test/test_gi.py \ test/test_python.py $(am__append_38) $(am__append_41) zbar.ico \ zbar.nsi examples/*.png examples/sha1sum examples/upcrpc.py \ examples/upcrpc.pl examples/scan_image.c \ examples/scan_image.cpp examples/scan_image.vcproj \ perl/MANIFEST perl/README perl/Changes perl/COPYING.LIB \ perl/Makefile.PL perl/typemap perl/ZBar.xs perl/ppport.h \ perl/ZBar.pm perl/inc/Devel/CheckLib.pm perl/ZBar/Image.pod \ perl/ZBar/ImageScanner.pod perl/ZBar/Processor.pod \ perl/ZBar/Symbol.pod perl/examples/paginate.pl \ perl/examples/processor.pl perl/examples/read_one.pl \ perl/examples/scan_image.pl 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 PHONY = $(SUBDIRS) gen_checksum check-cpp check-decoder check-images \ check-dbus regress-decoder regress-images regress \ $(am__append_39) $(am__append_43) pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = zbar.pc $(am__append_20) $(am__append_28) dist_doc_DATA = COPYING HACKING.md INSTALL.md LICENSE.md NEWS.md \ README.md TODO.md $(am__append_42) zincludedir = $(includedir)/zbar include_HEADERS = include/zbar.h zinclude_HEADERS = include/zbar/Scanner.h include/zbar/Decoder.h \ include/zbar/Exception.h include/zbar/Symbol.h \ include/zbar/Image.h include/zbar/ImageScanner.h \ include/zbar/Video.h include/zbar/Window.h \ include/zbar/Processor.h $(am__append_1) $(am__append_2) SUBDIRS = zbar $(am__append_19) $(am__append_29) . @HAVE_MAGICK_TRUE@zbarimg_zbarimg_SOURCES = zbarimg/zbarimg.c \ @HAVE_MAGICK_TRUE@ $(am__append_5) @HAVE_MAGICK_TRUE@zbarimg_zbarimg_CPPFLAGS = $(MAGICK_CFLAGS) $(AM_CPPFLAGS) @HAVE_MAGICK_TRUE@zbarimg_zbarimg_LDADD = $(MAGICK_LIBS) \ @HAVE_MAGICK_TRUE@ zbar/libzbar.la $(am__append_6) @HAVE_VIDEO_TRUE@zbarcam_zbarcam_SOURCES = zbarcam/zbarcam.c \ @HAVE_VIDEO_TRUE@ $(am__append_14) @HAVE_VIDEO_TRUE@zbarcam_zbarcam_LDADD = zbar/libzbar.la \ @HAVE_VIDEO_TRUE@ $(am__append_15) @HAVE_VIDEO_TRUE@zbarcam_zbarcam_CPPFLAGS = $(AM_CPPFLAGS) \ @HAVE_VIDEO_TRUE@ $(am__append_16) @HAVE_GTK_TRUE@@HAVE_VIDEO_TRUE@@WIN32_FALSE@zbarcam_zbarcam_gtk_SOURCES = zbarcam/zbarcam-gtk.c zbarcam/scan_video.c @HAVE_GTK_TRUE@@HAVE_VIDEO_TRUE@@WIN32_FALSE@zbarcam_zbarcam_gtk_CPPFLAGS = $(GTK_CFLAGS) $(AM_CPPFLAGS) @HAVE_GTK_TRUE@@HAVE_VIDEO_TRUE@@WIN32_FALSE@zbarcam_zbarcam_gtk_LDADD = $(GTK_LIBS) gtk/libzbargtk.la zbar/libzbar.la \ @HAVE_GTK_TRUE@@HAVE_VIDEO_TRUE@@WIN32_FALSE@ $(AM_LDADD) @HAVE_QT_TRUE@@HAVE_VIDEO_TRUE@zbarcam_zbarcam_qt_SOURCES = zbarcam/zbarcam-qt.cpp zbarcam/scan_video.c @HAVE_QT_TRUE@@HAVE_VIDEO_TRUE@nodist_zbarcam_zbarcam_qt_SOURCES = zbarcam/moc_zbarcam_qt.h @HAVE_QT_TRUE@@HAVE_VIDEO_TRUE@zbarcam_zbarcam_qt_CPPFLAGS = -Izbarcam $(QT_CFLAGS) $(AM_CPPFLAGS) @HAVE_QT_TRUE@@HAVE_VIDEO_TRUE@zbarcam_zbarcam_qt_LDADD = $(QT_LIBS) qt/libzbarqt.la $(AM_LDADD) @HAVE_PYTHON_TRUE@python_zbar_la_CPPFLAGS = $(PYTHON_CFLAGS) $(AM_CPPFLAGS) @HAVE_PYTHON_TRUE@python_zbar_la_LDFLAGS = -shared -module -avoid-version -export-dynamic \ @HAVE_PYTHON_TRUE@ -export-symbols-regex '(initzbar|PyInit_zbar)' @HAVE_PYTHON_TRUE@python_zbar_la_LIBADD = $(PYTHON_LIBS) zbar/libzbar.la $(AM_LIBADD) @HAVE_PYTHON_TRUE@python_zbar_la_SOURCES = python/zbarmodule.c python/zbarmodule.h \ @HAVE_PYTHON_TRUE@ python/enum.c python/exception.c python/symbol.c python/symbolset.c \ @HAVE_PYTHON_TRUE@ python/symboliter.c python/image.c \ @HAVE_PYTHON_TRUE@ python/processor.c python/imagescanner.c python/decoder.c python/scanner.c @HAVE_GTK_TRUE@@HAVE_PYGTK2_TRUE@pygtk_zbarpygtk_la_CPPFLAGS = \ @HAVE_GTK_TRUE@@HAVE_PYGTK2_TRUE@ $(GTK_CFLAGS) $(PYTHON_CFLAGS) $(PYGTK_CFLAGS) $(AM_CPPFLAGS) @HAVE_GTK_TRUE@@HAVE_PYGTK2_TRUE@pygtk_zbarpygtk_la_LDFLAGS = -shared -module -avoid-version -export-dynamic \ @HAVE_GTK_TRUE@@HAVE_PYGTK2_TRUE@ -export-symbols-regex initzbarpygtk @HAVE_GTK_TRUE@@HAVE_PYGTK2_TRUE@pygtk_zbarpygtk_la_LIBADD = \ @HAVE_GTK_TRUE@@HAVE_PYGTK2_TRUE@ $(PYTHON_LIBS) $(PYGTK_LIBS) gtk/libzbargtk.la $(AM_LIBADD) @HAVE_GTK_TRUE@@HAVE_PYGTK2_TRUE@pygtk_zbarpygtk_la_DEPENDENCIES = gtk/libzbargtk.la @HAVE_GTK_TRUE@@HAVE_PYGTK2_TRUE@dist_pygtk_zbarpygtk_la_SOURCES = pygtk/zbarpygtkmodule.c @HAVE_GTK_TRUE@@HAVE_PYGTK2_TRUE@nodist_pygtk_zbarpygtk_la_SOURCES = pygtk/zbarpygtk.c @HAVE_QT_TRUE@qt_libzbarqt_la_CPPFLAGS = -Iqt $(QT_CFLAGS) $(AM_CPPFLAGS) @HAVE_QT_TRUE@qt_libzbarqt_la_LDFLAGS = -version-info $(ZQT_LIB_VERSION) $(AM_LDFLAGS) $(LIBQT_EXTRA_LDFLAGS) @HAVE_QT_TRUE@qt_libzbarqt_la_LIBADD = $(QT_LIBS) zbar/libzbar.la $(AM_LIBADD) @HAVE_QT_TRUE@qt_libzbarqt_la_SOURCES = qt/QZBar.cpp qt/QZBarThread.h qt/QZBarThread.cpp @HAVE_QT_TRUE@nodist_qt_libzbarqt_la_SOURCES = qt/moc_QZBar.cpp qt/moc_QZBarThread.cpp @HAVE_NPAPI_TRUE@plugin_libzbarplugin_la_SOURCES = \ @HAVE_NPAPI_TRUE@ plugin/plugin.c @HAVE_NPAPI_TRUE@plugin_libzbarplugin_la_CPPFLAGS = $(MOZILLA_CFLAGS) $(AM_CPPFLAGS) @HAVE_NPAPI_TRUE@plugin_libzbarplugin_la_LDFLAGS = $(MOZILLA_LIBS) $(AM_LDFLAGS) test_test_decode_SOURCES = test/test_decode.c test/pdf417_encode.h test_test_decode_CFLAGS = -Wno-unused $(AM_CFLAGS) test_test_decode_LDADD = zbar/libzbar.la $(AM_LDADD) TEST_IMAGE_SOURCES = test/test_images.c test/test_images.h test_test_convert_SOURCES = test/test_convert.c $(TEST_IMAGE_SOURCES) test_test_convert_LDADD = zbar/libzbar.la $(AM_LDADD) @HAVE_VIDEO_TRUE@test_test_video_SOURCES = test/test_video.c $(TEST_IMAGE_SOURCES) @HAVE_VIDEO_TRUE@test_test_video_LDADD = zbar/libzbar.la $(AM_LDADD) test_test_proc_SOURCES = test/test_proc.c $(TEST_IMAGE_SOURCES) test_test_proc_LDADD = zbar/libzbar.la $(AM_LDADD) test_test_cpp_SOURCES = test/test_cpp.cpp test_test_cpp_LDADD = zbar/libzbar.la $(AM_LDADD) test_test_cpp_img_SOURCES = test/test_cpp_img.cpp $(TEST_IMAGE_SOURCES) test_test_cpp_img_LDADD = zbar/libzbar.la $(AM_LDADD) @HAVE_JPEG_TRUE@test_test_jpeg_SOURCES = test/test_jpeg.c @HAVE_JPEG_TRUE@test_test_jpeg_LDADD = zbar/libzbar.la $(AM_LDADD) @HAVE_MAGICK_TRUE@test_dbg_scan_SOURCES = test/dbg_scan.cpp @HAVE_MAGICK_TRUE@test_dbg_scan_CPPFLAGS = $(MAGICK_CFLAGS) $(AM_CPPFLAGS) @HAVE_MAGICK_TRUE@test_dbg_scan_LDADD = $(MAGICK_LIBS) -lMagick++ zbar/libzbar.la $(AM_LDADD) @HAVE_DBUS_TRUE@test_test_dbus_SOURCES = test/test_dbus.c @HAVE_DBUS_TRUE@test_test_dbus_LDFLAGS = $(DBUS_LIBS) # Images that work out of the box without needing to enable # an specific symbology NORMAL_IMAGES = codabar.png code-128.png code-39.png code-93.png \ databar.png databar-exp.png ean-13.png ean-8.png i2-5.png \ qr-code.png sqcode1-generated.png sqcode1-scanned.png EXAMPLES = @abs_top_builddir@/examples ZBARIMG = @abs_top_builddir@/zbarimg/zbarimg --nodbus # documentation sources @HAVE_DOC_TRUE@DOCSOURCES = doc/manual.xml doc/version.xml doc/reldate.xml \ @HAVE_DOC_TRUE@ doc/ref/zbarimg.xml doc/ref/zbarcam.xml doc/ref/commonoptions.xml # man page targets to distribute and install @HAVE_DOC_TRUE@dist_man_MANS = $(am__append_36) $(am__append_37) # witness to man page build (many-to-many workaround) @HAVE_DOC_TRUE@man_stamp = doc/man/man.stamp # xmlto --searchpath broken again... @HAVE_DOC_TRUE@doc_path = --searchpath $(abs_builddir)/doc -m \ @HAVE_DOC_TRUE@ $(abs_srcdir)/doc/style.xsl --skip-validation @HAVE_DBUS_TRUE@dbusconfdir = @DBUS_CONFDIR@ @HAVE_DBUS_TRUE@dbusconf_DATA = $(srcdir)/dbus/org.linuxtv.Zbar.conf @WIN32_TRUE@pkgdata_DATA = $(srcdir)/python/test/barcode.png \ @WIN32_TRUE@ $(srcdir)/examples/scan_image.cpp $(srcdir)/examples/scan_image.vcproj all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .cpp .lo .o .obj am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/include/Makefile.am.inc $(srcdir)/zbarimg/Makefile.am.inc $(srcdir)/zbarcam/Makefile.am.inc $(srcdir)/python/Makefile.am.inc $(srcdir)/pygtk/Makefile.am.inc $(srcdir)/qt/Makefile.am.inc $(srcdir)/plugin/Makefile.am.inc $(srcdir)/test/Makefile.am.inc $(srcdir)/doc/Makefile.am.inc $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(srcdir)/include/Makefile.am.inc $(srcdir)/zbarimg/Makefile.am.inc $(srcdir)/zbarcam/Makefile.am.inc $(srcdir)/python/Makefile.am.inc $(srcdir)/pygtk/Makefile.am.inc $(srcdir)/qt/Makefile.am.inc $(srcdir)/plugin/Makefile.am.inc $(srcdir)/test/Makefile.am.inc $(srcdir)/doc/Makefile.am.inc $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): include/config.h: include/stamp-h1 @test -f $@ || rm -f include/stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) include/stamp-h1 include/stamp-h1: $(top_srcdir)/include/config.h.in $(top_builddir)/config.status @rm -f include/stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status include/config.h $(top_srcdir)/include/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f include/stamp-h1 touch $@ distclean-hdr: -rm -f include/config.h include/stamp-h1 zbar.pc: $(top_builddir)/config.status $(srcdir)/zbar.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ zbar-gtk.pc: $(top_builddir)/config.status $(srcdir)/zbar-gtk.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ zbar-qt.pc: $(top_builddir)/config.status $(srcdir)/zbar-qt.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ doc/doxygen.conf: $(top_builddir)/config.status $(top_srcdir)/doc/doxygen.conf.in cd $(top_builddir) && $(SHELL) ./config.status $@ test/test_examples.sh: $(top_builddir)/config.status $(top_srcdir)/test/test_examples.sh.in cd $(top_builddir) && $(SHELL) ./config.status $@ test/check_dbus.sh: $(top_builddir)/config.status $(top_srcdir)/test/check_dbus.sh.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list installcheck-binPROGRAMS: $(bin_PROGRAMS) bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \ case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ esac; \ f=`echo "$$p" | \ sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ for opt in --help --version; do \ if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \ 2>c$${pid}_.err &2; bad=1; fi; \ done; \ done; rm -f c$${pid}_.???; exit $$bad clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } install-pyexecLTLIBRARIES: $(pyexec_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(pyexecdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pyexecdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pyexecdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pyexecdir)"; \ } uninstall-pyexecLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pyexecdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pyexecdir)/$$f"; \ done clean-pyexecLTLIBRARIES: -test -z "$(pyexec_LTLIBRARIES)" || rm -f $(pyexec_LTLIBRARIES) @list='$(pyexec_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } plugin/$(am__dirstamp): @$(MKDIR_P) plugin @: > plugin/$(am__dirstamp) plugin/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plugin/$(DEPDIR) @: > plugin/$(DEPDIR)/$(am__dirstamp) plugin/libzbarplugin_la-plugin.lo: plugin/$(am__dirstamp) \ plugin/$(DEPDIR)/$(am__dirstamp) plugin/libzbarplugin.la: $(plugin_libzbarplugin_la_OBJECTS) $(plugin_libzbarplugin_la_DEPENDENCIES) $(EXTRA_plugin_libzbarplugin_la_DEPENDENCIES) plugin/$(am__dirstamp) $(AM_V_CCLD)$(plugin_libzbarplugin_la_LINK) $(am_plugin_libzbarplugin_la_rpath) $(plugin_libzbarplugin_la_OBJECTS) $(plugin_libzbarplugin_la_LIBADD) $(LIBS) pygtk/$(am__dirstamp): @$(MKDIR_P) pygtk @: > pygtk/$(am__dirstamp) pygtk/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) pygtk/$(DEPDIR) @: > pygtk/$(DEPDIR)/$(am__dirstamp) pygtk/zbarpygtk_la-zbarpygtkmodule.lo: pygtk/$(am__dirstamp) \ pygtk/$(DEPDIR)/$(am__dirstamp) pygtk/zbarpygtk_la-zbarpygtk.lo: pygtk/$(am__dirstamp) \ pygtk/$(DEPDIR)/$(am__dirstamp) pygtk/zbarpygtk.la: $(pygtk_zbarpygtk_la_OBJECTS) $(pygtk_zbarpygtk_la_DEPENDENCIES) $(EXTRA_pygtk_zbarpygtk_la_DEPENDENCIES) pygtk/$(am__dirstamp) $(AM_V_CCLD)$(pygtk_zbarpygtk_la_LINK) $(am_pygtk_zbarpygtk_la_rpath) $(pygtk_zbarpygtk_la_OBJECTS) $(pygtk_zbarpygtk_la_LIBADD) $(LIBS) python/$(am__dirstamp): @$(MKDIR_P) python @: > python/$(am__dirstamp) python/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) python/$(DEPDIR) @: > python/$(DEPDIR)/$(am__dirstamp) python/zbar_la-zbarmodule.lo: python/$(am__dirstamp) \ python/$(DEPDIR)/$(am__dirstamp) python/zbar_la-enum.lo: python/$(am__dirstamp) \ python/$(DEPDIR)/$(am__dirstamp) python/zbar_la-exception.lo: python/$(am__dirstamp) \ python/$(DEPDIR)/$(am__dirstamp) python/zbar_la-symbol.lo: python/$(am__dirstamp) \ python/$(DEPDIR)/$(am__dirstamp) python/zbar_la-symbolset.lo: python/$(am__dirstamp) \ python/$(DEPDIR)/$(am__dirstamp) python/zbar_la-symboliter.lo: python/$(am__dirstamp) \ python/$(DEPDIR)/$(am__dirstamp) python/zbar_la-image.lo: python/$(am__dirstamp) \ python/$(DEPDIR)/$(am__dirstamp) python/zbar_la-processor.lo: python/$(am__dirstamp) \ python/$(DEPDIR)/$(am__dirstamp) python/zbar_la-imagescanner.lo: python/$(am__dirstamp) \ python/$(DEPDIR)/$(am__dirstamp) python/zbar_la-decoder.lo: python/$(am__dirstamp) \ python/$(DEPDIR)/$(am__dirstamp) python/zbar_la-scanner.lo: python/$(am__dirstamp) \ python/$(DEPDIR)/$(am__dirstamp) python/zbar.la: $(python_zbar_la_OBJECTS) $(python_zbar_la_DEPENDENCIES) $(EXTRA_python_zbar_la_DEPENDENCIES) python/$(am__dirstamp) $(AM_V_CCLD)$(python_zbar_la_LINK) $(am_python_zbar_la_rpath) $(python_zbar_la_OBJECTS) $(python_zbar_la_LIBADD) $(LIBS) qt/$(am__dirstamp): @$(MKDIR_P) qt @: > qt/$(am__dirstamp) qt/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qt/$(DEPDIR) @: > qt/$(DEPDIR)/$(am__dirstamp) qt/libzbarqt_la-QZBar.lo: qt/$(am__dirstamp) \ qt/$(DEPDIR)/$(am__dirstamp) qt/libzbarqt_la-QZBarThread.lo: qt/$(am__dirstamp) \ qt/$(DEPDIR)/$(am__dirstamp) qt/libzbarqt_la-moc_QZBar.lo: qt/$(am__dirstamp) \ qt/$(DEPDIR)/$(am__dirstamp) qt/libzbarqt_la-moc_QZBarThread.lo: qt/$(am__dirstamp) \ qt/$(DEPDIR)/$(am__dirstamp) qt/libzbarqt.la: $(qt_libzbarqt_la_OBJECTS) $(qt_libzbarqt_la_DEPENDENCIES) $(EXTRA_qt_libzbarqt_la_DEPENDENCIES) qt/$(am__dirstamp) $(AM_V_CXXLD)$(qt_libzbarqt_la_LINK) $(am_qt_libzbarqt_la_rpath) $(qt_libzbarqt_la_OBJECTS) $(qt_libzbarqt_la_LIBADD) $(LIBS) test/$(am__dirstamp): @$(MKDIR_P) test @: > test/$(am__dirstamp) test/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) test/$(DEPDIR) @: > test/$(DEPDIR)/$(am__dirstamp) test/dbg_scan-dbg_scan.$(OBJEXT): test/$(am__dirstamp) \ test/$(DEPDIR)/$(am__dirstamp) test/dbg_scan$(EXEEXT): $(test_dbg_scan_OBJECTS) $(test_dbg_scan_DEPENDENCIES) $(EXTRA_test_dbg_scan_DEPENDENCIES) test/$(am__dirstamp) @rm -f test/dbg_scan$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_dbg_scan_OBJECTS) $(test_dbg_scan_LDADD) $(LIBS) test/test_convert.$(OBJEXT): test/$(am__dirstamp) \ test/$(DEPDIR)/$(am__dirstamp) test/test_images.$(OBJEXT): test/$(am__dirstamp) \ test/$(DEPDIR)/$(am__dirstamp) test/test_convert$(EXEEXT): $(test_test_convert_OBJECTS) $(test_test_convert_DEPENDENCIES) $(EXTRA_test_test_convert_DEPENDENCIES) test/$(am__dirstamp) @rm -f test/test_convert$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_test_convert_OBJECTS) $(test_test_convert_LDADD) $(LIBS) test/test_cpp.$(OBJEXT): test/$(am__dirstamp) \ test/$(DEPDIR)/$(am__dirstamp) test/test_cpp$(EXEEXT): $(test_test_cpp_OBJECTS) $(test_test_cpp_DEPENDENCIES) $(EXTRA_test_test_cpp_DEPENDENCIES) test/$(am__dirstamp) @rm -f test/test_cpp$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_test_cpp_OBJECTS) $(test_test_cpp_LDADD) $(LIBS) test/test_cpp_img.$(OBJEXT): test/$(am__dirstamp) \ test/$(DEPDIR)/$(am__dirstamp) test/test_cpp_img$(EXEEXT): $(test_test_cpp_img_OBJECTS) $(test_test_cpp_img_DEPENDENCIES) $(EXTRA_test_test_cpp_img_DEPENDENCIES) test/$(am__dirstamp) @rm -f test/test_cpp_img$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_test_cpp_img_OBJECTS) $(test_test_cpp_img_LDADD) $(LIBS) test/test_dbus.$(OBJEXT): test/$(am__dirstamp) \ test/$(DEPDIR)/$(am__dirstamp) test/test_dbus$(EXEEXT): $(test_test_dbus_OBJECTS) $(test_test_dbus_DEPENDENCIES) $(EXTRA_test_test_dbus_DEPENDENCIES) test/$(am__dirstamp) @rm -f test/test_dbus$(EXEEXT) $(AM_V_CCLD)$(test_test_dbus_LINK) $(test_test_dbus_OBJECTS) $(test_test_dbus_LDADD) $(LIBS) test/test_decode-test_decode.$(OBJEXT): test/$(am__dirstamp) \ test/$(DEPDIR)/$(am__dirstamp) test/test_decode$(EXEEXT): $(test_test_decode_OBJECTS) $(test_test_decode_DEPENDENCIES) $(EXTRA_test_test_decode_DEPENDENCIES) test/$(am__dirstamp) @rm -f test/test_decode$(EXEEXT) $(AM_V_CCLD)$(test_test_decode_LINK) $(test_test_decode_OBJECTS) $(test_test_decode_LDADD) $(LIBS) test/test_jpeg.$(OBJEXT): test/$(am__dirstamp) \ test/$(DEPDIR)/$(am__dirstamp) test/test_jpeg$(EXEEXT): $(test_test_jpeg_OBJECTS) $(test_test_jpeg_DEPENDENCIES) $(EXTRA_test_test_jpeg_DEPENDENCIES) test/$(am__dirstamp) @rm -f test/test_jpeg$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_test_jpeg_OBJECTS) $(test_test_jpeg_LDADD) $(LIBS) test/test_proc.$(OBJEXT): test/$(am__dirstamp) \ test/$(DEPDIR)/$(am__dirstamp) test/test_proc$(EXEEXT): $(test_test_proc_OBJECTS) $(test_test_proc_DEPENDENCIES) $(EXTRA_test_test_proc_DEPENDENCIES) test/$(am__dirstamp) @rm -f test/test_proc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_test_proc_OBJECTS) $(test_test_proc_LDADD) $(LIBS) test/test_video.$(OBJEXT): test/$(am__dirstamp) \ test/$(DEPDIR)/$(am__dirstamp) test/test_video$(EXEEXT): $(test_test_video_OBJECTS) $(test_test_video_DEPENDENCIES) $(EXTRA_test_test_video_DEPENDENCIES) test/$(am__dirstamp) @rm -f test/test_video$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_test_video_OBJECTS) $(test_test_video_LDADD) $(LIBS) zbarcam/$(am__dirstamp): @$(MKDIR_P) zbarcam @: > zbarcam/$(am__dirstamp) zbarcam/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) zbarcam/$(DEPDIR) @: > zbarcam/$(DEPDIR)/$(am__dirstamp) zbarcam/zbarcam-zbarcam.$(OBJEXT): zbarcam/$(am__dirstamp) \ zbarcam/$(DEPDIR)/$(am__dirstamp) zbarcam/zbarcam$(EXEEXT): $(zbarcam_zbarcam_OBJECTS) $(zbarcam_zbarcam_DEPENDENCIES) $(EXTRA_zbarcam_zbarcam_DEPENDENCIES) zbarcam/$(am__dirstamp) @rm -f zbarcam/zbarcam$(EXEEXT) $(AM_V_CCLD)$(LINK) $(zbarcam_zbarcam_OBJECTS) $(zbarcam_zbarcam_LDADD) $(LIBS) zbarcam/zbarcam_gtk-zbarcam-gtk.$(OBJEXT): zbarcam/$(am__dirstamp) \ zbarcam/$(DEPDIR)/$(am__dirstamp) zbarcam/zbarcam_gtk-scan_video.$(OBJEXT): zbarcam/$(am__dirstamp) \ zbarcam/$(DEPDIR)/$(am__dirstamp) zbarcam/zbarcam-gtk$(EXEEXT): $(zbarcam_zbarcam_gtk_OBJECTS) $(zbarcam_zbarcam_gtk_DEPENDENCIES) $(EXTRA_zbarcam_zbarcam_gtk_DEPENDENCIES) zbarcam/$(am__dirstamp) @rm -f zbarcam/zbarcam-gtk$(EXEEXT) $(AM_V_CCLD)$(LINK) $(zbarcam_zbarcam_gtk_OBJECTS) $(zbarcam_zbarcam_gtk_LDADD) $(LIBS) zbarcam/zbarcam_qt-zbarcam-qt.$(OBJEXT): zbarcam/$(am__dirstamp) \ zbarcam/$(DEPDIR)/$(am__dirstamp) zbarcam/zbarcam_qt-scan_video.$(OBJEXT): zbarcam/$(am__dirstamp) \ zbarcam/$(DEPDIR)/$(am__dirstamp) zbarcam/zbarcam-qt$(EXEEXT): $(zbarcam_zbarcam_qt_OBJECTS) $(zbarcam_zbarcam_qt_DEPENDENCIES) $(EXTRA_zbarcam_zbarcam_qt_DEPENDENCIES) zbarcam/$(am__dirstamp) @rm -f zbarcam/zbarcam-qt$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(zbarcam_zbarcam_qt_OBJECTS) $(zbarcam_zbarcam_qt_LDADD) $(LIBS) zbarimg/$(am__dirstamp): @$(MKDIR_P) zbarimg @: > zbarimg/$(am__dirstamp) zbarimg/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) zbarimg/$(DEPDIR) @: > zbarimg/$(DEPDIR)/$(am__dirstamp) zbarimg/zbarimg-zbarimg.$(OBJEXT): zbarimg/$(am__dirstamp) \ zbarimg/$(DEPDIR)/$(am__dirstamp) zbarimg/zbarimg$(EXEEXT): $(zbarimg_zbarimg_OBJECTS) $(zbarimg_zbarimg_DEPENDENCIES) $(EXTRA_zbarimg_zbarimg_DEPENDENCIES) zbarimg/$(am__dirstamp) @rm -f zbarimg/zbarimg$(EXEEXT) $(AM_V_CCLD)$(LINK) $(zbarimg_zbarimg_OBJECTS) $(zbarimg_zbarimg_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f plugin/*.$(OBJEXT) -rm -f plugin/*.lo -rm -f pygtk/*.$(OBJEXT) -rm -f pygtk/*.lo -rm -f python/*.$(OBJEXT) -rm -f python/*.lo -rm -f qt/*.$(OBJEXT) -rm -f qt/*.lo -rm -f test/*.$(OBJEXT) -rm -f zbarcam/*.$(OBJEXT) -rm -f zbarimg/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/libzbarplugin_la-plugin.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@pygtk/$(DEPDIR)/zbarpygtk_la-zbarpygtk.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@pygtk/$(DEPDIR)/zbarpygtk_la-zbarpygtkmodule.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@python/$(DEPDIR)/zbar_la-decoder.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@python/$(DEPDIR)/zbar_la-enum.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@python/$(DEPDIR)/zbar_la-exception.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@python/$(DEPDIR)/zbar_la-image.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@python/$(DEPDIR)/zbar_la-imagescanner.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@python/$(DEPDIR)/zbar_la-processor.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@python/$(DEPDIR)/zbar_la-scanner.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@python/$(DEPDIR)/zbar_la-symbol.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@python/$(DEPDIR)/zbar_la-symboliter.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@python/$(DEPDIR)/zbar_la-symbolset.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@python/$(DEPDIR)/zbar_la-zbarmodule.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@qt/$(DEPDIR)/libzbarqt_la-QZBar.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@qt/$(DEPDIR)/libzbarqt_la-QZBarThread.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@qt/$(DEPDIR)/libzbarqt_la-moc_QZBar.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@qt/$(DEPDIR)/libzbarqt_la-moc_QZBarThread.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/dbg_scan-dbg_scan.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_convert.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_cpp.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_cpp_img.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_dbus.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_decode-test_decode.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_images.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_jpeg.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_proc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@test/$(DEPDIR)/test_video.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@zbarcam/$(DEPDIR)/zbarcam-zbarcam.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@zbarcam/$(DEPDIR)/zbarcam_gtk-scan_video.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@zbarcam/$(DEPDIR)/zbarcam_gtk-zbarcam-gtk.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@zbarcam/$(DEPDIR)/zbarcam_qt-scan_video.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@zbarcam/$(DEPDIR)/zbarcam_qt-zbarcam-qt.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@zbarimg/$(DEPDIR)/zbarimg-zbarimg.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< plugin/libzbarplugin_la-plugin.lo: plugin/plugin.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(plugin_libzbarplugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT plugin/libzbarplugin_la-plugin.lo -MD -MP -MF plugin/$(DEPDIR)/libzbarplugin_la-plugin.Tpo -c -o plugin/libzbarplugin_la-plugin.lo `test -f 'plugin/plugin.c' || echo '$(srcdir)/'`plugin/plugin.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) plugin/$(DEPDIR)/libzbarplugin_la-plugin.Tpo plugin/$(DEPDIR)/libzbarplugin_la-plugin.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='plugin/plugin.c' object='plugin/libzbarplugin_la-plugin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(plugin_libzbarplugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o plugin/libzbarplugin_la-plugin.lo `test -f 'plugin/plugin.c' || echo '$(srcdir)/'`plugin/plugin.c pygtk/zbarpygtk_la-zbarpygtkmodule.lo: pygtk/zbarpygtkmodule.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pygtk_zbarpygtk_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pygtk/zbarpygtk_la-zbarpygtkmodule.lo -MD -MP -MF pygtk/$(DEPDIR)/zbarpygtk_la-zbarpygtkmodule.Tpo -c -o pygtk/zbarpygtk_la-zbarpygtkmodule.lo `test -f 'pygtk/zbarpygtkmodule.c' || echo '$(srcdir)/'`pygtk/zbarpygtkmodule.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) pygtk/$(DEPDIR)/zbarpygtk_la-zbarpygtkmodule.Tpo pygtk/$(DEPDIR)/zbarpygtk_la-zbarpygtkmodule.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pygtk/zbarpygtkmodule.c' object='pygtk/zbarpygtk_la-zbarpygtkmodule.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pygtk_zbarpygtk_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pygtk/zbarpygtk_la-zbarpygtkmodule.lo `test -f 'pygtk/zbarpygtkmodule.c' || echo '$(srcdir)/'`pygtk/zbarpygtkmodule.c pygtk/zbarpygtk_la-zbarpygtk.lo: pygtk/zbarpygtk.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pygtk_zbarpygtk_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pygtk/zbarpygtk_la-zbarpygtk.lo -MD -MP -MF pygtk/$(DEPDIR)/zbarpygtk_la-zbarpygtk.Tpo -c -o pygtk/zbarpygtk_la-zbarpygtk.lo `test -f 'pygtk/zbarpygtk.c' || echo '$(srcdir)/'`pygtk/zbarpygtk.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) pygtk/$(DEPDIR)/zbarpygtk_la-zbarpygtk.Tpo pygtk/$(DEPDIR)/zbarpygtk_la-zbarpygtk.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pygtk/zbarpygtk.c' object='pygtk/zbarpygtk_la-zbarpygtk.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pygtk_zbarpygtk_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pygtk/zbarpygtk_la-zbarpygtk.lo `test -f 'pygtk/zbarpygtk.c' || echo '$(srcdir)/'`pygtk/zbarpygtk.c python/zbar_la-zbarmodule.lo: python/zbarmodule.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(python_zbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT python/zbar_la-zbarmodule.lo -MD -MP -MF python/$(DEPDIR)/zbar_la-zbarmodule.Tpo -c -o python/zbar_la-zbarmodule.lo `test -f 'python/zbarmodule.c' || echo '$(srcdir)/'`python/zbarmodule.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) python/$(DEPDIR)/zbar_la-zbarmodule.Tpo python/$(DEPDIR)/zbar_la-zbarmodule.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='python/zbarmodule.c' object='python/zbar_la-zbarmodule.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(python_zbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o python/zbar_la-zbarmodule.lo `test -f 'python/zbarmodule.c' || echo '$(srcdir)/'`python/zbarmodule.c python/zbar_la-enum.lo: python/enum.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(python_zbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT python/zbar_la-enum.lo -MD -MP -MF python/$(DEPDIR)/zbar_la-enum.Tpo -c -o python/zbar_la-enum.lo `test -f 'python/enum.c' || echo '$(srcdir)/'`python/enum.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) python/$(DEPDIR)/zbar_la-enum.Tpo python/$(DEPDIR)/zbar_la-enum.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='python/enum.c' object='python/zbar_la-enum.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(python_zbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o python/zbar_la-enum.lo `test -f 'python/enum.c' || echo '$(srcdir)/'`python/enum.c python/zbar_la-exception.lo: python/exception.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(python_zbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT python/zbar_la-exception.lo -MD -MP -MF python/$(DEPDIR)/zbar_la-exception.Tpo -c -o python/zbar_la-exception.lo `test -f 'python/exception.c' || echo '$(srcdir)/'`python/exception.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) python/$(DEPDIR)/zbar_la-exception.Tpo python/$(DEPDIR)/zbar_la-exception.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='python/exception.c' object='python/zbar_la-exception.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(python_zbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o python/zbar_la-exception.lo `test -f 'python/exception.c' || echo '$(srcdir)/'`python/exception.c python/zbar_la-symbol.lo: python/symbol.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(python_zbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT python/zbar_la-symbol.lo -MD -MP -MF python/$(DEPDIR)/zbar_la-symbol.Tpo -c -o python/zbar_la-symbol.lo `test -f 'python/symbol.c' || echo '$(srcdir)/'`python/symbol.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) python/$(DEPDIR)/zbar_la-symbol.Tpo python/$(DEPDIR)/zbar_la-symbol.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='python/symbol.c' object='python/zbar_la-symbol.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(python_zbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o python/zbar_la-symbol.lo `test -f 'python/symbol.c' || echo '$(srcdir)/'`python/symbol.c python/zbar_la-symbolset.lo: python/symbolset.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(python_zbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT python/zbar_la-symbolset.lo -MD -MP -MF python/$(DEPDIR)/zbar_la-symbolset.Tpo -c -o python/zbar_la-symbolset.lo `test -f 'python/symbolset.c' || echo '$(srcdir)/'`python/symbolset.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) python/$(DEPDIR)/zbar_la-symbolset.Tpo python/$(DEPDIR)/zbar_la-symbolset.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='python/symbolset.c' object='python/zbar_la-symbolset.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(python_zbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o python/zbar_la-symbolset.lo `test -f 'python/symbolset.c' || echo '$(srcdir)/'`python/symbolset.c python/zbar_la-symboliter.lo: python/symboliter.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(python_zbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT python/zbar_la-symboliter.lo -MD -MP -MF python/$(DEPDIR)/zbar_la-symboliter.Tpo -c -o python/zbar_la-symboliter.lo `test -f 'python/symboliter.c' || echo '$(srcdir)/'`python/symboliter.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) python/$(DEPDIR)/zbar_la-symboliter.Tpo python/$(DEPDIR)/zbar_la-symboliter.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='python/symboliter.c' object='python/zbar_la-symboliter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(python_zbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o python/zbar_la-symboliter.lo `test -f 'python/symboliter.c' || echo '$(srcdir)/'`python/symboliter.c python/zbar_la-image.lo: python/image.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(python_zbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT python/zbar_la-image.lo -MD -MP -MF python/$(DEPDIR)/zbar_la-image.Tpo -c -o python/zbar_la-image.lo `test -f 'python/image.c' || echo '$(srcdir)/'`python/image.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) python/$(DEPDIR)/zbar_la-image.Tpo python/$(DEPDIR)/zbar_la-image.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='python/image.c' object='python/zbar_la-image.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(python_zbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o python/zbar_la-image.lo `test -f 'python/image.c' || echo '$(srcdir)/'`python/image.c python/zbar_la-processor.lo: python/processor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(python_zbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT python/zbar_la-processor.lo -MD -MP -MF python/$(DEPDIR)/zbar_la-processor.Tpo -c -o python/zbar_la-processor.lo `test -f 'python/processor.c' || echo '$(srcdir)/'`python/processor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) python/$(DEPDIR)/zbar_la-processor.Tpo python/$(DEPDIR)/zbar_la-processor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='python/processor.c' object='python/zbar_la-processor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(python_zbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o python/zbar_la-processor.lo `test -f 'python/processor.c' || echo '$(srcdir)/'`python/processor.c python/zbar_la-imagescanner.lo: python/imagescanner.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(python_zbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT python/zbar_la-imagescanner.lo -MD -MP -MF python/$(DEPDIR)/zbar_la-imagescanner.Tpo -c -o python/zbar_la-imagescanner.lo `test -f 'python/imagescanner.c' || echo '$(srcdir)/'`python/imagescanner.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) python/$(DEPDIR)/zbar_la-imagescanner.Tpo python/$(DEPDIR)/zbar_la-imagescanner.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='python/imagescanner.c' object='python/zbar_la-imagescanner.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(python_zbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o python/zbar_la-imagescanner.lo `test -f 'python/imagescanner.c' || echo '$(srcdir)/'`python/imagescanner.c python/zbar_la-decoder.lo: python/decoder.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(python_zbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT python/zbar_la-decoder.lo -MD -MP -MF python/$(DEPDIR)/zbar_la-decoder.Tpo -c -o python/zbar_la-decoder.lo `test -f 'python/decoder.c' || echo '$(srcdir)/'`python/decoder.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) python/$(DEPDIR)/zbar_la-decoder.Tpo python/$(DEPDIR)/zbar_la-decoder.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='python/decoder.c' object='python/zbar_la-decoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(python_zbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o python/zbar_la-decoder.lo `test -f 'python/decoder.c' || echo '$(srcdir)/'`python/decoder.c python/zbar_la-scanner.lo: python/scanner.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(python_zbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT python/zbar_la-scanner.lo -MD -MP -MF python/$(DEPDIR)/zbar_la-scanner.Tpo -c -o python/zbar_la-scanner.lo `test -f 'python/scanner.c' || echo '$(srcdir)/'`python/scanner.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) python/$(DEPDIR)/zbar_la-scanner.Tpo python/$(DEPDIR)/zbar_la-scanner.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='python/scanner.c' object='python/zbar_la-scanner.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(python_zbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o python/zbar_la-scanner.lo `test -f 'python/scanner.c' || echo '$(srcdir)/'`python/scanner.c test/test_decode-test_decode.o: test/test_decode.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_test_decode_CFLAGS) $(CFLAGS) -MT test/test_decode-test_decode.o -MD -MP -MF test/$(DEPDIR)/test_decode-test_decode.Tpo -c -o test/test_decode-test_decode.o `test -f 'test/test_decode.c' || echo '$(srcdir)/'`test/test_decode.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_decode-test_decode.Tpo test/$(DEPDIR)/test_decode-test_decode.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/test_decode.c' object='test/test_decode-test_decode.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_test_decode_CFLAGS) $(CFLAGS) -c -o test/test_decode-test_decode.o `test -f 'test/test_decode.c' || echo '$(srcdir)/'`test/test_decode.c test/test_decode-test_decode.obj: test/test_decode.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_test_decode_CFLAGS) $(CFLAGS) -MT test/test_decode-test_decode.obj -MD -MP -MF test/$(DEPDIR)/test_decode-test_decode.Tpo -c -o test/test_decode-test_decode.obj `if test -f 'test/test_decode.c'; then $(CYGPATH_W) 'test/test_decode.c'; else $(CYGPATH_W) '$(srcdir)/test/test_decode.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/test_decode-test_decode.Tpo test/$(DEPDIR)/test_decode-test_decode.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test/test_decode.c' object='test/test_decode-test_decode.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_test_decode_CFLAGS) $(CFLAGS) -c -o test/test_decode-test_decode.obj `if test -f 'test/test_decode.c'; then $(CYGPATH_W) 'test/test_decode.c'; else $(CYGPATH_W) '$(srcdir)/test/test_decode.c'; fi` zbarcam/zbarcam-zbarcam.o: zbarcam/zbarcam.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zbarcam_zbarcam_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT zbarcam/zbarcam-zbarcam.o -MD -MP -MF zbarcam/$(DEPDIR)/zbarcam-zbarcam.Tpo -c -o zbarcam/zbarcam-zbarcam.o `test -f 'zbarcam/zbarcam.c' || echo '$(srcdir)/'`zbarcam/zbarcam.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) zbarcam/$(DEPDIR)/zbarcam-zbarcam.Tpo zbarcam/$(DEPDIR)/zbarcam-zbarcam.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zbarcam/zbarcam.c' object='zbarcam/zbarcam-zbarcam.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zbarcam_zbarcam_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o zbarcam/zbarcam-zbarcam.o `test -f 'zbarcam/zbarcam.c' || echo '$(srcdir)/'`zbarcam/zbarcam.c zbarcam/zbarcam-zbarcam.obj: zbarcam/zbarcam.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zbarcam_zbarcam_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT zbarcam/zbarcam-zbarcam.obj -MD -MP -MF zbarcam/$(DEPDIR)/zbarcam-zbarcam.Tpo -c -o zbarcam/zbarcam-zbarcam.obj `if test -f 'zbarcam/zbarcam.c'; then $(CYGPATH_W) 'zbarcam/zbarcam.c'; else $(CYGPATH_W) '$(srcdir)/zbarcam/zbarcam.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) zbarcam/$(DEPDIR)/zbarcam-zbarcam.Tpo zbarcam/$(DEPDIR)/zbarcam-zbarcam.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zbarcam/zbarcam.c' object='zbarcam/zbarcam-zbarcam.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zbarcam_zbarcam_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o zbarcam/zbarcam-zbarcam.obj `if test -f 'zbarcam/zbarcam.c'; then $(CYGPATH_W) 'zbarcam/zbarcam.c'; else $(CYGPATH_W) '$(srcdir)/zbarcam/zbarcam.c'; fi` zbarcam/zbarcam_gtk-zbarcam-gtk.o: zbarcam/zbarcam-gtk.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zbarcam_zbarcam_gtk_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT zbarcam/zbarcam_gtk-zbarcam-gtk.o -MD -MP -MF zbarcam/$(DEPDIR)/zbarcam_gtk-zbarcam-gtk.Tpo -c -o zbarcam/zbarcam_gtk-zbarcam-gtk.o `test -f 'zbarcam/zbarcam-gtk.c' || echo '$(srcdir)/'`zbarcam/zbarcam-gtk.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) zbarcam/$(DEPDIR)/zbarcam_gtk-zbarcam-gtk.Tpo zbarcam/$(DEPDIR)/zbarcam_gtk-zbarcam-gtk.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zbarcam/zbarcam-gtk.c' object='zbarcam/zbarcam_gtk-zbarcam-gtk.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zbarcam_zbarcam_gtk_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o zbarcam/zbarcam_gtk-zbarcam-gtk.o `test -f 'zbarcam/zbarcam-gtk.c' || echo '$(srcdir)/'`zbarcam/zbarcam-gtk.c zbarcam/zbarcam_gtk-zbarcam-gtk.obj: zbarcam/zbarcam-gtk.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zbarcam_zbarcam_gtk_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT zbarcam/zbarcam_gtk-zbarcam-gtk.obj -MD -MP -MF zbarcam/$(DEPDIR)/zbarcam_gtk-zbarcam-gtk.Tpo -c -o zbarcam/zbarcam_gtk-zbarcam-gtk.obj `if test -f 'zbarcam/zbarcam-gtk.c'; then $(CYGPATH_W) 'zbarcam/zbarcam-gtk.c'; else $(CYGPATH_W) '$(srcdir)/zbarcam/zbarcam-gtk.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) zbarcam/$(DEPDIR)/zbarcam_gtk-zbarcam-gtk.Tpo zbarcam/$(DEPDIR)/zbarcam_gtk-zbarcam-gtk.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zbarcam/zbarcam-gtk.c' object='zbarcam/zbarcam_gtk-zbarcam-gtk.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zbarcam_zbarcam_gtk_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o zbarcam/zbarcam_gtk-zbarcam-gtk.obj `if test -f 'zbarcam/zbarcam-gtk.c'; then $(CYGPATH_W) 'zbarcam/zbarcam-gtk.c'; else $(CYGPATH_W) '$(srcdir)/zbarcam/zbarcam-gtk.c'; fi` zbarcam/zbarcam_gtk-scan_video.o: zbarcam/scan_video.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zbarcam_zbarcam_gtk_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT zbarcam/zbarcam_gtk-scan_video.o -MD -MP -MF zbarcam/$(DEPDIR)/zbarcam_gtk-scan_video.Tpo -c -o zbarcam/zbarcam_gtk-scan_video.o `test -f 'zbarcam/scan_video.c' || echo '$(srcdir)/'`zbarcam/scan_video.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) zbarcam/$(DEPDIR)/zbarcam_gtk-scan_video.Tpo zbarcam/$(DEPDIR)/zbarcam_gtk-scan_video.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zbarcam/scan_video.c' object='zbarcam/zbarcam_gtk-scan_video.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zbarcam_zbarcam_gtk_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o zbarcam/zbarcam_gtk-scan_video.o `test -f 'zbarcam/scan_video.c' || echo '$(srcdir)/'`zbarcam/scan_video.c zbarcam/zbarcam_gtk-scan_video.obj: zbarcam/scan_video.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zbarcam_zbarcam_gtk_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT zbarcam/zbarcam_gtk-scan_video.obj -MD -MP -MF zbarcam/$(DEPDIR)/zbarcam_gtk-scan_video.Tpo -c -o zbarcam/zbarcam_gtk-scan_video.obj `if test -f 'zbarcam/scan_video.c'; then $(CYGPATH_W) 'zbarcam/scan_video.c'; else $(CYGPATH_W) '$(srcdir)/zbarcam/scan_video.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) zbarcam/$(DEPDIR)/zbarcam_gtk-scan_video.Tpo zbarcam/$(DEPDIR)/zbarcam_gtk-scan_video.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zbarcam/scan_video.c' object='zbarcam/zbarcam_gtk-scan_video.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zbarcam_zbarcam_gtk_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o zbarcam/zbarcam_gtk-scan_video.obj `if test -f 'zbarcam/scan_video.c'; then $(CYGPATH_W) 'zbarcam/scan_video.c'; else $(CYGPATH_W) '$(srcdir)/zbarcam/scan_video.c'; fi` zbarcam/zbarcam_qt-scan_video.o: zbarcam/scan_video.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zbarcam_zbarcam_qt_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT zbarcam/zbarcam_qt-scan_video.o -MD -MP -MF zbarcam/$(DEPDIR)/zbarcam_qt-scan_video.Tpo -c -o zbarcam/zbarcam_qt-scan_video.o `test -f 'zbarcam/scan_video.c' || echo '$(srcdir)/'`zbarcam/scan_video.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) zbarcam/$(DEPDIR)/zbarcam_qt-scan_video.Tpo zbarcam/$(DEPDIR)/zbarcam_qt-scan_video.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zbarcam/scan_video.c' object='zbarcam/zbarcam_qt-scan_video.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zbarcam_zbarcam_qt_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o zbarcam/zbarcam_qt-scan_video.o `test -f 'zbarcam/scan_video.c' || echo '$(srcdir)/'`zbarcam/scan_video.c zbarcam/zbarcam_qt-scan_video.obj: zbarcam/scan_video.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zbarcam_zbarcam_qt_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT zbarcam/zbarcam_qt-scan_video.obj -MD -MP -MF zbarcam/$(DEPDIR)/zbarcam_qt-scan_video.Tpo -c -o zbarcam/zbarcam_qt-scan_video.obj `if test -f 'zbarcam/scan_video.c'; then $(CYGPATH_W) 'zbarcam/scan_video.c'; else $(CYGPATH_W) '$(srcdir)/zbarcam/scan_video.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) zbarcam/$(DEPDIR)/zbarcam_qt-scan_video.Tpo zbarcam/$(DEPDIR)/zbarcam_qt-scan_video.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zbarcam/scan_video.c' object='zbarcam/zbarcam_qt-scan_video.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zbarcam_zbarcam_qt_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o zbarcam/zbarcam_qt-scan_video.obj `if test -f 'zbarcam/scan_video.c'; then $(CYGPATH_W) 'zbarcam/scan_video.c'; else $(CYGPATH_W) '$(srcdir)/zbarcam/scan_video.c'; fi` zbarimg/zbarimg-zbarimg.o: zbarimg/zbarimg.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zbarimg_zbarimg_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT zbarimg/zbarimg-zbarimg.o -MD -MP -MF zbarimg/$(DEPDIR)/zbarimg-zbarimg.Tpo -c -o zbarimg/zbarimg-zbarimg.o `test -f 'zbarimg/zbarimg.c' || echo '$(srcdir)/'`zbarimg/zbarimg.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) zbarimg/$(DEPDIR)/zbarimg-zbarimg.Tpo zbarimg/$(DEPDIR)/zbarimg-zbarimg.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zbarimg/zbarimg.c' object='zbarimg/zbarimg-zbarimg.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zbarimg_zbarimg_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o zbarimg/zbarimg-zbarimg.o `test -f 'zbarimg/zbarimg.c' || echo '$(srcdir)/'`zbarimg/zbarimg.c zbarimg/zbarimg-zbarimg.obj: zbarimg/zbarimg.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zbarimg_zbarimg_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT zbarimg/zbarimg-zbarimg.obj -MD -MP -MF zbarimg/$(DEPDIR)/zbarimg-zbarimg.Tpo -c -o zbarimg/zbarimg-zbarimg.obj `if test -f 'zbarimg/zbarimg.c'; then $(CYGPATH_W) 'zbarimg/zbarimg.c'; else $(CYGPATH_W) '$(srcdir)/zbarimg/zbarimg.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) zbarimg/$(DEPDIR)/zbarimg-zbarimg.Tpo zbarimg/$(DEPDIR)/zbarimg-zbarimg.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zbarimg/zbarimg.c' object='zbarimg/zbarimg-zbarimg.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zbarimg_zbarimg_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o zbarimg/zbarimg-zbarimg.obj `if test -f 'zbarimg/zbarimg.c'; then $(CYGPATH_W) 'zbarimg/zbarimg.c'; else $(CYGPATH_W) '$(srcdir)/zbarimg/zbarimg.c'; fi` .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< qt/libzbarqt_la-QZBar.lo: qt/QZBar.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(qt_libzbarqt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT qt/libzbarqt_la-QZBar.lo -MD -MP -MF qt/$(DEPDIR)/libzbarqt_la-QZBar.Tpo -c -o qt/libzbarqt_la-QZBar.lo `test -f 'qt/QZBar.cpp' || echo '$(srcdir)/'`qt/QZBar.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) qt/$(DEPDIR)/libzbarqt_la-QZBar.Tpo qt/$(DEPDIR)/libzbarqt_la-QZBar.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='qt/QZBar.cpp' object='qt/libzbarqt_la-QZBar.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(qt_libzbarqt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o qt/libzbarqt_la-QZBar.lo `test -f 'qt/QZBar.cpp' || echo '$(srcdir)/'`qt/QZBar.cpp qt/libzbarqt_la-QZBarThread.lo: qt/QZBarThread.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(qt_libzbarqt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT qt/libzbarqt_la-QZBarThread.lo -MD -MP -MF qt/$(DEPDIR)/libzbarqt_la-QZBarThread.Tpo -c -o qt/libzbarqt_la-QZBarThread.lo `test -f 'qt/QZBarThread.cpp' || echo '$(srcdir)/'`qt/QZBarThread.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) qt/$(DEPDIR)/libzbarqt_la-QZBarThread.Tpo qt/$(DEPDIR)/libzbarqt_la-QZBarThread.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='qt/QZBarThread.cpp' object='qt/libzbarqt_la-QZBarThread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(qt_libzbarqt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o qt/libzbarqt_la-QZBarThread.lo `test -f 'qt/QZBarThread.cpp' || echo '$(srcdir)/'`qt/QZBarThread.cpp qt/libzbarqt_la-moc_QZBar.lo: qt/moc_QZBar.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(qt_libzbarqt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT qt/libzbarqt_la-moc_QZBar.lo -MD -MP -MF qt/$(DEPDIR)/libzbarqt_la-moc_QZBar.Tpo -c -o qt/libzbarqt_la-moc_QZBar.lo `test -f 'qt/moc_QZBar.cpp' || echo '$(srcdir)/'`qt/moc_QZBar.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) qt/$(DEPDIR)/libzbarqt_la-moc_QZBar.Tpo qt/$(DEPDIR)/libzbarqt_la-moc_QZBar.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='qt/moc_QZBar.cpp' object='qt/libzbarqt_la-moc_QZBar.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(qt_libzbarqt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o qt/libzbarqt_la-moc_QZBar.lo `test -f 'qt/moc_QZBar.cpp' || echo '$(srcdir)/'`qt/moc_QZBar.cpp qt/libzbarqt_la-moc_QZBarThread.lo: qt/moc_QZBarThread.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(qt_libzbarqt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT qt/libzbarqt_la-moc_QZBarThread.lo -MD -MP -MF qt/$(DEPDIR)/libzbarqt_la-moc_QZBarThread.Tpo -c -o qt/libzbarqt_la-moc_QZBarThread.lo `test -f 'qt/moc_QZBarThread.cpp' || echo '$(srcdir)/'`qt/moc_QZBarThread.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) qt/$(DEPDIR)/libzbarqt_la-moc_QZBarThread.Tpo qt/$(DEPDIR)/libzbarqt_la-moc_QZBarThread.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='qt/moc_QZBarThread.cpp' object='qt/libzbarqt_la-moc_QZBarThread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(qt_libzbarqt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o qt/libzbarqt_la-moc_QZBarThread.lo `test -f 'qt/moc_QZBarThread.cpp' || echo '$(srcdir)/'`qt/moc_QZBarThread.cpp test/dbg_scan-dbg_scan.o: test/dbg_scan.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_dbg_scan_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test/dbg_scan-dbg_scan.o -MD -MP -MF test/$(DEPDIR)/dbg_scan-dbg_scan.Tpo -c -o test/dbg_scan-dbg_scan.o `test -f 'test/dbg_scan.cpp' || echo '$(srcdir)/'`test/dbg_scan.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/dbg_scan-dbg_scan.Tpo test/$(DEPDIR)/dbg_scan-dbg_scan.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='test/dbg_scan.cpp' object='test/dbg_scan-dbg_scan.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_dbg_scan_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test/dbg_scan-dbg_scan.o `test -f 'test/dbg_scan.cpp' || echo '$(srcdir)/'`test/dbg_scan.cpp test/dbg_scan-dbg_scan.obj: test/dbg_scan.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_dbg_scan_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT test/dbg_scan-dbg_scan.obj -MD -MP -MF test/$(DEPDIR)/dbg_scan-dbg_scan.Tpo -c -o test/dbg_scan-dbg_scan.obj `if test -f 'test/dbg_scan.cpp'; then $(CYGPATH_W) 'test/dbg_scan.cpp'; else $(CYGPATH_W) '$(srcdir)/test/dbg_scan.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) test/$(DEPDIR)/dbg_scan-dbg_scan.Tpo test/$(DEPDIR)/dbg_scan-dbg_scan.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='test/dbg_scan.cpp' object='test/dbg_scan-dbg_scan.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_dbg_scan_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o test/dbg_scan-dbg_scan.obj `if test -f 'test/dbg_scan.cpp'; then $(CYGPATH_W) 'test/dbg_scan.cpp'; else $(CYGPATH_W) '$(srcdir)/test/dbg_scan.cpp'; fi` zbarcam/zbarcam_qt-zbarcam-qt.o: zbarcam/zbarcam-qt.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zbarcam_zbarcam_qt_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zbarcam/zbarcam_qt-zbarcam-qt.o -MD -MP -MF zbarcam/$(DEPDIR)/zbarcam_qt-zbarcam-qt.Tpo -c -o zbarcam/zbarcam_qt-zbarcam-qt.o `test -f 'zbarcam/zbarcam-qt.cpp' || echo '$(srcdir)/'`zbarcam/zbarcam-qt.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) zbarcam/$(DEPDIR)/zbarcam_qt-zbarcam-qt.Tpo zbarcam/$(DEPDIR)/zbarcam_qt-zbarcam-qt.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='zbarcam/zbarcam-qt.cpp' object='zbarcam/zbarcam_qt-zbarcam-qt.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zbarcam_zbarcam_qt_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zbarcam/zbarcam_qt-zbarcam-qt.o `test -f 'zbarcam/zbarcam-qt.cpp' || echo '$(srcdir)/'`zbarcam/zbarcam-qt.cpp zbarcam/zbarcam_qt-zbarcam-qt.obj: zbarcam/zbarcam-qt.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zbarcam_zbarcam_qt_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zbarcam/zbarcam_qt-zbarcam-qt.obj -MD -MP -MF zbarcam/$(DEPDIR)/zbarcam_qt-zbarcam-qt.Tpo -c -o zbarcam/zbarcam_qt-zbarcam-qt.obj `if test -f 'zbarcam/zbarcam-qt.cpp'; then $(CYGPATH_W) 'zbarcam/zbarcam-qt.cpp'; else $(CYGPATH_W) '$(srcdir)/zbarcam/zbarcam-qt.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) zbarcam/$(DEPDIR)/zbarcam_qt-zbarcam-qt.Tpo zbarcam/$(DEPDIR)/zbarcam_qt-zbarcam-qt.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='zbarcam/zbarcam-qt.cpp' object='zbarcam/zbarcam_qt-zbarcam-qt.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zbarcam_zbarcam_qt_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zbarcam/zbarcam_qt-zbarcam-qt.obj `if test -f 'zbarcam/zbarcam-qt.cpp'; then $(CYGPATH_W) 'zbarcam/zbarcam-qt.cpp'; else $(CYGPATH_W) '$(srcdir)/zbarcam/zbarcam-qt.cpp'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -rm -rf plugin/.libs plugin/_libs -rm -rf pygtk/.libs pygtk/_libs -rm -rf python/.libs python/_libs -rm -rf qt/.libs qt/_libs -rm -rf test/.libs test/_libs -rm -rf zbarcam/.libs zbarcam/_libs -rm -rf zbarimg/.libs zbarimg/_libs distclean-libtool: -rm -f libtool config.lt install-man1: $(dist_man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(dist_man_MANS)'; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) install-dbusconfDATA: $(dbusconf_DATA) @$(NORMAL_INSTALL) @list='$(dbusconf_DATA)'; test -n "$(dbusconfdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(dbusconfdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(dbusconfdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dbusconfdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dbusconfdir)" || exit $$?; \ done uninstall-dbusconfDATA: @$(NORMAL_UNINSTALL) @list='$(dbusconf_DATA)'; test -n "$(dbusconfdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(dbusconfdir)'; $(am__uninstall_files_from_dir) install-dist_docDATA: $(dist_doc_DATA) @$(NORMAL_INSTALL) @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ done uninstall-dist_docDATA: @$(NORMAL_UNINSTALL) @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir) install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) install-pkgdataDATA: $(pkgdata_DATA) @$(NORMAL_INSTALL) @list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgdatadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \ done uninstall-pkgdataDATA: @$(NORMAL_UNINSTALL) @list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgdatadir)'; $(am__uninstall_files_from_dir) install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) install-zincludeHEADERS: $(zinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(zinclude_HEADERS)'; test -n "$(zincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(zincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(zincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(zincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(zincludedir)" || exit $$?; \ done uninstall-zincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(zinclude_HEADERS)'; test -n "$(zincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(zincludedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-local check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(MANS) $(DATA) $(HEADERS) install-binPROGRAMS: install-libLTLIBRARIES installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(dbusconfdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(zincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f plugin/$(DEPDIR)/$(am__dirstamp) -rm -f plugin/$(am__dirstamp) -rm -f pygtk/$(DEPDIR)/$(am__dirstamp) -rm -f pygtk/$(am__dirstamp) -rm -f python/$(DEPDIR)/$(am__dirstamp) -rm -f python/$(am__dirstamp) -rm -f qt/$(DEPDIR)/$(am__dirstamp) -rm -f qt/$(am__dirstamp) -rm -f test/$(DEPDIR)/$(am__dirstamp) -rm -f test/$(am__dirstamp) -rm -f zbarcam/$(DEPDIR)/$(am__dirstamp) -rm -f zbarcam/$(am__dirstamp) -rm -f zbarimg/$(DEPDIR)/$(am__dirstamp) -rm -f zbarimg/$(am__dirstamp) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) @HAVE_QT_FALSE@clean-local: @HAVE_DOC_FALSE@html-local: clean: clean-recursive clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ clean-libLTLIBRARIES clean-libtool clean-local \ clean-pyexecLTLIBRARIES mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f plugin/$(DEPDIR)/libzbarplugin_la-plugin.Plo -rm -f pygtk/$(DEPDIR)/zbarpygtk_la-zbarpygtk.Plo -rm -f pygtk/$(DEPDIR)/zbarpygtk_la-zbarpygtkmodule.Plo -rm -f python/$(DEPDIR)/zbar_la-decoder.Plo -rm -f python/$(DEPDIR)/zbar_la-enum.Plo -rm -f python/$(DEPDIR)/zbar_la-exception.Plo -rm -f python/$(DEPDIR)/zbar_la-image.Plo -rm -f python/$(DEPDIR)/zbar_la-imagescanner.Plo -rm -f python/$(DEPDIR)/zbar_la-processor.Plo -rm -f python/$(DEPDIR)/zbar_la-scanner.Plo -rm -f python/$(DEPDIR)/zbar_la-symbol.Plo -rm -f python/$(DEPDIR)/zbar_la-symboliter.Plo -rm -f python/$(DEPDIR)/zbar_la-symbolset.Plo -rm -f python/$(DEPDIR)/zbar_la-zbarmodule.Plo -rm -f qt/$(DEPDIR)/libzbarqt_la-QZBar.Plo -rm -f qt/$(DEPDIR)/libzbarqt_la-QZBarThread.Plo -rm -f qt/$(DEPDIR)/libzbarqt_la-moc_QZBar.Plo -rm -f qt/$(DEPDIR)/libzbarqt_la-moc_QZBarThread.Plo -rm -f test/$(DEPDIR)/dbg_scan-dbg_scan.Po -rm -f test/$(DEPDIR)/test_convert.Po -rm -f test/$(DEPDIR)/test_cpp.Po -rm -f test/$(DEPDIR)/test_cpp_img.Po -rm -f test/$(DEPDIR)/test_dbus.Po -rm -f test/$(DEPDIR)/test_decode-test_decode.Po -rm -f test/$(DEPDIR)/test_images.Po -rm -f test/$(DEPDIR)/test_jpeg.Po -rm -f test/$(DEPDIR)/test_proc.Po -rm -f test/$(DEPDIR)/test_video.Po -rm -f zbarcam/$(DEPDIR)/zbarcam-zbarcam.Po -rm -f zbarcam/$(DEPDIR)/zbarcam_gtk-scan_video.Po -rm -f zbarcam/$(DEPDIR)/zbarcam_gtk-zbarcam-gtk.Po -rm -f zbarcam/$(DEPDIR)/zbarcam_qt-scan_video.Po -rm -f zbarcam/$(DEPDIR)/zbarcam_qt-zbarcam-qt.Po -rm -f zbarimg/$(DEPDIR)/zbarimg-zbarimg.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: html-local info: info-recursive info-am: install-data-am: install-dbusconfDATA install-dist_docDATA \ install-includeHEADERS install-man install-pkgconfigDATA \ install-pkgdataDATA install-zincludeHEADERS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-libLTLIBRARIES \ install-pyexecLTLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-man1 install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: installcheck-binPROGRAMS maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f plugin/$(DEPDIR)/libzbarplugin_la-plugin.Plo -rm -f pygtk/$(DEPDIR)/zbarpygtk_la-zbarpygtk.Plo -rm -f pygtk/$(DEPDIR)/zbarpygtk_la-zbarpygtkmodule.Plo -rm -f python/$(DEPDIR)/zbar_la-decoder.Plo -rm -f python/$(DEPDIR)/zbar_la-enum.Plo -rm -f python/$(DEPDIR)/zbar_la-exception.Plo -rm -f python/$(DEPDIR)/zbar_la-image.Plo -rm -f python/$(DEPDIR)/zbar_la-imagescanner.Plo -rm -f python/$(DEPDIR)/zbar_la-processor.Plo -rm -f python/$(DEPDIR)/zbar_la-scanner.Plo -rm -f python/$(DEPDIR)/zbar_la-symbol.Plo -rm -f python/$(DEPDIR)/zbar_la-symboliter.Plo -rm -f python/$(DEPDIR)/zbar_la-symbolset.Plo -rm -f python/$(DEPDIR)/zbar_la-zbarmodule.Plo -rm -f qt/$(DEPDIR)/libzbarqt_la-QZBar.Plo -rm -f qt/$(DEPDIR)/libzbarqt_la-QZBarThread.Plo -rm -f qt/$(DEPDIR)/libzbarqt_la-moc_QZBar.Plo -rm -f qt/$(DEPDIR)/libzbarqt_la-moc_QZBarThread.Plo -rm -f test/$(DEPDIR)/dbg_scan-dbg_scan.Po -rm -f test/$(DEPDIR)/test_convert.Po -rm -f test/$(DEPDIR)/test_cpp.Po -rm -f test/$(DEPDIR)/test_cpp_img.Po -rm -f test/$(DEPDIR)/test_dbus.Po -rm -f test/$(DEPDIR)/test_decode-test_decode.Po -rm -f test/$(DEPDIR)/test_images.Po -rm -f test/$(DEPDIR)/test_jpeg.Po -rm -f test/$(DEPDIR)/test_proc.Po -rm -f test/$(DEPDIR)/test_video.Po -rm -f zbarcam/$(DEPDIR)/zbarcam-zbarcam.Po -rm -f zbarcam/$(DEPDIR)/zbarcam_gtk-scan_video.Po -rm -f zbarcam/$(DEPDIR)/zbarcam_gtk-zbarcam-gtk.Po -rm -f zbarcam/$(DEPDIR)/zbarcam_qt-scan_video.Po -rm -f zbarcam/$(DEPDIR)/zbarcam_qt-zbarcam-qt.Po -rm -f zbarimg/$(DEPDIR)/zbarimg-zbarimg.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-dbusconfDATA \ uninstall-dist_docDATA uninstall-includeHEADERS \ uninstall-libLTLIBRARIES uninstall-man uninstall-pkgconfigDATA \ uninstall-pkgdataDATA uninstall-pyexecLTLIBRARIES \ uninstall-zincludeHEADERS uninstall-man: uninstall-man1 .MAKE: $(am__recursive_targets) all check check-am install install-am \ install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--depfiles am--refresh check check-am check-local clean \ clean-binPROGRAMS clean-checkPROGRAMS clean-cscope \ clean-generic clean-libLTLIBRARIES clean-libtool clean-local \ clean-pyexecLTLIBRARIES cscope cscopelist-am ctags ctags-am \ dist dist-all dist-bzip2 dist-gzip dist-hook dist-lzip \ dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am html-local info \ info-am install install-am install-binPROGRAMS install-data \ install-data-am install-dbusconfDATA install-dist_docDATA \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-includeHEADERS \ install-info install-info-am install-libLTLIBRARIES \ install-man install-man1 install-pdf install-pdf-am \ install-pkgconfigDATA install-pkgdataDATA install-ps \ install-ps-am install-pyexecLTLIBRARIES install-strip \ install-zincludeHEADERS installcheck installcheck-am \ installcheck-binPROGRAMS installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-dbusconfDATA \ uninstall-dist_docDATA uninstall-includeHEADERS \ uninstall-libLTLIBRARIES uninstall-man uninstall-man1 \ uninstall-pkgconfigDATA uninstall-pkgdataDATA \ uninstall-pyexecLTLIBRARIES uninstall-zincludeHEADERS .PRECIOUS: Makefile zbar/libzbar.la: $(MAKE) -C @builddir@/zbar libzbar.la @HAVE_QT_TRUE@@HAVE_VIDEO_TRUE@zbarcam/moc_zbarcam_qt.h: zbarcam/zbarcam-qt.cpp @HAVE_QT_TRUE@@HAVE_VIDEO_TRUE@ $(MOC) -i $(zbarcam_zbarcam_qt_CPPFLAGS) $< -o $@ @HAVE_GTK_TRUE@gtk/libzbargtk.la: @HAVE_GTK_TRUE@ $(MAKE) -C @builddir@/gtk libzbargtk.la @HAVE_GTK_TRUE@gtk/zbarmarshal.h: @HAVE_GTK_TRUE@ $(MAKE) -C @builddir@/gtk zbarmarshal.h @HAVE_GTK_TRUE@gtk/ZBar-1.0.typelib: @HAVE_GTK_TRUE@ $(MAKE) -C $(srcdir)/gtk ZBar-1.0.typelib # FIXME ugly hack to fixup new name... now non-standard? @HAVE_GTK_TRUE@@HAVE_PYGTK2_TRUE@pygtk/zbarpygtk.defs: include/zbar/zbargtk.h @HAVE_GTK_TRUE@@HAVE_PYGTK2_TRUE@ $(PYTHON) $(PYGTK_H2DEF) $< | \ @HAVE_GTK_TRUE@@HAVE_PYGTK2_TRUE@ $(SED) -e 's/Z_TYPE_BAR_/ZBAR_TYPE_/' > $@ @HAVE_GTK_TRUE@@HAVE_PYGTK2_TRUE@pygtk/%.c: pygtk/%.defs $(srcdir)/pygtk/zbarpygtk.override @HAVE_GTK_TRUE@@HAVE_PYGTK2_TRUE@ $(PYGTK_CODEGEN) --prefix zbarpygtk \ @HAVE_GTK_TRUE@@HAVE_PYGTK2_TRUE@ --register $(PYGTK_DEFS)/gdk-types.defs \ @HAVE_GTK_TRUE@@HAVE_PYGTK2_TRUE@ --override $(srcdir)/pygtk/zbarpygtk.override $< > $@ @HAVE_QT_TRUE@clean-local: @HAVE_QT_TRUE@ -rm -vf qt/moc_*.cpp @HAVE_QT_TRUE@qt/moc_%.cpp: qt/%.h @HAVE_QT_TRUE@ $(MOC) $(qt_libzbarqt_la_CPPFLAGS) $< -o $@ @HAVE_QT_TRUE@qt/moc_%.cpp: include/zbar/%.h @HAVE_QT_TRUE@ $(MOC) $(qt_libzbarqt_la_CPPFLAGS) $< -o $@ gen_checksum: all for i in $(NORMAL_IMAGES); do $(ZBARIMG) $(EXAMPLES)/$$i 2>/dev/null|sha1sum|sed "s,-,zbarimg $$i,"; done >$(EXAMPLES)/sha1sum $(ZBARIMG) -Sean2.enable $(EXAMPLES)/ean-2.png 2>/dev/null|sha1sum|sed "s,-,zbarimg -Sean2.enable ean-2.png," >>$(EXAMPLES)/sha1sum $(ZBARIMG) -Sean5.enable $(EXAMPLES)/ean-5.png 2>/dev/null|sha1sum|sed "s,-,zbarimg -Sean5.enable ean-5.png," >>$(EXAMPLES)/sha1sum $(ZBARIMG) -Sisbn10.enable $(EXAMPLES)/ean-13.png 2>/dev/null|sha1sum|sed "s,-,zbarimg -Sisbn10.enable ean-13.png," >>$(EXAMPLES)/sha1sum $(ZBARIMG) -Sisbn13.enable $(EXAMPLES)/ean-13.png 2>/dev/null|sha1sum|sed "s,-,zbarimg -Sisbn13.enable ean-13.png," >>$(EXAMPLES)/sha1sum $(ZBARIMG) -Supca.enable $(EXAMPLES)/code-upc-a.png 2>/dev/null|sha1sum|sed "s,-,zbarimg -Supca.enable code-upc-a.png," >>$(EXAMPLES)/sha1sum $(ZBARIMG) -Stest-inverted $(EXAMPLES)/qr-code-inverted.png 2>/dev/null|sha1sum|sed "s,-,zbarimg -Stest-inverted qr-code-inverted.png," >>$(EXAMPLES)/sha1sum test_progs: $(check_PROGRAMS) @$(MAKE) $(check_PROGRAMS) # Require X11 to work check-cpp: test/test_cpp_img @abs_top_builddir@/test/test_cpp_img check-decoder: test/test_decode @abs_top_builddir@/test/test_decode -q regress-decoder: test/test_decode @abs_top_builddir@/test/test_decode -q -n 100000 check-images-py: zbarimg/zbarimg @PYTHON@ @abs_top_srcdir@/test/barcodetest.py check-images: zbarimg/zbarimg @abs_top_builddir@/test/test_examples.sh check-convert: test/test_convert @abs_top_srcdir@/test/test_convert @if [ "`sha1sum /tmp/base.I420.zimg |cut -d' ' -f 1`" != \ "d697b0bb84617bef0f6413b3e5537ee38ba92312" ]; then \ echo "convert FAILED"; else echo "convert PASSED."; fi @rm /tmp/base.I420.zimg 2>/dev/null @HAVE_PYGTK2_TRUE@check-pygtk: pygtk/zbarpygtk.la @HAVE_PYGTK2_TRUE@ PYTHONPATH=@abs_top_srcdir@/pygtk/.libs/ \ @HAVE_PYGTK2_TRUE@ @PYTHON@ @abs_top_srcdir@/test/test_pygtk.py @HAVE_PYGTK2_FALSE@check-pygtk: @HAVE_PYTHON_TRUE@check-python: python/zbar.la @HAVE_PYTHON_TRUE@ PYTHONPATH=@abs_top_srcdir@/python/.libs/ \ @HAVE_PYTHON_TRUE@ @PYTHON@ @abs_top_srcdir@/test/test_python.py \ @HAVE_PYTHON_TRUE@ '@abs_top_srcdir@/examples/ean-13.png' '9789876543217' @HAVE_PYTHON_FALSE@check-python: check-gi: gtk/ZBar-1.0.typelib LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):@abs_top_srcdir@/gtk/.libs:@abs_top_srcdir@/zbar/.libs \ GI_TYPELIB_PATH=@abs_top_srcdir@/gtk/ \ @PYTHON@ @abs_top_srcdir@/test/test_gi.py # Require a camera device for it to work check-video: test/test_video @abs_top_srcdir@/test/test_video -q check-jpeg: test/test_jpeg @abs_top_srcdir@/test/test_jpeg -q # Require a working D-Bus - may fail with containers @HAVE_DBUS_TRUE@check-dbus: test/test_dbus @HAVE_DBUS_TRUE@ @abs_top_builddir@/test/check_dbus.sh @HAVE_DBUS_FALSE@check-dbus: @HAVE_JAVA_UNIT_TRUE@check-java: zbar/libzbar.la @HAVE_JAVA_UNIT_TRUE@ JAVA_HOME=${JAVA_HOME} $(MAKE) -C java check-java @HAVE_JAVA_UNIT_FALSE@check-java: regress: regress-decoder check-local: check-images-py check-decoder check-images check-java \ check-python regress other-tests: check-cpp check-convert check-video check-jpeg tests: check-local check-dbus other-tests .NOTPARALLEL: check-local regress tests @HAVE_DOC_TRUE@docs: $(dist_man_MANS) #dist_doc_DATA #pdf: doc/zbar-manual.pdf #doc/zbar-manual.pdf: $(DOCSOURCES) # $(XMLTO) $(XMLTOFLAGS) -o doc pdf $< @HAVE_DOC_TRUE@html-local: doc/html/index.html @HAVE_DOC_TRUE@doc/html/index.html: $(DOCSOURCES) @HAVE_DOC_TRUE@ $(XMLTO) $(doc_path) $(XMLTOFLAGS) -o doc/html xhtml $< @HAVE_DOC_TRUE@$(dist_man_MANS): $(man_stamp) @HAVE_DOC_TRUE@ @if test ! -f $@ ; then \ @HAVE_DOC_TRUE@ rm -f $(man_stamp) ; \ @HAVE_DOC_TRUE@ $(MAKE) $(AM_MAKEFLAGS) $(man_stamp) ; \ @HAVE_DOC_TRUE@ fi @HAVE_DOC_TRUE@$(man_stamp): $(DOCSOURCES) @HAVE_DOC_TRUE@ @$(mkdir_p) doc/man 2>/dev/null @HAVE_DOC_TRUE@ @rm -f $(man_stamp).tmp @HAVE_DOC_TRUE@ @touch $(man_stamp).tmp @HAVE_DOC_TRUE@ $(XMLTO) $(doc_path) $(XMLTOFLAGS) -o doc/man man $< @HAVE_DOC_TRUE@ @mv $(man_stamp).tmp $(man_stamp) @WIN32_TRUE@%-rc.o: %.rc @WIN32_TRUE@ $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ @WIN32_TRUE@ $(AM_CPPFLAGS) $(CPPFLAGS) -o $@ $< @WIN32_TRUE@%-rc.lo: %.rc @WIN32_TRUE@ $(LIBTOOL) --tag=RC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ @WIN32_TRUE@ --mode=compile $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ @WIN32_TRUE@ $(AM_CPPFLAGS) $(CPPFLAGS) -o $@ $< # install to tmp dest and run NSIS to generate installer @WIN32_TRUE@dist-nsis: html-local @WIN32_TRUE@ test ! -e _nsis || test -d _nsis && rm -rf _nsis @WIN32_TRUE@ mkdir _nsis @WIN32_TRUE@ tmpinst=`cd _nsis && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ @WIN32_TRUE@ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR=$$tmpinst prefix=/ install @WIN32_TRUE@ cp zbar/.libs/libzbar-0.dll.def _nsis/lib/libzbar-0.def @WIN32_TRUE@ cp -r doc/html _nsis/share/doc/zbar/ @WIN32_TRUE@ $(WINEXEC) lib.exe /machine:x86 /def:_nsis/lib/libzbar-0.def /out:_nsis/lib/libzbar-0.lib @WIN32_TRUE@ cd _nsis && \ @WIN32_TRUE@ makensis -NOCD -V2 -DVERSION=$(VERSION) $(builddir)/zbar.nsi @WIN32_TRUE@ @ls -l _nsis/zbar-$(VERSION)-setup.exe archive: git archive --format=tar --prefix=zbar-$(VERSION)/ -o zbar-$(VERSION).tar $(VERSION) bzip2 zbar-$(VERSION).tar .PHONY : $(PHONY) archive dist-hook: rm -f $(distdir)/debian $(distdir)/travis # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zbar-0.23/LICENSE.md0000664000175000017500000006333613471225716010746 00000000000000### GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] ### Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. ### TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION **0.** This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. **1.** You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. **2.** You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: - **a)** The modified work must itself be a software library. - **b)** You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. - **c)** You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. - **d)** If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. **3.** You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. **4.** You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. **5.** A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. **6.** As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: - **a)** Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) - **b)** Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. - **c)** Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. - **d)** If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. - **e)** Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. **7.** You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: - **a)** Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. - **b)** Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. **8.** You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. **9.** You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. **10.** Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. **11.** If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. **12.** If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. **13.** The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. **14.** If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. **NO WARRANTY** **15.** BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. **16.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ### END OF TERMS AND CONDITIONS ### How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. one line to give the library's name and an idea of what it does. Copyright (C) year name of author This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. signature of Ty Coon, 1 April 1990 Ty Coon, President of Vice That's all there is to it!zbar-0.23/configure0000775000175000017500000312045713471606246011253 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for zbar 0.23. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: mchehab+samsung@kernel.org about your system, including $0: any error possibly output before this message. Then $0: install a modern shell, or manually run the script $0: under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='zbar' PACKAGE_TARNAME='zbar' PACKAGE_VERSION='0.23' PACKAGE_STRING='zbar 0.23' PACKAGE_BUGREPORT='mchehab+samsung@kernel.org' PACKAGE_URL='' ac_unique_file="zbar/scanner.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_header_list= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS HAVE_JAVA_FALSE HAVE_JAVA_TRUE JAVA_CFLAGS HAVE_JAVA_UNIT_FALSE HAVE_JAVA_UNIT_TRUE CLASSPATH JAVA JAR HAVE_JAVAH_FALSE HAVE_JAVAH_TRUE JAVAH JAVAC JAVA_HOME HAVE_QT_FALSE HAVE_QT_TRUE QT_LIBS QT_CFLAGS MOC HAVE_INTROSPECTION_FALSE HAVE_INTROSPECTION_TRUE INTROSPECTION_MAKEFILE INTROSPECTION_LIBS INTROSPECTION_CFLAGS INTROSPECTION_TYPELIBDIR INTROSPECTION_GIRDIR INTROSPECTION_GENERATE INTROSPECTION_COMPILER INTROSPECTION_SCANNER HAVE_PYGTK2_FALSE HAVE_PYGTK2_TRUE HAVE_PYTHON_FALSE HAVE_PYTHON_TRUE PYGTK_LIBS PYGTK_CFLAGS pkgpyexecdir pyexecdir pkgpythondir pythondir PYTHON_PLATFORM PYTHON_EXEC_PREFIX PYTHON_PREFIX PYTHON_VERSION PYTHON PYGTK_DEFS PYGTK_CODEGEN PYGTK_H2DEF PYTHON_LIBS PYTHON_CFLAGS PYTHON_CONFIG HAVE_GTK_FALSE HAVE_GTK_TRUE GTK_CFLAGS GTK_LIBS GTK2_LIBS GTK2_CFLAGS GTK3_LIBS GTK3_CFLAGS GTK_VERSION_MAJOR GLIB_GENMARSHAL HAVE_NPAPI_FALSE HAVE_NPAPI_TRUE NPAPI_LIBS NPAPI_CFLAGS HAVE_MAGICK_FALSE HAVE_MAGICK_TRUE GM_LIBS GM_CFLAGS MAGICK_LIBS MAGICK_CFLAGS HAVE_JPEG_FALSE HAVE_JPEG_TRUE DBUS_CONFDIR HAVE_DBUS_FALSE HAVE_DBUS_TRUE DBUS_LIBS DBUS_CFLAGS HAVE_XV_FALSE HAVE_XV_TRUE XV_LIBS HAVE_XSHM_FALSE HAVE_XSHM_TRUE HAVE_X_FALSE HAVE_X_TRUE X_EXTRA_LIBS X_LIBS X_PRE_LIBS X_CFLAGS XMKMF XSHM_LIBS WITH_DIRECTSHOW_FALSE WITH_DIRECTSHOW_TRUE HAVE_LIBV4L_FALSE HAVE_LIBV4L_TRUE HAVE_V4L2_FALSE HAVE_V4L2_TRUE HAVE_V4L1_FALSE HAVE_V4L1_TRUE HAVE_VIDEO_FALSE HAVE_VIDEO_TRUE V4L2_LIBS V4L2_CFLAGS HAVE_DOC_FALSE HAVE_DOC_TRUE HAVE_POLL_FALSE HAVE_POLL_TRUE LIBQT_EXTRA_LDFLAGS LTLIBICONV LIBICONV ENABLE_PDF417_FALSE ENABLE_PDF417_TRUE ENABLE_PDF417 ENABLE_SQCODE_FALSE ENABLE_SQCODE_TRUE ENABLE_SQCODE ENABLE_QRCODE_FALSE ENABLE_QRCODE_TRUE ENABLE_QRCODE ENABLE_I25_FALSE ENABLE_I25_TRUE ENABLE_I25 ENABLE_CODABAR_FALSE ENABLE_CODABAR_TRUE ENABLE_CODABAR ENABLE_CODE39_FALSE ENABLE_CODE39_TRUE ENABLE_CODE39 ENABLE_CODE93_FALSE ENABLE_CODE93_TRUE ENABLE_CODE93 ENABLE_CODE128_FALSE ENABLE_CODE128_TRUE ENABLE_CODE128 ENABLE_DATABAR_FALSE ENABLE_DATABAR_TRUE ENABLE_DATABAR ENABLE_EAN_FALSE ENABLE_EAN_TRUE ENABLE_EAN XMLTOFLAGS XMLTO PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG CXXCPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX WIN32_FALSE WIN32_TRUE LIBOBJS ALLOCA AM_CXXFLAGS AM_CFLAGS AM_CPPFLAGS ZQT_LIB_VERSION ZGTK_LIB_VERSION RELDATE LIB_VERSION RC CPP LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL OBJDUMP DLLTOOL AS AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_shared enable_static with_pic enable_fast_install with_aix_soname enable_dependency_tracking with_gnu_ld with_sysroot enable_libtool_lock enable_codes enable_rpath with_libiconv_prefix enable_static_qt enable_pthread enable_doc enable_video with_directshow with_x with_xshm with_xv with_dbus with_dbusconfdir with_jpeg with_imagemagick with_graphicsmagick with_npapi with_gtk with_gir with_python enable_introspection with_qt with_qt5 with_java enable_assert ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS LT_SYS_LIBRARY_PATH CPP CXX CXXFLAGS CCC CXXCPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR XMLTO XMLTOFLAGS V4L2_CFLAGS V4L2_LIBS XSHM_LIBS XMKMF XV_LIBS DBUS_CFLAGS DBUS_LIBS MAGICK_CFLAGS MAGICK_LIBS GM_CFLAGS GM_LIBS NPAPI_CFLAGS NPAPI_LIBS GLIB_GENMARSHAL GTK_VERSION_MAJOR GTK3_CFLAGS GTK3_LIBS GTK2_CFLAGS GTK2_LIBS PYTHON_CONFIG PYTHON_CFLAGS PYTHON_LIBS PYGTK_H2DEF PYGTK_CODEGEN PYGTK_DEFS PYTHON PYGTK_CFLAGS PYGTK_LIBS MOC QT_CFLAGS QT_LIBS JAVA_HOME JAVAC JAVAH JAR JAVA CLASSPATH JAVA_CFLAGS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures zbar 0.23 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/zbar] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of zbar 0.23:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-libtool-lock avoid locking (might break parallel builds) --enable-codes=SYMS select symbologies to compile [default=ean,databar,code128,code93,code39,codabar,i25,qrcode,sqcode] --disable-rpath do not hardcode runtime library paths --enable-static-qt Produce a static library for libzbarcam-qt --disable-pthread omit support for threaded applications --disable-doc disable building docs --disable-video exclude video scanner features --enable-introspection=[no/auto/yes] Enable introspection for this build --disable-assert turn off assertions Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-directshow compile directshow driver on windows instead of vfw, available only when video support is enabled --with-x use the X Window System --without-xshm disable support for X shared memory extension --without-xv disable support for XVideo extension --without-dbus disable support for dbus --with-dbusconfdir=PATH path to D-Bus config directory --without-jpeg disable support for JPEG image conversions --without-imagemagick disable support for scanning images with ImageMagick --with-graphicsmagick use GraphicsMagick alternative to ImageMagick --with-npapi enable support for Firefox/Mozilla/OpenOffice plugin --with-gtk Specify support for GTK. Valid values are: no, auto, gtk2, gtk3 (default is gtk2) --with-gir enable support for GObject Introspection --with-python Specify support for Python. Valid values are: no, auto, python2, python3 (default is python2). Please notice that PYTHON var, if especified, takes precedence. --without-qt disable support for Qt widget --without-qt5 disable support for Qt5 widget. if --with-qt, it will seek only for Qt4 --without-java disable support for Java interface Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory LT_SYS_LIBRARY_PATH User-defined run-time library search path. CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path XMLTO location of xmlto, used for optional documentation generation XMLTOFLAGS additional arguments for xmlto V4L2_CFLAGS C compiler flags for V4L2, overriding pkg-config V4L2_LIBS linker flags for V4L2, overriding pkg-config XSHM_LIBS linker flags for X shared memory extension XMKMF Path to xmkmf, Makefile generator for X Window System XV_LIBS linker flags for XVideo extension DBUS_CFLAGS C compiler flags for DBUS, overriding pkg-config DBUS_LIBS linker flags for DBUS, overriding pkg-config MAGICK_CFLAGS C compiler flags for MAGICK, overriding pkg-config MAGICK_LIBS linker flags for MAGICK, overriding pkg-config GM_CFLAGS C compiler flags for GM, overriding pkg-config GM_LIBS linker flags for GM, overriding pkg-config NPAPI_CFLAGS C compiler flags for NPAPI, overriding pkg-config NPAPI_LIBS linker flags for NPAPI, overriding pkg-config GLIB_GENMARSHAL full path to glib-genmarshal GTK_VERSION_MAJOR GTK3_CFLAGS C compiler flags for GTK3, overriding pkg-config GTK3_LIBS linker flags for GTK3, overriding pkg-config GTK2_CFLAGS C compiler flags for GTK2, overriding pkg-config GTK2_LIBS linker flags for GTK2, overriding pkg-config PYTHON_CONFIG full path to python-config program PYTHON_CFLAGS compiler flags for building python extensions PYTHON_LIBS linker flags for building python extensions PYGTK_H2DEF full path to PyGTK h2def.py module (python2 only) PYGTK_CODEGEN full path to pygtk-codegen program (python2 only) PYGTK_DEFS directory where PyGTK definitions may be found (python2 only) PYTHON the Python interpreter PYGTK_CFLAGS C compiler flags for PYGTK, overriding pkg-config PYGTK_LIBS linker flags for PYGTK, overriding pkg-config MOC full path to Qt moc program QT_CFLAGS C compiler flags for QT, overriding pkg-config QT_LIBS linker flags for QT, overriding pkg-config JAVA_HOME root location of JDK JAVAC location of Java language compiler JAVAH location of Java header generator JAR location of Java archive tool JAVA location of Java application launcher CLASSPATH Java class path (include JUnit to run java tests) JAVA_CFLAGS compiler flags for building JNI extensions Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF zbar configure 0.23 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* 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_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ----------------------------------------- ## ## Report this to mchehab+samsung@kernel.org ## ## ----------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_c_find_intX_t LINENO BITS VAR # ----------------------------------- # Finds a signed integer type with width BITS, setting cache variable VAR # accordingly. ac_fn_c_find_intX_t () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5 $as_echo_n "checking for int$2_t... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. for ac_type in int$2_t 'int' 'long int' \ 'long long int' 'short int' 'signed char'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default enum { N = $2 / 2 - 1 }; int main () { static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default enum { N = $2 / 2 - 1 }; int main () { static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1) < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else case $ac_type in #( int$2_t) : eval "$3=yes" ;; #( *) : eval "$3=\$ac_type" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if eval test \"x\$"$3"\" = x"no"; then : else break fi done fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_find_intX_t # ac_fn_c_find_uintX_t LINENO BITS VAR # ------------------------------------ # Finds an unsigned integer type with width BITS, setting cache variable VAR # accordingly. ac_fn_c_find_uintX_t () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 $as_echo_n "checking for uint$2_t... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ 'unsigned long long int' 'unsigned short int' 'unsigned char'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : case $ac_type in #( uint$2_t) : eval "$3=yes" ;; #( *) : eval "$3=\$ac_type" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if eval test \"x\$"$3"\" = x"no"; then : else break fi done fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_find_uintX_t # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES # ---------------------------------------------------- # Tries to find if the field MEMBER exists in type AGGR, after including # INCLUDES, setting cache variable VAR accordingly. ac_fn_c_check_member () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 $as_echo_n "checking for $2.$3... " >&6; } if eval \${$4+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int main () { static $2 ac_aggr; if (ac_aggr.$3) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int main () { static $2 ac_aggr; if (sizeof ac_aggr.$3) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" else eval "$4=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$4 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by zbar $as_me 0.23, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` 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 || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi as_fn_append ac_header_list " stdlib.h" as_fn_append ac_header_list " unistd.h" as_fn_append ac_header_list " sys/param.h" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in config "$srcdir"/config; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.16' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # 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" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='zbar' VERSION='0.23' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi ac_config_headers="$ac_config_headers include/config.h" case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.6' macro_revision='2.4.6' ltmain=$ac_aux_dir/ltmain.sh # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case $ECHO in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 $as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } case $?:`cat confinc.out 2>/dev/null` in #( '0:this is the am__doit target') : case $s in #( BSD) : am__include='.include' am__quote='"' ;; #( *) : am__include='include' am__quote='' ;; esac ;; #( *) : ;; esac if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 $as_echo "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_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 $# != 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 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&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 if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n "$lt_cv_sys_max_cmd_len"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) if test yes = "$GCC"; then reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 $as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 $as_echo_n "checking for a working dd... " >&6; } if ${ac_cv_path_lt_DD+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then ac_path_lt_DD_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in dd; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi $ac_path_lt_DD_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_lt_DD"; then : fi else ac_cv_path_lt_DD=$lt_DD fi rm -f conftest.i conftest2.i conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 $as_echo "$ac_cv_path_lt_DD" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 $as_echo_n "checking how to truncate binary pipes... " >&6; } if ${lt_cv_truncate_bin+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 $as_echo "$lt_cv_truncate_bin" >&6; } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[012][,.]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=yes enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AS="${ac_tool_prefix}as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 $as_echo "$AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AS="as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac test -z "$AS" && AS=as test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$OBJDUMP" && OBJDUMP=objdump # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac else pic_mode=default fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac else enable_fast_install=yes fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. if test "${with_aix_soname+set}" = set; then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$with_aix_soname else if ${lt_cv_with_aix_soname+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 $as_echo "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o func_cc_basename $compiler cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/${ac_tool_prefix}file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test no = "$hard_links"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) export_dynamic_flag_spec='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct=no hardcode_direct_absolute=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' $wl-bernotok' allow_undefined_flag=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test yes = "$GCC"; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' else archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; osf3*) if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test yes = "$GCC"; then wlarc='$wl' archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='$wl-z,text' allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen=shl_load else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen=dlopen else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi fi fi fi fi fi ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report what library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC ac_config_commands="$ac_config_commands libtool" # Only expand once: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. set dummy ${ac_tool_prefix}windres; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RC"; then ac_cv_prog_RC="$RC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RC="${ac_tool_prefix}windres" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RC=$ac_cv_prog_RC if test -n "$RC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5 $as_echo "$RC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RC"; then ac_ct_RC=$RC # Extract the first word of "windres", so it can be a program name with args. set dummy windres; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RC"; then ac_cv_prog_ac_ct_RC="$ac_ct_RC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RC="windres" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RC=$ac_cv_prog_ac_ct_RC if test -n "$ac_ct_RC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5 $as_echo "$ac_ct_RC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RC" = x; then RC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RC=$ac_ct_RC fi else RC="$ac_cv_prog_RC" fi # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC compiler_RC=$CC func_cc_basename $compiler cc_basename=$func_cc_basename_result lt_cv_prog_compiler_c_o_RC=yes if test -n "$compiler"; then : fi GCC=$lt_save_GCC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' LIB_VERSION=3:0:3 RELDATE=2017-04-11 ZGTK_LIB_VERSION=0:2:0 ZQT_LIB_VERSION=1:2:1 cat >>confdefs.h <<_ACEOF #define ZBAR_VERSION_MAJOR `echo "$PACKAGE_VERSION" | sed -e 's/\..*$//'` _ACEOF cat >>confdefs.h <<_ACEOF #define ZBAR_VERSION_MINOR `echo "$PACKAGE_VERSION" | sed -e 's/^[^\.]*\.\([^\.]*\).*/\1/'` _ACEOF cat >>confdefs.h <<_ACEOF #define ZBAR_VERSION_PATCH `echo "$PACKAGE_VERSION" | sed -e 's/^[^\.]*\.[^\.]*\.*//' | sed s,^$,0,` _ACEOF cur=`echo "$LIB_VERSION" | sed -e 's/:.*$//'` age=`echo "$LIB_VERSION" | sed -e 's/^.*://'` cat >>confdefs.h <<_ACEOF #define LIB_VERSION_MAJOR $(( $cur - $age )) _ACEOF cat >>confdefs.h <<_ACEOF #define LIB_VERSION_MINOR $age _ACEOF cat >>confdefs.h <<_ACEOF #define LIB_VERSION_REVISION `echo "$LIB_VERSION" | sed -e 's/^[^:]*:\([^:]*\):.*$/\1/'` _ACEOF AM_CPPFLAGS="-I\$(top_srcdir)/include" AM_CFLAGS="-Wall -Wno-parentheses" AM_CXXFLAGS="$AM_CFLAGS" case $host_os in *cygwin* | *mingw* | *uwin* | *djgpp* | *ems* ) win32="yes" with_dbus="no" $as_echo "#define _WIN32_WINNT 0x0500" >>confdefs.h ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_working_alloca_h=yes else ac_cv_working_alloca_h=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 $as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } if ${ac_cv_func_alloca_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ void *alloca (size_t); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_alloca_works=yes else ac_cv_func_alloca_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 $as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext $as_echo "#define C_ALLOCA 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then : ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 $as_echo "$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } if ${ac_cv_c_stack_direction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_c_stack_direction=0 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int find_stack_direction (int *addr, int depth) { int dir, dummy = 0; if (! addr) addr = &dummy; *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; dir = depth ? find_stack_direction (addr, depth - 1) : 0; return dir + dummy; } int main (int argc, char **argv) { return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_stack_direction=1 else ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 $as_echo "$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5 $as_echo_n "checking for error_at_line... " >&6; } if ${ac_cv_lib_error_at_line+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { error_at_line (0, 0, "", 0, "an error occurred"); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_error_at_line=yes else ac_cv_lib_error_at_line=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5 $as_echo "$ac_cv_lib_error_at_line" >&6; } if test $ac_cv_lib_error_at_line = no; then case " $LIBOBJS " in *" error.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS error.$ac_objext" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } if ${ac_cv_sys_largefile_source+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* for off_t */ #include int main () { int (*fp) (FILE *, off_t, int) = fseeko; return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_sys_largefile_source=no; break fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGEFILE_SOURCE 1 #include /* for off_t */ #include int main () { int (*fp) (FILE *, off_t, int) = fseeko; return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_sys_largefile_source=1; break fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_cv_sys_largefile_source=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 $as_echo "$ac_cv_sys_largefile_source" >&6; } case $ac_cv_sys_largefile_source in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source _ACEOF ;; esac rm -rf conftest* # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug # in glibc 2.1.3, but that breaks too many other things. # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. if test $ac_cv_sys_largefile_source != unknown; then $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h fi for ac_header in arpa/inet.h libintl.h malloc.h mntent.h netdb.h netinet/in.h shadow.h sys/file.h sys/mount.h sys/param.h sys/socket.h sys/statfs.h sys/statvfs.h sys/vfs.h unistd.h values.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ;; * ) win32="no" ;; esac if test "x$win32" = "xyes"; then WIN32_TRUE= WIN32_FALSE='#' else WIN32_TRUE='#' WIN32_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_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 $# != 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 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&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 if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi func_stripname_cnf () { case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;; esac } # func_stripname_cnf if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu else _lt_caught_CXX_error=yes fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds reload_flag_CXX=$reload_flag reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC func_cc_basename $compiler cc_basename=$func_cc_basename_result if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec_CXX='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. no_undefined_flag_CXX='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' $wl-bernotok' allow_undefined_flag_CXX=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=yes file_list_spec_CXX='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' export_dynamic_flag_spec_CXX='$wl--export-all-symbols' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec_CXX='' fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" if test yes != "$lt_cv_apple_cc_single_mod"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi else ld_shlibs_CXX=no fi ;; os2*) hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_minus_L_CXX=yes allow_undefined_flag_CXX=unsupported shrext_cmds=.dll archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes_CXX=yes ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='$wl-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' export_dynamic_flag_spec_CXX='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='$wl-E' whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then no_undefined_flag_CXX=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='$wl-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='$wl-z,text' allow_undefined_flag_CXX='$wl-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='$wl-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test no = "$ld_shlibs_CXX" && can_build_shared=no GCC_CXX=$GXX LD_CXX=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX=$prev$p else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX=$prev$p else postdeps_CXX="${postdeps_CXX} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test no = "$pre_test_object_deps_done"; then if test -z "$predep_objects_CXX"; then predep_objects_CXX=$p else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX=$p else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi lt_prog_compiler_pic_CXX='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static_CXX='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test no = "$hard_links"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ;; esac ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test no = "$ld_shlibs_CXX" && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no else lt_cv_archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec_CXX='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test yes = "$hardcode_automatic_CXX"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct_CXX" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" && test no != "$hardcode_minus_L_CXX"; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test relink = "$hardcode_action_CXX" || test yes = "$inherit_rpath_CXX"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi for ac_prog in xmlto do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_XMLTO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$XMLTO"; then ac_cv_prog_XMLTO="$XMLTO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_XMLTO="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi XMLTO=$ac_cv_prog_XMLTO if test -n "$XMLTO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLTO" >&5 $as_echo "$XMLTO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$XMLTO" && break done test -n "$XMLTO" || XMLTO=":" # Check whether --enable-codes was given. if test "${enable_codes+set}" = set; then : enableval=$enable_codes; else enable_codes="ean,databar,code128,code93,code39,codabar,i25,qrcode,sqcode" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build EAN symbologies" >&5 $as_echo_n "checking whether to build EAN symbologies... " >&6; } enable_ean="no" case $enable_codes in #( *ean* | *all*) : enable_ean="yes" enabled_codes="$enabled_codes ean" $as_echo "#define ENABLE_EAN 1" >>confdefs.h ENABLE_EAN=1 ;; #( *) : disabled_codes="$disabled_codes ean" $as_echo "#define ENABLE_EAN 0" >>confdefs.h ENABLE_EAN=0 ;; esac if test "x$enable_ean" = "xyes"; then ENABLE_EAN_TRUE= ENABLE_EAN_FALSE='#' else ENABLE_EAN_TRUE='#' ENABLE_EAN_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ean" >&5 $as_echo "$enable_ean" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build DataBar symbology" >&5 $as_echo_n "checking whether to build DataBar symbology... " >&6; } enable_databar="no" case $enable_codes in #( *databar* | *all*) : enable_databar="yes" enabled_codes="$enabled_codes databar" $as_echo "#define ENABLE_DATABAR 1" >>confdefs.h ENABLE_DATABAR=1 ;; #( *) : disabled_codes="$disabled_codes databar" $as_echo "#define ENABLE_DATABAR 0" >>confdefs.h ENABLE_DATABAR=0 ;; esac if test "x$enable_databar" = "xyes"; then ENABLE_DATABAR_TRUE= ENABLE_DATABAR_FALSE='#' else ENABLE_DATABAR_TRUE='#' ENABLE_DATABAR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_databar" >&5 $as_echo "$enable_databar" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Code 128 symbology" >&5 $as_echo_n "checking whether to build Code 128 symbology... " >&6; } enable_code128="no" case $enable_codes in #( *code128* | *all*) : enable_code128="yes" enabled_codes="$enabled_codes code128" $as_echo "#define ENABLE_CODE128 1" >>confdefs.h ENABLE_CODE128=1 ;; #( *) : disabled_codes="$disabled_codes code128" $as_echo "#define ENABLE_CODE128 0" >>confdefs.h ENABLE_CODE128=0 ;; esac if test "x$enable_code128" = "xyes"; then ENABLE_CODE128_TRUE= ENABLE_CODE128_FALSE='#' else ENABLE_CODE128_TRUE='#' ENABLE_CODE128_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_code128" >&5 $as_echo "$enable_code128" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Code 93 symbology" >&5 $as_echo_n "checking whether to build Code 93 symbology... " >&6; } enable_code93="no" case $enable_codes in #( *code93* | *all*) : enable_code93="yes" enabled_codes="$enabled_codes code93" $as_echo "#define ENABLE_CODE93 1" >>confdefs.h ENABLE_CODE93=1 ;; #( *) : disabled_codes="$disabled_codes code93" $as_echo "#define ENABLE_CODE93 0" >>confdefs.h ENABLE_CODE93=0 ;; esac if test "x$enable_code93" = "xyes"; then ENABLE_CODE93_TRUE= ENABLE_CODE93_FALSE='#' else ENABLE_CODE93_TRUE='#' ENABLE_CODE93_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_code93" >&5 $as_echo "$enable_code93" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Code 39 symbology" >&5 $as_echo_n "checking whether to build Code 39 symbology... " >&6; } enable_code39="no" case $enable_codes in #( *code39* | *all*) : enable_code39="yes" enabled_codes="$enabled_codes code39" $as_echo "#define ENABLE_CODE39 1" >>confdefs.h ENABLE_CODE39=1 ;; #( *) : disabled_codes="$disabled_codes code39" $as_echo "#define ENABLE_CODE39 0" >>confdefs.h ENABLE_CODE39=0 ;; esac if test "x$enable_code39" = "xyes"; then ENABLE_CODE39_TRUE= ENABLE_CODE39_FALSE='#' else ENABLE_CODE39_TRUE='#' ENABLE_CODE39_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_code39" >&5 $as_echo "$enable_code39" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Codabar symbology" >&5 $as_echo_n "checking whether to build Codabar symbology... " >&6; } enable_codabar="no" case $enable_codes in #( *codabar* | *all*) : enable_codabar="yes" enabled_codes="$enabled_codes codabar" $as_echo "#define ENABLE_CODABAR 1" >>confdefs.h ENABLE_CODABAR=1 ;; #( *) : disabled_codes="$disabled_codes codabar" $as_echo "#define ENABLE_CODABAR 0" >>confdefs.h ENABLE_CODABAR=0 ;; esac if test "x$enable_codabar" = "xyes"; then ENABLE_CODABAR_TRUE= ENABLE_CODABAR_FALSE='#' else ENABLE_CODABAR_TRUE='#' ENABLE_CODABAR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_codabar" >&5 $as_echo "$enable_codabar" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Interleaved 2 of 5 symbology" >&5 $as_echo_n "checking whether to build Interleaved 2 of 5 symbology... " >&6; } enable_i25="no" case $enable_codes in #( *i25* | *all*) : enable_i25="yes" enabled_codes="$enabled_codes i25" $as_echo "#define ENABLE_I25 1" >>confdefs.h ENABLE_I25=1 ;; #( *) : disabled_codes="$disabled_codes i25" $as_echo "#define ENABLE_I25 0" >>confdefs.h ENABLE_I25=0 ;; esac if test "x$enable_i25" = "xyes"; then ENABLE_I25_TRUE= ENABLE_I25_FALSE='#' else ENABLE_I25_TRUE='#' ENABLE_I25_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_i25" >&5 $as_echo "$enable_i25" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build QR Code" >&5 $as_echo_n "checking whether to build QR Code... " >&6; } enable_qrcode="no" case $enable_codes in #( *qrcode* | *all*) : enable_qrcode="yes" enabled_codes="$enabled_codes qrcode" $as_echo "#define ENABLE_QRCODE 1" >>confdefs.h ENABLE_QRCODE=1 ;; #( *) : disabled_codes="$disabled_codes qrcode" $as_echo "#define ENABLE_QRCODE 0" >>confdefs.h ENABLE_QRCODE=0 ;; esac if test "x$enable_qrcode" = "xyes"; then ENABLE_QRCODE_TRUE= ENABLE_QRCODE_FALSE='#' else ENABLE_QRCODE_TRUE='#' ENABLE_QRCODE_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_qrcode" >&5 $as_echo "$enable_qrcode" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build SQ Code" >&5 $as_echo_n "checking whether to build SQ Code... " >&6; } enable_sqcode="no" case $enable_codes in #( *sqcode* | *all*) : enable_sqcode="yes" enabled_codes="$enabled_codes sqcode" $as_echo "#define ENABLE_SQCODE 1" >>confdefs.h ENABLE_SQCODE=1 ;; #( *) : disabled_codes="$disabled_codes sqcode" $as_echo "#define ENABLE_SQCODE 0" >>confdefs.h ENABLE_SQCODE=0 ;; esac if test "x$enable_sqcode" = "xyes"; then ENABLE_SQCODE_TRUE= ENABLE_SQCODE_FALSE='#' else ENABLE_SQCODE_TRUE='#' ENABLE_SQCODE_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_sqcode" >&5 $as_echo "$enable_sqcode" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build PDF417 symbology (incomplete)" >&5 $as_echo_n "checking whether to build PDF417 symbology (incomplete)... " >&6; } enable_pdf417="no" case $enable_codes in #( *pdf417* | *all*) : enable_pdf417="yes" enabled_codes="$enabled_codes pdf417" $as_echo "#define ENABLE_PDF417 1" >>confdefs.h ENABLE_PDF417=1 ;; #( *) : disabled_codes="$disabled_codes pdf417" $as_echo "#define ENABLE_PDF417 0" >>confdefs.h ENABLE_PDF417=0 ;; esac if test "x$enable_pdf417" = "xyes"; then ENABLE_PDF417_TRUE= ENABLE_PDF417_FALSE='#' else ENABLE_PDF417_TRUE='#' ENABLE_PDF417_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_pdf417" >&5 $as_echo "$enable_pdf417" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 $as_echo_n "checking for library containing clock_gettime... " >&6; } if ${ac_cv_search_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF for ac_lib in '' rt pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_clock_gettime=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_clock_gettime+:} false; then : break fi done if ${ac_cv_search_clock_gettime+:} false; then : else ac_cv_search_clock_gettime=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 $as_echo "$ac_cv_search_clock_gettime" >&6; } ac_res=$ac_cv_search_clock_gettime if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${acl_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$acl_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${acl_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 $as_echo_n "checking for shared library run path origin... " >&6; } if ${acl_cv_rpath+:} false; then : $as_echo_n "(cached) " >&6 else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 $as_echo "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; : else enable_rpath=yes fi acl_libdirstem=lib acl_libdirstem2= case "$host_os" in solaris*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 $as_echo_n "checking for 64-bit host... " >&6; } if ${gl_cv_solaris_64bit+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef _LP64 sixtyfour bits #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "sixtyfour bits" >/dev/null 2>&1; then : gl_cv_solaris_64bit=yes else gl_cv_solaris_64bit=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 $as_echo "$gl_cv_solaris_64bit" >&6; } if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then : withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi fi LIBICONV= LTLIBICONV= INCICONV= LIBICONV_PREFIX= HAVE_LIBICONV= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } if ${am_cv_func_iconv+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 $as_echo "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 $as_echo_n "checking for working iconv... " >&6; } if ${am_cv_func_iconv_works+:} false; then : $as_echo_n "(cached) " >&6 else am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi am_cv_func_iconv_works=no for ac_iconv_const in '' 'const'; do if test "$cross_compiling" = yes; then : case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef ICONV_CONST # define ICONV_CONST $ac_iconv_const #endif int main () { int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\263"; char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 2; iconv_close (cd_ascii_to_88591); } } /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ { iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; ICONV_CONST char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 4; iconv_close (cd_88591_to_utf8); } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 8; iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) result |= 16; return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : am_cv_func_iconv_works=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi test "$am_cv_func_iconv_works" = no || break done LIBS="$am_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 $as_echo "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then $as_echo "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 $as_echo_n "checking how to link with libiconv... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 $as_echo "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi if test "$am_cv_func_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 $as_echo_n "checking for iconv declaration... " >&6; } if ${am_cv_proto_iconv+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : am_cv_proto_iconv_arg1="" else am_cv_proto_iconv_arg1="const" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_proto_iconv" >&5 $as_echo " $am_cv_proto_iconv" >&6; } cat >>confdefs.h <<_ACEOF #define ICONV_CONST $am_cv_proto_iconv_arg1 _ACEOF fi # Check whether --enable-static_qt was given. if test "${enable_static_qt+set}" = set; then : enableval=$enable_static_qt; fi if test x$enable_static_qt = xyes; then : LIBQT_EXTRA_LDFLAGS="-static" fi for ac_header in poll.h do : ac_fn_c_check_header_mongrel "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default" if test "x$ac_cv_header_poll_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_POLL_H 1 _ACEOF have_poll="yes" else have_poll="no" fi done if test "x$have_poll" = "xyes"; then HAVE_POLL_TRUE= HAVE_POLL_FALSE='#' else HAVE_POLL_TRUE='#' HAVE_POLL_FALSE= fi # Check whether --enable-pthread was given. if test "${enable_pthread+set}" = set; then : enableval=$enable_pthread; else if test "x$win32" = "xno"; then : enable_pthread="yes" else enable_pthread="no" fi fi if test "x$enable_pthread" != "xno"; then : for ac_header in pthread.h do : ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" if test "x$ac_cv_header_pthread_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PTHREAD_H 1 _ACEOF else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "test for pthread support failed! configure --disable-pthread to skip threaded support. See \`config.log' for more details" "$LINENO" 5; } fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 $as_echo_n "checking for pthread_create in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_create (); int main () { return pthread_create (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_create=yes else ac_cv_lib_pthread_pthread_create=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF LIBS="-lpthread $LIBS" else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "unable to link against -lpthread, although you appear to have pthread.h? set LDFLAGS and/or LIBS to help the linker, or configure --disable-pthread to skip threaded support. See \`config.log' for more details" "$LINENO" 5; } fi $as_echo "#define __USE_UNIX98 1" >>confdefs.h fi # Check whether --enable-doc was given. if test "${enable_doc+set}" = set; then : enableval=$enable_doc; else enable_doc="yes" fi if test "x$enable_doc" != "xno"; then HAVE_DOC_TRUE= HAVE_DOC_FALSE='#' else HAVE_DOC_TRUE='#' HAVE_DOC_FALSE= fi # Check whether --enable-video was given. if test "${enable_video+set}" = set; then : enableval=$enable_video; else enable_video="yes" fi # Check whether --with-directshow was given. if test "${with_directshow+set}" = set; then : withval=$with_directshow; else with_directshow="no" fi have_v4l1="no" have_v4l2="no" have_libv4l="no" if test "x$enable_video" = "xno"; then : elif test "x$win32" = "xno"; then : for ac_header in linux/videodev.h do : ac_fn_c_check_header_mongrel "$LINENO" "linux/videodev.h" "ac_cv_header_linux_videodev_h" "$ac_includes_default" if test "x$ac_cv_header_linux_videodev_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LINUX_VIDEODEV_H 1 _ACEOF have_v4l1="yes" fi done for ac_header in linux/videodev2.h do : ac_fn_c_check_header_mongrel "$LINENO" "linux/videodev2.h" "ac_cv_header_linux_videodev2_h" "$ac_includes_default" if test "x$ac_cv_header_linux_videodev2_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LINUX_VIDEODEV2_H 1 _ACEOF have_v4l2="yes" fi done for ac_header in libv4l2.h do : ac_fn_c_check_header_mongrel "$LINENO" "libv4l2.h" "ac_cv_header_libv4l2_h" "$ac_includes_default" if test "x$ac_cv_header_libv4l2_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBV4L2_H 1 _ACEOF have_libv4l="yes" fi done if test "x$have_v4l2" = "xno" && test "x$have_v4l1" = "xno"; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "test for video support failed! rebuild your kernel to include video4linux support or configure --disable-video to skip building video support. See \`config.log' for more details" "$LINENO" 5; } else if test "x$have_v4l2" = "xno"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: v4l2 API not detected, upgrade your kernel!" >&5 $as_echo "$as_me: WARNING: v4l2 API not detected, upgrade your kernel!" >&2;} fi fi else if test "x$with_directshow" != "xno"; then : with_video="directshow" else for ac_header in vfw.h do : ac_fn_c_check_header_compile "$LINENO" "vfw.h" "ac_cv_header_vfw_h" "#include " if test "x$ac_cv_header_vfw_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VFW_H 1 _ACEOF with_video="vfw" else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "test for VfW video support failed! configure --disable-video to skip building video support. See \`config.log' for more details" "$LINENO" 5; } fi done fi fi if test "x$have_libv4l" = "xyes"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for V4L2" >&5 $as_echo_n "checking for V4L2... " >&6; } if test -n "$V4L2_CFLAGS"; then pkg_cv_V4L2_CFLAGS="$V4L2_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libv4l2\""; } >&5 ($PKG_CONFIG --exists --print-errors "libv4l2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_V4L2_CFLAGS=`$PKG_CONFIG --cflags "libv4l2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$V4L2_LIBS"; then pkg_cv_V4L2_LIBS="$V4L2_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libv4l2\""; } >&5 ($PKG_CONFIG --exists --print-errors "libv4l2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_V4L2_LIBS=`$PKG_CONFIG --libs "libv4l2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then V4L2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libv4l2" 2>&1` else V4L2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libv4l2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$V4L2_PKG_ERRORS" >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "unable to find libv4l2.so See \`config.log' for more details" "$LINENO" 5; } elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "unable to find libv4l2.so See \`config.log' for more details" "$LINENO" 5; } else V4L2_CFLAGS=$pkg_cv_V4L2_CFLAGS V4L2_LIBS=$pkg_cv_V4L2_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libv4l not detected. Install it to support more cameras!" >&5 $as_echo "$as_me: WARNING: libv4l not detected. Install it to support more cameras!" >&2;} fi if test "x$enable_video" != "xno"; then HAVE_VIDEO_TRUE= HAVE_VIDEO_FALSE='#' else HAVE_VIDEO_TRUE='#' HAVE_VIDEO_FALSE= fi if test "x$have_v4l1" != "xno"; then HAVE_V4L1_TRUE= HAVE_V4L1_FALSE='#' else HAVE_V4L1_TRUE='#' HAVE_V4L1_FALSE= fi if test "x$have_v4l2" != "xno"; then HAVE_V4L2_TRUE= HAVE_V4L2_FALSE='#' else HAVE_V4L2_TRUE='#' HAVE_V4L2_FALSE= fi if test "x$have_libv4l" != "xno"; then HAVE_LIBV4L_TRUE= HAVE_LIBV4L_FALSE='#' else HAVE_LIBV4L_TRUE='#' HAVE_LIBV4L_FALSE= fi if test "x$with_directshow" != "xno"; then WITH_DIRECTSHOW_TRUE= WITH_DIRECTSHOW_FALSE='#' else WITH_DIRECTSHOW_TRUE='#' WITH_DIRECTSHOW_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 $as_echo_n "checking for X... " >&6; } # Check whether --with-x was given. if test "${with_x+set}" = set; then : withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl dylib la dll; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /usr/lib64 | /lib | /lib64) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R7 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # We can compile using X headers with no special include directory. ac_x_includes= else for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.i conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { XrmInitialize () ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else LIBS=$ac_save_LIBS for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl dylib la dll; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no";; #( *) # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 $as_echo "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 $as_echo "libraries $x_libraries, headers $x_includes" >&6; } fi if test "x$win32" != "xno"; then : have_x="no" else if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 $as_echo_n "checking whether -R must be followed by a space... " >&6; } ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" ac_xsave_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } X_LIBS="$X_LIBS -R $x_libraries" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 $as_echo "neither works" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_c_werror_flag=$ac_xsave_c_werror_flag LIBS=$ac_xsave_LIBS fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn Johnson says this is needed for Ultrix, if the X # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XOpenDisplay (); int main () { return XOpenDisplay (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_dnet_ntoa=yes else ac_cv_lib_dnet_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_stub_dnet_ntoa=yes else ac_cv_lib_dnet_stub_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" if test "x$ac_cv_func_gethostbyname" = xyes; then : fi if test $ac_cv_func_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } if ${ac_cv_lib_nsl_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyname=yes else ac_cv_lib_nsl_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; } if ${ac_cv_lib_bsd_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bsd_gethostbyname=yes else ac_cv_lib_bsd_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says Simon Leinen: it contains gethostby* # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" if test "x$ac_cv_func_connect" = xyes; then : fi if test $ac_cv_func_connect = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 $as_echo_n "checking for connect in -lsocket... " >&6; } if ${ac_cv_lib_socket_connect+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char connect (); int main () { return connect (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_connect=yes else ac_cv_lib_socket_connect=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 $as_echo "$ac_cv_lib_socket_connect" >&6; } if test "x$ac_cv_lib_socket_connect" = xyes; then : X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi fi # Guillermo Gomez says -lposix is necessary on A/UX. ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" if test "x$ac_cv_func_remove" = xyes; then : fi if test $ac_cv_func_remove = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 $as_echo_n "checking for remove in -lposix... " >&6; } if ${ac_cv_lib_posix_remove+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char remove (); int main () { return remove (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_posix_remove=yes else ac_cv_lib_posix_remove=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 $as_echo "$ac_cv_lib_posix_remove" >&6; } if test "x$ac_cv_lib_posix_remove" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" if test "x$ac_cv_func_shmat" = xyes; then : fi if test $ac_cv_func_shmat = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 $as_echo_n "checking for shmat in -lipc... " >&6; } if ${ac_cv_lib_ipc_shmat+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shmat (); int main () { return shmat (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ipc_shmat=yes else ac_cv_lib_ipc_shmat=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 $as_echo "$ac_cv_lib_ipc_shmat" >&6; } if test "x$ac_cv_lib_ipc_shmat" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. ac_save_LDFLAGS=$LDFLAGS test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char IceConnectionNumber (); int main () { return IceConnectionNumber (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ICE_IceConnectionNumber=yes else ac_cv_lib_ICE_IceConnectionNumber=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then : X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi LDFLAGS=$ac_save_LDFLAGS fi fi if test "x$have_x" = "xyes"; then HAVE_X_TRUE= HAVE_X_FALSE='#' else HAVE_X_TRUE='#' HAVE_X_FALSE= fi if test "x$XSHM_LIBS" = "x"; then : XSHM_LIBS="-lXext" fi # Check whether --with-xshm was given. if test "${with_xshm+set}" = set; then : withval=$with_xshm; else with_xshm="check" fi if test "x$with_xshm" != "xno"; then : for ac_header in X11/extensions/XShm.h do : ac_fn_c_check_header_compile "$LINENO" "X11/extensions/XShm.h" "ac_cv_header_X11_extensions_XShm_h" "#include #include #include " if test "x$ac_cv_header_X11_extensions_XShm_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_X11_EXTENSIONS_XSHM_H 1 _ACEOF with_xshm="yes" else if test "x$with_xshm" = "xcheck"; then : with_xshm="no" else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "test for X shared memory extension failed! install the X shared memory extension, specify --x-includes or configure --without-xshm to disable the extension See \`config.log' for more details" "$LINENO" 5; } fi fi done if test "x$with_xshm" != "xno"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShmQueryVersion in -lXext" >&5 $as_echo_n "checking for XShmQueryVersion in -lXext... " >&6; } if ${ac_cv_lib_Xext_XShmQueryVersion+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXext "$X_LIBS" "$X_PRE_LIBS" -lX11 "$X_EXTRA_LIBS" "$XSHM_LIBS" $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XShmQueryVersion (); int main () { return XShmQueryVersion (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xext_XShmQueryVersion=yes else ac_cv_lib_Xext_XShmQueryVersion=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShmQueryVersion" >&5 $as_echo "$ac_cv_lib_Xext_XShmQueryVersion" >&6; } if test "x$ac_cv_lib_Xext_XShmQueryVersion" = xyes; then : with_xshm="yes" else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "unable to find XShmQueryVersion in $XSHM_LIBS! specify XSHM_LIBS or configure --without-xshm to disable the extension See \`config.log' for more details" "$LINENO" 5; } fi fi fi if test "x$with_xshm" = "xyes"; then HAVE_XSHM_TRUE= HAVE_XSHM_FALSE='#' else HAVE_XSHM_TRUE='#' HAVE_XSHM_FALSE= fi if test "x$XV_LIBS" = "x"; then : XV_LIBS="-lXv" fi # Check whether --with-xv was given. if test "${with_xv+set}" = set; then : withval=$with_xv; else with_xv="check" fi if test "x$with_xv" != "xno"; then : for ac_header in X11/extensions/Xvlib.h do : ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xvlib.h" "ac_cv_header_X11_extensions_Xvlib_h" "#include " if test "x$ac_cv_header_X11_extensions_Xvlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_X11_EXTENSIONS_XVLIB_H 1 _ACEOF with_xv="yes" else if test "x$with_xv" = "xcheck"; then : with_xv="no" else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "test for XVideo extension failed! install the XVideo extension, specify --x-includes or configure --without-xv to disable the extension See \`config.log' for more details" "$LINENO" 5; } fi fi done if test "x$with_xv" != "xno"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XvQueryExtension in -lXv" >&5 $as_echo_n "checking for XvQueryExtension in -lXv... " >&6; } if ${ac_cv_lib_Xv_XvQueryExtension+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXv "$X_LIBS" "$X_PRE_LIBS" -lX11 "$X_EXTRA_LIBS" "$XV_LIBS" $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XvQueryExtension (); int main () { return XvQueryExtension (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xv_XvQueryExtension=yes else ac_cv_lib_Xv_XvQueryExtension=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xv_XvQueryExtension" >&5 $as_echo "$ac_cv_lib_Xv_XvQueryExtension" >&6; } if test "x$ac_cv_lib_Xv_XvQueryExtension" = xyes; then : with_xv="yes" else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "unable to find XvQueryExtension in $XV_LIBS! specify XV_LIBS or configure --without-xv to disable the extension See \`config.log' for more details" "$LINENO" 5; } fi fi fi if test "x$with_xv" = "xyes"; then HAVE_XV_TRUE= HAVE_XV_FALSE='#' else HAVE_XV_TRUE='#' HAVE_XV_FALSE= fi # Check whether --with-dbus was given. if test "${with_dbus+set}" = set; then : withval=$with_dbus; else with_dbus="check" fi if test "x$with_dbus" != "xno"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBUS" >&5 $as_echo_n "checking for DBUS... " >&6; } if test -n "$DBUS_CFLAGS"; then pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1 >= 1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "dbus-1 >= 1.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$DBUS_LIBS"; then pkg_cv_DBUS_LIBS="$DBUS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1 >= 1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "dbus-1 >= 1.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "dbus-1 >= 1.0" 2>&1` else DBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "dbus-1 >= 1.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DBUS_PKG_ERRORS" >&5 have_dbus="no" elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } have_dbus="no" else DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS DBUS_LIBS=$pkg_cv_DBUS_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_dbus="yes" fi if test "x$have_dbus$with_dbus" = "xnoyes"; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "DBus development libraries not found See \`config.log' for more details" "$LINENO" 5; } else with_dbus="$have_dbus" fi fi if test "x$with_dbus" = "xyes"; then HAVE_DBUS_TRUE= HAVE_DBUS_FALSE='#' else HAVE_DBUS_TRUE='#' HAVE_DBUS_FALSE= fi if test "x$with_dbus" = "xyes"; then : CPPFLAGS="$CPPFLAGS $DBUS_CFLAGS" $as_echo "#define HAVE_DBUS 1" >>confdefs.h # Check whether --with-dbusconfdir was given. if test "${with_dbusconfdir+set}" = set; then : withval=$with_dbusconfdir; path_dbusconf=$withval else path_dbusconf="`$PKG_CONFIG --variable=sysconfdir dbus-1`" fi if test -z "$path_dbusconf"; then : DBUS_CONFDIR="$sysconfdir/dbus-1/system.d" else DBUS_CONFDIR="$path_dbusconf/dbus-1/system.d" fi fi # Check whether --with-jpeg was given. if test "${with_jpeg+set}" = set; then : withval=$with_jpeg; else with_jpeg="check" fi have_jpeg="maybe" if test "x$with_jpeg" != "xno"; then : for ac_header in jpeglib.h do : ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default" if test "x$ac_cv_header_jpeglib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_JPEGLIB_H 1 _ACEOF else have_jpeg="no" fi done ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default" if test "x$ac_cv_header_jerror_h" = xyes; then : else have_jpeg="no" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_read_header in -ljpeg" >&5 $as_echo_n "checking for jpeg_read_header in -ljpeg... " >&6; } if ${ac_cv_lib_jpeg_jpeg_read_header+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljpeg $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char jpeg_read_header (); int main () { return jpeg_read_header (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_jpeg_jpeg_read_header=yes else ac_cv_lib_jpeg_jpeg_read_header=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_read_header" >&5 $as_echo "$ac_cv_lib_jpeg_jpeg_read_header" >&6; } if test "x$ac_cv_lib_jpeg_jpeg_read_header" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBJPEG 1 _ACEOF LIBS="-ljpeg $LIBS" else have_jpeg="no" fi if test "x$have_jpeg" != "xno"; then : with_jpeg="yes" elif test "x$with_jpeg" = "xyes"; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "unable to find libjpeg! ensure CFLAGS/LDFLAGS are set appropriately or configure --without-jpeg See \`config.log' for more details" "$LINENO" 5; } else with_jpeg="no" fi fi if test "x$with_jpeg" = "xyes"; then HAVE_JPEG_TRUE= HAVE_JPEG_FALSE='#' else HAVE_JPEG_TRUE='#' HAVE_JPEG_FALSE= fi # Check whether --with-imagemagick was given. if test "${with_imagemagick+set}" = set; then : withval=$with_imagemagick; else with_imagemagick="check" fi # Check whether --with-graphicsmagick was given. if test "${with_graphicsmagick+set}" = set; then : withval=$with_graphicsmagick; else with_graphicsmagick="check" fi magick="UnknownMagick" have_IM="maybe" if test "x$with_imagemagick" = "xno"; then : elif test "x$with_imagemagick" = "xyes" || \ test "x$with_graphicsmagick" != "xyes"; then : looked_for="ImageMagick >= 6.2.6" pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAGICK" >&5 $as_echo_n "checking for MAGICK... " >&6; } if test -n "$MAGICK_CFLAGS"; then pkg_cv_MAGICK_CFLAGS="$MAGICK_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"MagickWand >= 6.2.6\""; } >&5 ($PKG_CONFIG --exists --print-errors "MagickWand >= 6.2.6") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_MAGICK_CFLAGS=`$PKG_CONFIG --cflags "MagickWand >= 6.2.6" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$MAGICK_LIBS"; then pkg_cv_MAGICK_LIBS="$MAGICK_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"MagickWand >= 6.2.6\""; } >&5 ($PKG_CONFIG --exists --print-errors "MagickWand >= 6.2.6") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_MAGICK_LIBS=`$PKG_CONFIG --libs "MagickWand >= 6.2.6" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then MAGICK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "MagickWand >= 6.2.6" 2>&1` else MAGICK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "MagickWand >= 6.2.6" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$MAGICK_PKG_ERRORS" >&5 saved_error=$MAGICK_PKG_ERRORS pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAGICK" >&5 $as_echo_n "checking for MAGICK... " >&6; } if test -n "$MAGICK_CFLAGS"; then pkg_cv_MAGICK_CFLAGS="$MAGICK_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Wand >= 6.2.6\""; } >&5 ($PKG_CONFIG --exists --print-errors "Wand >= 6.2.6") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_MAGICK_CFLAGS=`$PKG_CONFIG --cflags "Wand >= 6.2.6" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$MAGICK_LIBS"; then pkg_cv_MAGICK_LIBS="$MAGICK_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Wand >= 6.2.6\""; } >&5 ($PKG_CONFIG --exists --print-errors "Wand >= 6.2.6") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_MAGICK_LIBS=`$PKG_CONFIG --libs "Wand >= 6.2.6" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then MAGICK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "Wand >= 6.2.6" 2>&1` else MAGICK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "Wand >= 6.2.6" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$MAGICK_PKG_ERRORS" >&5 have_IM="no" elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } have_IM="no" else MAGICK_CFLAGS=$pkg_cv_MAGICK_CFLAGS MAGICK_LIBS=$pkg_cv_MAGICK_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } MAGICK_VERSION=`$PKG_CONFIG Wand --modversion` fi elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } saved_error=$MAGICK_PKG_ERRORS pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAGICK" >&5 $as_echo_n "checking for MAGICK... " >&6; } if test -n "$MAGICK_CFLAGS"; then pkg_cv_MAGICK_CFLAGS="$MAGICK_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Wand >= 6.2.6\""; } >&5 ($PKG_CONFIG --exists --print-errors "Wand >= 6.2.6") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_MAGICK_CFLAGS=`$PKG_CONFIG --cflags "Wand >= 6.2.6" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$MAGICK_LIBS"; then pkg_cv_MAGICK_LIBS="$MAGICK_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Wand >= 6.2.6\""; } >&5 ($PKG_CONFIG --exists --print-errors "Wand >= 6.2.6") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_MAGICK_LIBS=`$PKG_CONFIG --libs "Wand >= 6.2.6" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then MAGICK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "Wand >= 6.2.6" 2>&1` else MAGICK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "Wand >= 6.2.6" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$MAGICK_PKG_ERRORS" >&5 have_IM="no" elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } have_IM="no" else MAGICK_CFLAGS=$pkg_cv_MAGICK_CFLAGS MAGICK_LIBS=$pkg_cv_MAGICK_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } MAGICK_VERSION=`$PKG_CONFIG Wand --modversion` fi else MAGICK_CFLAGS=$pkg_cv_MAGICK_CFLAGS MAGICK_LIBS=$pkg_cv_MAGICK_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } MAGICK_VERSION=`$PKG_CONFIG MagickWand --modversion` fi if test "x$have_IM" != "xno"; then : magick="ImageMagick" { $as_echo "$as_me:${as_lineno-$LINENO}: trying ImageMagick version $MAGICK_VERSION" >&5 $as_echo "$as_me: trying ImageMagick version $MAGICK_VERSION" >&6;} CPPFLAGS_save="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $MAGICK_CFLAGS" ac_fn_c_check_header_mongrel "$LINENO" "wand/MagickWand.h" "ac_cv_header_wand_MagickWand_h" "$ac_includes_default" if test "x$ac_cv_header_wand_MagickWand_h" = xyes; then : have_IM="yes" else have_IM="broken" fi if test "x$have_IM" = "xbroken"; then : ac_fn_c_check_header_mongrel "$LINENO" "MagickWand/MagickWand.h" "ac_cv_header_MagickWand_MagickWand_h" "$ac_includes_default" if test "x$ac_cv_header_MagickWand_MagickWand_h" = xyes; then : have_IM="yes" have_IM7="yes" else have_IM="broken" fi fi CPPFLAGS="$CPPFLAGS_save" fi fi have_GM="maybe" if test "x$have_IM" = "xyes"; then : elif test "x$with_graphicsmagick" = "xno"; then : elif test "x$with_graphicsmagick" = "xyes" || \ test "x$with_imagemagick" = "xcheck"; then : if test "x$looked_for" = "x"; then : looked_for="GraphicsMagick" else looked_for="$looked_for or GraphicsMagick" fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GM" >&5 $as_echo_n "checking for GM... " >&6; } if test -n "$GM_CFLAGS"; then pkg_cv_GM_CFLAGS="$GM_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"GraphicsMagickWand\""; } >&5 ($PKG_CONFIG --exists --print-errors "GraphicsMagickWand") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GM_CFLAGS=`$PKG_CONFIG --cflags "GraphicsMagickWand" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GM_LIBS"; then pkg_cv_GM_LIBS="$GM_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"GraphicsMagickWand\""; } >&5 ($PKG_CONFIG --exists --print-errors "GraphicsMagickWand") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GM_LIBS=`$PKG_CONFIG --libs "GraphicsMagickWand" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "GraphicsMagickWand" 2>&1` else GM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "GraphicsMagickWand" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GM_PKG_ERRORS" >&5 have_GM="no" if test "x$saved_error" = "x"; then : saved_error=$MAGICK_PKG_ERRORS fi elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } have_GM="no" if test "x$saved_error" = "x"; then : saved_error=$MAGICK_PKG_ERRORS fi else GM_CFLAGS=$pkg_cv_GM_CFLAGS GM_LIBS=$pkg_cv_GM_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_GM="yes" magick="GraphicsMagick" MAGICK_CFLAGS="$MAGICK_CFLAGS $GM_CFLAGS" MAGICK_LIBS="$MAGICK_LIBS $GM_LIBS" MAGICK_VERSION=`$PKG_CONFIG GraphicsMagickWand --modversion` fi fi if test "x$have_IM" = "xbroken" && test "x$have_GM" = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your ImageMagick install is broken, using GraphicsMagick instead" >&5 $as_echo "$as_me: WARNING: Your ImageMagick install is broken, using GraphicsMagick instead" >&2;} fi if test "x$have_IM" = "xyes" || test "x$have_GM" = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: using $magick version $MAGICK_VERSION" >&5 $as_echo "$as_me: using $magick version $MAGICK_VERSION" >&6;} elif test "x$with_imagemagick" = "xno" && \ test "x$with_graphicsmagick" != "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: image scanning disabled -- zbarimg will *not* be built" >&5 $as_echo "$as_me: image scanning disabled -- zbarimg will *not* be built" >&6;} elif test "x$have_IM" = "xbroken"; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "$magick package found but wand/MagickWand.h not installed?! this is a problem with your $magick install, please try again after resolving the inconsistency or installing GraphicsMagick alternative... See \`config.log' for more details" "$LINENO" 5; } else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Unable to find $looked_for: $saved_error * Ensure that you installed any \"development\" packages for ImageMagick or GraphicsMagick. * Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. * You may set the environment variables MAGICK_CFLAGS and MAGICK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. * To avoid using ImageMagick or GraphicsMagick altogether you may add the --without-imagemagick flag to the configure command; the zbarimg program will *not* be built. See \`config.log' for more details" "$LINENO" 5; } fi if test "x$have_IM" = "xyes"; then : $as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h elif test "x$have_GM" = "xyes"; then : $as_echo "#define HAVE_GRAPHICSMAGICK 1" >>confdefs.h fi if test "x$have_IM7" = "xyes"; then : $as_echo "#define HAVE_IMAGEMAGICK7 1" >>confdefs.h fi if test "x$have_IM" = "xyes" || test "x$have_GM" = "xyes"; then HAVE_MAGICK_TRUE= HAVE_MAGICK_FALSE='#' else HAVE_MAGICK_TRUE='#' HAVE_MAGICK_FALSE= fi # Check whether --with-npapi was given. if test "${with_npapi+set}" = set; then : withval=$with_npapi; else with_npapi="no" fi if test "x$with_npapi" != "xno"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NPAPI" >&5 $as_echo_n "checking for NPAPI... " >&6; } if test -n "$NPAPI_CFLAGS"; then pkg_cv_NPAPI_CFLAGS="$NPAPI_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"firefox-plugin\""; } >&5 ($PKG_CONFIG --exists --print-errors "firefox-plugin") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_NPAPI_CFLAGS=`$PKG_CONFIG --cflags "firefox-plugin" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$NPAPI_LIBS"; then pkg_cv_NPAPI_LIBS="$NPAPI_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"firefox-plugin\""; } >&5 ($PKG_CONFIG --exists --print-errors "firefox-plugin") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_NPAPI_LIBS=`$PKG_CONFIG --libs "firefox-plugin" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then NPAPI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "firefox-plugin" 2>&1` else NPAPI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "firefox-plugin" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$NPAPI_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (firefox-plugin) were not met: $NPAPI_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables NPAPI_CFLAGS and NPAPI_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables NPAPI_CFLAGS and NPAPI_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else NPAPI_CFLAGS=$pkg_cv_NPAPI_CFLAGS NPAPI_LIBS=$pkg_cv_NPAPI_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi NPAPI_VERSION=`$PKG_CONFIG firefox-plugin --modversion` { $as_echo "$as_me:${as_lineno-$LINENO}: using firefox-plugin version $NPAPI_VERSION" >&5 $as_echo "$as_me: using firefox-plugin version $NPAPI_VERSION" >&6;} fi if test "x$with_npapi" = "xyes"; then HAVE_NPAPI_TRUE= HAVE_NPAPI_FALSE='#' else HAVE_NPAPI_TRUE='#' HAVE_NPAPI_FALSE= fi # Check whether --with-gtk was given. if test "${with_gtk+set}" = set; then : withval=$with_gtk; if test "x$with_gtk" != "xno" && test "x$with_gtk" != "xauto" && test "x$with_gtk" != "xgtk2" && test "x$with_gtk" != "xgtk3"; then : echo "Invalid value for --with-gtk. Falling back to 'no'" with_gtk="xno" fi else with_gtk="gtk2" fi if test "x$with_gtk" == "xgtk3" || test "x$with_gtk" == "xauto"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK3" >&5 $as_echo_n "checking for GTK3... " >&6; } if test -n "$GTK3_CFLAGS"; then pkg_cv_GTK3_CFLAGS="$GTK3_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk+-3.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK3_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GTK3_LIBS"; then pkg_cv_GTK3_LIBS="$GTK3_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk+-3.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK3_LIBS=`$PKG_CONFIG --libs "gtk+-3.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTK3_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-3.0" 2>&1` else GTK3_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-3.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GTK3_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (gtk+-3.0) were not met: $GTK3_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GTK3_CFLAGS and GTK3_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GTK3_CFLAGS and GTK3_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else GTK3_CFLAGS=$pkg_cv_GTK3_CFLAGS GTK3_LIBS=$pkg_cv_GTK3_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal` GTK_VERSION=`$PKG_CONFIG gtk+-3.0 --modversion` { $as_echo "$as_me:${as_lineno-$LINENO}: using GTK+ version $GTK_VERSION" >&5 $as_echo "$as_me: using GTK+ version $GTK_VERSION" >&6;} GTK_VERSION_MAJOR=3.0 with_gtk="gtk3" GTK_CFLAGS=$GTK3_CFLAGS GTK_LIBS=$GTK3_LIBS fi fi if test "x$with_gtk" == "xgtk2" || test "x$with_gtk" == "xauto"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK2" >&5 $as_echo_n "checking for GTK2... " >&6; } if test -n "$GTK2_CFLAGS"; then pkg_cv_GTK2_CFLAGS="$GTK2_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK2_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GTK2_LIBS"; then pkg_cv_GTK2_LIBS="$GTK2_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK2_LIBS=`$PKG_CONFIG --libs "gtk+-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTK2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-2.0" 2>&1` else GTK2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GTK2_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (gtk+-2.0) were not met: $GTK2_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GTK2_CFLAGS and GTK2_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GTK2_CFLAGS and GTK2_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else GTK2_CFLAGS=$pkg_cv_GTK2_CFLAGS GTK2_LIBS=$pkg_cv_GTK2_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal` GTK_VERSION=`$PKG_CONFIG gtk+-2.0 --modversion` { $as_echo "$as_me:${as_lineno-$LINENO}: using GTK+ version $GTK_VERSION" >&5 $as_echo "$as_me: using GTK+ version $GTK_VERSION" >&6;} GTK_VERSION_MAJOR=2.0 with_gtk="gtk2" GTK_CFLAGS=$GTK2_CFLAGS GTK_LIBS=$GTK2_LIBS fi fi # GTK not found if test "x$with_gtk" = "xauto"]; then : with_gtk="no" fi if test "x$with_gtk" != "xno"; then HAVE_GTK_TRUE= HAVE_GTK_FALSE='#' else HAVE_GTK_TRUE='#' HAVE_GTK_FALSE= fi # Check whether --with-gir was given. if test "${with_gir+set}" = set; then : withval=$with_gir; else with_gir="yes" fi # Check whether --with-python was given. if test "${with_python+set}" = set; then : withval=$with_python; if test "x$with_python" != "xno" && test "x$with_python" != "xauto" && test "x$with_python" != "xpython2" && test "x$with_python" != "xpython3"; then : echo "Invalid value for --with-python. Falling back to 'no'" with_python="xno" fi else with_python="python2" fi if test -z "$PYTHON"; then : if test "x$with_python" == "xauto"; then : for ac_prog in python3 python2 python do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 $as_echo "$PYTHON" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PYTHON" && break done test -n "$PYTHON" || PYTHON=":" else if test "x$with_python" == "xpython3"; then : for ac_prog in python3 python do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 $as_echo "$PYTHON" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PYTHON" && break done test -n "$PYTHON" || PYTHON=":" else if test "x$with_python" == "xpython2"; then : for ac_prog in python2 python do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 $as_echo "$PYTHON" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PYTHON" && break done test -n "$PYTHON" || PYTHON=":" else with_python="no" fi fi fi else with_python="auto" fi if test "x$with_python" != "xno"; then : if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 2.7.0" >&5 $as_echo_n "checking whether $PYTHON version is >= 2.7.0... " >&6; } prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '2.7.0'.split('.'))) + [0, 0, 0] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex)" if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5 ($PYTHON -c "$prog") >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "Python interpreter is too old" "$LINENO" 5 fi am_display_PYTHON=$PYTHON else # Otherwise, try each interpreter until we find one that satisfies # VERSION. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 2.7.0" >&5 $as_echo_n "checking for a Python interpreter with version >= 2.7.0... " >&6; } if ${am_cv_pathless_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else for am_cv_pathless_PYTHON in python python2 python3 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do test "$am_cv_pathless_PYTHON" = none && break prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '2.7.0'.split('.'))) + [0, 0, 0] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex)" if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5 ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then : break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5 $as_echo "$am_cv_pathless_PYTHON" >&6; } # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. if test "$am_cv_pathless_PYTHON" = none; then PYTHON=: else # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args. set dummy $am_cv_pathless_PYTHON; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 $as_echo "$PYTHON" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi am_display_PYTHON=$am_cv_pathless_PYTHON fi if test "$PYTHON" = :; then as_fn_error $? "no suitable Python interpreter found" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 $as_echo_n "checking for $am_display_PYTHON version... " >&6; } if ${am_cv_python_version+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 $as_echo "$am_cv_python_version" >&6; } PYTHON_VERSION=$am_cv_python_version PYTHON_PREFIX='${prefix}' PYTHON_EXEC_PREFIX='${exec_prefix}' { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 $as_echo_n "checking for $am_display_PYTHON platform... " >&6; } if ${am_cv_python_platform+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 $as_echo "$am_cv_python_platform" >&6; } PYTHON_PLATFORM=$am_cv_python_platform # Just factor out some code duplication. am_python_setup_sysconfig="\ import sys # Prefer sysconfig over distutils.sysconfig, for better compatibility # with python 3.x. See automake bug#10227. try: import sysconfig except ImportError: can_use_sysconfig = 0 else: can_use_sysconfig = 1 # Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: # try: from platform import python_implementation if python_implementation() == 'CPython' and sys.version[:3] == '2.7': can_use_sysconfig = 0 except ImportError: pass" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 $as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } if ${am_cv_python_pythondir+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$prefix" = xNONE then am_py_prefix=$ac_default_prefix else am_py_prefix=$prefix fi am_cv_python_pythondir=`$PYTHON -c " $am_python_setup_sysconfig if can_use_sysconfig: sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) else: from distutils import sysconfig sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') sys.stdout.write(sitedir)"` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` ;; *) case $am_py_prefix in /usr|/System*) ;; *) am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5 $as_echo "$am_cv_python_pythondir" >&6; } pythondir=$am_cv_python_pythondir pkgpythondir=\${pythondir}/$PACKAGE { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 $as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } if ${am_cv_python_pyexecdir+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$exec_prefix" = xNONE then am_py_exec_prefix=$am_py_prefix else am_py_exec_prefix=$exec_prefix fi am_cv_python_pyexecdir=`$PYTHON -c " $am_python_setup_sysconfig if can_use_sysconfig: sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) else: from distutils import sysconfig sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') sys.stdout.write(sitedir)"` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` ;; *) case $am_py_exec_prefix in /usr|/System*) ;; *) am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 $as_echo "$am_cv_python_pyexecdir" >&6; } pyexecdir=$am_cv_python_pyexecdir pkgpyexecdir=\${pyexecdir}/$PACKAGE fi fi if test "x$PYTHON_VERSION" != "x" && test "x$with_python" != "xno"; then : PYTHON_VERSION_MAJOR="`echo $PYTHON_VERSION | cut -d'.' -f 1`" if test "x$PYTHON_CFLAGS" != "x"; then : elif test "x$PYTHON_CONFIG" != "x" && test -x "$PYTHON_CONFIG"; then : PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags` elif test -x "$PYTHON-config"; then : PYTHON_CFLAGS=`$PYTHON-config --cflags` else PYTHON_CFLAGS=`$PYTHON -c 'import distutils.sysconfig as s, sys; sys.stdout.write(" ".join(s.get_config_vars("CFLAGS")) + " -I"+s.get_python_inc() + " -I"+s.get_python_inc(plat_specific=True))'` fi CPPFLAGS_save="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS" ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default" if test "x$ac_cv_header_Python_h" = xyes; then : else as_fn_error $? "Python module enabled, but unable to compile Python.h. Install the development package for python-$am_cv_python_version, or configure --without-python to disable the python bindings." "$LINENO" 5 fi CPPFLAGS="$CPPFLAGS_save" if test "x$with_gtk" != "xno"; then : if test "x$PYTHON_VERSION_MAJOR" = "x2"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYGTK" >&5 $as_echo_n "checking for PYGTK... " >&6; } if test -n "$PYGTK_CFLAGS"; then pkg_cv_PYGTK_CFLAGS="$PYGTK_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pygtk-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "pygtk-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PYGTK_CFLAGS=`$PKG_CONFIG --cflags "pygtk-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$PYGTK_LIBS"; then pkg_cv_PYGTK_LIBS="$PYGTK_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pygtk-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "pygtk-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PYGTK_LIBS=`$PKG_CONFIG --libs "pygtk-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then PYGTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "pygtk-2.0" 2>&1` else PYGTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pygtk-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$PYGTK_PKG_ERRORS" >&5 with_pygtk2="no" elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } with_pygtk2="no" else PYGTK_CFLAGS=$pkg_cv_PYGTK_CFLAGS PYGTK_LIBS=$pkg_cv_PYGTK_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } with_pygtk2="yes" fi for ac_prog in pygobject-codegen-2.0 pygtk-codegen-2.0 pygtk-codegen do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PYGTK_CODEGEN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PYGTK_CODEGEN"; then ac_cv_prog_PYGTK_CODEGEN="$PYGTK_CODEGEN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PYGTK_CODEGEN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi PYGTK_CODEGEN=$ac_cv_prog_PYGTK_CODEGEN if test -n "$PYGTK_CODEGEN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYGTK_CODEGEN" >&5 $as_echo "$PYGTK_CODEGEN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PYGTK_CODEGEN" && break done test -n "$PYGTK_CODEGEN" || PYGTK_CODEGEN=":" if test "x$PYGTK_H2DEF" = "x"; then : PYGTK_H2DEF=`$PKG_CONFIG pygtk-2.0 --variable=codegendir`/h2def.py if test -f "$PYGTK_H2DEF"; then : else PYGTK_H2DEF=":" fi fi if test "x$PYGTK_DEFS" = "x"; then : PYGTK_DEFS=`$PKG_CONFIG pygtk-2.0 --variable=defsdir` fi fi fi else with_python="no" fi if test "x$PYTHON_VERSION_MAJOR" != "x2"; then : with_pygtk2="no" fi if test "x$with_python" != "xno"; then HAVE_PYTHON_TRUE= HAVE_PYTHON_FALSE='#' else HAVE_PYTHON_TRUE='#' HAVE_PYTHON_FALSE= fi if test "x$with_pygtk2" != "xno"; then HAVE_PYGTK2_TRUE= HAVE_PYGTK2_FALSE='#' else HAVE_PYGTK2_TRUE='#' HAVE_PYGTK2_FALSE= fi if test "x$with_gir" == "xyes" && test "x$with_gtk" != "xno"; then : # Check whether --enable-introspection was given. if test "${enable_introspection+set}" = set; then : enableval=$enable_introspection; else enable_introspection=auto fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-introspection" >&5 $as_echo_n "checking for gobject-introspection... " >&6; } case $enable_introspection in #( no) : found_introspection="no (disabled, use --enable-introspection to enable)" ;; #( yes) : if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gobject-introspection-1.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : else as_fn_error $? "gobject-introspection-1.0 is not installed" "$LINENO" 5 fi if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0 >= 0.6.7\""; } >&5 ($PKG_CONFIG --exists --print-errors "gobject-introspection-1.0 >= 0.6.7") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then found_introspection=yes else as_fn_error $? "You need to have gobject-introspection >= 0.6.7 installed to build zbar" "$LINENO" 5 fi ;; #( auto) : if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0 >= 0.6.7\""; } >&5 ($PKG_CONFIG --exists --print-errors "gobject-introspection-1.0 >= 0.6.7") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then found_introspection=yes else found_introspection=no fi enable_introspection=$found_introspection ;; #( *) : as_fn_error $? "invalid argument passed to --enable-introspection, should be one of [no/auto/yes]" "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found_introspection" >&5 $as_echo "$found_introspection" >&6; } INTROSPECTION_SCANNER= INTROSPECTION_COMPILER= INTROSPECTION_GENERATE= INTROSPECTION_GIRDIR= INTROSPECTION_TYPELIBDIR= if test "x$found_introspection" = "xyes"; then INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection fi if test "x$found_introspection" = "xyes"; then HAVE_INTROSPECTION_TRUE= HAVE_INTROSPECTION_FALSE='#' else HAVE_INTROSPECTION_TRUE='#' HAVE_INTROSPECTION_FALSE= fi if test "x$found_introspection" = "xyes"; then : INTROSPECTION_TYPELIBDIR=`$PKG_CONFIG --variable=typelibdir --define-variable="libdir=${libdir}" gobject-introspection-1.0` INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir --define-variable="datadir=${datadir}" gobject-introspection-1.0` fi fi if test "x$found_introspection" != "xyes"; then : with_gir="no" fi if test "x$with_gir" = "xyes"; then HAVE_INTROSPECTION_TRUE= HAVE_INTROSPECTION_FALSE='#' else HAVE_INTROSPECTION_TRUE='#' HAVE_INTROSPECTION_FALSE= fi # Check whether --with-qt was given. if test "${with_qt+set}" = set; then : withval=$with_qt; else with_qt="yes" fi # Check whether --with-qt5 was given. if test "${with_qt5+set}" = set; then : withval=$with_qt5; else with_qt5="yes" fi if test "x$have_x" = "xyes"; then : qt_extra="Qt5X11Extras >= 5.0" else qt_extra="" fi if test "x$with_qt" != "xno"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for QT" >&5 $as_echo_n "checking for QT... " >&6; } if test -n "$QT_CFLAGS"; then pkg_cv_QT_CFLAGS="$QT_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core >= 5 Qt5Gui >= 5 Qt5Widgets >= 5.0 \$qt_extra\""; } >&5 ($PKG_CONFIG --exists --print-errors "Qt5Core >= 5 Qt5Gui >= 5 Qt5Widgets >= 5.0 $qt_extra") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_QT_CFLAGS=`$PKG_CONFIG --cflags "Qt5Core >= 5 Qt5Gui >= 5 Qt5Widgets >= 5.0 $qt_extra" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$QT_LIBS"; then pkg_cv_QT_LIBS="$QT_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Core >= 5 Qt5Gui >= 5 Qt5Widgets >= 5.0 \$qt_extra\""; } >&5 ($PKG_CONFIG --exists --print-errors "Qt5Core >= 5 Qt5Gui >= 5 Qt5Widgets >= 5.0 $qt_extra") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_QT_LIBS=`$PKG_CONFIG --libs "Qt5Core >= 5 Qt5Gui >= 5 Qt5Widgets >= 5.0 $qt_extra" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then QT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "Qt5Core >= 5 Qt5Gui >= 5 Qt5Widgets >= 5.0 $qt_extra" 2>&1` else QT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "Qt5Core >= 5 Qt5Gui >= 5 Qt5Widgets >= 5.0 $qt_extra" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$QT_PKG_ERRORS" >&5 with_qt5 = "no" pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for QT" >&5 $as_echo_n "checking for QT... " >&6; } if test -n "$QT_CFLAGS"; then pkg_cv_QT_CFLAGS="$QT_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"QtCore >= 4 QtGui >= 4\""; } >&5 ($PKG_CONFIG --exists --print-errors "QtCore >= 4 QtGui >= 4") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_QT_CFLAGS=`$PKG_CONFIG --cflags "QtCore >= 4 QtGui >= 4" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$QT_LIBS"; then pkg_cv_QT_LIBS="$QT_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"QtCore >= 4 QtGui >= 4\""; } >&5 ($PKG_CONFIG --exists --print-errors "QtCore >= 4 QtGui >= 4") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_QT_LIBS=`$PKG_CONFIG --libs "QtCore >= 4 QtGui >= 4" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then QT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "QtCore >= 4 QtGui >= 4" 2>&1` else QT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "QtCore >= 4 QtGui >= 4" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$QT_PKG_ERRORS" >&5 with_qt="no" elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } with_qt="no" else QT_CFLAGS=$pkg_cv_QT_CFLAGS QT_LIBS=$pkg_cv_QT_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } with_qt5 = "no" pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for QT" >&5 $as_echo_n "checking for QT... " >&6; } if test -n "$QT_CFLAGS"; then pkg_cv_QT_CFLAGS="$QT_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"QtCore >= 4 QtGui >= 4\""; } >&5 ($PKG_CONFIG --exists --print-errors "QtCore >= 4 QtGui >= 4") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_QT_CFLAGS=`$PKG_CONFIG --cflags "QtCore >= 4 QtGui >= 4" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$QT_LIBS"; then pkg_cv_QT_LIBS="$QT_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"QtCore >= 4 QtGui >= 4\""; } >&5 ($PKG_CONFIG --exists --print-errors "QtCore >= 4 QtGui >= 4") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_QT_LIBS=`$PKG_CONFIG --libs "QtCore >= 4 QtGui >= 4" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then QT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "QtCore >= 4 QtGui >= 4" 2>&1` else QT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "QtCore >= 4 QtGui >= 4" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$QT_PKG_ERRORS" >&5 with_qt="no" elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } with_qt="no" else QT_CFLAGS=$pkg_cv_QT_CFLAGS QT_LIBS=$pkg_cv_QT_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi else QT_CFLAGS=$pkg_cv_QT_CFLAGS QT_LIBS=$pkg_cv_QT_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi fi if test "x$with_qt" != "xno"; then : if test "x$with_qt5" != "xno"; then : for ac_prog in moc-qt5 moc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MOC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MOC"; then ac_cv_prog_MOC="$MOC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MOC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MOC=$ac_cv_prog_MOC if test -n "$MOC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOC" >&5 $as_echo "$MOC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$MOC" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: using moc from $MOC" >&5 $as_echo "$as_me: using moc from $MOC" >&6;} QT_VERSION=`$PKG_CONFIG Qt5Gui --modversion` CPPFLAGS="$CPPFLAGS $QT_CPPFLAGS" if test "x$win32" = "xno"; then : CPPFLAGS="$CPPFLAGS -fPIC" fi { $as_echo "$as_me:${as_lineno-$LINENO}: using Qt version $QT_VERSION" >&5 $as_echo "$as_me: using Qt version $QT_VERSION" >&6;} else MOC=`$PKG_CONFIG QtGui --variable=moc_location` { $as_echo "$as_me:${as_lineno-$LINENO}: using moc from $MOC" >&5 $as_echo "$as_me: using moc from $MOC" >&6;} QT_VERSION=`$PKG_CONFIG QtGui --modversion` { $as_echo "$as_me:${as_lineno-$LINENO}: using Qt version $QT_VERSION" >&5 $as_echo "$as_me: using Qt version $QT_VERSION" >&6;} fi fi if test "x$with_qt" = "xyes"; then HAVE_QT_TRUE= HAVE_QT_FALSE='#' else HAVE_QT_TRUE='#' HAVE_QT_FALSE= fi have_java="maybe" # If $JAVA_HOME not defined, try to autodetect it if test -z "$JAVA_HOME"; then : for ac_prog in javac jikes ecj gcj do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_JAVAC+:} false; then : $as_echo_n "(cached) " >&6 else case $JAVAC in [\\/]* | ?:[\\/]*) ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi JAVAC=$ac_cv_path_JAVAC if test -n "$JAVAC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5 $as_echo "$JAVAC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$JAVAC" && break done test -n "$JAVAC" || JAVAC=":" if test ! -z "$JAVAC"; then : JAVA_HOME=$( readlink -f ${JAVAC} | rev | cut -d/ -f3- | rev ) fi fi # If $JAVA_HOME is defined, set JAVA_PATH and JAVAC if test ! -z "$JAVA_HOME"; then : JAVA_PATH="$JAVA_HOME/bin$PATH_SEPARATOR$PATH" if test -z "$JAVAC"; then : for ac_prog in javac jikes ecj gcj do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_JAVAC+:} false; then : $as_echo_n "(cached) " >&6 else case $JAVAC in [\\/]* | ?:[\\/]*) ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $JAVA_PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi JAVAC=$ac_cv_path_JAVAC if test -n "$JAVAC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5 $as_echo "$JAVAC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$JAVAC" && break done test -n "$JAVAC" || JAVAC=":" fi fi # Check whether --with-java was given. if test "${with_java+set}" = set; then : withval=$with_java; else with_java="check" fi JAVAC=${JAVAC/ecj/ecj -1.5} # Javah was obsoleted on Java 8 and removed on Java 11. So, we need to # look strictly at the $JAVA_HOME in order to avoid mixing different versions if test -z "$JAVAH"; then : for ac_prog in javah do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_JAVAH+:} false; then : $as_echo_n "(cached) " >&6 else case $JAVAH in [\\/]* | ?:[\\/]*) ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $JAVA_HOME/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi JAVAH=$ac_cv_path_JAVAH if test -n "$JAVAH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5 $as_echo "$JAVAH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$JAVAH" && break done fi if test "x$JAVAH" != "x"; then HAVE_JAVAH_TRUE= HAVE_JAVAH_FALSE='#' else HAVE_JAVAH_TRUE='#' HAVE_JAVAH_FALSE= fi for ac_prog in jar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_JAR+:} false; then : $as_echo_n "(cached) " >&6 else case $JAR in [\\/]* | ?:[\\/]*) ac_cv_path_JAR="$JAR" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $JAVA_PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi JAR=$ac_cv_path_JAR if test -n "$JAR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5 $as_echo "$JAR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$JAR" && break done test -n "$JAR" || JAR=":" if test "x$JAR" == "x:"; then : have_java="no" fi for ac_prog in java do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_JAVA+:} false; then : $as_echo_n "(cached) " >&6 else case $JAVA in [\\/]* | ?:[\\/]*) ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $JAVA_PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi JAVA=$ac_cv_path_JAVA if test -n "$JAVA"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5 $as_echo "$JAVA" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$JAVA" && break done test -n "$JAVA" || JAVA="/bin/false" if test "x$CLASSPATH" == "x"; then : CLASSPATH="." fi if test -z "$JUNIT_HOME"; then : JUNIT_HOME="/usr/share/java" fi if test -f "$JUNIT_HOME/junit4.jar"; then : JUNIT="$JUNIT_HOME/junit4.jar" else if test -f "$JUNIT_HOME/junit.jar"; then : JUNIT="$JUNIT_HOME/junit.jar" fi fi if test "x$JUNIT" != "x"; then : if test -f "/usr/share/java/hamcrest/all.jar"; then : CLASSPATH="$JUNIT:/usr/share/java/hamcrest/all.jar:$CLASSPATH" with_java_unit="yes" fi else if test -f "/usr/share/java/hamcrest-all.jar"; then : CLASSPATH="$JUNIT:/usr/share/java/hamcrest-all.jar:$CLASSPATH" with_java_unit="yes" fi fi if test "x$with_java_unit" = "xyes"; then HAVE_JAVA_UNIT_TRUE= HAVE_JAVA_UNIT_FALSE='#' else HAVE_JAVA_UNIT_TRUE='#' HAVE_JAVA_UNIT_FALSE= fi if test "x$JAVA_CFLAGS" = "x" && test "x$JAVA_HOME" != "x"; then : JAVA_CFLAGS="-I$JAVA_HOME/include" fi if test -d "$JAVA_HOME/include/linux"; then : JAVA_CFLAGS="$JAVA_CFLAGS -I$JAVA_HOME/include/linux" fi if test "x$with_java" != "xno"; then : CPPFLAGS_save="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $JAVA_CFLAGS" ac_fn_c_check_header_mongrel "$LINENO" "jni.h" "ac_cv_header_jni_h" "$ac_includes_default" if test "x$ac_cv_header_jni_h" = xyes; then : else have_java="no" fi CPPFLAGS="$CPPFLAGS_save" if test "x$have_java" != "xno"; then : with_java="yes" elif test "x$with_java" = "xyes"; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "unable to find Java JNI! ensure CFLAGS are set appropriately or configure --without-java See \`config.log' for more details" "$LINENO" 5; } else with_java="no" fi fi if test "x$with_java" = "xyes"; then HAVE_JAVA_TRUE= HAVE_JAVA_FALSE='#' else HAVE_JAVA_TRUE='#' HAVE_JAVA_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5 $as_echo_n "checking whether to enable assertions... " >&6; } # Check whether --enable-assert was given. if test "${enable_assert+set}" = set; then : enableval=$enable_assert; ac_enable_assert=$enableval if test "x$enableval" = xno; then : $as_echo "#define NDEBUG 1" >>confdefs.h elif test "x$enableval" != xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5 $as_echo "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;} ac_enable_assert=yes fi else ac_enable_assert=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_assert" >&5 $as_echo "$ac_enable_assert" >&6; } for ac_header in errno.h fcntl.h features.h inttypes.h float.h limits.h \ locale.h stddef.h stdlib.h string.h unistd.h sys/types.h sys/stat.h \ sys/ioctl.h sys/time.h sys/times.h sys/ipc.h sys/shm.h sys/mman.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5 $as_echo_n "checking whether sys/types.h defines makedev... " >&6; } if ${ac_cv_header_sys_types_h_makedev+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return makedev(0, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_header_sys_types_h_makedev=yes else ac_cv_header_sys_types_h_makedev=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5 $as_echo "$ac_cv_header_sys_types_h_makedev" >&6; } if test $ac_cv_header_sys_types_h_makedev = no; then ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default" if test "x$ac_cv_header_sys_mkdev_h" = xyes; then : $as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h fi if test $ac_cv_header_sys_mkdev_h = no; then ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default" if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then : $as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if ${ac_cv_header_stdbool_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes else ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t" case $ac_cv_c_int32_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define int32_t $ac_cv_c_int32_t _ACEOF ;; esac ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t" case $ac_cv_c_uint32_t in #( no|yes) ;; #( *) $as_echo "#define _UINT32_T 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define uint32_t $ac_cv_c_uint32_t _ACEOF ;; esac ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t" case $ac_cv_c_uint8_t in #( no|yes) ;; #( *) $as_echo "#define _UINT8_T 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define uint8_t $ac_cv_c_uint8_t _ACEOF ;; esac ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default" if test "x$ac_cv_type_uintptr_t" = xyes; then : $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h else for ac_type in 'unsigned int' 'unsigned long int' \ 'unsigned long long int'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat >>confdefs.h <<_ACEOF #define uintptr_t $ac_type _ACEOF ac_type= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test -z "$ac_type" && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 $as_echo_n "checking for uid_t in sys/types.h... " >&6; } if ${ac_cv_type_uid_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "uid_t" >/dev/null 2>&1; then : ac_cv_type_uid_t=yes else ac_cv_type_uid_t=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 $as_echo "$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then $as_echo "#define uid_t int" >>confdefs.h $as_echo "#define gid_t int" >>confdefs.h fi ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t" case $ac_cv_c_int32_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define int32_t $ac_cv_c_int32_t _ACEOF ;; esac ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t" case $ac_cv_c_int64_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define int64_t $ac_cv_c_int64_t _ACEOF ;; esac ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" if test "x$ac_cv_type_off_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define off_t long int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t" case $ac_cv_c_uint16_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define uint16_t $ac_cv_c_uint16_t _ACEOF ;; esac ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t" case $ac_cv_c_uint32_t in #( no|yes) ;; #( *) $as_echo "#define _UINT32_T 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define uint32_t $ac_cv_c_uint32_t _ACEOF ;; esac ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t" case $ac_cv_c_uint64_t in #( no|yes) ;; #( *) $as_echo "#define _UINT64_T 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define uint64_t $ac_cv_c_uint64_t _ACEOF ;; esac ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t" case $ac_cv_c_uint8_t in #( no|yes) ;; #( *) $as_echo "#define _UINT8_T 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define uint8_t $ac_cv_c_uint8_t _ACEOF ;; esac ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default" if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_RDEV 1 _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac for ac_header in $ac_header_list do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getpagesize do : ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" if test "x$ac_cv_func_getpagesize" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETPAGESIZE 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 $as_echo_n "checking for working mmap... " >&6; } if ${ac_cv_func_mmap_fixed_mapped+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_mmap_fixed_mapped=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ #undef malloc /* Thanks to Mike Haertel and Jim Avera for this test. Here is a matrix of mmap possibilities: mmap private not fixed mmap private fixed at somewhere currently unmapped mmap private fixed at somewhere already mapped mmap shared not fixed mmap shared fixed at somewhere currently unmapped mmap shared fixed at somewhere already mapped For private mappings, we should verify that changes cannot be read() back from the file, nor mmap's back from the file at a different address. (There have been systems where private was not correctly implemented like the infamous i386 svr4.0, and systems where the VM page cache was not coherent with the file system buffer cache like early versions of FreeBSD and possibly contemporary NetBSD.) For shared mappings, we should conversely verify that changes get propagated back to all the places they're supposed to be. Grep wants private fixed already mapped. The main things grep needs to know about mmap are: * does it exist and is it safe to write into the mmap'd area * how to use it (BSD variants) */ #include #include #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H char *malloc (); #endif /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ # ifdef HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE # else /* no EXEC_PAGESIZE */ # ifdef NBPG # define getpagesize() NBPG * CLSIZE # ifndef CLSIZE # define CLSIZE 1 # endif /* no CLSIZE */ # else /* no NBPG */ # ifdef NBPC # define getpagesize() NBPC # else /* no NBPC */ # ifdef PAGESIZE # define getpagesize() PAGESIZE # endif /* PAGESIZE */ # endif /* no NBPC */ # endif /* no NBPG */ # endif /* no EXEC_PAGESIZE */ # else /* no HAVE_SYS_PARAM_H */ # define getpagesize() 8192 /* punt totally */ # endif /* no HAVE_SYS_PARAM_H */ # endif /* no _SC_PAGESIZE */ #endif /* no HAVE_GETPAGESIZE */ int main () { char *data, *data2, *data3; const char *cdata2; int i, pagesize; int fd, fd2; pagesize = getpagesize (); /* First, make a file with some known garbage in it. */ data = (char *) malloc (pagesize); if (!data) return 1; for (i = 0; i < pagesize; ++i) *(data + i) = rand (); umask (0); fd = creat ("conftest.mmap", 0600); if (fd < 0) return 2; if (write (fd, data, pagesize) != pagesize) return 3; close (fd); /* Next, check that the tail of a page is zero-filled. File must have non-zero length, otherwise we risk SIGBUS for entire page. */ fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); if (fd2 < 0) return 4; cdata2 = ""; if (write (fd2, cdata2, 1) != 1) return 5; data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); if (data2 == MAP_FAILED) return 6; for (i = 0; i < pagesize; ++i) if (*(data2 + i)) return 7; close (fd2); if (munmap (data2, pagesize)) return 8; /* Next, try to mmap the file at a fixed address which already has something else allocated at it. If we can, also make sure that we see the same garbage. */ fd = open ("conftest.mmap", O_RDWR); if (fd < 0) return 9; if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) return 10; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) return 11; /* Finally, make sure that changes to the mapped area do not percolate back to the file as seen by read(). (This is a bug on some variants of i386 svr4.0.) */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; data3 = (char *) malloc (pagesize); if (!data3) return 12; if (read (fd, data3, pagesize) != pagesize) return 13; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) return 14; close (fd); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_mmap_fixed_mapped=yes else ac_cv_func_mmap_fixed_mapped=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } if test $ac_cv_func_mmap_fixed_mapped = yes; then $as_echo "#define HAVE_MMAP 1" >>confdefs.h fi rm -f conftest.mmap conftest.txt for ac_func in alarm clock_gettime floor getcwd gettimeofday localeconv memchr memmove memset modf munmap pow select setenv sqrt strcasecmp strchr strdup strerror strrchr strstr strtol strtoul malloc realloc do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ac_config_commands="$ac_config_commands doc/version.xml" ac_config_commands="$ac_config_commands doc/reldate.xml" echo "Generating config files" ac_config_files="$ac_config_files Makefile gtk/Makefile java/Makefile zbar/Makefile zbar.pc zbar-gtk.pc zbar-qt.pc doc/doxygen.conf" ac_config_files="$ac_config_files test/test_examples.sh" ac_config_files="$ac_config_files test/check_dbus.sh" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # 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. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WIN32_TRUE}" && test -z "${WIN32_FALSE}"; then as_fn_error $? "conditional \"WIN32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_EAN_TRUE}" && test -z "${ENABLE_EAN_FALSE}"; then as_fn_error $? "conditional \"ENABLE_EAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_DATABAR_TRUE}" && test -z "${ENABLE_DATABAR_FALSE}"; then as_fn_error $? "conditional \"ENABLE_DATABAR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_CODE128_TRUE}" && test -z "${ENABLE_CODE128_FALSE}"; then as_fn_error $? "conditional \"ENABLE_CODE128\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_CODE93_TRUE}" && test -z "${ENABLE_CODE93_FALSE}"; then as_fn_error $? "conditional \"ENABLE_CODE93\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_CODE39_TRUE}" && test -z "${ENABLE_CODE39_FALSE}"; then as_fn_error $? "conditional \"ENABLE_CODE39\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_CODABAR_TRUE}" && test -z "${ENABLE_CODABAR_FALSE}"; then as_fn_error $? "conditional \"ENABLE_CODABAR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_I25_TRUE}" && test -z "${ENABLE_I25_FALSE}"; then as_fn_error $? "conditional \"ENABLE_I25\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_QRCODE_TRUE}" && test -z "${ENABLE_QRCODE_FALSE}"; then as_fn_error $? "conditional \"ENABLE_QRCODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_SQCODE_TRUE}" && test -z "${ENABLE_SQCODE_FALSE}"; then as_fn_error $? "conditional \"ENABLE_SQCODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_PDF417_TRUE}" && test -z "${ENABLE_PDF417_FALSE}"; then as_fn_error $? "conditional \"ENABLE_PDF417\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_POLL_TRUE}" && test -z "${HAVE_POLL_FALSE}"; then as_fn_error $? "conditional \"HAVE_POLL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_DOC_TRUE}" && test -z "${HAVE_DOC_FALSE}"; then as_fn_error $? "conditional \"HAVE_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_VIDEO_TRUE}" && test -z "${HAVE_VIDEO_FALSE}"; then as_fn_error $? "conditional \"HAVE_VIDEO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_V4L1_TRUE}" && test -z "${HAVE_V4L1_FALSE}"; then as_fn_error $? "conditional \"HAVE_V4L1\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_V4L2_TRUE}" && test -z "${HAVE_V4L2_FALSE}"; then as_fn_error $? "conditional \"HAVE_V4L2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LIBV4L_TRUE}" && test -z "${HAVE_LIBV4L_FALSE}"; then as_fn_error $? "conditional \"HAVE_LIBV4L\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WITH_DIRECTSHOW_TRUE}" && test -z "${WITH_DIRECTSHOW_FALSE}"; then as_fn_error $? "conditional \"WITH_DIRECTSHOW\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_X_TRUE}" && test -z "${HAVE_X_FALSE}"; then as_fn_error $? "conditional \"HAVE_X\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_XSHM_TRUE}" && test -z "${HAVE_XSHM_FALSE}"; then as_fn_error $? "conditional \"HAVE_XSHM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_XV_TRUE}" && test -z "${HAVE_XV_FALSE}"; then as_fn_error $? "conditional \"HAVE_XV\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_DBUS_TRUE}" && test -z "${HAVE_DBUS_FALSE}"; then as_fn_error $? "conditional \"HAVE_DBUS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_JPEG_TRUE}" && test -z "${HAVE_JPEG_FALSE}"; then as_fn_error $? "conditional \"HAVE_JPEG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_MAGICK_TRUE}" && test -z "${HAVE_MAGICK_FALSE}"; then as_fn_error $? "conditional \"HAVE_MAGICK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_NPAPI_TRUE}" && test -z "${HAVE_NPAPI_FALSE}"; then as_fn_error $? "conditional \"HAVE_NPAPI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_GTK_TRUE}" && test -z "${HAVE_GTK_FALSE}"; then as_fn_error $? "conditional \"HAVE_GTK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_PYGTK2_TRUE}" && test -z "${HAVE_PYGTK2_FALSE}"; then as_fn_error $? "conditional \"HAVE_PYGTK2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_INTROSPECTION_TRUE}" && test -z "${HAVE_INTROSPECTION_FALSE}"; then as_fn_error $? "conditional \"HAVE_INTROSPECTION\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_INTROSPECTION_TRUE}" && test -z "${HAVE_INTROSPECTION_FALSE}"; then as_fn_error $? "conditional \"HAVE_INTROSPECTION\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_QT_TRUE}" && test -z "${HAVE_QT_FALSE}"; then as_fn_error $? "conditional \"HAVE_QT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_JAVAH_TRUE}" && test -z "${HAVE_JAVAH_FALSE}"; then as_fn_error $? "conditional \"HAVE_JAVAH\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_JAVA_UNIT_TRUE}" && test -z "${HAVE_JAVA_UNIT_FALSE}"; then as_fn_error $? "conditional \"HAVE_JAVA_UNIT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_JAVA_TRUE}" && test -z "${HAVE_JAVA_FALSE}"; then as_fn_error $? "conditional \"HAVE_JAVA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by zbar $as_me 0.23, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ zbar config.status 0.23 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' LD_RC='`$ECHO "$LD_RC" | $SED "$delay_single_quote_subst"`' LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' reload_flag_RC='`$ECHO "$reload_flag_RC" | $SED "$delay_single_quote_subst"`' reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' reload_cmds_RC='`$ECHO "$reload_cmds_RC" | $SED "$delay_single_quote_subst"`' reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_cmds_RC='`$ECHO "$old_archive_cmds_RC" | $SED "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' compiler_RC='`$ECHO "$compiler_RC" | $SED "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' GCC_RC='`$ECHO "$GCC_RC" | $SED "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_RC='`$ECHO "$lt_prog_compiler_no_builtin_flag_RC" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_RC='`$ECHO "$lt_prog_compiler_pic_RC" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_RC='`$ECHO "$lt_prog_compiler_wl_RC" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_RC='`$ECHO "$lt_prog_compiler_static_RC" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_RC='`$ECHO "$lt_cv_prog_compiler_c_o_RC" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_RC='`$ECHO "$archive_cmds_need_lc_RC" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_RC='`$ECHO "$enable_shared_with_static_runtimes_RC" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_RC='`$ECHO "$export_dynamic_flag_spec_RC" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_RC='`$ECHO "$whole_archive_flag_spec_RC" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' compiler_needs_object_RC='`$ECHO "$compiler_needs_object_RC" | $SED "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_RC='`$ECHO "$old_archive_from_new_cmds_RC" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_RC='`$ECHO "$old_archive_from_expsyms_cmds_RC" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_RC='`$ECHO "$archive_cmds_RC" | $SED "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_RC='`$ECHO "$archive_expsym_cmds_RC" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_cmds_RC='`$ECHO "$module_cmds_RC" | $SED "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_RC='`$ECHO "$module_expsym_cmds_RC" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' with_gnu_ld_RC='`$ECHO "$with_gnu_ld_RC" | $SED "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_RC='`$ECHO "$allow_undefined_flag_RC" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_RC='`$ECHO "$no_undefined_flag_RC" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_RC='`$ECHO "$hardcode_libdir_flag_spec_RC" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_RC='`$ECHO "$hardcode_libdir_separator_RC" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_RC='`$ECHO "$hardcode_direct_RC" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_RC='`$ECHO "$hardcode_direct_absolute_RC" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_RC='`$ECHO "$hardcode_minus_L_RC" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_RC='`$ECHO "$hardcode_shlibpath_var_RC" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' hardcode_automatic_RC='`$ECHO "$hardcode_automatic_RC" | $SED "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' inherit_rpath_RC='`$ECHO "$inherit_rpath_RC" | $SED "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' link_all_deplibs_RC='`$ECHO "$link_all_deplibs_RC" | $SED "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_RC='`$ECHO "$always_export_symbols_RC" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_RC='`$ECHO "$export_symbols_cmds_RC" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' exclude_expsyms_RC='`$ECHO "$exclude_expsyms_RC" | $SED "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' include_expsyms_RC='`$ECHO "$include_expsyms_RC" | $SED "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' prelink_cmds_RC='`$ECHO "$prelink_cmds_RC" | $SED "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' postlink_cmds_RC='`$ECHO "$postlink_cmds_RC" | $SED "$delay_single_quote_subst"`' postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_RC='`$ECHO "$file_list_spec_RC" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_action_RC='`$ECHO "$hardcode_action_RC" | $SED "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_RC='`$ECHO "$compiler_lib_search_dirs_RC" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' predep_objects_RC='`$ECHO "$predep_objects_RC" | $SED "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' postdep_objects_RC='`$ECHO "$postdep_objects_RC" | $SED "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' predeps_RC='`$ECHO "$predeps_RC" | $SED "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' postdeps_RC='`$ECHO "$postdeps_RC" | $SED "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_RC='`$ECHO "$compiler_lib_search_path_RC" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in AS \ DLLTOOL \ OBJDUMP \ SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_nm_interface \ nm_file_list_spec \ lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_RC \ LD_CXX \ reload_flag_RC \ reload_flag_CXX \ compiler_RC \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_RC \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_pic_RC \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_wl_RC \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_static_RC \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_RC \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_RC \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_RC \ whole_archive_flag_spec_CXX \ compiler_needs_object_RC \ compiler_needs_object_CXX \ with_gnu_ld_RC \ with_gnu_ld_CXX \ allow_undefined_flag_RC \ allow_undefined_flag_CXX \ no_undefined_flag_RC \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_separator_RC \ hardcode_libdir_separator_CXX \ exclude_expsyms_RC \ exclude_expsyms_CXX \ include_expsyms_RC \ include_expsyms_CXX \ file_list_spec_RC \ file_list_spec_CXX \ compiler_lib_search_dirs_RC \ compiler_lib_search_dirs_CXX \ predep_objects_RC \ predep_objects_CXX \ postdep_objects_RC \ postdep_objects_CXX \ predeps_RC \ predeps_CXX \ postdeps_RC \ postdeps_CXX \ compiler_lib_search_path_RC \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ configure_time_dlsearch_path \ configure_time_lt_sys_library_path \ reload_cmds_RC \ reload_cmds_CXX \ old_archive_cmds_RC \ old_archive_cmds_CXX \ old_archive_from_new_cmds_RC \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_RC \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_RC \ archive_cmds_CXX \ archive_expsym_cmds_RC \ archive_expsym_cmds_CXX \ module_cmds_RC \ module_cmds_CXX \ module_expsym_cmds_RC \ module_expsym_cmds_CXX \ export_symbols_cmds_RC \ export_symbols_cmds_CXX \ prelink_cmds_RC \ prelink_cmds_CXX \ postlink_cmds_RC \ postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile' VERSION="$VERSION" RELDATE="$RELDATE" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "include/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "doc/version.xml") CONFIG_COMMANDS="$CONFIG_COMMANDS doc/version.xml" ;; "doc/reldate.xml") CONFIG_COMMANDS="$CONFIG_COMMANDS doc/reldate.xml" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "gtk/Makefile") CONFIG_FILES="$CONFIG_FILES gtk/Makefile" ;; "java/Makefile") CONFIG_FILES="$CONFIG_FILES java/Makefile" ;; "zbar/Makefile") CONFIG_FILES="$CONFIG_FILES zbar/Makefile" ;; "zbar.pc") CONFIG_FILES="$CONFIG_FILES zbar.pc" ;; "zbar-gtk.pc") CONFIG_FILES="$CONFIG_FILES zbar-gtk.pc" ;; "zbar-qt.pc") CONFIG_FILES="$CONFIG_FILES zbar-qt.pc" ;; "doc/doxygen.conf") CONFIG_FILES="$CONFIG_FILES doc/doxygen.conf" ;; "test/test_examples.sh") CONFIG_FILES="$CONFIG_FILES test/test_examples.sh" ;; "test/check_dbus.sh") CONFIG_FILES="$CONFIG_FILES test/check_dbus.sh" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. case $CONFIG_FILES in #( *\'*) : eval set x "$CONFIG_FILES" ;; #( *) : set x $CONFIG_FILES ;; #( *) : ;; esac shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`$as_dirname -- "$am_mf" || $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$am_mf" : 'X\(//\)[^/]' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` am_filepart=`$as_basename -- "$am_mf" || $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` { echo "$as_me:$LINENO: cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles" >&5 (cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments for automatic dependency tracking. Try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } fi { am_dirpart=; unset am_dirpart;} { am_filepart=; unset am_filepart;} { am_mf=; unset am_mf;} { am_rc=; unset am_rc;} rm -f conftest-deps.mk } ;; "libtool":C) # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 # Copyright (C) 2014 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. # GNU Libtool 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 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool 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, see . # The names of the tagged configurations supported by this script. available_tags='RC CXX ' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Assembler program. AS=$lt_AS # DLL creation program. DLLTOOL=$lt_DLLTOOL # Object dumper program. OBJDUMP=$lt_OBJDUMP # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shared archive member basename,for filename based shared library versioning on AIX. shared_archive_member_spec=$shared_archive_member_spec # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm into a list of symbols to manually relocate. global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name lister interface. nm_interface=$lt_lt_cv_nm_interface # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot # Command to truncate a binary pipe. lt_truncate_bin=$lt_lt_cv_truncate_bin # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Detected run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: RC # The linker used to build libraries. LD=$lt_LD_RC # How to create reloadable object files. reload_flag=$lt_reload_flag_RC reload_cmds=$lt_reload_cmds_RC # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_RC # A language specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU compiler? with_gcc=$GCC_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_RC # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_RC # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_RC # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_RC # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_RC # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_RC # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_RC # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_RC # Specify filename containing input files. file_list_spec=$lt_file_list_spec_RC # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_RC # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_RC postdep_objects=$lt_postdep_objects_RC predeps=$lt_predeps_RC postdeps=$lt_postdeps_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC # ### END LIBTOOL TAG CONFIG: RC _LT_EOF cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # How to create reloadable object files. reload_flag=$lt_reload_flag_CXX reload_cmds=$lt_reload_cmds_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; "doc/version.xml":C) if test -f doc/version.xml && \ ! echo $VERSION | diff doc/version.xml - >/dev/null 2>&1 || \ ! echo $VERSION | diff $srcdir/doc/version.xml - >/dev/null 2>&1 ; then : echo "writing new doc/version.xml" ; echo $VERSION > $srcdir/doc/version.xml fi ;; "doc/reldate.xml":C) if test -f doc/reldate.xml && \ ! echo $RELDATE | diff doc/reldate.xml - >/dev/null 2>&1 || \ ! echo $RELDATE | diff $srcdir/doc/reldate.xml - >/dev/null 2>&1 ; then : echo "writing new doc/reldate.xml" ; echo $RELDATE > $srcdir/doc/reldate.xml fi ;; "test/test_examples.sh":F) chmod 755 test/test_examples.sh ;; "test/check_dbus.sh":F) chmod 755 test/check_dbus.sh ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi echo "" echo "please verify that the detected configuration matches your expectations:" echo "------------------------------------------------------------------------" if test "x$win32" != "xno"; then : if test "x$with_directshow" != "xno"; then : echo "DirectShow driver --with-directshow=$with_directshow" else echo "VfW driver --with-directshow=$with_directshow" fi else echo "X --with-x=$have_x" fi echo "pthreads --enable-pthread=$enable_pthread" echo "doc --enable-doc=$enable_doc" echo "v4l --enable-video=$enable_video" echo "jpeg --with-jpeg=$with_jpeg" echo "Python --with-python=$with_python python${PYTHON_VERSION}" echo "GTK --with-gtk=$with_gtk Gtk${GTK_VERSION}" echo "GObject introspection --with-gir=$with_gir" echo "Qt --with-qt=$with_qt Qt${QT_VERSION}" echo "Java --with-java=$with_java" if test "x$win32" == "xno"; then : echo "Dbus --with-dbus=$with_dbus" fi if test "x$have_GM" = "xyes"; then : echo "GraphicsMagick --with-graphicsmagick=yes" else echo "ImageMagick --with-imagemagick=$with_imagemagick" fi echo "Enabled codes: $enabled_codes" echo "Disabled codes: $disabled_codes" if test "x$with_java" = "xyes"; then : echo "JAVA_HOME $JAVA_HOME" fi echo "" if test "x$enable_video" != "xyes"; then : echo " => zbarcam video scanner will *NOT* be built" fi if test "x$have_libv4l" != "xyes"; then : echo " => libv4l will *NOT* be used" fi if test "x$with_jpeg" != "xyes"; then : echo " => JPEG image conversions will *NOT* be supported" fi if test "x$have_IM" != "xyes" && test "x$have_GM" != "xyes"; then : echo " => the zbarimg file scanner will *NOT* be built" fi if test "x$have_GM" = "xyes"; then : echo " => ImageMagick is preferred, as GraphicsMagick doesn't support https" fi if test "x$with_gtk" == "xno"; then : echo " => GTK support will *NOT* be built" fi if test "x$with_pygtk2" != "xyes" && test "xPYTHON_VERSION_MAJOR" = "x2"; then : echo " => the Python 2 GTK widget wrapper will *NOT* be built" fi if test "x$with_qt" != "xyes"; then : echo " => the Qt widget will *NOT* be built" fi if test "x$with_qt" == "xyes" && test "x$enable_static_qt" == "xyes" ; then : echo " => Building a static Qt library" fi if test "x$with_java" != "xyes"; then : echo " => the Java interface will *NOT* be built" fi if test "x$with_java_unit" != "xyes"; then : echo " => the Java unit test will *NOT* be enabled" fi #echo "NPAPI Plugin --with-npapi=$with_npapi" #AS_IF([test "x$with_mozilla" != "xyes"], # [echo " => the Mozilla/Firefox/OpenOffice plugin will *NOT* be built"]) if test "x$enable_pdf417" == "xyes"; then : echo " => the pdf417 code support is incomplete!" fi zbar-0.23/plugin/0000775000175000017500000000000013471606255010706 500000000000000zbar-0.23/plugin/Makefile.am.inc0000664000175000017500000000034613466560613013436 00000000000000lib_LTLIBRARIES += plugin/libzbarplugin.la plugin_libzbarplugin_la_SOURCES = \ plugin/plugin.c plugin_libzbarplugin_la_CPPFLAGS = $(MOZILLA_CFLAGS) $(AM_CPPFLAGS) plugin_libzbarplugin_la_LDFLAGS = $(MOZILLA_LIBS) $(AM_LDFLAGS) zbar-0.23/plugin/plugin.c0000664000175000017500000000211713466560613012272 00000000000000/*------------------------------------------------------------------------ * Copyright 2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include zbar-0.23/TODO.md0000664000175000017500000000414413471225716010421 00000000000000general ======= * finish error handling * handle video destroyed w/images outstanding * dbg_scan background image stretched (still...) * profile and weed out obvious oversights * example using SANE to scan symbol(s) windows port ============ * libzbar-0.dll should be zbar-0.dll wrappers ======== * 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? * GTK and Qt perl bindings * C++ global wrappers symbologies =========== * 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 decoder ======= * 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 max length check during decode * revisit noise and resolution independence 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 window ====== * add XShm support * X protocol error handling * Direct2D * API to query used interface (video, window?) (/format?) * simple image manipulations scale(xv?)/mirror * maintain aspect ratio * more overlay details * decoded result(?) * stats zbarcam/zbarimg =============== * zbarimg multi-frame duplicate suppression * stats/fps at zbarcam exit * decode hook (program/script)? (also zbarimg?) zbar-0.23/config/0000775000175000017500000000000013471606255010655 500000000000000zbar-0.23/config/config.guess0000755000175000017500000012617613471606247013131 00000000000000#!/usr/bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2018 Free Software Foundation, Inc. timestamp='2018-08-29' # 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 3 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, see . # # 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 Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # # Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Options: -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 1992-2018 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 ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # 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 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. tmp= # shellcheck disable=SC2172 trap 'test -z "$tmp" || rm -fr "$tmp"' 1 2 13 15 trap 'exitcode=$?; test -z "$tmp" || rm -fr "$tmp"; exit $exitcode' 0 set_cc_for_build() { : "${TMPDIR=/tmp}" # shellcheck disable=SC2039 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } dummy=$tmp/dummy case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in ,,) echo "int x;" > "$dummy.c" for driver in cc gcc c89 c99 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD="$driver" break fi done 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 1994-08-24) if test -f /.attbin/uname ; 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 case "$UNAME_SYSTEM" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu set_cc_for_build cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" # If ldd exists, use it to detect musl libc. if command -v ldd >/dev/null && \ ldd --version 2>&1 | grep -q ^musl then LIBC=musl fi ;; esac # 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 tuples: *-*-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. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ "/sbin/$sysctl" 2>/dev/null || \ "/usr/sbin/$sysctl" 2>/dev/null || \ echo unknown)` case "$UNAME_MACHINE_ARCH" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` machine="${arch}${endian}"-unknown ;; *) machine="$UNAME_MACHINE_ARCH"-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. case "$UNAME_MACHINE_ARCH" in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ 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 # Determine ABI tags. case "$UNAME_MACHINE_ARCH" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "$UNAME_VERSION" in Debian*) release='-gnu' ;; *) release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "$machine-${os}${release}${abi-}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" exit ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" exit ;; *:MidnightBSD:*:*) echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" exit ;; *:ekkoBSD:*:*) echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" exit ;; *:SolidBSD:*:*) echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:MirBSD:*:*) echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:Sortix:*:*) echo "$UNAME_MACHINE"-unknown-sortix exit ;; *:Redox:*:*) echo "$UNAME_MACHINE"-unknown-redox exit ;; mips:OSF1:*.*) echo mips-dec-osf1 exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") UNAME_MACHINE=alpha ;; "EV5 (21164)") UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # 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. echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo "$UNAME_MACHINE"-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo "$UNAME_MACHINE"-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix"$UNAME_RELEASE" exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; 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 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" case `isainfo -b` in 32) echo i386-pc-solaris2"$UNAME_REL" ;; 64) echo x86_64-pc-solaris2"$UNAME_REL" ;; esac exit ;; 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 ;; 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 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos"$UNAME_RELEASE" exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /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 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos"$UNAME_RELEASE" exit ;; # 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 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint"$UNAME_RELEASE" exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint"$UNAME_RELEASE" exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint"$UNAME_RELEASE" exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint"$UNAME_RELEASE" exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint"$UNAME_RELEASE" exit ;; m68k:machten:*:*) echo m68k-apple-machten"$UNAME_RELEASE" exit ;; powerpc:machten:*:*) echo powerpc-apple-machten"$UNAME_RELEASE" exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix"$UNAME_RELEASE" exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix"$UNAME_RELEASE" exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) set_cc_for_build 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 -o "$dummy" "$dummy.c" && dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos"$UNAME_RELEASE" exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; 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 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" exit ;; ????????: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 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; 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 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi 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 ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | 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/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi echo "$IBM_ARCH"-ibm-aix"$IBM_REV" exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 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]) 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 ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi if [ "$HP_ARCH" = "" ]; then set_cc_for_build 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 -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ "$HP_ARCH" = hppa2.0w ] then set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH=hppa2.0w else HP_ARCH=hppa64 fi fi echo "$HP_ARCH"-hp-hpux"$HPUX_REV" exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) set_cc_for_build 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 -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo "$UNAME_MACHINE"-unknown-osf1mk else echo "$UNAME_MACHINE"-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; 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 ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi"$UNAME_RELEASE" exit ;; *:BSD/OS:*:*) echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" exit ;; arm:FreeBSD:*:*) UNAME_PROCESSOR=`uname -p` set_cc_for_build if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi else echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf fi exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case "$UNAME_PROCESSOR" in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; i*:CYGWIN*:*) echo "$UNAME_MACHINE"-pc-cygwin exit ;; *:MINGW64*:*) echo "$UNAME_MACHINE"-pc-mingw64 exit ;; *:MINGW*:*) echo "$UNAME_MACHINE"-pc-mingw32 exit ;; *:MSYS*:*) echo "$UNAME_MACHINE"-pc-msys exit ;; i*:PW*:*) echo "$UNAME_MACHINE"-pc-pw32 exit ;; *:Interix*:*) case "$UNAME_MACHINE" in x86) echo i586-pc-interix"$UNAME_RELEASE" exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix"$UNAME_RELEASE" exit ;; IA64) echo ia64-unknown-interix"$UNAME_RELEASE" exit ;; esac ;; i*:UWIN*:*) echo "$UNAME_MACHINE"-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; *:GNU:*:*) # the GNU system echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" exit ;; *:Minix:*:*) echo "$UNAME_MACHINE"-unknown-minix exit ;; aarch64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi else echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf fi fi exit ;; avr32*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; cris:Linux:*:*) echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; crisv32:Linux:*:*) echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; e2k:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; frv:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; hexagon:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:Linux:*:*) echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; ia64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; k1om:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m32r*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m68*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } ;; mips64el:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-"$LIBC" exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; padre:Linux:*:*) echo sparc-unknown-linux-"$LIBC" exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-"$LIBC" exit ;; 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-"$LIBC" ;; PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; *) echo hppa-unknown-linux-"$LIBC" ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-"$LIBC" exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-"$LIBC" exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-"$LIBC" exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-"$LIBC" exit ;; riscv32:Linux:*:* | riscv64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" exit ;; sh64*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sh*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; tile*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; vax:Linux:*:*) echo "$UNAME_MACHINE"-dec-linux-"$LIBC" exit ;; x86_64:Linux:*:*) echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; xtensa*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:DYNIX/ptx:4*:*) # 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. echo i386-sequent-sysv4 exit ;; 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 ;; 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 ;; i*86:XTS-300:*:STOP) echo "$UNAME_MACHINE"-unknown-stop exit ;; i*86:atheos:*:*) echo "$UNAME_MACHINE"-unknown-atheos exit ;; i*86:syllable:*:*) echo "$UNAME_MACHINE"-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos"$UNAME_RELEASE" exit ;; i*86:*DOS:*:*) echo "$UNAME_MACHINE"-pc-msdosdjgpp exit ;; i*86:*: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 ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" exit ;; 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|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" else echo "$UNAME_MACHINE"-pc-sysv32 fi exit ;; 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 i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; 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 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*: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; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' 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; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos"$UNAME_RELEASE" exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos"$UNAME_RELEASE" exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos"$UNAME_RELEASE" exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos"$UNAME_RELEASE" exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv"$UNAME_RELEASE" exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *: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 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo "$UNAME_MACHINE"-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux"$UNAME_RELEASE" exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; 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 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux"$UNAME_RELEASE" exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux"$UNAME_RELEASE" exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux"$UNAME_RELEASE" exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux"$UNAME_RELEASE" exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux"$UNAME_RELEASE" exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux"$UNAME_RELEASE" exit ;; SX-ACE:SUPER-UX:*:*) echo sxace-nec-superux"$UNAME_RELEASE" exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Rhapsody:*:*) echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_PPC >/dev/null then UNAME_PROCESSOR=powerpc fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-*:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk"$UNAME_RELEASE" exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk"$UNAME_RELEASE" exit ;; NSR-*:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk"$UNAME_RELEASE" exit ;; NSV-*:NONSTOP_KERNEL:*:*) echo nsv-tandem-nsk"$UNAME_RELEASE" exit ;; NSX-*:NONSTOP_KERNEL:*:*) echo nsx-tandem-nsk"$UNAME_RELEASE" exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. # shellcheck disable=SC2154 if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo "$UNAME_MACHINE"-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux"$UNAME_RELEASE" exit ;; *:DragonFly:*:*) echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "$UNAME_MACHINE" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" exit ;; i*86:rdos:*:*) echo "$UNAME_MACHINE"-pc-rdos exit ;; i*86:AROS:*:*) echo "$UNAME_MACHINE"-pc-aros exit ;; x86_64:VMkernel:*:*) echo "$UNAME_MACHINE"-unknown-esx exit ;; amd64:Isilon\ OneFS:*:*) echo x86_64-unknown-onefs exit ;; esac echo "$0: unable to guess system type" >&2 case "$UNAME_MACHINE:$UNAME_SYSTEM" in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&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 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: zbar-0.23/config/missing0000755000175000017500000001534113471606247012177 00000000000000#!/usr/bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2018-03-07.03; # UTC # Copyright (C) 1996-2018 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # 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, see . # 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. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=https://www.perl.org/ flex_URL=https://github.com/westes/flex gnu_software_URL=https://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: zbar-0.23/config/config.rpath0000775000175000017500000004421613471225716013113 00000000000000#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2016 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # # 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. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's _LT_CC_BASENAME. for cc_temp in $CC""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` # Code taken from libtool.m4's _LT_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; mingw* | cygwin* | pw32* | os2* | cegcc*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in ecc*) wl='-Wl,' ;; icc* | ifort*) wl='-Wl,' ;; lf95*) wl='-Wl,' ;; nagfor*) wl='-Wl,-Wl,,' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; xl* | bgxl* | bgf* | mpixl*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) wl= ;; *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; newsos6) ;; *nto* | *qnx*) ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; rdos*) ;; solaris*) case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) wl='-Qoption ld ' ;; *) wl='-Wl,' ;; esac ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3*) wl='-Wl,' ;; sysv4*MP*) ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) wl='-Wl,' ;; unicos*) wl='-Wl,' ;; uts4*) ;; esac fi # Code taken from libtool.m4's _LT_LINKER_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; haiku*) ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' else ld_shlibs=no fi ;; esac ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then hardcode_libdir_flag_spec= fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) hardcode_direct=no if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then : else ld_shlibs=no fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd2.[01]*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd* | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no ;; *) hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) ;; sysv5* | sco3.2v5* | sco5v6*) hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. # Unlike libtool.m4, here we don't care about _all_ names of the library, but # only about the one the linker finds when passed -lNAME. This is the last # element of library_names_spec in libtool.m4, or possibly two of them if the # linker has special search rules. library_names_spec= # the last element of library_names_spec in libtool.m4 libname_spec='lib$name' case "$host_os" in aix3*) library_names_spec='$libname.a' ;; aix[4-9]*) library_names_spec='$libname$shrext' ;; amigaos*) case "$host_cpu" in powerpc*) library_names_spec='$libname$shrext' ;; m68k) library_names_spec='$libname.a' ;; esac ;; beos*) library_names_spec='$libname$shrext' ;; bsdi[45]*) library_names_spec='$libname$shrext' ;; cygwin* | mingw* | pw32* | cegcc*) shrext=.dll library_names_spec='$libname.dll.a $libname.lib' ;; darwin* | rhapsody*) shrext=.dylib library_names_spec='$libname$shrext' ;; dgux*) library_names_spec='$libname$shrext' ;; freebsd[23].*) library_names_spec='$libname$shrext$versuffix' ;; freebsd* | dragonfly*) library_names_spec='$libname$shrext' ;; gnu*) library_names_spec='$libname$shrext' ;; haiku*) library_names_spec='$libname$shrext' ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac library_names_spec='$libname$shrext' ;; interix[3-9]*) library_names_spec='$libname$shrext' ;; irix5* | irix6* | nonstopux*) library_names_spec='$libname$shrext' case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) library_names_spec='$libname$shrext' ;; knetbsd*-gnu) library_names_spec='$libname$shrext' ;; netbsd*) library_names_spec='$libname$shrext' ;; newsos6) library_names_spec='$libname$shrext' ;; *nto* | *qnx*) library_names_spec='$libname$shrext' ;; openbsd*) library_names_spec='$libname$shrext$versuffix' ;; os2*) libname_spec='$name' shrext=.dll library_names_spec='$libname.a' ;; osf3* | osf4* | osf5*) library_names_spec='$libname$shrext' ;; rdos*) ;; solaris*) library_names_spec='$libname$shrext' ;; sunos4*) library_names_spec='$libname$shrext$versuffix' ;; sysv4 | sysv4.3*) library_names_spec='$libname$shrext' ;; sysv4*MP*) library_names_spec='$libname$shrext' ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='$libname$shrext' ;; tpf*) library_names_spec='$libname$shrext' ;; uts4*) library_names_spec='$libname$shrext' ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dstbase=`basename "$src"` case $dst in */) dst=$dst$dstbase;; *) dst=$dst/$dstbase;; esac dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi case $dstdir in */) dstdirslash=$dstdir;; *) dstdirslash=$dstdir/;; esac obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) # Note that $RANDOM variable is not portable (e.g. dash); Use it # here however when possible just to lower collision chance. tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 # Because "mkdir -p" follows existing symlinks and we likely work # directly in world-writeable /tmp, make sure that the '$tmpdir' # directory is successfully created first before we actually test # 'mkdir -p' feature. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. test_tmpdir="$tmpdir/a" ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=${dstdirslash}_inst.$$_ rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: zbar-0.23/config/ltmain.sh0000644000175000017500000117106713471606242012424 00000000000000#! /bin/sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2014-01-03.01 # libtool (GNU libtool) 2.4.6 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996-2015 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. # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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, see . PROGRAM=libtool PACKAGE=libtool VERSION=2.4.6 package_revision=2.4.6 ## ------ ## ## Usage. ## ## ------ ## # Run './libtool --help' for help with using this script from the # command line. ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # After configure completes, it has a better idea of some of the # shell tools we need than the defaults used by the functions shared # with bootstrap, so set those here where they can still be over- # ridden by the user, but otherwise take precedence. : ${AUTOCONF="autoconf"} : ${AUTOMAKE="automake"} ## -------------------------- ## ## Source external libraries. ## ## -------------------------- ## # Much of our low-level functionality needs to be sourced from external # libraries, which are installed to $pkgauxdir. # Set a version string for this script. scriptversion=2015-01-20.17; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 # Copyright (C) 2004-2015 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. # 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 3 of the License, or # (at your option) any later version. # As a special exception to the GNU General Public License, if you distribute # this file as part of a program or library that is built using GNU Libtool, # you may include this file under the same distribution terms that you use # for the rest of that program. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNES 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, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # Evaluate this file near the top of your script to gain access to # the functions and variables defined here: # # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh # # If you need to override any of the default environment variable # settings, do that before evaluating this file. ## -------------------- ## ## Shell normalisation. ## ## -------------------- ## # Some shells need a little help to be as Bourne compatible as possible. # Before doing anything else, make sure all that help has been provided! DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # NLS nuisances: We save the old values in case they are required later. _G_user_locale= _G_safe_locale= for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test set = \"\${$_G_var+set}\"; then save_$_G_var=\$$_G_var $_G_var=C export $_G_var _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Make sure IFS has a sensible default sp=' ' nl=' ' IFS="$sp $nl" # There are apparently some retarded systems that use ';' as a PATH separator! if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi ## ------------------------- ## ## Locate command utilities. ## ## ------------------------- ## # func_executable_p FILE # ---------------------- # Check that FILE is an executable regular file. func_executable_p () { test -f "$1" && test -x "$1" } # func_path_progs PROGS_LIST CHECK_FUNC [PATH] # -------------------------------------------- # Search for either a program that responds to --version with output # containing "GNU", or else returned by CHECK_FUNC otherwise, by # trying all the directories in PATH with each of the elements of # PROGS_LIST. # # CHECK_FUNC should accept the path to a candidate program, and # set $func_check_prog_result if it truncates its output less than # $_G_path_prog_max characters. func_path_progs () { _G_progs_list=$1 _G_check_func=$2 _G_PATH=${3-"$PATH"} _G_path_prog_max=0 _G_path_prog_found=false _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} for _G_dir in $_G_PATH; do IFS=$_G_save_IFS test -z "$_G_dir" && _G_dir=. for _G_prog_name in $_G_progs_list; do for _exeext in '' .EXE; do _G_path_prog=$_G_dir/$_G_prog_name$_exeext func_executable_p "$_G_path_prog" || continue case `"$_G_path_prog" --version 2>&1` in *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; *) $_G_check_func $_G_path_prog func_path_progs_result=$func_check_prog_result ;; esac $_G_path_prog_found && break 3 done done done IFS=$_G_save_IFS test -z "$func_path_progs_result" && { echo "no acceptable sed could be found in \$PATH" >&2 exit 1 } } # We want to be able to use the functions in this file before configure # has figured out where the best binaries are kept, which means we have # to search for them ourselves - except when the results are already set # where we skip the searches. # Unless the user overrides by setting SED, search the path for either GNU # sed, or the sed that truncates its output the least. test -z "$SED" && { _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for _G_i in 1 2 3 4 5 6 7; do _G_sed_script=$_G_sed_script$nl$_G_sed_script done echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed _G_sed_script= func_check_prog_sed () { _G_path_prog=$1 _G_count=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo '' >> conftest.nl "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin rm -f conftest.sed SED=$func_path_progs_result } # Unless the user overrides by setting GREP, search the path for either GNU # grep, or the grep that truncates its output the least. test -z "$GREP" && { func_check_prog_grep () { _G_path_prog=$1 _G_count=0 _G_path_prog_max=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo 'GREP' >> conftest.nl "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin GREP=$func_path_progs_result } ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # All uppercase variable names are used for environment variables. These # variables can be overridden by the user before calling a script that # uses them if a suitable command of that name is not already available # in the command search PATH. : ${CP="cp -f"} : ${ECHO="printf %s\n"} : ${EGREP="$GREP -E"} : ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} ## -------------------- ## ## Useful sed snippets. ## ## -------------------- ## sed_dirname='s|/[^/]*$||' sed_basename='s|^.*/||' # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s|\([`"$\\]\)|\\\1|g' # Same as above, but do not quote variable references. sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' # Sed substitution that converts a w32 file name or path # that contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-'\' parameter expansions in output of sed_double_quote_subst that # were '\'-ed in input to the same. If an odd number of '\' preceded a # '$' in input to sed_double_quote_subst, that '$' was protected from # expansion. Since each input '\' is now two '\'s, look for any number # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. _G_bs='\\' _G_bs2='\\\\' _G_bs4='\\\\\\\\' _G_dollar='\$' sed_double_backslash="\ s/$_G_bs4/&\\ /g s/^$_G_bs2$_G_dollar/$_G_bs&/ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" ## ----------------- ## ## Global variables. ## ## ----------------- ## # Except for the global variables explicitly listed below, the following # functions in the '^func_' namespace, and the '^require_' namespace # variables initialised in the 'Resource management' section, sourcing # this file will not pollute your global namespace with anything # else. There's no portable way to scope variables in Bourne shell # though, so actually running these functions will sometimes place # results into a variable named after the function, and often use # temporary variables in the '^_G_' namespace. If you are careful to # avoid using those namespaces casually in your sourcing script, things # should continue to work as you expect. And, of course, you can freely # overwrite any of the functions or variables defined here before # calling anything to customize them. EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. # Allow overriding, eg assuming that you follow the convention of # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: # By convention, finish your script with: # # exit $exit_status # # so that you can set exit_status to non-zero if you want to indicate # something went wrong during execution without actually bailing out at # the point of failure. exit_status=$EXIT_SUCCESS # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath=$0 # The name of this program. progname=`$ECHO "$progpath" |$SED "$sed_basename"` # Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` progpath=$progdir/$progname ;; *) _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS=$_G_IFS test -x "$progdir/$progname" && break done IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` progpath=$progdir/$progname ;; esac ## ----------------- ## ## Standard options. ## ## ----------------- ## # The following options affect the operation of the functions defined # below, and should be set appropriately depending on run-time para- # meters passed on the command line. opt_dry_run=false opt_quiet=false opt_verbose=false # Categories 'all' and 'none' are always available. Append any others # you will pass as the first argument to func_warning from your own # code. warning_categories= # By default, display warnings according to 'opt_warning_types'. Set # 'warning_func' to ':' to elide all warnings, or func_fatal_error to # treat the next displayed warning as a fatal error. warning_func=func_warn_and_continue # Set to 'all' to display all warnings, 'none' to suppress all # warnings, or a space delimited list of some subset of # 'warning_categories' to display only the listed warnings. opt_warning_types=all ## -------------------- ## ## Resource management. ## ## -------------------- ## # This section contains definitions for functions that each ensure a # particular resource (a file, or a non-empty configuration variable for # example) is available, and if appropriate to extract default values # from pertinent package files. Call them using their associated # 'require_*' variable to ensure that they are executed, at most, once. # # It's entirely deliberate that calling these functions can set # variables that don't obey the namespace limitations obeyed by the rest # of this file, in order that that they be as useful as possible to # callers. # require_term_colors # ------------------- # Allow display of bold text on terminals that support it. require_term_colors=func_require_term_colors func_require_term_colors () { $debug_cmd test -t 1 && { # COLORTERM and USE_ANSI_COLORS environment variables take # precedence, because most terminfo databases neglect to describe # whether color sequences are supported. test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} if test 1 = "$USE_ANSI_COLORS"; then # Standard ANSI escape sequences tc_reset='' tc_bold=''; tc_standout='' tc_red=''; tc_green='' tc_blue=''; tc_cyan='' else # Otherwise trust the terminfo database after all. test -n "`tput sgr0 2>/dev/null`" && { tc_reset=`tput sgr0` test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` tc_standout=$tc_bold test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` } fi } require_term_colors=: } ## ----------------- ## ## Function library. ## ## ----------------- ## # This section contains a variety of useful functions to call in your # scripts. Take note of the portable wrappers for features provided by # some modern shells, which will fall back to slower equivalents on # less featureful shells. # func_append VAR VALUE # --------------------- # Append VALUE onto the existing contents of VAR. # We should try to minimise forks, especially on Windows where they are # unreasonably slow, so skip the feature probes when bash or zsh are # being used: if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then : ${_G_HAVE_ARITH_OP="yes"} : ${_G_HAVE_XSI_OPS="yes"} # The += operator was introduced in bash 3.1 case $BASH_VERSION in [12].* | 3.0 | 3.0*) ;; *) : ${_G_HAVE_PLUSEQ_OP="yes"} ;; esac fi # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is # useable or anything else if it does not work. test -z "$_G_HAVE_PLUSEQ_OP" \ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ && _G_HAVE_PLUSEQ_OP=yes if test yes = "$_G_HAVE_PLUSEQ_OP" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_append () { $debug_cmd eval "$1+=\$2" }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_append () { $debug_cmd eval "$1=\$$1\$2" } fi # func_append_quoted VAR VALUE # ---------------------------- # Quote VALUE and append to the end of shell variable VAR, separated # by a space. if test yes = "$_G_HAVE_PLUSEQ_OP"; then eval 'func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1+=\\ \$func_quote_for_eval_result" }' else func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1=\$$1\\ \$func_quote_for_eval_result" } fi # func_append_uniq VAR VALUE # -------------------------- # Append unique VALUE onto the existing contents of VAR, assuming # entries are delimited by the first character of VALUE. For example: # # func_append_uniq options " --another-option option-argument" # # will only append to $options if " --another-option option-argument " # is not already present somewhere in $options already (note spaces at # each end implied by leading space in second argument). func_append_uniq () { $debug_cmd eval _G_current_value='`$ECHO $'$1'`' _G_delim=`expr "$2" : '\(.\)'` case $_G_delim$_G_current_value$_G_delim in *"$2$_G_delim"*) ;; *) func_append "$@" ;; esac } # func_arith TERM... # ------------------ # Set func_arith_result to the result of evaluating TERMs. test -z "$_G_HAVE_ARITH_OP" \ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ && _G_HAVE_ARITH_OP=yes if test yes = "$_G_HAVE_ARITH_OP"; then eval 'func_arith () { $debug_cmd func_arith_result=$(( $* )) }' else func_arith () { $debug_cmd func_arith_result=`expr "$@"` } fi # func_basename FILE # ------------------ # Set func_basename_result to FILE with everything up to and including # the last / stripped. if test yes = "$_G_HAVE_XSI_OPS"; then # If this shell supports suffix pattern removal, then use it to avoid # forking. Hide the definitions single quotes in case the shell chokes # on unsupported syntax... _b='func_basename_result=${1##*/}' _d='case $1 in */*) func_dirname_result=${1%/*}$2 ;; * ) func_dirname_result=$3 ;; esac' else # ...otherwise fall back to using sed. _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` if test "X$func_dirname_result" = "X$1"; then func_dirname_result=$3 else func_append func_dirname_result "$2" fi' fi eval 'func_basename () { $debug_cmd '"$_b"' }' # func_dirname FILE APPEND NONDIR_REPLACEMENT # ------------------------------------------- # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. eval 'func_dirname () { $debug_cmd '"$_d"' }' # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT # -------------------------------------------------------- # Perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () { $debug_cmd '"$_b"' '"$_d"' }' # func_echo ARG... # ---------------- # Echo program name prefixed message. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname: $_G_line" done IFS=$func_echo_IFS } # func_echo_all ARG... # -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_echo_infix_1 INFIX ARG... # ------------------------------ # Echo program name, followed by INFIX on the first line, with any # additional lines not showing INFIX. func_echo_infix_1 () { $debug_cmd $require_term_colors _G_infix=$1; shift _G_indent=$_G_infix _G_prefix="$progname: $_G_infix: " _G_message=$* # Strip color escape sequences before counting printable length for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" do test -n "$_G_tc" && { _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` } done _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes func_echo_infix_1_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_infix_1_IFS $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 _G_prefix=$_G_indent done IFS=$func_echo_infix_1_IFS } # func_error ARG... # ----------------- # Echo program name prefixed message to standard error. func_error () { $debug_cmd $require_term_colors func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } # func_fatal_error ARG... # ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { $debug_cmd func_error "$*" exit $EXIT_FAILURE } # func_grep EXPRESSION FILENAME # ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $debug_cmd $GREP "$1" "$2" >/dev/null 2>&1 } # func_len STRING # --------------- # Set func_len_result to the length of STRING. STRING may not # start with a hyphen. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_len () { $debug_cmd func_len_result=${#1} }' else func_len () { $debug_cmd func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } fi # func_mkdir_p DIRECTORY-PATH # --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { $debug_cmd _G_directory_path=$1 _G_dir_list= if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then # Protect directory names starting with '-' case $_G_directory_path in -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` func_mkdir_p_IFS=$IFS; IFS=: for _G_dir in $_G_dir_list; do IFS=$func_mkdir_p_IFS # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$_G_dir" 2>/dev/null || : done IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. test -d "$_G_directory_path" || \ func_fatal_error "Failed to create '$1'" fi } # func_mktempdir [BASENAME] # ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, BASENAME is the basename for that directory. func_mktempdir () { $debug_cmd _G_template=${TMPDIR-/tmp}/${1-$progname} if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race _G_tmpdir=$_G_template-${RANDOM-0}$$ func_mktempdir_umask=`umask` umask 0077 $MKDIR "$_G_tmpdir" umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$_G_tmpdir" || \ func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi $ECHO "$_G_tmpdir" } # func_normal_abspath PATH # ------------------------ # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. func_normal_abspath () { $debug_cmd # These SED scripts presuppose an absolute path with a trailing slash. _G_pathcar='s|^/\([^/]*\).*$|\1|' _G_pathcdr='s|^/[^/]*||' _G_removedotparts=':dotsl s|/\./|/|g t dotsl s|/\.$|/|' _G_collapseslashes='s|/\{1,\}|/|g' _G_finalslash='s|/*$|/|' # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` while :; do # Processed it all yet? if test / = "$func_normal_abspath_tpath"; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result"; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_notquiet ARG... # -------------------- # Echo program name prefixed message only when not in quiet mode. func_notquiet () { $debug_cmd $opt_quiet || func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_relative_path SRCDIR DSTDIR # -------------------------------- # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. func_relative_path () { $debug_cmd func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=$func_dirname_result if test -z "$func_relative_path_tlibdir"; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test -n "$func_stripname_result"; then func_append func_relative_path_result "/$func_stripname_result" fi # Normalisation. If bindir is libdir, return '.' else relative path. if test -n "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result" func_relative_path_result=$func_stripname_result fi test -n "$func_relative_path_result" || func_relative_path_result=. : } # func_quote_for_eval ARG... # -------------------------- # Aesthetically quote ARGs to be evaled later. # This function returns two values: # i) func_quote_for_eval_result # double-quoted, suitable for a subsequent eval # ii) func_quote_for_eval_unquoted_result # has all characters that are still active within double # quotes backslashified. func_quote_for_eval () { $debug_cmd func_quote_for_eval_unquoted_result= func_quote_for_eval_result= while test 0 -lt $#; do case $1 in *[\\\`\"\$]*) _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; *) _G_unquoted_arg=$1 ;; esac if test -n "$func_quote_for_eval_unquoted_result"; then func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" else func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" fi case $_G_unquoted_arg in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and variable expansion # for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_quoted_arg=\"$_G_unquoted_arg\" ;; *) _G_quoted_arg=$_G_unquoted_arg ;; esac if test -n "$func_quote_for_eval_result"; then func_append func_quote_for_eval_result " $_G_quoted_arg" else func_append func_quote_for_eval_result "$_G_quoted_arg" fi shift done } # func_quote_for_expand ARG # ------------------------- # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { $debug_cmd case $1 in *[\\\`\"]*) _G_arg=`$ECHO "$1" | $SED \ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; *) _G_arg=$1 ;; esac case $_G_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_arg=\"$_G_arg\" ;; esac func_quote_for_expand_result=$_G_arg } # func_stripname PREFIX SUFFIX NAME # --------------------------------- # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_stripname () { $debug_cmd # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary variable first. func_stripname_result=$3 func_stripname_result=${func_stripname_result#"$1"} func_stripname_result=${func_stripname_result%"$2"} }' else func_stripname () { $debug_cmd case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; esac } fi # func_show_eval CMD [FAIL_EXP] # ----------------------------- # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} func_quote_for_expand "$_G_cmd" eval "func_notquiet $func_quote_for_expand_result" $opt_dry_run || { eval "$_G_cmd" _G_status=$? if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_show_eval_locale CMD [FAIL_EXP] # ------------------------------------ # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} $opt_quiet || { func_quote_for_expand "$_G_cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || { eval "$_G_user_locale $_G_cmd" _G_status=$? eval "$_G_safe_locale" if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_tr_sh # ---------- # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { $debug_cmd case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_verbose ARG... # ------------------- # Echo program name prefixed message in verbose mode only. func_verbose () { $debug_cmd $opt_verbose && func_echo "$*" : } # func_warn_and_continue ARG... # ----------------------------- # Echo program name prefixed warning message to standard error. func_warn_and_continue () { $debug_cmd $require_term_colors func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } # func_warning CATEGORY ARG... # ---------------------------- # Echo program name prefixed warning message to standard error. Warning # messages can be filtered according to CATEGORY, where this function # elides messages where CATEGORY is not listed in the global variable # 'opt_warning_types'. func_warning () { $debug_cmd # CATEGORY must be in the warning_categories list! case " $warning_categories " in *" $1 "*) ;; *) func_internal_error "invalid warning category '$1'" ;; esac _G_category=$1 shift case " $opt_warning_types " in *" $_G_category "*) $warning_func ${1+"$@"} ;; esac } # func_sort_ver VER1 VER2 # ----------------------- # 'sort -V' is not generally available. # Note this deviates from the version comparison in automake # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a # but this should suffice as we won't be specifying old # version formats or redundant trailing .0 in bootstrap.conf. # If we did want full compatibility then we should probably # use m4_version_compare from autoconf. func_sort_ver () { $debug_cmd printf '%s\n%s\n' "$1" "$2" \ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n } # func_lt_ver PREV CURR # --------------------- # Return true if PREV and CURR are in the correct order according to # func_sort_ver, otherwise false. Use it like this: # # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." func_lt_ver () { $debug_cmd test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: #! /bin/sh # Set a version string for this script. scriptversion=2014-01-07.03; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 # Copyright (C) 2010-2015 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. # 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 3 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, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # This file is a library for parsing options in your shell scripts along # with assorted other useful supporting features that you can make use # of too. # # For the simplest scripts you might need only: # # #!/bin/sh # . relative/path/to/funclib.sh # . relative/path/to/options-parser # scriptversion=1.0 # func_options ${1+"$@"} # eval set dummy "$func_options_result"; shift # ...rest of your script... # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file # starting with '# Written by ' and ending with '# warranty; '. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the # '# Written by ' line, like the one at the top of this file. # # The default options also support '--debug', which will turn on shell # execution tracing (see the comment above debug_cmd below for another # use), and '--verbose' and the func_verbose function to allow your script # to display verbose messages only when your user has specified # '--verbose'. # # After sourcing this file, you can plug processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. ## -------------- ## ## Configuration. ## ## -------------- ## # You should override these variables in your script after sourcing this # file so that they reflect the customisations you have added to the # option parser. # The usage line for option parsing errors and the start of '-h' and # '--help' output messages. You can embed shell variables for delayed # expansion at the time the message is displayed, but you will need to # quote other shell meta-characters carefully to prevent them being # expanded when the contents are evaled. usage='$progpath [OPTION]...' # Short help message in response to '-h' and '--help'. Add to this or # override it after sourcing this library to reflect the full set of # options your script accepts. usage_message="\ --debug enable verbose shell tracing -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -v, --verbose verbosely report processing --version print version information and exit -h, --help print short or long help message and exit " # Additional text appended to 'usage_message' in response to '--help'. long_help_message=" Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors" # Help message printed before fatal option parsing errors. fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## ## Hook function management. ## ## ------------------------- ## # This section contains functions for adding, removing, and running hooks # to the main code. A hook is just a named list of of function, that can # be run in order later on. # func_hookable FUNC_NAME # ----------------------- # Declare that FUNC_NAME will run hooks added with # 'func_add_hook FUNC_NAME ...'. func_hookable () { $debug_cmd func_append hookable_fns " $1" } # func_add_hook FUNC_NAME HOOK_FUNC # --------------------------------- # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must # first have been declared "hookable" by a call to 'func_hookable'. func_add_hook () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not accept hook functions." ;; esac eval func_append ${1}_hooks '" $2"' } # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ # Remove HOOK_FUNC from the list of functions called by FUNC_NAME. func_remove_hook () { $debug_cmd eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' } # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. # It is assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. func_run_hooks () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do eval $_G_hook '"$@"' # store returned options list back into positional # parameters for next 'cmd' execution. eval _G_hook_result=\$${_G_hook}_result eval set dummy "$_G_hook_result"; shift done func_quote_for_eval ${1+"$@"} func_run_hooks_result=$func_quote_for_eval_result } ## --------------- ## ## Option parsing. ## ## --------------- ## # In order to add your own option parsing hooks, you must accept the # full positional parameter list in your hook function, remove any # options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for # 'eval'. Like this: # # my_options_prep () # { # $debug_cmd # # # Extend the existing usage message. # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' # # func_quote_for_eval ${1+"$@"} # my_options_prep_result=$func_quote_for_eval_result # } # func_add_hook func_options_prep my_options_prep # # # my_silent_option () # { # $debug_cmd # # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in # --silent|-s) opt_silent=: ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift # ;; # *) set dummy "$_G_opt" "$*"; shift; break ;; # esac # done # # func_quote_for_eval ${1+"$@"} # my_silent_option_result=$func_quote_for_eval_result # } # func_add_hook func_parse_options my_silent_option # # # my_option_validation () # { # $debug_cmd # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # # func_quote_for_eval ${1+"$@"} # my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # # You'll alse need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the # individual implementations for details. func_hookable func_options func_options () { $debug_cmd func_options_prep ${1+"$@"} eval func_parse_options \ ${func_options_prep_result+"$func_options_prep_result"} eval func_validate_options \ ${func_parse_options_result+"$func_parse_options_result"} eval func_run_hooks func_options \ ${func_validate_options_result+"$func_validate_options_result"} # save modified positional parameters for caller func_options_result=$func_run_hooks_result } # func_options_prep [ARG]... # -------------------------- # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propogate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before # returning. func_hookable func_options_prep func_options_prep () { $debug_cmd # Option defaults: opt_verbose=false opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} # save modified positional parameters for caller func_options_prep_result=$func_run_hooks_result } # func_parse_options [ARG]... # --------------------------- # The main option parsing loop. func_hookable func_parse_options func_parse_options () { $debug_cmd func_parse_options_result= # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} # Adjust func_parse_options positional parameters to match eval set dummy "$func_run_hooks_result"; shift # Break out of the loop if we already parsed every option. test $# -gt 0 || break _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' func_echo "enabling shell trace mode" $debug_cmd ;; --no-warnings|--no-warning|--no-warn) set dummy --warnings none ${1+"$@"} shift ;; --warnings|--warning|-W) test $# = 0 && func_missing_arg $_G_opt && break case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above func_append_uniq opt_warning_types " $1" ;; *all) opt_warning_types=$warning_categories ;; *none) opt_warning_types=none warning_func=: ;; *error) opt_warning_types=$warning_categories warning_func=func_fatal_error ;; *) func_fatal_error \ "unsupported warning category: '$1'" ;; esac shift ;; --verbose|-v) opt_verbose=: ;; --version) func_version ;; -\?|-h) func_usage ;; --help) func_help ;; # Separate optargs to long options (plugins may need this): --*=*) func_split_equals "$_G_opt" set dummy "$func_split_equals_lhs" \ "$func_split_equals_rhs" ${1+"$@"} shift ;; # Separate optargs to short options: -W*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "$func_split_short_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-v*|-x*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} func_parse_options_result=$func_quote_for_eval_result } # func_validate_options [ARG]... # ------------------------------ # Perform any sanity checks on option settings and/or unconsumed # arguments. func_hookable func_validate_options func_validate_options () { $debug_cmd # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE # save modified positional parameters for caller func_validate_options_result=$func_run_hooks_result } ## ----------------- ## ## Helper functions. ## ## ----------------- ## # This section contains the helper functions used by the rest of the # hookable option parser framework in ascii-betical order. # func_fatal_help ARG... # ---------------------- # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { $debug_cmd eval \$ECHO \""Usage: $usage"\" eval \$ECHO \""$fatal_help"\" func_error ${1+"$@"} exit $EXIT_FAILURE } # func_help # --------- # Echo long help message to standard output and exit. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message" exit 0 } # func_missing_arg ARGNAME # ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $debug_cmd func_error "Missing argument for '$1'." exit_cmd=exit } # func_split_equals STRING # ------------------------ # Set func_split_equals_lhs and func_split_equals_rhs shell variables after # splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_equals () { $debug_cmd func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} test "x$func_split_equals_lhs" = "x$1" \ && func_split_equals_rhs= }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_equals () { $debug_cmd func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= test "x$func_split_equals_lhs" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals # func_split_short_opt SHORTOPT # ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_short_opt () { $debug_cmd func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"} }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_short_opt () { $debug_cmd func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt # func_usage # ---------- # Echo short help message to standard output and exit. func_usage () { $debug_cmd func_usage_message $ECHO "Run '$progname --help |${PAGER-more}' for full usage" exit 0 } # func_usage_message # ------------------ # Echo short help message to standard output. func_usage_message () { $debug_cmd eval \$ECHO \""Usage: $usage"\" echo $SED -n 's|^# || /^Written by/{ x;p;x } h /^Written by/q' < "$progpath" echo eval \$ECHO \""$usage_message"\" } # func_version # ------------ # Echo version message to standard output and exit. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' /(C)/!b go :more /\./!{ N s|\n# | | b more } :go /^# Written by /,/# warranty; / { s|^# || s|^# *$|| s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| p } /^# Written by / { s|^# || p } /^warranty; /q' < "$progpath" exit $? } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. scriptversion='(GNU libtool) 2.4.6' # func_echo ARG... # ---------------- # Libtool also displays the current mode in messages, so override # funclib.sh func_echo with this custom definition. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" done IFS=$func_echo_IFS } # func_warning ARG... # ------------------- # Libtool warnings are not categorized, so override funclib.sh # func_warning with this simpler definition. func_warning () { $debug_cmd $warning_func ${1+"$@"} } ## ---------------- ## ## Options parsing. ## ## ---------------- ## # Hook in the functions to make sure our own options are parsed during # the option parsing loop. usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --mode=MODE use operation mode MODE --no-warnings equivalent to '-Wnone' --preserve-dup-deps don't remove duplicate dependency libraries --quiet, --silent don't print informational messages --tag=TAG use configuration variables from tag TAG -v, --verbose print more informational messages than default --version print version information -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. When passed as first option, '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. Try '$progname --help --mode=MODE' for a more detailed description of MODE. When reporting a bug, please describe a test case to reproduce it and include the following information: host-triplet: $host shell: $SHELL compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) version: $progname (GNU libtool) 2.4.6 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . GNU libtool home page: . General help using GNU software: ." exit 0 } # func_lo2o OBJECT-NAME # --------------------- # Transform OBJECT-NAME from a '.lo' suffix to the platform specific # object suffix. lo2o=s/\\.lo\$/.$objext/ o2lo=s/\\.$objext\$/.lo/ if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_lo2o () { case $1 in *.lo) func_lo2o_result=${1%.lo}.$objext ;; * ) func_lo2o_result=$1 ;; esac }' # func_xform LIBOBJ-OR-SOURCE # --------------------------- # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) # suffix to a '.lo' libtool-object suffix. eval 'func_xform () { func_xform_result=${1%.*}.lo }' else # ...otherwise fall back to using sed. func_lo2o () { func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` } func_xform () { func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` } fi # func_fatal_configuration ARG... # ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } # func_config # ----------- # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # ------------- # Display the features supported by this script. func_features () { echo "host: $host" if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag TAGNAME # ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname=$1 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf=/$re_begincf/,/$re_endcf/p # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # libtool_options_prep [ARG]... # ----------------------------- # Preparation for options parsed by libtool. libtool_options_prep () { $debug_mode # Option defaults: opt_config=false opt_dlopen= opt_dry_run=false opt_help=false opt_mode= opt_preserve_dup_deps=false opt_quiet=false nonopt= preserve_args= # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Pass back the list of options. func_quote_for_eval ${1+"$@"} libtool_options_prep_result=$func_quote_for_eval_result } func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG]... # --------------------------------- # Provide handling for libtool specific options. libtool_parse_options () { $debug_cmd # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do _G_opt=$1 shift case $_G_opt in --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) func_config ;; --dlopen|-dlopen) opt_dlopen="${opt_dlopen+$opt_dlopen }$1" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) func_features ;; --finish) set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $_G_opt && break opt_mode=$1 case $1 in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $_G_opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" ;; --no-warnings|--no-warning|--no-warn) opt_warning=false func_append preserve_args " $_G_opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $_G_opt" ;; --silent|--quiet) opt_quiet=: opt_verbose=false func_append preserve_args " $_G_opt" ;; --tag) test $# = 0 && func_missing_arg $_G_opt && break opt_tag=$1 func_append preserve_args " $_G_opt $1" func_enable_tag "$1" shift ;; --verbose|-v) opt_quiet=false opt_verbose=: func_append preserve_args " $_G_opt" ;; # An option not handled by this hook function: *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} libtool_parse_options_result=$func_quote_for_eval_result } func_add_hook func_parse_options libtool_parse_options # libtool_validate_options [ARG]... # --------------------------------- # Perform any sanity checks on option settings and/or unconsumed # arguments. libtool_validate_options () { # save first non-option argument if test 0 -lt $#; then nonopt=$1 shift fi # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" case $host in # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match test yes != "$build_libtool_libs" \ && test yes != "$build_old_libs" \ && func_fatal_configuration "not configured to build any kind of library" # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test execute != "$opt_mode"; then func_error "unrecognized option '-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help=$help help="Try '$progname --help --mode=$opt_mode' for more information." } # Pass back the unparsed argument list func_quote_for_eval ${1+"$@"} libtool_validate_options_result=$func_quote_for_eval_result } func_add_hook func_validate_options libtool_validate_options # Process options as early as possible so that --help and --version # can return quickly. func_options ${1+"$@"} eval set dummy "$func_options_result"; shift ## ----------- ## ## Main. ## ## ----------- ## magic='%%%MAGIC variable%%%' magic_exe='%%%MAGIC EXE variable%%%' # Global variables. extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # func_generated_by_libtool # True iff stdin has been generated by Libtool. This function is only # a basic sanity check; it will hardly flush out determined imposters. func_generated_by_libtool_p () { $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test yes = "$lalib_p" } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { test -f "$1" && $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $debug_cmd save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # 'FILE.' does not work on cygwin managed mounts. func_source () { $debug_cmd case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $debug_cmd if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=$1 if test yes = "$build_libtool_libs"; then write_lobj=\'$2\' else write_lobj=none fi if test yes = "$build_old_libs"; then write_oldobj=\'$3\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $debug_cmd # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $debug_cmd if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $debug_cmd # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $debug_cmd if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result=$1 fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $debug_cmd if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result=$3 fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $debug_cmd case $4 in $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $debug_cmd $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $debug_cmd case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result=$1 } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $debug_cmd if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd=func_convert_path_$func_stripname_result fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $debug_cmd func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result=$1 } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_dll_def_p FILE # True iff FILE is a Windows DLL '.def' file. # Keep in sync with _LT_DLL_DEF_P in libtool.m4 func_dll_def_p () { $debug_cmd func_dll_def_p_tmp=`$SED -n \ -e 's/^[ ]*//' \ -e '/^\(;.*\)*$/d' \ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ -e q \ "$1"` test DEF = "$func_dll_def_p_tmp" } # func_mode_compile arg... func_mode_compile () { $debug_cmd # Get the compilation command and the source file. base_compile= srcfile=$nonopt # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg=$arg arg_mode=normal ;; target ) libobj=$arg arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs=$IFS; IFS=, for arg in $args; do IFS=$save_ifs func_append_quoted lastarg "$arg" done IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg=$srcfile srcfile=$arg ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj=$func_basename_result } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test yes = "$build_libtool_libs" \ || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname=$func_basename_result xdir=$func_dirname_result lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test no = "$compiler_c_o"; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext lockfile=$output_obj.lock else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test warn = "$need_locks"; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test yes = "$build_old_libs"; then if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix '.c' with the library object suffix, '.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to '-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the '--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the 'install' or 'cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE use a list of object files found in FILE to specify objects -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with '-') are ignored. Every other argument is treated as a filename. Files ending in '.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in '.la', then a libtool library is created, only library objects ('.lo' files) may be specified, and '-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created using 'ar' and 'ranlib', or on Windows using 'lib'. If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test : = "$opt_help"; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | $SED '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $debug_cmd # The first argument is the command name. cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "'$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir=$func_dirname_result ;; *) func_warning "'-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir=$absdir # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic=$magic # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file=$progdir/$program fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if $opt_dry_run; then # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS else if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd=\$cmd$args fi } test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $debug_cmd libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "'$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument '$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the '-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the '$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the '$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the '$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $debug_cmd # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=false stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=: if $isdir; then destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." destdir=$func_dirname_result destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "'$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir=$func_dirname_result func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking '$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname=$1 shift srcname=$realname test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme= ;; esac ;; os2*) case $realname in *_dll.a) tstripme= ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try 'ln -sf' first, because the 'ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name=$func_basename_result instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest=$destfile destfile= ;; *) func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext= case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=.exe fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script '$wrapper'" finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then func_warning "'$lib' has not been installed in '$libdir'" finalize=false fi done relink_command= func_source "$wrapper" outputname= if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file=$func_basename_result outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file=$outputname else func_warning "cannot relink '$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name=$func_basename_result # Set up the ranlib parameters. oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $debug_cmd my_outputname=$1 my_originator=$2 my_pic_p=${3-false} my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* External symbol declarations for the compiler. */\ " if test yes = "$dlself"; then func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi func_show_eval '$RM "${nlist}I"' if test -n "$global_symbol_to_import"; then eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[];\ " if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ static void lt_syminit(void) { LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; for (; symbol->name; ++symbol) {" $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" echo >> "$output_objdir/$my_dlsyms" "\ } }" fi echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = { {\"$my_originator\", (void *) 0}," if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ {\"@INIT@\", (void *) <_syminit}," fi case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for '$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $debug_cmd win32_libid_type=unknown win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || func_cygming_gnu_implib_p "$1" then win32_nmres=import else win32_nmres= fi ;; *) func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s|.*|import| p q } }'` ;; esac case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $debug_cmd sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $debug_cmd match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive that possess that section. Heuristic: eliminate # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $debug_cmd if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result= fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $debug_cmd f_ex_an_ar_dir=$1; shift f_ex_an_ar_oldlib=$1 if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $debug_cmd my_gentop=$1; shift my_oldlibs=${1+"$@"} my_oldobjs= my_xlib= my_xabs= my_xdir= for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir=$my_gentop/$my_xlib_u func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` func_basename "$darwin_archive" darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches; do func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" cd "unfat-$$/$darwin_base_archive-$darwin_arch" func_extract_an_archive "`pwd`" "$darwin_base_archive" cd "$darwin_curdir" $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result=$my_oldobjs } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test yes = "$fast_install"; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else \$ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* declarations of non-ANSI functions */ #if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ #if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC #elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined other platforms ... */ #endif #if defined PATH_MAX # define LT_PATHMAX PATH_MAX #elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ defined __OS2__ # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free (stale); stale = 0; } \ } while (0) #if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; size_t tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined HAVE_DOS_BASED_FILE_SYSTEM if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined HAVE_DOS_BASED_FILE_SYSTEM } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = (size_t) (q - p); p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (STREQ (str, pat)) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else size_t len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { size_t orig_value_len = strlen (orig_value); size_t add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ size_t len = strlen (new_value); while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $debug_cmd case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_suncc_cstd_abi # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! # Several compiler flags select an ABI that is incompatible with the # Cstd library. Avoid specifying it if any are in CXXFLAGS. func_suncc_cstd_abi () { $debug_cmd case " $compile_command " in *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) suncc_use_cstd_abi=no ;; *) suncc_use_cstd_abi=yes ;; esac } # func_mode_link arg... func_mode_link () { $debug_cmd case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=false prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test yes != "$build_libtool_libs" \ && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg=$1 shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir=$arg prev= continue ;; dlfiles|dlprefiles) $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=: } case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test no = "$dlself"; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test dlprefiles = "$prev"; then dlself=yes elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols=$arg test -f "$arg" \ || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex=$arg prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir=$arg prev= continue ;; mllvm) # Clang does not use LLVM to link, so we can simply discard any # '-mllvm $arg' options when doing the link step. prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object fi # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; os2dllname) os2dllname=$arg prev= continue ;; precious_regex) precious_files_regex=$arg prev= continue ;; release) release=-$arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds=$arg prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg=$arg case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between '-L' and '$1'" else func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of '$dir'" dir=$absdir ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test X-lc = "X$arg" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test X-lc = "X$arg" && continue ;; esac elif test X-lc_r = "X$arg"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -mllvm) prev=mllvm continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module=$wl-multi_module continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "'-no-install' is ignored for $host" func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -os2dllname) prev=os2dllname continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ -specs=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; -Z*) if test os2 = "`expr $host : '.*\(os2\)'`"; then # OS/2 uses -Zxxx to specify OS/2-specific options compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case $arg in -Zlinker | -Zstack) prev=xcompiler ;; esac continue else # Otherwise treat like 'Some other compiler flag' below func_quote_for_eval "$arg" arg=$func_quote_for_eval_result fi ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result test none = "$pic_object" || { # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object } # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the '$prevarg' option requires an argument" if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname=$func_basename_result libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" # Definition is injected by LT_CONFIG during libtool generation. func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" func_dirname "$output" "/" "" output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test lib = "$linkmode"; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs=$tmp_deplibs fi if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass"; then libs=$deplibs deplibs= fi if test prog = "$linkmode"; then case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs=$dlprefiles fi if test dlopen = "$pass"; then # Collect dlpreopened libraries save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test lib != "$linkmode" && test prog != "$linkmode"; then func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test lib = "$linkmode"; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib=$searchdir/lib$name$search_ext if test -f "$lib"; then if test .la = "$search_ext"; then found=: else found=false fi break 2 fi done done if $found; then # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll=$l done if test "X$ll" = "X$old_library"; then # only static version available found=false func_dirname "$lib" "" "." ladir=$func_dirname_result lib=$ladir/$old_library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi else # deplib doesn't seem to be a libtool library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi ;; # -l *.ltframework) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=: fi ;; pass_all) valid_a_lib=: ;; esac if $valid_a_lib; then echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" else echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." fi ;; esac continue ;; prog) if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test conv = "$pass"; then deplibs="$deplib $deplibs" elif test prog = "$linkmode"; then if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=: continue ;; esac # case $deplib $found || test -f "$lib" \ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir=$func_dirname_result dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass" || { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" elif test prog != "$linkmode" && test lib != "$linkmode"; then func_fatal_error "'$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test yes = "$prefer_static_libs" || test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib=$l done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. if test dlopen = "$pass"; then test -z "$libdir" \ && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || test yes != "$dlopen_support" || test no = "$build_libtool_libs" then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir=$ladir fi ;; esac func_basename "$lib" laname=$func_basename_result # Find the relevant object directory and library name. if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library '$lib' was moved." dir=$ladir absdir=$abs_ladir libdir=$abs_ladir else dir=$lt_sysroot$libdir absdir=$lt_sysroot$libdir fi test yes = "$hardcode_automatic" && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir=$ladir absdir=$abs_ladir # Remove this search path later func_append notinst_path " $abs_ladir" else dir=$ladir/$objdir absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test dlpreopen = "$pass"; then if test -z "$libdir" && test prog = "$linkmode"; then func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" elif test prog,link = "$linkmode,$pass"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=false if test no != "$link_all_deplibs" || test -z "$library_names" || test no = "$build_libtool_libs"; then linkalldeplibs=: fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && { { test no = "$prefer_static_libs" || test built,yes = "$prefer_static_libs,$installed"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then # Make sure the rpath contains only unique directories. case $temp_rpath: in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if $alldeplibs && { test pass_all = "$deplibs_check_method" || { test yes = "$build_libtool_libs" && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule=$dlpremoduletest break fi done if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo if test prog = "$linkmode"; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test lib = "$linkmode" && test yes = "$hardcode_into_libs"; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname=$1 shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname=$dlname elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result versuffix=-$major ;; esac eval soname=\"$soname_spec\" else soname=$realname fi # Make a new name for the extract_expsyms_cmds to use soroot=$soname func_basename "$soroot" soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test no = "$hardcode_direct"; then add=$dir/$linklib case $host in *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; *-*-sysv4*uw2*) add_dir=-L$dir ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir=-L$dir ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library"; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add=$dir/$old_library fi elif test -n "$old_library"; then add=$dir/$old_library fi fi esac elif test no = "$hardcode_minus_L"; then case $host in *-*-sunos*) add_shlibpath=$dir ;; esac add_dir=-L$dir add=-l$name elif test no = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; relink) if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$dir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name elif test yes = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; *) lib_linked=no ;; esac if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test prog = "$linkmode"; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test yes != "$hardcode_direct" && test yes != "$hardcode_minus_L" && test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$libdir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$libdir add=-l$name elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add=-l$name elif test yes = "$hardcode_automatic"; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib"; then add=$inst_prefix_dir$libdir/$linklib else add=$libdir/$linklib fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir=-L$libdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name fi if test prog = "$linkmode"; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test prog = "$linkmode"; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test unsupported != "$hardcode_direct"; then test -n "$old_library" && linklib=$old_library compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test yes = "$build_libtool_libs"; then # Not a shared library if test pass_all != "$deplibs_check_method"; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system cannot link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test yes = "$module"; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** 'nm' from GNU binutils and a full rebuild may help." fi if test no = "$build_old_libs"; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test lib = "$linkmode"; then if test -n "$dependency_libs" && { test yes != "$hardcode_into_libs" || test yes = "$build_old_libs" || test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of '$dir'" absdir=$dir fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names"; then for tmp in $deplibrary_names; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl"; then depdepl=$absdir/$objdir/$depdepl darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) path=-L$absdir/$objdir ;; esac else eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "'$deplib' seems to be moved" path=-L$absdir fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test link = "$pass"; then if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs=$newdependency_libs if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test dlopen != "$pass"; then test conv = "$pass" || { # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= } if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" else vars=deplibs fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Add Sun CC postdeps if required: test CXX = "$tagname" && { case $host_os in linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; solaris*) func_cc_basename "$CC" case $func_cc_basename_result in CC* | sunCC*) func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; esac } # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i= ;; esac if test -n "$i"; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test prog = "$linkmode"; then dlfiles=$newdlfiles fi if test prog = "$linkmode" || test lib = "$linkmode"; then dlprefiles=$newdlprefiles fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs=$output func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test no = "$module" \ && func_fatal_help "libtool library '$output' must begin with 'lib'" if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test pass_all != "$deplibs_check_method"; then func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test no = "$dlself" \ || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test 1 -lt "$#" \ && func_warning "ignoring multiple '-rpath's for a libtool library" install_libdir=$1 oldlibs= if test -z "$rpath"; then if test yes = "$build_libtool_libs"; then # Building a libtool convenience library. # Some compilers have problems with a '.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift IFS=$save_ifs test -n "$7" && \ func_fatal_help "too many parameters to '-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major=$1 number_minor=$2 number_revision=$3 # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_revision ;; freebsd-aout|qnx|sunos) current=$number_major revision=$number_minor age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_minor lt_irix_increment=no ;; esac ;; no) current=$1 revision=$2 age=$3 ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT '$current' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION '$revision' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE '$age' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE '$age' is greater than the current interface number '$current'" func_fatal_error "'$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" # On Darwin other compilers case $CC in nagfor*) verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" ;; *) verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; esac ;; freebsd-aout) major=.$current versuffix=.$current.$revision ;; freebsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; irix | nonstopux) if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring=$verstring_prefix$major.$revision # Add in all the interfaces that we are compatible with. loop=$revision while test 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring_prefix$major.$iface:$verstring done # Before this point, $major must not contain '.'. major=.$major versuffix=$major.$revision ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=.$current.$age.$revision verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring:$iface.0 done # Make executables depend on our current version. func_append verstring ":$current.0" ;; qnx) major=.$current versuffix=.$current ;; sco) major=.$current versuffix=.$current ;; sunos) major=.$current versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result versuffix=-$major ;; *) func_fatal_configuration "unknown library version type '$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring=0.0 ;; esac if test no = "$need_version"; then versuffix= else versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided if test yes,no = "$avoid_version,$need_version"; then major= versuffix= verstring= fi # Check to see if the archive will have undefined symbols. if test yes = "$allow_undefined"; then if test unsupported = "$allow_undefined_flag"; then if test yes = "$build_old_libs"; then func_warning "undefined symbols not allowed in $host shared libraries; building static only" build_libtool_libs=no else func_fatal_error "can't build $host shared library unless -no-undefined is specified" fi fi else # Don't allow undefined symbols. allow_undefined_flag=$no_undefined_flag fi fi func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" test " " = "$libobjs" && libobjs= if test relink != "$opt_mode"; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles=$dlfiles dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles=$dlprefiles dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test yes = "$build_libtool_need_lc"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release= versuffix= major= newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib=$potent_lib while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | $SED 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib= ;; esac fi if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib=$potent_lib # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test yes = "$allow_libtool_libs_with_static_runtimes"; then for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test none = "$deplibs_check_method"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test yes = "$droppeddeps"; then if test yes = "$module"; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** 'nm' from GNU binutils and a full rebuild may help." fi if test no = "$build_old_libs"; then oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test no = "$allow_undefined"; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test no = "$build_old_libs"; then oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs=$new_libs # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test yes = "$build_libtool_libs"; then # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath=$finalize_rpath test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath=$finalize_shlibpath test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname=$1 shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname=$realname fi if test -z "$dlname"; then dlname=$soname fi lib=$output_objdir/$realname linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS=$save_ifs if test -n "$export_symbols_regex" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi ${skipped_export-false} && { func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi } test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs=$IFS; IFS='~' for cmd in $concat_cmds; do IFS=$save_ifs $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi } libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs=$IFS; IFS='~' for cmd in $cmds; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs # Restore the uninstalled library and exit if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. dlname=$soname fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ func_warning "'-version-info' is ignored for objects" test -n "$release" && \ func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj=$output ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # if reload_cmds runs $LD directly, get rid of -Wl from # whole_archive_flag_spec and hope we can get by with turning comma # into space. case $reload_cmds in *\$LD[\ \$]*) wl= ;; esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS } if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "'-version-info' is ignored for programs" test -n "$release" && \ func_warning "'-release' is ignored for programs" $preload \ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " $wl-bind_at_load" func_append finalize_command " $wl-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath=$rpath rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath=$rpath if test -n "$libobjs" && test yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=false ;; *cygwin* | *mingw* ) test yes = "$build_libtool_libs" || wrappers_required=false ;; *) if test no = "$need_relink" || test yes != "$build_libtool_libs"; then wrappers_required=false fi ;; esac $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.$objext"; then func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status } if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test yes = "$no_install"; then # We don't need to create a wrapper script. link_command=$compile_var$compile_command$compile_rpath # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi case $hardcode_action,$fast_install in relink,*) # Fast installation is not supported link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath func_warning "this platform does not like uninstalled shared libraries" func_warning "'$output' will be relinked during installation" ;; *,yes) link_command=$finalize_var$compile_command$finalize_rpath relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` ;; *,no) link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath ;; *,needless) link_command=$finalize_var$compile_command$finalize_rpath relink_command= ;; esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource=$output_path/$objdir/lt-$output_name.c cwrapper=$output_path/$output_name.exe $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do case $build_libtool_libs in convenience) oldobjs="$libobjs_save $symfileobj" addlibs=$convenience build_libtool_libs=no ;; module) oldobjs=$libobjs_save addlibs=$old_convenience build_libtool_libs=no ;; *) oldobjs="$old_deplibs $non_pic_objects" $preload && test -f "$symfileobj" \ && func_append oldobjs " $symfileobj" addlibs=$old_convenience ;; esac if test -n "$addlibs"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj"; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test yes = "$installed"; then if test -z "$install_libdir"; then break fi output=$output_objdir/${outputname}i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name=$func_basename_result func_resolve_sysroot "$deplib" eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } if test link = "$opt_mode" || test relink = "$opt_mode"; then func_mode_link ${1+"$@"} fi # func_mode_uninstall arg... func_mode_uninstall () { $debug_cmd RM=$nonopt files= rmforce=false exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic for arg do case $arg in -f) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir=$func_dirname_result if test . = "$dir"; then odir=$objdir else odir=$dir/$objdir fi func_basename "$file" name=$func_basename_result test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif $rmforce; then continue fi rmfiles=$file case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.$objext" if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name"; then func_append rmfiles " $odir/lt-$noexename.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then func_mode_uninstall ${1+"$@"} fi test -z "$opt_mode" && { help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # where we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: zbar-0.23/config/compile0000755000175000017500000001633213471606247012157 00000000000000#!/usr/bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2018-03-07.03; # UTC # Copyright (C) 1999-2018 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 # 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, see . # 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 # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= 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 . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done 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 "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; 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 break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: zbar-0.23/config/config.sub0000755000175000017500000007530713471606247012573 00000000000000#!/usr/bin/sh # Configuration validation subroutine script. # Copyright 1992-2018 Free Software Foundation, Inc. timestamp='2018-08-29' # 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 3 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, see . # # 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 Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # 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. # You can get the latest version of this script from: # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # 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 or ALIAS Canonicalize a configuration name. Options: -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 1992-2018 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 ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # 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 ;; * ) 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 # Split fields of configuration type IFS="-" read -r field1 field2 field3 field4 <&2 exit 1 ;; *-*-*-*) basic_machine=$field1-$field2 os=$field3-$field4 ;; *-*-*) # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two # parts maybe_os=$field2-$field3 case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ | storm-chaos* | os2-emx* | rtmk-nova*) basic_machine=$field1 os=$maybe_os ;; android-linux) basic_machine=$field1-unknown os=linux-android ;; *) basic_machine=$field1-$field2 os=$field3 ;; esac ;; *-*) # A lone config we happen to match not fitting any patern case $field1-$field2 in decstation-3100) basic_machine=mips-dec os= ;; *-*) # Second component is usually, but not always the OS case $field2 in # Prevent following clause from handling this valid os sun*os*) basic_machine=$field1 os=$field2 ;; # Manufacturers dec* | mips* | sequent* | encore* | pc533* | 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 | knuth | cray \ | microblaze* | sim | cisco \ | oki | wec | wrs | winbond) basic_machine=$field1-$field2 os= ;; *) basic_machine=$field1 os=$field2 ;; esac ;; esac ;; *) # Convert single-component short-hands not valid as part of # multi-component configurations. case $field1 in 386bsd) basic_machine=i386-pc os=bsd ;; a29khif) basic_machine=a29k-amd os=udi ;; adobe68k) basic_machine=m68010-adobe os=scout ;; alliant) basic_machine=fx80-alliant os= ;; altos | altos3068) basic_machine=m68k-altos os= ;; am29k) basic_machine=a29k-none os=bsd ;; amdahl) basic_machine=580-amdahl os=sysv ;; amiga) basic_machine=m68k-unknown os= ;; 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 ;; aros) basic_machine=i386-pc os=aros ;; aux) basic_machine=m68k-apple os=aux ;; balance) basic_machine=ns32k-sequent os=dynix ;; blackfin) basic_machine=bfin-unknown os=linux ;; cegcc) basic_machine=arm-unknown os=cegcc ;; 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) basic_machine=j90-cray os=unicos ;; crds | unos) basic_machine=m68k-crds os= ;; da30) basic_machine=m68k-da30 os= ;; decstation | pmax | pmin | dec3100 | decstatn) basic_machine=mips-dec os= ;; delta88) basic_machine=m88k-motorola os=sysv3 ;; dicos) basic_machine=i686-pc os=dicos ;; djgpp) basic_machine=i586-pc os=msdosdjgpp ;; ebmon29k) basic_machine=a29k-amd os=ebmon ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=ose ;; gmicro) basic_machine=tron-gmicro os=sysv ;; go32) basic_machine=i386-pc os=go32 ;; 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 ;; hppaosf) basic_machine=hppa1.1-hp os=osf ;; hppro) basic_machine=hppa1.1-hp os=proelf ;; i386mach) basic_machine=i386-mach os=mach ;; vsta) basic_machine=i386-pc os=vsta ;; isi68 | isi) basic_machine=m68k-isi os=sysv ;; m68knommu) basic_machine=m68k-unknown os=linux ;; magnum | m3230) basic_machine=mips-mips os=sysv ;; merlin) basic_machine=ns32k-utek os=sysv ;; mingw64) basic_machine=x86_64-pc os=mingw64 ;; mingw32) basic_machine=i686-pc os=mingw32 ;; mingw32ce) basic_machine=arm-unknown os=mingw32ce ;; monitor) basic_machine=m68k-rom68k os=coff ;; morphos) basic_machine=powerpc-unknown os=morphos ;; moxiebox) basic_machine=moxie-unknown os=moxiebox ;; msdos) basic_machine=i386-pc os=msdos ;; msys) basic_machine=i686-pc os=msys ;; mvs) basic_machine=i370-ibm os=mvs ;; nacl) basic_machine=le32-unknown os=nacl ;; ncr3000) basic_machine=i486-ncr os=sysv4 ;; netbsd386) basic_machine=i386-pc 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 ;; necv70) basic_machine=v70-nec os=sysv ;; 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 ;; os400) basic_machine=powerpc-ibm os=os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=ose ;; os68k) basic_machine=m68k-none os=os68k ;; paragon) basic_machine=i860-intel os=osf ;; parisc) basic_machine=hppa-unknown os=linux ;; pw32) basic_machine=i586-unknown os=pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=rdos ;; rdos32) basic_machine=i386-pc os=rdos ;; rom68k) basic_machine=m68k-rom68k os=coff ;; sa29200) basic_machine=a29k-amd os=udi ;; sei) basic_machine=mips-sei os=seiux ;; sequent) basic_machine=i386-sequent os= ;; sps7) basic_machine=m68k-bull os=sysv2 ;; st2000) basic_machine=m68k-tandem os= ;; stratus) basic_machine=i860-stratus os=sysv4 ;; sun2) basic_machine=m68000-sun os= ;; sun2os3) basic_machine=m68000-sun os=sunos3 ;; sun2os4) basic_machine=m68000-sun os=sunos4 ;; sun3) basic_machine=m68k-sun os= ;; sun3os3) basic_machine=m68k-sun os=sunos3 ;; sun3os4) basic_machine=m68k-sun os=sunos4 ;; sun4) basic_machine=sparc-sun os= ;; sun4os3) basic_machine=sparc-sun os=sunos3 ;; sun4os4) basic_machine=sparc-sun os=sunos4 ;; sun4sol2) basic_machine=sparc-sun os=solaris2 ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun os= ;; sv1) basic_machine=sv1-cray os=unicos ;; symmetry) basic_machine=i386-sequent os=dynix ;; t3e) basic_machine=alphaev5-cray os=unicos ;; t90) basic_machine=t90-cray os=unicos ;; toad1) basic_machine=pdp10-xkl os=tops20 ;; tpf) basic_machine=s390x-ibm os=tpf ;; 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 ;; vxworks960) basic_machine=i960-wrs os=vxworks ;; vxworks68) basic_machine=m68k-wrs os=vxworks ;; vxworks29k) basic_machine=a29k-wrs os=vxworks ;; xbox) basic_machine=i686-pc os=mingw32 ;; ymp) basic_machine=ymp-cray os=unicos ;; *) basic_machine=$1 os= ;; esac ;; esac # Decode 1-component or ad-hoc basic machines case $basic_machine in # 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) cpu=hppa1.1 vendor=winbond ;; op50n) cpu=hppa1.1 vendor=oki ;; op60c) cpu=hppa1.1 vendor=oki ;; ibm*) cpu=i370 vendor=ibm ;; orion105) cpu=clipper vendor=highlevel ;; mac | mpw | mac-mpw) cpu=m68k vendor=apple ;; pmac | pmac-mpw) cpu=powerpc vendor=apple ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) cpu=m68000 vendor=att ;; 3b*) cpu=we32k vendor=att ;; bluegene*) cpu=powerpc vendor=ibm os=cnk ;; decsystem10* | dec10*) cpu=pdp10 vendor=dec os=tops10 ;; decsystem20* | dec20*) cpu=pdp10 vendor=dec os=tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) cpu=m68k vendor=motorola ;; dpx2*) cpu=m68k vendor=bull os=sysv3 ;; encore | umax | mmax) cpu=ns32k vendor=encore ;; elxsi) cpu=elxsi vendor=elxsi os=${os:-bsd} ;; fx2800) cpu=i860 vendor=alliant ;; genix) cpu=ns32k vendor=ns ;; h3050r* | hiux*) cpu=hppa1.1 vendor=hitachi os=hiuxwe2 ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) cpu=m68000 vendor=hp ;; hp9k3[2-9][0-9]) cpu=m68k vendor=hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) cpu=hppa1.1 vendor=hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; i*86v32) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc os=sysv32 ;; i*86v4*) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc os=sysv4 ;; i*86v) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc os=sysv ;; i*86sol2) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc os=solaris2 ;; j90 | j90-cray) cpu=j90 vendor=cray os=${os:-unicos} ;; iris | iris4d) cpu=mips vendor=sgi case $os in irix*) ;; *) os=irix4 ;; esac ;; miniframe) cpu=m68000 vendor=convergent ;; *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) cpu=m68k vendor=atari os=mint ;; news-3600 | risc-news) cpu=mips vendor=sony os=newsos ;; next | m*-next) cpu=m68k vendor=next case $os in nextstep* ) ;; ns2*) os=nextstep2 ;; *) os=nextstep3 ;; esac ;; np1) cpu=np1 vendor=gould ;; op50n-* | op60c-*) cpu=hppa1.1 vendor=oki os=proelf ;; pa-hitachi) cpu=hppa1.1 vendor=hitachi os=hiuxwe2 ;; pbd) cpu=sparc vendor=tti ;; pbb) cpu=m68k vendor=tti ;; pc532) cpu=ns32k vendor=pc532 ;; pn) cpu=pn vendor=gould ;; power) cpu=power vendor=ibm ;; ps2) cpu=i386 vendor=ibm ;; rm[46]00) cpu=mips vendor=siemens ;; rtpc | rtpc-*) cpu=romp vendor=ibm ;; sde) cpu=mipsisa32 vendor=sde os=${os:-elf} ;; simso-wrs) cpu=sparclite vendor=wrs os=vxworks ;; tower | tower-32) cpu=m68k vendor=ncr ;; vpp*|vx|vx-*) cpu=f301 vendor=fujitsu ;; w65) cpu=w65 vendor=wdc ;; w89k-*) cpu=hppa1.1 vendor=winbond os=proelf ;; none) cpu=none vendor=none ;; leon|leon[3-9]) cpu=sparc vendor=$basic_machine ;; leon-*|leon[3-9]-*) cpu=sparc vendor=`echo "$basic_machine" | sed 's/-.*//'` ;; *-*) IFS="-" read -r cpu vendor <&2 exit 1 ;; esac ;; esac # Here we canonicalize certain aliases for manufacturers. case $vendor in digital*) vendor=dec ;; commodore*) vendor=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. auroraux) os=auroraux ;; bluegene*) os=cnk ;; solaris1 | solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; solaris) os=solaris2 ;; unixware*) os=sysv4.2uw ;; gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # es1800 is here to avoid being matched by es* (a different OS) es1800*) os=ose ;; # Some version numbers need modification chorusos*) os=chorusos ;; isc) os=isc2.2 ;; sco6) os=sco5v6 ;; sco5) os=sco3.2v5 ;; sco4) os=sco3.2v4 ;; sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` ;; sco3.2v[4-9]* | sco5v6*) # Don't forget version if it is 3.2v4 or newer. ;; scout) # Don't match below ;; sco*) os=sco3.2v2 ;; psos*) os=psos ;; # Now 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* | esix* | aix* | cnk* | sunos | sunos[34]*\ | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ | sym* | kopensolaris* | plan9* \ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ | aos* | aros* | cloudabi* | sortix* \ | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ | knetbsd* | mirbsd* | netbsd* \ | bitrig* | openbsd* | solidbsd* | libertybsd* \ | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \ | chorusrdb* | cegcc* | glidix* \ | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \ | linux-newlib* | linux-musl* | linux-uclibc* \ | uxpv* | beos* | mpeix* | udk* | moxiebox* \ | interix* | uwin* | mks* | rhapsody* | darwin* \ | openstep* | oskit* | conix* | pw32* | nonstopux* \ | storm-chaos* | tops10* | tenex* | tops20* | its* \ | os2* | vos* | palmos* | uclinux* | nucleus* \ | morphos* | superux* | rtmk* | windiss* \ | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ | skyos* | haiku* | rdos* | toppers* | drops* | es* \ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | midnightbsd*) # Remember, each alternative MUST END IN *, to match a version number. ;; qnx*) case $cpu in x86 | i*86) ;; *) os=nto-$os ;; esac ;; hiux*) os=hiuxwe2 ;; nto-qnx*) ;; nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; sim | xray | os68k* | v88r* \ | windows* | osx | abug | netware* | os9* \ | macos* | mpw* | magic* | mmixware* | mon960* | lnews*) ;; linux-dietlibc) os=linux-dietlibc ;; linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; lynx*178) os=lynxos178 ;; lynx*5) os=lynxos5 ;; lynx*) os=lynxos ;; mac*) os=`echo "$os" | sed -e 's|mac|macos|'` ;; opened*) os=openedition ;; os400*) os=os400 ;; sunos5*) os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; sunos6*) os=`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; wince*) os=wince ;; utek*) os=bsd ;; dynix*) os=bsd ;; acis*) os=aos ;; atheos*) os=atheos ;; syllable*) os=syllable ;; 386bsd) os=bsd ;; ctix* | uts*) os=sysv ;; nova*) os=rtmk-nova ;; ns2) os=nextstep2 ;; nsk*) os=nsk ;; # Preserve the version number of sinix5. sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; sinix*) os=sysv4 ;; tpf*) os=tpf ;; triton*) os=sysv3 ;; oss*) os=sysv3 ;; svr4*) os=sysv4 ;; svr3) os=sysv3 ;; sysvr4) os=sysv4 ;; # This must come after sysvr4. sysv*) ;; ose*) os=ose ;; *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) os=mint ;; zvmoe) os=zvmoe ;; dicos*) os=dicos ;; pikeos*) # Until real need of OS specific support for # particular features comes up, bare metal # configurations are quite functional. case $cpu in arm*) os=eabi ;; *) os=elf ;; esac ;; nacl*) ;; ios) ;; none) ;; *-eabi) ;; *) 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 $cpu-$vendor in score-*) os=elf ;; spu-*) os=elf ;; *-acorn) os=riscix1.2 ;; arm*-rebel) os=linux ;; arm*-semi) os=aout ;; c4x-* | tic4x-*) os=coff ;; c8051-*) os=elf ;; clipper-intergraph) os=clix ;; hexagon-*) os=elf ;; tic54x-*) os=coff ;; tic55x-*) os=coff ;; tic6x-*) os=coff ;; # This must come before the *-dec entry. 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 ;; m68*-cisco) os=aout ;; mep-*) os=elf ;; mips*-cisco) os=elf ;; mips*-*) os=elf ;; or32-*) os=coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=sysv3 ;; sparc-* | *-sun) os=sunos4.1.1 ;; pru-*) os=elf ;; *-be) os=beos ;; *-ibm) os=aix ;; *-knuth) os=mmixware ;; *-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 ;; *-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 ;; *-wrs) os=vxworks ;; *) 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. case $vendor in unknown) case $os in riscix*) vendor=acorn ;; sunos*) vendor=sun ;; cnk*|-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 ;; clix*) vendor=intergraph ;; mvs* | opened*) vendor=ibm ;; os400*) vendor=ibm ;; ptx*) vendor=sequent ;; tpf*) vendor=ibm ;; vxsim* | vxworks* | windiss*) vendor=wrs ;; aux*) vendor=apple ;; hms*) vendor=hitachi ;; mpw* | macos*) vendor=apple ;; *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) vendor=atari ;; vos*) vendor=stratus ;; esac ;; esac echo "$cpu-$vendor-$os" exit # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: zbar-0.23/config/ltversion.m40000644000175000017500000000127313471606242013061 00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004, 2011-2015 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. # @configure_input@ # serial 4179 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.6]) m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.6' macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) zbar-0.23/config/depcomp0000755000175000017500000005602313471606247012157 00000000000000#!/usr/bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2018-03-07.03; # UTC # Copyright (C) 1999-2018 Free Software Foundation, Inc. # 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, see . # 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. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: zbar-0.23/config/ltoptions.m40000644000175000017500000003426213471606242013073 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 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 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option '$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl 'shared' nor 'disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the 'shared' and # 'disable-shared' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the 'static' and # 'disable-static' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the 'fast-install' # and 'disable-fast-install' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_AIX_SONAME([DEFAULT]) # ---------------------------------- # implement the --with-aix-soname flag, and support the `aix-soname=aix' # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. m4_define([_LT_WITH_AIX_SONAME], [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[[5-9]]*,yes) AC_MSG_CHECKING([which variant of shared library versioning to provide]) AC_ARG_WITH([aix-soname], [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], [case $withval in aix|svr4|both) ;; *) AC_MSG_ERROR([Unknown argument to --with-aix-soname]) ;; esac lt_cv_with_aix_soname=$with_aix_soname], [AC_CACHE_VAL([lt_cv_with_aix_soname], [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) with_aix_soname=$lt_cv_with_aix_soname]) AC_MSG_RESULT([$with_aix_soname]) if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac _LT_DECL([], [shared_archive_member_spec], [0], [Shared archive member basename, for filename based shared library versioning on AIX])dnl ])# _LT_WITH_AIX_SONAME LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # LT_INIT options. # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac], [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) zbar-0.23/config/libtool.m40000644000175000017500000112530613471606242012505 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # 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. m4_define([_LT_COPYING], [dnl # Copyright (C) 2014 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. # GNU Libtool 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 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool 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, see . ]) # serial 58 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_PREPARE_CC_BASENAME # ----------------------- m4_defun([_LT_PREPARE_CC_BASENAME], [ # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in @S|@*""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } ])# _LT_PREPARE_CC_BASENAME # _LT_CC_BASENAME(CC) # ------------------- # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, # but that macro is also expanded into generated libtool script, which # arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], [m4_require([_LT_PREPARE_CC_BASENAME])dnl AC_REQUIRE([_LT_DECL_SED])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl func_cc_basename $1 cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the 'libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to 'config.status' so that its # declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags='_LT_TAGS'dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into 'config.status', and then the shell code to quote escape them in # for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # '#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test 0 = "$lt_write_fail" && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ '$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test 0 != $[#] do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try '$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test yes = "$silent" && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 _LT_COPYING _LT_LIBTOOL_TAGS # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE _LT_PREPARE_MUNGE_PATH_LIST _LT_PREPARE_CC_BASENAME # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS=$save_LDFLAGS ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[[012]][[,.]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test yes = "$lt_cv_ld_force_load"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script that will find a shell with a builtin # printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case $ECHO in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ]) if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) ]) ]) ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links=nottested if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test no = "$hard_links"; then AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_PREPARE_MUNGE_PATH_LIST # --------------------------- # Make sure func_munge_path_list() is defined correctly. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], [[# func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x@S|@2 in x) ;; *:) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" ;; x:*) eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; *::*) eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" ;; *) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; esac } ]])# _LT_PREPARE_PATH_LIST # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown AC_ARG_VAR([LT_SYS_LIBRARY_PATH], [User-defined run-time library search path.]) case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a[(]lib.so.V[)]' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], [Detected run-time system search path for libraries]) _LT_DECL([], [configure_time_lt_sys_library_path], [2], [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$1"; then lt_cv_path_MAGIC_CMD=$ac_dir/"$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], [if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi]) rm -f conftest.i conftest2.i conftest.out]) ])# _LT_PATH_DD # _LT_CMD_TRUNCATE # ---------------- # find command to truncate a binary pipe m4_defun([_LT_CMD_TRUNCATE], [m4_require([_LT_PATH_DD]) AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], [printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], [Command to truncate a binary pipe]) ])# _LT_CMD_TRUNCATE # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # _LT_DLL_DEF_P([FILE]) # --------------------- # True iff FILE is a Windows DLL '.def' file. # Keep in sync with func_dll_def_p in the libtool script AC_DEFUN([_LT_DLL_DEF_P], [dnl test DEF = "`$SED -n dnl -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl -e q dnl Only consider the first "real" line $1`" dnl ])# _LT_DLL_DEF_P # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([nm_interface], [lt_cv_nm_interface], [1], [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS=$save_LDFLAGS]) if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; osf3*) if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test yes = "$GCC"; then wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting $shlibpath_var if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC=$lt_save_CC ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(GCC, $1)=$GXX _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case @S|@2 in .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)=$prev$p else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)=$p else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test no = "$F77"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$G77 _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test no = "$FC"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS zbar-0.23/config/ltsugar.m40000644000175000017500000001044013471606242012511 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 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 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59, which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) zbar-0.23/config/lt~obsolete.m40000644000175000017500000001377413471606242013417 00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 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 5 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. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) zbar-0.23/COPYING0000664000175000017500000000237713471225700010364 00000000000000The ZBar Bar Code Reader is Copyright (C) 2007-2011 Jeff Brown The QR Code reader is Copyright (C) 1999-2009 Timothy B. Terriberry You can redistribute this library and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ISAAC is based on the public domain implementation by Robert J. Jenkins Jr., and is itself public domain. Portions of the bit stream reader are copyright (C) The Xiph.Org Foundation 1994-2008, and are licensed under a BSD-style license. The Reed-Solomon decoder is derived from an implementation (C) 1991-1995 Henry Minsky (hqm@ua.com, hqm@ai.mit.edu), and is licensed under the LGPL with permission. zbar-0.23/zbar.ico0000664000175000017500000001425613466560613010773 00000000000000(6 ¨^00¨ ( ¨üüÿWWÿÿÿÿD@D@DD131DD131DDA4@DDA3@DD@3@DD@C@DD@D0DD@D1DD@D1DD@DADD@D@DD@D@DD131DD131DD@D@D( @õõý^ùùþJ”‘@@Ùè33ÖOOÇÂüüÿ22ÈHHÇïïüc¬¬îccà–‚ƒƒæssÅIIÚ@@Çkµµ¿¬¬ÀééûžÏÏõ=)]]ß}}å&™™Âppâ„&&É66Ö±±Àßßù((ÈÿÿÿEòòü©©î£ÉÉô€€æ. 99×44ÈYYÝ++É¿¿¿  ÁLLÆ2222AA2AA222AA22222222AA2AA222AA22222222AA2AA222AA2222229 ,6, ,6, 666 666 ,6, ?222- ,6, ,6, 666 666 ,6, 2222 ,6, ,6, 666 666 ,6, ?2222*,618AA222AA22222226,BA222AA22222222/, =(A222AA22222222A ,+222AA22222222A)<,6 22AA22222222AA,6,9>22AA22222222AA26, 22AA22222222AA2A, 6#22AA22222222AA2A>D 6;'22AA22222222AA2A?6602AA22222222AA2AA 66(2AA22222222AA2AA2'!6  2AA22222222AA2AA2:! 6>2AA22222222AA2AA23 662AA22222222AA2AA2 6665AA22222222AA2AA2266- A22222222AA2AA226 1$A22222222AA2AA22.7 ,22222222AA2AA22C,62222222AA2AA22"@6,2222% ,6, ,6, 666 666 ,6, 92222 ,6, ,6, 666 666 ,6, 4222% ,6, ,6, 666 666 ,6, &222222AA2AA222AA22222222AA2AA222AA22222222AA2AA222AA2222àààààààààààààààààààààààààààààààà(0` õõý®¦ùùþŸŸì6²>>Cììû¿¿ò::Œ”£&& ²²ï––êDDMMÜ”@@Ù}__bè``ß33ÖPPqzSSÜf%%{üüÿRïïüÂÂó±??B¶ °ââù™™ëÕÕö™))ž¨¬¬îBB‚ccà–VVÝ//e SSo hééû¬ÜÜøž¢¢ì††ç›]]߇}}å&!!„ppâCCÙ„LLwp66Ö```55Vÿÿÿòòü@@@==G©©î´£ååù®ÉÉô€€æ((uMMv+““éffà99×==Ø66Ua^^cQQQQQQOOQQQQOOQQSSQSSQQOOQQQQQQQQQQQQOOQQQQOOQQSSQSSQQOOQQQQQQQQQQQQOOQQQQOOQQSSQSSQQOOQQQQQQQQQQQQOOQQQQOOQQSSQSSQQOOQQQQQQQQ\aaaaaaaaaaaaa`QQQQ/'W''W'(WWW((WWW('W'`QQQQA'W''W'(WWW((WWW('W'aQQQQU'W''W'(WWW((WWW('W'`QQQQQE'W'aaaaaaaaaa`QQQQQa'W'e+QQOOQQSSQSSQQOOQQQQQQQQQQR4'W'=QOOQQSSQSSQQOOQQQQQQQQQQQXW' OOQQSSQSSQQOOQQQQQQQQQQQQ^>'1hOQQSSQSSQQOOQQQQQQQQQQQQO-"OQQSSQSSQQOOQQQQQQQQQQQQON':QQSSQSSQQOOQQQQQQQQQQQQOO'W QQSSQSSQQOOQQQQQQQQQQQQOOQ\'W' QSSQSSQQOOQQQQQQQQQQQQOOQI'W'b[SSQSSQQOOQQQQQQQQQQQQOOQQ'W'PSQSSQQOOQQQQQQQQQQQQOOQQQR.W'iSQSSQQOOQQQQQQQQQQQQOOQQQQ73'(D6SQSSQQOOQQQQQQQQQQQQOOQQQQOF%(W"SQSSQQOOQQQQQQQQQQQQOOQQQQOLb(WW&QSSQQOOQQQQQQQQQQQQOOQQQQOON(WWWQSSQQOOQQQQQQQQQQQQOOQQQQOOQ(WWW(@SSQQOOQQQQQQQQQQQQOOQQQQOOQQGWWW(5SQQOOQQQQQQQQQQQQOOQQQQOOQQSMWW(<_SQQOOQQQQQQQQQQQQOOQQQQOOQQS"KW((BSQQOOQQQQQQQQQQQQOOQQQQOOQQSi ((WZHSQQOOQQQQQQQQQQQQOOQQQQOOQQSc (WWQQOOQQQQQQQQQQQQOOQQQQOOQQSfe(WWW2QOOQQQQQQQQQQQQOOQQQQOOQQSS$YWWW(\ OOQQQQQQQQQQQQOOQQQQOOQQSSQ]WWW(`OOQQQQQQQQQQQQOOQQQQOOQQSSQS!WW(0OQQQQQQQQQQQQOOQQQQOOQQSSQSgW(VFOQQQQQQQQQQQQOOQQQQOOQQSSQSd8(',QQQQQQQQQQQQOOQQQQOOQQSSQS9?'W;QQQQQQQQQQQOOQQQQOOQQSSQST'W'4#QQQQQQQQQQOOQQQQOOQQSSQSS)J'W'CQQQQQ aaaaaaaaaab'W'IQQQQ*'W''W'(WWW((WWW('W'QQQQa'W''W'(WWW((WWW('W'aQQQQ*'W''W'(WWW((WWW('W'@QQQQ *aaaaaaaaaaaaa\QQQQQQQQOOQQQQOOQQSSQSSQQOOQQQQQQQQQQQQOOQQQQOOQQSSQSSQQOOQQQQQQQQQQQQOOQQQQOOQQSSQSSQQOOQQQQQQQQQQQQOOQQQQOOQQSSQSSQQOOQQQQQQððððððððððððððððððððððððððððððððððððððððððððððððzbar-0.23/NEWS.md0000664000175000017500000001402513471225716010427 00000000000000ZBar Barcode Reader News ======================== Version 0.23 ============ Update ZBar for it to work with updated library versions, making it compatible with either Gtk2 or Gtk3 and either Python2 or Python3. As part of the new port, it is now possible to use ZBar Gtk bindings not only with python2/python3, but also on other languages, as it now uses GObject Introspection- GIR, with is a method to allow using libraries developed on one language on others. Several languages support it. On Windows side, support for DirectShow was added. Version 0.22.2 (2019-04-29) =========================== Some fixes to another set of Windows issues and to support Java 11. Version 0.22.1 (2019-04-25) =========================== Some fixes to allow building ZBar on Windows with MinGw. Version 0.22 (2019-02-20) ========================= Lots of improvements at zbarcam-qt, allowing it to fully configure the decoders that will be used, and the options that will be used at the decoders. Some improvements at the image scanner logic and plugin selection. Version 0.21 (2019-02-12) ========================= Added support for SQ code, and the ability of compiling ZBar with the LLVM/Clang compiler. Several bugs fixes and enhancements are also found in this release; qexisting users are encouraged to upgrade. Version 0.20.1 (2018-08-08) =========================== Minor changes at ZBar, in order to adapt to modern distributions with are removing /usr/bin/python in favor of just using python2. Also, updated some python2 scripts to work with modern distros, where the Image module is now inside PIL. Version 0.20 (2017-04-11) ========================= As upstream didn't have any version since 2009, created a ZBar fork at linuxtv.org. This release improves a lot V4L2 support, by using libv4l2 to handle formats that are alien to ZBar, making it compatible with a lot more webcam models. Qt support was also updated, making it compatible with Qt5. ZBar now have two other GUI applications (zbarcam-qt and zbarcam-gtk). With zbarcam-qt, it is now possible to adjust the camera controls, making easier to read barcodes using a camera. Version 0.10 (2009-10-23) ========================= ZBar goes 2D! This release introduces support for QR Code, developed by our new project member, Timothy Terriberry. Timothy is an image processing master, providing this sophisticated functionality using only integer arithmetic and maintaining an extremely small image size. Feel free to drop in on #zbar over at freenode to welcome Timothy (aka derf) to the project and congratulate him on his awesome work. Several bugs fixes and enhancements are also found in this release; existing users are encouraged to upgrade. Version 0.9 (2009-08-31) ======================== Introducing ZBar for Windows! So far we only have straight ports of the command line applications, but work on a cross-platform GUI has already begun. This release also has a few scanner/decoder enhancements and fixes several bugs. Many internal changes are represented, so please open a support request if you experience any problems. Version 0.8 (2009-06-05) ======================== This is a bugfix release just to clean up a few issues found in the last release. Existing users are encouraged to upgrade to pick up these fixes. 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 Windows! 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 upgrade. 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 commands 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 zbar-0.23/gtk/0000775000175000017500000000000013471606260010171 500000000000000zbar-0.23/gtk/zbargtk.c0000664000175000017500000006575013471225716011741 00000000000000/*------------------------------------------------------------------------ * Copyright 2008-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #ifdef HAVE_X #include #elif defined(_WIN32) #include #endif #include #include "zbargtkprivate.h" #include "zbarmarshal.h" #ifndef G_PARAM_STATIC_STRINGS # define G_PARAM_STATIC_STRINGS (G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB) #endif #define DEFAULT_WIDTH 640 #define DEFAULT_HEIGHT 480 enum { DECODED, DECODED_TEXT, LAST_SIGNAL }; enum { PROP_0, PROP_VIDEO_DEVICE, PROP_VIDEO_ENABLED, PROP_VIDEO_OPENED, }; static guint zbar_gtk_signals[LAST_SIGNAL] = { 0 }; G_DEFINE_TYPE(ZBarGtk, zbar_gtk, GTK_TYPE_WIDGET); /* FIXME what todo w/errors? OOM? */ /* FIXME signal failure notifications to main gui idle handler */ void zbar_gtk_release_pixbuf (zbar_image_t *img) { GdkPixbuf *pixbuf = zbar_image_get_userdata(img); g_assert(GDK_IS_PIXBUF(pixbuf)); /* remove reference */ zbar_image_set_userdata(img, NULL); /* release reference to associated pixbuf and it's data */ g_object_unref(pixbuf); } gboolean zbar_gtk_image_from_pixbuf (zbar_image_t *zimg, GdkPixbuf *pixbuf) { /* apparently should always be packed RGB? */ GdkColorspace colorspace = gdk_pixbuf_get_colorspace(pixbuf); if(colorspace != GDK_COLORSPACE_RGB) { g_warning("non-RGB color space not supported: %d\n", colorspace); return(FALSE); } int nchannels = gdk_pixbuf_get_n_channels(pixbuf); int bps = gdk_pixbuf_get_bits_per_sample(pixbuf); long type = 0; /* these are all guesses... */ if(nchannels == 3 && bps == 8) type = zbar_fourcc('R','G','B','3'); else if(nchannels == 4 && bps == 8) type = zbar_fourcc('B','G','R','4'); /* FIXME alpha flipped?! */ else if(nchannels == 1 && bps == 8) type = zbar_fourcc('Y','8','0','0'); else if(nchannels == 3 && bps == 5) type = zbar_fourcc('R','G','B','R'); else if(nchannels == 3 && bps == 4) type = zbar_fourcc('R','4','4','4'); /* FIXME maybe? */ else { g_warning("unsupported combination: nchannels=%d bps=%d\n", nchannels, bps); return(FALSE); } zbar_image_set_format(zimg, type); /* FIXME we don't deal w/bpl... * this will cause problems w/unpadded pixbufs :| */ unsigned pitch = gdk_pixbuf_get_rowstride(pixbuf); unsigned width = pitch / ((nchannels * bps) / 8); if((width * nchannels * 8 / bps) != pitch) { g_warning("unsupported: width=%d nchannels=%d bps=%d rowstride=%d\n", width, nchannels, bps, pitch); return(FALSE); } unsigned height = gdk_pixbuf_get_height(pixbuf); /* FIXME this isn't correct either */ unsigned long datalen = width * height * nchannels; zbar_image_set_size(zimg, width, height); /* when the zbar image is released, the pixbuf will be * automatically be released */ zbar_image_set_userdata(zimg, pixbuf); zbar_image_set_data(zimg, gdk_pixbuf_get_pixels(pixbuf), datalen, zbar_gtk_release_pixbuf); #ifdef DEBUG_ZBARGTK g_message("colorspace=%d nchannels=%d bps=%d type=%.4s(%08lx)\n" "\tpitch=%d width=%d height=%d datalen=0x%lx\n", colorspace, nchannels, bps, (char*)&type, type, pitch, width, height, datalen); #endif return(TRUE); } static inline gboolean zbar_gtk_video_open (ZBarGtk *self, const char *video_device) { ZBarGtkPrivate *zbar = ZBAR_GTK_PRIVATE(self->_private); gboolean video_opened = FALSE; zbar->video_opened = FALSE; if(zbar->idle_id) g_object_notify(G_OBJECT(self), "video-opened"); if(zbar->window) { /* ensure old video doesn't have image ref * (FIXME handle video destroyed w/images outstanding) */ zbar_window_draw(zbar->window, NULL); gtk_widget_queue_draw(GTK_WIDGET(self)); } if(zbar->video) { zbar_video_destroy(zbar->video); zbar->video = NULL; } if(video_device && video_device[0] && zbar->idle_id) { /* create video * FIXME video should support re-open */ zbar->video = zbar_video_create(); g_assert(zbar->video); if(zbar_video_open(zbar->video, video_device)) { zbar_video_error_spew(zbar->video, 0); zbar_video_destroy(zbar->video); zbar->video = NULL; /* FIXME error propagation */ return(FALSE); } /* negotiation accesses the window format list, * so we hold the lock for this part */ if(zbar->video_width && zbar->video_height) zbar_video_request_size(zbar->video, zbar->video_width, zbar->video_height); video_opened = !zbar_negotiate_format(zbar->video, zbar->window); if(video_opened) { zbar->req_width = zbar_video_get_width(zbar->video); zbar->req_height = zbar_video_get_height(zbar->video); } gtk_widget_queue_resize(GTK_WIDGET(self)); zbar->video_opened = video_opened; if(zbar->idle_id) g_object_notify(G_OBJECT(self), "video-opened"); } return(video_opened); } static inline int zbar_gtk_process_image (ZBarGtk *self, zbar_image_t *image) { ZBarGtkPrivate *zbar = ZBAR_GTK_PRIVATE(self->_private); if(!image) return(-1); zbar_image_t *tmp = zbar_image_convert(image, zbar_fourcc('Y','8','0','0')); if(!tmp) return(-1); zbar_image_scanner_recycle_image(zbar->scanner, image); int rc = zbar_scan_image(zbar->scanner, tmp); zbar_image_set_symbols(image, zbar_image_get_symbols(tmp)); zbar_image_destroy(tmp); if(rc < 0) return(rc); if(rc && zbar->idle_id) { /* update decode results */ const zbar_symbol_t *sym; for(sym = zbar_image_first_symbol(image); sym; sym = zbar_symbol_next(sym)) if(!zbar_symbol_get_count(sym)) { zbar_symbol_type_t type = zbar_symbol_get_type(sym); const char *data = zbar_symbol_get_data(sym); g_signal_emit(self, zbar_gtk_signals[DECODED], 0, type, data); /* FIXME skip this when unconnected? */ gchar *text = g_strconcat(zbar_get_symbol_name(type), ":", data, NULL); g_signal_emit(self, zbar_gtk_signals[DECODED_TEXT], 0, text); g_free(text); } } if(zbar->window) { rc = zbar_window_draw(zbar->window, image); gtk_widget_queue_draw(GTK_WIDGET(self)); } else rc = -1; return(rc); } static gboolean zbar_processing_idle_callback(gpointer data) { ZBarGtk *self = data; ZBarGtkPrivate *zbar = ZBAR_GTK_PRIVATE(self->_private); GValue *msg = g_async_queue_try_pop(zbar->queue); if (!msg) { if (zbar->video_enabled_state) { zbar_image_t *image = zbar_video_next_image(zbar->video); if(zbar_gtk_process_image(self, image) < 0) zbar->video_enabled_state = FALSE; if(image) zbar_image_destroy(image); if (zbar->video_enabled_state) return TRUE; if(zbar_video_enable(zbar->video, 0)) { zbar_video_error_spew(zbar->video, 0); zbar->video_enabled_state = FALSE; } zbar_image_scanner_enable_cache(zbar->scanner, 0); /* release video image and revert to logo */ if(zbar->window) { zbar_window_draw(zbar->window, NULL); gtk_widget_queue_draw(GTK_WIDGET(self)); } /* must have been an error while streaming */ zbar_gtk_video_open(self, NULL); } return TRUE; } g_assert(G_IS_VALUE(msg)); GType type = G_VALUE_TYPE(msg); if(type == G_TYPE_INT) { /* video state change */ int state = g_value_get_int(msg); if(state < 0) { /* error identifying state */ g_value_unset(msg); g_free(msg); return TRUE; } g_assert(state >= 0 && state <= 1); zbar->video_enabled_state = (state != 0); } else if(type == G_TYPE_STRING) { /* open new video device */ const char *video_device = g_value_get_string(msg); zbar->video_enabled_state = zbar_gtk_video_open(self, video_device); } else if(type == GDK_TYPE_PIXBUF) { /* scan provided image and broadcast results */ zbar_image_t *image = zbar_image_create(); GdkPixbuf *pixbuf = GDK_PIXBUF(g_value_dup_object(msg)); if(zbar_gtk_image_from_pixbuf(image, pixbuf)) zbar_gtk_process_image(self, image); else g_object_unref(pixbuf); zbar_image_destroy(image); } else { gchar *dbg = g_strdup_value_contents(msg); g_warning("unknown message type (%x) received: %s\n", (unsigned)type, dbg); g_free(dbg); } g_value_unset(msg); g_free(msg); msg = NULL; if(zbar->video_enabled_state) { /* release reference to any previous pixbuf */ if(zbar->window) zbar_window_draw(zbar->window, NULL); if(zbar_video_enable(zbar->video, 1)) { zbar_video_error_spew(zbar->video, 0); zbar->video_enabled_state = FALSE; return TRUE; } zbar_image_scanner_enable_cache(zbar->scanner, 1); return TRUE; } return TRUE; } static void zbar_gtk_realize (GtkWidget *widget) { ZBarGtk *self = ZBAR_GTK(widget); if(!self->_private) return; ZBarGtkPrivate *zbar = ZBAR_GTK_PRIVATE(self->_private); gtk_widget_set_realized(widget, TRUE); #if GTK_MAJOR_VERSION >= 3 && GTK_MINOR_VERSION >= 14 // FIXME: this is deprecated after 3.14 - no idea what replaces it #else gtk_widget_set_double_buffered(widget, FALSE); #endif GdkWindowAttr attributes; GtkAllocation allocation; gtk_widget_get_allocation(widget, &allocation); attributes.x = allocation.x; attributes.y = allocation.y; attributes.width = allocation.width; attributes.height = allocation.height; attributes.wclass = GDK_INPUT_OUTPUT; attributes.window_type = GDK_WINDOW_CHILD; attributes.event_mask = (gtk_widget_get_events(widget) | GDK_EXPOSURE_MASK); GdkWindow *window = gdk_window_new(gtk_widget_get_parent_window(widget), &attributes, GDK_WA_X | GDK_WA_Y); gtk_widget_set_window(widget, window); gdk_window_set_user_data(window, widget); #if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 18 gdk_window_set_background_pattern(window, NULL); #elif GTK_MAJOR_VERSION < 3 gdk_window_set_back_pixmap(window, NULL, TRUE); #endif /* attach zbar_window to underlying X window */ #ifdef HAVE_X if(zbar_window_attach(zbar->window, GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), GDK_WINDOW_XID(window))) #elif defined(_WIN32) if(zbar_window_attach(zbar->window, GDK_WINDOW_HWND (window), 0)) #endif zbar_window_error_spew(zbar->window, 0); } static inline GValue *zbar_gtk_new_value (GType type) { return(g_value_init(g_malloc0(sizeof(GValue)), type)); } static void zbar_gtk_unrealize (GtkWidget *widget) { GdkWindow *window; if(gtk_widget_get_mapped(widget)) gtk_widget_unmap(widget); gtk_widget_set_mapped(widget, FALSE); ZBarGtk *self = ZBAR_GTK(widget); if(!self->_private) return; ZBarGtkPrivate *zbar = ZBAR_GTK_PRIVATE(self->_private); if(zbar->video_enabled) { zbar->video_enabled = FALSE; GValue *msg = zbar_gtk_new_value(G_TYPE_INT); g_value_set_int(msg, 0); g_async_queue_push(zbar->queue, msg); } zbar_window_attach(zbar->window, NULL, 0); gtk_widget_set_realized(widget, FALSE); window = gtk_widget_get_window(widget); gdk_window_set_user_data(window, NULL); gdk_window_destroy(window); gtk_widget_set_window(widget, NULL); } #if GTK_MAJOR_VERSION >= 3 static void zbar_get_preferred_width(GtkWidget *widget, gint *minimum_width, gint *natural_width) { ZBarGtk *self = ZBAR_GTK(widget); if(!self->_private) return; ZBarGtkPrivate *zbar = ZBAR_GTK_PRIVATE(self->_private); /* use native video size (max) if available, * arbitrary defaults otherwise. * video attributes maintained under main gui idle handler */ #if GTK_MAJOR_VERSION >= 3 && GTK_MINOR_VERSION >= 22 GdkRectangle geo; GdkDisplay *display = gdk_display_get_default(); GdkMonitor *monitor = gdk_display_get_monitor(display, 0); gdk_monitor_get_geometry(monitor, &geo); unsigned int screen_width = geo.width; #else unsigned int screen_width = gdk_screen_width(); #endif if (zbar->req_width > screen_width) { float scale = screen_width * .8 / zbar->req_width; zbar->req_width *= scale; zbar->req_height *= scale; } *minimum_width = zbar->req_width; *natural_width = zbar->req_width; } static void zbar_get_preferred_height(GtkWidget *widget, gint *minimum_height, gint *natural_height) { ZBarGtk *self = ZBAR_GTK(widget); if(!self->_private) return; ZBarGtkPrivate *zbar = ZBAR_GTK_PRIVATE(self->_private); /* use native video size (max) if available, * arbitrary defaults otherwise. * video attributes maintained under main gui idle handler */ #if GTK_MAJOR_VERSION >= 3 && GTK_MINOR_VERSION >= 22 GdkRectangle geo; GdkDisplay *display = gdk_display_get_default(); GdkMonitor *monitor = gdk_display_get_monitor(display, 0); gdk_monitor_get_geometry(monitor, &geo); unsigned int screen_height = geo.height; #else unsigned int screen_height = gdk_screen_height(); #endif if (zbar->req_height > screen_height) { float scale = screen_height * .8 / zbar->req_height; zbar->req_width *= scale; zbar->req_height *= scale; } *minimum_height = zbar->req_height; *natural_height = zbar->req_height; } static gboolean zbar_gtk_scale_draw(GtkWidget *widget, cairo_t *cr) { // NOTE: should we change something here? ZBarGtk *self = ZBAR_GTK(widget); if(!self->_private) return(FALSE); ZBarGtkPrivate *zbar = ZBAR_GTK_PRIVATE(self->_private); if(gtk_widget_get_visible(widget) && gtk_widget_get_mapped(widget) && zbar_window_redraw(zbar->window)) return(TRUE); return(FALSE); } #else static void zbar_gtk_size_request (GtkWidget *widget, GtkRequisition *requisition) { ZBarGtk *self = ZBAR_GTK(widget); if(!self->_private) return; ZBarGtkPrivate *zbar = ZBAR_GTK_PRIVATE(self->_private); /* use native video size (max) if available, * arbitrary defaults otherwise. * video attributes maintained under main gui idle handler */ requisition->width = zbar->req_width; requisition->height = zbar->req_height; } static gboolean zbar_gtk_expose (GtkWidget *widget, GdkEventExpose *event) { ZBarGtk *self = ZBAR_GTK(widget); if(!self->_private) return(FALSE); ZBarGtkPrivate *zbar = ZBAR_GTK_PRIVATE(self->_private); if(gtk_widget_get_visible(widget) && gtk_widget_get_mapped(widget) && zbar_window_redraw(zbar->window)) return(TRUE); return(FALSE); } #endif static void zbar_gtk_size_allocate (GtkWidget *widget, GtkAllocation *allocation) { ZBarGtk *self = ZBAR_GTK(widget); if(!self->_private) return; ZBarGtkPrivate *zbar = ZBAR_GTK_PRIVATE(self->_private); (*GTK_WIDGET_CLASS(zbar_gtk_parent_class)->size_allocate) (widget, allocation); if(zbar->window) zbar_window_resize(zbar->window, allocation->width, allocation->height); } void zbar_gtk_scan_image (ZBarGtk *self, GdkPixbuf *img) { if(!self->_private) return; ZBarGtkPrivate *zbar = ZBAR_GTK_PRIVATE(self->_private); g_object_ref(G_OBJECT(img)); /* queue for scanning by the processor idle handler */ GValue *msg = zbar_gtk_new_value(GDK_TYPE_PIXBUF); /* this grabs a new reference to the image, * eventually released by the processor idle handler */ g_value_set_object(msg, img); g_async_queue_push(zbar->queue, msg); } const char *zbar_gtk_get_video_device (ZBarGtk *self) { if(!self->_private) return(NULL); ZBarGtkPrivate *zbar = ZBAR_GTK_PRIVATE(self->_private); if(zbar->video_device) return(zbar->video_device); else return(""); } void zbar_gtk_set_video_device (ZBarGtk *self, const char *video_device) { if(!self->_private) return; ZBarGtkPrivate *zbar = ZBAR_GTK_PRIVATE(self->_private); g_free((void*)zbar->video_device); zbar->video_device = g_strdup(video_device); zbar->video_enabled = video_device && video_device[0]; /* push another copy to processor idle handler */ GValue *msg = zbar_gtk_new_value(G_TYPE_STRING); if(video_device) g_value_set_string(msg, video_device); else g_value_set_static_string(msg, ""); g_async_queue_push(zbar->queue, msg); g_object_freeze_notify(G_OBJECT(self)); g_object_notify(G_OBJECT(self), "video-device"); g_object_notify(G_OBJECT(self), "video-enabled"); g_object_thaw_notify(G_OBJECT(self)); } gboolean zbar_gtk_get_video_enabled (ZBarGtk *self) { if(!self->_private) return(FALSE); ZBarGtkPrivate *zbar = ZBAR_GTK_PRIVATE(self->_private); return(zbar->video_enabled); } void zbar_gtk_set_video_enabled (ZBarGtk *self, gboolean video_enabled) { if(!self->_private) return; ZBarGtkPrivate *zbar = ZBAR_GTK_PRIVATE(self->_private); video_enabled = (video_enabled != FALSE); if(zbar->video_enabled != video_enabled) { zbar->video_enabled = video_enabled; /* push state change to processor idle handler */ GValue *msg = zbar_gtk_new_value(G_TYPE_INT); g_value_set_int(msg, zbar->video_enabled); g_async_queue_push(zbar->queue, msg); g_object_notify(G_OBJECT(self), "video-enabled"); } } gboolean zbar_gtk_get_video_opened (ZBarGtk *self) { if(!self->_private) return(FALSE); ZBarGtkPrivate *zbar = ZBAR_GTK_PRIVATE(self->_private); return(zbar->video_opened); } void zbar_gtk_request_video_size (ZBarGtk *self, int width, int height) { if(!self->_private || width < 0 || height < 0) return; ZBarGtkPrivate *zbar = ZBAR_GTK_PRIVATE(self->_private); zbar->req_width = zbar->video_width = width; zbar->req_height = zbar->video_height = height; gtk_widget_queue_resize(GTK_WIDGET(self)); } static void zbar_gtk_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { ZBarGtk *self = ZBAR_GTK(object); switch(prop_id) { case PROP_VIDEO_DEVICE: zbar_gtk_set_video_device(self, g_value_get_string(value)); break; case PROP_VIDEO_ENABLED: zbar_gtk_set_video_enabled(self, g_value_get_boolean(value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); } } static void zbar_gtk_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { ZBarGtk *self = ZBAR_GTK(object); if(!self->_private) return; ZBarGtkPrivate *zbar = ZBAR_GTK_PRIVATE(self->_private); switch(prop_id) { case PROP_VIDEO_DEVICE: if(zbar->video_device) g_value_set_string(value, zbar->video_device); else g_value_set_static_string(value, ""); break; case PROP_VIDEO_ENABLED: g_value_set_boolean(value, zbar->video_enabled); break; case PROP_VIDEO_OPENED: g_value_set_boolean(value, zbar->video_opened); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); } } static void zbar_gtk_init (ZBarGtk *self) { ZBarGtkPrivate *zbar = g_object_new(ZBAR_TYPE_GTK_PRIVATE, NULL); self->_private = (void*)zbar; zbar->window = zbar_window_create(); g_assert(zbar->window); zbar->req_width = zbar->video_width = DEFAULT_WIDTH; zbar->req_height = zbar->video_width = DEFAULT_HEIGHT; /* use a queue to signalize about the need to handle decoding and video */ zbar->queue = g_async_queue_new(); zbar->idle_id = g_idle_add(zbar_processing_idle_callback, self); zbar->video_enabled_state = FALSE; /* Prepare for idle handler */ g_object_ref(zbar); g_assert(zbar->queue); g_async_queue_ref(zbar->queue); zbar->scanner = zbar_image_scanner_create(); g_assert(zbar->scanner); } static void zbar_gtk_dispose (GObject *object) { ZBarGtk *self = ZBAR_GTK(object); if(!self->_private) return; ZBarGtkPrivate *zbar = ZBAR_GTK_PRIVATE(self->_private); self->_private = NULL; g_free((void*)zbar->video_device); zbar->video_device = NULL; /* signal processor idle handler to exit */ GValue *msg = zbar_gtk_new_value(G_TYPE_INT); g_value_set_int(msg, -1); g_async_queue_push(zbar->queue, msg); zbar->idle_id = 0; /* there are no external references which might call other APIs */ g_async_queue_unref(zbar->queue); g_object_unref(G_OBJECT(zbar)); } static void zbar_gtk_private_finalize (GObject *object) { ZBarGtkPrivate *zbar = ZBAR_GTK_PRIVATE(object); if (zbar->idle_id) { if(zbar->window) zbar_window_draw(zbar->window, NULL); g_object_unref(zbar); g_source_remove(zbar->idle_id); zbar->idle_id = 0; } if(zbar->window) { zbar_window_destroy(zbar->window); zbar->window = NULL; } if(zbar->scanner) { zbar_image_scanner_destroy(zbar->scanner); zbar->scanner = NULL; } if(zbar->video) { zbar_video_destroy(zbar->video); zbar->video = NULL; } g_async_queue_unref(zbar->queue); zbar->queue = NULL; } static void zbar_gtk_class_init (ZBarGtkClass *klass) { zbar_gtk_parent_class = g_type_class_peek_parent(klass); GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->dispose = zbar_gtk_dispose; object_class->set_property = zbar_gtk_set_property; object_class->get_property = zbar_gtk_get_property; GtkWidgetClass *widget_class = (GtkWidgetClass*)klass; widget_class->realize = zbar_gtk_realize; widget_class->unrealize = zbar_gtk_unrealize; #if GTK_MAJOR_VERSION >= 3 widget_class->get_preferred_width = zbar_get_preferred_width; widget_class->get_preferred_height = zbar_get_preferred_height; widget_class->draw = zbar_gtk_scale_draw; #else widget_class->size_request = zbar_gtk_size_request; widget_class->expose_event = zbar_gtk_expose; #endif widget_class->size_allocate = zbar_gtk_size_allocate; widget_class->unmap = NULL; zbar_gtk_signals[DECODED] = g_signal_new("decoded", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_CLEANUP, G_STRUCT_OFFSET(ZBarGtkClass, decoded), NULL, NULL, zbar_marshal_VOID__INT_STRING, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_STRING); zbar_gtk_signals[DECODED_TEXT] = g_signal_new("decoded-text", G_TYPE_FROM_CLASS(object_class), G_SIGNAL_RUN_CLEANUP, G_STRUCT_OFFSET(ZBarGtkClass, decoded_text), NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); GParamSpec *p = g_param_spec_string("video-device", "Video device", "the platform specific name of the video device", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); g_object_class_install_property(object_class, PROP_VIDEO_DEVICE, p); p = g_param_spec_boolean("video-enabled", "Video enabled", "controls streaming from the video device", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); g_object_class_install_property(object_class, PROP_VIDEO_ENABLED, p); p = g_param_spec_boolean("video-opened", "Video opened", "current opened state of the video device", FALSE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); g_object_class_install_property(object_class, PROP_VIDEO_OPENED, p); } static void zbar_gtk_private_class_init (ZBarGtkPrivateClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->finalize = zbar_gtk_private_finalize; } static GType zbar_gtk_private_get_type (void) { static GType type = 0; if(!type) { static const GTypeInfo info = { sizeof(ZBarGtkPrivateClass), NULL, NULL, (GClassInitFunc)zbar_gtk_private_class_init, NULL, NULL, sizeof(ZBarGtkPrivate), }; type = g_type_register_static(G_TYPE_OBJECT, "ZBarGtkPrivate", &info, 0); } return(type); } GtkWidget *zbar_gtk_new (void) { return(GTK_WIDGET(g_object_new(ZBAR_TYPE_GTK, NULL))); } zbar-0.23/gtk/ZBar-1.0.gir0000664000175000017500000004353313471606260011756 00000000000000 create a new barcode reader widget instance. initially has no associated video device or image. a new #ZBarGtk widget instance utility function to populate a zbar_image_t from a GdkPixbuf. TRUE if successful or FALSE if the conversion could not be performed for some reason the zbar library image destination to populate the GdkPixbuf source pointer to #ZBarGtk the GdkPixbuf used to store the image retrieve the currently opened video device. the current video device or NULL if no device is opened pointer to #ZBarGtk retrieve the current video enabled state. true if video scanning is currently enabled, false otherwise pointer to #ZBarGtk retrieve the current video opened state. true if video device is currently opened, false otherwise pointer to #ZBarGtk set video camera resolution. @note this call must be made before video is initialized pointer to #ZBarGtk width in pixels height in pixels pointer to #ZBarGtk the GdkPixbuf used to store the image open a new video device. @note since opening a device may take some time, this call will return immediately and the device will be opened asynchronously pointer to #ZBarGtk the platform specific name of the device to open. use NULL to close a currently opened device. enable/disable video scanning. has no effect unless a video device is opened pointer to #ZBarGtk true to enable video scanning, false to disable emitted when a barcode is decoded from an image. the symbol type and contained data are provided as separate parameters the type of symbol decoded (a zbar_symbol_type_t) the data decoded from the symbol emitted when a barcode is decoded from an image. the symbol type name is prefixed to the data, separated by a colon the decoded data prefixed by the string name of the symbol type (separated by a colon) pointer to #ZBarGtk the GdkPixbuf used to store the image zbar-0.23/gtk/Makefile.in0000664000175000017500000007426113471606247012175 00000000000000# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @HAVE_X_TRUE@am__append_1 = -DHAVE_X @HAVE_INTROSPECTION_TRUE@am__append_2 = $(dist_gir_DATA) $(typelib_DATA) subdir = gtk ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__dist_gir_DATA_DIST) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" \ "$(DESTDIR)$(typelibdir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = dist_libzbargtk_la_OBJECTS = libzbargtk_la-zbargtk.lo nodist_libzbargtk_la_OBJECTS = libzbargtk_la-zbarmarshal.lo libzbargtk_la_OBJECTS = $(dist_libzbargtk_la_OBJECTS) \ $(nodist_libzbargtk_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libzbargtk_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libzbargtk_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libzbargtk_la-zbargtk.Plo \ ./$(DEPDIR)/libzbargtk_la-zbarmarshal.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(dist_libzbargtk_la_SOURCES) \ $(nodist_libzbargtk_la_SOURCES) DIST_SOURCES = $(dist_libzbargtk_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__dist_gir_DATA_DIST = ZBar-1.0.gir DATA = $(dist_gir_DATA) $(typelib_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CFLAGS = @AM_CFLAGS@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLASSPATH = @CLASSPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_CONFDIR = @DBUS_CONFDIR@ DBUS_LIBS = @DBUS_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_CODABAR = @ENABLE_CODABAR@ ENABLE_CODE128 = @ENABLE_CODE128@ ENABLE_CODE39 = @ENABLE_CODE39@ ENABLE_CODE93 = @ENABLE_CODE93@ ENABLE_DATABAR = @ENABLE_DATABAR@ ENABLE_EAN = @ENABLE_EAN@ ENABLE_I25 = @ENABLE_I25@ ENABLE_PDF417 = @ENABLE_PDF417@ ENABLE_QRCODE = @ENABLE_QRCODE@ ENABLE_SQCODE = @ENABLE_SQCODE@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GM_CFLAGS = @GM_CFLAGS@ GM_LIBS = @GM_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTK_VERSION_MAJOR = @GTK_VERSION_MAJOR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JAR = @JAR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CFLAGS = @JAVA_CFLAGS@ JAVA_HOME = @JAVA_HOME@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBQT_EXTRA_LDFLAGS = @LIBQT_EXTRA_LDFLAGS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MOC = @MOC@ NM = @NM@ NMEDIT = @NMEDIT@ NPAPI_CFLAGS = @NPAPI_CFLAGS@ NPAPI_LIBS = @NPAPI_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYGTK_CFLAGS = @PYGTK_CFLAGS@ PYGTK_CODEGEN = @PYGTK_CODEGEN@ PYGTK_DEFS = @PYGTK_DEFS@ PYGTK_H2DEF = @PYGTK_H2DEF@ PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ QT_CFLAGS = @QT_CFLAGS@ QT_LIBS = @QT_LIBS@ RANLIB = @RANLIB@ RC = @RC@ RELDATE = @RELDATE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ V4L2_CFLAGS = @V4L2_CFLAGS@ V4L2_LIBS = @V4L2_LIBS@ VERSION = @VERSION@ XMKMF = @XMKMF@ XMLTO = @XMLTO@ XMLTOFLAGS = @XMLTOFLAGS@ XSHM_LIBS = @XSHM_LIBS@ XV_LIBS = @XV_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZGTK_LIB_VERSION = @ZGTK_LIB_VERSION@ ZQT_LIB_VERSION = @ZQT_LIB_VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ lib_LTLIBRARIES = libzbargtk.la libzbargtk_la_CPPFLAGS = $(GTK_CFLAGS) $(AM_CPPFLAGS) $(am__append_1) libzbargtk_la_LDFLAGS = -version-info $(ZGTK_LIB_VERSION) \ -export-symbols-regex "^zbar_.*" $(AM_LDFLAGS) -no-undefined libzbargtk_la_LIBADD = $(GTK_LIBS) ../zbar/libzbar.la $(AM_LIBADD) libzbargtk_la_DEPENDENCIES = ../zbar/libzbar.la dist_libzbargtk_la_SOURCES = zbargtk.c zbargtkprivate.h nodist_libzbargtk_la_SOURCES = zbarmarshal.c zbarmarshal.h BUILT_SOURCES = zbarmarshal.c zbarmarshal.h CLEANFILES = $(BUILT_SOURCES) $(am__append_2) EXTRA_DIST = zbarmarshal.list # NOTE: # # At least with Fedora 30 builds using mock (e. g. inside a chroot and # having the build dir different than the source dir, using # gobject-introspection-1.60, there is a bug with GIR file generation: # sometimes, g-ir-scanner is not capable of producing a C file that would # be loading libzbargtk.so.0. So, it fails with: # # error while loading shared libraries: libzbargtk.so.0: # cannot open shared object file: No such file or directory # # I suspect that it has something to do with libtool-2.4.6. # The fix is hackish, but it should be safe: it should manually include # the paths where libtool generate those at INTROSPECTION_SCANNER_ARGS. # # It should be noticed that, this shouldn't affect a non-buggy environment, # so, better to be safe than sorry. INTROSPECTION_SCANNER_ARGS = --warn-all \ --symbol-prefix=zbar \ --identifier-prefix=zbar_ \ --identifier-prefix=ZBar \ --library-path=$(abs_builddir)/.libs \ --library-path=$(abs_top_builddir)/zbar/.libs # Just in case INTROSPECTION_SCANNER_ENV = GI_SCANNER_DISABLE_CACHE=yes INTROSPECTION_GIRS = ZBar-1.0.gir ZBar_1_0_gir_NAMESPACE = ZBar ZBar_1_0_gir_VERSION = 1.0 ZBar_1_0_gir_LIBS = $(lib_LTLIBRARIES) $(top_builddir)/zbar/libzbar.la ZBar_1_0_gir_FILES = $(top_builddir)/include/zbar/zbargtk.h zbargtk.c ZBar_1_0_gir_INCLUDES = Gtk-@GTK_VERSION_MAJOR@ Gdk-@GTK_VERSION_MAJOR@ ZBar_1_0_gir_CFLAGS = $(libzbargtk_la_CPPFLAGS) @HAVE_INTROSPECTION_TRUE@girdir = $(INTROSPECTION_GIRDIR) @HAVE_INTROSPECTION_TRUE@dist_gir_DATA = $(INTROSPECTION_GIRS) @HAVE_INTROSPECTION_TRUE@typelibdir = $(INTROSPECTION_TYPELIBDIR) @HAVE_INTROSPECTION_TRUE@typelib_DATA = ZBar-1.0.typelib all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign gtk/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign gtk/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libzbargtk.la: $(libzbargtk_la_OBJECTS) $(libzbargtk_la_DEPENDENCIES) $(EXTRA_libzbargtk_la_DEPENDENCIES) $(AM_V_CCLD)$(libzbargtk_la_LINK) -rpath $(libdir) $(libzbargtk_la_OBJECTS) $(libzbargtk_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzbargtk_la-zbargtk.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzbargtk_la-zbarmarshal.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libzbargtk_la-zbargtk.lo: zbargtk.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbargtk_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libzbargtk_la-zbargtk.lo -MD -MP -MF $(DEPDIR)/libzbargtk_la-zbargtk.Tpo -c -o libzbargtk_la-zbargtk.lo `test -f 'zbargtk.c' || echo '$(srcdir)/'`zbargtk.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzbargtk_la-zbargtk.Tpo $(DEPDIR)/libzbargtk_la-zbargtk.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zbargtk.c' object='libzbargtk_la-zbargtk.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbargtk_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libzbargtk_la-zbargtk.lo `test -f 'zbargtk.c' || echo '$(srcdir)/'`zbargtk.c libzbargtk_la-zbarmarshal.lo: zbarmarshal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbargtk_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libzbargtk_la-zbarmarshal.lo -MD -MP -MF $(DEPDIR)/libzbargtk_la-zbarmarshal.Tpo -c -o libzbargtk_la-zbarmarshal.lo `test -f 'zbarmarshal.c' || echo '$(srcdir)/'`zbarmarshal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzbargtk_la-zbarmarshal.Tpo $(DEPDIR)/libzbargtk_la-zbarmarshal.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zbarmarshal.c' object='libzbargtk_la-zbarmarshal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbargtk_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libzbargtk_la-zbarmarshal.lo `test -f 'zbarmarshal.c' || echo '$(srcdir)/'`zbarmarshal.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-dist_girDATA: $(dist_gir_DATA) @$(NORMAL_INSTALL) @list='$(dist_gir_DATA)'; test -n "$(girdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(girdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(girdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(girdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(girdir)" || exit $$?; \ done uninstall-dist_girDATA: @$(NORMAL_UNINSTALL) @list='$(dist_gir_DATA)'; test -n "$(girdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(girdir)'; $(am__uninstall_files_from_dir) install-typelibDATA: $(typelib_DATA) @$(NORMAL_INSTALL) @list='$(typelib_DATA)'; test -n "$(typelibdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(typelibdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(typelibdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(typelibdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(typelibdir)" || exit $$?; \ done uninstall-typelibDATA: @$(NORMAL_UNINSTALL) @list='$(typelib_DATA)'; test -n "$(typelibdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(typelibdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" "$(DESTDIR)$(typelibdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libzbargtk_la-zbargtk.Plo -rm -f ./$(DEPDIR)/libzbargtk_la-zbarmarshal.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_girDATA install-typelibDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libzbargtk_la-zbargtk.Plo -rm -f ./$(DEPDIR)/libzbargtk_la-zbarmarshal.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_girDATA uninstall-libLTLIBRARIES \ uninstall-typelibDATA .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libLTLIBRARIES clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dist_girDATA install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip install-typelibDATA \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-dist_girDATA \ uninstall-libLTLIBRARIES uninstall-typelibDATA .PRECIOUS: Makefile %.h: %.list $(GLIB_GENMARSHAL) --g-fatal-warnings --prefix=zbar_marshal \ --header $^ > $@ %.c: %.list $(GLIB_GENMARSHAL) --g-fatal-warnings --prefix=zbar_marshal \ --body $^ > $@ ../zbar/libzbar.la: $(MAKE) -C $(abs_top_srcdir) zbar/libzbar.la ../zbarcam/zbarcam-gtk: libzbargtk.la $(MAKE) -C $(abs_top_srcdir) zbarcam/zbarcam-gtk # GObject Introspection include $(INTROSPECTION_MAKEFILE) # This may generate some warnings, but it is needed for "make dist" ZBar-1.0.gir: $(lib_LTLIBRARIES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zbar-0.23/gtk/zbargtkprivate.h0000664000175000017500000000646313471225716013335 00000000000000/*------------------------------------------------------------------------ * Copyright 2008-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef __ZBAR_GTK_PRIVATE_H__ #define __ZBAR_GTK_PRIVATE_H__ #include #include #include #include G_BEGIN_DECLS #define ZBAR_TYPE_GTK_PRIVATE (zbar_gtk_private_get_type()) #define ZBAR_GTK_PRIVATE(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), ZBAR_TYPE_GTK_PRIVATE, ZBarGtkPrivate)) #define ZBAR_GTK_PRIVATE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), ZBAR_TYPE_GTK_PRIVATE, ZBarGtkPrivateClass)) #define ZBAR_IS_GTK_PRIVATE(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), ZBAR_TYPE_GTK_PRIVATE)) #define ZBAR_IS_GTK_PRIVATE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), ZBAR_TYPE_GTK_PRIVATE)) #define ZBAR_GTK_PRIVATE_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), ZBAR_TYPE_GTK_PRIVATE, ZBarGtkPrivateClass)) /* zbar widget processor thread shared/private data */ typedef struct _ZBarGtkPrivate { GObject object; /* these are all owned by the main gui thread */ gint idle_id; const char *video_device; gboolean video_enabled, video_enabled_state; /* messages are queued from the gui thread to the processor thread. * each message is a GValue containing one of: * - G_TYPE_INT: state change * 1 = video enable * 0 = video disable * -1 = terminate processor thread * - G_TYPE_STRING: a named video device to open ("" to close) * - GDK_TYPE_PIXBUF: an image to scan */ GAsyncQueue *queue; /* current processor state is shared: * written by processor thread just after opening video or * scanning an image, read by main gui thread during size_request. * protected by main gui lock */ unsigned req_width, req_height; unsigned video_width, video_height; gboolean video_opened; /* window is shared: owned by main gui thread. * processor thread only calls draw() and negotiate_format(). * protected by main gui lock (and internal lock) */ zbar_window_t *window; /* video and scanner are owned by the processor thread */ zbar_video_t *video; zbar_image_scanner_t *scanner; } ZBarGtkPrivate; typedef struct _ZBarGtkPrivateClass { GObjectClass parent_class; } ZBarGtkPrivateClass; static GType zbar_gtk_private_get_type(void) G_GNUC_CONST; G_END_DECLS #endif zbar-0.23/gtk/Makefile.am0000664000175000017500000000534113471225716012153 00000000000000lib_LTLIBRARIES = libzbargtk.la libzbargtk_la_CPPFLAGS = $(GTK_CFLAGS) $(AM_CPPFLAGS) libzbargtk_la_LDFLAGS = -version-info $(ZGTK_LIB_VERSION) \ -export-symbols-regex "^zbar_.*" $(AM_LDFLAGS) -no-undefined libzbargtk_la_LIBADD = $(GTK_LIBS) ../zbar/libzbar.la $(AM_LIBADD) libzbargtk_la_DEPENDENCIES = ../zbar/libzbar.la if HAVE_X libzbargtk_la_CPPFLAGS += -DHAVE_X endif dist_libzbargtk_la_SOURCES = zbargtk.c zbargtkprivate.h nodist_libzbargtk_la_SOURCES = zbarmarshal.c zbarmarshal.h BUILT_SOURCES = zbarmarshal.c zbarmarshal.h CLEANFILES = $(BUILT_SOURCES) EXTRA_DIST = zbarmarshal.list %.h: %.list $(GLIB_GENMARSHAL) --g-fatal-warnings --prefix=zbar_marshal \ --header $^ > $@ %.c: %.list $(GLIB_GENMARSHAL) --g-fatal-warnings --prefix=zbar_marshal \ --body $^ > $@ ../zbar/libzbar.la: $(MAKE) -C $(abs_top_srcdir) zbar/libzbar.la ../zbarcam/zbarcam-gtk: libzbargtk.la $(MAKE) -C $(abs_top_srcdir) zbarcam/zbarcam-gtk # GObject Introspection include $(INTROSPECTION_MAKEFILE) # NOTE: # # At least with Fedora 30 builds using mock (e. g. inside a chroot and # having the build dir different than the source dir, using # gobject-introspection-1.60, there is a bug with GIR file generation: # sometimes, g-ir-scanner is not capable of producing a C file that would # be loading libzbargtk.so.0. So, it fails with: # # error while loading shared libraries: libzbargtk.so.0: # cannot open shared object file: No such file or directory # # I suspect that it has something to do with libtool-2.4.6. # The fix is hackish, but it should be safe: it should manually include # the paths where libtool generate those at INTROSPECTION_SCANNER_ARGS. # # It should be noticed that, this shouldn't affect a non-buggy environment, # so, better to be safe than sorry. INTROSPECTION_SCANNER_ARGS = --warn-all \ --symbol-prefix=zbar \ --identifier-prefix=zbar_ \ --identifier-prefix=ZBar \ --library-path=$(abs_builddir)/.libs \ --library-path=$(abs_top_builddir)/zbar/.libs # Just in case INTROSPECTION_SCANNER_ENV = GI_SCANNER_DISABLE_CACHE=yes INTROSPECTION_GIRS = ZBar-1.0.gir ZBar_1_0_gir_NAMESPACE = ZBar ZBar_1_0_gir_VERSION = 1.0 ZBar_1_0_gir_LIBS = $(lib_LTLIBRARIES) $(top_builddir)/zbar/libzbar.la ZBar_1_0_gir_FILES = $(top_builddir)/include/zbar/zbargtk.h zbargtk.c ZBar_1_0_gir_INCLUDES = Gtk-@GTK_VERSION_MAJOR@ Gdk-@GTK_VERSION_MAJOR@ ZBar_1_0_gir_CFLAGS = $(libzbargtk_la_CPPFLAGS) # This may generate some warnings, but it is needed for "make dist" ZBar-1.0.gir: $(lib_LTLIBRARIES) if HAVE_INTROSPECTION girdir = $(INTROSPECTION_GIRDIR) dist_gir_DATA = $(INTROSPECTION_GIRS) typelibdir = $(INTROSPECTION_TYPELIBDIR) typelib_DATA = ZBar-1.0.typelib CLEANFILES += $(dist_gir_DATA) $(typelib_DATA) endif zbar-0.23/gtk/zbarmarshal.list0000664000175000017500000000002013466560613013311 00000000000000VOID:INT,STRING zbar-0.23/config.rpath0000664000175000017500000000000013470557650011626 00000000000000zbar-0.23/perl/0000775000175000017500000000000013471606255010352 500000000000000zbar-0.23/perl/ppport.h0000664000175000017500000034666013466560613012007 00000000000000#if 0 <<'SKIP'; #endif /* ---------------------------------------------------------------------- ppport.h -- Perl/Pollution/Portability Version 3.06_01 Automatically created by Devel::PPPort running under perl 5.008008 on Fri Nov 14 08:58:38 2008. Do NOT edit this file directly! -- Edit PPPort_pm.PL and the includes in parts/inc/ instead. Use 'perldoc ppport.h' to view the documentation below. ---------------------------------------------------------------------- SKIP =pod =head1 NAME ppport.h - Perl/Pollution/Portability version 3.06_01 =head1 SYNOPSIS perl ppport.h [options] [source files] Searches current directory for files if no [source files] are given --help show short help --patch=file write one patch file with changes --copy=suffix write changed copies with suffix --diff=program use diff program and options --compat-version=version provide compatibility with Perl version --cplusplus accept C++ comments --quiet don't output anything except fatal errors --nodiag don't show diagnostics --nohints don't show hints --nochanges don't suggest changes --nofilter don't filter input files --list-provided list provided API --list-unsupported list unsupported API --api-info=name show Perl API portability information =head1 COMPATIBILITY This version of F is designed to support operation with Perl installations back to 5.003, and has been tested up to 5.9.3. =head1 OPTIONS =head2 --help Display a brief usage summary. =head2 --patch=I If this option is given, a single patch file will be created if any changes are suggested. This requires a working diff program to be installed on your system. =head2 --copy=I If this option is given, a copy of each file will be saved with the given suffix that contains the suggested changes. This does not require any external programs. If neither C<--patch> or C<--copy> are given, the default is to simply print the diffs for each file. This requires either C or a C program to be installed. =head2 --diff=I Manually set the diff program and options to use. The default is to use C, when installed, and output unified context diffs. =head2 --compat-version=I Tell F to check for compatibility with the given Perl version. The default is to check for compatibility with Perl version 5.003. You can use this option to reduce the output of F if you intend to be backward compatible only up to a certain Perl version. =head2 --cplusplus Usually, F will detect C++ style comments and replace them with C style comments for portability reasons. Using this option instructs F to leave C++ comments untouched. =head2 --quiet Be quiet. Don't print anything except fatal errors. =head2 --nodiag Don't output any diagnostic messages. Only portability alerts will be printed. =head2 --nohints Don't output any hints. Hints often contain useful portability notes. =head2 --nochanges Don't suggest any changes. Only give diagnostic output and hints unless these are also deactivated. =head2 --nofilter Don't filter the list of input files. By default, files not looking like source code (i.e. not *.xs, *.c, *.cc, *.cpp or *.h) are skipped. =head2 --list-provided Lists the API elements for which compatibility is provided by F. Also lists if it must be explicitly requested, if it has dependencies, and if there are hints for it. =head2 --list-unsupported Lists the API elements that are known not to be supported by F and below which version of Perl they probably won't be available or work. =head2 --api-info=I Show portability information for API elements matching I. If I is surrounded by slashes, it is interpreted as a regular expression. =head1 DESCRIPTION In order for a Perl extension (XS) module to be as portable as possible across differing versions of Perl itself, certain steps need to be taken. =over 4 =item * Including this header is the first major one. This alone will give you access to a large part of the Perl API that hasn't been available in earlier Perl releases. Use perl ppport.h --list-provided to see which API elements are provided by ppport.h. =item * You should avoid using deprecated parts of the API. For example, using global Perl variables without the C prefix is deprecated. Also, some API functions used to have a C prefix. Using this form is also deprecated. You can safely use the supported API, as F will provide wrappers for older Perl versions. =item * If you use one of a few functions that were not present in earlier versions of Perl, and that can't be provided using a macro, you have to explicitly request support for these functions by adding one or more C<#define>s in your source code before the inclusion of F. These functions will be marked C in the list shown by C<--list-provided>. Depending on whether you module has a single or multiple files that use such functions, you want either C or global variants. For a C function, use: #define NEED_function For a global function, use: #define NEED_function_GLOBAL Note that you mustn't have more than one global request for one function in your project. Function Static Request Global Request ----------------------------------------------------------------------------------------- eval_pv() NEED_eval_pv NEED_eval_pv_GLOBAL grok_bin() NEED_grok_bin NEED_grok_bin_GLOBAL grok_hex() NEED_grok_hex NEED_grok_hex_GLOBAL grok_number() NEED_grok_number NEED_grok_number_GLOBAL grok_numeric_radix() NEED_grok_numeric_radix NEED_grok_numeric_radix_GLOBAL grok_oct() NEED_grok_oct NEED_grok_oct_GLOBAL newCONSTSUB() NEED_newCONSTSUB NEED_newCONSTSUB_GLOBAL newRV_noinc() NEED_newRV_noinc NEED_newRV_noinc_GLOBAL sv_2pv_nolen() NEED_sv_2pv_nolen NEED_sv_2pv_nolen_GLOBAL sv_2pvbyte() NEED_sv_2pvbyte NEED_sv_2pvbyte_GLOBAL sv_catpvf_mg() NEED_sv_catpvf_mg NEED_sv_catpvf_mg_GLOBAL sv_catpvf_mg_nocontext() NEED_sv_catpvf_mg_nocontext NEED_sv_catpvf_mg_nocontext_GLOBAL sv_setpvf_mg() NEED_sv_setpvf_mg NEED_sv_setpvf_mg_GLOBAL sv_setpvf_mg_nocontext() NEED_sv_setpvf_mg_nocontext NEED_sv_setpvf_mg_nocontext_GLOBAL vnewSVpvf() NEED_vnewSVpvf NEED_vnewSVpvf_GLOBAL To avoid namespace conflicts, you can change the namespace of the explicitly exported functions using the C macro. Just C<#define> the macro before including C: #define DPPP_NAMESPACE MyOwnNamespace_ #include "ppport.h" The default namespace is C. =back The good thing is that most of the above can be checked by running F on your source code. See the next section for details. =head1 EXAMPLES To verify whether F is needed for your module, whether you should make any changes to your code, and whether any special defines should be used, F can be run as a Perl script to check your source code. Simply say: perl ppport.h The result will usually be a list of patches suggesting changes that should at least be acceptable, if not necessarily the most efficient solution, or a fix for all possible problems. If you know that your XS module uses features only available in newer Perl releases, if you're aware that it uses C++ comments, and if you want all suggestions as a single patch file, you could use something like this: perl ppport.h --compat-version=5.6.0 --cplusplus --patch=test.diff If you only want your code to be scanned without any suggestions for changes, use: perl ppport.h --nochanges You can specify a different C program or options, using the C<--diff> option: perl ppport.h --diff='diff -C 10' This would output context diffs with 10 lines of context. To display portability information for the C function, use: perl ppport.h --api-info=newSVpvn Since the argument to C<--api-info> can be a regular expression, you can use perl ppport.h --api-info=/_nomg$/ to display portability information for all C<_nomg> functions or perl ppport.h --api-info=/./ to display information for all known API elements. =head1 BUGS If this version of F is causing failure during the compilation of this module, please check if newer versions of either this module or C are available on CPAN before sending a bug report. If F was generated using the latest version of C and is causing failure of this module, please file a bug report using the CPAN Request Tracker at L. Please include the following information: =over 4 =item 1. The complete output from running "perl -V" =item 2. This file. =item 3. The name and version of the module you were trying to build. =item 4. A full log of the build that failed. =item 5. Any other information that you think could be relevant. =back For the latest version of this code, please get the C module from CPAN. =head1 COPYRIGHT Version 3.x, Copyright (c) 2004-2005, Marcus Holland-Moritz. Version 2.x, Copyright (C) 2001, Paul Marquess. Version 1.x, Copyright (C) 1999, Kenneth Albanowski. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 SEE ALSO See L. =cut use strict; my %opt = ( quiet => 0, diag => 1, hints => 1, changes => 1, cplusplus => 0, filter => 1, ); my($ppport) = $0 =~ /([\w.]+)$/; my $LF = '(?:\r\n|[\r\n])'; # line feed my $HS = "[ \t]"; # horizontal whitespace eval { require Getopt::Long; Getopt::Long::GetOptions(\%opt, qw( help quiet diag! filter! hints! changes! cplusplus patch=s copy=s diff=s compat-version=s list-provided list-unsupported api-info=s )) or usage(); }; if ($@ and grep /^-/, @ARGV) { usage() if "@ARGV" =~ /^--?h(?:elp)?$/; die "Getopt::Long not found. Please don't use any options.\n"; } usage() if $opt{help}; if (exists $opt{'compat-version'}) { my($r,$v,$s) = eval { parse_version($opt{'compat-version'}) }; if ($@) { die "Invalid version number format: '$opt{'compat-version'}'\n"; } die "Only Perl 5 is supported\n" if $r != 5; die "Invalid version number: $opt{'compat-version'}\n" if $v >= 1000 || $s >= 1000; $opt{'compat-version'} = sprintf "%d.%03d%03d", $r, $v, $s; } else { $opt{'compat-version'} = 5; } # Never use C comments in this file!!!!! my $ccs = '/'.'*'; my $cce = '*'.'/'; my $rccs = quotemeta $ccs; my $rcce = quotemeta $cce; my %API = map { /^(\w+)\|([^|]*)\|([^|]*)\|(\w*)$/ ? ( $1 => { ($2 ? ( base => $2 ) : ()), ($3 ? ( todo => $3 ) : ()), (index($4, 'v') >= 0 ? ( varargs => 1 ) : ()), (index($4, 'p') >= 0 ? ( provided => 1 ) : ()), (index($4, 'n') >= 0 ? ( nothxarg => 1 ) : ()), } ) : die "invalid spec: $_" } qw( AvFILLp|5.004050||p AvFILL||| CLASS|||n CX_CURPAD_SAVE||| CX_CURPAD_SV||| CopFILEAV|5.006000||p CopFILEGV_set|5.006000||p CopFILEGV|5.006000||p CopFILESV|5.006000||p CopFILE_set|5.006000||p CopFILE|5.006000||p CopSTASHPV_set|5.006000||p CopSTASHPV|5.006000||p CopSTASH_eq|5.006000||p CopSTASH_set|5.006000||p CopSTASH|5.006000||p CopyD|5.009002||p Copy||| CvPADLIST||| CvSTASH||| CvWEAKOUTSIDE||| DEFSV|5.004050||p END_EXTERN_C|5.005000||p ENTER||| ERRSV|5.004050||p EXTEND||| EXTERN_C|5.005000||p FREETMPS||| GIMME_V||5.004000|n GIMME|||n GROK_NUMERIC_RADIX|5.007002||p G_ARRAY||| G_DISCARD||| G_EVAL||| G_NOARGS||| G_SCALAR||| G_VOID||5.004000| GetVars||| GvSV||| Gv_AMupdate||| HEf_SVKEY||5.004000| HeHASH||5.004000| HeKEY||5.004000| HeKLEN||5.004000| HePV||5.004000| HeSVKEY_force||5.004000| HeSVKEY_set||5.004000| HeSVKEY||5.004000| HeVAL||5.004000| HvNAME||| INT2PTR|5.006000||p IN_LOCALE_COMPILETIME|5.007002||p IN_LOCALE_RUNTIME|5.007002||p IN_LOCALE|5.007002||p IN_PERL_COMPILETIME|5.008001||p IS_NUMBER_GREATER_THAN_UV_MAX|5.007002||p IS_NUMBER_INFINITY|5.007002||p IS_NUMBER_IN_UV|5.007002||p IS_NUMBER_NAN|5.007003||p IS_NUMBER_NEG|5.007002||p IS_NUMBER_NOT_INT|5.007002||p IVSIZE|5.006000||p IVTYPE|5.006000||p IVdf|5.006000||p LEAVE||| LVRET||| MARK||| MY_CXT_CLONE|5.009002||p MY_CXT_INIT|5.007003||p MY_CXT|5.007003||p MoveD|5.009002||p Move||| NEWSV||| NOOP|5.005000||p NUM2PTR|5.006000||p NVTYPE|5.006000||p NVef|5.006001||p NVff|5.006001||p NVgf|5.006001||p Newc||| Newz||| New||| Nullav||| Nullch||| Nullcv||| Nullhv||| Nullsv||| ORIGMARK||| PAD_BASE_SV||| PAD_CLONE_VARS||| PAD_COMPNAME_FLAGS||| PAD_COMPNAME_GEN_set||| PAD_COMPNAME_GEN||| PAD_COMPNAME_OURSTASH||| PAD_COMPNAME_PV||| PAD_COMPNAME_TYPE||| PAD_RESTORE_LOCAL||| PAD_SAVE_LOCAL||| PAD_SAVE_SETNULLPAD||| PAD_SETSV||| PAD_SET_CUR_NOSAVE||| PAD_SET_CUR||| PAD_SVl||| PAD_SV||| PERL_BCDVERSION|5.009003||p PERL_GCC_BRACE_GROUPS_FORBIDDEN|5.008001||p PERL_INT_MAX|5.004000||p PERL_INT_MIN|5.004000||p PERL_LONG_MAX|5.004000||p PERL_LONG_MIN|5.004000||p PERL_MAGIC_arylen|5.007002||p PERL_MAGIC_backref|5.007002||p PERL_MAGIC_bm|5.007002||p PERL_MAGIC_collxfrm|5.007002||p PERL_MAGIC_dbfile|5.007002||p PERL_MAGIC_dbline|5.007002||p PERL_MAGIC_defelem|5.007002||p PERL_MAGIC_envelem|5.007002||p PERL_MAGIC_env|5.007002||p PERL_MAGIC_ext|5.007002||p PERL_MAGIC_fm|5.007002||p PERL_MAGIC_glob|5.007002||p PERL_MAGIC_isaelem|5.007002||p PERL_MAGIC_isa|5.007002||p PERL_MAGIC_mutex|5.007002||p PERL_MAGIC_nkeys|5.007002||p PERL_MAGIC_overload_elem|5.007002||p PERL_MAGIC_overload_table|5.007002||p PERL_MAGIC_overload|5.007002||p PERL_MAGIC_pos|5.007002||p PERL_MAGIC_qr|5.007002||p PERL_MAGIC_regdata|5.007002||p PERL_MAGIC_regdatum|5.007002||p PERL_MAGIC_regex_global|5.007002||p PERL_MAGIC_shared_scalar|5.007003||p PERL_MAGIC_shared|5.007003||p PERL_MAGIC_sigelem|5.007002||p PERL_MAGIC_sig|5.007002||p PERL_MAGIC_substr|5.007002||p PERL_MAGIC_sv|5.007002||p PERL_MAGIC_taint|5.007002||p PERL_MAGIC_tiedelem|5.007002||p PERL_MAGIC_tiedscalar|5.007002||p PERL_MAGIC_tied|5.007002||p PERL_MAGIC_utf8|5.008001||p PERL_MAGIC_uvar_elem|5.007003||p PERL_MAGIC_uvar|5.007002||p PERL_MAGIC_vec|5.007002||p PERL_MAGIC_vstring|5.008001||p PERL_QUAD_MAX|5.004000||p PERL_QUAD_MIN|5.004000||p PERL_REVISION|5.006000||p PERL_SCAN_ALLOW_UNDERSCORES|5.007003||p PERL_SCAN_DISALLOW_PREFIX|5.007003||p PERL_SCAN_GREATER_THAN_UV_MAX|5.007003||p PERL_SCAN_SILENT_ILLDIGIT|5.008001||p PERL_SHORT_MAX|5.004000||p PERL_SHORT_MIN|5.004000||p PERL_SUBVERSION|5.006000||p PERL_UCHAR_MAX|5.004000||p PERL_UCHAR_MIN|5.004000||p PERL_UINT_MAX|5.004000||p PERL_UINT_MIN|5.004000||p PERL_ULONG_MAX|5.004000||p PERL_ULONG_MIN|5.004000||p PERL_UNUSED_DECL|5.007002||p PERL_UQUAD_MAX|5.004000||p PERL_UQUAD_MIN|5.004000||p PERL_USHORT_MAX|5.004000||p PERL_USHORT_MIN|5.004000||p PERL_VERSION|5.006000||p PL_DBsingle|||pn PL_DBsub|||pn PL_DBtrace|||n PL_Sv|5.005000||p PL_compiling|5.004050||p PL_copline|5.005000||p PL_curcop|5.004050||p PL_curstash|5.004050||p PL_debstash|5.004050||p PL_defgv|5.004050||p PL_diehook|5.004050||p PL_dirty|5.004050||p PL_dowarn|||pn PL_errgv|5.004050||p PL_hexdigit|5.005000||p PL_hints|5.005000||p PL_last_in_gv|||n PL_modglobal||5.005000|n PL_na|5.004050||pn PL_no_modify|5.006000||p PL_ofs_sv|||n PL_perl_destruct_level|5.004050||p PL_perldb|5.004050||p PL_ppaddr|5.006000||p PL_rsfp_filters|5.004050||p PL_rsfp|5.004050||p PL_rs|||n PL_stack_base|5.004050||p PL_stack_sp|5.004050||p PL_stdingv|5.004050||p PL_sv_arenaroot|5.004050||p PL_sv_no|5.004050||pn PL_sv_undef|5.004050||pn PL_sv_yes|5.004050||pn PL_tainted|5.004050||p PL_tainting|5.004050||p POPi|||n POPl|||n POPn|||n POPpbytex||5.007001|n POPpx||5.005030|n POPp|||n POPs|||n PTR2IV|5.006000||p PTR2NV|5.006000||p PTR2UV|5.006000||p PTR2ul|5.007001||p PTRV|5.006000||p PUSHMARK||| PUSHi||| PUSHmortal|5.009002||p PUSHn||| PUSHp||| PUSHs||| PUSHu|5.004000||p PUTBACK||| PerlIO_clearerr||5.007003| PerlIO_close||5.007003| PerlIO_eof||5.007003| PerlIO_error||5.007003| PerlIO_fileno||5.007003| PerlIO_fill||5.007003| PerlIO_flush||5.007003| PerlIO_get_base||5.007003| PerlIO_get_bufsiz||5.007003| PerlIO_get_cnt||5.007003| PerlIO_get_ptr||5.007003| PerlIO_read||5.007003| PerlIO_seek||5.007003| PerlIO_set_cnt||5.007003| PerlIO_set_ptrcnt||5.007003| PerlIO_setlinebuf||5.007003| PerlIO_stderr||5.007003| PerlIO_stdin||5.007003| PerlIO_stdout||5.007003| PerlIO_tell||5.007003| PerlIO_unread||5.007003| PerlIO_write||5.007003| Poison|5.008000||p RETVAL|||n Renewc||| Renew||| SAVECLEARSV||| SAVECOMPPAD||| SAVEPADSV||| SAVETMPS||| SAVE_DEFSV|5.004050||p SPAGAIN||| SP||| START_EXTERN_C|5.005000||p START_MY_CXT|5.007003||p STMT_END|||p STMT_START|||p ST||| SVt_IV||| SVt_NV||| SVt_PVAV||| SVt_PVCV||| SVt_PVHV||| SVt_PVMG||| SVt_PV||| Safefree||| Slab_Alloc||| Slab_Free||| StructCopy||| SvCUR_set||| SvCUR||| SvEND||| SvGETMAGIC|5.004050||p SvGROW||| SvIOK_UV||5.006000| SvIOK_notUV||5.006000| SvIOK_off||| SvIOK_only_UV||5.006000| SvIOK_only||| SvIOK_on||| SvIOKp||| SvIOK||| SvIVX||| SvIV_nomg|5.009001||p SvIV_set||| SvIVx||| SvIV||| SvIsCOW_shared_hash||5.008003| SvIsCOW||5.008003| SvLEN_set||| SvLEN||| SvLOCK||5.007003| SvMAGIC_set||5.009003| SvNIOK_off||| SvNIOKp||| SvNIOK||| SvNOK_off||| SvNOK_only||| SvNOK_on||| SvNOKp||| SvNOK||| SvNVX||| SvNV_set||| SvNVx||| SvNV||| SvOK||| SvOOK||| SvPOK_off||| SvPOK_only_UTF8||5.006000| SvPOK_only||| SvPOK_on||| SvPOKp||| SvPOK||| SvPVX||| SvPV_force_nomg|5.007002||p SvPV_force||| SvPV_nolen|5.006000||p SvPV_nomg|5.007002||p SvPV_set||| SvPVbyte_force||5.009002| SvPVbyte_nolen||5.006000| SvPVbytex_force||5.006000| SvPVbytex||5.006000| SvPVbyte|5.006000||p SvPVutf8_force||5.006000| SvPVutf8_nolen||5.006000| SvPVutf8x_force||5.006000| SvPVutf8x||5.006000| SvPVutf8||5.006000| SvPVx||| SvPV||| SvREFCNT_dec||| SvREFCNT_inc||| SvREFCNT||| SvROK_off||| SvROK_on||| SvROK||| SvRV_set||5.009003| SvRV||| SvSETMAGIC||| SvSHARE||5.007003| SvSTASH_set||5.009003| SvSTASH||| SvSetMagicSV_nosteal||5.004000| SvSetMagicSV||5.004000| SvSetSV_nosteal||5.004000| SvSetSV||| SvTAINTED_off||5.004000| SvTAINTED_on||5.004000| SvTAINTED||5.004000| SvTAINT||| SvTRUE||| SvTYPE||| SvUNLOCK||5.007003| SvUOK||5.007001| SvUPGRADE||| SvUTF8_off||5.006000| SvUTF8_on||5.006000| SvUTF8||5.006000| SvUVXx|5.004000||p SvUVX|5.004000||p SvUV_nomg|5.009001||p SvUV_set||5.009003| SvUVx|5.004000||p SvUV|5.004000||p SvVOK||5.008001| THIS|||n UNDERBAR|5.009002||p UVSIZE|5.006000||p UVTYPE|5.006000||p UVXf|5.007001||p UVof|5.006000||p UVuf|5.006000||p UVxf|5.006000||p XCPT_CATCH|5.009002||p XCPT_RETHROW|5.009002||p XCPT_TRY_END|5.009002||p XCPT_TRY_START|5.009002||p XPUSHi||| XPUSHmortal|5.009002||p XPUSHn||| XPUSHp||| XPUSHs||| XPUSHu|5.004000||p XSRETURN_EMPTY||| XSRETURN_IV||| XSRETURN_NO||| XSRETURN_NV||| XSRETURN_PV||| XSRETURN_UNDEF||| XSRETURN_UV|5.008001||p XSRETURN_YES||| XSRETURN||| XST_mIV||| XST_mNO||| XST_mNV||| XST_mPV||| XST_mUNDEF||| XST_mUV|5.008001||p XST_mYES||| XS_VERSION_BOOTCHECK||| XS_VERSION||| XS||| ZeroD|5.009002||p Zero||| _aMY_CXT|5.007003||p _pMY_CXT|5.007003||p aMY_CXT_|5.007003||p aMY_CXT|5.007003||p aTHX_|5.006000||p aTHX|5.006000||p add_data||| allocmy||| amagic_call||| any_dup||| ao||| append_elem||| append_list||| apply_attrs_my||| apply_attrs_string||5.006001| apply_attrs||| apply||| asIV||| asUV||| atfork_lock||5.007003|n atfork_unlock||5.007003|n av_arylen_p||5.009003| av_clear||| av_delete||5.006000| av_exists||5.006000| av_extend||| av_fake||| av_fetch||| av_fill||| av_len||| av_make||| av_pop||| av_push||| av_reify||| av_shift||| av_store||| av_undef||| av_unshift||| ax|||n bad_type||| bind_match||| block_end||| block_gimme||5.004000| block_start||| boolSV|5.004000||p boot_core_PerlIO||| boot_core_UNIVERSAL||| boot_core_xsutils||| bytes_from_utf8||5.007001| bytes_to_utf8||5.006001| cache_re||| call_argv|5.006000||p call_atexit||5.006000| call_body||| call_list_body||| call_list||5.004000| call_method|5.006000||p call_pv|5.006000||p call_sv|5.006000||p calloc||5.007002|n cando||| cast_i32||5.006000| cast_iv||5.006000| cast_ulong||5.006000| cast_uv||5.006000| check_uni||| checkcomma||| checkposixcc||| ck_anoncode||| ck_bitop||| ck_concat||| ck_defined||| ck_delete||| ck_die||| ck_eof||| ck_eval||| ck_exec||| ck_exists||| ck_exit||| ck_ftst||| ck_fun||| ck_glob||| ck_grep||| ck_index||| ck_join||| ck_lengthconst||| ck_lfun||| ck_listiob||| ck_match||| ck_method||| ck_null||| ck_open||| ck_repeat||| ck_require||| ck_retarget||| ck_return||| ck_rfun||| ck_rvconst||| ck_sassign||| ck_select||| ck_shift||| ck_sort||| ck_spair||| ck_split||| ck_subr||| ck_substr||| ck_svconst||| ck_trunc||| ck_unpack||| cl_and||| cl_anything||| cl_init_zero||| cl_init||| cl_is_anything||| cl_or||| closest_cop||| convert||| cop_free||| cr_textfilter||| croak_nocontext|||vn croak|||v csighandler||5.007001|n custom_op_desc||5.007003| custom_op_name||5.007003| cv_ckproto||| cv_clone||| cv_const_sv||5.004000| cv_dump||| cv_undef||| cx_dump||5.005000| cx_dup||| cxinc||| dAXMARK||5.009003| dAX|5.007002||p dITEMS|5.007002||p dMARK||| dMY_CXT_SV|5.007003||p dMY_CXT|5.007003||p dNOOP|5.006000||p dORIGMARK||| dSP||| dTHR|5.004050||p dTHXa|5.006000||p dTHXoa|5.006000||p dTHX|5.006000||p dUNDERBAR|5.009002||p dXCPT|5.009002||p dXSARGS||| dXSI32||| dXSTARG|5.006000||p deb_curcv||| deb_nocontext|||vn deb_stack_all||| deb_stack_n||| debop||5.005000| debprofdump||5.005000| debprof||| debstackptrs||5.007003| debstack||5.007003| deb||5.007003|v del_he||| del_sv||| delimcpy||5.004000| depcom||| deprecate_old||| deprecate||| despatch_signals||5.007001| die_nocontext|||vn die_where||| die|||v dirp_dup||| div128||| djSP||| do_aexec5||| do_aexec||| do_aspawn||| do_binmode||5.004050| do_chomp||| do_chop||| do_close||| do_dump_pad||| do_eof||| do_exec3||| do_execfree||| do_exec||| do_gv_dump||5.006000| do_gvgv_dump||5.006000| do_hv_dump||5.006000| do_ipcctl||| do_ipcget||| do_join||| do_kv||| do_magic_dump||5.006000| do_msgrcv||| do_msgsnd||| do_oddball||| do_op_dump||5.006000| do_open9||5.006000| do_openn||5.007001| do_open||5.004000| do_pipe||| do_pmop_dump||5.006000| do_print||| do_readline||| do_seek||| do_semop||| do_shmio||| do_spawn_nowait||| do_spawn||| do_sprintf||| do_sv_dump||5.006000| do_sysseek||| do_tell||| do_trans_complex_utf8||| do_trans_complex||| do_trans_count_utf8||| do_trans_count||| do_trans_simple_utf8||| do_trans_simple||| do_trans||| do_vecget||| do_vecset||| do_vop||| docatch_body||| docatch||| doeval||| dofile||| dofindlabel||| doform||| doing_taint||5.008001|n dooneliner||| doopen_pm||| doparseform||| dopoptoeval||| dopoptolabel||| dopoptoloop||| dopoptosub_at||| dopoptosub||| dounwind||| dowantarray||| dump_all||5.006000| dump_eval||5.006000| dump_fds||| dump_form||5.006000| dump_indent||5.006000|v dump_mstats||| dump_packsubs||5.006000| dump_sub||5.006000| dump_vindent||5.006000| dumpuntil||| dup_attrlist||| emulate_eaccess||| eval_pv|5.006000||p eval_sv|5.006000||p expect_number||| fbm_compile||5.005000| fbm_instr||5.005000| fd_on_nosuid_fs||| filter_add||| filter_del||| filter_gets||| filter_read||| find_beginning||| find_byclass||| find_in_my_stash||| find_runcv||| find_rundefsvoffset||5.009002| find_script||| find_uninit_var||| fold_constants||| forbid_setid||| force_ident||| force_list||| force_next||| force_version||| force_word||| form_nocontext|||vn form||5.004000|v fp_dup||| fprintf_nocontext|||vn free_global_struct||| free_tied_hv_pool||| free_tmps||| gen_constant_list||| get_av|5.006000||p get_context||5.006000|n get_cv|5.006000||p get_db_sub||| get_debug_opts||| get_hash_seed||| get_hv|5.006000||p get_mstats||| get_no_modify||| get_num||| get_op_descs||5.005000| get_op_names||5.005000| get_opargs||| get_ppaddr||5.006000| get_sv|5.006000||p get_vtbl||5.005030| getcwd_sv||5.007002| getenv_len||| gp_dup||| gp_free||| gp_ref||| grok_bin|5.007003||p grok_hex|5.007003||p grok_number|5.007002||p grok_numeric_radix|5.007002||p grok_oct|5.007003||p group_end||| gv_AVadd||| gv_HVadd||| gv_IOadd||| gv_autoload4||5.004000| gv_check||| gv_dump||5.006000| gv_efullname3||5.004000| gv_efullname4||5.006001| gv_efullname||| gv_ename||| gv_fetchfile||| gv_fetchmeth_autoload||5.007003| gv_fetchmethod_autoload||5.004000| gv_fetchmethod||| gv_fetchmeth||| gv_fetchpvn_flags||5.009002| gv_fetchpv||| gv_fetchsv||5.009002| gv_fullname3||5.004000| gv_fullname4||5.006001| gv_fullname||| gv_handler||5.007001| gv_init_sv||| gv_init||| gv_share||| gv_stashpvn|5.006000||p gv_stashpv||| gv_stashsv||| he_dup||| hek_dup||| hfreeentries||| hsplit||| hv_assert||5.009001| hv_auxinit||| hv_clear_placeholders||5.009001| hv_clear||| hv_delayfree_ent||5.004000| hv_delete_common||| hv_delete_ent||5.004000| hv_delete||| hv_eiter_p||5.009003| hv_eiter_set||5.009003| hv_exists_ent||5.004000| hv_exists||| hv_fetch_common||| hv_fetch_ent||5.004000| hv_fetch||| hv_free_ent||5.004000| hv_iterinit||| hv_iterkeysv||5.004000| hv_iterkey||| hv_iternext_flags||5.008000| hv_iternextsv||| hv_iternext||| hv_iterval||| hv_ksplit||5.004000| hv_magic_check||| hv_magic||| hv_name_set||5.009003| hv_notallowed||| hv_placeholders_get||5.009003| hv_placeholders_p||5.009003| hv_placeholders_set||5.009003| hv_riter_p||5.009003| hv_riter_set||5.009003| hv_scalar||5.009001| hv_store_ent||5.004000| hv_store_flags||5.008000| hv_store||| hv_undef||| ibcmp_locale||5.004000| ibcmp_utf8||5.007003| ibcmp||| incl_perldb||| incline||| incpush||| ingroup||| init_argv_symbols||| init_debugger||| init_global_struct||| init_i18nl10n||5.006000| init_i18nl14n||5.006000| init_ids||| init_interp||| init_lexer||| init_main_stash||| init_perllib||| init_postdump_symbols||| init_predump_symbols||| init_stacks||5.005000| init_tm||5.007002| instr||| intro_my||| intuit_method||| intuit_more||| invert||| io_close||| isALNUM||| isALPHA||| isDIGIT||| isLOWER||| isSPACE||| isUPPER||| is_an_int||| is_gv_magical_sv||| is_gv_magical||| is_handle_constructor||| is_list_assignment||| is_lvalue_sub||5.007001| is_uni_alnum_lc||5.006000| is_uni_alnumc_lc||5.006000| is_uni_alnumc||5.006000| is_uni_alnum||5.006000| is_uni_alpha_lc||5.006000| is_uni_alpha||5.006000| is_uni_ascii_lc||5.006000| is_uni_ascii||5.006000| is_uni_cntrl_lc||5.006000| is_uni_cntrl||5.006000| is_uni_digit_lc||5.006000| is_uni_digit||5.006000| is_uni_graph_lc||5.006000| is_uni_graph||5.006000| is_uni_idfirst_lc||5.006000| is_uni_idfirst||5.006000| is_uni_lower_lc||5.006000| is_uni_lower||5.006000| is_uni_print_lc||5.006000| is_uni_print||5.006000| is_uni_punct_lc||5.006000| is_uni_punct||5.006000| is_uni_space_lc||5.006000| is_uni_space||5.006000| is_uni_upper_lc||5.006000| is_uni_upper||5.006000| is_uni_xdigit_lc||5.006000| is_uni_xdigit||5.006000| is_utf8_alnumc||5.006000| is_utf8_alnum||5.006000| is_utf8_alpha||5.006000| is_utf8_ascii||5.006000| is_utf8_char_slow||| is_utf8_char||5.006000| is_utf8_cntrl||5.006000| is_utf8_digit||5.006000| is_utf8_graph||5.006000| is_utf8_idcont||5.008000| is_utf8_idfirst||5.006000| is_utf8_lower||5.006000| is_utf8_mark||5.006000| is_utf8_print||5.006000| is_utf8_punct||5.006000| is_utf8_space||5.006000| is_utf8_string_loclen||5.009003| is_utf8_string_loc||5.008001| is_utf8_string||5.006001| is_utf8_upper||5.006000| is_utf8_xdigit||5.006000| isa_lookup||| items|||n ix|||n jmaybe||| keyword||| leave_scope||| lex_end||| lex_start||| linklist||| listkids||| list||| load_module_nocontext|||vn load_module||5.006000|v localize||| looks_like_number||| lop||| mPUSHi|5.009002||p mPUSHn|5.009002||p mPUSHp|5.009002||p mPUSHu|5.009002||p mXPUSHi|5.009002||p mXPUSHn|5.009002||p mXPUSHp|5.009002||p mXPUSHu|5.009002||p magic_clear_all_env||| magic_clearenv||| magic_clearpack||| magic_clearsig||| magic_dump||5.006000| magic_existspack||| magic_freearylen_p||| magic_freeovrld||| magic_freeregexp||| magic_getarylen||| magic_getdefelem||| magic_getglob||| magic_getnkeys||| magic_getpack||| magic_getpos||| magic_getsig||| magic_getsubstr||| magic_gettaint||| magic_getuvar||| magic_getvec||| magic_get||| magic_killbackrefs||| magic_len||| magic_methcall||| magic_methpack||| magic_nextpack||| magic_regdata_cnt||| magic_regdatum_get||| magic_regdatum_set||| magic_scalarpack||| magic_set_all_env||| magic_setamagic||| magic_setarylen||| magic_setbm||| magic_setcollxfrm||| magic_setdbline||| magic_setdefelem||| magic_setenv||| magic_setfm||| magic_setglob||| magic_setisa||| magic_setmglob||| magic_setnkeys||| magic_setpack||| magic_setpos||| magic_setregexp||| magic_setsig||| magic_setsubstr||| magic_settaint||| magic_setutf8||| magic_setuvar||| magic_setvec||| magic_set||| magic_sizepack||| magic_wipepack||| magicname||| make_trie||| malloced_size|||n malloc||5.007002|n markstack_grow||| measure_struct||| memEQ|5.004000||p memNE|5.004000||p mem_collxfrm||| mess_alloc||| mess_nocontext|||vn mess||5.006000|v method_common||| mfree||5.007002|n mg_clear||| mg_copy||| mg_dup||| mg_find||| mg_free||| mg_get||| mg_length||5.005000| mg_localize||| mg_magical||| mg_set||| mg_size||5.005000| mini_mktime||5.007002| missingterm||| mode_from_discipline||| modkids||| mod||| moreswitches||| mul128||| mulexp10|||n my_atof2||5.007002| my_atof||5.006000| my_attrs||| my_bcopy|||n my_betoh16|||n my_betoh32|||n my_betoh64|||n my_betohi|||n my_betohl|||n my_betohs|||n my_bzero|||n my_chsize||| my_exit_jump||| my_exit||| my_failure_exit||5.004000| my_fflush_all||5.006000| my_fork||5.007003|n my_htobe16|||n my_htobe32|||n my_htobe64|||n my_htobei|||n my_htobel|||n my_htobes|||n my_htole16|||n my_htole32|||n my_htole64|||n my_htolei|||n my_htolel|||n my_htoles|||n my_htonl||| my_kid||| my_letoh16|||n my_letoh32|||n my_letoh64|||n my_letohi|||n my_letohl|||n my_letohs|||n my_lstat||| my_memcmp||5.004000|n my_memset|||n my_ntohl||| my_pclose||5.004000| my_popen_list||5.007001| my_popen||5.004000| my_setenv||| my_socketpair||5.007003|n my_stat||| my_strftime||5.007002| my_swabn|||n my_swap||| my_unexec||| my||| newANONATTRSUB||5.006000| newANONHASH||| newANONLIST||| newANONSUB||| newASSIGNOP||| newATTRSUB||5.006000| newAVREF||| newAV||| newBINOP||| newCONDOP||| newCONSTSUB|5.006000||p newCVREF||| newDEFSVOP||| newFORM||| newFOROP||| newGVOP||| newGVREF||| newGVgen||| newHVREF||| newHVhv||5.005000| newHV||| newIO||| newLISTOP||| newLOGOP||| newLOOPEX||| newLOOPOP||| newMYSUB||5.006000| newNULLLIST||| newOP||| newPADOP||5.006000| newPMOP||| newPROG||| newPVOP||| newRANGE||| newRV_inc|5.004000||p newRV_noinc|5.006000||p newRV||| newSLICEOP||| newSTATEOP||| newSUB||| newSVOP||| newSVREF||| newSVhek||5.009003| newSViv||| newSVnv||| newSVpvf_nocontext|||vn newSVpvf||5.004000|v newSVpvn_share||5.007001| newSVpvn|5.006000||p newSVpv||| newSVrv||| newSVsv||| newSVuv|5.006000||p newSV||| newUNOP||| newWHILEOP||5.009003| newXSproto||5.006000| newXS||5.006000| new_collate||5.006000| new_constant||| new_ctype||5.006000| new_he||| new_logop||| new_numeric||5.006000| new_stackinfo||5.005000| new_version||5.009000| next_symbol||| nextargv||| nextchar||| ninstr||| no_bareword_allowed||| no_fh_allowed||| no_op||| not_a_number||| nothreadhook||5.008000| nuke_stacks||| num_overflow|||n oopsAV||| oopsCV||| oopsHV||| op_clear||| op_const_sv||| op_dump||5.006000| op_free||| op_null||5.007002| op_refcnt_lock||5.009002| op_refcnt_unlock||5.009002| open_script||| pMY_CXT_|5.007003||p pMY_CXT|5.007003||p pTHX_|5.006000||p pTHX|5.006000||p pack_cat||5.007003| pack_rec||| package||| packlist||5.008001| pad_add_anon||| pad_add_name||| pad_alloc||| pad_block_start||| pad_check_dup||| pad_compname_type||| pad_findlex||| pad_findmy||| pad_fixup_inner_anons||| pad_free||| pad_leavemy||| pad_new||| pad_push||| pad_reset||| pad_setsv||| pad_sv||| pad_swipe||| pad_tidy||| pad_undef||| parse_body||| parse_unicode_opts||| path_is_absolute||| peep||| pending_ident||| perl_alloc_using|||n perl_alloc|||n perl_clone_using|||n perl_clone|||n perl_construct|||n perl_destruct||5.007003|n perl_free|||n perl_parse||5.006000|n perl_run|||n pidgone||| pmflag||| pmop_dump||5.006000| pmruntime||| pmtrans||| pop_scope||| pregcomp||| pregexec||| pregfree||| prepend_elem||| printf_nocontext|||vn ptr_table_clear||| ptr_table_fetch||| ptr_table_free||| ptr_table_new||| ptr_table_split||| ptr_table_store||| push_scope||| put_byte||| pv_display||5.006000| pv_uni_display||5.007003| qerror||| re_croak2||| re_dup||| re_intuit_start||5.006000| re_intuit_string||5.006000| realloc||5.007002|n reentrant_free||| reentrant_init||| reentrant_retry|||vn reentrant_size||| refkids||| refto||| ref||| reg_node||| reganode||| regatom||| regbranch||| regclass_swash||5.007003| regclass||| regcp_set_to||| regcppop||| regcppush||| regcurly||| regdump||5.005000| regexec_flags||5.005000| reghop3||| reghopmaybe3||| reghopmaybe||| reghop||| reginclass||| reginitcolors||5.006000| reginsert||| regmatch||| regnext||5.005000| regoptail||| regpiece||| regpposixcc||| regprop||| regrepeat_hard||| regrepeat||| regtail||| regtry||| reguni||| regwhite||| reg||| repeatcpy||| report_evil_fh||| report_uninit||| require_errno||| require_pv||5.006000| rninstr||| rsignal_restore||| rsignal_save||| rsignal_state||5.004000| rsignal||5.004000| run_body||| runops_debug||5.005000| runops_standard||5.005000| rvpv_dup||| rxres_free||| rxres_restore||| rxres_save||| safesyscalloc||5.006000|n safesysfree||5.006000|n safesysmalloc||5.006000|n safesysrealloc||5.006000|n same_dirent||| save_I16||5.004000| save_I32||| save_I8||5.006000| save_aelem||5.004050| save_alloc||5.006000| save_aptr||| save_ary||| save_bool||5.008001| save_clearsv||| save_delete||| save_destructor_x||5.006000| save_destructor||5.006000| save_freeop||| save_freepv||| save_freesv||| save_generic_pvref||5.006001| save_generic_svref||5.005030| save_gp||5.004000| save_hash||| save_hek_flags||| save_helem||5.004050| save_hints||5.005000| save_hptr||| save_int||| save_item||| save_iv||5.005000| save_lines||| save_list||| save_long||| save_magic||| save_mortalizesv||5.007001| save_nogv||| save_op||| save_padsv||5.007001| save_pptr||| save_re_context||5.006000| save_scalar_at||| save_scalar||| save_set_svflags||5.009000| save_shared_pvref||5.007003| save_sptr||| save_svref||| save_threadsv||5.005000| save_vptr||5.006000| savepvn||| savepv||| savesharedpv||5.007003| savestack_grow_cnt||5.008001| savestack_grow||| savesvpv||5.009002| sawparens||| scalar_mod_type||| scalarboolean||| scalarkids||| scalarseq||| scalarvoid||| scalar||| scan_bin||5.006000| scan_commit||| scan_const||| scan_formline||| scan_heredoc||| scan_hex||| scan_ident||| scan_inputsymbol||| scan_num||5.007001| scan_oct||| scan_pat||| scan_str||| scan_subst||| scan_trans||| scan_version||5.009001| scan_vstring||5.008001| scan_word||| scope||| screaminstr||5.005000| seed||| set_context||5.006000|n set_csh||| set_numeric_local||5.006000| set_numeric_radix||5.006000| set_numeric_standard||5.006000| setdefout||| setenv_getix||| share_hek_flags||| share_hek||| si_dup||| sighandler|||n simplify_sort||| skipspace||| sortsv||5.007003| ss_dup||| stack_grow||| start_glob||| start_subparse||5.004000| stashpv_hvname_match||5.009003| stdize_locale||| strEQ||| strGE||| strGT||| strLE||| strLT||| strNE||| str_to_version||5.006000| strnEQ||| strnNE||| study_chunk||| sub_crush_depth||| sublex_done||| sublex_push||| sublex_start||| sv_2bool||| sv_2cv||| sv_2io||| sv_2iuv_non_preserve||| sv_2iv_flags||5.009001| sv_2iv||| sv_2mortal||| sv_2nv||| sv_2pv_flags||5.007002| sv_2pv_nolen|5.006000||p sv_2pvbyte_nolen||| sv_2pvbyte|5.006000||p sv_2pvutf8_nolen||5.006000| sv_2pvutf8||5.006000| sv_2pv||| sv_2uv_flags||5.009001| sv_2uv|5.004000||p sv_add_arena||| sv_add_backref||| sv_backoff||| sv_bless||| sv_cat_decode||5.008001| sv_catpv_mg|5.006000||p sv_catpvf_mg_nocontext|||pvn sv_catpvf_mg|5.006000|5.004000|pv sv_catpvf_nocontext|||vn sv_catpvf||5.004000|v sv_catpvn_flags||5.007002| sv_catpvn_mg|5.006000||p sv_catpvn_nomg|5.007002||p sv_catpvn||| sv_catpv||| sv_catsv_flags||5.007002| sv_catsv_mg|5.006000||p sv_catsv_nomg|5.007002||p sv_catsv||| sv_chop||| sv_clean_all||| sv_clean_objs||| sv_clear||| sv_cmp_locale||5.004000| sv_cmp||| sv_collxfrm||| sv_compile_2op||5.008001| sv_copypv||5.007003| sv_dec||| sv_del_backref||| sv_derived_from||5.004000| sv_dump||| sv_dup||| sv_eq||| sv_force_normal_flags||5.007001| sv_force_normal||5.006000| sv_free2||| sv_free_arenas||| sv_free||| sv_gets||5.004000| sv_grow||| sv_inc||| sv_insert||| sv_isa||| sv_isobject||| sv_iv||5.005000| sv_len_utf8||5.006000| sv_len||| sv_magicext||5.007003| sv_magic||| sv_mortalcopy||| sv_newmortal||| sv_newref||| sv_nolocking||5.007003| sv_nosharing||5.007003| sv_nounlocking||5.007003| sv_nv||5.005000| sv_peek||5.005000| sv_pos_b2u||5.006000| sv_pos_u2b||5.006000| sv_pvbyten_force||5.006000| sv_pvbyten||5.006000| sv_pvbyte||5.006000| sv_pvn_force_flags||5.007002| sv_pvn_force|||p sv_pvn_nomg|5.007003||p sv_pvn|5.006000||p sv_pvutf8n_force||5.006000| sv_pvutf8n||5.006000| sv_pvutf8||5.006000| sv_pv||5.006000| sv_recode_to_utf8||5.007003| sv_reftype||| sv_release_COW||| sv_release_IVX||| sv_replace||| sv_report_used||| sv_reset||| sv_rvweaken||5.006000| sv_setiv_mg|5.006000||p sv_setiv||| sv_setnv_mg|5.006000||p sv_setnv||| sv_setpv_mg|5.006000||p sv_setpvf_mg_nocontext|||pvn sv_setpvf_mg|5.006000|5.004000|pv sv_setpvf_nocontext|||vn sv_setpvf||5.004000|v sv_setpviv_mg||5.008001| sv_setpviv||5.008001| sv_setpvn_mg|5.006000||p sv_setpvn||| sv_setpv||| sv_setref_iv||| sv_setref_nv||| sv_setref_pvn||| sv_setref_pv||| sv_setref_uv||5.007001| sv_setsv_cow||| sv_setsv_flags||5.007002| sv_setsv_mg|5.006000||p sv_setsv_nomg|5.007002||p sv_setsv||| sv_setuv_mg|5.006000||p sv_setuv|5.006000||p sv_tainted||5.004000| sv_taint||5.004000| sv_true||5.005000| sv_unglob||| sv_uni_display||5.007003| sv_unmagic||| sv_unref_flags||5.007001| sv_unref||| sv_untaint||5.004000| sv_upgrade||| sv_usepvn_mg|5.006000||p sv_usepvn||| sv_utf8_decode||5.006000| sv_utf8_downgrade||5.006000| sv_utf8_encode||5.006000| sv_utf8_upgrade_flags||5.007002| sv_utf8_upgrade||5.007001| sv_uv|5.006000||p sv_vcatpvf_mg|5.006000|5.004000|p sv_vcatpvfn||5.004000| sv_vcatpvf|5.006000|5.004000|p sv_vsetpvf_mg|5.006000|5.004000|p sv_vsetpvfn||5.004000| sv_vsetpvf|5.006000|5.004000|p svtype||| swallow_bom||| swash_fetch||5.007002| swash_init||5.006000| sys_intern_clear||| sys_intern_dup||| sys_intern_init||| taint_env||| taint_proper||| tmps_grow||5.006000| toLOWER||| toUPPER||| to_byte_substr||| to_uni_fold||5.007003| to_uni_lower_lc||5.006000| to_uni_lower||5.007003| to_uni_title_lc||5.006000| to_uni_title||5.007003| to_uni_upper_lc||5.006000| to_uni_upper||5.007003| to_utf8_case||5.007003| to_utf8_fold||5.007003| to_utf8_lower||5.007003| to_utf8_substr||| to_utf8_title||5.007003| to_utf8_upper||5.007003| tokeq||| tokereport||| too_few_arguments||| too_many_arguments||| unlnk||| unpack_rec||| unpack_str||5.007003| unpackstring||5.008001| unshare_hek_or_pvn||| unshare_hek||| unsharepvn||5.004000| upg_version||5.009000| usage||| utf16_textfilter||| utf16_to_utf8_reversed||5.006001| utf16_to_utf8||5.006001| utf16rev_textfilter||| utf8_distance||5.006000| utf8_hop||5.006000| utf8_length||5.007001| utf8_mg_pos_init||| utf8_mg_pos||| utf8_to_bytes||5.006001| utf8_to_uvchr||5.007001| utf8_to_uvuni||5.007001| utf8n_to_uvchr||5.007001| utf8n_to_uvuni||5.007001| utilize||| uvchr_to_utf8_flags||5.007003| uvchr_to_utf8||5.007001| uvuni_to_utf8_flags||5.007003| uvuni_to_utf8||5.007001| validate_suid||| varname||| vcmp||5.009000| vcroak||5.006000| vdeb||5.007003| vdie||| vform||5.006000| visit||| vivify_defelem||| vivify_ref||| vload_module||5.006000| vmess||5.006000| vnewSVpvf|5.006000|5.004000|p vnormal||5.009002| vnumify||5.009000| vstringify||5.009000| vwarner||5.006000| vwarn||5.006000| wait4pid||| warn_nocontext|||vn warner_nocontext|||vn warner||5.006000|v warn|||v watch||| whichsig||| write_to_stderr||| yyerror||| yylex||| yyparse||| yywarn||| ); if (exists $opt{'list-unsupported'}) { my $f; for $f (sort { lc $a cmp lc $b } keys %API) { next unless $API{$f}{todo}; print "$f ", '.'x(40-length($f)), " ", format_version($API{$f}{todo}), "\n"; } exit 0; } # Scan for possible replacement candidates my(%replace, %need, %hints, %depends); my $replace = 0; my $hint = ''; while () { if ($hint) { if (m{^\s*\*\s(.*?)\s*$}) { $hints{$hint} ||= ''; # suppress warning with older perls $hints{$hint} .= "$1\n"; } else { $hint = ''; } } $hint = $1 if m{^\s*$rccs\sHint:\s+(\w+)\s*$}; $replace = $1 if m{^\s*$rccs\s+Replace:\s+(\d+)\s+$rcce\s*$}; $replace{$2} = $1 if $replace and m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+)}; $replace{$2} = $1 if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+).*$rccs\s+Replace\s+$rcce}; $replace{$1} = $2 if m{^\s*$rccs\s+Replace (\w+) with (\w+)\s+$rcce\s*$}; if (m{^\s*$rccs\s+(\w+)\s+depends\s+on\s+(\w+(\s*,\s*\w+)*)\s+$rcce\s*$}) { push @{$depends{$1}}, map { s/\s+//g; $_ } split /,/, $2; } $need{$1} = 1 if m{^#if\s+defined\(NEED_(\w+)(?:_GLOBAL)?\)}; } if (exists $opt{'api-info'}) { my $f; my $count = 0; my $match = $opt{'api-info'} =~ m!^/(.*)/$! ? $1 : "^\Q$opt{'api-info'}\E\$"; for $f (sort { lc $a cmp lc $b } keys %API) { next unless $f =~ /$match/; print "\n=== $f ===\n\n"; my $info = 0; if ($API{$f}{base} || $API{$f}{todo}) { my $base = format_version($API{$f}{base} || $API{$f}{todo}); print "Supported at least starting from perl-$base.\n"; $info++; } if ($API{$f}{provided}) { my $todo = $API{$f}{todo} ? format_version($API{$f}{todo}) : "5.003"; print "Support by $ppport provided back to perl-$todo.\n"; print "Support needs to be explicitly requested by NEED_$f.\n" if exists $need{$f}; print "Depends on: ", join(', ', @{$depends{$f}}), ".\n" if exists $depends{$f}; print "$hints{$f}" if exists $hints{$f}; $info++; } unless ($info) { print "No portability information available.\n"; } $count++; } if ($count > 0) { print "\n"; } else { print "Found no API matching '$opt{'api-info'}'.\n"; } exit 0; } if (exists $opt{'list-provided'}) { my $f; for $f (sort { lc $a cmp lc $b } keys %API) { next unless $API{$f}{provided}; my @flags; push @flags, 'explicit' if exists $need{$f}; push @flags, 'depend' if exists $depends{$f}; push @flags, 'hint' if exists $hints{$f}; my $flags = @flags ? ' ['.join(', ', @flags).']' : ''; print "$f$flags\n"; } exit 0; } my @files; my @srcext = qw( xs c h cc cpp ); my $srcext = join '|', @srcext; if (@ARGV) { my %seen; @files = grep { -f && !exists $seen{$_} } map { glob $_ } @ARGV; } else { eval { require File::Find; File::Find::find(sub { $File::Find::name =~ /\.($srcext)$/i and push @files, $File::Find::name; }, '.'); }; if ($@) { @files = map { glob "*.$_" } @srcext; } } if (!@ARGV || $opt{filter}) { my(@in, @out); my %xsc = map { /(.*)\.xs$/ ? ("$1.c" => 1, "$1.cc" => 1) : () } @files; for (@files) { my $out = exists $xsc{$_} || /\b\Q$ppport\E$/i || !/\.($srcext)$/i; push @{ $out ? \@out : \@in }, $_; } if (@ARGV && @out) { warning("Skipping the following files (use --nofilter to avoid this):\n| ", join "\n| ", @out); } @files = @in; } unless (@files) { die "No input files given!\n"; } my(%files, %global, %revreplace); %revreplace = reverse %replace; my $filename; my $patch_opened = 0; for $filename (@files) { unless (open IN, "<$filename") { warn "Unable to read from $filename: $!\n"; next; } info("Scanning $filename ..."); my $c = do { local $/; }; close IN; my %file = (orig => $c, changes => 0); # temporarily remove C comments from the code my @ccom; $c =~ s{ ( [^"'/]+ | (?:"[^"\\]*(?:\\.[^"\\]*)*" [^"'/]*)+ | (?:'[^'\\]*(?:\\.[^'\\]*)*' [^"'/]*)+ ) | (/ (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]* )) }{ defined $2 and push @ccom, $2; defined $1 ? $1 : "$ccs$#ccom$cce"; }egsx; $file{ccom} = \@ccom; $file{code} = $c; $file{has_inc_ppport} = ($c =~ /#.*include.*\Q$ppport\E/); my $func; for $func (keys %API) { my $match = $func; $match .= "|$revreplace{$func}" if exists $revreplace{$func}; if ($c =~ /\b(?:Perl_)?($match)\b/) { $file{uses_replace}{$1}++ if exists $revreplace{$func} && $1 eq $revreplace{$func}; $file{uses_Perl}{$func}++ if $c =~ /\bPerl_$func\b/; if (exists $API{$func}{provided}) { if (!exists $API{$func}{base} || $API{$func}{base} > $opt{'compat-version'}) { $file{uses}{$func}++; my @deps = rec_depend($func); if (@deps) { $file{uses_deps}{$func} = \@deps; for (@deps) { $file{uses}{$_} = 0 unless exists $file{uses}{$_}; } } for ($func, @deps) { if (exists $need{$_}) { $file{needs}{$_} = 'static'; } } } } if (exists $API{$func}{todo} && $API{$func}{todo} > $opt{'compat-version'}) { if ($c =~ /\b$func\b/) { $file{uses_todo}{$func}++; } } } } while ($c =~ /^$HS*#$HS*define$HS+(NEED_(\w+?)(_GLOBAL)?)\b/mg) { if (exists $need{$2}) { $file{defined $3 ? 'needed_global' : 'needed_static'}{$2}++; } else { warning("Possibly wrong #define $1 in $filename"); } } for (qw(uses needs uses_todo needed_global needed_static)) { for $func (keys %{$file{$_}}) { push @{$global{$_}{$func}}, $filename; } } $files{$filename} = \%file; } # Globally resolve NEED_'s my $need; for $need (keys %{$global{needs}}) { if (@{$global{needs}{$need}} > 1) { my @targets = @{$global{needs}{$need}}; my @t = grep $files{$_}{needed_global}{$need}, @targets; @targets = @t if @t; @t = grep /\.xs$/i, @targets; @targets = @t if @t; my $target = shift @targets; $files{$target}{needs}{$need} = 'global'; for (@{$global{needs}{$need}}) { $files{$_}{needs}{$need} = 'extern' if $_ ne $target; } } } for $filename (@files) { exists $files{$filename} or next; info("=== Analyzing $filename ==="); my %file = %{$files{$filename}}; my $func; my $c = $file{code}; for $func (sort keys %{$file{uses_Perl}}) { if ($API{$func}{varargs}) { my $changes = ($c =~ s{\b(Perl_$func\s*\(\s*)(?!aTHX_?)(\)|[^\s)]*\))} { $1 . ($2 eq ')' ? 'aTHX' : 'aTHX_ ') . $2 }ge); if ($changes) { warning("Doesn't pass interpreter argument aTHX to Perl_$func"); $file{changes} += $changes; } } else { warning("Uses Perl_$func instead of $func"); $file{changes} += ($c =~ s{\bPerl_$func(\s*)\((\s*aTHX_?)?\s*} {$func$1(}g); } } for $func (sort keys %{$file{uses_replace}}) { warning("Uses $func instead of $replace{$func}"); $file{changes} += ($c =~ s/\b$func\b/$replace{$func}/g); } for $func (sort keys %{$file{uses}}) { next unless $file{uses}{$func}; # if it's only a dependency if (exists $file{uses_deps}{$func}) { diag("Uses $func, which depends on ", join(', ', @{$file{uses_deps}{$func}})); } elsif (exists $replace{$func}) { warning("Uses $func instead of $replace{$func}"); $file{changes} += ($c =~ s/\b$func\b/$replace{$func}/g); } else { diag("Uses $func"); } hint($func); } for $func (sort keys %{$file{uses_todo}}) { warning("Uses $func, which may not be portable below perl ", format_version($API{$func}{todo})); } for $func (sort keys %{$file{needed_static}}) { my $message = ''; if (not exists $file{uses}{$func}) { $message = "No need to define NEED_$func if $func is never used"; } elsif (exists $file{needs}{$func} && $file{needs}{$func} ne 'static') { $message = "No need to define NEED_$func when already needed globally"; } if ($message) { diag($message); $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_$func\b.*$LF//mg); } } for $func (sort keys %{$file{needed_global}}) { my $message = ''; if (not exists $global{uses}{$func}) { $message = "No need to define NEED_${func}_GLOBAL if $func is never used"; } elsif (exists $file{needs}{$func}) { if ($file{needs}{$func} eq 'extern') { $message = "No need to define NEED_${func}_GLOBAL when already needed globally"; } elsif ($file{needs}{$func} eq 'static') { $message = "No need to define NEED_${func}_GLOBAL when only used in this file"; } } if ($message) { diag($message); $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_${func}_GLOBAL\b.*$LF//mg); } } $file{needs_inc_ppport} = keys %{$file{uses}}; if ($file{needs_inc_ppport}) { my $pp = ''; for $func (sort keys %{$file{needs}}) { my $type = $file{needs}{$func}; next if $type eq 'extern'; my $suffix = $type eq 'global' ? '_GLOBAL' : ''; unless (exists $file{"needed_$type"}{$func}) { if ($type eq 'global') { diag("Files [@{$global{needs}{$func}}] need $func, adding global request"); } else { diag("File needs $func, adding static request"); } $pp .= "#define NEED_$func$suffix\n"; } } if ($pp && ($c =~ s/^(?=$HS*#$HS*define$HS+NEED_\w+)/$pp/m)) { $pp = ''; $file{changes}++; } unless ($file{has_inc_ppport}) { diag("Needs to include '$ppport'"); $pp .= qq(#include "$ppport"\n) } if ($pp) { $file{changes} += ($c =~ s/^($HS*#$HS*define$HS+NEED_\w+.*?)^/$1$pp/ms) || ($c =~ s/^(?=$HS*#$HS*include.*\Q$ppport\E)/$pp/m) || ($c =~ s/^($HS*#$HS*include.*XSUB.*\s*?)^/$1$pp/m) || ($c =~ s/^/$pp/); } } else { if ($file{has_inc_ppport}) { diag("No need to include '$ppport'"); $file{changes} += ($c =~ s/^$HS*?#$HS*include.*\Q$ppport\E.*?$LF//m); } } # put back in our C comments my $ix; my $cppc = 0; my @ccom = @{$file{ccom}}; for $ix (0 .. $#ccom) { if (!$opt{cplusplus} && $ccom[$ix] =~ s!^//!!) { $cppc++; $file{changes} += $c =~ s/$rccs$ix$rcce/$ccs$ccom[$ix] $cce/; } else { $c =~ s/$rccs$ix$rcce/$ccom[$ix]/; } } if ($cppc) { my $s = $cppc != 1 ? 's' : ''; warning("Uses $cppc C++ style comment$s, which is not portable"); } if ($file{changes}) { if (exists $opt{copy}) { my $newfile = "$filename$opt{copy}"; if (-e $newfile) { error("'$newfile' already exists, refusing to write copy of '$filename'"); } else { local *F; if (open F, ">$newfile") { info("Writing copy of '$filename' with changes to '$newfile'"); print F $c; close F; } else { error("Cannot open '$newfile' for writing: $!"); } } } elsif (exists $opt{patch} || $opt{changes}) { if (exists $opt{patch}) { unless ($patch_opened) { if (open PATCH, ">$opt{patch}") { $patch_opened = 1; } else { error("Cannot open '$opt{patch}' for writing: $!"); delete $opt{patch}; $opt{changes} = 1; goto fallback; } } mydiff(\*PATCH, $filename, $c); } else { fallback: info("Suggested changes:"); mydiff(\*STDOUT, $filename, $c); } } else { my $s = $file{changes} == 1 ? '' : 's'; info("$file{changes} potentially required change$s detected"); } } else { info("Looks good"); } } close PATCH if $patch_opened; exit 0; sub mydiff { local *F = shift; my($file, $str) = @_; my $diff; if (exists $opt{diff}) { $diff = run_diff($opt{diff}, $file, $str); } if (!defined $diff and can_use('Text::Diff')) { $diff = Text::Diff::diff($file, \$str, { STYLE => 'Unified' }); $diff = <
$tmp") { print F $str; close F; if (open F, "$prog $file $tmp |") { while () { s/\Q$tmp\E/$file.patched/; $diff .= $_; } close F; unlink $tmp; return $diff; } unlink $tmp; } else { error("Cannot open '$tmp' for writing: $!"); } return undef; } sub can_use { eval "use @_;"; return $@ eq ''; } sub rec_depend { my $func = shift; my %seen; return () unless exists $depends{$func}; grep !$seen{$_}++, map { ($_, rec_depend($_)) } @{$depends{$func}}; } sub parse_version { my $ver = shift; if ($ver =~ /^(\d+)\.(\d+)\.(\d+)$/) { return ($1, $2, $3); } elsif ($ver !~ /^\d+\.[\d_]+$/) { die "cannot parse version '$ver'\n"; } $ver =~ s/_//g; $ver =~ s/$/000000/; my($r,$v,$s) = $ver =~ /(\d+)\.(\d{3})(\d{3})/; $v = int $v; $s = int $s; if ($r < 5 || ($r == 5 && $v < 6)) { if ($s % 10) { die "cannot parse version '$ver'\n"; } } return ($r, $v, $s); } sub format_version { my $ver = shift; $ver =~ s/$/000000/; my($r,$v,$s) = $ver =~ /(\d+)\.(\d{3})(\d{3})/; $v = int $v; $s = int $s; if ($r < 5 || ($r == 5 && $v < 6)) { if ($s % 10) { die "invalid version '$ver'\n"; } $s /= 10; $ver = sprintf "%d.%03d", $r, $v; $s > 0 and $ver .= sprintf "_%02d", $s; return $ver; } return sprintf "%d.%d.%d", $r, $v, $s; } sub info { $opt{quiet} and return; print @_, "\n"; } sub diag { $opt{quiet} and return; $opt{diag} and print @_, "\n"; } sub warning { $opt{quiet} and return; print "*** ", @_, "\n"; } sub error { print "*** ERROR: ", @_, "\n"; } my %given_hints; sub hint { $opt{quiet} and return; $opt{hints} or return; my $func = shift; exists $hints{$func} or return; $given_hints{$func}++ and return; my $hint = $hints{$func}; $hint =~ s/^/ /mg; print " --- hint for $func ---\n", $hint; } sub usage { my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms; my %M = ( 'I' => '*' ); $usage =~ s/^\s*perl\s+\S+/$^X $0/; $usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g; print < # endif # if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL))) # include # endif # ifndef PERL_REVISION # define PERL_REVISION (5) /* Replace: 1 */ # define PERL_VERSION PATCHLEVEL # define PERL_SUBVERSION SUBVERSION /* Replace PERL_PATCHLEVEL with PERL_VERSION */ /* Replace: 0 */ # endif #endif #define PERL_BCDVERSION ((PERL_REVISION * 0x1000000L) + (PERL_VERSION * 0x1000L) + PERL_SUBVERSION) /* It is very unlikely that anyone will try to use this with Perl 6 (or greater), but who knows. */ #if PERL_REVISION != 5 # error ppport.h only works with Perl version 5 #endif /* PERL_REVISION != 5 */ #ifdef I_LIMITS # include #endif #ifndef PERL_UCHAR_MIN # define PERL_UCHAR_MIN ((unsigned char)0) #endif #ifndef PERL_UCHAR_MAX # ifdef UCHAR_MAX # define PERL_UCHAR_MAX ((unsigned char)UCHAR_MAX) # else # ifdef MAXUCHAR # define PERL_UCHAR_MAX ((unsigned char)MAXUCHAR) # else # define PERL_UCHAR_MAX ((unsigned char)~(unsigned)0) # endif # endif #endif #ifndef PERL_USHORT_MIN # define PERL_USHORT_MIN ((unsigned short)0) #endif #ifndef PERL_USHORT_MAX # ifdef USHORT_MAX # define PERL_USHORT_MAX ((unsigned short)USHORT_MAX) # else # ifdef MAXUSHORT # define PERL_USHORT_MAX ((unsigned short)MAXUSHORT) # else # ifdef USHRT_MAX # define PERL_USHORT_MAX ((unsigned short)USHRT_MAX) # else # define PERL_USHORT_MAX ((unsigned short)~(unsigned)0) # endif # endif # endif #endif #ifndef PERL_SHORT_MAX # ifdef SHORT_MAX # define PERL_SHORT_MAX ((short)SHORT_MAX) # else # ifdef MAXSHORT /* Often used in */ # define PERL_SHORT_MAX ((short)MAXSHORT) # else # ifdef SHRT_MAX # define PERL_SHORT_MAX ((short)SHRT_MAX) # else # define PERL_SHORT_MAX ((short) (PERL_USHORT_MAX >> 1)) # endif # endif # endif #endif #ifndef PERL_SHORT_MIN # ifdef SHORT_MIN # define PERL_SHORT_MIN ((short)SHORT_MIN) # else # ifdef MINSHORT # define PERL_SHORT_MIN ((short)MINSHORT) # else # ifdef SHRT_MIN # define PERL_SHORT_MIN ((short)SHRT_MIN) # else # define PERL_SHORT_MIN (-PERL_SHORT_MAX - ((3 & -1) == 3)) # endif # endif # endif #endif #ifndef PERL_UINT_MAX # ifdef UINT_MAX # define PERL_UINT_MAX ((unsigned int)UINT_MAX) # else # ifdef MAXUINT # define PERL_UINT_MAX ((unsigned int)MAXUINT) # else # define PERL_UINT_MAX (~(unsigned int)0) # endif # endif #endif #ifndef PERL_UINT_MIN # define PERL_UINT_MIN ((unsigned int)0) #endif #ifndef PERL_INT_MAX # ifdef INT_MAX # define PERL_INT_MAX ((int)INT_MAX) # else # ifdef MAXINT /* Often used in */ # define PERL_INT_MAX ((int)MAXINT) # else # define PERL_INT_MAX ((int)(PERL_UINT_MAX >> 1)) # endif # endif #endif #ifndef PERL_INT_MIN # ifdef INT_MIN # define PERL_INT_MIN ((int)INT_MIN) # else # ifdef MININT # define PERL_INT_MIN ((int)MININT) # else # define PERL_INT_MIN (-PERL_INT_MAX - ((3 & -1) == 3)) # endif # endif #endif #ifndef PERL_ULONG_MAX # ifdef ULONG_MAX # define PERL_ULONG_MAX ((unsigned long)ULONG_MAX) # else # ifdef MAXULONG # define PERL_ULONG_MAX ((unsigned long)MAXULONG) # else # define PERL_ULONG_MAX (~(unsigned long)0) # endif # endif #endif #ifndef PERL_ULONG_MIN # define PERL_ULONG_MIN ((unsigned long)0L) #endif #ifndef PERL_LONG_MAX # ifdef LONG_MAX # define PERL_LONG_MAX ((long)LONG_MAX) # else # ifdef MAXLONG # define PERL_LONG_MAX ((long)MAXLONG) # else # define PERL_LONG_MAX ((long) (PERL_ULONG_MAX >> 1)) # endif # endif #endif #ifndef PERL_LONG_MIN # ifdef LONG_MIN # define PERL_LONG_MIN ((long)LONG_MIN) # else # ifdef MINLONG # define PERL_LONG_MIN ((long)MINLONG) # else # define PERL_LONG_MIN (-PERL_LONG_MAX - ((3 & -1) == 3)) # endif # endif #endif #if defined(HAS_QUAD) && (defined(convex) || defined(uts)) # ifndef PERL_UQUAD_MAX # ifdef ULONGLONG_MAX # define PERL_UQUAD_MAX ((unsigned long long)ULONGLONG_MAX) # else # ifdef MAXULONGLONG # define PERL_UQUAD_MAX ((unsigned long long)MAXULONGLONG) # else # define PERL_UQUAD_MAX (~(unsigned long long)0) # endif # endif # endif # ifndef PERL_UQUAD_MIN # define PERL_UQUAD_MIN ((unsigned long long)0L) # endif # ifndef PERL_QUAD_MAX # ifdef LONGLONG_MAX # define PERL_QUAD_MAX ((long long)LONGLONG_MAX) # else # ifdef MAXLONGLONG # define PERL_QUAD_MAX ((long long)MAXLONGLONG) # else # define PERL_QUAD_MAX ((long long) (PERL_UQUAD_MAX >> 1)) # endif # endif # endif # ifndef PERL_QUAD_MIN # ifdef LONGLONG_MIN # define PERL_QUAD_MIN ((long long)LONGLONG_MIN) # else # ifdef MINLONGLONG # define PERL_QUAD_MIN ((long long)MINLONGLONG) # else # define PERL_QUAD_MIN (-PERL_QUAD_MAX - ((3 & -1) == 3)) # endif # endif # endif #endif /* This is based on code from 5.003 perl.h */ #ifdef HAS_QUAD # ifdef cray #ifndef IVTYPE # define IVTYPE int #endif #ifndef IV_MIN # define IV_MIN PERL_INT_MIN #endif #ifndef IV_MAX # define IV_MAX PERL_INT_MAX #endif #ifndef UV_MIN # define UV_MIN PERL_UINT_MIN #endif #ifndef UV_MAX # define UV_MAX PERL_UINT_MAX #endif # ifdef INTSIZE #ifndef IVSIZE # define IVSIZE INTSIZE #endif # endif # else # if defined(convex) || defined(uts) #ifndef IVTYPE # define IVTYPE long long #endif #ifndef IV_MIN # define IV_MIN PERL_QUAD_MIN #endif #ifndef IV_MAX # define IV_MAX PERL_QUAD_MAX #endif #ifndef UV_MIN # define UV_MIN PERL_UQUAD_MIN #endif #ifndef UV_MAX # define UV_MAX PERL_UQUAD_MAX #endif # ifdef LONGLONGSIZE #ifndef IVSIZE # define IVSIZE LONGLONGSIZE #endif # endif # else #ifndef IVTYPE # define IVTYPE long #endif #ifndef IV_MIN # define IV_MIN PERL_LONG_MIN #endif #ifndef IV_MAX # define IV_MAX PERL_LONG_MAX #endif #ifndef UV_MIN # define UV_MIN PERL_ULONG_MIN #endif #ifndef UV_MAX # define UV_MAX PERL_ULONG_MAX #endif # ifdef LONGSIZE #ifndef IVSIZE # define IVSIZE LONGSIZE #endif # endif # endif # endif #ifndef IVSIZE # define IVSIZE 8 #endif #ifndef PERL_QUAD_MIN # define PERL_QUAD_MIN IV_MIN #endif #ifndef PERL_QUAD_MAX # define PERL_QUAD_MAX IV_MAX #endif #ifndef PERL_UQUAD_MIN # define PERL_UQUAD_MIN UV_MIN #endif #ifndef PERL_UQUAD_MAX # define PERL_UQUAD_MAX UV_MAX #endif #else #ifndef IVTYPE # define IVTYPE long #endif #ifndef IV_MIN # define IV_MIN PERL_LONG_MIN #endif #ifndef IV_MAX # define IV_MAX PERL_LONG_MAX #endif #ifndef UV_MIN # define UV_MIN PERL_ULONG_MIN #endif #ifndef UV_MAX # define UV_MAX PERL_ULONG_MAX #endif #endif #ifndef IVSIZE # ifdef LONGSIZE # define IVSIZE LONGSIZE # else # define IVSIZE 4 /* A bold guess, but the best we can make. */ # endif #endif #ifndef UVTYPE # define UVTYPE unsigned IVTYPE #endif #ifndef UVSIZE # define UVSIZE IVSIZE #endif #ifndef sv_setuv # define sv_setuv(sv, uv) \ STMT_START { \ UV TeMpUv = uv; \ if (TeMpUv <= IV_MAX) \ sv_setiv(sv, TeMpUv); \ else \ sv_setnv(sv, (double)TeMpUv); \ } STMT_END #endif #ifndef newSVuv # define newSVuv(uv) ((uv) <= IV_MAX ? newSViv((IV)uv) : newSVnv((NV)uv)) #endif #ifndef sv_2uv # define sv_2uv(sv) ((PL_Sv = (sv)), (UV) (SvNOK(PL_Sv) ? SvNV(PL_Sv) : sv_2nv(PL_Sv))) #endif #ifndef SvUVX # define SvUVX(sv) ((UV)SvIVX(sv)) #endif #ifndef SvUVXx # define SvUVXx(sv) SvUVX(sv) #endif #ifndef SvUV # define SvUV(sv) (SvIOK(sv) ? SvUVX(sv) : sv_2uv(sv)) #endif #ifndef SvUVx # define SvUVx(sv) ((PL_Sv = (sv)), SvUV(PL_Sv)) #endif /* Hint: sv_uv * Always use the SvUVx() macro instead of sv_uv(). */ #ifndef sv_uv # define sv_uv(sv) SvUVx(sv) #endif #ifndef XST_mUV # define XST_mUV(i,v) (ST(i) = sv_2mortal(newSVuv(v)) ) #endif #ifndef XSRETURN_UV # define XSRETURN_UV(v) STMT_START { XST_mUV(0,v); XSRETURN(1); } STMT_END #endif #ifndef PUSHu # define PUSHu(u) STMT_START { sv_setuv(TARG, (UV)(u)); PUSHTARG; } STMT_END #endif #ifndef XPUSHu # define XPUSHu(u) STMT_START { sv_setuv(TARG, (UV)(u)); XPUSHTARG; } STMT_END #endif #if (PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5)) /* Replace: 1 */ # define PL_DBsingle DBsingle # define PL_DBsub DBsub # define PL_Sv Sv # define PL_compiling compiling # define PL_copline copline # define PL_curcop curcop # define PL_curstash curstash # define PL_debstash debstash # define PL_defgv defgv # define PL_diehook diehook # define PL_dirty dirty # define PL_dowarn dowarn # define PL_errgv errgv # define PL_hexdigit hexdigit # define PL_hints hints # define PL_na na # define PL_no_modify no_modify # define PL_perl_destruct_level perl_destruct_level # define PL_perldb perldb # define PL_ppaddr ppaddr # define PL_rsfp_filters rsfp_filters # define PL_rsfp rsfp # define PL_stack_base stack_base # define PL_stack_sp stack_sp # define PL_stdingv stdingv # define PL_sv_arenaroot sv_arenaroot # define PL_sv_no sv_no # define PL_sv_undef sv_undef # define PL_sv_yes sv_yes # define PL_tainted tainted # define PL_tainting tainting /* Replace: 0 */ #endif #ifndef PERL_UNUSED_DECL # ifdef HASATTRIBUTE # if (defined(__GNUC__) && defined(__cplusplus)) || defined(__INTEL_COMPILER) # define PERL_UNUSED_DECL # else # define PERL_UNUSED_DECL __attribute__((unused)) # endif # else # define PERL_UNUSED_DECL # endif #endif #ifndef NOOP # define NOOP (void)0 #endif #ifndef dNOOP # define dNOOP extern int Perl___notused PERL_UNUSED_DECL #endif #ifndef NVTYPE # if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) # define NVTYPE long double # else # define NVTYPE double # endif typedef NVTYPE NV; #endif #ifndef INT2PTR # if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE) # define PTRV UV # define INT2PTR(any,d) (any)(d) # else # if PTRSIZE == LONGSIZE # define PTRV unsigned long # else # define PTRV unsigned # endif # define INT2PTR(any,d) (any)(PTRV)(d) # endif # define NUM2PTR(any,d) (any)(PTRV)(d) # define PTR2IV(p) INT2PTR(IV,p) # define PTR2UV(p) INT2PTR(UV,p) # define PTR2NV(p) NUM2PTR(NV,p) # if PTRSIZE == LONGSIZE # define PTR2ul(p) (unsigned long)(p) # else # define PTR2ul(p) INT2PTR(unsigned long,p) # endif #endif /* !INT2PTR */ #undef START_EXTERN_C #undef END_EXTERN_C #undef EXTERN_C #ifdef __cplusplus # define START_EXTERN_C extern "C" { # define END_EXTERN_C } # define EXTERN_C extern "C" #else # define START_EXTERN_C # define END_EXTERN_C # define EXTERN_C extern #endif #ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN # if defined(__STRICT_ANSI__) && defined(PERL_GCC_PEDANTIC) # define PERL_GCC_BRACE_GROUPS_FORBIDDEN # endif #endif #undef STMT_START #undef STMT_END #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) && !defined(__cplusplus) # define STMT_START (void)( /* gcc supports ``({ STATEMENTS; })'' */ # define STMT_END ) #else # if defined(VOIDFLAGS) && (VOIDFLAGS) && (defined(sun) || defined(__sun__)) && !defined(__GNUC__) # define STMT_START if (1) # define STMT_END else (void)0 # else # define STMT_START do # define STMT_END while (0) # endif #endif #ifndef boolSV # define boolSV(b) ((b) ? &PL_sv_yes : &PL_sv_no) #endif /* DEFSV appears first in 5.004_56 */ #ifndef DEFSV # define DEFSV GvSV(PL_defgv) #endif #ifndef SAVE_DEFSV # define SAVE_DEFSV SAVESPTR(GvSV(PL_defgv)) #endif /* Older perls (<=5.003) lack AvFILLp */ #ifndef AvFILLp # define AvFILLp AvFILL #endif #ifndef ERRSV # define ERRSV get_sv("@",FALSE) #endif #ifndef newSVpvn # define newSVpvn(data,len) ((data) \ ? ((len) ? newSVpv((data), (len)) : newSVpv("", 0)) \ : newSV(0)) #endif /* Hint: gv_stashpvn * This function's backport doesn't support the length parameter, but * rather ignores it. Portability can only be ensured if the length * parameter is used for speed reasons, but the length can always be * correctly computed from the string argument. */ #ifndef gv_stashpvn # define gv_stashpvn(str,len,create) gv_stashpv(str,create) #endif /* Replace: 1 */ #ifndef get_cv # define get_cv perl_get_cv #endif #ifndef get_sv # define get_sv perl_get_sv #endif #ifndef get_av # define get_av perl_get_av #endif #ifndef get_hv # define get_hv perl_get_hv #endif /* Replace: 0 */ #ifdef HAS_MEMCMP #ifndef memNE # define memNE(s1,s2,l) (memcmp(s1,s2,l)) #endif #ifndef memEQ # define memEQ(s1,s2,l) (!memcmp(s1,s2,l)) #endif #else #ifndef memNE # define memNE(s1,s2,l) (bcmp(s1,s2,l)) #endif #ifndef memEQ # define memEQ(s1,s2,l) (!bcmp(s1,s2,l)) #endif #endif #ifndef MoveD # define MoveD(s,d,n,t) memmove((char*)(d),(char*)(s), (n) * sizeof(t)) #endif #ifndef CopyD # define CopyD(s,d,n,t) memcpy((char*)(d),(char*)(s), (n) * sizeof(t)) #endif #ifdef HAS_MEMSET #ifndef ZeroD # define ZeroD(d,n,t) memzero((char*)(d), (n) * sizeof(t)) #endif #else #ifndef ZeroD # define ZeroD(d,n,t) ((void)memzero((char*)(d), (n) * sizeof(t)),d) #endif #endif #ifndef Poison # define Poison(d,n,t) (void)memset((char*)(d), 0xAB, (n) * sizeof(t)) #endif #ifndef dUNDERBAR # define dUNDERBAR dNOOP #endif #ifndef UNDERBAR # define UNDERBAR DEFSV #endif #ifndef dAX # define dAX I32 ax = MARK - PL_stack_base + 1 #endif #ifndef dITEMS # define dITEMS I32 items = SP - MARK #endif #ifndef dXSTARG # define dXSTARG SV * targ = sv_newmortal() #endif #ifndef dTHR # define dTHR dNOOP #endif #ifndef dTHX # define dTHX dNOOP #endif #ifndef dTHXa # define dTHXa(x) dNOOP #endif #ifndef pTHX # define pTHX void #endif #ifndef pTHX_ # define pTHX_ #endif #ifndef aTHX # define aTHX #endif #ifndef aTHX_ # define aTHX_ #endif #ifndef dTHXoa # define dTHXoa(x) dTHXa(x) #endif #ifndef PUSHmortal # define PUSHmortal PUSHs(sv_newmortal()) #endif #ifndef mPUSHp # define mPUSHp(p,l) sv_setpvn_mg(PUSHmortal, (p), (l)) #endif #ifndef mPUSHn # define mPUSHn(n) sv_setnv_mg(PUSHmortal, (NV)(n)) #endif #ifndef mPUSHi # define mPUSHi(i) sv_setiv_mg(PUSHmortal, (IV)(i)) #endif #ifndef mPUSHu # define mPUSHu(u) sv_setuv_mg(PUSHmortal, (UV)(u)) #endif #ifndef XPUSHmortal # define XPUSHmortal XPUSHs(sv_newmortal()) #endif #ifndef mXPUSHp # define mXPUSHp(p,l) STMT_START { EXTEND(sp,1); sv_setpvn_mg(PUSHmortal, (p), (l)); } STMT_END #endif #ifndef mXPUSHn # define mXPUSHn(n) STMT_START { EXTEND(sp,1); sv_setnv_mg(PUSHmortal, (NV)(n)); } STMT_END #endif #ifndef mXPUSHi # define mXPUSHi(i) STMT_START { EXTEND(sp,1); sv_setiv_mg(PUSHmortal, (IV)(i)); } STMT_END #endif #ifndef mXPUSHu # define mXPUSHu(u) STMT_START { EXTEND(sp,1); sv_setuv_mg(PUSHmortal, (UV)(u)); } STMT_END #endif /* Replace: 1 */ #ifndef call_sv # define call_sv perl_call_sv #endif #ifndef call_pv # define call_pv perl_call_pv #endif #ifndef call_argv # define call_argv perl_call_argv #endif #ifndef call_method # define call_method perl_call_method #endif #ifndef eval_sv # define eval_sv perl_eval_sv #endif /* Replace: 0 */ /* Replace perl_eval_pv with eval_pv */ /* eval_pv depends on eval_sv */ #ifndef eval_pv #if defined(NEED_eval_pv) static SV* DPPP_(my_eval_pv)(char *p, I32 croak_on_error); static #else extern SV* DPPP_(my_eval_pv)(char *p, I32 croak_on_error); #endif #ifdef eval_pv # undef eval_pv #endif #define eval_pv(a,b) DPPP_(my_eval_pv)(aTHX_ a,b) #define Perl_eval_pv DPPP_(my_eval_pv) #if defined(NEED_eval_pv) || defined(NEED_eval_pv_GLOBAL) SV* DPPP_(my_eval_pv)(char *p, I32 croak_on_error) { dSP; SV* sv = newSVpv(p, 0); PUSHMARK(sp); eval_sv(sv, G_SCALAR); SvREFCNT_dec(sv); SPAGAIN; sv = POPs; PUTBACK; if (croak_on_error && SvTRUE(GvSV(errgv))) croak(SvPVx(GvSV(errgv), na)); return sv; } #endif #endif #ifndef newRV_inc # define newRV_inc(sv) newRV(sv) /* Replace */ #endif #ifndef newRV_noinc #if defined(NEED_newRV_noinc) static SV * DPPP_(my_newRV_noinc)(SV *sv); static #else extern SV * DPPP_(my_newRV_noinc)(SV *sv); #endif #ifdef newRV_noinc # undef newRV_noinc #endif #define newRV_noinc(a) DPPP_(my_newRV_noinc)(aTHX_ a) #define Perl_newRV_noinc DPPP_(my_newRV_noinc) #if defined(NEED_newRV_noinc) || defined(NEED_newRV_noinc_GLOBAL) SV * DPPP_(my_newRV_noinc)(SV *sv) { SV *rv = (SV *)newRV(sv); SvREFCNT_dec(sv); return rv; } #endif #endif /* Hint: newCONSTSUB * Returns a CV* as of perl-5.7.1. This return value is not supported * by Devel::PPPort. */ /* newCONSTSUB from IO.xs is in the core starting with 5.004_63 */ #if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION < 63))) && ((PERL_VERSION != 4) || (PERL_SUBVERSION != 5)) #if defined(NEED_newCONSTSUB) static void DPPP_(my_newCONSTSUB)(HV *stash, char *name, SV *sv); static #else extern void DPPP_(my_newCONSTSUB)(HV *stash, char *name, SV *sv); #endif #ifdef newCONSTSUB # undef newCONSTSUB #endif #define newCONSTSUB(a,b,c) DPPP_(my_newCONSTSUB)(aTHX_ a,b,c) #define Perl_newCONSTSUB DPPP_(my_newCONSTSUB) #if defined(NEED_newCONSTSUB) || defined(NEED_newCONSTSUB_GLOBAL) void DPPP_(my_newCONSTSUB)(HV *stash, char *name, SV *sv) { U32 oldhints = PL_hints; HV *old_cop_stash = PL_curcop->cop_stash; HV *old_curstash = PL_curstash; line_t oldline = PL_curcop->cop_line; PL_curcop->cop_line = PL_copline; PL_hints &= ~HINT_BLOCK_SCOPE; if (stash) PL_curstash = PL_curcop->cop_stash = stash; newSUB( #if ((PERL_VERSION < 3) || ((PERL_VERSION == 3) && (PERL_SUBVERSION < 22))) start_subparse(), #elif ((PERL_VERSION == 3) && (PERL_SUBVERSION == 22)) start_subparse(0), #else /* 5.003_23 onwards */ start_subparse(FALSE, 0), #endif newSVOP(OP_CONST, 0, newSVpv(name,0)), newSVOP(OP_CONST, 0, &PL_sv_no), /* SvPV(&PL_sv_no) == "" -- GMB */ newSTATEOP(0, Nullch, newSVOP(OP_CONST, 0, sv)) ); PL_hints = oldhints; PL_curcop->cop_stash = old_cop_stash; PL_curstash = old_curstash; PL_curcop->cop_line = oldline; } #endif #endif /* * Boilerplate macros for initializing and accessing interpreter-local * data from C. All statics in extensions should be reworked to use * this, if you want to make the extension thread-safe. See ext/re/re.xs * for an example of the use of these macros. * * Code that uses these macros is responsible for the following: * 1. #define MY_CXT_KEY to a unique string, e.g. "DynaLoader_guts" * 2. Declare a typedef named my_cxt_t that is a structure that contains * all the data that needs to be interpreter-local. * 3. Use the START_MY_CXT macro after the declaration of my_cxt_t. * 4. Use the MY_CXT_INIT macro such that it is called exactly once * (typically put in the BOOT: section). * 5. Use the members of the my_cxt_t structure everywhere as * MY_CXT.member. * 6. Use the dMY_CXT macro (a declaration) in all the functions that * access MY_CXT. */ #if defined(MULTIPLICITY) || defined(PERL_OBJECT) || \ defined(PERL_CAPI) || defined(PERL_IMPLICIT_CONTEXT) #ifndef START_MY_CXT /* This must appear in all extensions that define a my_cxt_t structure, * right after the definition (i.e. at file scope). The non-threads * case below uses it to declare the data as static. */ #define START_MY_CXT #if (PERL_VERSION < 4 || (PERL_VERSION == 4 && PERL_SUBVERSION < 68 )) /* Fetches the SV that keeps the per-interpreter data. */ #define dMY_CXT_SV \ SV *my_cxt_sv = get_sv(MY_CXT_KEY, FALSE) #else /* >= perl5.004_68 */ #define dMY_CXT_SV \ SV *my_cxt_sv = *hv_fetch(PL_modglobal, MY_CXT_KEY, \ sizeof(MY_CXT_KEY)-1, TRUE) #endif /* < perl5.004_68 */ /* This declaration should be used within all functions that use the * interpreter-local data. */ #define dMY_CXT \ dMY_CXT_SV; \ my_cxt_t *my_cxtp = INT2PTR(my_cxt_t*,SvUV(my_cxt_sv)) /* Creates and zeroes the per-interpreter data. * (We allocate my_cxtp in a Perl SV so that it will be released when * the interpreter goes away.) */ #define MY_CXT_INIT \ dMY_CXT_SV; \ /* newSV() allocates one more than needed */ \ my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\ Zero(my_cxtp, 1, my_cxt_t); \ sv_setuv(my_cxt_sv, PTR2UV(my_cxtp)) /* This macro must be used to access members of the my_cxt_t structure. * e.g. MYCXT.some_data */ #define MY_CXT (*my_cxtp) /* Judicious use of these macros can reduce the number of times dMY_CXT * is used. Use is similar to pTHX, aTHX etc. */ #define pMY_CXT my_cxt_t *my_cxtp #define pMY_CXT_ pMY_CXT, #define _pMY_CXT ,pMY_CXT #define aMY_CXT my_cxtp #define aMY_CXT_ aMY_CXT, #define _aMY_CXT ,aMY_CXT #endif /* START_MY_CXT */ #ifndef MY_CXT_CLONE /* Clones the per-interpreter data. */ #define MY_CXT_CLONE \ dMY_CXT_SV; \ my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\ Copy(INT2PTR(my_cxt_t*, SvUV(my_cxt_sv)), my_cxtp, 1, my_cxt_t);\ sv_setuv(my_cxt_sv, PTR2UV(my_cxtp)) #endif #else /* single interpreter */ #ifndef START_MY_CXT #define START_MY_CXT static my_cxt_t my_cxt; #define dMY_CXT_SV dNOOP #define dMY_CXT dNOOP #define MY_CXT_INIT NOOP #define MY_CXT my_cxt #define pMY_CXT void #define pMY_CXT_ #define _pMY_CXT #define aMY_CXT #define aMY_CXT_ #define _aMY_CXT #endif /* START_MY_CXT */ #ifndef MY_CXT_CLONE #define MY_CXT_CLONE NOOP #endif #endif #ifndef IVdf # if IVSIZE == LONGSIZE # define IVdf "ld" # define UVuf "lu" # define UVof "lo" # define UVxf "lx" # define UVXf "lX" # else # if IVSIZE == INTSIZE # define IVdf "d" # define UVuf "u" # define UVof "o" # define UVxf "x" # define UVXf "X" # endif # endif #endif #ifndef NVef # if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) && \ defined(PERL_PRIfldbl) /* Not very likely, but let's try anyway. */ # define NVef PERL_PRIeldbl # define NVff PERL_PRIfldbl # define NVgf PERL_PRIgldbl # else # define NVef "e" # define NVff "f" # define NVgf "g" # endif #endif #ifndef SvPV_nolen #if defined(NEED_sv_2pv_nolen) static char * DPPP_(my_sv_2pv_nolen)(pTHX_ register SV *sv); static #else extern char * DPPP_(my_sv_2pv_nolen)(pTHX_ register SV *sv); #endif #ifdef sv_2pv_nolen # undef sv_2pv_nolen #endif #define sv_2pv_nolen(a) DPPP_(my_sv_2pv_nolen)(aTHX_ a) #define Perl_sv_2pv_nolen DPPP_(my_sv_2pv_nolen) #if defined(NEED_sv_2pv_nolen) || defined(NEED_sv_2pv_nolen_GLOBAL) char * DPPP_(my_sv_2pv_nolen)(pTHX_ register SV *sv) { STRLEN n_a; return sv_2pv(sv, &n_a); } #endif /* Hint: sv_2pv_nolen * Use the SvPV_nolen() macro instead of sv_2pv_nolen(). */ /* SvPV_nolen depends on sv_2pv_nolen */ #define SvPV_nolen(sv) \ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ ? SvPVX(sv) : sv_2pv_nolen(sv)) #endif #ifdef SvPVbyte /* Hint: SvPVbyte * Does not work in perl-5.6.1, ppport.h implements a version * borrowed from perl-5.7.3. */ #if ((PERL_VERSION < 7) || ((PERL_VERSION == 7) && (PERL_SUBVERSION < 0))) #if defined(NEED_sv_2pvbyte) static char * DPPP_(my_sv_2pvbyte)(pTHX_ register SV *sv, STRLEN *lp); static #else extern char * DPPP_(my_sv_2pvbyte)(pTHX_ register SV *sv, STRLEN *lp); #endif #ifdef sv_2pvbyte # undef sv_2pvbyte #endif #define sv_2pvbyte(a,b) DPPP_(my_sv_2pvbyte)(aTHX_ a,b) #define Perl_sv_2pvbyte DPPP_(my_sv_2pvbyte) #if defined(NEED_sv_2pvbyte) || defined(NEED_sv_2pvbyte_GLOBAL) char * DPPP_(my_sv_2pvbyte)(pTHX_ register SV *sv, STRLEN *lp) { sv_utf8_downgrade(sv,0); return SvPV(sv,*lp); } #endif /* Hint: sv_2pvbyte * Use the SvPVbyte() macro instead of sv_2pvbyte(). */ #undef SvPVbyte /* SvPVbyte depends on sv_2pvbyte */ #define SvPVbyte(sv, lp) \ ((SvFLAGS(sv) & (SVf_POK|SVf_UTF8)) == (SVf_POK) \ ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pvbyte(sv, &lp)) #endif #else # define SvPVbyte SvPV # define sv_2pvbyte sv_2pv #endif /* sv_2pvbyte_nolen depends on sv_2pv_nolen */ #ifndef sv_2pvbyte_nolen # define sv_2pvbyte_nolen sv_2pv_nolen #endif /* Hint: sv_pvn * Always use the SvPV() macro instead of sv_pvn(). */ #ifndef sv_pvn # define sv_pvn(sv, len) SvPV(sv, len) #endif /* Hint: sv_pvn_force * Always use the SvPV_force() macro instead of sv_pvn_force(). */ #ifndef sv_pvn_force # define sv_pvn_force(sv, len) SvPV_force(sv, len) #endif #if ((PERL_VERSION > 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION >= 0))) && !defined(vnewSVpvf) #if defined(NEED_vnewSVpvf) static SV * DPPP_(my_vnewSVpvf)(pTHX_ const char * pat, va_list * args); static #else extern SV * DPPP_(my_vnewSVpvf)(pTHX_ const char * pat, va_list * args); #endif #ifdef vnewSVpvf # undef vnewSVpvf #endif #define vnewSVpvf(a,b) DPPP_(my_vnewSVpvf)(aTHX_ a,b) #define Perl_vnewSVpvf DPPP_(my_vnewSVpvf) #if defined(NEED_vnewSVpvf) || defined(NEED_vnewSVpvf_GLOBAL) SV * DPPP_(my_vnewSVpvf)(pTHX_ const char *pat, va_list *args) { register SV *sv = newSV(0); sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); return sv; } #endif #endif /* sv_vcatpvf depends on sv_vcatpvfn */ #if ((PERL_VERSION > 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION >= 0))) && !defined(sv_vcatpvf) # define sv_vcatpvf(sv, pat, args) sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)) #endif /* sv_vsetpvf depends on sv_vsetpvfn */ #if ((PERL_VERSION > 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION >= 0))) && !defined(sv_vsetpvf) # define sv_vsetpvf(sv, pat, args) sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)) #endif /* sv_catpvf_mg depends on sv_vcatpvfn, sv_catpvf_mg_nocontext */ #if ((PERL_VERSION > 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION >= 0))) && !defined(sv_catpvf_mg) #if defined(NEED_sv_catpvf_mg) static void DPPP_(my_sv_catpvf_mg)(pTHX_ SV * sv, const char * pat, ...); static #else extern void DPPP_(my_sv_catpvf_mg)(pTHX_ SV * sv, const char * pat, ...); #endif #define Perl_sv_catpvf_mg DPPP_(my_sv_catpvf_mg) #if defined(NEED_sv_catpvf_mg) || defined(NEED_sv_catpvf_mg_GLOBAL) void DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...) { va_list args; va_start(args, pat); sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); SvSETMAGIC(sv); va_end(args); } #endif #endif /* sv_catpvf_mg_nocontext depends on sv_vcatpvfn */ #ifdef PERL_IMPLICIT_CONTEXT #if ((PERL_VERSION > 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION >= 0))) && !defined(sv_catpvf_mg_nocontext) #if defined(NEED_sv_catpvf_mg_nocontext) static void DPPP_(my_sv_catpvf_mg_nocontext)(SV * sv, const char * pat, ...); static #else extern void DPPP_(my_sv_catpvf_mg_nocontext)(SV * sv, const char * pat, ...); #endif #define sv_catpvf_mg_nocontext DPPP_(my_sv_catpvf_mg_nocontext) #define Perl_sv_catpvf_mg_nocontext DPPP_(my_sv_catpvf_mg_nocontext) #if defined(NEED_sv_catpvf_mg_nocontext) || defined(NEED_sv_catpvf_mg_nocontext_GLOBAL) void DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...) { dTHX; va_list args; va_start(args, pat); sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); SvSETMAGIC(sv); va_end(args); } #endif #endif #endif #ifndef sv_catpvf_mg # ifdef PERL_IMPLICIT_CONTEXT # define sv_catpvf_mg Perl_sv_catpvf_mg_nocontext # else # define sv_catpvf_mg Perl_sv_catpvf_mg # endif #endif /* sv_vcatpvf_mg depends on sv_vcatpvfn */ #if ((PERL_VERSION > 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION >= 0))) && !defined(sv_vcatpvf_mg) # define sv_vcatpvf_mg(sv, pat, args) \ STMT_START { \ sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); \ SvSETMAGIC(sv); \ } STMT_END #endif /* sv_setpvf_mg depends on sv_vsetpvfn, sv_setpvf_mg_nocontext */ #if ((PERL_VERSION > 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION >= 0))) && !defined(sv_setpvf_mg) #if defined(NEED_sv_setpvf_mg) static void DPPP_(my_sv_setpvf_mg)(pTHX_ SV * sv, const char * pat, ...); static #else extern void DPPP_(my_sv_setpvf_mg)(pTHX_ SV * sv, const char * pat, ...); #endif #define Perl_sv_setpvf_mg DPPP_(my_sv_setpvf_mg) #if defined(NEED_sv_setpvf_mg) || defined(NEED_sv_setpvf_mg_GLOBAL) void DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...) { va_list args; va_start(args, pat); sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); SvSETMAGIC(sv); va_end(args); } #endif #endif /* sv_setpvf_mg_nocontext depends on sv_vsetpvfn */ #ifdef PERL_IMPLICIT_CONTEXT #if ((PERL_VERSION > 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION >= 0))) && !defined(sv_setpvf_mg_nocontext) #if defined(NEED_sv_setpvf_mg_nocontext) static void DPPP_(my_sv_setpvf_mg_nocontext)(SV * sv, const char * pat, ...); static #else extern void DPPP_(my_sv_setpvf_mg_nocontext)(SV * sv, const char * pat, ...); #endif #define sv_setpvf_mg_nocontext DPPP_(my_sv_setpvf_mg_nocontext) #define Perl_sv_setpvf_mg_nocontext DPPP_(my_sv_setpvf_mg_nocontext) #if defined(NEED_sv_setpvf_mg_nocontext) || defined(NEED_sv_setpvf_mg_nocontext_GLOBAL) void DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...) { dTHX; va_list args; va_start(args, pat); sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); SvSETMAGIC(sv); va_end(args); } #endif #endif #endif #ifndef sv_setpvf_mg # ifdef PERL_IMPLICIT_CONTEXT # define sv_setpvf_mg Perl_sv_setpvf_mg_nocontext # else # define sv_setpvf_mg Perl_sv_setpvf_mg # endif #endif /* sv_vsetpvf_mg depends on sv_vsetpvfn */ #if ((PERL_VERSION > 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION >= 0))) && !defined(sv_vsetpvf_mg) # define sv_vsetpvf_mg(sv, pat, args) \ STMT_START { \ sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); \ SvSETMAGIC(sv); \ } STMT_END #endif #ifndef SvGETMAGIC # define SvGETMAGIC(x) STMT_START { if (SvGMAGICAL(x)) mg_get(x); } STMT_END #endif #ifndef PERL_MAGIC_sv # define PERL_MAGIC_sv '\0' #endif #ifndef PERL_MAGIC_overload # define PERL_MAGIC_overload 'A' #endif #ifndef PERL_MAGIC_overload_elem # define PERL_MAGIC_overload_elem 'a' #endif #ifndef PERL_MAGIC_overload_table # define PERL_MAGIC_overload_table 'c' #endif #ifndef PERL_MAGIC_bm # define PERL_MAGIC_bm 'B' #endif #ifndef PERL_MAGIC_regdata # define PERL_MAGIC_regdata 'D' #endif #ifndef PERL_MAGIC_regdatum # define PERL_MAGIC_regdatum 'd' #endif #ifndef PERL_MAGIC_env # define PERL_MAGIC_env 'E' #endif #ifndef PERL_MAGIC_envelem # define PERL_MAGIC_envelem 'e' #endif #ifndef PERL_MAGIC_fm # define PERL_MAGIC_fm 'f' #endif #ifndef PERL_MAGIC_regex_global # define PERL_MAGIC_regex_global 'g' #endif #ifndef PERL_MAGIC_isa # define PERL_MAGIC_isa 'I' #endif #ifndef PERL_MAGIC_isaelem # define PERL_MAGIC_isaelem 'i' #endif #ifndef PERL_MAGIC_nkeys # define PERL_MAGIC_nkeys 'k' #endif #ifndef PERL_MAGIC_dbfile # define PERL_MAGIC_dbfile 'L' #endif #ifndef PERL_MAGIC_dbline # define PERL_MAGIC_dbline 'l' #endif #ifndef PERL_MAGIC_mutex # define PERL_MAGIC_mutex 'm' #endif #ifndef PERL_MAGIC_shared # define PERL_MAGIC_shared 'N' #endif #ifndef PERL_MAGIC_shared_scalar # define PERL_MAGIC_shared_scalar 'n' #endif #ifndef PERL_MAGIC_collxfrm # define PERL_MAGIC_collxfrm 'o' #endif #ifndef PERL_MAGIC_tied # define PERL_MAGIC_tied 'P' #endif #ifndef PERL_MAGIC_tiedelem # define PERL_MAGIC_tiedelem 'p' #endif #ifndef PERL_MAGIC_tiedscalar # define PERL_MAGIC_tiedscalar 'q' #endif #ifndef PERL_MAGIC_qr # define PERL_MAGIC_qr 'r' #endif #ifndef PERL_MAGIC_sig # define PERL_MAGIC_sig 'S' #endif #ifndef PERL_MAGIC_sigelem # define PERL_MAGIC_sigelem 's' #endif #ifndef PERL_MAGIC_taint # define PERL_MAGIC_taint 't' #endif #ifndef PERL_MAGIC_uvar # define PERL_MAGIC_uvar 'U' #endif #ifndef PERL_MAGIC_uvar_elem # define PERL_MAGIC_uvar_elem 'u' #endif #ifndef PERL_MAGIC_vstring # define PERL_MAGIC_vstring 'V' #endif #ifndef PERL_MAGIC_vec # define PERL_MAGIC_vec 'v' #endif #ifndef PERL_MAGIC_utf8 # define PERL_MAGIC_utf8 'w' #endif #ifndef PERL_MAGIC_substr # define PERL_MAGIC_substr 'x' #endif #ifndef PERL_MAGIC_defelem # define PERL_MAGIC_defelem 'y' #endif #ifndef PERL_MAGIC_glob # define PERL_MAGIC_glob '*' #endif #ifndef PERL_MAGIC_arylen # define PERL_MAGIC_arylen '#' #endif #ifndef PERL_MAGIC_pos # define PERL_MAGIC_pos '.' #endif #ifndef PERL_MAGIC_backref # define PERL_MAGIC_backref '<' #endif #ifndef PERL_MAGIC_ext # define PERL_MAGIC_ext '~' #endif /* That's the best we can do... */ #ifndef SvPV_force_nomg # define SvPV_force_nomg SvPV_force #endif #ifndef SvPV_nomg # define SvPV_nomg SvPV #endif #ifndef sv_catpvn_nomg # define sv_catpvn_nomg sv_catpvn #endif #ifndef sv_catsv_nomg # define sv_catsv_nomg sv_catsv #endif #ifndef sv_setsv_nomg # define sv_setsv_nomg sv_setsv #endif #ifndef sv_pvn_nomg # define sv_pvn_nomg sv_pvn #endif #ifndef SvIV_nomg # define SvIV_nomg SvIV #endif #ifndef SvUV_nomg # define SvUV_nomg SvUV #endif #ifndef sv_catpv_mg # define sv_catpv_mg(sv, ptr) \ STMT_START { \ SV *TeMpSv = sv; \ sv_catpv(TeMpSv,ptr); \ SvSETMAGIC(TeMpSv); \ } STMT_END #endif #ifndef sv_catpvn_mg # define sv_catpvn_mg(sv, ptr, len) \ STMT_START { \ SV *TeMpSv = sv; \ sv_catpvn(TeMpSv,ptr,len); \ SvSETMAGIC(TeMpSv); \ } STMT_END #endif #ifndef sv_catsv_mg # define sv_catsv_mg(dsv, ssv) \ STMT_START { \ SV *TeMpSv = dsv; \ sv_catsv(TeMpSv,ssv); \ SvSETMAGIC(TeMpSv); \ } STMT_END #endif #ifndef sv_setiv_mg # define sv_setiv_mg(sv, i) \ STMT_START { \ SV *TeMpSv = sv; \ sv_setiv(TeMpSv,i); \ SvSETMAGIC(TeMpSv); \ } STMT_END #endif #ifndef sv_setnv_mg # define sv_setnv_mg(sv, num) \ STMT_START { \ SV *TeMpSv = sv; \ sv_setnv(TeMpSv,num); \ SvSETMAGIC(TeMpSv); \ } STMT_END #endif #ifndef sv_setpv_mg # define sv_setpv_mg(sv, ptr) \ STMT_START { \ SV *TeMpSv = sv; \ sv_setpv(TeMpSv,ptr); \ SvSETMAGIC(TeMpSv); \ } STMT_END #endif #ifndef sv_setpvn_mg # define sv_setpvn_mg(sv, ptr, len) \ STMT_START { \ SV *TeMpSv = sv; \ sv_setpvn(TeMpSv,ptr,len); \ SvSETMAGIC(TeMpSv); \ } STMT_END #endif #ifndef sv_setsv_mg # define sv_setsv_mg(dsv, ssv) \ STMT_START { \ SV *TeMpSv = dsv; \ sv_setsv(TeMpSv,ssv); \ SvSETMAGIC(TeMpSv); \ } STMT_END #endif #ifndef sv_setuv_mg # define sv_setuv_mg(sv, i) \ STMT_START { \ SV *TeMpSv = sv; \ sv_setuv(TeMpSv,i); \ SvSETMAGIC(TeMpSv); \ } STMT_END #endif #ifndef sv_usepvn_mg # define sv_usepvn_mg(sv, ptr, len) \ STMT_START { \ SV *TeMpSv = sv; \ sv_usepvn(TeMpSv,ptr,len); \ SvSETMAGIC(TeMpSv); \ } STMT_END #endif #ifdef USE_ITHREADS #ifndef CopFILE # define CopFILE(c) ((c)->cop_file) #endif #ifndef CopFILEGV # define CopFILEGV(c) (CopFILE(c) ? gv_fetchfile(CopFILE(c)) : Nullgv) #endif #ifndef CopFILE_set # define CopFILE_set(c,pv) ((c)->cop_file = savepv(pv)) #endif #ifndef CopFILESV # define CopFILESV(c) (CopFILE(c) ? GvSV(gv_fetchfile(CopFILE(c))) : Nullsv) #endif #ifndef CopFILEAV # define CopFILEAV(c) (CopFILE(c) ? GvAV(gv_fetchfile(CopFILE(c))) : Nullav) #endif #ifndef CopSTASHPV # define CopSTASHPV(c) ((c)->cop_stashpv) #endif #ifndef CopSTASHPV_set # define CopSTASHPV_set(c,pv) ((c)->cop_stashpv = ((pv) ? savepv(pv) : Nullch)) #endif #ifndef CopSTASH # define CopSTASH(c) (CopSTASHPV(c) ? gv_stashpv(CopSTASHPV(c),GV_ADD) : Nullhv) #endif #ifndef CopSTASH_set # define CopSTASH_set(c,hv) CopSTASHPV_set(c, (hv) ? HvNAME(hv) : Nullch) #endif #ifndef CopSTASH_eq # define CopSTASH_eq(c,hv) ((hv) && (CopSTASHPV(c) == HvNAME(hv) \ || (CopSTASHPV(c) && HvNAME(hv) \ && strEQ(CopSTASHPV(c), HvNAME(hv))))) #endif #else #ifndef CopFILEGV # define CopFILEGV(c) ((c)->cop_filegv) #endif #ifndef CopFILEGV_set # define CopFILEGV_set(c,gv) ((c)->cop_filegv = (GV*)SvREFCNT_inc(gv)) #endif #ifndef CopFILE_set # define CopFILE_set(c,pv) CopFILEGV_set((c), gv_fetchfile(pv)) #endif #ifndef CopFILESV # define CopFILESV(c) (CopFILEGV(c) ? GvSV(CopFILEGV(c)) : Nullsv) #endif #ifndef CopFILEAV # define CopFILEAV(c) (CopFILEGV(c) ? GvAV(CopFILEGV(c)) : Nullav) #endif #ifndef CopFILE # define CopFILE(c) (CopFILESV(c) ? SvPVX(CopFILESV(c)) : Nullch) #endif #ifndef CopSTASH # define CopSTASH(c) ((c)->cop_stash) #endif #ifndef CopSTASH_set # define CopSTASH_set(c,hv) ((c)->cop_stash = (hv)) #endif #ifndef CopSTASHPV # define CopSTASHPV(c) (CopSTASH(c) ? HvNAME(CopSTASH(c)) : Nullch) #endif #ifndef CopSTASHPV_set # define CopSTASHPV_set(c,pv) CopSTASH_set((c), gv_stashpv(pv,GV_ADD)) #endif #ifndef CopSTASH_eq # define CopSTASH_eq(c,hv) (CopSTASH(c) == (hv)) #endif #endif /* USE_ITHREADS */ #ifndef IN_PERL_COMPILETIME # define IN_PERL_COMPILETIME (PL_curcop == &PL_compiling) #endif #ifndef IN_LOCALE_RUNTIME # define IN_LOCALE_RUNTIME (PL_curcop->op_private & HINT_LOCALE) #endif #ifndef IN_LOCALE_COMPILETIME # define IN_LOCALE_COMPILETIME (PL_hints & HINT_LOCALE) #endif #ifndef IN_LOCALE # define IN_LOCALE (IN_PERL_COMPILETIME ? IN_LOCALE_COMPILETIME : IN_LOCALE_RUNTIME) #endif #ifndef IS_NUMBER_IN_UV # define IS_NUMBER_IN_UV 0x01 #endif #ifndef IS_NUMBER_GREATER_THAN_UV_MAX # define IS_NUMBER_GREATER_THAN_UV_MAX 0x02 #endif #ifndef IS_NUMBER_NOT_INT # define IS_NUMBER_NOT_INT 0x04 #endif #ifndef IS_NUMBER_NEG # define IS_NUMBER_NEG 0x08 #endif #ifndef IS_NUMBER_INFINITY # define IS_NUMBER_INFINITY 0x10 #endif #ifndef IS_NUMBER_NAN # define IS_NUMBER_NAN 0x20 #endif /* GROK_NUMERIC_RADIX depends on grok_numeric_radix */ #ifndef GROK_NUMERIC_RADIX # define GROK_NUMERIC_RADIX(sp, send) grok_numeric_radix(sp, send) #endif #ifndef PERL_SCAN_GREATER_THAN_UV_MAX # define PERL_SCAN_GREATER_THAN_UV_MAX 0x02 #endif #ifndef PERL_SCAN_SILENT_ILLDIGIT # define PERL_SCAN_SILENT_ILLDIGIT 0x04 #endif #ifndef PERL_SCAN_ALLOW_UNDERSCORES # define PERL_SCAN_ALLOW_UNDERSCORES 0x01 #endif #ifndef PERL_SCAN_DISALLOW_PREFIX # define PERL_SCAN_DISALLOW_PREFIX 0x02 #endif #ifndef grok_numeric_radix #if defined(NEED_grok_numeric_radix) static bool DPPP_(my_grok_numeric_radix)(pTHX_ const char ** sp, const char * send); static #else extern bool DPPP_(my_grok_numeric_radix)(pTHX_ const char ** sp, const char * send); #endif #ifdef grok_numeric_radix # undef grok_numeric_radix #endif #define grok_numeric_radix(a,b) DPPP_(my_grok_numeric_radix)(aTHX_ a,b) #define Perl_grok_numeric_radix DPPP_(my_grok_numeric_radix) #if defined(NEED_grok_numeric_radix) || defined(NEED_grok_numeric_radix_GLOBAL) bool DPPP_(my_grok_numeric_radix)(pTHX_ const char **sp, const char *send) { #ifdef USE_LOCALE_NUMERIC #ifdef PL_numeric_radix_sv if (PL_numeric_radix_sv && IN_LOCALE) { STRLEN len; char* radix = SvPV(PL_numeric_radix_sv, len); if (*sp + len <= send && memEQ(*sp, radix, len)) { *sp += len; return TRUE; } } #else /* older perls don't have PL_numeric_radix_sv so the radix * must manually be requested from locale.h */ #include dTHR; /* needed for older threaded perls */ struct lconv *lc = localeconv(); char *radix = lc->decimal_point; if (radix && IN_LOCALE) { STRLEN len = strlen(radix); if (*sp + len <= send && memEQ(*sp, radix, len)) { *sp += len; return TRUE; } } #endif /* PERL_VERSION */ #endif /* USE_LOCALE_NUMERIC */ /* always try "." if numeric radix didn't match because * we may have data from different locales mixed */ if (*sp < send && **sp == '.') { ++*sp; return TRUE; } return FALSE; } #endif #endif /* grok_number depends on grok_numeric_radix */ #ifndef grok_number #if defined(NEED_grok_number) static int DPPP_(my_grok_number)(pTHX_ const char * pv, STRLEN len, UV * valuep); static #else extern int DPPP_(my_grok_number)(pTHX_ const char * pv, STRLEN len, UV * valuep); #endif #ifdef grok_number # undef grok_number #endif #define grok_number(a,b,c) DPPP_(my_grok_number)(aTHX_ a,b,c) #define Perl_grok_number DPPP_(my_grok_number) #if defined(NEED_grok_number) || defined(NEED_grok_number_GLOBAL) int DPPP_(my_grok_number)(pTHX_ const char *pv, STRLEN len, UV *valuep) { const char *s = pv; const char *send = pv + len; const UV max_div_10 = UV_MAX / 10; const char max_mod_10 = UV_MAX % 10; int numtype = 0; int sawinf = 0; int sawnan = 0; while (s < send && isSPACE(*s)) s++; if (s == send) { return 0; } else if (*s == '-') { s++; numtype = IS_NUMBER_NEG; } else if (*s == '+') s++; if (s == send) return 0; /* next must be digit or the radix separator or beginning of infinity */ if (isDIGIT(*s)) { /* UVs are at least 32 bits, so the first 9 decimal digits cannot overflow. */ UV value = *s - '0'; /* This construction seems to be more optimiser friendly. (without it gcc does the isDIGIT test and the *s - '0' separately) With it gcc on arm is managing 6 instructions (6 cycles) per digit. In theory the optimiser could deduce how far to unroll the loop before checking for overflow. */ if (++s < send) { int digit = *s - '0'; if (digit >= 0 && digit <= 9) { value = value * 10 + digit; if (++s < send) { digit = *s - '0'; if (digit >= 0 && digit <= 9) { value = value * 10 + digit; if (++s < send) { digit = *s - '0'; if (digit >= 0 && digit <= 9) { value = value * 10 + digit; if (++s < send) { digit = *s - '0'; if (digit >= 0 && digit <= 9) { value = value * 10 + digit; if (++s < send) { digit = *s - '0'; if (digit >= 0 && digit <= 9) { value = value * 10 + digit; if (++s < send) { digit = *s - '0'; if (digit >= 0 && digit <= 9) { value = value * 10 + digit; if (++s < send) { digit = *s - '0'; if (digit >= 0 && digit <= 9) { value = value * 10 + digit; if (++s < send) { digit = *s - '0'; if (digit >= 0 && digit <= 9) { value = value * 10 + digit; if (++s < send) { /* Now got 9 digits, so need to check each time for overflow. */ digit = *s - '0'; while (digit >= 0 && digit <= 9 && (value < max_div_10 || (value == max_div_10 && digit <= max_mod_10))) { value = value * 10 + digit; if (++s < send) digit = *s - '0'; else break; } if (digit >= 0 && digit <= 9 && (s < send)) { /* value overflowed. skip the remaining digits, don't worry about setting *valuep. */ do { s++; } while (s < send && isDIGIT(*s)); numtype |= IS_NUMBER_GREATER_THAN_UV_MAX; goto skip_value; } } } } } } } } } } } } } } } } } } numtype |= IS_NUMBER_IN_UV; if (valuep) *valuep = value; skip_value: if (GROK_NUMERIC_RADIX(&s, send)) { numtype |= IS_NUMBER_NOT_INT; while (s < send && isDIGIT(*s)) /* optional digits after the radix */ s++; } } else if (GROK_NUMERIC_RADIX(&s, send)) { numtype |= IS_NUMBER_NOT_INT | IS_NUMBER_IN_UV; /* valuep assigned below */ /* no digits before the radix means we need digits after it */ if (s < send && isDIGIT(*s)) { do { s++; } while (s < send && isDIGIT(*s)); if (valuep) { /* integer approximation is valid - it's 0. */ *valuep = 0; } } else return 0; } else if (*s == 'I' || *s == 'i') { s++; if (s == send || (*s != 'N' && *s != 'n')) return 0; s++; if (s == send || (*s != 'F' && *s != 'f')) return 0; s++; if (s < send && (*s == 'I' || *s == 'i')) { s++; if (s == send || (*s != 'N' && *s != 'n')) return 0; s++; if (s == send || (*s != 'I' && *s != 'i')) return 0; s++; if (s == send || (*s != 'T' && *s != 't')) return 0; s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0; s++; } sawinf = 1; } else if (*s == 'N' || *s == 'n') { /* XXX TODO: There are signaling NaNs and quiet NaNs. */ s++; if (s == send || (*s != 'A' && *s != 'a')) return 0; s++; if (s == send || (*s != 'N' && *s != 'n')) return 0; s++; sawnan = 1; } else return 0; if (sawinf) { numtype &= IS_NUMBER_NEG; /* Keep track of sign */ numtype |= IS_NUMBER_INFINITY | IS_NUMBER_NOT_INT; } else if (sawnan) { numtype &= IS_NUMBER_NEG; /* Keep track of sign */ numtype |= IS_NUMBER_NAN | IS_NUMBER_NOT_INT; } else if (s < send) { /* we can have an optional exponent part */ if (*s == 'e' || *s == 'E') { /* The only flag we keep is sign. Blow away any "it's UV" */ numtype &= IS_NUMBER_NEG; numtype |= IS_NUMBER_NOT_INT; s++; if (s < send && (*s == '-' || *s == '+')) s++; if (s < send && isDIGIT(*s)) { do { s++; } while (s < send && isDIGIT(*s)); } else return 0; } } while (s < send && isSPACE(*s)) s++; if (s >= send) return numtype; if (len == 10 && memEQ(pv, "0 but true", 10)) { if (valuep) *valuep = 0; return IS_NUMBER_IN_UV; } return 0; } #endif #endif /* * The grok_* routines have been modified to use warn() instead of * Perl_warner(). Also, 'hexdigit' was the former name of PL_hexdigit, * which is why the stack variable has been renamed to 'xdigit'. */ #ifndef grok_bin #if defined(NEED_grok_bin) static UV DPPP_(my_grok_bin)(pTHX_ char *start, STRLEN *len_p, I32 *flags, NV *result); static #else extern UV DPPP_(my_grok_bin)(pTHX_ char *start, STRLEN *len_p, I32 *flags, NV *result); #endif #ifdef grok_bin # undef grok_bin #endif #define grok_bin(a,b,c,d) DPPP_(my_grok_bin)(aTHX_ a,b,c,d) #define Perl_grok_bin DPPP_(my_grok_bin) #if defined(NEED_grok_bin) || defined(NEED_grok_bin_GLOBAL) UV DPPP_(my_grok_bin)(pTHX_ char *start, STRLEN *len_p, I32 *flags, NV *result) { const char *s = start; STRLEN len = *len_p; UV value = 0; NV value_nv = 0; const UV max_div_2 = UV_MAX / 2; bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES; bool overflowed = FALSE; if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) { /* strip off leading b or 0b. for compatibility silently suffer "b" and "0b" as valid binary numbers. */ if (len >= 1) { if (s[0] == 'b') { s++; len--; } else if (len >= 2 && s[0] == '0' && s[1] == 'b') { s+=2; len-=2; } } } for (; len-- && *s; s++) { char bit = *s; if (bit == '0' || bit == '1') { /* Write it in this wonky order with a goto to attempt to get the compiler to make the common case integer-only loop pretty tight. With gcc seems to be much straighter code than old scan_bin. */ redo: if (!overflowed) { if (value <= max_div_2) { value = (value << 1) | (bit - '0'); continue; } /* Bah. We're just overflowed. */ warn("Integer overflow in binary number"); overflowed = TRUE; value_nv = (NV) value; } value_nv *= 2.0; /* If an NV has not enough bits in its mantissa to * represent a UV this summing of small low-order numbers * is a waste of time (because the NV cannot preserve * the low-order bits anyway): we could just remember when * did we overflow and in the end just multiply value_nv by the * right amount. */ value_nv += (NV)(bit - '0'); continue; } if (bit == '_' && len && allow_underscores && (bit = s[1]) && (bit == '0' || bit == '1')) { --len; ++s; goto redo; } if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT)) warn("Illegal binary digit '%c' ignored", *s); break; } if ( ( overflowed && value_nv > 4294967295.0) #if UVSIZE > 4 || (!overflowed && value > 0xffffffff ) #endif ) { warn("Binary number > 0b11111111111111111111111111111111 non-portable"); } *len_p = s - start; if (!overflowed) { *flags = 0; return value; } *flags = PERL_SCAN_GREATER_THAN_UV_MAX; if (result) *result = value_nv; return UV_MAX; } #endif #endif #ifndef grok_hex #if defined(NEED_grok_hex) static UV DPPP_(my_grok_hex)(pTHX_ char *start, STRLEN *len_p, I32 *flags, NV *result); static #else extern UV DPPP_(my_grok_hex)(pTHX_ char *start, STRLEN *len_p, I32 *flags, NV *result); #endif #ifdef grok_hex # undef grok_hex #endif #define grok_hex(a,b,c,d) DPPP_(my_grok_hex)(aTHX_ a,b,c,d) #define Perl_grok_hex DPPP_(my_grok_hex) #if defined(NEED_grok_hex) || defined(NEED_grok_hex_GLOBAL) UV DPPP_(my_grok_hex)(pTHX_ char *start, STRLEN *len_p, I32 *flags, NV *result) { const char *s = start; STRLEN len = *len_p; UV value = 0; NV value_nv = 0; const UV max_div_16 = UV_MAX / 16; bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES; bool overflowed = FALSE; const char *xdigit; if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) { /* strip off leading x or 0x. for compatibility silently suffer "x" and "0x" as valid hex numbers. */ if (len >= 1) { if (s[0] == 'x') { s++; len--; } else if (len >= 2 && s[0] == '0' && s[1] == 'x') { s+=2; len-=2; } } } for (; len-- && *s; s++) { xdigit = strchr((char *) PL_hexdigit, *s); if (xdigit) { /* Write it in this wonky order with a goto to attempt to get the compiler to make the common case integer-only loop pretty tight. With gcc seems to be much straighter code than old scan_hex. */ redo: if (!overflowed) { if (value <= max_div_16) { value = (value << 4) | ((xdigit - PL_hexdigit) & 15); continue; } warn("Integer overflow in hexadecimal number"); overflowed = TRUE; value_nv = (NV) value; } value_nv *= 16.0; /* If an NV has not enough bits in its mantissa to * represent a UV this summing of small low-order numbers * is a waste of time (because the NV cannot preserve * the low-order bits anyway): we could just remember when * did we overflow and in the end just multiply value_nv by the * right amount of 16-tuples. */ value_nv += (NV)((xdigit - PL_hexdigit) & 15); continue; } if (*s == '_' && len && allow_underscores && s[1] && (xdigit = strchr((char *) PL_hexdigit, s[1]))) { --len; ++s; goto redo; } if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT)) warn("Illegal hexadecimal digit '%c' ignored", *s); break; } if ( ( overflowed && value_nv > 4294967295.0) #if UVSIZE > 4 || (!overflowed && value > 0xffffffff ) #endif ) { warn("Hexadecimal number > 0xffffffff non-portable"); } *len_p = s - start; if (!overflowed) { *flags = 0; return value; } *flags = PERL_SCAN_GREATER_THAN_UV_MAX; if (result) *result = value_nv; return UV_MAX; } #endif #endif #ifndef grok_oct #if defined(NEED_grok_oct) static UV DPPP_(my_grok_oct)(pTHX_ char *start, STRLEN *len_p, I32 *flags, NV *result); static #else extern UV DPPP_(my_grok_oct)(pTHX_ char *start, STRLEN *len_p, I32 *flags, NV *result); #endif #ifdef grok_oct # undef grok_oct #endif #define grok_oct(a,b,c,d) DPPP_(my_grok_oct)(aTHX_ a,b,c,d) #define Perl_grok_oct DPPP_(my_grok_oct) #if defined(NEED_grok_oct) || defined(NEED_grok_oct_GLOBAL) UV DPPP_(my_grok_oct)(pTHX_ char *start, STRLEN *len_p, I32 *flags, NV *result) { const char *s = start; STRLEN len = *len_p; UV value = 0; NV value_nv = 0; const UV max_div_8 = UV_MAX / 8; bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES; bool overflowed = FALSE; for (; len-- && *s; s++) { /* gcc 2.95 optimiser not smart enough to figure that this subtraction out front allows slicker code. */ int digit = *s - '0'; if (digit >= 0 && digit <= 7) { /* Write it in this wonky order with a goto to attempt to get the compiler to make the common case integer-only loop pretty tight. */ redo: if (!overflowed) { if (value <= max_div_8) { value = (value << 3) | digit; continue; } /* Bah. We're just overflowed. */ warn("Integer overflow in octal number"); overflowed = TRUE; value_nv = (NV) value; } value_nv *= 8.0; /* If an NV has not enough bits in its mantissa to * represent a UV this summing of small low-order numbers * is a waste of time (because the NV cannot preserve * the low-order bits anyway): we could just remember when * did we overflow and in the end just multiply value_nv by the * right amount of 8-tuples. */ value_nv += (NV)digit; continue; } if (digit == ('_' - '0') && len && allow_underscores && (digit = s[1] - '0') && (digit >= 0 && digit <= 7)) { --len; ++s; goto redo; } /* Allow \octal to work the DWIM way (that is, stop scanning * as soon as non-octal characters are seen, complain only iff * someone seems to want to use the digits eight and nine). */ if (digit == 8 || digit == 9) { if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT)) warn("Illegal octal digit '%c' ignored", *s); } break; } if ( ( overflowed && value_nv > 4294967295.0) #if UVSIZE > 4 || (!overflowed && value > 0xffffffff ) #endif ) { warn("Octal number > 037777777777 non-portable"); } *len_p = s - start; if (!overflowed) { *flags = 0; return value; } *flags = PERL_SCAN_GREATER_THAN_UV_MAX; if (result) *result = value_nv; return UV_MAX; } #endif #endif #ifdef NO_XSLOCKS # ifdef dJMPENV # define dXCPT dJMPENV; int rEtV = 0 # define XCPT_TRY_START JMPENV_PUSH(rEtV); if (rEtV == 0) # define XCPT_TRY_END JMPENV_POP; # define XCPT_CATCH if (rEtV != 0) # define XCPT_RETHROW JMPENV_JUMP(rEtV) # else # define dXCPT Sigjmp_buf oldTOP; int rEtV = 0 # define XCPT_TRY_START Copy(top_env, oldTOP, 1, Sigjmp_buf); rEtV = Sigsetjmp(top_env, 1); if (rEtV == 0) # define XCPT_TRY_END Copy(oldTOP, top_env, 1, Sigjmp_buf); # define XCPT_CATCH if (rEtV != 0) # define XCPT_RETHROW Siglongjmp(top_env, rEtV) # endif #endif #endif /* _P_P_PORTABILITY_H_ */ /* End of File ppport.h */ zbar-0.23/perl/examples/0000775000175000017500000000000013471606255012170 500000000000000zbar-0.23/perl/examples/processor.pl0000775000175000017500000000140413466560613014467 00000000000000#!/usr/bin/env perl use warnings; use strict; require Barcode::ZBar; # create a Processor my $proc = Barcode::ZBar::Processor->new(); # configure the Processor $proc->parse_config("enable"); # initialize the Processor $proc->init($ARGV[0] || '/dev/video0'); # setup a callback sub my_handler { my ($proc, $image, $closure) = @_; # extract results foreach my $symbol ($proc->get_results()) { # do something useful with results print('decoded ' . $symbol->get_type() . ' symbol "' . $symbol->get_data() . "\"\n"); } } $proc->set_data_handler(\&my_handler); # enable the preview window $proc->set_visible(); # initiate scanning $proc->set_active(); # keep scanning until user provides key/mouse input $proc->user_wait(); zbar-0.23/perl/examples/scan_image.pl0000775000175000017500000000151613466560613014542 00000000000000#!/usr/bin/perl use warnings; use strict; require Image::Magick; require Barcode::ZBar; $ARGV[0] || die; # create a reader my $scanner = Barcode::ZBar::ImageScanner->new(); # configure the reader $scanner->parse_config("enable"); # obtain image data my $magick = Image::Magick->new(); $magick->Read($ARGV[0]) && die; my $raw = $magick->ImageToBlob(magick => 'GRAY', depth => 8); # wrap image data my $image = Barcode::ZBar::Image->new(); $image->set_format('Y800'); $image->set_size($magick->Get(qw(columns rows))); $image->set_data($raw); # scan the image for barcodes my $n = $scanner->scan_image($image); # extract results foreach my $symbol ($image->get_symbols()) { # do something useful with results print('decoded ' . $symbol->get_type() . ' symbol "' . $symbol->get_data() . "\"\n"); } # clean up undef($image); zbar-0.23/perl/examples/read_one.pl0000775000175000017500000000117413466560613014230 00000000000000#!/usr/bin/env perl use warnings; use strict; require Barcode::ZBar; # create a Processor my $proc = Barcode::ZBar::Processor->new(); # configure the Processor $proc->parse_config("enable"); # initialize the Processor $proc->init($ARGV[0] || '/dev/video0'); # enable the preview window $proc->set_visible(); # read at least one barcode (or until window closed) $proc->process_one(); # hide the preview window $proc->set_visible(0); # extract results foreach my $symbol ($proc->get_results()) { # do something useful with results print('decoded ' . $symbol->get_type() . ' symbol "' . $symbol->get_data() . "\"\n"); } zbar-0.23/perl/examples/paginate.pl0000775000175000017500000000456213466560613014250 00000000000000#!/usr/bin/perl #------------------------------------------------------------------------ # Copyright 2009 (c) Jeff Brown # # This file is part of the ZBar Bar Code Reader. # # The ZBar Bar Code Reader is free software; you can redistribute it # and/or modify it under the terms of the GNU Lesser Public License as # published by the Free Software Foundation; either version 2.1 of # the License, or (at your option) any later version. # # The ZBar Bar Code Reader 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 Lesser Public License for more details. # # You should have received a copy of the GNU Lesser Public License # along with the ZBar Bar Code Reader; if not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA # # http://sourceforge.net/projects/zbar #------------------------------------------------------------------------ use warnings; use strict; use Barcode::ZBar; use Image::Magick; warn("no input files specified?\n") if(!@ARGV); # running output document my $out = undef; # barcode scanner my $scanner = Barcode::ZBar::ImageScanner->new(); foreach my $file (@ARGV) { print "scanning from \"$file\"\n"; my $imseq = Image::Magick->new(); my $err = $imseq->Read($file); warn($err) if($err); foreach my $page (@$imseq) { # convert ImageMagick page to ZBar image my $zimg = Barcode::ZBar::Image->new(); $zimg->set_format('Y800'); $zimg->set_size($page->Get(qw(columns rows))); $zimg->set_data($page->Clone()->ImageToBlob(magick => 'GRAY', depth => 8)); # scan for barcodes if($scanner->scan_image($zimg)) { # write out previous document $out->write() if($out); # use first symbol found to name next image (FIXME sanitize) my $data = ($zimg->get_symbols())[0]->get_data(); my $idx = $page->Get('scene') + 1; print "splitting $data from page $idx\n"; # create new output document $out = Image::Magick->new(filename => $data); } # append this page to current output push(@$out, $page) if($out); } # write out final document $out->write() if($out); } zbar-0.23/perl/Changes0000664000175000017500000000113713471225700011557 00000000000000Revision history for Perl extension Barcode::ZBar. current spadix * add Symbol orientation and Decoder direction interfaces 0.04 2009-10-23 spadix * add result query interfaces to ImageScanner and Processor 0.03 2009-09-24 spadix * add support for binary symbol data * fix symbol leaks * add symbol quality metric * add support for QR Code 0.02 2009-04-16 spadix * project name change: package becomes Barcode::ZBar 0.01 2009-02-28 spadix * add Barcode:: namespace prefix * add a few new/missing APIs * add most documentation * first draft: Processor, Scanner and Decoder basic function zbar-0.23/perl/t/0000775000175000017500000000000013471606255010615 500000000000000zbar-0.23/perl/t/Image.t0000775000175000017500000001100713471225700011736 00000000000000# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl Image.t' use warnings; use strict; use Test::More tests => 29; ######################### BEGIN { use_ok('Barcode::ZBar') } Barcode::ZBar::set_verbosity(16); ######################### my $image = Barcode::ZBar::Image->new(); isa_ok($image, 'Barcode::ZBar::Image', 'image'); ######################### my $scanner = Barcode::ZBar::ImageScanner->new(); isa_ok($scanner, 'Barcode::ZBar::ImageScanner', 'image scanner'); ######################### can_ok($image, qw(convert convert_resize get_format get_size get_data set_format set_size set_data)); ######################### can_ok($scanner, qw(set_config parse_config enable_cache scan_image)); ######################### $image->set_format('422P'); my $fmt = $image->get_format(); is($fmt, '422P', 'string format accessors'); ######################### ok($fmt == 0x50323234, 'numeric format accessors'); ######################### $image->set_size(114, 80); is_deeply([$image->get_size()], [114, 80], 'size accessors'); ######################### $image->set_crop(20, 20, 74, 40); is_deeply([$image->get_crop()], [20, 20, 74, 40], 'crop accessors'); ######################### $image->set_crop(-57, -40, 228, 160); is_deeply([$image->get_crop()], [0, 0, 114, 80], 'crop clipping'); ######################### $image->set_crop(10, 10, 94, 60); is_deeply([$image->get_crop()], [10, 10, 94, 60], 'crop accessors'); ######################### $image->set_size(114, 80); is_deeply([$image->get_crop()], [0, 0, 114, 80], 'crop reset'); ######################### # FIXME avoid skipping these (eg embed image vs ImageMagick) SKIP: { eval { require Image::Magick }; skip "Image::Magick not installed", 13 if $@; my $im = Image::Magick->new(); my $err = $im->Read('t/barcode.png'); die($err) if($err); $image->set_size($im->Get(qw(columns rows))); { my $data = $im->ImageToBlob( magick => 'YUV', 'sampling-factor' => '4:2:2', interlace => 'Plane'); $image->set_data($data); } $image = $image->convert('Y800'); isa_ok($image, 'Barcode::ZBar::Image', 'image'); ######################### is($image->get_format(), 'Y800', 'converted image format'); ######################### is_deeply([$image->get_size()], [114, 80], 'converted image size'); ######################### is($scanner->scan_image($image), 1, 'scan result'); ######################### my @symbols = $image->get_symbols(); is(scalar(@symbols), 1, 'result size'); ######################### my $sym = $symbols[0]; isa_ok($sym, 'Barcode::ZBar::Symbol', 'symbol'); ######################### can_ok($sym, qw(get_type get_configs get_modifiers get_data get_quality get_count get_loc get_orientation)); ######################### is($sym->get_type(), Barcode::ZBar::Symbol::EAN13, 'result type'); ######################### is_deeply([$sym->get_configs()], [Barcode::ZBar::Config::ENABLE, Barcode::ZBar::Config::EMIT_CHECK], 'result configs'); ######################### is_deeply([$sym->get_modifiers()], [], 'result modifiers'); ######################### is($sym->get_data(), '9876543210128', 'result data'); ######################### ok($sym->get_quality() > 0, 'quality'); ######################### my @loc = $sym->get_loc(); ok(scalar(@loc) >= 4, 'location size'); ######################### my $failure = undef; foreach my $pt (@loc) { if(ref($pt) ne 'ARRAY') { $failure = ("location entry is wrong type:" . " expecting ARRAY ref, got " . ref($pt)); last; } if(scalar(@{$pt}) != 2) { $failure = ("location coordinate has too many entries:" . " expecting 2, got " . scalar(@{$pt})); last; } } ok(!defined($failure), 'location structure') or diag($failure); ######################### is($sym->get_orientation(), Barcode::ZBar::Orient::UP, 'orientation'); ######################### my @comps = $sym->get_components(); is(scalar(@comps), 0, 'components size'); ######################### } $scanner->recycle_image($image); my @symbols = $image->get_symbols(); is(scalar(@symbols), 0, 'recycled result size'); ######################### # FIXME more image tests zbar-0.23/perl/t/Scanner.t0000775000175000017500000000103013466560613012311 00000000000000# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl Scanner.t' use warnings; use strict; use Test::More tests => 3; ######################### BEGIN { use_ok('Barcode::ZBar') } ######################### my $scanner = Barcode::ZBar::Scanner->new(); isa_ok($scanner, 'Barcode::ZBar::Scanner', 'scanner'); ######################### can_ok($scanner, qw(reset new_scan scan_y get_width get_color)); ######################### # FIXME more scanner tests zbar-0.23/perl/t/ZBar.t0000775000175000017500000000357113471225700011561 00000000000000# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl ZBar.t' use warnings; use strict; use Test::More tests => 37; ######################### BEGIN { use_ok('Barcode::ZBar') } ######################### like(Barcode::ZBar::version(), qr<\d.\d>, 'version'); ######################### Barcode::ZBar::set_verbosity(16); Barcode::ZBar::increase_verbosity(); pass('verbosity'); ######################### # performs (2 * n) tests sub test_enum { my $name = shift; foreach my $test (@_) { my $enum = $test->[0]; is($enum, $test->[1], "$name enum/string compare"); ######################### ok($enum == $test->[2], "$name enum/numeric compare"); } } test_enum('config', [Barcode::ZBar::Config::ENABLE, 'enable', 0], [Barcode::ZBar::Config::ADD_CHECK, 'add-check', 1], [Barcode::ZBar::Config::EMIT_CHECK, 'emit-check', 2], [Barcode::ZBar::Config::ASCII, 'ascii', 3], [Barcode::ZBar::Config::MIN_LEN, 'min-length', 32], [Barcode::ZBar::Config::MAX_LEN, 'max-length', 33], [Barcode::ZBar::Config::UNCERTAINTY, 'uncertainty', 64], [Barcode::ZBar::Config::POSITION, 'position', 128], [Barcode::ZBar::Config::X_DENSITY, 'x-density', 256], [Barcode::ZBar::Config::Y_DENSITY, 'y-density', 257], ); ######################### test_enum('modifier', [Barcode::ZBar::Modifier::GS1, 'GS1', 0], [Barcode::ZBar::Modifier::AIM, 'AIM', 1], ); ######################### test_enum('orientation', [Barcode::ZBar::Orient::UNKNOWN, 'UNKNOWN', -1], [Barcode::ZBar::Orient::UP, 'UP', 0], [Barcode::ZBar::Orient::RIGHT, 'RIGHT', 1], [Barcode::ZBar::Orient::DOWN, 'DOWN', 2], [Barcode::ZBar::Orient::LEFT, 'LEFT', 3], ); ######################### zbar-0.23/perl/t/Processor.t0000775000175000017500000000537013466560613012712 00000000000000# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl Processor.t' use warnings; use strict; use Test::More tests => 20; ######################### BEGIN { use_ok('Barcode::ZBar') } Barcode::ZBar::set_verbosity(32); ######################### my $proc = Barcode::ZBar::Processor->new(); isa_ok($proc, 'Barcode::ZBar::Processor', 'processor'); ######################### can_ok($proc, qw(init set_config parse_config)); ######################### ok(!$proc->parse_config('enable'), 'configuration'); ######################### my $cnt = 0; my $explicit_closure = 0; $proc->set_data_handler(sub { ok(!$cnt, 'handler invocations'); $cnt += 1; ######################### is($_[0], $proc, 'handler processor'); ######################### my $image = $_[1]; isa_ok($image, 'Barcode::ZBar::Image', 'image'); ######################### my @symbols = $image->get_symbols(); is(scalar(@symbols), 1, 'result size'); ######################### my $sym = $symbols[0]; isa_ok($sym, 'Barcode::ZBar::Symbol', 'symbol'); ######################### is($sym->get_type(), Barcode::ZBar::Symbol::EAN13, 'result type'); ######################### is($sym->get_data(), '9876543210128', 'result data'); ######################### ok($sym->get_quality() > 0, 'quality'); ######################### my @loc = $sym->get_loc(); ok(scalar(@loc) >= 4, 'location size'); # structure checked by Image.t ${$_[2]} += 1 }, \$explicit_closure); ######################### $proc->init($ENV{VIDEO_DEVICE}); ok(!$proc->is_visible(), 'initial visibility'); ######################### $proc->set_visible(); ok($proc->is_visible(), 'enabled visiblity'); ######################### ok($proc->user_wait(1.1) >= 0, 'wait w/timeout'); ######################### SKIP: { # FIXME factor out image read utility eval { require Image::Magick }; skip "Image::Magick not installed", 11 if $@; my $im = Image::Magick->new(); my $err = $im->Read('t/barcode.png'); die($err) if($err); my $image = Barcode::ZBar::Image->new(); $image->set_format('422P'); $image->set_size($im->Get(qw(columns rows))); $image->set_data($im->ImageToBlob( magick => 'YUV', 'sampling-factor' => '4:2:2', interlace => 'Plane') ); my $rc = $proc->process_image($image); ok(!$rc, 'process result'); $proc->user_wait(.9); ######################### is($explicit_closure, 1, 'handler explicit closure'); } ######################### $proc->set_data_handler(); pass('unset handler'); ######################### # FIXME more processor tests $proc = undef; pass('cleanup'); ######################### zbar-0.23/perl/t/Decoder.t0000775000175000017500000000517713471225700012274 00000000000000# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl Decoder.t' use warnings; use strict; use Test::More tests => 17; ######################### BEGIN { use_ok('Barcode::ZBar') } ######################### my $decoder = Barcode::ZBar::Decoder->new(); isa_ok($decoder, 'Barcode::ZBar::Decoder', 'decoder'); $decoder->parse_config('enable'); ######################### can_ok($decoder, qw(set_config parse_config reset new_scan decode_width get_color get_configs get_direction get_data get_modifiers get_type set_handler)); ######################### my $sym = $decoder->decode_width(5); is($sym, Barcode::ZBar::Symbol::NONE, 'enum/enum compare'); ######################### ok($sym == 0, 'enum/numeric compare'); ######################### is($sym, 'None', 'enum/string compare'); ######################### my $handler_type = 0; my $explicit_closure = 0; $decoder->set_handler(sub { if(!$handler_type) { is($_[0], $decoder, 'handler decoder'); } my $type = $_[0]->get_type(); $handler_type = $type if(!$handler_type or $type > Barcode::ZBar::Symbol::PARTIAL); ${$_[1]} += 1 }, \$explicit_closure); ######################### $decoder->reset(); is($decoder->get_color(), Barcode::ZBar::SPACE, 'reset color'); ######################### is($decoder->get_direction(), 0, 'reset direction'); ######################### $decoder->set_config(Barcode::ZBar::Symbol::QRCODE, Barcode::ZBar::Config::ENABLE, 0); my $encoded = '9 111 212241113121211311141132 11111 311213121312121332111132 111 9'; foreach my $width (split(/ */, $encoded)) { my $tmp = $decoder->decode_width($width); if($tmp > Barcode::ZBar::Symbol::PARTIAL) { $sym = ($sym == Barcode::ZBar::Symbol::NONE) ? $tmp : -1; } } is($sym, Barcode::ZBar::Symbol::EAN13, 'EAN-13 type'); ######################### is_deeply([$decoder->get_configs($sym)], [Barcode::ZBar::Config::ENABLE, Barcode::ZBar::Config::EMIT_CHECK], 'read configs'); ######################### is_deeply([$decoder->get_modifiers()], [], 'read modifiers'); ######################### is($decoder->get_data(), '6268964977804', 'EAN-13 data'); ######################### is($decoder->get_color(), Barcode::ZBar::BAR, 'post-scan color'); ######################### is($decoder->get_direction(), 1, 'decode direction'); ######################### is($handler_type, Barcode::ZBar::Symbol::EAN13, 'handler type'); ######################### is($explicit_closure, 2, 'handler explicit closure'); ######################### zbar-0.23/perl/t/barcode.png0000664000175000017500000000223613466560613012646 00000000000000‰PNG  IHDRrPo°éËgAMA± üasRGB®Îé cHRMz&€„ú€èu0ê`:˜pœºQ<bKGDª#2 pHYs=ƒ=ƒ‡è vpAgrPéƒL—äIDATxÚí•!hcA†£N–ƒªÂAd¡âÅgj 5º#&q¥*DÄDÄ”¸ÀQê*Ž˜@D]*ª …ˆºˆx"®„º˜¹gg÷í¾¼^¡Ç'fBÞ¾·»3;ßÌìn‰ ä„6ò/ËÓ´¶Ÿ‚6?3s:'^?ûÊÛvó³6^qw,ìËû•ù–I©²B/ò/ÉÓ´¶Ÿ‚6?3s:¯Ÿ}åm»ùY¯¸;öåýÊ|SH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TÈÿ2ÑL~2ùËI!dòo3C&™|0“IróqÈ”–ø2Ï%÷§2žú™æmÅÿe4¶Ôë»/–”õRo9lãÝØJÆÂõÒÈŸßB¦4 kzÝ´òD}ñè=uñëá7Ãך†Ð[óœúÌØÒÛ¸âç–n¡=/ “{hÞ`ž“‘´kØŠu#3oûVÖ72ÁûôMÛäšèœZTõK…“0Ú¡SüÌB]†9¤1FËtA <Ö€j ïH‰´è+µi?ÀŒ³õ*5åûZô¶X£á­›@ï X Úú‚À˜@VàM‚ÕÞ…˜‘sÄewr& yüÄþŒ¸à¯\,M^ÔÉN8H“‹6¬C¶€Iø²ÖÛT½)s{ÌyCãH íy0áñ¢%?ælàß"ƒìÃ8E®„Ž,g³x'pÓ(Ÿ¯!˘¾*=æ`‹Å&ÁfŸ`4ËdRí9òfóå‰+ï“ÉÒ3lÖÜL†H‰±\C&k¨¼ß„½†ú›Z›O(™Ÿ¨ô”[|œØrMX÷5Á»‘o07a­9WÁ=9g×.Ù¹A8ªtUi„¸æ Ä'¡Ù¶u>Õü>$zD¥¬¸Šª˜Wõûx×ö£Rcdä¥3,8i뀑#ÉÆ™ÄíT Kqôgdô®•ÄM[ ûô–¤Öhç¸D™´AùíRæœ}æÍ°F[$K$Çìß•±™""ÖÌCÁÔS:Ãûr'u$$M ú.'c&íáTâ$\ÚkÅg1ƒŒ÷dùOÜ^ÛãÒ,¶>„å‘Ü%s¨”‘ÅÌÉJÃìÉš¤ÿPúWÐ2…Yæ…ªÈp3ç9g;|þU‚lçë¤Â!éåô¶°kN×Câ[È ¶G‹xXïX~y%»' Ú((4s“Ù=ð ý+a#]Iôƒ™—ž vwôÌ=9îɾž\ôä4ŸâmBïÉ/¥7«ˆ‚ì>IEND®B`‚zbar-0.23/perl/t/pod.t0000664000175000017500000000045413466560613011510 00000000000000# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl pod.t' use warnings; use strict; use Test::More; eval "use Test::Pod 1.00"; plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; all_pod_files_ok(); zbar-0.23/perl/t/pod-coverage.t0000664000175000017500000000050213466560613013273 00000000000000# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl pod.t' use warnings; use strict; use Test::More; eval "use Test::Pod::Coverage"; plan skip_all => "Test::Pod::Coverage required for testing pod coverage" if $@; all_pod_coverage_ok(); zbar-0.23/perl/ZBar.pm0000664000175000017500000001047313471225700011463 00000000000000#------------------------------------------------------------------------ # Copyright 2008-2010 (c) Jeff Brown # # This file is part of the ZBar Bar Code Reader. # # The ZBar Bar Code Reader is free software; you can redistribute it # and/or modify it under the terms of the GNU Lesser Public License as # published by the Free Software Foundation; either version 2.1 of # the License, or (at your option) any later version. # # The ZBar Bar Code Reader 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 Lesser Public License for more details. # # You should have received a copy of the GNU Lesser Public License # along with the ZBar Bar Code Reader; if not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA # # http://sourceforge.net/projects/zbar #------------------------------------------------------------------------ package Barcode::ZBar; use 5.006; use strict; use warnings; use Carp; require Exporter; our @ISA = qw(Exporter); our @EXPORT_OK = qw(SPACE BAR version increase_verbosity set_verbosity); our $VERSION = '0.04'; require XSLoader; XSLoader::load('Barcode::ZBar', $VERSION); package Barcode::ZBar::Error; use overload '""' => sub { return($_[0]->error_string()) }; 1; __END__ =head1 NAME Barcode::ZBar - Perl interface to the ZBar Barcode Reader =head1 SYNOPSIS setup: use Barcode::ZBar; my $reader = Barcode::ZBar::Processor->new(); $reader->init(); $reader->set_data_handler(\&my_handler); scan an image: my $image = Barcode::ZBar::Image->new(); $image->set_format('422P'); $image->set_size(114, 80); $image->set_data($raw_bits); $reader->process_image($image); scan from video: $reader->set_visible(); $reader->set_active(); $reader->user_wait(); collect results: my @symbols = $image->get_symbols(); foreach my $sym (@symbols) { print("decoded: " . $sym->get_type() . ":" . $sym->get_data()); } =head1 DESCRIPTION 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-13/UPC-A, UPC-E, EAN-8, Code 128, Code 93, Code 39, Codabar, Interleaved 2 of 5 and QR Code. These are the bindings for interacting directly with the library from Perl. =head1 REFERENCE =head2 Functions =over 4 =item version() Returns the version of the zbar library as "I.I". =item increase_verbosity() Increases global library debug by one level. =item set_verbosity(I) Sets global library debug to the indicated level. Higher numbers give more verbosity. =item parse_config(I) Parse a decoder configuration setting into a list containing the symbology constant, config constant, and value to set. See the documentation for C/C for available configuration options. =back =head2 Constants Width stream "color" constants: =over 4 =item SPACE Light area or space between bars. =item BAR Dark area or colored bar segment. =back Decoder configuration constants: =over 4 =item Config::ENABLE =item Config::ADD_CHECK =item Config::EMIT_CHECK =item Config::ASCII =item Config::MIN_LEN =item Config::MAX_LEN =item Config::POSITION =item Config::X_DENSITY =item Config::Y_DENSITY =back Symbology modifier constants: =over 4 =item Modifier::GS1 =item Modifier::AIM =back Symbol orientation constants: =over 4 =item Orient::UNKNOWN =item Orient::UP =item Orient::RIGHT =item Orient::DOWN =item Orient::LEFT =back =head1 SEE ALSO Barcode::ZBar::Processor, Barcode::ZBar::ImageScanner, Barcode::ZBar::Image, Barcode::ZBar::Symbol, Barcode::ZBar::Scanner, Barcode::ZBar::Decoder zbarimg(1), zbarcam(1) http://zbar.sf.net =head1 AUTHOR Jeff Brown, Espadix@users.sourceforge.netE =head1 COPYRIGHT AND LICENSE Copyright 2008-2010 (c) Jeff Brown Espadix@users.sourceforge.netE The ZBar Bar Code Reader is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. =cut zbar-0.23/perl/ZBar.xs0000664000175000017500000005701613471225716011514 00000000000000//------------------------------------------------------------------------ // Copyright 2008-2010 (c) Jeff Brown // // This file is part of the ZBar Bar Code Reader. // // The ZBar Bar Code Reader is free software; you can redistribute it // and/or modify it under the terms of the GNU Lesser Public License as // published by the Free Software Foundation; either version 2.1 of // the License, or (at your option) any later version. // // The ZBar Bar Code Reader 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 Lesser Public License for more details. // // You should have received a copy of the GNU Lesser Public License // along with the ZBar Bar Code Reader; if not, write to the Free // Software Foundation, Inc., 51 Franklin St, Fifth Floor, // Boston, MA 02110-1301 USA // // http://sourceforge.net/projects/zbar //------------------------------------------------------------------------ #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include "ppport.h" #include typedef zbar_symbol_t *Barcode__ZBar__Symbol; typedef zbar_image_t *Barcode__ZBar__Image; typedef zbar_processor_t *Barcode__ZBar__Processor; typedef zbar_video_t *Barcode__ZBar__Video; typedef zbar_window_t *Barcode__ZBar__Window; typedef zbar_image_scanner_t *Barcode__ZBar__ImageScanner; typedef zbar_decoder_t *Barcode__ZBar__Decoder; typedef zbar_scanner_t *Barcode__ZBar__Scanner; typedef void *Barcode__ZBar__Error; typedef unsigned long fourcc_t; typedef int timeout_t; typedef int config_error; typedef struct handler_wrapper_s { SV *instance; SV *handler; SV *closure; } handler_wrapper_t; static AV *LOOKUP_zbar_color_t = NULL; static AV *LOOKUP_zbar_symbol_type_t = NULL; static AV *LOOKUP_zbar_error_t = NULL; static AV *LOOKUP_zbar_config_t = NULL; static AV *LOOKUP_zbar_modifier_t = NULL; static AV *LOOKUP_zbar_orientation_t = NULL; #define CONSTANT(typ, prefix, sym, name) \ do { \ SV *c = newSViv(ZBAR_ ## prefix ## sym); \ sv_setpv(c, name); \ SvIOK_on(c); \ newCONSTSUB(stash, #sym, c); \ av_store(LOOKUP_zbar_ ## typ ## _t, \ ZBAR_ ## prefix ## sym, \ SvREFCNT_inc(c)); \ } while(0) #define LOOKUP_ENUM(typ, val) \ lookup_enum(LOOKUP_zbar_ ## typ ## _t, val) static inline SV *lookup_enum (AV *lookup, int val) { SV **tmp = av_fetch(lookup, val, 0); return((tmp) ? *tmp : sv_newmortal()); } static inline void check_error (int rc, void *obj) { if(rc < 0) { sv_setref_pv(get_sv("@", TRUE), "Barcode::ZBar::Error", obj); croak(NULL); } } #define PUSH_SYMS(x) \ do { \ const zbar_symbol_t *sym = (const zbar_symbol_t*)(x); \ for(; sym; sym = zbar_symbol_next(sym)) { \ zbar_symbol_t *s = (zbar_symbol_t*)sym; \ zbar_symbol_ref(s, 1); \ XPUSHs(sv_setref_pv(sv_newmortal(), "Barcode::ZBar::Symbol", \ (void*)sym)); \ } \ } while(0); #define PUSH_ENUM_MASK(typ, TYP, val) \ do { \ unsigned mask = (val); \ int i; \ for(i = 0; i < ZBAR_ ## TYP ## _NUM; i++, mask >>= 1) \ if(mask & 1) \ XPUSHs(LOOKUP_ENUM(typ, i)); \ } while(0); static void image_cleanup_handler (zbar_image_t *image) { SV *data = zbar_image_get_userdata(image); if(!data) /* FIXME this is internal error */ return; /* release reference to cleanup data */ SvREFCNT_dec(data); } static inline int set_handler (handler_wrapper_t **wrapp, SV *instance, SV *handler, SV *closure) { handler_wrapper_t *wrap = *wrapp; if(!handler || !SvOK(handler)) { if(wrap) { if(wrap->instance) SvREFCNT_dec(wrap->instance); if(wrap->handler) SvREFCNT_dec(wrap->handler); if(wrap->closure) SvREFCNT_dec(wrap->closure); wrap->instance = wrap->handler = wrap->closure = NULL; } return(0); } if(!wrap) { Newxz(wrap, 1, handler_wrapper_t); wrap->instance = newSVsv(instance); wrap->closure = newSV(0); *wrapp = wrap; } if(wrap->handler) SvSetSV(wrap->handler, handler); else wrap->handler = newSVsv(handler); if(!closure || !SvOK(closure)) SvSetSV(wrap->closure, &PL_sv_undef); else SvSetSV(wrap->closure, closure); return(1); } static inline void activate_handler (handler_wrapper_t *wrap, SV *param) { dSP; if(!wrap) /* FIXME this is internal error */ return; ENTER; SAVETMPS; PUSHMARK(SP); EXTEND(SP, 3); PUSHs(sv_mortalcopy(wrap->instance)); if(param) PUSHs(param); PUSHs(sv_mortalcopy(wrap->closure)); PUTBACK; call_sv(wrap->handler, G_DISCARD); FREETMPS; LEAVE; } static void processor_handler (zbar_image_t *image, const void *userdata) { SV *img; zbar_image_ref(image, 1); img = sv_setref_pv(newSV(0), "Barcode::ZBar::Image", image); activate_handler((void*)userdata, img); SvREFCNT_dec(img); } static void decoder_handler (zbar_decoder_t *decoder) { activate_handler(zbar_decoder_get_userdata(decoder), NULL); } MODULE = Barcode::ZBar PACKAGE = Barcode::ZBar PREFIX = zbar_ PROTOTYPES: ENABLE BOOT: { HV *stash = gv_stashpv("Barcode::ZBar", TRUE); LOOKUP_zbar_color_t = newAV(); CONSTANT(color, , SPACE, "SPACE"); CONSTANT(color, , BAR, "BAR"); } SV * zbar_version() PREINIT: unsigned major; unsigned minor; CODE: zbar_version(&major, &minor, NULL); RETVAL = newSVpvf("%u.%u", major, minor); OUTPUT: RETVAL void zbar_increase_verbosity() void zbar_set_verbosity(verbosity) int verbosity SV * parse_config(config_string) const char * config_string PREINIT: zbar_symbol_type_t sym; zbar_config_t cfg; int val; PPCODE: if(zbar_parse_config(config_string, &sym, &cfg, &val)) croak("invalid configuration setting: %s", config_string); EXTEND(SP, 3); PUSHs(LOOKUP_ENUM(symbol_type, sym)); PUSHs(LOOKUP_ENUM(config, cfg)); mPUSHi(val); MODULE = Barcode::ZBar PACKAGE = Barcode::ZBar::Error PREFIX = zbar_ BOOT: { HV *stash = gv_stashpv("Barcode::ZBar::Error", TRUE); LOOKUP_zbar_error_t = newAV(); CONSTANT(error, ERR_, NOMEM, "out of memory"); CONSTANT(error, ERR_, INTERNAL, "internal library error"); CONSTANT(error, ERR_, UNSUPPORTED, "unsupported request"); CONSTANT(error, ERR_, INVALID, "invalid request"); CONSTANT(error, ERR_, SYSTEM, "system error"); CONSTANT(error, ERR_, LOCKING, "locking error"); CONSTANT(error, ERR_, BUSY, "all resources busy"); CONSTANT(error, ERR_, XDISPLAY, "X11 display error"); CONSTANT(error, ERR_, XPROTO, "X11 protocol error"); CONSTANT(error, ERR_, CLOSED, "output window is closed"); CONSTANT(error, ERR_, WINAPI, "windows system error"); } zbar_error_t get_error_code(err) Barcode::ZBar::Error err CODE: RETVAL = _zbar_get_error_code(err); OUTPUT: RETVAL const char * error_string(err) Barcode::ZBar::Error err CODE: RETVAL = _zbar_error_string(err, 1); OUTPUT: RETVAL MODULE = Barcode::ZBar PACKAGE = Barcode::ZBar::Config PREFIX = zbar_config_ BOOT: { HV *stash = gv_stashpv("Barcode::ZBar::Config", TRUE); LOOKUP_zbar_config_t = newAV(); CONSTANT(config, CFG_, ENABLE, "enable"); CONSTANT(config, CFG_, ADD_CHECK, "add-check"); CONSTANT(config, CFG_, EMIT_CHECK, "emit-check"); CONSTANT(config, CFG_, ASCII, "ascii"); CONSTANT(config, CFG_, MIN_LEN, "min-length"); CONSTANT(config, CFG_, MAX_LEN, "max-length"); CONSTANT(config, CFG_, UNCERTAINTY, "uncertainty"); CONSTANT(config, CFG_, POSITION, "position"); CONSTANT(config, CFG_, X_DENSITY, "x-density"); CONSTANT(config, CFG_, Y_DENSITY, "y-density"); } MODULE = Barcode::ZBar PACKAGE = Barcode::ZBar::Modifier PREFIX = zbar_mod_ BOOT: { HV *stash = gv_stashpv("Barcode::ZBar::Modifier", TRUE); LOOKUP_zbar_modifier_t = newAV(); CONSTANT(modifier, MOD_, GS1, "GS1"); CONSTANT(modifier, MOD_, AIM, "AIM"); } MODULE = Barcode::ZBar PACKAGE = Barcode::ZBar::Orient PREFIX = zbar_orientation_ BOOT: { HV *stash = gv_stashpv("Barcode::ZBar::Orient", TRUE); LOOKUP_zbar_orientation_t = newAV(); CONSTANT(orientation, ORIENT_, UNKNOWN, "UNKNOWN"); CONSTANT(orientation, ORIENT_, UP, "UP"); CONSTANT(orientation, ORIENT_, RIGHT, "RIGHT"); CONSTANT(orientation, ORIENT_, DOWN, "DOWN"); CONSTANT(orientation, ORIENT_, LEFT, "LEFT"); } MODULE = Barcode::ZBar PACKAGE = Barcode::ZBar::Symbol PREFIX = zbar_symbol_ BOOT: { HV *stash = gv_stashpv("Barcode::ZBar::Symbol", TRUE); LOOKUP_zbar_symbol_type_t = newAV(); CONSTANT(symbol_type, , NONE, "None"); CONSTANT(symbol_type, , PARTIAL, "Partial"); CONSTANT(symbol_type, , EAN8, zbar_get_symbol_name(ZBAR_EAN8)); CONSTANT(symbol_type, , UPCE, zbar_get_symbol_name(ZBAR_UPCE)); CONSTANT(symbol_type, , ISBN10, zbar_get_symbol_name(ZBAR_ISBN10)); CONSTANT(symbol_type, , UPCA, zbar_get_symbol_name(ZBAR_UPCA)); CONSTANT(symbol_type, , EAN13, zbar_get_symbol_name(ZBAR_EAN13)); CONSTANT(symbol_type, , ISBN13, zbar_get_symbol_name(ZBAR_ISBN13)); CONSTANT(symbol_type, , DATABAR, zbar_get_symbol_name(ZBAR_DATABAR)); CONSTANT(symbol_type, , DATABAR_EXP, zbar_get_symbol_name(ZBAR_DATABAR_EXP)); CONSTANT(symbol_type, , I25, zbar_get_symbol_name(ZBAR_I25)); CONSTANT(symbol_type, , CODABAR, zbar_get_symbol_name(ZBAR_CODABAR)); CONSTANT(symbol_type, , CODE39, zbar_get_symbol_name(ZBAR_CODE39)); CONSTANT(symbol_type, , PDF417, zbar_get_symbol_name(ZBAR_PDF417)); CONSTANT(symbol_type, , QRCODE, zbar_get_symbol_name(ZBAR_QRCODE)); CONSTANT(symbol_type, , CODE93, zbar_get_symbol_name(ZBAR_CODE93)); CONSTANT(symbol_type, , CODE128, zbar_get_symbol_name(ZBAR_CODE128)); } void DESTROY(symbol) Barcode::ZBar::Symbol symbol CODE: zbar_symbol_ref(symbol, -1); zbar_symbol_type_t zbar_symbol_get_type(symbol) Barcode::ZBar::Symbol symbol SV * zbar_symbol_get_configs(symbol) Barcode::ZBar::Symbol symbol PPCODE: PUSH_ENUM_MASK(config, CFG, zbar_symbol_get_configs(symbol)); SV * zbar_symbol_get_modifiers(symbol) Barcode::ZBar::Symbol symbol PPCODE: PUSH_ENUM_MASK(modifier, MOD, zbar_symbol_get_modifiers(symbol)); SV * zbar_symbol_get_data(symbol) Barcode::ZBar::Symbol symbol CODE: RETVAL = newSVpvn(zbar_symbol_get_data(symbol), zbar_symbol_get_data_length(symbol)); OUTPUT: RETVAL int zbar_symbol_get_count(symbol) Barcode::ZBar::Symbol symbol int zbar_symbol_get_quality(symbol) Barcode::ZBar::Symbol symbol SV * zbar_symbol_get_loc(symbol) Barcode::ZBar::Symbol symbol PREINIT: unsigned i, size; PPCODE: size = zbar_symbol_get_loc_size(symbol); EXTEND(SP, size); for(i = 0; i < size; i++) { AV *pt = (AV*)sv_2mortal((SV*)newAV()); PUSHs(newRV((SV*)pt)); av_push(pt, newSVuv(zbar_symbol_get_loc_x(symbol, i))); av_push(pt, newSVuv(zbar_symbol_get_loc_y(symbol, i))); } zbar_orientation_t zbar_symbol_get_orientation(symbol) Barcode::ZBar::Symbol symbol SV * get_components(symbol) Barcode::ZBar::Symbol symbol PPCODE: PUSH_SYMS(zbar_symbol_first_component(symbol)); MODULE = Barcode::ZBar PACKAGE = Barcode::ZBar::Image PREFIX = zbar_image_ Barcode::ZBar::Image new(package) char * package CODE: RETVAL = zbar_image_create(); OUTPUT: RETVAL void DESTROY(image) Barcode::ZBar::Image image CODE: zbar_image_destroy(image); Barcode::ZBar::Image zbar_image_convert(image, format) Barcode::ZBar::Image image fourcc_t format Barcode::ZBar::Image zbar_image_convert_resize(image, format, width, height) Barcode::ZBar::Image image fourcc_t format unsigned width unsigned height fourcc_t zbar_image_get_format(image) Barcode::ZBar::Image image unsigned zbar_image_get_sequence(image) Barcode::ZBar::Image image void get_size(image) Barcode::ZBar::Image image PPCODE: EXTEND(SP, 2); mPUSHu(zbar_image_get_width(image)); mPUSHu(zbar_image_get_height(image)); void get_crop(image) Barcode::ZBar::Image image PREINIT: unsigned x, y, w, h; PPCODE: zbar_image_get_crop(image, &x, &y, &w, &h); EXTEND(SP, 4); mPUSHu(x); mPUSHu(y); mPUSHu(w); mPUSHu(h); SV * zbar_image_get_data(image) Barcode::ZBar::Image image CODE: RETVAL = newSVpvn(zbar_image_get_data(image), zbar_image_get_data_length(image)); OUTPUT: RETVAL SV * get_symbols(image) Barcode::ZBar::Image image PPCODE: PUSH_SYMS(zbar_image_first_symbol(image)); void zbar_image_set_format(image, format) Barcode::ZBar::Image image fourcc_t format void zbar_image_set_sequence(image, seq_num) Barcode::ZBar::Image image unsigned seq_num void zbar_image_set_size(image, width, height) Barcode::ZBar::Image image int width + if(width < 0) width = 0; int height + if(height < 0) height = 0; void zbar_image_set_crop(image, x, y, width, height) Barcode::ZBar::Image image int x + if(x < 0) { width += x; x = 0; } int y + if(y < 0) { height += y; y = 0; } int width int height void zbar_image_set_data(image, data) Barcode::ZBar::Image image SV * data PREINIT: SV *old; CODE: if(!data || !SvOK(data)) { zbar_image_set_data(image, NULL, 0, NULL); zbar_image_set_userdata(image, NULL); } else if(SvPOK(data)) { /* FIXME is this copy of data or new ref to same data? * not sure this is correct: * need to retain a reference to image data, * but do not really want to copy it...maybe an RV? */ SV *copy = newSVsv(data); STRLEN len; void *raw = SvPV(copy, len); zbar_image_set_data(image, raw, len, image_cleanup_handler); zbar_image_set_userdata(image, copy); } else croak("image data must be binary string"); MODULE = Barcode::ZBar PACKAGE = Barcode::ZBar::Processor PREFIX = zbar_processor_ Barcode::ZBar::Processor new(package, threaded=0) char * package bool threaded CODE: RETVAL = zbar_processor_create(threaded); OUTPUT: RETVAL void DESTROY(processor) Barcode::ZBar::Processor processor CODE: zbar_processor_destroy(processor); void zbar_processor_init(processor, video_device="", enable_display=1) Barcode::ZBar::Processor processor const char * video_device bool enable_display CODE: check_error(zbar_processor_init(processor, video_device, enable_display), processor); void zbar_processor_request_size(processor, width, height) Barcode::ZBar::Processor processor unsigned width unsigned height CODE: check_error(zbar_processor_request_size(processor, width, height), processor); void zbar_processor_force_format(processor, input_format=0, output_format=0) Barcode::ZBar::Processor processor fourcc_t input_format fourcc_t output_format CODE: check_error(zbar_processor_force_format(processor, input_format, output_format), processor); void zbar_processor_set_config(processor, symbology, config, value=1) Barcode::ZBar::Processor processor zbar_symbol_type_t symbology zbar_config_t config int value config_error zbar_processor_parse_config(processor, config_string) Barcode::ZBar::Processor processor const char *config_string bool zbar_processor_is_visible(processor) Barcode::ZBar::Processor processor CODE: check_error((RETVAL = zbar_processor_is_visible(processor)), processor); OUTPUT: RETVAL void zbar_processor_set_visible(processor, visible=1) Barcode::ZBar::Processor processor bool visible CODE: check_error(zbar_processor_set_visible(processor, visible), processor); void zbar_processor_set_active(processor, active=1) Barcode::ZBar::Processor processor bool active CODE: check_error(zbar_processor_set_active(processor, active), processor); SV * get_results(processor) Barcode::ZBar::Processor processor PREINIT: const zbar_symbol_set_t *syms; PPCODE: syms = zbar_processor_get_results(processor); PUSH_SYMS(zbar_symbol_set_first_symbol(syms)); zbar_symbol_set_ref(syms, -1); int zbar_processor_user_wait(processor, timeout=-1) Barcode::ZBar::Processor processor timeout_t timeout CODE: check_error((RETVAL = zbar_processor_user_wait(processor, timeout)), processor); OUTPUT: RETVAL int process_one(processor, timeout=-1) Barcode::ZBar::Processor processor timeout_t timeout CODE: check_error((RETVAL = zbar_process_one(processor, timeout)), processor); OUTPUT: RETVAL int process_image(processor, image) Barcode::ZBar::Processor processor Barcode::ZBar::Image image CODE: check_error((RETVAL = zbar_process_image(processor, image)), processor); OUTPUT: RETVAL void zbar_processor_set_data_handler(processor, handler = 0, closure = 0) Barcode::ZBar::Processor processor SV * handler SV * closure PREINIT: handler_wrapper_t *wrap; zbar_image_data_handler_t *callback = NULL; CODE: wrap = zbar_processor_get_userdata(processor); if(set_handler(&wrap, ST(0), handler, closure)) callback = processor_handler; zbar_processor_set_data_handler(processor, callback, wrap); MODULE = Barcode::ZBar PACKAGE = Barcode::ZBar::ImageScanner PREFIX = zbar_image_scanner_ Barcode::ZBar::ImageScanner new(package) char * package CODE: RETVAL = zbar_image_scanner_create(); OUTPUT: RETVAL void DESTROY(scanner) Barcode::ZBar::ImageScanner scanner CODE: zbar_image_scanner_destroy(scanner); void zbar_image_scanner_set_config(scanner, symbology, config, value=1) Barcode::ZBar::ImageScanner scanner zbar_symbol_type_t symbology zbar_config_t config int value config_error zbar_image_scanner_parse_config(scanner, config_string) Barcode::ZBar::ImageScanner scanner const char *config_string void zbar_image_scanner_enable_cache(scanner, enable) Barcode::ZBar::ImageScanner scanner int enable void zbar_image_scanner_recycle_image(scanner, image) Barcode::ZBar::ImageScanner scanner Barcode::ZBar::Image image SV * get_results(scanner) Barcode::ZBar::ImageScanner scanner PREINIT: const zbar_symbol_set_t *syms; PPCODE: syms = zbar_image_scanner_get_results(scanner); PUSH_SYMS(zbar_symbol_set_first_symbol(syms)); int scan_image(scanner, image) Barcode::ZBar::ImageScanner scanner Barcode::ZBar::Image image CODE: RETVAL = zbar_scan_image(scanner, image); OUTPUT: RETVAL MODULE = Barcode::ZBar PACKAGE = Barcode::ZBar::Decoder PREFIX = zbar_decoder_ Barcode::ZBar::Decoder new(package) char * package CODE: RETVAL = zbar_decoder_create(); OUTPUT: RETVAL void DESTROY(decoder) Barcode::ZBar::Decoder decoder CODE: /* FIXME cleanup handler wrapper */ zbar_decoder_destroy(decoder); void zbar_decoder_set_config(decoder, symbology, config, value=1) Barcode::ZBar::Decoder decoder zbar_symbol_type_t symbology zbar_config_t config int value config_error zbar_decoder_parse_config(decoder, config_string) Barcode::ZBar::Decoder decoder const char *config_string void zbar_decoder_reset(decoder) Barcode::ZBar::Decoder decoder void zbar_decoder_new_scan(decoder) Barcode::ZBar::Decoder decoder zbar_symbol_type_t decode_width(decoder, width) Barcode::ZBar::Decoder decoder unsigned width CODE: RETVAL = zbar_decode_width(decoder, width); OUTPUT: RETVAL zbar_color_t zbar_decoder_get_color(decoder) Barcode::ZBar::Decoder decoder SV * zbar_decoder_get_data(decoder) Barcode::ZBar::Decoder decoder CODE: RETVAL = newSVpvn(zbar_decoder_get_data(decoder), zbar_decoder_get_data_length(decoder)); OUTPUT: RETVAL zbar_symbol_type_t zbar_decoder_get_type(decoder) Barcode::ZBar::Decoder decoder SV * zbar_decoder_get_configs(decoder, symbology) Barcode::ZBar::Decoder decoder zbar_symbol_type_t symbology PPCODE: if(symbology == ZBAR_NONE) symbology = zbar_decoder_get_type(decoder); PUSH_ENUM_MASK(config, CFG, zbar_decoder_get_configs(decoder, symbology)); SV * zbar_decoder_get_modifiers(decoder) Barcode::ZBar::Decoder decoder PPCODE: PUSH_ENUM_MASK(modifier, MOD, zbar_decoder_get_modifiers(decoder)); int zbar_decoder_get_direction(decoder) Barcode::ZBar::Decoder decoder void zbar_decoder_set_handler(decoder, handler = 0, closure = 0) Barcode::ZBar::Decoder decoder SV * handler SV * closure PREINIT: handler_wrapper_t *wrap; CODE: wrap = zbar_decoder_get_userdata(decoder); zbar_decoder_set_handler(decoder, NULL); if(set_handler(&wrap, ST(0), handler, closure)) { zbar_decoder_set_userdata(decoder, wrap); zbar_decoder_set_handler(decoder, decoder_handler); } MODULE = Barcode::ZBar PACKAGE = Barcode::ZBar::Scanner PREFIX = zbar_scanner_ Barcode::ZBar::Scanner new(package, decoder = 0) char * package Barcode::ZBar::Decoder decoder CODE: RETVAL = zbar_scanner_create(decoder); OUTPUT: RETVAL void DESTROY(scanner) Barcode::ZBar::Scanner scanner CODE: zbar_scanner_destroy(scanner); zbar_symbol_type_t zbar_scanner_reset(scanner) Barcode::ZBar::Scanner scanner zbar_symbol_type_t zbar_scanner_new_scan(scanner) Barcode::ZBar::Scanner scanner zbar_color_t zbar_scanner_get_color(scanner) Barcode::ZBar::Scanner scanner unsigned zbar_scanner_get_width(scanner) Barcode::ZBar::Scanner scanner zbar_symbol_type_t scan_y(scanner, y) Barcode::ZBar::Scanner scanner int y CODE: RETVAL = zbar_scan_y(scanner, y); OUTPUT: RETVAL zbar-0.23/perl/MANIFEST0000664000175000017500000000054613466560613011431 00000000000000MANIFEST README Changes COPYING.LIB Makefile.PL typemap ZBar.xs ppport.h ZBar.pm ZBar/Image.pod ZBar/ImageScanner.pod ZBar/Processor.pod ZBar/Symbol.pod t/barcode.png t/Decoder.t t/Image.t t/Processor.t t/Scanner.t t/ZBar.t t/pod.t t/pod-coverage.t inc/Devel/CheckLib.pm examples/paginate.pl examples/processor.pl examples/read_one.pl examples/scan_image.pl zbar-0.23/perl/typemap0000664000175000017500000000273313471225700011671 00000000000000# objects Barcode::ZBar::Error T_PTROBJ Barcode::ZBar::Symbol T_PTROBJ Barcode::ZBar::Image T_PTROBJ Barcode::ZBar::Processor T_PTROBJ Barcode::ZBar::Video T_PTROBJ Barcode::ZBar::Window T_PTROBJ Barcode::ZBar::ImageScanner T_PTROBJ Barcode::ZBar::Decoder T_PTROBJ Barcode::ZBar::Scanner T_PTROBJ # enums zbar_color_t T_ENUM zbar_error_t T_ENUM zbar_symbol_type_t T_ENUM zbar_config_t T_ENUM zbar_modifier_t T_ENUM zbar_orientation_t T_ENUM # special scalars fourcc_t T_FOURCC timeout_t T_TIMEOUT # error handling config_error T_CONFIG_ERROR INPUT T_ENUM $var = ($type)SvIV($arg) T_FOURCC { if(SvPOK($arg)) { char *str = SvPV_nolen($arg); $var = zbar_fourcc_parse(str); } else $var = SvUV($arg); } T_TIMEOUT if(($var = ($type)(SvNV($arg) * 1000.)) < 0) $var = -1; T_PV $var = SvOK($arg) ? SvPV_nolen($arg) : NULL; OUTPUT T_ENUM $arg = SvREFCNT_inc(lookup_enum(LOOKUP_$ntype, (int)$var)); T_FOURCC { char str[4] = { $var & 0xff, ($var >> 8) & 0xff, ($var >> 16) & 0xff, ($var >> 24) & 0xff, }; sv_setuv($arg, $var); sv_setpvn($arg, str, 4); SvIOK_on($arg); } T_CONFIG_ERROR if($var) croak("invalid configuration setting: %s", config_string); zbar-0.23/perl/COPYING.LIB0000664000175000017500000006350413466560613011743 00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! zbar-0.23/perl/ZBar/0000775000175000017500000000000013471606255011210 500000000000000zbar-0.23/perl/ZBar/Symbol.pod0000664000175000017500000000727213471225716013110 00000000000000#------------------------------------------------------------------------ # Copyright 2008-2010 (c) Jeff Brown # # This file is part of the ZBar Bar Code Reader. # # The ZBar Bar Code Reader is free software; you can redistribute it # and/or modify it under the terms of the GNU Lesser Public License as # published by the Free Software Foundation; either version 2.1 of # the License, or (at your option) any later version. # # The ZBar Bar Code Reader 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 Lesser Public License for more details. # # You should have received a copy of the GNU Lesser Public License # along with the ZBar Bar Code Reader; if not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA # # http://sourceforge.net/projects/zbar #------------------------------------------------------------------------ =pod =head1 NAME Barcode::ZBar::Symbol - bar code scan result object =head1 SYNOPSIS my @symbols = $image->get_symbols(); foreach my $sym (@symbols) { print("decoded: " . $sym->get_type() . ":" . $sym->get_data(). "(" . $sym->get_count() . ")"); } =head1 DESCRIPTION Barcode::ZBar::Symbol objects are constant results returned for each bar code scanned from images or video. This object wraps the raw symbol data with additional information about the decode (symbology, confidence, location, etc) =head1 REFERENCE =head2 Methods =over 4 =item get_type() The type of bar code "symbology" from which the data was decoded. =item get_data() The decoded data string. Note that some symbologies can encode binary data. =item get_quality() Confidence metric. An unscaled integer value that indicates something (intentionally unspecified) about the reliability of this result relative to another. Larger values are better than smaller values, where "large" and "small" are application dependent. Expect this definition to become more specific as the metric is enhanced. =item get_count() Current cache count of the symbol. This integer value provides inter-scan reliability and redundancy information if enabled at the Barcode::ZBar::ImageScanner. =item get_orientation() General orientation of decoded symbol. This returns one of the Barcode::ZBar::Orient constants, which provide a coarse, axis-aligned indication of symbol orientation. =item get_components() Components of a composite result. This yields an array of physical component symbols that were combined to form a composite result. =over 2 =item * A negative value indicates that this result is still uncertain =item * A zero value indicates the first occurrence of this result with high confidence =item * A positive value indicates a duplicate scan =back =back =head2 Constants Bar code type "symbology" constants: =over 4 =item NONE =item PARTIAL =item EAN13 =item EAN8 =item UPCA =item UPCE =item ISBN10 =item ISBN13 =item I25 =item CODABAR =item CODE39 =item CODE93 =item CODE128 =item QRCODE =item PDF417 =back =head1 SEE ALSO Barcode::ZBar, Barcode::ZBar::Image zbarimg(1), zbarcam(1) http://zbar.sf.net =head1 AUTHOR Jeff Brown, Espadix@users.sourceforge.netE =head1 COPYRIGHT AND LICENSE Copyright 2008-2010 (c) Jeff Brown Espadix@users.sourceforge.netE The ZBar Bar Code Reader is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. =cut zbar-0.23/perl/ZBar/ImageScanner.pod0000664000175000017500000000532113471225700014161 00000000000000#------------------------------------------------------------------------ # Copyright 2008-2009 (c) Jeff Brown # # This file is part of the ZBar Bar Code Reader. # # The ZBar Bar Code Reader is free software; you can redistribute it # and/or modify it under the terms of the GNU Lesser Public License as # published by the Free Software Foundation; either version 2.1 of # the License, or (at your option) any later version. # # The ZBar Bar Code Reader 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 Lesser Public License for more details. # # You should have received a copy of the GNU Lesser Public License # along with the ZBar Bar Code Reader; if not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA # # http://sourceforge.net/projects/zbar #------------------------------------------------------------------------ =pod =head1 NAME Barcode::ZBar::ImageScanner - scan images for bar codes =head1 SYNOPSIS use Barcode::ZBar; my $scanner = Barcode::ZBar::ImageScanner->new(); $scanner->parse_config('i25.disable'); $scanner->scan_image($image); =head1 DESCRIPTION A Barcode::ZBar::ImageScanner is used to scan for bar codes in a Barcode::ZBar::Image. =head1 REFERENCE =head2 Methods =over 4 =item new() Create a new bar code image scanner instance. =item get_results() Return a list of Barcode::ZBar::Symbol results from the last scanned image. =item scan_image([I]) Scan a Barcode::ZBar::Image for bar codes. The image must be in the "Y800" format. If necessary, use C<< I<$image>->convert("Y800") >> to convert from other supported formats to Y800 before scanning. =item enable_cache([I]) Enable the inter-image result consistency cache. =item parse_config(I) Apply a decoder configuration setting. See the documentation for C/C for available configuration options. =item recycle_image([I]) Remove previously decoded results from a Barcode::ZBar::Image and recycle the associated memory. =back =head1 SEE ALSO Barcode::ZBar, Barcode::ZBar::Image, zbarimg(1), zbarcam(1) http://zbar.sf.net =head1 AUTHOR Jeff Brown, Espadix@users.sourceforge.netE =head1 COPYRIGHT AND LICENSE Copyright 2008-2010 (c) Jeff Brown Espadix@users.sourceforge.netE The ZBar Bar Code Reader is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. =cut zbar-0.23/perl/ZBar/Image.pod0000664000175000017500000000702013471225700012645 00000000000000#------------------------------------------------------------------------ # Copyright 2008-2009 (c) Jeff Brown # # This file is part of the ZBar Bar Code Reader. # # The ZBar Bar Code Reader is free software; you can redistribute it # and/or modify it under the terms of the GNU Lesser Public License as # published by the Free Software Foundation; either version 2.1 of # the License, or (at your option) any later version. # # The ZBar Bar Code Reader 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 Lesser Public License for more details. # # You should have received a copy of the GNU Lesser Public License # along with the ZBar Bar Code Reader; if not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA # # http://sourceforge.net/projects/zbar #------------------------------------------------------------------------ =pod =head1 NAME Barcode::ZBar::Image - image object to scan for bar codes =head1 SYNOPSIS use Barcode::ZBar; my $image = Barcode::ZBar::Image->new(); $image->set_format('422P'); $image->set_size(114, 80); $image->set_data($raw_bits); my @symbols = $image->get_symbols(); =head1 DESCRIPTION Barcode::ZBar::Image is used to pass images to the bar code scanner. It wraps raw image data with the meta-data required to interpret it (size, pixel format, etc) =head2 Image Formats Image data formats are represented by (relatively) standard "Four Character Codes" (fourcc), represented by four character strings in Perl. A list of supported formats is available on the project wiki. Examples: =over 2 =item * 'GREY' - single 8bpp intensity plane =item * 'BGR3' - 24bpp packed RGB component format =item * 'YUYV' - 12bpp packed luminance/chrominance (YCbCr) format =back =head1 REFERENCE =head2 Methods =over 4 =item new() Create a new Barcode::ZBar::Image object. The size, pixel format and data must be defined before the object may be used. =item get_format() =item set_format(I) Return/specify the fourcc code corresponding to the image pixel format. =item get_sequence() =item set_sequence(I) Return/specify the video frame or page number associated with the image. =item get_size() =item set_size(I, I) Return/specify the (I, I) image size tuple. =item get_data() =item set_data(I) Return/specify the raw image data as a binary string. =item get_symbols() Return a list of scanned Barcode::ZBar::Symbol results attached to this image. =item convert(I) Return a new Barcode::ZBar::Image object converted to the indicated fourcc format. Returns C if the conversion is not supported. Conversion complexity ranges from CPU intensive to trivial depending on the formats involved. Note that only a few conversions retain color information. =back =head1 SEE ALSO Barcode::ZBar, Barcode::ZBar::Image, Barcode::ZBar::Symbol zbarimg(1), zbarcam(1) http://zbar.sf.net =head1 AUTHOR Jeff Brown, Espadix@users.sourceforge.netE =head1 COPYRIGHT AND LICENSE Copyright 2008-2010 (c) Jeff Brown Espadix@users.sourceforge.netE The ZBar Bar Code Reader is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. =cut zbar-0.23/perl/ZBar/Processor.pod0000664000175000017500000001016413471225716013614 00000000000000#------------------------------------------------------------------------ # Copyright 2008-2009 (c) Jeff Brown # # This file is part of the ZBar Bar Code Reader. # # The ZBar Bar Code Reader is free software; you can redistribute it # and/or modify it under the terms of the GNU Lesser Public License as # published by the Free Software Foundation; either version 2.1 of # the License, or (at your option) any later version. # # The ZBar Bar Code Reader 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 Lesser Public License for more details. # # You should have received a copy of the GNU Lesser Public License # along with the ZBar Bar Code Reader; if not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA # # http://sourceforge.net/projects/zbar #------------------------------------------------------------------------ =pod =head1 NAME Barcode::ZBar::Processor - self-contained bar code reader =head1 SYNOPSIS setup: use Barcode::ZBar; my $reader = Barcode::ZBar::Processor->new(); $reader->init("/dev/video1", 1); $reader->parse_config('code39.disable'); $reader->set_data_handler(\&my_handler); scan an image: $reader->process_image($image); scan from video: $reader->set_visible(); $reader->set_active(); $reader->user_wait(); =head1 DESCRIPTION A Barcode::ZBar::Processor may be used to quickly create stand-alone bar code scanning applications. It has interfaces to scan images or video and to optionally display a video/image preview to a window. This interface is not well suited for integration with an existing GUI, as the library manages the optional preview window and any user interaction. Use a Barcode::ZBar::ImageScanner or Investigate the available widget interfaces for GUI applications. =head1 REFERENCE =head2 Methods =over 4 =item new() Create a new bar code reader instance. =item init([I], [I]) Open a video input device and/or prepare to display output. =item set_data_handler([I], [I]) Setup a callback to process results whenever new results are available from the video stream or a static image. The specified callable will be invoked with the associated Barcode::ZBar::Processor object and I as arguments. Closure may be achieved either using standard Perl closure or by manually passing a scalar via I. =item is_visible() =item set_visible([I]) Test/set visibility of the output window. =item set_active([I]) Enable/disable video streaming and scanning for bar codes. =item get_results() Return a list of Barcode::ZBar::Symbol results from the last scanned image or video frame. =item user_wait([I]) Wait for the user to press a key/button or close the window. Bar codes will continue to be processed if video is active. =item process_one([I]) Enable video and scan until at least one barcode is found. Note that multiple results may still be returned. =item process_image([I]) Scan a Barcode::ZBar::Image for bar codes. =item parse_config(I) Apply a decoder configuration setting. See the documentation for C/C for available configuration options. =item request_size(I, I) Request a preferred size for the video image from the device. The request may be adjusted or completely ignored by the driver. Must be called before C =back =head1 SEE ALSO Barcode::ZBar, Barcode::ZBar::Image, Barcode::ZBar::ImageScanner zbarimg(1), zbarcam(1) http://zbar.sf.net =head1 AUTHOR Jeff Brown, Espadix@users.sourceforge.netE =head1 COPYRIGHT AND LICENSE Copyright 2008-2010 (c) Jeff Brown Espadix@users.sourceforge.netE The ZBar Bar Code Reader is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. =cut zbar-0.23/perl/Makefile.PL0000664000175000017500000000123613466560613012247 00000000000000use 5.006; use ExtUtils::MakeMaker; use lib qw(inc); use Devel::CheckLib; check_lib_or_exit( lib => 'zbar', header => 'zbar.h', LIBS => join(' ', map({ /^LIBS=(.*)/; $1 } grep(/^LIBS=/, @ARGV))), INC => join(' ', map({ /^INC=(.*)/; $1 } grep(/^INC=/, @ARGV))), ); WriteMakefile( NAME => 'Barcode::ZBar', VERSION_FROM => "ZBar.pm", ABSTRACT_FROM => "ZBar.pm", AUTHOR => 'Jeff Brown ', LICENSE => 'lgpl', LIBS => ['-lzbar'], META_MERGE => { build_requires => { 'Test::More' => 0, } }, ); zbar-0.23/perl/inc/0000775000175000017500000000000013471606255011123 500000000000000zbar-0.23/perl/inc/Devel/0000775000175000017500000000000013471606255012162 500000000000000zbar-0.23/perl/inc/Devel/CheckLib.pm0000664000175000017500000002455413471225716014115 00000000000000# $Id: CheckLib.pm,v 1.22 2008/03/12 19:52:50 drhyde Exp $ package Devel::CheckLib; use strict; use vars qw($VERSION @ISA @EXPORT); $VERSION = '0.5'; use Config; use File::Spec; use File::Temp; require Exporter; @ISA = qw(Exporter); @EXPORT = qw(assert_lib check_lib_or_exit); # localising prevents the warningness leaking out of this module local $^W = 1; # use warnings is a 5.6-ism _findcc(); # bomb out early if there's no compiler =head1 NAME Devel::CheckLib - check that a library is available =head1 DESCRIPTION Devel::CheckLib is a perl module that checks whether a particular C library and its headers are available. =head1 SYNOPSIS # in a Makefile.PL or Build.PL use lib qw(inc); use Devel::CheckLib; check_lib_or_exit( lib => 'jpeg', header => 'jpeglib.h' ); check_lib_or_exit( lib => [ 'iconv', 'jpeg' ] ); # or prompt for path to library and then do this: check_lib_or_exit( lib => 'jpeg', libpath => $additional_path ); =head1 HOW IT WORKS You pass named parameters to a function, describing to it how to build and link to the libraries. It works by trying to compile this: int main(void) { return 0; } and linking it to the specified libraries. If something pops out the end which looks executable, then we know that it worked. That tiny program is built once for each library that you specify, and (without linking) once for each header file. =head1 FUNCTIONS All of these take the same named parameters and are exported by default. To avoid exporting them, C. =head2 assert_lib This takes several named parameters, all of which are optional, and dies with an error message if any of the libraries listed can not be found. B: dying in a Makefile.PL or Build.PL may provoke a 'FAIL' report from CPAN Testers' automated smoke testers. Use C instead. The named parameters are: =over =item lib Must be either a string with the name of a single library or a reference to an array of strings of library names. Depending on the compiler found, library names will be fed to the compiler either as C<-l> arguments or as C<.lib> file names. (E.g. C<-ljpeg> or C) =item libpath a string or an array of strings representing additional paths to search for libraries. =item LIBS a C-style space-seperated list of libraries (each preceded by '-l') and directories (preceded by '-L'). =back And libraries are no use without header files, so ... =over =item header Must be either a string with the name of a single header file or a reference to an array of strings of header file names. =item incpath a string or an array of strings representing additional paths to search for headers. =item INC a C-style space-seperated list of incpaths, each preceded by '-I'. =back =head2 check_lib_or_exit This behaves exactly the same as C except that instead of dying, it warns (with exactly the same error message) and exits. This is intended for use in Makefile.PL / Build.PL when you might want to prompt the user for various paths and things before checking that what they've told you is sane. If any library or header is missing, it exits with an exit value of 0 to avoid causing a CPAN Testers 'FAIL' report. CPAN Testers should ignore this result -- which is what you want if an external library dependency is not available. =cut sub check_lib_or_exit { eval 'assert_lib(@_)'; if($@) { warn $@; exit; } } sub assert_lib { my %args = @_; my (@libs, @libpaths, @headers, @incpaths); # FIXME: these four just SCREAM "refactor" at me @libs = (ref($args{lib}) ? @{$args{lib}} : $args{lib}) if $args{lib}; @libpaths = (ref($args{libpath}) ? @{$args{libpath}} : $args{libpath}) if $args{libpath}; @headers = (ref($args{header}) ? @{$args{header}} : $args{header}) if $args{header}; @incpaths = (ref($args{incpath}) ? @{$args{incpath}} : $args{incpath}) if $args{incpath}; # work-a-like for Makefile.PL's LIBS and INC arguments if(defined($args{LIBS})) { foreach my $arg (split(/\s+/, $args{LIBS})) { die("LIBS argument badly-formed: $arg\n") unless($arg =~ /^-l/i); push @{$arg =~ /^-l/ ? \@libs : \@libpaths}, substr($arg, 2); } } if(defined($args{INC})) { foreach my $arg (split(/\s+/, $args{INC})) { die("INC argument badly-formed: $arg\n") unless($arg =~ /^-I/); push @incpaths, substr($arg, 2); } } my @cc = _findcc(); my @missing; # first figure out which headers we can't find ... for my $header (@headers) { my($ch, $cfile) = File::Temp::tempfile( 'assertlibXXXXXXXX', SUFFIX => '.c' ); print $ch qq{#include <$header>\nint main(void) { return 0; }\n}; close($ch); my $exefile = File::Temp::mktemp( 'assertlibXXXXXXXX' ) . $Config{_exe}; my @sys_cmd; # FIXME: re-factor - almost identical code later when linking if ( $Config{cc} eq 'cl' ) { # Microsoft compiler require Win32; @sys_cmd = (@cc, $cfile, "/Fe$exefile", (map { '/I'.Win32::GetShortPathName($_) } @incpaths)); } elsif($Config{cc} =~ /bcc32(\.exe)?/) { # Borland @sys_cmd = (@cc, (map { "-I$_" } @incpaths), "-o$exefile", $cfile); } else { # Unix-ish # gcc, Sun, AIX (gcc, cc) @sys_cmd = (@cc, $cfile, (map { "-I$_" } @incpaths), "-o", "$exefile"); } warn "# @sys_cmd\n" if $args{debug}; my $rv = $args{debug} ? system(@sys_cmd) : _quiet_system(@sys_cmd); push @missing, $header if $rv != 0 || ! -x $exefile; _cleanup_exe($exefile); unlink $cfile; } # now do each library in turn with no headers my($ch, $cfile) = File::Temp::tempfile( 'assertlibXXXXXXXX', SUFFIX => '.c' ); print $ch "int main(void) { return 0; }\n"; close($ch); for my $lib ( @libs ) { my $exefile = File::Temp::mktemp( 'assertlibXXXXXXXX' ) . $Config{_exe}; my @sys_cmd; if ( $Config{cc} eq 'cl' ) { # Microsoft compiler require Win32; my @libpath = map { q{/libpath:} . Win32::GetShortPathName($_) } @libpaths; @sys_cmd = (@cc, $cfile, "${lib}.lib", "/Fe$exefile", "/link", @libpath ); } elsif($Config{cc} eq 'CC/DECC') { # VMS } elsif($Config{cc} =~ /bcc32(\.exe)?/) { # Borland my @libpath = map { "-L$_" } @libpaths; @sys_cmd = (@cc, "-o$exefile", "-l$lib", @libpath, $cfile); } else { # Unix-ish # gcc, Sun, AIX (gcc, cc) my @libpath = map { "-L$_" } @libpaths; @sys_cmd = (@cc, $cfile, "-o", "$exefile", "-l$lib", @libpath); } warn "# @sys_cmd\n" if $args{debug}; my $rv = $args{debug} ? system(@sys_cmd) : _quiet_system(@sys_cmd); push @missing, $lib if $rv != 0 || ! -x $exefile; _cleanup_exe($exefile); } unlink $cfile; my $miss_string = join( q{, }, map { qq{'$_'} } @missing ); die("Can't link/include $miss_string\n") if @missing; } sub _cleanup_exe { my ($exefile) = @_; my $ofile = $exefile; $ofile =~ s/$Config{_exe}$/$Config{_o}/; unlink $exefile if -f $exefile; unlink $ofile if -f $ofile; unlink "$exefile\.manifest" if -f "$exefile\.manifest"; return } sub _findcc { my @paths = split(/$Config{path_sep}/, $ENV{PATH}); my @cc = split(/\s+/, $Config{cc}); return @cc if -x $cc[0]; foreach my $path (@paths) { my $compiler = File::Spec->catfile($path, $cc[0]) . $Config{_exe}; return ($compiler, @cc[1 .. $#cc]) if -x $compiler; } die("Couldn't find your C compiler\n"); } # code substantially borrowed from IPC::Run3 sub _quiet_system { my (@cmd) = @_; # save handles local *STDOUT_SAVE; local *STDERR_SAVE; open STDOUT_SAVE, ">&STDOUT" or die "CheckLib: $! saving STDOUT"; open STDERR_SAVE, ">&STDERR" or die "CheckLib: $! saving STDERR"; # redirect to nowhere local *DEV_NULL; open DEV_NULL, ">" . File::Spec->devnull or die "CheckLib: $! opening handle to null device"; open STDOUT, ">&" . fileno DEV_NULL or die "CheckLib: $! redirecting STDOUT to null handle"; open STDERR, ">&" . fileno DEV_NULL or die "CheckLib: $! redirecting STDERR to null handle"; # run system command my $rv = system(@cmd); # restore handles open STDOUT, ">&" . fileno STDOUT_SAVE or die "CheckLib: $! restoring STDOUT handle"; open STDERR, ">&" . fileno STDERR_SAVE or die "CheckLib: $! restoring STDERR handle"; return $rv; } =head1 PLATFORMS SUPPORTED You must have a C compiler installed. We check for C<$Config{cc}>, both literally as it is in Config.pm and also in the $PATH. It has been tested with varying degrees on rigourousness on: =over =item gcc (on Linux, *BSD, Mac OS X, Solaris, Cygwin) =item Sun's compiler tools on Solaris =item IBM's tools on AIX =item Microsoft's tools on Windows =item MinGW on Windows (with Strawberry Perl) =item Borland's tools on Windows =back =head1 WARNINGS, BUGS and FEEDBACK This is a very early release intended primarily for feedback from people who have discussed it. The interface may change and it has not been adequately tested. Feedback is most welcome, including constructive criticism. Bug reports should be made using L or by email. When submitting a bug report, please include the output from running: perl -V perl -MDevel::CheckLib -e0 =head1 SEE ALSO L L =head1 AUTHORS David Cantrell Edavid@cantrell.org.ukE David Golden Edagolden@cpan.orgE Thanks to the cpan-testers-discuss mailing list for prompting us to write it in the first place; to Chris Williams for help with Borland support. =head1 COPYRIGHT and LICENCE Copyright 2007 David Cantrell. Portions copyright 2007 David Golden. This module is free-as-in-speech software, and may be used, distributed, and modified under the same conditions as perl itself. =head1 CONSPIRACY This module is also free-as-in-mason software. =cut 1; zbar-0.23/perl/README0000664000175000017500000000165413471225716011157 00000000000000Barcode::ZBar Perl module ========================= ZBar Bar Code Reader is an open source software suite for reading bar codes from various sources, such as video streams, image files and raw intensity sensors. It supports EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 93, Code 39, Codabar, Interleaved 2 of 5 and QR Code. These are the Perl bindings for the library. Check the ZBar project home page for the latest release, mailing lists, etc. https://github.com/mchehab/zbar INSTALLATION To install this module type the following: perl Makefile.PL make make test make install DEPENDENCIES This module requires the ZBar Bar Code Reader, which may be obtained from: https://github.com/mchehab/zbar COPYRIGHT AND LICENCE Licensed under the GNU Lesser General Public License, version 2.1. http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt Copyright 2008-2010 (c) Jeff Brown zbar-0.23/README.md0000664000175000017500000001440113471225716010606 00000000000000ZBAR BAR CODE READER ==================== ZBar Bar Code Reader is an open source software suite for reading bar codes from various sources, such as video streams, image files and raw intensity sensors. It supports EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 93, Code 39, Codabar, Interleaved 2 of 5, QR Code and SQ Code. 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. For application developers, language bindings are included for C, C++, Python 2 and Perl as well as GUI widgets for Qt, GTK and PyGTK 2.0. Zbar also supports sending the scanned codes via dbus, allowing its integration with other applications. Check the ZBar home page for the latest release, mailing lists, etc.: - Tarballs with ZBar can be obtained from: - License information can be found in `COPYING`. You may find some outdated documentation at the original ZBar's site at Sourceforge, but please notice that the content there is not updated for ages: http://zbar.sourceforge.net/ BUILDING ======== See `INSTALL.md` for generic configuration and build instructions. Usually, all you need to do is to run: autoreconf -vfi ./configure make * NOTE On version 0.23, since the support for gtk3 and python3 are new, the default is to use gtk2 and python2. If you want to use gtk3 and python3, you should have the development packages for them, and run: autoreconf -vfi ./configure --with-gtk=auto --with-python=auto make This will make the building system to seek for the latest versions for gtk and python. The scanner/decoder library itself only requires a few standard library functions which should be available 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 3.16 kernel or upper is recommended for full support. More information is available at: - `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 if you want to scan image files. You may also use `GraphicsMagick` package instead. `ImageMagick` may be obtained from: - Qt Widget --------- The Qt widget requires Qt4 or Qt5. You will need Qt if you would like to use or develop a Qt GUI application with an integrated bar code scanning widget. Qt4 may be obtained from: - Gtk Widget ---------- The GTK+ widget requires GTK+-2.x or GTK+3.x. You will need GTK+ if you would like to use or develop a GTK+ GUI application with an integrated bar code scanning widget. GTK+ may be obtained from: - Python widgets -------------- **Python 2 legacy Gtk widget** The PyGTK 2.0/pygobject 2.0 wrapper for the GTK+ 2.x widget requires Python 2, PyGTK. You will need to enable both pygtk2 and gtk2 if you would like to use or develop a Python 2 GUI application with an integrated bar code scanning widget. PyGTK may be obtained from: - **Python 2 or 3 GIR Gtk widget** The GObject Introspection (GIR) wrapper for GTK+ widget is compatible with PyGObject, with works with either Python version 2 or 3. You will need to enable both Gtk and Python in order to use or develop a Python application with an integrated bar code scanning and webcam support. In order to build it, you need the required dependencies for GIR development. The actual package depends on the distribution. On Fedora, it is `pygobject3-devel`. On Debian/Ubuntu, it is `libgirepository1.0-dev` and `gir1.2-gtk-3.0`. While GIR builds with Gtk2, It is strongly recommended to use GTK+ version 3.x, as there are known issues with version 2.x and GIR, with will likely make it to fail. A test script can be built and run with: `make check-gi`. Instructions about how to use are GIR on Python are available at: - **Python bindings** The Python bindings require Python 2 and provide only non-GUI functions. You will need Python and PIL or Pillow if you would like to scan images or video directly using Python. Python is available from: - Perl Widget ----------- The Perl bindings require Perl (version 5). 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: - `perl/README` Java Widget ----------- The Java ZBar widget uses Java Native Interface (JNI), meaning that the widget will contain machine-dependent code. It works with Java version 7 and above. Java open JDK is available from: - RUNNING ======= `make install` will install the library and application programs. Run `zbarcam-qt` or `zbarcam` to start the video scanner. Use `zbarimg ` to decode a saved image file. Check the manual to find specific options for each program. DBUS TESTING ============ In order to test if dbus is working, you could use: $ dbus-monitor --system interface=org.linuxtv.Zbar1.Code or build the test programs with: $ make test_progs And run: $ ./test/test_dbus With that, running this command on a separate shell: $ ./zbarimg/zbarimg examples/code-128.png CODE-128:https://github.com/mchehab/zbar scanned 1 barcode symbols from 1 images in 0.01 seconds Will produce this output at test_dbus shell window: Waiting for Zbar events Type = CODE-128 Value = https://github.com/mchehab/zbar REPORTING BUGS ============== Bugs can be reported on the 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: - zbar-0.23/dbus/0000775000175000017500000000000013471606255010345 500000000000000zbar-0.23/dbus/org.linuxtv.Zbar.conf0000664000175000017500000000121713471225716014330 00000000000000 zbar-0.23/zbar-gtk.pc.in0000664000175000017500000000044713466560613012010 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: zbar-gtk Description: bar code scanning and decoding GTK widget URL: http://zbar.sourceforge.net Version: @VERSION@ Requires: zbar, gtk+-2.0, gthread-2.0 Libs: -L${libdir} -lzbargtk Cflags: -I${includedir} zbar-0.23/zbarcam/0000775000175000017500000000000013471606255011027 500000000000000zbar-0.23/zbarcam/zbarcam-qt.cpp0000664000175000017500000007567713471225716013541 00000000000000//------------------------------------------------------------------------ // Copyright 2008-2009 (c) Jeff Brown // // This file is part of the ZBar Bar Code Reader. // // The ZBar Bar Code Reader is free software; you can redistribute it // and/or modify it under the terms of the GNU Lesser Public License as // published by the Free Software Foundation; either version 2.1 of // the License, or (at your option) any later version. // // The ZBar Bar Code Reader 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 Lesser Public License for more details. // // You should have received a copy of the GNU Lesser Public License // along with the ZBar Bar Code Reader; if not, write to the Free // Software Foundation, Inc., 51 Franklin St, Fifth Floor, // Boston, MA 02110-1301 USA // // http://sourceforge.net/projects/zbar //------------------------------------------------------------------------ #include #include #include #include #include #include #include #include #include #include #include #include #include #define TEST_IMAGE_FORMATS \ "Image Files (*.png *.jpg *.jpeg *.bmp *.gif *.ppm *.pgm *.pbm *.tiff *.xpm *.xbm)" #define SYM_GROUP "Symbology" #define CAM_GROUP "Camera" #define DBUS_NAME "D-Bus" #define OPTION_BAR "option_bar.enable" #define CONTROL_BAR "control_bar.enable" extern "C" { int scan_video(void *add_device, void *userdata, const char *default_device); } struct configs_s { QString name; zbar::zbar_symbol_type_t sym; }; static const struct configs_s configs[] = { { "Composite codes", zbar::ZBAR_COMPOSITE }, { "Image Scanner", zbar::ZBAR_PARTIAL }, #if ENABLE_CODABAR == 1 { "Codabar", zbar::ZBAR_CODABAR }, #endif #if ENABLE_CODE128 == 1 { "Code-128", zbar::ZBAR_CODE128 }, #endif #if ENABLE_I25 == 1 { "Code 2 of 5 interlaced", zbar::ZBAR_I25 }, #endif #if ENABLE_CODE39 == 1 { "Code-39", zbar::ZBAR_CODE39 }, #endif #if ENABLE_CODE93 == 1 { "Code-93", zbar::ZBAR_CODE93 }, #endif #if ENABLE_DATABAR == 1 { "DataBar", zbar::ZBAR_DATABAR }, { "DataBar expanded", zbar::ZBAR_DATABAR_EXP }, #endif #if ENABLE_EAN == 1 { "EAN-2", zbar::ZBAR_EAN2 }, { "EAN-5", zbar::ZBAR_EAN5 }, { "EAN-8", zbar::ZBAR_EAN8 }, { "EAN-13", zbar::ZBAR_EAN13 }, { "ISBN-10", zbar::ZBAR_ISBN10 }, { "ISBN-13", zbar::ZBAR_ISBN13 }, { "UPC-A", zbar::ZBAR_UPCA }, { "UPC-E", zbar::ZBAR_UPCE }, #endif #if ENABLE_PDF417 == 1 { "PDF417", zbar::ZBAR_PDF417 }, #endif #if ENABLE_QRCODE == 1 { "QR code", zbar::ZBAR_QRCODE }, #endif #if ENABLE_SQCODE == 1 { "SQ code", zbar::ZBAR_SQCODE }, #endif }; #define CONFIGS_SIZE (sizeof(configs)/sizeof(*configs)) struct settings_s { QString name; zbar::zbar_config_t ctrl; bool is_bool; }; static const struct settings_s settings[] = { { "x-density", zbar::ZBAR_CFG_Y_DENSITY, false }, { "y-density", zbar::ZBAR_CFG_Y_DENSITY, false }, { "min-length", zbar::ZBAR_CFG_MIN_LEN, false }, { "max-length", zbar::ZBAR_CFG_MAX_LEN, false }, { "uncertainty", zbar::ZBAR_CFG_UNCERTAINTY, false }, { "ascii", zbar::ZBAR_CFG_ASCII, true }, { "add-check", zbar::ZBAR_CFG_ADD_CHECK, true }, { "emit-check", zbar::ZBAR_CFG_EMIT_CHECK, true }, { "position", zbar::ZBAR_CFG_POSITION, true }, { "test-inverted", zbar::ZBAR_CFG_TEST_INVERTED, true }, }; #define SETTINGS_SIZE (sizeof(settings)/sizeof(*settings)) // Represents an integer control class IntegerControl : public QSpinBox { Q_OBJECT private: char *name; zbar::QZBar *zbar; private slots: void updateControl(int value); public: IntegerControl(QGroupBox *parent, zbar::QZBar *_zbar, char *_name, int min, int max, int def, int step) : QSpinBox(parent) { int val; zbar = _zbar; name = _name; setRange(min, max); setSingleStep(step); if (!zbar->get_control(name, &val)) setValue(val); else setValue(def); connect(this, SIGNAL(valueChanged(int)), this, SLOT(updateControl(int))); } }; void IntegerControl::updateControl(int value) { zbar->set_control(name, value); } // Represents a menu control class MenuControl : public QComboBox { Q_OBJECT private: char *name; zbar::QZBar *zbar; QVector< QPair< int , QString > > vector; private slots: void updateControl(int value); public: MenuControl(QGroupBox *parent, zbar::QZBar *_zbar, char *_name, QVector< QPair< int , QString > > _vector) : QComboBox(parent) { int val; zbar = _zbar; name = _name; vector = _vector; if (zbar->get_control(name, &val)) val = 0; for (int i = 0; i < vector.size(); ++i) { QPair < int , QString > pair = vector.at(i); addItem(pair.second, pair.first); if (val == pair.first) setCurrentIndex(i); } connect(this, SIGNAL(currentIndexChanged(int)), this, SLOT(updateControl(int))); } }; void MenuControl::updateControl(int index) { zbar->set_control(name, vector.at(index).first); } class IntegerSetting : public QSpinBox { Q_OBJECT public: QString name; IntegerSetting(QString _name, int val = 0) : name(_name) { setValue(val); } }; class SettingsDialog : public QDialog { Q_OBJECT private: QVector val; zbar::QZBar *zbar; zbar::zbar_symbol_type_t sym; private slots: void accept() { for (unsigned i = 0; i < SETTINGS_SIZE; i++) zbar->set_config(sym, settings[i].ctrl, val[i]); QDialog::accept(); }; void reject() { QDialog::reject(); }; void clicked() { QCheckBox *button = qobject_cast(sender()); if (!button) return; QString name = button->text(); for (unsigned i = 0; i < SETTINGS_SIZE; i++) { if (settings[i].name == name) { val[i] = button->isChecked(); return; } } // ERROR! }; void update(int value) { IntegerSetting *setting = qobject_cast(sender()); if (!setting) return; for (unsigned i = 0; i < SETTINGS_SIZE; i++) { if (settings[i].name == setting->name) { val[i] = value; return; } } // ERROR! }; public: SettingsDialog(zbar::QZBar *_zbar, QString &name, zbar::zbar_symbol_type_t _sym) : zbar(_zbar), sym(_sym) { val = QVector(SETTINGS_SIZE); QGridLayout *layout = new QGridLayout(this); this->setWindowTitle(name); for (unsigned i = 0; i < SETTINGS_SIZE; i++) { int value = 0; if (zbar->get_config(sym, settings[i].ctrl, value)) continue; val[i] = value; if (settings[i].is_bool) { QCheckBox *button = new QCheckBox(settings[i].name, this); button->setChecked(value); layout->addWidget(button, i, 0, 1, 2, Qt::AlignTop | Qt::AlignLeft); connect(button, SIGNAL(clicked()), this, SLOT(clicked())); } else { QLabel *label = new QLabel(settings[i].name); layout->addWidget(label, i, 0, 1, 1, Qt::AlignTop | Qt::AlignLeft); IntegerSetting *spin = new IntegerSetting(settings[i].name, value); layout->addWidget(spin, i, 1, 1, 1, Qt::AlignTop | Qt::AlignLeft); connect(spin, SIGNAL(valueChanged(int)), this, SLOT(update(int))); } } QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); layout->addWidget(buttonBox); } }; class SettingsButton : public QPushButton { Q_OBJECT private: QString name; zbar::QZBar *zbar; zbar::zbar_symbol_type_t sym; public: SettingsButton(zbar::QZBar *_zbar, const QIcon &_icon, QString _name, zbar::zbar_symbol_type_t _sym) : QPushButton(_icon, ""), name(_name), zbar(_zbar), sym(_sym) { int size = font().pointSize(); if (size < 0) size = font().pixelSize(); if (size > 0) setIconSize(QSize(size, size)); }; public Q_SLOTS: void button_clicked() { SettingsButton *button = qobject_cast(sender()); if (!button) return; QString name = button->name; SettingsDialog *dialog = new SettingsDialog(zbar, name, sym); dialog->setModal(true); dialog->show(); } }; struct CamRes { unsigned width; unsigned height; float max_fps; }; class ZbarcamQZBar : public QWidget { Q_OBJECT protected: static void add_device (QComboBox *list, const char *device) { list->addItem(QString(device)); } public Q_SLOTS: void turn_show_options() { QPushButton *button = qobject_cast(sender()); if (!button) return; show_options = !show_options; if (show_options) { button->setText("Hide Options"); optionsGroup->show(); } else { button->setText("Show Options"); optionsGroup->hide(); } } void turn_show_controls() { QPushButton *button = qobject_cast(sender()); if (!button) return; show_controls = !show_controls; if (show_controls) { button->setText("Hide Controls"); controlGroup->show(); } else { button->setText("Show Controls"); controlGroup->hide(); } } public: ~ZbarcamQZBar () { saveSettings(); } ZbarcamQZBar (const char *default_device, int verbose = 0) : resolutions(NULL) { // drop-down list of video devices QComboBox *videoList = new QComboBox; // toggle button to disable/enable video statusButton = new QPushButton; QStyle *style = QApplication::style(); QIcon statusIcon = style->standardIcon(QStyle::SP_DialogNoButton); QIcon yesIcon = style->standardIcon(QStyle::SP_DialogYesButton); statusIcon.addPixmap(yesIcon.pixmap(QSize(128, 128), QIcon::Normal, QIcon::On), QIcon::Normal, QIcon::On); statusButton->setIcon(statusIcon); statusButton->setText("&Enable"); statusButton->setCheckable(true); statusButton->setEnabled(false); statusButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); // command button to open image files for scanning QPushButton *openButton = new QPushButton("&Open"); QIcon openIcon = style->standardIcon(QStyle::SP_DialogOpenButton); openButton->setIcon(openIcon); openButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); // collect video list and buttons horizontally ZBarMenu = new QHBoxLayout; ZBarMenu->setAlignment(Qt::AlignLeft); ZBarMenu->addWidget(videoList, 5); ZBarMenu->addWidget(statusButton, 1); ZBarMenu->addWidget(openButton, 1); // video barcode scanner zbar = new zbar::QZBar(NULL, verbose); zbar->setAcceptDrops(true); // text box for results QTextEdit *results = new QTextEdit; results->setReadOnly(true); QGridLayout *grid = new QGridLayout; grid->addLayout(ZBarMenu, 0, 0, 1, -1); grid->addWidget(zbar, 1, 0, 1, 1); grid->addWidget(results, 2, 0, 1, 1); // Group box where controls will be added optionsGroup = new QGroupBox(tr("Options"), this); QGridLayout *optionsBoxLayout = new QGridLayout(optionsGroup); optionsGroup->setAlignment(Qt::AlignHCenter); optionsBoxLayout->setContentsMargins(0, 0, 16, 0); grid->addWidget(optionsGroup, 1, 1, -1, 1, Qt::AlignTop); controlGroup = new QGroupBox(this); controlBoxLayout = new QGridLayout(controlGroup); controlBoxLayout->setContentsMargins(0, 0, 0, 0); grid->addWidget(controlGroup, 1, 2, -1, 1, Qt::AlignTop); loadSettings(); zbar->request_size(curWidth, curHeight, false); int pos = 0; #ifdef HAVE_DBUS QCheckBox *button = new QCheckBox(DBUS_NAME, this); button->setChecked(dbus_enabled); optionsBoxLayout->addWidget(button, ++pos, 0, 1, 1, Qt::AlignTop | Qt::AlignLeft); connect(button, SIGNAL(clicked()), this, SLOT(code_clicked())); zbar->request_dbus(0); #endif for (unsigned i = 0; i < CONFIGS_SIZE; i++) { int val = 0; if (configs[i].sym == zbar::ZBAR_PARTIAL) { QLabel *label = new QLabel(configs[i].name, this); optionsBoxLayout->addWidget(label, ++pos, 0, 1, 1, Qt::AlignTop | Qt::AlignLeft); } else { QCheckBox *button = new QCheckBox(configs[i].name, this); zbar->get_config(configs[i].sym, zbar::ZBAR_CFG_ENABLE, val); button->setChecked(val); optionsBoxLayout->addWidget(button, ++pos, 0, 1, 1, Qt::AlignTop | Qt::AlignLeft); connect(button, SIGNAL(clicked()), this, SLOT(code_clicked())); } /* Composite doesn't have configuration */ if (configs[i].sym == zbar::ZBAR_COMPOSITE) continue; QIcon icon = QIcon::fromTheme(QLatin1String("configure-toolbars")); SettingsButton *settings = new SettingsButton(zbar, icon, configs[i].name, configs[i].sym); optionsBoxLayout->addWidget(settings, pos, 1, 1, 1, Qt::AlignTop | Qt::AlignLeft); connect(settings, &SettingsButton::clicked, settings, &SettingsButton::button_clicked); } // Allow showing/hiding options/controls menus QPushButton *showOptionsButton, *showControlsButton; if (show_options) { showOptionsButton = new QPushButton("Hide Options"); optionsGroup->show(); } else { showOptionsButton = new QPushButton("Show Options"); optionsGroup->hide(); } showOptionsButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); ZBarMenu->addWidget(showOptionsButton); connect(showOptionsButton, SIGNAL(clicked()), this, SLOT(turn_show_options())); if (show_controls) { showControlsButton = new QPushButton("Hide Controls"); controlGroup->show(); } else { showControlsButton = new QPushButton("Show Controls"); controlGroup->hide(); } showControlsButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); ZBarMenu->addWidget(showControlsButton); connect(showControlsButton, SIGNAL(clicked()), this, SLOT(turn_show_controls())); if (!geometry.isEmpty()) restoreGeometry(geometry); setLayout(grid); videoList->addItem(""); int active = scan_video((void*)add_device, videoList, default_device); // directly connect combo box change signal to scanner video open connect(videoList, SIGNAL(currentIndexChanged(const QString&)), zbar, SLOT(setVideoDevice(const QString&))); // directly connect status button state to video enabled state connect(statusButton, SIGNAL(toggled(bool)), zbar, SLOT(setVideoEnabled(bool))); // also update status button state when video is opened/closed connect(zbar, SIGNAL(videoOpened(bool)), this, SLOT(setEnabled(bool))); // prompt for image file to scan when openButton is clicked connect(openButton, SIGNAL(clicked()), SLOT(openImage())); // directly connect video scanner decode result to display in text box connect(zbar, SIGNAL(decodedText(const QString&)), results, SLOT(append(const QString&))); if(active >= 0) videoList->setCurrentIndex(active); } public Q_SLOTS: void openImage () { file = QFileDialog::getOpenFileName(this, "Open Image", file, TEST_IMAGE_FORMATS); if(!file.isEmpty()) zbar->scanImage(QImage(file)); } void control_clicked() { QCheckBox *button = qobject_cast(sender()); if (!button) return; QString name = button->text(); bool val = button->isChecked(); zbar->set_control(name.toUtf8().data(), val); } void code_clicked() { QCheckBox *button = qobject_cast(sender()); if (!button) return; QString name = button->text(); bool val = button->isChecked(); if (name == DBUS_NAME) { zbar->request_dbus(val); dbus_enabled = val; return; } for (unsigned i = 0; i < CONFIGS_SIZE; i++) { if (configs[i].name == name) { zbar->set_config(configs[i].sym, zbar::ZBAR_CFG_ENABLE, val); return; } } } void clearLayout(QLayout *layout) { QLayoutItem *item; while((item = layout->takeAt(0))) { if (item->layout()) { clearLayout(item->layout()); delete item->layout(); } if (item->widget()) { delete item->widget(); } delete item; } } void setVideoResolution(int index) { struct CamRes *cur_res; if (index < 0 || res.isEmpty()) return; cur_res = &res[index]; unsigned width = zbar->videoWidth(); unsigned height = zbar->videoHeight(); if (width == cur_res->width && height == cur_res->height) return; zbar->request_size(cur_res->width, cur_res->height); curWidth = cur_res->width; curHeight = cur_res->height; } void setEnabled(bool videoEnabled) { zbar->setVideoEnabled(videoEnabled); // Update the status button statusButton->setEnabled(videoEnabled); statusButton->setChecked(videoEnabled); // Delete items before creating a new set of controls clearLayout(controlBoxLayout); if (!videoEnabled) return; // get_controls loadSettings(false); // FIXME: clear a previous resolutions box bool isNewResolutions = false; if (!resolutions) { resolutions = new QComboBox; resolutions->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); isNewResolutions = true; } resolutions->blockSignals(true); res.clear(); resolutions->clear(); for (int i = 0;; i++) { QString new_res; struct CamRes cur_res; if (!zbar->get_resolution(i, cur_res.width, cur_res.height, cur_res.max_fps)) break; new_res.sprintf("%dx%d - %.2f fps (max)", cur_res.width, cur_res.height, cur_res.max_fps); resolutions->addItem(new_res); res.append(cur_res); if (curWidth == cur_res.width && curHeight == cur_res.height) resolutions->setCurrentIndex(i); } if (isNewResolutions) { ZBarMenu->addWidget(resolutions); connect(resolutions, SIGNAL(currentIndexChanged(int)), this, SLOT(setVideoResolution(int))); } resolutions->blockSignals(false); // Restore saved resolution unsigned width = zbar->videoWidth(); unsigned height = zbar->videoHeight(); if (width != curWidth || height != curHeight) { for (int i = 0; i < res.size(); i++) { if (res[i].width == curWidth && res[i].height == curHeight) { resolutions->setCurrentIndex(i); break; } } } int pos = 0; QString oldGroup = ""; for (int i = 0;; i++) { char *name, *group; enum zbar::QZBar::ControlType type; int min, max, def, step; int ret = zbar->get_controls(i, &name, &group, &type, &min, &max, &def, &step); if (!ret) break; QString newGroup = "" + QString::fromUtf8(group) + " Controls"; if (newGroup != oldGroup) { if (oldGroup != "") controlBoxLayout->addItem(new QSpacerItem(0, 12), pos++, 2, 1, 2, Qt::AlignLeft); QLabel *label = new QLabel(newGroup); controlBoxLayout->addWidget(label, pos++, 0, 1, 2, Qt::AlignTop | Qt::AlignHCenter); pos++; oldGroup = newGroup; } switch (type) { case zbar::QZBar::Button: case zbar::QZBar::Boolean: { bool val; QCheckBox *button = new QCheckBox(name, controlGroup); controlBoxLayout->addWidget(button, pos++, 0, 1, 2, Qt::AlignLeft); if (!zbar->get_control(name, &val)) button->setChecked(val); else button->setChecked(def); connect(button, SIGNAL(clicked()), this, SLOT(control_clicked())); break; } case zbar::QZBar::Integer: { IntegerControl *ctrl; QLabel *label = new QLabel(QString::fromUtf8(name)); ctrl= new IntegerControl(controlGroup, zbar, name, min, max, def, step); controlBoxLayout->addWidget(label, pos, 0, Qt::AlignLeft); controlBoxLayout->addWidget(ctrl, pos++, 1, Qt::AlignLeft); break; } case zbar::QZBar::Menu: { MenuControl *ctrl; QLabel *label = new QLabel(QString::fromUtf8(name)); QVector< QPair< int , QString > > vector; vector = zbar->get_menu(i); ctrl= new MenuControl(controlGroup, zbar, name, vector); controlBoxLayout->addWidget(label, pos, 0, Qt::AlignLeft); controlBoxLayout->addWidget(ctrl, pos++, 1, Qt::AlignLeft); break; } default: // Just ignore other types break; } } } private: QString file; zbar::QZBar *zbar; QHBoxLayout *ZBarMenu; QPushButton *statusButton; QGroupBox *controlGroup, *optionsGroup; QComboBox *resolutions; QGridLayout *controlBoxLayout; QSignalMapper *signalMapper; bool dbus_enabled, show_options, show_controls; QByteArray geometry; QVector < struct CamRes > res; unsigned curWidth, curHeight; void loadSettings(bool getRes = true) { QSettings qSettings(QCoreApplication::organizationName(), QCoreApplication::applicationName()); QString key; QVariant qVal; geometry = qSettings.value("geometry").toByteArray(); key = OPTION_BAR; qVal = qSettings.value(key, true); show_options = qVal.toBool(); key = CONTROL_BAR; qVal = qSettings.value(key, true); show_controls = qVal.toBool(); if (getRes) { qVal = qSettings.value("width"); curWidth = qVal.toUInt(); qVal = qSettings.value("height"); curHeight = qVal.toUInt(); } #ifdef HAVE_DBUS key = DBUS_NAME ".enable"; qVal = qSettings.value(key, false); dbus_enabled = qVal.toBool(); #endif qSettings.beginGroup(SYM_GROUP); for (unsigned i = 0; i < CONFIGS_SIZE; i++) { int val = 0; if (zbar->get_config(configs[i].sym, zbar::ZBAR_CFG_ENABLE, val)) continue; key = QString(configs[i].name) + QString(".enable"); key.replace(" ","_"); qVal = qSettings.value(key, val); zbar->set_config(configs[i].sym, zbar::ZBAR_CFG_ENABLE, qVal.toInt()); if (configs[i].sym == zbar::ZBAR_COMPOSITE) continue; for (unsigned j = 0; j < SETTINGS_SIZE; j++) { int val = 0; if (zbar->get_config(configs[i].sym, settings[j].ctrl, val)) continue; key = QString(configs[i].name) + QString(".") + QString(settings[j].name); key.replace(" ","_"); qVal = qSettings.value(key, val); zbar->set_config(configs[i].sym, settings[j].ctrl, qVal.toInt()); } } qSettings.endGroup(); qSettings.beginGroup(CAM_GROUP); for (unsigned i = 0;; i++) { char *name, *group; enum zbar::QZBar::ControlType type; int min, max, def, step, val; int ret = zbar->get_controls(i, &name, &group, &type, &min, &max, &def, &step); if (!ret) break; switch (type) { case zbar::QZBar::Button: case zbar::QZBar::Boolean: case zbar::QZBar::Menu: case zbar::QZBar::Integer: { key = QString::fromUtf8(name); if (zbar->get_control(name, &val)) continue; key.replace(QRegularExpression("[^\\w\\d]+"),"_"); key.replace(QRegularExpression("_$"),""); qVal = qSettings.value(key, val); zbar->set_control(name, qVal.toInt()); break; } default: // Just ignore other types break; } } qSettings.endGroup(); } void saveSettings() { QSettings qSettings(QCoreApplication::organizationName(), QCoreApplication::applicationName()); QString key; unsigned int i; qSettings.setValue("geometry", saveGeometry()); key = OPTION_BAR; qSettings.setValue(key, show_options); key = CONTROL_BAR; qSettings.setValue(key, show_controls); curWidth = zbar->videoWidth(); curHeight = zbar->videoHeight(); qSettings.setValue("width", curWidth); qSettings.setValue("height", curHeight); #ifdef HAVE_DBUS // FIXME: track dbus enable-disable and store last state key = DBUS_NAME ".enable"; qSettings.setValue(key, dbus_enabled); #endif qSettings.beginGroup(SYM_GROUP); for (i = 0; i < CONFIGS_SIZE; i++) { int val = 0; if (zbar->get_config(configs[i].sym, zbar::ZBAR_CFG_ENABLE, val)) continue; key = QString(configs[i].name) + QString(".enable"); key.replace(" ","_"); qSettings.setValue(key, val); if (configs[i].sym == zbar::ZBAR_COMPOSITE) continue; for (unsigned j = 0; j < SETTINGS_SIZE; j++) { int val = 0; if (zbar->get_config(configs[i].sym, settings[j].ctrl, val)) continue; key = QString(configs[i].name) + QString(".") + QString(settings[j].name); key.replace(" ","_"); qSettings.setValue(key, val); } } qSettings.endGroup(); for (i = 0;; i++) { char *name, *group; enum zbar::QZBar::ControlType type; int min, max, def, step, val; int ret = zbar->get_controls(i, &name, &group, &type, &min, &max, &def, &step); if (!ret) break; if (i == 0) qSettings.beginGroup(CAM_GROUP); switch (type) { case zbar::QZBar::Button: case zbar::QZBar::Boolean: case zbar::QZBar::Menu: case zbar::QZBar::Integer: { key = QString::fromUtf8(name); if (zbar->get_control(name, &val)) continue; key.replace(QRegularExpression("[^\\w\\d]+"),"_"); key.replace(QRegularExpression("_$"),""); qSettings.setValue(key, val); break; } default: // Just ignore other types break; } } if (i > 0) qSettings.endGroup(); } }; #include "moc_zbarcam_qt.h" int main (int argc, char *argv[]) { int verbose = 0; QApplication app(argc, argv); app.setApplicationName("zbarcam_qt"); app.setOrganizationName("LinuxTV"); app.setOrganizationDomain("linuxtv.org"); app.setAttribute(Qt::AA_UseHighDpiPixmaps, true); const char *dev = NULL; // FIXME: poor man's argument parser. // Should use, instead, QCommandLineParser for (int i = 1; i < argc; i++) { if (!strcmp(argv[i], "--debug")) { verbose = 127; } else if (!strcmp(argv[i], "-v")) { verbose++; } else if (!strcmp(argv[i], "--help")) { qWarning() << "Usage:" << argv[0] << "[<--debug>] [<-v>] [<--help>] []\n"; return(-1); } else { dev = argv[i]; } } ZbarcamQZBar window(dev, verbose); window.show(); return(app.exec()); } zbar-0.23/zbarcam/Makefile.am.inc0000664000175000017500000000240513471225716013553 00000000000000bin_PROGRAMS += zbarcam/zbarcam zbarcam_zbarcam_SOURCES = zbarcam/zbarcam.c zbarcam_zbarcam_LDADD = zbar/libzbar.la zbarcam_zbarcam_CPPFLAGS = $(AM_CPPFLAGS) # automake bug in "monolithic mode"? CLEANFILES += zbarcam/.libs/zbarcam zbarcam/moc_zbarcam_qt.h if HAVE_GTK if !WIN32 bin_PROGRAMS += zbarcam/zbarcam-gtk zbarcam_zbarcam_gtk_SOURCES = zbarcam/zbarcam-gtk.c zbarcam/scan_video.c zbarcam_zbarcam_gtk_CPPFLAGS = $(GTK_CFLAGS) $(AM_CPPFLAGS) zbarcam_zbarcam_gtk_LDADD = $(GTK_LIBS) gtk/libzbargtk.la zbar/libzbar.la \ $(AM_LDADD) endif endif if HAVE_QT bin_PROGRAMS += zbarcam/zbarcam-qt zbarcam_zbarcam_qt_SOURCES = zbarcam/zbarcam-qt.cpp zbarcam/scan_video.c nodist_zbarcam_zbarcam_qt_SOURCES = zbarcam/moc_zbarcam_qt.h zbarcam_zbarcam_qt_CPPFLAGS = -Izbarcam $(QT_CFLAGS) $(AM_CPPFLAGS) zbarcam_zbarcam_qt_LDADD = $(QT_LIBS) qt/libzbarqt.la $(AM_LDADD) BUILT_SOURCES += $(nodist_zbarcam_zbarcam_qt_SOURCES) DISTCLEANFILES += $(nodist_zbarcam_zbarcam_qt_SOURCES) zbarcam/moc_zbarcam_qt.h zbarcam/moc_zbarcam_qt.h: zbarcam/zbarcam-qt.cpp $(MOC) -i $(zbarcam_zbarcam_qt_CPPFLAGS) $< -o $@ endif if WIN32 zbarcam_zbarcam_SOURCES += zbarcam/zbarcam.rc zbarcam_zbarcam_LDADD += zbarcam/zbarcam-rc.o if WITH_DIRECTSHOW zbarcam_zbarcam_CPPFLAGS += -DDIRECTSHOW endif endif zbar-0.23/zbarcam/zbarcam.rc0000664000175000017500000000166613471225716012724 00000000000000#include #include VS_VERSION_INFO VERSIONINFO FILEVERSION ZBAR_VERSION_MAJOR, ZBAR_VERSION_MINOR, ZBAR_VERSION_PATCH, 0 PRODUCTVERSION ZBAR_VERSION_MAJOR, ZBAR_VERSION_MINOR, ZBAR_VERSION_PATCH, 0 FILEOS VOS__WINDOWS32 FILETYPE VFT_APP { BLOCK "StringFileInfo" { BLOCK "040904E4" { VALUE "ProductName", "ZBar Bar Code Reader" VALUE "Company Name", "ZBar Bar Code Reader" VALUE "InternalName", "zbarcam" VALUE "OriginalFilename", "zbarcam.exe" VALUE "FileVersion", PACKAGE_VERSION VALUE "ProductVersion", PACKAGE_VERSION VALUE "FileDescription", "Scan bar codes from video devices" VALUE "LegalCopyright", "Copyright 2007-2010 (c) Jeff Brown " } } BLOCK "VarFileInfo" { VALUE "Translation", 0x0409, 0x04e4 } } APP_ICON ICON "zbar.ico" zbar-0.23/zbarcam/zbarcam-gtk.c0000664000175000017500000002171513471225716013322 00000000000000/*------------------------------------------------------------------------ * Copyright 2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #include static GtkWidget *window = NULL; static GtkWidget *status_image = NULL; static GtkTextView *results = NULL; static gchar *open_file = NULL; int scan_video(void *add_device, void *userdata, const char *default_device); /* decode signal callback * puts the decoded result in the textbox */ static void decoded (GtkWidget *widget, zbar_symbol_type_t symbol, const char *result, gpointer data) { GtkTextBuffer *resultbuf = gtk_text_view_get_buffer(results); GtkTextIter end; gtk_text_buffer_get_end_iter(resultbuf, &end); gtk_text_buffer_insert(resultbuf, &end, zbar_get_symbol_name(symbol), -1); gtk_text_buffer_insert(resultbuf, &end, ":", -1); gtk_text_buffer_insert(resultbuf, &end, result, -1); gtk_text_buffer_insert(resultbuf, &end, "\n", -1); gtk_text_view_scroll_to_iter(results, &end, 0, FALSE, 0, 0); } /* update button state when video state changes */ static void video_enabled (GObject *object, GParamSpec *param, gpointer data) { ZBarGtk *zbar = ZBAR_GTK(object); gboolean enabled = zbar_gtk_get_video_enabled(zbar); gboolean opened = zbar_gtk_get_video_opened(zbar); GtkToggleButton *button = GTK_TOGGLE_BUTTON(data); gboolean active = gtk_toggle_button_get_active(button); if(active != (opened && enabled)) gtk_toggle_button_set_active(button, enabled); } static void video_opened (GObject *object, GParamSpec *param, gpointer data) { ZBarGtk *zbar = ZBAR_GTK(object); gboolean opened = zbar_gtk_get_video_opened(zbar); gboolean enabled = zbar_gtk_get_video_enabled(zbar); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data), opened && enabled); gtk_widget_set_sensitive(GTK_WIDGET(data), opened); } /* (re)open the video when a new device is selected */ static void video_changed (GtkWidget *widget, gpointer data) { const char *video_device = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(widget)); zbar_gtk_set_video_device(ZBAR_GTK(data), ((video_device && video_device[0] != '<') ? video_device : NULL)); } static void status_button_toggled (GtkToggleButton *button, gpointer data) { ZBarGtk *zbar = ZBAR_GTK(data); gboolean opened = zbar_gtk_get_video_opened(zbar); gboolean enabled = zbar_gtk_get_video_enabled(zbar); gboolean active = gtk_toggle_button_get_active(button); if(opened && (active != enabled)) zbar_gtk_set_video_enabled(ZBAR_GTK(data), active); gtk_image_set_from_icon_name(GTK_IMAGE(status_image), (opened && active) ? "gtk-yes" : "gtk-no", GTK_ICON_SIZE_BUTTON); gtk_button_set_label(GTK_BUTTON(button), (!opened) ? "closed" : (active) ? "enabled" : "disabled"); } static void open_button_clicked (GtkButton *button, gpointer data) { GtkWidget *dialog = gtk_file_chooser_dialog_new("Open Image File", GTK_WINDOW(window), GTK_FILE_CHOOSER_ACTION_OPEN, "gtk-cancel", GTK_RESPONSE_CANCEL, "gtk-open", GTK_RESPONSE_ACCEPT, NULL); GtkFileChooser *chooser = GTK_FILE_CHOOSER(dialog); if(open_file) gtk_file_chooser_set_filename(chooser, open_file); if(gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) { gchar *file = gtk_file_chooser_get_filename(chooser); GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(file, NULL); if(pixbuf) zbar_gtk_scan_image(ZBAR_GTK(data), pixbuf); else fprintf(stderr, "ERROR: unable to open image file: %s\n", file); if(open_file && file) g_free(open_file); open_file = file; } gtk_widget_destroy(dialog); } /* build a simple gui w/: * - a combo box to select the desired video device * - the zbar widget to display video * - a non-editable text box to display any results */ int main (int argc, char *argv[]) { const char *video_arg = NULL; gtk_init(&argc, &argv); if(argc > 1) video_arg = argv[1]; window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), "test_gtk"); gtk_container_set_border_width(GTK_CONTAINER(window), 8); g_signal_connect(G_OBJECT(window), "destroy", G_CALLBACK(gtk_main_quit), NULL); GtkWidget *zbar = zbar_gtk_new(); g_signal_connect(G_OBJECT(zbar), "decoded", G_CALLBACK(decoded), NULL); /* video device list combo box */ GtkWidget *video_list = gtk_combo_box_text_new(); g_signal_connect(G_OBJECT(video_list), "changed", G_CALLBACK(video_changed), zbar); /* enable/disable status button */ GtkWidget *status_button = gtk_toggle_button_new(); status_image = gtk_image_new_from_icon_name("gtk-no", GTK_ICON_SIZE_BUTTON); gtk_button_set_image(GTK_BUTTON(status_button), status_image); gtk_button_set_label(GTK_BUTTON(status_button), "closed"); gtk_widget_set_sensitive(status_button, FALSE); /* bind status button state and video state */ g_signal_connect(G_OBJECT(status_button), "toggled", G_CALLBACK(status_button_toggled), zbar); g_signal_connect(G_OBJECT(zbar), "notify::video-enabled", G_CALLBACK(video_enabled), status_button); g_signal_connect(G_OBJECT(zbar), "notify::video-opened", G_CALLBACK(video_opened), status_button); /* open image file button */ #if GTK_MAJOR_VERSION >= 3 GtkWidget *open_button = gtk_button_new_from_icon_name("gtk-open", GTK_ICON_SIZE_BUTTON); #else GtkWidget *open_button = gtk_button_new_from_stock(GTK_STOCK_OPEN); #endif g_signal_connect(G_OBJECT(open_button), "clicked", G_CALLBACK(open_button_clicked), zbar); gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(video_list), ""); int active = scan_video(gtk_combo_box_text_append_text, video_list, video_arg); if(active >= 0) gtk_combo_box_set_active(GTK_COMBO_BOX(video_list), active); /* hbox for combo box and buttons */ #if GTK_MAJOR_VERSION >= 3 GtkWidget *hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8); #else GtkWidget *hbox = gtk_hbox_new(FALSE, 8); #endif gtk_box_pack_start(GTK_BOX(hbox), video_list, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(hbox), status_button, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(hbox), open_button, FALSE, FALSE, 0); /* text box for holding results */ results = GTK_TEXT_VIEW(gtk_text_view_new()); gtk_widget_set_size_request(GTK_WIDGET(results), 320, 64); gtk_text_view_set_editable(results, FALSE); gtk_text_view_set_cursor_visible(results, FALSE); gtk_text_view_set_left_margin(results, 4); /* vbox for hbox, zbar test widget and result text box */ #if GTK_MAJOR_VERSION >= 3 GtkWidget *vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 8); #else GtkWidget *vbox = gtk_vbox_new(FALSE, 8); #endif gtk_container_add(GTK_CONTAINER(window), vbox); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), zbar, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(results), FALSE, FALSE, 0); GdkGeometry hints; hints.min_width = 320; hints.min_height = 240; gtk_window_set_geometry_hints(GTK_WINDOW(window), zbar, &hints, GDK_HINT_MIN_SIZE); gtk_widget_show_all(window); gtk_main(); return(0); } zbar-0.23/zbarcam/scan_video.c0000664000175000017500000001523013471225716013225 00000000000000/*------------------------------------------------------------------------ * Copyright 2008-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #include #include #include #include #include #include #include #include #include typedef void (cb_t) (void *userdata, const char *device); struct devnodes { char *fname; int minor; int is_valid; }; static unsigned int n_devices = 0; static struct devnodes *devices = NULL; /* * Sort order: * * - Valid devices comes first * - Lowest minors comes first * * For devnode names, it sorts on this order: * - custom udev given names * - /dev/v4l/by-id/ * - /dev/v4l/by-path/ * - /dev/video * - /dev/char/ * * - Device name is sorted alphabetically if follows same pattern */ static int sort_devices(const void *__a, const void *__b) { const struct devnodes *a = __a; const struct devnodes *b = __b; int val_a, val_b; if (a->is_valid != b->is_valid) return !a->is_valid - !b->is_valid; if (a->minor != b->minor) return a->minor - b->minor; /* Ensure that /dev/video* devices will stay at the top */ if (strstr(a->fname, "by-id")) val_a = 1; if (strstr(a->fname, "by-path")) val_a = 2; else if (strstr(a->fname, "/dev/video")) val_a = 3; else if (strstr(a->fname, "char")) val_a = 4; else /* Customized names comes first */ val_a = 0; if (strstr(b->fname, "by-id")) val_b = 1; if (strstr(b->fname, "by-path")) val_b = 2; else if (strstr(b->fname, "/dev/video")) val_b = 3; else if (strstr(b->fname, "char")) val_b = 4; else /* Customized names comes first */ val_b = 0; if (val_a != val_b) return val_a - val_b; /* Finally, just use alphabetic order */ return strcmp(a->fname, b->fname); } static int handle_video_devs(const char *file, const struct stat *st, int flag) { int dev_minor, first_device = -1, fd; unsigned int i; struct v4l2_capability vid_cap = { 0 }; /* Discard devices that can't be a videodev */ if (!S_ISCHR(st->st_mode) || major(st->st_rdev) != 81) return 0; dev_minor = minor(st->st_rdev); /* check if it is an already existing device */ if (devices) { for (i = 0; i < n_devices; i++) { if (dev_minor == devices[i].minor) { first_device = i; break; } } } devices = realloc(devices, (n_devices + 1) * sizeof(struct devnodes)); if (!devices) { perror("Can't allocate memory to store devices"); exit(1); } memset(&devices[n_devices], 0, sizeof(struct devnodes)); if (first_device < 0) { fd = open(file, O_RDWR); if (fd < 0) { devices[n_devices].is_valid = 0; } else { if (ioctl(fd, VIDIOC_QUERYCAP, &vid_cap) == -1) { devices[n_devices].is_valid = 0; } else { #ifdef V4L2_CID_ALPHA_COMPONENT /* * device_caps was added on Kernel 3.3. The preferred * way to handle such compat stuff would be to include * a recent videodev2.h at ZBar's source and check the * V4L2 API returned by VIDIOC_QUERYCAP. * However, doing that require some care, as other * compat code should be checked to see if they would work. * Also, it is painful to keep updating the Kernel headers. * Thankfully, V4L2_CID_ALPHA_COMPONENT was also added on * Kernel 3.3, so just checking if this is defined should * be enough to do the right thing. */ if (!(vid_cap.device_caps & V4L2_CAP_VIDEO_CAPTURE)) devices[n_devices].is_valid = 0; else devices[n_devices].is_valid = 1; #else if (!(vid_cap.device_caps & V4L2_CAP_VIDEO_CAPTURE)) devices[n_devices].is_valid = 0; else devices[n_devices].is_valid = 1; #endif } } close(fd); } else { devices[n_devices].is_valid = devices[first_device].is_valid; } devices[n_devices].fname = strdup(file); devices[n_devices].minor = dev_minor; n_devices++; return(0); } /* scan /dev for v4l video devices and call add_device for each. * also looks for a specified "default" device (if not NULL) * if not found, the default will be appended to the list. * returns the index+1 of the default_device, or 0 if the default * was not specified. NB *not* reentrant */ int scan_video (cb_t add_dev, void *userdata, const char *default_dev) { unsigned int i, idx = 0; int default_idx = -1, last_minor = -1; if(ftw("/dev", handle_video_devs, 4)) { perror("search for video devices failed"); return -1; } qsort(devices, n_devices, sizeof(struct devnodes), sort_devices); for (i = 0; i < n_devices; i++) { if (!devices[i].is_valid) continue; if (devices[i].minor == last_minor) continue; add_dev(userdata, devices[i].fname); last_minor = devices[i].minor; idx++; if (default_dev && !strcmp(default_dev, devices[i].fname)) default_idx = idx; else if (!default_dev && default_idx < 0) default_idx = idx; } for (i = 0; i < n_devices; i++) free(devices[i].fname); free(devices); n_devices = 0; devices = NULL; return(default_idx); } zbar-0.23/zbarcam/zbarcam.c0000664000175000017500000002500213471225716012530 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #include #include #include #ifdef _WIN32 # include # include # include #endif #include #include #define BELL "\a" static const char *note_usage = "usage: zbarcam [options] [/dev/video?]\n" "\n" "scan and decode bar codes from a video stream\n" "\n" "options:\n" " -h, --help display this help text\n" " --version display version information and exit\n" " -q, --quiet disable beep when symbol is decoded\n" " -v, --verbose increase debug output level\n" " --verbose=N set specific debug output level\n" " --xml use XML output format\n" " --raw output decoded symbol data without symbology prefix\n" #ifdef HAVE_DBUS " --nodbus disable dbus message\n" #endif " --nodisplay disable video display window\n" " --prescale=x\n" " request alternate video image size from driver\n" " -S[=], --set [=]\n" " set decoder/scanner to (or 1)\n" /* FIXME overlay level */ "\n"; static const char *xml_head = "" "\n"; static const char *xml_foot = "\n"; static zbar_processor_t *proc; static int quiet = 0; static enum { DEFAULT, RAW, XML } format = DEFAULT; static char *xml_buf = NULL; static unsigned xml_len = 0; static int usage (int rc) { FILE *out = (rc) ? stderr : stdout; fprintf(out, "%s", note_usage); return(rc); } static inline int parse_config (const char *cfgstr, int i, int n, char *arg) { if(i >= n || !*cfgstr) { fprintf(stderr, "ERROR: need argument for option: %s\n", arg); return(1); } if(zbar_processor_parse_config(proc, cfgstr)) { fprintf(stderr, "ERROR: invalid configuration setting: %s\n", cfgstr); return(1); } return(0); } static void data_handler (zbar_image_t *img, const void *userdata) { const zbar_symbol_t *sym = zbar_image_first_symbol(img); assert(sym); int n = 0; for(; sym; sym = zbar_symbol_next(sym)) { if(zbar_symbol_get_count(sym)) continue; zbar_symbol_type_t type = zbar_symbol_get_type(sym); if(type == ZBAR_PARTIAL) continue; if(!format) { printf("%s:", zbar_get_symbol_name(type)); if(fwrite(zbar_symbol_get_data(sym), zbar_symbol_get_data_length(sym), 1, stdout) != 1) continue; } else if(format == RAW) { if(fwrite(zbar_symbol_get_data(sym), zbar_symbol_get_data_length(sym), 1, stdout) != 1) continue; } else if(format == XML) { if(!n) printf("\n", zbar_image_get_sequence(img)); zbar_symbol_xml(sym, &xml_buf, &xml_len); if(fwrite(xml_buf, xml_len, 1, stdout) != 1) continue; } printf("\n"); n++; } if(format == XML && n) printf("\n"); fflush(stdout); if(!quiet && n) fprintf(stderr, BELL); } int main (int argc, const char *argv[]) { #ifdef DIRECTSHOW HRESULT res = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); if(FAILED(res)) { fprintf(stderr, "ERROR: failed to initialize COM library\n"); return(1); } #endif /* setup zbar library standalone processor, * threads will be used if available */ proc = zbar_processor_create(1); if(!proc) { fprintf(stderr, "ERROR: unable to allocate memory?\n"); return(1); } zbar_processor_set_data_handler(proc, data_handler, NULL); const char *video_device = ""; #ifdef HAVE_DBUS int dbus = 1; #endif int display = 1; unsigned long infmt = 0, outfmt = 0; int i; for(i = 1; i < argc; i++) { if(argv[i][0] != '-') video_device = argv[i]; else if(argv[i][1] != '-') { int j; for(j = 1; argv[i][j]; j++) { if(argv[i][j] == 'S') { if(!argv[i][++j]) { i++; j = 0; } if(parse_config(&argv[i][j], i, argc, "-S")) return(usage(1)); break; } switch(argv[i][j]) { case 'h': return(usage(0)); case 'v': zbar_increase_verbosity(); break; case 'q': quiet = 1; break; default: fprintf(stderr, "ERROR: unknown bundled config: -%c\n\n", argv[i][j]); return(usage(1)); } } } else if(!argv[i][2]) { if(i < argc - 1) video_device = argv[argc - 1]; break; } else if(!strcmp(argv[i], "--help")) return(usage(0)); else if(!strcmp(argv[i], "--version")) return(printf(PACKAGE_VERSION "\n") <= 0); else if(!strcmp(argv[i], "--set")) { i++; if(parse_config(argv[i], i, argc, "--set")) return(usage(1)); } else if(!strncmp(argv[i], "--set=", 6)) { if(parse_config(&argv[i][6], i, argc, "--set=")) return(usage(1)); } else if(!strcmp(argv[i], "--quiet")) quiet = 1; else if(!strcmp(argv[i], "--xml")) format = XML; else if(!strcmp(argv[i], "--raw")) format = RAW; else if(!strcmp(argv[i], "--nodbus")) #ifdef HAVE_DBUS dbus = 0; #else ; /* silently ignore the option */ #endif else if(!strcmp(argv[i], "--nodisplay")) display = 0; else if(!strcmp(argv[i], "--verbose")) zbar_increase_verbosity(); else if(!strncmp(argv[i], "--verbose=", 10)) zbar_set_verbosity(strtol(argv[i] + 10, NULL, 0)); else if(!strncmp(argv[i], "--prescale=", 11)) { char *x = NULL; long int w = strtol(argv[i] + 11, &x, 10); long int h = 0; if(x && *x == 'x') h = strtol(x + 1, NULL, 10); if(!w || !h || !x || *x != 'x') { fprintf(stderr, "ERROR: invalid prescale: %s\n\n", argv[i]); return(usage(1)); } zbar_processor_request_size(proc, w, h); } else if(!strncmp(argv[i], "--v4l=", 6)) { long int v = strtol(argv[i] + 6, NULL, 0); zbar_processor_request_interface(proc, v); } else if(!strncmp(argv[i], "--iomode=", 9)) { long int v = strtol(argv[i] + 9, NULL, 0); zbar_processor_request_iomode(proc, v); } else if(!strncmp(argv[i], "--infmt=", 8) && strlen(argv[i]) == 12) infmt = (argv[i][8] | (argv[i][9] << 8) | (argv[i][10] << 16) | (argv[i][11] << 24)); else if(!strncmp(argv[i], "--outfmt=", 9) && strlen(argv[i]) == 13) outfmt = (argv[i][9] | (argv[i][10] << 8) | (argv[i][11] << 16) | (argv[i][12] << 24)); else { fprintf(stderr, "ERROR: unknown option argument: %s\n\n", argv[i]); return(usage(1)); } } if(infmt || outfmt) zbar_processor_force_format(proc, infmt, outfmt); #ifdef HAVE_DBUS zbar_processor_request_dbus(proc, dbus); #endif /* open video device, open window */ if(zbar_processor_init(proc, video_device, display) || /* show window */ (display && zbar_processor_set_visible(proc, 1))) return(zbar_processor_error_spew(proc, 0)); if(format == XML) { #ifdef _WIN32 fflush(stdout); _setmode(_fileno(stdout), _O_BINARY); #endif printf(xml_head, video_device); fflush(stdout); } /* start video */ int active = 1; if(zbar_processor_set_active(proc, active)) return(zbar_processor_error_spew(proc, 0)); /* let the callback handle data */ int rc; while((rc = zbar_processor_user_wait(proc, -1)) >= 0) { if(rc == 'q' || rc == 'Q') break; // HACK: controls are known on V4L2 by ID, not by name. This is also // not compatible with other platforms if(rc == 'b' || rc == 'B') { int value; zbar_processor_get_control(proc, "Brightness", &value); zbar_processor_set_control(proc, "Brightness", ++value); } if(rc == 'n' || rc == 'N') { int value; zbar_processor_get_control(proc, "Brightness", &value); zbar_processor_set_control(proc, "Brightness", --value); } if(rc == ' ') { active = !active; if(zbar_processor_set_active(proc, active)) return(zbar_processor_error_spew(proc, 0)); } } /* report any errors that aren't "window closed" */ if(rc && rc != 'q' && rc != 'Q' && zbar_processor_get_error_code(proc) != ZBAR_ERR_CLOSED) return(zbar_processor_error_spew(proc, 0)); /* free resources (leak check) */ zbar_processor_destroy(proc); if(format == XML) { printf("%s", xml_foot); fflush(stdout); } return(0); } zbar-0.23/zbar/0000775000175000017500000000000013471606255010346 500000000000000zbar-0.23/zbar/mutex.h0000664000175000017500000000714613466560613011612 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _ZBAR_MUTEX_H_ #define _ZBAR_MUTEX_H_ #include /* simple platform mutex abstraction */ #if defined(_WIN32) # include # define DEBUG_LOCKS # ifdef DEBUG_LOCKS typedef struct zbar_mutex_s { int count; CRITICAL_SECTION mutex; } zbar_mutex_t; static inline int _zbar_mutex_init (zbar_mutex_t *lock) { lock->count = 1; InitializeCriticalSection(&lock->mutex); return(0); } static inline void _zbar_mutex_destroy (zbar_mutex_t *lock) { DeleteCriticalSection(&lock->mutex); } static inline int _zbar_mutex_lock (zbar_mutex_t *lock) { EnterCriticalSection(&lock->mutex); if(lock->count++ < 1) assert(0); return(0); } static inline int _zbar_mutex_unlock (zbar_mutex_t *lock) { if(lock->count-- <= 1) assert(0); LeaveCriticalSection(&lock->mutex); return(0); } # else typedef CRITICAL_SECTION zbar_mutex_t; static inline int _zbar_mutex_init (zbar_mutex_t *lock) { InitializeCriticalSection(lock); return(0); } static inline void _zbar_mutex_destroy (zbar_mutex_t *lock) { DeleteCriticalSection(lock); } static inline int _zbar_mutex_lock (zbar_mutex_t *lock) { EnterCriticalSection(lock); return(0); } static inline int _zbar_mutex_unlock (zbar_mutex_t *lock) { LeaveCriticalSection(lock); return(0); } # endif #elif defined(HAVE_LIBPTHREAD) # include typedef pthread_mutex_t zbar_mutex_t; static inline int _zbar_mutex_init (zbar_mutex_t *lock) { # ifdef DEBUG_LOCKS pthread_mutexattr_t attr; pthread_mutexattr_init(&attr); pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK); int rc = pthread_mutex_init(lock, &attr); pthread_mutexattr_destroy(&attr); return(rc); # else return(pthread_mutex_init(lock, NULL)); # endif } static inline void _zbar_mutex_destroy (zbar_mutex_t *lock) { pthread_mutex_destroy(lock); } static inline int _zbar_mutex_lock (zbar_mutex_t *lock) { int rc = pthread_mutex_lock(lock); # ifdef DEBUG_LOCKS assert(!rc); # endif /* FIXME save system code */ /*rc = err_capture(proc, SEV_ERROR, ZBAR_ERR_LOCKING, __func__, "unable to lock processor");*/ return(rc); } static inline int _zbar_mutex_unlock (zbar_mutex_t *lock) { int rc = pthread_mutex_unlock(lock); # ifdef DEBUG_LOCKS assert(!rc); # endif /* FIXME save system code */ return(rc); } #else typedef int zbar_mutex_t[0]; #define _zbar_mutex_init(l) -1 #define _zbar_mutex_destroy(l) #define _zbar_mutex_lock(l) 0 #define _zbar_mutex_unlock(l) 0 #endif #endif zbar-0.23/zbar/window/0000775000175000017500000000000013471606255011655 500000000000000zbar-0.23/zbar/window/x.h0000664000175000017500000000455213466560613012224 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _WINDOW_X_H_ #define _WINDOW_X_H_ #include "window.h" #ifdef HAVE_X # include # include # ifdef HAVE_X11_EXTENSIONS_XSHM_H # include # endif #ifdef HAVE_X11_EXTENSIONS_XVLIB_H # include #endif #endif struct window_state_s { unsigned long colors[8]; /* pre-allocated colors */ GC gc; /* graphics context */ Region exposed; /* region to redraw */ XFontStruct *font; /* overlay font */ /* pre-calculated logo geometries */ int logo_scale; unsigned long logo_colors[2]; Region logo_zbars; XPoint logo_z[4]; XRectangle logo_bars[5]; #ifdef HAVE_X11_EXTENSIONS_XSHM_H XShmSegmentInfo shm; /* shared memory segment */ #endif union { XImage *x; #ifdef HAVE_X11_EXTENSIONS_XVLIB_H XvImage *xv; #endif } img; XID img_port; /* current format port */ XID *xv_ports; /* best port for format */ int num_xv_adaptors; /* number of adaptors */ XID *xv_adaptors; /* port grabbed for each adaptor */ }; extern int _zbar_window_probe_ximage(zbar_window_t*); extern int _zbar_window_probe_xshm(zbar_window_t*); extern int _zbar_window_probe_xv(zbar_window_t*); #endif zbar-0.23/zbar/window/ximage.c0000664000175000017500000001576113466560613013226 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "window.h" #include "x.h" #include "image.h" static int ximage_cleanup (zbar_window_t *w) { window_state_t *x = w->state; if(x->img.x) free(x->img.x); x->img.x = NULL; return(0); } static inline int ximage_init (zbar_window_t *w, zbar_image_t *img, int format_change) { ximage_cleanup(w); XImage *ximg = w->state->img.x = calloc(1, sizeof(XImage)); ximg->width = img->width; ximg->height = img->height; ximg->format = ZPixmap; ximg->byte_order = LSBFirst; ximg->bitmap_unit = 8; ximg->bitmap_bit_order = MSBFirst; ximg->bitmap_pad = 8; const zbar_format_def_t *fmt = _zbar_format_lookup(w->format); if(fmt->group == ZBAR_FMT_RGB_PACKED) { ximg->depth = ximg->bits_per_pixel = fmt->p.rgb.bpp << 3; ximg->red_mask = (0xff >> RGB_SIZE(fmt->p.rgb.red)) << RGB_OFFSET(fmt->p.rgb.red); ximg->green_mask = (0xff >> RGB_SIZE(fmt->p.rgb.green)) << RGB_OFFSET(fmt->p.rgb.green); ximg->blue_mask = (0xff >> RGB_SIZE(fmt->p.rgb.blue)) << RGB_OFFSET(fmt->p.rgb.blue); } else { ximg->depth = ximg->bits_per_pixel = 8; ximg->red_mask = ximg->green_mask = ximg->blue_mask = 0xff; } if(!XInitImage(ximg)) return(err_capture_int(w, SEV_ERROR, ZBAR_ERR_XPROTO, __func__, "unable to init XImage for format %x", w->format)); w->dst_width = img->width; w->dst_height = img->height; /* FIXME implement some basic scaling */ w->scale_num = w->scale_den = 1; zprintf(3, "new XImage %.4s(%08" PRIx32 ") %dx%d" " from %.4s(%08" PRIx32 ") %dx%d\n", (char*)&w->format, w->format, ximg->width, ximg->height, (char*)&img->format, img->format, img->width, img->height); zprintf(4, " masks: %08lx %08lx %08lx\n", ximg->red_mask, ximg->green_mask, ximg->blue_mask); return(0); } static int ximage_draw (zbar_window_t *w, zbar_image_t *img) { window_state_t *x = w->state; XImage *ximg = x->img.x; assert(ximg); ximg->data = (void*)img->data; point_t src = { 0, 0 }; point_t dst = w->scaled_offset; if(dst.x < 0) { src.x = -dst.x; dst.x = 0; } if(dst.y < 0) { src.y = -dst.y; dst.y = 0; } point_t size = w->scaled_size; if(size.x > w->width) size.x = w->width; if(size.y > w->height) size.y = w->height; XPutImage(w->display, w->xwin, x->gc, ximg, src.x, src.y, dst.x, dst.y, size.x, size.y); ximg->data = NULL; return(0); } static uint32_t ximage_formats[4][5] = { { /* 8bpp */ /* FIXME fourcc('Y','8','0','0'), */ fourcc('R','G','B','1'), fourcc('B','G','R','1'), 0 }, { /* 16bpp */ fourcc('R','G','B','P'), fourcc('R','G','B','O'), fourcc('R','G','B','R'), fourcc('R','G','B','Q'), 0 }, { /* 24bpp */ fourcc('R','G','B','3'), fourcc('B','G','R','3'), 0 }, { /* 32bpp */ fourcc('R','G','B','4'), fourcc('B','G','R','4'), 0 }, }; static int ximage_probe_format (zbar_window_t *w, uint32_t format) { const zbar_format_def_t *fmt = _zbar_format_lookup(format); XVisualInfo visreq, *visuals = NULL; memset(&visreq, 0, sizeof(XVisualInfo)); visreq.depth = fmt->p.rgb.bpp << 3; visreq.red_mask = (0xff >> RGB_SIZE(fmt->p.rgb.red)) << RGB_OFFSET(fmt->p.rgb.red); visreq.green_mask = (0xff >> RGB_SIZE(fmt->p.rgb.green)) << RGB_OFFSET(fmt->p.rgb.green); visreq.blue_mask = (0xff >> RGB_SIZE(fmt->p.rgb.blue)) << RGB_OFFSET(fmt->p.rgb.blue); int n; visuals = XGetVisualInfo(w->display, VisualDepthMask | VisualRedMaskMask | VisualGreenMaskMask | VisualBlueMaskMask, &visreq, &n); zprintf(8, "bits=%d r=%08lx g=%08lx b=%08lx: n=%d visuals=%p\n", visreq.depth, visreq.red_mask, visreq.green_mask, visreq.blue_mask, n, visuals); if(!visuals) return(1); XFree(visuals); if(!n) return(-1); return(0); } int _zbar_window_probe_ximage (zbar_window_t *w) { /* FIXME determine supported formats/depths */ int n; XPixmapFormatValues *formats = XListPixmapFormats(w->display, &n); if(!formats) return(err_capture(w, SEV_ERROR, ZBAR_ERR_XPROTO, __func__, "unable to query XImage formats")); int i; for(i = 0; i < n; i++) { if(formats[i].depth & 0x7 || formats[i].depth > 0x20) { zprintf(2, " [%d] depth=%d bpp=%d: not supported\n", i, formats[i].depth, formats[i].bits_per_pixel); continue; } int fmtidx = formats[i].depth / 8 - 1; int j, n = 0; for(j = 0; ximage_formats[fmtidx][j]; j++) if(!ximage_probe_format(w, ximage_formats[fmtidx][j])) { zprintf(2, " [%d] depth=%d bpp=%d: %.4s(%08" PRIx32 ")\n", i, formats[i].depth, formats[i].bits_per_pixel, (char*)&ximage_formats[fmtidx][j], ximage_formats[fmtidx][j]); _zbar_window_add_format(w, ximage_formats[fmtidx][j]); n++; } if(!n) zprintf(2, " [%d] depth=%d bpp=%d: no visuals\n", i, formats[i].depth, formats[i].bits_per_pixel); } XFree(formats); if(!w->formats || !w->formats[0]) return(err_capture(w, SEV_ERROR, ZBAR_ERR_UNSUPPORTED, __func__, "no usable XImage formats found")); w->init = ximage_init; w->draw_image = ximage_draw; w->cleanup = ximage_cleanup; return(0); } zbar-0.23/zbar/window/null.c0000664000175000017500000000561413466560613012722 00000000000000/*------------------------------------------------------------------------ * Copyright 2008-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "window.h" static inline int null_error (void *m, const char *func) { return(err_capture(m, SEV_ERROR, ZBAR_ERR_UNSUPPORTED, func, "not compiled with output window support")); } int _zbar_window_attach (zbar_window_t *w, void *display, unsigned long win) { return(null_error(w, __func__)); } int _zbar_window_expose (zbar_window_t *w, int x, int y, int width, int height) { return(null_error(w, __func__)); } int _zbar_window_resize (zbar_window_t *w) { return(0); } int _zbar_window_clear (zbar_window_t *w) { return(null_error(w, __func__)); } int _zbar_window_begin (zbar_window_t *w) { return(null_error(w, __func__)); } int _zbar_window_end (zbar_window_t *w) { return(null_error(w, __func__)); } int _zbar_window_draw_marker (zbar_window_t *w, uint32_t rgb, point_t p) { return(null_error(w, __func__)); } int _zbar_window_draw_polygon (zbar_window_t *w, uint32_t rgb, const point_t *pts, int npts) { return(null_error(w, __func__)); } int _zbar_window_draw_text (zbar_window_t *w, uint32_t rgb, point_t p, const char *text) { return(null_error(w, __func__)); } int _zbar_window_fill_rect (zbar_window_t *w, uint32_t rgb, point_t org, point_t size) { return(null_error(w, __func__)); } int _zbar_window_draw_logo (zbar_window_t *w) { return(null_error(w, __func__)); } zbar-0.23/zbar/window/xv.c0000664000175000017500000002243713466560613012407 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "window.h" #include "x.h" #include "image.h" #include /* strcmp */ static int xv_cleanup (zbar_window_t *w) { window_state_t *x = w->state; if(x->img.xv) { XFree(x->img.xv); x->img.xv = NULL; } int i; for(i = 0; i < x->num_xv_adaptors; i++) if(x->xv_adaptors[i]) { XvUngrabPort(w->display, x->xv_adaptors[i], CurrentTime); x->xv_adaptors[i] = 0; } free(x->xv_ports); free(x->xv_adaptors); x->xv_ports = NULL; x->num_xv_adaptors = 0; x->xv_adaptors = NULL; return(0); } static inline int xv_init (zbar_window_t *w, zbar_image_t *img, int format_change) { window_state_t *x = w->state; if(x->img.xv) { XFree(x->img.xv); x->img.xv = NULL; } if(format_change) { /* lookup port for format */ x->img_port = 0; int i; for(i = 0; w->formats[i]; i++) if(w->formats[i] == w->format) { x->img_port = x->xv_ports[i]; break; } assert(x->img_port > 0); } XvImage *xvimg = XvCreateImage(w->display, x->img_port, w->format, NULL, img->width, img->height); zprintf(3, "new XvImage %.4s(%08" PRIx32 ") %dx%d(%d)" " from %.4s(%08" PRIx32 ") %dx%d\n", (char*)&w->format, w->format, xvimg->width, xvimg->height, xvimg->pitches[0], (char*)&img->format, img->format, img->width, img->height); /* FIXME not sure this simple check is always correct * should lookup format to decode/sanitize target width from pitch & bpp */ w->dst_width = ((xvimg->num_planes <= 1) ? xvimg->width : xvimg->pitches[0]); w->dst_height = xvimg->height; /* FIXME datalen check */ if(w->dst_width < img->width || xvimg->height < img->height) { XFree(xvimg); /* FIXME fallback to XImage... */ return(err_capture(w, SEV_ERROR, ZBAR_ERR_UNSUPPORTED, __func__, "output image size mismatch (XvCreateImage)")); } x->img.xv = xvimg; return(0); } static int xv_draw (zbar_window_t *w, zbar_image_t *img) { window_state_t *x = w->state; XvImage *xvimg = x->img.xv; assert(xvimg); xvimg->data = (void*)img->data; zprintf(24, "XvPutImage(%dx%d -> %dx%d (%08lx))\n", w->src_width, w->src_height, w->scaled_size.x, w->scaled_size.y, img->datalen); XvPutImage(w->display, x->img_port, w->xwin, x->gc, xvimg, 0, 0, w->src_width, w->src_height, w->scaled_offset.x, w->scaled_offset.y, w->scaled_size.x, w->scaled_size.y); xvimg->data = NULL; /* FIXME hold shm image until completion */ return(0); } static inline int xv_add_format (zbar_window_t *w, uint32_t fmt, XvPortID port) { int i = _zbar_window_add_format(w, fmt); window_state_t *x = w->state; if(!w->formats[i + 1]) x->xv_ports = realloc(x->xv_ports, (i + 1) * sizeof(*x->xv_ports)); /* FIXME could prioritize by something (rate? size?) */ x->xv_ports[i] = port; return(i); } static int xv_probe_port (zbar_window_t *w, XvPortID port) { unsigned n; XvEncodingInfo *encodings = NULL; if(XvQueryEncodings(w->display, port, &n, &encodings)) return(err_capture(w, SEV_ERROR, ZBAR_ERR_XPROTO, __func__, "querying XVideo encodings")); zprintf(1, "probing port %u with %d encodings:\n", (unsigned)port, n); unsigned width = 0, height = 0; int i; for(i = 0; i < n; i++) { XvEncodingInfo *enc = &encodings[i]; zprintf(2, " [%d] %lu x %lu rate=%d/%d : %s\n", i, enc->width, enc->height, enc->rate.numerator, enc->rate.denominator, enc->name); if(!strcmp(enc->name, "XV_IMAGE")) { if(width < enc->width) width = enc->width; if(height < enc->height) height = enc->height; } } XvFreeEncodingInfo(encodings); encodings = NULL; if(!width || !height) return(err_capture(w, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "no XV_IMAGE encodings found")); zprintf(1, "max XV_IMAGE size %dx%d\n", width, height); if(w->max_width > width) w->max_width = width; if(w->max_height > height) w->max_height = height; XvImageFormatValues *formats = XvListImageFormats(w->display, port, (int*)&n); if(!formats) return(err_capture(w, SEV_ERROR, ZBAR_ERR_XPROTO, __func__, "querying XVideo image formats")); zprintf(1, "%d image formats\n", n); for(i = 0; i < n; i++) { XvImageFormatValues *fmt = &formats[i]; zprintf(2, " [%d] %.4s(%08x) %s %s %s planes=%d bpp=%d : %.16s\n", i, (char*)&fmt->id, fmt->id, (fmt->type == XvRGB) ? "RGB" : "YUV", (fmt->byte_order == LSBFirst) ? "LSBFirst" : "MSBFirst", (fmt->format == XvPacked) ? "packed" : "planar", fmt->num_planes, fmt->bits_per_pixel, fmt->guid); xv_add_format(w, fmt->id, port); } XFree(formats); return(0); } int _zbar_window_probe_xv (zbar_window_t *w) { unsigned xv_major, xv_minor, xv_req, xv_ev, xv_err; if(XvQueryExtension(w->display, &xv_major, &xv_minor, &xv_req, &xv_ev, &xv_err)) { zprintf(1, "XVideo extension not present\n"); return(-1); } zprintf(1, "XVideo extension version %u.%u\n", xv_major, xv_minor); unsigned n; XvAdaptorInfo *adaptors = NULL; if(XvQueryAdaptors(w->display, w->xwin, &n, &adaptors)) return(err_capture(w, SEV_ERROR, ZBAR_ERR_XPROTO, __func__, "unable to query XVideo adaptors")); window_state_t *x = w->state; x->num_xv_adaptors = 0; x->xv_adaptors = calloc(n, sizeof(*x->xv_adaptors)); int i; for(i = 0; i < n; i++) { XvAdaptorInfo *adapt = &adaptors[i]; zprintf(2, " adaptor[%d] %lu ports %u-%u type=0x%x fmts=%lu : %s\n", i, adapt->num_ports, (unsigned)adapt->base_id, (unsigned)(adapt->base_id + adapt->num_ports - 1), adapt->type, adapt->num_formats, adapt->name); if(!(adapt->type & XvImageMask)) continue; int j; for(j = 0; j < adapt->num_ports; j++) if(!XvGrabPort(w->display, adapt->base_id + j, CurrentTime)) { zprintf(3, " grabbed port %u\n", (unsigned)(adapt->base_id + j)); x->xv_adaptors[x->num_xv_adaptors++] = adapt->base_id + j; break; } if(j == adapt->num_ports) zprintf(3, " no available XVideo image port\n"); } XvFreeAdaptorInfo(adaptors); adaptors = NULL; if(!x->num_xv_adaptors) { zprintf(1, "WARNING: no XVideo adaptor supporting XvImages found\n"); free(x->xv_adaptors); x->xv_adaptors = NULL; return(-1); } if(x->num_xv_adaptors < n) x->xv_adaptors = realloc(x->xv_adaptors, x->num_xv_adaptors * sizeof(int)); w->max_width = w->max_height = 65536; w->formats = realloc(w->formats, sizeof(uint32_t)); w->formats[0] = 0; for(i = 0; i < x->num_xv_adaptors; i++) if(xv_probe_port(w, x->xv_adaptors[i])) { XvUngrabPort(w->display, x->xv_adaptors[i], CurrentTime); x->xv_adaptors[i] = 0; } if(!w->formats[0] || w->max_width == 65536 || w->max_height == 65536) { xv_cleanup(w); return(-1); } /* clean out any unused adaptors */ for(i = 0; i < x->num_xv_adaptors; i++) { int j; for(j = 0; w->formats[j]; j++) if(x->xv_ports[j] == x->xv_adaptors[i]) break; if(!w->formats[j]) { XvUngrabPort(w->display, x->xv_adaptors[i], CurrentTime); x->xv_adaptors[i] = 0; } } w->init = xv_init; w->draw_image = xv_draw; w->cleanup = xv_cleanup; return(0); } zbar-0.23/zbar/window/x.c0000664000175000017500000002432113466560613012213 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "window.h" #include "image.h" #include "x.h" #include #ifndef ZBAR_OVERLAY_FONT # define ZBAR_OVERLAY_FONT "-*-fixed-medium-r-*-*-*-120-75-75-*-*-ISO8859-1" #endif static inline unsigned long window_alloc_color (zbar_window_t *w, Colormap cmap, unsigned short r, unsigned short g, unsigned short b) { XColor color; color.red = r; color.green = g; color.blue = b; color.flags = 0; XAllocColor(w->display, cmap, &color); return(color.pixel); } static inline int window_alloc_colors (zbar_window_t *w) { window_state_t *x = w->state; Colormap cmap = DefaultColormap(w->display, DefaultScreen(w->display)); int i; for(i = 0; i < 8; i++) x->colors[i] = window_alloc_color(w, cmap, (i & 4) ? (0xcc * 0x101) : 0, (i & 2) ? (0xcc * 0x101) : 0, (i & 1) ? (0xcc * 0x101) : 0); x->logo_colors[0] = window_alloc_color(w, cmap, 0xd709, 0x3333, 0x3333); x->logo_colors[1] = window_alloc_color(w, cmap, 0xa3d6, 0x0000, 0x0000); return(0); } static inline int window_hide_cursor (zbar_window_t *w) { /* FIXME this seems lame...there must be a better way */ Pixmap empty = XCreatePixmap(w->display, w->xwin, 1, 1, 1); GC gc = XCreateGC(w->display, empty, 0, NULL); XDrawPoint(w->display, empty, gc, 0, 0); XColor black; memset(&black, 0, sizeof(black)); int screen = DefaultScreen(w->display); black.pixel = BlackPixel(w->display, screen); Cursor cursor = XCreatePixmapCursor(w->display, empty, empty, &black, &black, 0, 0); XDefineCursor(w->display, w->xwin, cursor); XFreeCursor(w->display, cursor); XFreeGC(w->display, gc); XFreePixmap(w->display, empty); return(0); } int _zbar_window_resize (zbar_window_t *w) { window_state_t *x = w->state; if(!x) return(0); int lbw; if(w->height * 8 / 10 <= w->width) lbw = w->height / 36; else lbw = w->width * 5 / 144; if(lbw < 1) lbw = 1; x->logo_scale = lbw; if(x->logo_zbars) XDestroyRegion(x->logo_zbars); x->logo_zbars = XCreateRegion(); int x0 = w->width / 2; int y0 = w->height / 2; int by0 = y0 - 54 * lbw / 5; int bh = 108 * lbw / 5; static const int bx[5] = { -6, -3, -1, 2, 5 }; static const int bw[5] = { 1, 1, 2, 2, 1 }; int i; for(i = 0; i < 5; i++) { XRectangle *bar = &x->logo_bars[i]; bar->x = x0 + lbw * bx[i]; bar->y = by0; bar->width = lbw * bw[i]; bar->height = bh; XUnionRectWithRegion(bar, x->logo_zbars, x->logo_zbars); } static const int zx[4] = { -7, 7, -7, 7 }; static const int zy[4] = { -8, -8, 8, 8 }; for(i = 0; i < 4; i++) { x->logo_z[i].x = x0 + lbw * zx[i]; x->logo_z[i].y = y0 + lbw * zy[i]; } return(0); } int _zbar_window_attach (zbar_window_t *w, void *display, unsigned long win) { window_state_t *x = w->state; if(w->display) { /* cleanup existing resources */ if(x->gc) XFreeGC(w->display, x->gc); assert(!x->exposed); if(x->font) { XFreeFont(w->display, x->font); x->font = NULL; } if(x->logo_zbars) { XDestroyRegion(x->logo_zbars); x->logo_zbars = NULL; } if(x->exposed) { XDestroyRegion(x->exposed); x->exposed = NULL; } w->display = NULL; } w->xwin = 0; if(!display || !win) { if(x) { free(x); w->state = NULL; } return(0); } if(!x) x = w->state = calloc(1, sizeof(window_state_t)); w->display = display; w->xwin = win; x->gc = XCreateGC(display, win, 0, NULL); XWindowAttributes attr; XGetWindowAttributes(w->display, w->xwin, &attr); w->width = attr.width; w->height = attr.height; _zbar_window_resize(w); window_alloc_colors(w); window_hide_cursor(w); /* load overlay font */ x->font = XLoadQueryFont(w->display, ZBAR_OVERLAY_FONT); if(x->font) XSetFont(w->display, x->gc, x->font->fid); /* FIXME add interface preference override */ #ifdef HAVE_X11_EXTENSIONS_XVLIB_H if(!_zbar_window_probe_xv(w)) return(0); #endif zprintf(1, "falling back to XImage\n"); return(_zbar_window_probe_ximage(w)); } int _zbar_window_expose (zbar_window_t *w, int x, int y, int width, int height) { window_state_t *xs = w->state; if(!xs->exposed) xs->exposed = XCreateRegion(); XRectangle r; r.x = x; r.y = y; r.width = width; r.height = height; XUnionRectWithRegion(&r, xs->exposed, xs->exposed); return(0); } int _zbar_window_begin (zbar_window_t *w) { window_state_t *xs = w->state; if(xs->exposed) XSetRegion(w->display, xs->gc, xs->exposed); return(0); } int _zbar_window_end (zbar_window_t *w) { window_state_t *x = w->state; XSetClipMask(w->display, x->gc, None); if(x->exposed) { XDestroyRegion(x->exposed); x->exposed = NULL; } XFlush(w->display); return(0); } int _zbar_window_clear (zbar_window_t *w) { if(!w->display) return(0); window_state_t *x = w->state; int screen = DefaultScreen(w->display); XSetForeground(w->display, x->gc, WhitePixel(w->display, screen)); XFillRectangle(w->display, w->xwin, x->gc, 0, 0, w->width, w->height); return(0); } int _zbar_window_draw_polygon (zbar_window_t *w, uint32_t rgb, const point_t *pts, int npts) { window_state_t *xs = w->state; XSetForeground(w->display, xs->gc, xs->colors[rgb]); point_t org = w->scaled_offset; XPoint xpts[npts + 1]; int i; for(i = 0; i < npts; i++) { point_t p = window_scale_pt(w, pts[i]); xpts[i].x = p.x + org.x; xpts[i].y = p.y + org.y; } xpts[npts] = xpts[0]; XDrawLines(w->display, w->xwin, xs->gc, xpts, npts + 1, CoordModeOrigin); return(0); } int _zbar_window_draw_marker (zbar_window_t *w, uint32_t rgb, point_t p) { window_state_t *xs = w->state; XSetForeground(w->display, xs->gc, xs->colors[rgb]); XDrawRectangle(w->display, w->xwin, xs->gc, p.x - 2, p.y - 2, 4, 4); XDrawLine(w->display, w->xwin, xs->gc, p.x, p.y - 3, p.x, p.y + 3); XDrawLine(w->display, w->xwin, xs->gc, p.x - 3, p.y, p.x + 3, p.y); return(0); } int _zbar_window_draw_text (zbar_window_t *w, uint32_t rgb, point_t p, const char *text) { window_state_t *xs = w->state; if(!xs->font) return(-1); XSetForeground(w->display, xs->gc, xs->colors[rgb]); int n = 0; while(n < 32 && text[n] && isprint(text[n])) n++; int width = XTextWidth(xs->font, text, n); if(p.x >= 0) p.x -= width / 2; else p.x += w->width - width; int dy = xs->font->ascent + xs->font->descent; if(p.y >= 0) p.y -= dy / 2; else p.y = w->height + p.y * dy * 5 / 4; XDrawString(w->display, w->xwin, xs->gc, p.x, p.y, text, n); return(0); } int _zbar_window_fill_rect (zbar_window_t *w, uint32_t rgb, point_t org, point_t size) { window_state_t *xs = w->state; XSetForeground(w->display, xs->gc, xs->colors[rgb]); XFillRectangle(w->display, w->xwin, xs->gc, org.x, org.y, size.x, size.y); return(0); } int _zbar_window_draw_logo (zbar_window_t *w) { window_state_t *x = w->state; int screen = DefaultScreen(w->display); /* clear to white */ XSetForeground(w->display, x->gc, WhitePixel(w->display, screen)); XFillRectangle(w->display, w->xwin, x->gc, 0, 0, w->width, w->height); if(!x->logo_scale || !x->logo_zbars) return(0); XSetForeground(w->display, x->gc, BlackPixel(w->display, screen)); XFillRectangles(w->display, w->xwin, x->gc, x->logo_bars, 5); XSetLineAttributes(w->display, x->gc, 2 * x->logo_scale, LineSolid, CapRound, JoinRound); XSetForeground(w->display, x->gc, x->logo_colors[0]); XDrawLines(w->display, w->xwin, x->gc, x->logo_z, 4, CoordModeOrigin); if(x->exposed) { XIntersectRegion(x->logo_zbars, x->exposed, x->exposed); XSetRegion(w->display, x->gc, x->exposed); } else XSetRegion(w->display, x->gc, x->logo_zbars); XSetForeground(w->display, x->gc, x->logo_colors[1]); XDrawLines(w->display, w->xwin, x->gc, x->logo_z, 4, CoordModeOrigin); /* reset GC */ XSetLineAttributes(w->display, x->gc, 0, LineSolid, CapButt, JoinMiter); return(0); } zbar-0.23/zbar/window/dib.c0000664000175000017500000000446613466560613012512 00000000000000/*------------------------------------------------------------------------ * Copyright 2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "window.h" #include "image.h" #include "win.h" static int dib_cleanup (zbar_window_t *w) { return(0); } static int dib_init (zbar_window_t *w, zbar_image_t *img, int new_format) { if(new_format) _zbar_window_bih_init(w, img); window_state_t *win = w->state; w->dst_width = win->bih.biWidth = (img->width + 3) & ~3; w->dst_height = win->bih.biHeight = img->height; return(0); } static int dib_draw (zbar_window_t *w, zbar_image_t *img) { StretchDIBits(w->state->hdc, w->scaled_offset.x, w->scaled_offset.y + w->scaled_size.y - 1, w->scaled_size.x, -w->scaled_size.y, 0, 0, w->src_width, w->src_height, (void*)img->data, (BITMAPINFO*)&w->state->bih, DIB_RGB_COLORS, SRCCOPY); return(0); } static uint32_t dib_formats[] = { fourcc('B','G','R','3'), fourcc('B','G','R','4'), fourcc('J','P','E','G'), 0 }; int _zbar_window_dib_init (zbar_window_t *w) { uint32_t *fmt; for(fmt = dib_formats; *fmt; fmt++) _zbar_window_add_format(w, *fmt); w->init = dib_init; w->draw_image = dib_draw; w->cleanup = dib_cleanup; return(0); } zbar-0.23/zbar/window/win.h0000664000175000017500000000274013466560613012547 00000000000000/*------------------------------------------------------------------------ * Copyright 2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _WINDOW_WIN_H_ #define _WINDOW_WIN_H_ #include struct window_state_s { HDC hdc; void* hdd; BITMAPINFOHEADER bih; /* pre-calculated logo geometries */ int logo_scale; HRGN logo_zbars; HPEN logo_zpen, logo_zbpen; POINT logo_z[4]; int font_height; }; extern int _zbar_window_bih_init(zbar_window_t *w, zbar_image_t *img); #endif zbar-0.23/zbar/window/win.c0000664000175000017500000002175713466560613012553 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "window.h" #include "image.h" #include "win.h" #include int _zbar_window_vfw_init(zbar_window_t *w); int _zbar_window_dib_init(zbar_window_t *w); int _zbar_window_resize (zbar_window_t *w) { window_state_t *win = w->state; int lbw; if(w->height * 8 / 10 <= w->width) lbw = w->height / 36; else lbw = w->width * 5 / 144; if(lbw < 1) lbw = 1; win->logo_scale = lbw; zprintf(7, "%dx%d scale=%d\n", w->width, w->height, lbw); if(win->logo_zbars) { DeleteObject(win->logo_zbars); win->logo_zbars = NULL; } if(win->logo_zpen) DeleteObject(win->logo_zpen); if(win->logo_zbpen) DeleteObject(win->logo_zbpen); LOGBRUSH lb = { 0, }; lb.lbStyle = BS_SOLID; lb.lbColor = RGB(0xd7, 0x33, 0x33); win->logo_zpen = ExtCreatePen(PS_GEOMETRIC | PS_SOLID | PS_ENDCAP_ROUND | PS_JOIN_ROUND, lbw * 2, &lb, 0, NULL); lb.lbColor = RGB(0xa4, 0x00, 0x00); win->logo_zbpen = ExtCreatePen(PS_GEOMETRIC | PS_SOLID | PS_ENDCAP_ROUND | PS_JOIN_ROUND, lbw * 2, &lb, 0, NULL); int x0 = w->width / 2; int y0 = w->height / 2; int by0 = y0 - 54 * lbw / 5; int bh = 108 * lbw / 5; static const int bx[5] = { -6, -3, -1, 2, 5 }; static const int bw[5] = { 1, 1, 2, 2, 1 }; int i; for(i = 0; i < 5; i++) { int x = x0 + lbw * bx[i]; HRGN bar = CreateRectRgn(x, by0, x + lbw * bw[i], by0 + bh); if(win->logo_zbars) { CombineRgn(win->logo_zbars, win->logo_zbars, bar, RGN_OR); DeleteObject(bar); } else win->logo_zbars = bar; } static const int zx[4] = { -7, 7, -7, 7 }; static const int zy[4] = { -8, -8, 8, 8 }; for(i = 0; i < 4; i++) { win->logo_z[i].x = x0 + lbw * zx[i]; win->logo_z[i].y = y0 + lbw * zy[i]; } return(0); } int _zbar_window_attach (zbar_window_t *w, void *display, unsigned long unused) { window_state_t *win = w->state; if(w->display) { /* FIXME cleanup existing resources */ w->display = NULL; } if(!display) { if(win) { free(win); w->state = NULL; } return(0); } if(!win) win = w->state = calloc(1, sizeof(window_state_t)); w->display = display; win->bih.biSize = sizeof(win->bih); win->bih.biPlanes = 1; HDC hdc = GetDC(w->display); if(!hdc) return(-1/*FIXME*/); win->bih.biXPelsPerMeter = 1000L * GetDeviceCaps(hdc, HORZRES) / GetDeviceCaps(hdc, HORZSIZE); win->bih.biYPelsPerMeter = 1000L * GetDeviceCaps(hdc, VERTRES) / GetDeviceCaps(hdc, VERTSIZE); int height = -MulDiv(11, GetDeviceCaps(hdc, LOGPIXELSY), 96); HFONT font = CreateFontW(height, 0, 0, 0, 0, 0, 0, 0, ANSI_CHARSET, 0, 0, 0, FF_MODERN | FIXED_PITCH, NULL); SelectObject(hdc, font); DeleteObject(font); TEXTMETRIC tm; GetTextMetrics(hdc, &tm); win->font_height = tm.tmHeight; ReleaseDC(w->display, hdc); return(_zbar_window_dib_init(w)); } int _zbar_window_begin (zbar_window_t *w) { HDC hdc = w->state->hdc = GetDC(w->display); if(!hdc || !SaveDC(hdc)) return(-1/*FIXME*/); return(0); } int _zbar_window_end (zbar_window_t *w) { HDC hdc = w->state->hdc; w->state->hdc = NULL; RestoreDC(hdc, -1); ReleaseDC(w->display, hdc); ValidateRect(w->display, NULL); return(0); } int _zbar_window_clear (zbar_window_t *w) { HDC hdc = GetDC(w->display); if(!hdc) return(-1/*FIXME*/); RECT r = { 0, 0, w->width, w->height }; FillRect(hdc, &r, GetStockObject(BLACK_BRUSH)); ReleaseDC(w->display, hdc); ValidateRect(w->display, NULL); return(0); } static inline void win_set_rgb (HDC hdc, uint32_t rgb) { SelectObject(hdc, GetStockObject(DC_PEN)); SetDCPenColor(hdc, RGB((rgb & 4) * 0x33, (rgb & 2) * 0x66, (rgb & 1) * 0xcc)); } int _zbar_window_draw_polygon (zbar_window_t *w, uint32_t rgb, const point_t *pts, int npts) { HDC hdc = w->state->hdc; win_set_rgb(hdc, rgb); point_t org = w->scaled_offset; POINT gdipts[npts + 1]; int i; for(i = 0; i < npts; i++) { point_t p = window_scale_pt(w, pts[i]); gdipts[i].x = p.x + org.x; gdipts[i].y = p.y + org.y; } gdipts[npts] = gdipts[0]; Polyline(hdc, gdipts, npts + 1); return(0); } int _zbar_window_draw_marker (zbar_window_t *w, uint32_t rgb, point_t p) { HDC hdc = w->state->hdc; win_set_rgb(hdc, rgb); static const DWORD npolys[3] = { 5, 2, 2 }; POINT polys[9] = { { p.x - 2, p.y - 2 }, { p.x - 2, p.y + 2 }, { p.x + 2, p.y + 2 }, { p.x + 2, p.y - 2 }, { p.x - 2, p.y - 2 }, { p.x - 3, p.y }, { p.x + 4, p.y }, { p.x, p.y - 3 }, { p.x, p.y + 4 }, }; PolyPolyline(hdc, polys, npolys, 3); return(0); } int _zbar_window_draw_text (zbar_window_t *w, uint32_t rgb, point_t p, const char *text) { HDC hdc = w->state->hdc; SetTextColor(hdc, RGB((rgb & 4) * 0x33, (rgb & 2) * 0x66, (rgb & 1) * 0xcc)); SetBkMode(hdc, TRANSPARENT); int n = 0; while(n < 32 && text[n] && isprint(text[n])) n++; if(p.x >= 0) SetTextAlign(hdc, TA_BASELINE | TA_CENTER); else { SetTextAlign(hdc, TA_BASELINE | TA_RIGHT); p.x += w->width; } if(p.y < 0) p.y = w->height + p.y * w->state->font_height * 5 / 4; TextOut(hdc, p.x, p.y, text, n); return(0); } int _zbar_window_fill_rect (zbar_window_t *w, uint32_t rgb, point_t org, point_t size) { HDC hdc = w->state->hdc; SetDCBrushColor(hdc, RGB((rgb & 4) * 0x33, (rgb & 2) * 0x66, (rgb & 1) * 0xcc)); RECT r = { org.x, org.y, org.x + size.x, org.y + size.y }; FillRect(hdc, &r, GetStockObject(DC_BRUSH)); return(0); } int _zbar_window_draw_logo (zbar_window_t *w) { HDC hdc = w->state->hdc; window_state_t *win = w->state; /* FIXME buffer offscreen */ HRGN rgn = CreateRectRgn(0, 0, w->width, w->height); CombineRgn(rgn, rgn, win->logo_zbars, RGN_DIFF); FillRgn(hdc, rgn, GetStockObject(WHITE_BRUSH)); DeleteObject(rgn); FillRgn(hdc, win->logo_zbars, GetStockObject(BLACK_BRUSH)); SelectObject(hdc, win->logo_zpen); Polyline(hdc, win->logo_z, 4); ExtSelectClipRgn(hdc, win->logo_zbars, RGN_AND); SelectObject(hdc, win->logo_zbpen); Polyline(hdc, win->logo_z, 4); return(0); } int _zbar_window_bih_init (zbar_window_t *w, zbar_image_t *img) { window_state_t *win = w->state; switch(w->format) { case fourcc('J','P','E','G'): { win->bih.biBitCount = 0; win->bih.biCompression = BI_JPEG; break; } case fourcc('B','G','R','3'): { win->bih.biBitCount = 24; win->bih.biCompression = BI_RGB; break; } case fourcc('B','G','R','4'): { win->bih.biBitCount = 32; win->bih.biCompression = BI_RGB; break; } default: assert(0); /* FIXME PNG? */ } win->bih.biSizeImage = img->datalen; zprintf(20, "biCompression=%d biBitCount=%d\n", (int)win->bih.biCompression, win->bih.biBitCount); return(0); } zbar-0.23/zbar/decoder/0000775000175000017500000000000013471606255011753 500000000000000zbar-0.23/zbar/decoder/sq_finder.c0000664000175000017500000000022213471225716014004 00000000000000#include "sq_finder.h" #include "decoder.h" unsigned _zbar_decoder_get_sq_finder_config(zbar_decoder_t *dcode) { return dcode->sqf.config; } zbar-0.23/zbar/decoder/code39.h0000664000175000017500000000357713466560613013147 00000000000000/*------------------------------------------------------------------------ * Copyright 2008-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _CODE39_H_ #define _CODE39_H_ /* Code 39 specific decode state */ typedef struct code39_decoder_s { unsigned direction : 1; /* scan direction: 0=fwd, 1=rev */ unsigned element : 4; /* element offset 0-8 */ int character : 12; /* character position in symbol */ unsigned s9; /* current character width */ unsigned width; /* last character width */ unsigned config; int configs[NUM_CFGS]; /* int valued configurations */ } code39_decoder_t; /* reset Code 39 specific state */ static inline void code39_reset (code39_decoder_t *dcode39) { dcode39->direction = 0; dcode39->element = 0; dcode39->character = -1; dcode39->s9 = 0; } /* decode Code 39 symbols */ zbar_symbol_type_t _zbar_decode_code39(zbar_decoder_t *dcode); #endif zbar-0.23/zbar/decoder/pdf417.h0000664000175000017500000000347613466560613013064 00000000000000/*------------------------------------------------------------------------ * Copyright 2008-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _PDF417_H_ #define _PDF417_H_ /* PDF417 specific decode state */ typedef struct pdf417_decoder_s { unsigned direction : 1; /* scan direction: 0=fwd/space, 1=rev/bar */ unsigned element : 3; /* element offset 0-7 */ int character : 12; /* character position in symbol */ unsigned s8; /* character width */ unsigned config; int configs[NUM_CFGS]; /* int valued configurations */ } pdf417_decoder_t; /* reset PDF417 specific state */ static inline void pdf417_reset (pdf417_decoder_t *pdf417) { pdf417->direction = 0; pdf417->element = 0; pdf417->character = -1; pdf417->s8 = 0; } /* decode PDF417 symbols */ zbar_symbol_type_t _zbar_decode_pdf417(zbar_decoder_t *dcode); #endif zbar-0.23/zbar/decoder/code93.h0000664000175000017500000000354713471225700013133 00000000000000/*------------------------------------------------------------------------ * Copyright 2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _CODE93_H_ #define _CODE93_H_ /* Code 93 specific decode state */ typedef struct code93_decoder_s { unsigned direction : 1; /* scan direction: 0=fwd/space, 1=rev/bar */ unsigned element : 3; /* element offset 0-5 */ int character : 12; /* character position in symbol */ unsigned width; /* last character width */ unsigned char buf; /* first character */ unsigned config; int configs[NUM_CFGS]; /* int valued configurations */ } code93_decoder_t; /* reset Code 93 specific state */ static inline void code93_reset (code93_decoder_t *dcode93) { dcode93->direction = 0; dcode93->element = 0; dcode93->character = -1; } /* decode Code 93 symbols */ zbar_symbol_type_t _zbar_decode_code93(zbar_decoder_t *dcode); #endif zbar-0.23/zbar/decoder/i25.h0000664000175000017500000000367413471225700012445 00000000000000/*------------------------------------------------------------------------ * Copyright 2008-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _I25_H_ #define _I25_H_ /* interleaved 2 of 5 specific decode state */ typedef struct i25_decoder_s { unsigned direction : 1; /* scan direction: 0=fwd/space, 1=rev/bar */ unsigned element : 4; /* element offset 0-8 */ int character : 12; /* character position in symbol */ unsigned s10; /* current character width */ unsigned width; /* last character width */ unsigned char buf[4]; /* initial scan buffer */ unsigned config; int configs[NUM_CFGS]; /* int valued configurations */ } i25_decoder_t; /* reset interleaved 2 of 5 specific state */ static inline void i25_reset (i25_decoder_t *i25) { i25->direction = 0; i25->element = 0; i25->character = -1; i25->s10 = 0; } /* decode interleaved 2 of 5 symbols */ zbar_symbol_type_t _zbar_decode_i25(zbar_decoder_t *dcode); #endif zbar-0.23/zbar/decoder/code93.c0000664000175000017500000002521313471225700013120 00000000000000/*------------------------------------------------------------------------ * Copyright 2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #include #ifdef DEBUG_CODE93 # define DEBUG_LEVEL (DEBUG_CODE93) #endif #include "debug.h" #include "decoder.h" static const signed char code93_hash[0x40] = { 0x0f, 0x2b, 0x30, 0x38, 0x13, 0x1b, 0x11, 0x2a, 0x0a, -1, 0x2f, 0x0f, 0x38, 0x38, 0x2f, 0x37, 0x24, 0x3a, 0x1b, 0x36, 0x18, 0x26, 0x02, 0x2c, 0x2b, 0x05, 0x21, 0x3b, 0x04, 0x15, 0x12, 0x0c, 0x00, 0x26, 0x23, 0x00, -1, 0x2e, 0x3f, 0x13, 0x2e, 0x36, -1, 0x08, 0x09, -1, 0x15, 0x14, -1, 0x00, 0x21, 0x3b, -1, 0x33, 0x00, -1, 0x2d, 0x0c, 0x1b, 0x0a, 0x3f, 0x3f, 0x29, 0x1c, }; static inline int check_width (unsigned cur, unsigned prev) { unsigned dw; if(prev > cur) dw = prev - cur; else dw = cur - prev; dw *= 4; return(dw > prev); } static inline int encode6 (zbar_decoder_t *dcode) { /* build edge signature of character */ unsigned s = dcode->s6; int sig = 0, i; dbprintf(2, " s=%d ", s); if(s < 9) return(-1); for(i = 6; --i > 0; ) { unsigned c = decode_e(pair_width(dcode, i), s, 9); if(c > 3) return(-1); sig = (sig << 2) | c; dbprintf(2, "%d", c); } dbprintf(2, " sig=%03x", sig); return(sig); } static inline int validate_sig (int sig) { int i, sum = 0, emin = 0, sig0 = 0, sig1 = 0; dbprintf(3, " sum=0"); for(i = 3; --i >= 0; ) { int e = sig & 3; sig >>= 2; sum = e - sum; sig1 <<= 4; sig1 += sum; dbprintf(3, "%d", sum); if(!i) break; e = sig & 3; sig >>= 2; sum = e - sum; sig0 <<= 4; if(emin > sum) emin = sum; sig0 += sum; dbprintf(3, "%d", sum); } dbprintf(3, " emin=%d sig=%03x/%03x", emin, sig1 & 0xfff, sig0 & 0xfff); emin = emin + (emin << 4) + (emin << 8); sig0 -= emin; sig1 += emin; dbprintf(3, "=%03x/%03x", sig1 & 0xfff, sig0 & 0xfff); return((sig0 | sig1) & 0x888); } static inline int decode6 (zbar_decoder_t *dcode) { int sig = encode6(dcode); int g0, g1, c; if(sig < 0 || (sig & 0x3) + ((sig >> 4) & 0x3) + ((sig >> 8) & 0x3) != 3 || validate_sig(sig)) return(-1); if(dcode->code93.direction) { /* reverse signature */ unsigned tmp = sig & 0x030; sig = ((sig & 0x3c0) >> 6) | ((sig & 0x00f) << 6); sig = ((sig & 0x30c) >> 2) | ((sig & 0x0c3) << 2) | tmp; } g0 = code93_hash[(sig - (sig >> 4)) & 0x3f]; g1 = code93_hash[((sig >> 2) - (sig >> 7)) & 0x3f]; zassert(g0 >= 0 && g1 >= 0, -1, "dir=%x sig=%03x g0=%03x g1=%03x %s\n", dcode->code93.direction, sig, g0, g1, _zbar_decoder_buf_dump(dcode->buf, dcode->code93.character)); c = (g0 + g1) & 0x3f; dbprintf(2, " g0=%x g1=%x c=%02x", g0, g1, c); return(c); } static inline zbar_symbol_type_t decode_start (zbar_decoder_t *dcode) { code93_decoder_t *dcode93 = &dcode->code93; unsigned dir, qz, s = dcode->s6; int c; dbprintf(2, " code93:"); c = encode6(dcode); if(c < 0 || (c != 0x00f && c != 0x0f0)) return(ZBAR_NONE); dir = (c >> 7); if(dir) { if(decode_e(pair_width(dcode, 0), s, 9)) return(ZBAR_NONE); qz = get_width(dcode, 8); } qz = get_width(dcode, 7); if(qz && qz < (s * 3) / 4) { dbprintf(2, " [invalid qz %d]", qz); return(ZBAR_NONE); } /* decoded valid start/stop - initialize state */ dcode93->direction = dir; dcode93->element = (!dir) ? 0 : 7; dcode93->character = 0; dcode93->width = s; dbprintf(2, " dir=%x [valid start]", dir); return(ZBAR_PARTIAL); } static inline zbar_symbol_type_t decode_abort (zbar_decoder_t *dcode, const char *reason) { code93_decoder_t *dcode93 = &dcode->code93; if(dcode93->character > 1) release_lock(dcode, ZBAR_CODE93); dcode93->character = -1; if(reason) dbprintf(1, " [%s]\n", reason); return(ZBAR_NONE); } static inline zbar_symbol_type_t check_stop (zbar_decoder_t *dcode) { code93_decoder_t *dcode93 = &dcode->code93; unsigned n = dcode93->character, s = dcode->s6; int max_len = CFG(*dcode93, ZBAR_CFG_MAX_LEN); if(n < 2 || n < CFG(*dcode93, ZBAR_CFG_MIN_LEN) || (max_len && n > max_len)) return(decode_abort(dcode, "invalid len")); if(dcode93->direction) { unsigned qz = get_width(dcode, 0); if(qz && qz < (s * 3) / 4) return(decode_abort(dcode, "invalid qz")); } else if(decode_e(pair_width(dcode, 0), s, 9)) /* FIXME forward-trailing QZ check */ return(decode_abort(dcode, "invalid stop")); return(ZBAR_CODE93); } #define CHKMOD (47) static inline int plusmod47 (int acc, int add) { acc += add; if(acc >= CHKMOD) acc -= CHKMOD; return(acc); } static inline int validate_checksums (zbar_decoder_t *dcode) { code93_decoder_t *dcode93 = &dcode->code93; unsigned d, i, n = dcode93->character; unsigned sum_c = 0, acc_c = 0, i_c = (n - 2) % 20; unsigned sum_k = 0, acc_k = 0, i_k = (n - 1) % 15; for(i = 0; i < n - 2; i++) { d = dcode->buf[(dcode93->direction) ? n - 1 - i : i]; if(!i_c--) { acc_c = 0; i_c = 19; } acc_c = plusmod47(acc_c, d); sum_c = plusmod47(sum_c, acc_c); if(!i_k--) { acc_k = 0; i_k = 14; } acc_k = plusmod47(acc_k, d); sum_k = plusmod47(sum_k, acc_k); } d = dcode->buf[(dcode93->direction) ? 1 : n - 2]; dbprintf(2, " C=%02x?=%02x", d, sum_c); if(d != sum_c) return(1); acc_k = plusmod47(acc_k, sum_c); sum_k = plusmod47(sum_k, acc_k); d = dcode->buf[(dcode93->direction) ? 0 : n - 1]; dbprintf(2, " K=%02x?=%02x", d, sum_k); if(d != sum_k) return(1); return(0); } /* resolve scan direction and convert to ASCII */ static inline int postprocess (zbar_decoder_t *dcode) { code93_decoder_t *dcode93 = &dcode->code93; unsigned i, j, n = dcode93->character; static const unsigned char code93_graph[] = "-. $/+%"; static const unsigned char code93_s2[] = "\x1b\x1c\x1d\x1e\x1f;<=>?[\\]^_{|}~\x7f\x00\x40`\x7f\x7f\x7f"; dbprintf(2, "\n postproc len=%d", n); dcode->direction = 1 - 2 * dcode93->direction; if(dcode93->direction) { /* reverse buffer */ dbprintf(2, " (rev)"); for(i = 0; i < n / 2; i++) { unsigned j = n - 1 - i; unsigned char d = dcode->buf[i]; dcode->buf[i] = dcode->buf[j]; dcode->buf[j] = d; } } n -= 2; for(i = 0, j = 0; i < n; ) { unsigned char d = dcode->buf[i++]; if(d < 0xa) d = '0' + d; else if(d < 0x24) d = 'A' + d - 0xa; else if(d < 0x2b) d = code93_graph[d - 0x24]; else { unsigned shift = d; zassert(shift < 0x2f, -1, "%s\n", _zbar_decoder_buf_dump(dcode->buf, dcode93->character)); d = dcode->buf[i++]; if(d < 0xa || d >= 0x24) return(1); d -= 0xa; switch(shift) { case 0x2b: d++; break; case 0x2c: d = code93_s2[d]; break; case 0x2d: d += 0x21; break; case 0x2e: d += 0x61; break; default: return(1); } } dcode->buf[j++] = d; } zassert(j < dcode->buf_alloc, 1, "j=%02x %s\n", j, _zbar_decoder_buf_dump(dcode->buf, dcode->code93.character)); dcode->buflen = j; dcode->buf[j] = '\0'; dcode->modifiers = 0; return(0); } zbar_symbol_type_t _zbar_decode_code93 (zbar_decoder_t *dcode) { code93_decoder_t *dcode93 = &dcode->code93; int c; if(dcode93->character < 0) { zbar_symbol_type_t sym; if(get_color(dcode) != ZBAR_BAR) return(ZBAR_NONE); sym = decode_start(dcode); dbprintf(2, "\n"); return(sym); } if(/* process every 6th element of active symbol */ ++dcode93->element != 6 || /* decode color based on direction */ get_color(dcode) == dcode93->direction) return(ZBAR_NONE); dcode93->element = 0; dbprintf(2, " code93[%c%02d+%x]:", (dcode93->direction) ? '<' : '>', dcode93->character, dcode93->element); if(check_width(dcode->s6, dcode93->width)) return(decode_abort(dcode, "width var")); c = decode6(dcode); if(c < 0) return(decode_abort(dcode, "aborted")); if(c == 0x2f) { if(!check_stop(dcode)) return(ZBAR_NONE); if(validate_checksums(dcode)) return(decode_abort(dcode, "checksum error")); if(postprocess(dcode)) return(decode_abort(dcode, "invalid encoding")); dbprintf(2, " [valid end]\n"); dbprintf(3, " %s\n", _zbar_decoder_buf_dump(dcode->buf, dcode93->character)); dcode93->character = -1; return(ZBAR_CODE93); } if(size_buf(dcode, dcode93->character + 1)) return(decode_abort(dcode, "overflow")); dcode93->width = dcode->s6; if(dcode93->character == 1) { /* lock shared resources */ if(acquire_lock(dcode, ZBAR_CODE93)) return(decode_abort(dcode, NULL)); dcode->buf[0] = dcode93->buf; } if(!dcode93->character) dcode93->buf = c; else dcode->buf[dcode93->character] = c; dcode93->character++; dbprintf(2, "\n"); return(ZBAR_NONE); } zbar-0.23/zbar/decoder/code39.c0000664000175000017500000002425613471225700013126 00000000000000/*------------------------------------------------------------------------ * Copyright 2008-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #include /* memmove */ #include #ifdef DEBUG_CODE39 # define DEBUG_LEVEL (DEBUG_CODE39) #endif #include "debug.h" #include "decoder.h" #define NUM_CHARS (0x2c) static const unsigned char code39_hi[32] = { 0x80 | 0x00, /* 2 next */ 0x40 | 0x02, /* 4 */ 0x80 | 0x06, /* 2 next */ 0xc0 | 0x08, /* 2 skip */ 0x40 | 0x0a, /* 4 */ 0x80 | 0x0e, /* 2 next */ 0xc0 | 0x10, /* 2 skip */ 0x00 | 0x12, /* direct */ 0x80 | 0x13, /* 2 next */ 0xc0 | 0x15, /* 2 skip */ 0x80 | 0x17, /* 2 next */ 0xff, 0xc0 | 0x19, /* 2 skip */ 0x00 | 0x1b, /* direct */ 0xff, 0xff, 0x40 | 0x1c, /* 4 */ 0x80 | 0x20, /* 2 next */ 0xc0 | 0x22, /* 2 skip */ 0x00 | 0x24, /* direct */ 0x80 | 0x25, /* 2 next */ 0xff, 0x00 | 0x27, /* direct */ 0xff, 0xc0 | 0x28, /* 2 skip */ 0x00 | 0x2a, /* direct */ 0xff, 0xff, 0x00 | 0x2b, /* direct */ 0xff, 0xff, 0xff, }; typedef struct char39_s { unsigned char chk, rev, fwd; } char39_t; static const char39_t code39_encodings[NUM_CHARS] = { { 0x07, 0x1a, 0x20 }, /* 00 */ { 0x0d, 0x10, 0x03 }, /* 01 */ { 0x13, 0x17, 0x22 }, /* 02 */ { 0x16, 0x1d, 0x23 }, /* 03 */ { 0x19, 0x0d, 0x05 }, /* 04 */ { 0x1c, 0x13, 0x06 }, /* 05 */ { 0x25, 0x07, 0x0c }, /* 06 */ { 0x2a, 0x2a, 0x27 }, /* 07 */ { 0x31, 0x04, 0x0e }, /* 08 */ { 0x34, 0x00, 0x0f }, /* 09 */ { 0x43, 0x15, 0x25 }, /* 0a */ { 0x46, 0x1c, 0x26 }, /* 0b */ { 0x49, 0x0b, 0x08 }, /* 0c */ { 0x4c, 0x12, 0x09 }, /* 0d */ { 0x52, 0x19, 0x2b }, /* 0e */ { 0x58, 0x0f, 0x00 }, /* 0f */ { 0x61, 0x02, 0x11 }, /* 10 */ { 0x64, 0x09, 0x12 }, /* 11 */ { 0x70, 0x06, 0x13 }, /* 12 */ { 0x85, 0x24, 0x16 }, /* 13 */ { 0x8a, 0x29, 0x28 }, /* 14 */ { 0x91, 0x21, 0x18 }, /* 15 */ { 0x94, 0x2b, 0x19 }, /* 16 */ { 0xa2, 0x28, 0x29 }, /* 17 */ { 0xa8, 0x27, 0x2a }, /* 18 */ { 0xc1, 0x1f, 0x1b }, /* 19 */ { 0xc4, 0x26, 0x1c }, /* 1a */ { 0xd0, 0x23, 0x1d }, /* 1b */ { 0x03, 0x14, 0x1e }, /* 1c */ { 0x06, 0x1b, 0x1f }, /* 1d */ { 0x09, 0x0a, 0x01 }, /* 1e */ { 0x0c, 0x11, 0x02 }, /* 1f */ { 0x12, 0x18, 0x21 }, /* 20 */ { 0x18, 0x0e, 0x04 }, /* 21 */ { 0x21, 0x01, 0x0a }, /* 22 */ { 0x24, 0x08, 0x0b }, /* 23 */ { 0x30, 0x05, 0x0d }, /* 24 */ { 0x42, 0x16, 0x24 }, /* 25 */ { 0x48, 0x0c, 0x07 }, /* 26 */ { 0x60, 0x03, 0x10 }, /* 27 */ { 0x81, 0x1e, 0x14 }, /* 28 */ { 0x84, 0x25, 0x15 }, /* 29 */ { 0x90, 0x22, 0x17 }, /* 2a */ { 0xc0, 0x20, 0x1a }, /* 2b */ }; static const unsigned char code39_characters[NUM_CHARS] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%*"; static inline unsigned char code39_decode1 (unsigned char enc, unsigned e, unsigned s) { unsigned char E = decode_e(e, s, 72); if(E > 18) return(0xff); enc <<= 1; if(E > 6) { enc |= 1; dbprintf(2, "1"); } else dbprintf(2, "0"); return(enc); } static inline signed char code39_decode9 (zbar_decoder_t *dcode) { code39_decoder_t *dcode39 = &dcode->code39; if(dcode39->s9 < 9) return(-1); /* threshold bar width ratios */ unsigned char i, enc = 0; for(i = 0; i < 5; i++) { enc = code39_decode1(enc, get_width(dcode, i), dcode39->s9); if(enc == 0xff) return(-1); } zassert(enc < 0x20, -1, " enc=%x s9=%x\n", enc, dcode39->s9); /* lookup first 5 encoded widths for coarse decode */ unsigned char idx = code39_hi[enc]; if(idx == 0xff) return(-1); /* encode remaining widths (NB first encoded width is lost) */ for(; i < 9; i++) { enc = code39_decode1(enc, get_width(dcode, i), dcode39->s9); if(enc == 0xff) return(-1); } if((idx & 0xc0) == 0x80) idx = (idx & 0x3f) + ((enc >> 3) & 1); else if((idx & 0xc0) == 0xc0) idx = (idx & 0x3f) + ((enc >> 2) & 1); else if(idx & 0xc0) idx = (idx & 0x3f) + ((enc >> 2) & 3); zassert(idx < 0x2c, -1, " idx=%x enc=%x s9=%x\n", idx, enc, dcode39->s9); const char39_t *c = &code39_encodings[idx]; dbprintf(2, " i=%02x chk=%02x c=%02x/%02x", idx, c->chk, c->fwd, c->rev); if(enc != c->chk) return(-1); dcode39->width = dcode39->s9; return((dcode39->direction) ? c->rev : c->fwd); } static inline signed char code39_decode_start (zbar_decoder_t *dcode) { code39_decoder_t *dcode39 = &dcode->code39; dbprintf(2, " s=%d ", dcode39->s9); signed char c = code39_decode9(dcode); if(c != 0x19 && c != 0x2b) { dbprintf(2, "\n"); return(ZBAR_NONE); } dcode39->direction ^= (c == 0x19); /* check leading quiet zone - spec is 10x */ unsigned quiet = get_width(dcode, 9); if(quiet && quiet < dcode39->s9 / 2) { dbprintf(2, " [invalid quiet]\n"); return(ZBAR_NONE); } dcode39->element = 9; dcode39->character = 0; dbprintf(1, " dir=%x [valid start]\n", dcode39->direction); return(ZBAR_PARTIAL); } static inline int code39_postprocess (zbar_decoder_t *dcode) { code39_decoder_t *dcode39 = &dcode->code39; dcode->direction = 1 - 2 * dcode39->direction; int i; if(dcode39->direction) { /* reverse buffer */ dbprintf(2, " (rev)"); for(i = 0; i < dcode39->character / 2; i++) { unsigned j = dcode39->character - 1 - i; char code = dcode->buf[i]; dcode->buf[i] = dcode->buf[j]; dcode->buf[j] = code; } } for(i = 0; i < dcode39->character; i++) dcode->buf[i] = ((dcode->buf[i] < 0x2b) ? code39_characters[(unsigned)dcode->buf[i]] : '?'); zassert(i < dcode->buf_alloc, -1, "i=%02x %s\n", i, _zbar_decoder_buf_dump(dcode->buf, dcode39->character)); dcode->buflen = i; dcode->buf[i] = '\0'; dcode->modifiers = 0; return(0); } static inline int check_width (unsigned ref, unsigned w) { unsigned dref = ref; ref *= 4; w *= 4; return(ref - dref <= w && w <= ref + dref); } zbar_symbol_type_t _zbar_decode_code39 (zbar_decoder_t *dcode) { code39_decoder_t *dcode39 = &dcode->code39; /* update latest character width */ dcode39->s9 -= get_width(dcode, 9); dcode39->s9 += get_width(dcode, 0); if(dcode39->character < 0) { if(get_color(dcode) != ZBAR_BAR) return(ZBAR_NONE); dbprintf(2, " code39:"); return(code39_decode_start(dcode)); } if(++dcode39->element < 9) return(ZBAR_NONE); dbprintf(2, " code39[%c%02d+%x]", (dcode39->direction) ? '<' : '>', dcode39->character, dcode39->element); if(dcode39->element == 10) { unsigned space = get_width(dcode, 0); if(dcode39->character && dcode->buf[dcode39->character - 1] == 0x2b) { /* STOP */ /* trim STOP character */ dcode39->character--; zbar_symbol_type_t sym = ZBAR_NONE; /* trailing quiet zone check */ if(space && space < dcode39->width / 2) dbprintf(2, " [invalid qz]\n"); else if(dcode39->character < CFG(*dcode39, ZBAR_CFG_MIN_LEN) || (CFG(*dcode39, ZBAR_CFG_MAX_LEN) > 0 && dcode39->character > CFG(*dcode39, ZBAR_CFG_MAX_LEN))) dbprintf(2, " [invalid len]\n"); else if(!code39_postprocess(dcode)) { /* FIXME checksum */ dbprintf(2, " [valid end]\n"); sym = ZBAR_CODE39; } dcode39->character = -1; if(!sym) release_lock(dcode, ZBAR_CODE39); return(sym); } if(space > dcode39->width / 2) { /* inter-character space check failure */ dbprintf(2, " ics>%d [invalid ics]", dcode39->width); if(dcode39->character) release_lock(dcode, ZBAR_CODE39); dcode39->character = -1; } dcode39->element = 0; dbprintf(2, "\n"); return(ZBAR_NONE); } dbprintf(2, " s=%d ", dcode39->s9); if(!check_width(dcode39->width, dcode39->s9)) { dbprintf(2, " [width]\n"); if(dcode39->character) release_lock(dcode, ZBAR_CODE39); dcode39->character = -1; return(ZBAR_NONE); } signed char c = code39_decode9(dcode); dbprintf(2, " c=%d", c); /* lock shared resources */ if(!dcode39->character && acquire_lock(dcode, ZBAR_CODE39)) { dcode39->character = -1; return(ZBAR_PARTIAL); } if(c < 0 || size_buf(dcode, dcode39->character + 1)) { dbprintf(1, (c < 0) ? " [aborted]\n" : " [overflow]\n"); release_lock(dcode, ZBAR_CODE39); dcode39->character = -1; return(ZBAR_NONE); } else { zassert(c < 0x2c, ZBAR_NONE, "c=%02x s9=%x\n", c, dcode39->s9); dbprintf(2, "\n"); } dcode->buf[dcode39->character++] = c; return(ZBAR_NONE); } zbar-0.23/zbar/decoder/qr_finder.c0000664000175000017500000000631313471225700014003 00000000000000/*------------------------------------------------------------------------ * Copyright 2009-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #include #include #ifdef DEBUG_QR_FINDER # define DEBUG_LEVEL (DEBUG_QR_FINDER) #endif #include "debug.h" #include "decoder.h" /* at this point lengths are all decode unit offsets from the decode edge * NB owned by finder */ qr_finder_line *_zbar_decoder_get_qr_finder_line (zbar_decoder_t *dcode) { return(&dcode->qrf.line); } zbar_symbol_type_t _zbar_find_qr (zbar_decoder_t *dcode) { qr_finder_t *qrf = &dcode->qrf; unsigned s, qz, w; int ei; /* update latest finder pattern width */ qrf->s5 -= get_width(dcode, 6); qrf->s5 += get_width(dcode, 1); s = qrf->s5; /*TODO: The 2005 standard allows reflectance-reversed codes (light on dark instead of dark on light). If we find finder patterns with the opposite polarity, we should invert the final binarized image and use them to search for QR codes in that.*/ if(get_color(dcode) != ZBAR_SPACE || s < 7) return(0); dbprintf(2, " qrf: s=%d", s); ei = decode_e(pair_width(dcode, 1), s, 7); dbprintf(2, " %d", ei); if(ei) goto invalid; ei = decode_e(pair_width(dcode, 2), s, 7); dbprintf(2, "%d", ei); if(ei != 2) goto invalid; ei = decode_e(pair_width(dcode, 3), s, 7); dbprintf(2, "%d", ei); if(ei != 2) goto invalid; ei = decode_e(pair_width(dcode, 4), s, 7); dbprintf(2, "%d", ei); if(ei) goto invalid; /* valid QR finder symbol * mark positions needed by decoder */ qz = get_width(dcode, 0); w = get_width(dcode, 1); qrf->line.eoffs = qz + (w + 1) / 2; qrf->line.len = qz + w + get_width(dcode, 2); qrf->line.pos[0] = qrf->line.len + get_width(dcode, 3); qrf->line.pos[1] = qrf->line.pos[0]; w = get_width(dcode, 5); qrf->line.boffs = qrf->line.pos[0] + get_width(dcode, 4) + (w + 1) / 2; dbprintf(2, " boff=%d pos=%d len=%d eoff=%d [valid]\n", qrf->line.boffs, qrf->line.pos[0], qrf->line.len, qrf->line.eoffs); dcode->direction = 0; dcode->buflen = 0; return(ZBAR_QRCODE); invalid: dbprintf(2, " [invalid]\n"); return(0); } zbar-0.23/zbar/decoder/qr_finder.h0000664000175000017500000000100613466560613014013 00000000000000#ifndef _DECODER_QR_FINDER_H_ #define _DECODER_QR_FINDER_H_ #include "qrcode.h" /* QR Code symbol finder state */ typedef struct qr_finder_s { unsigned s5; /* finder pattern width */ qr_finder_line line; /* position info needed by decoder */ unsigned config; } qr_finder_t; /* reset QR finder specific state */ static inline void qr_finder_reset (qr_finder_t *qrf) { qrf->s5 = 0; } /* find QR Code symbols */ zbar_symbol_type_t _zbar_find_qr (zbar_decoder_t *dcode); #endif zbar-0.23/zbar/decoder/ean.c0000664000175000017500000006207513471225716012613 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #include #ifdef DEBUG_EAN # define DEBUG_LEVEL (DEBUG_EAN) #endif #include "debug.h" #include "decoder.h" /* partial decode symbol location */ typedef enum symbol_partial_e { EAN_LEFT = 0x0000, EAN_RIGHT = 0x1000, } symbol_partial_t; /* convert compact encoded D2E1E2 to character (bit4 is parity) */ static const unsigned char digits[] = { /* E1 E2 */ 0x06, 0x10, 0x04, 0x13, /* 2 2-5 */ 0x19, 0x08, 0x11, 0x05, /* 3 2-5 (d2 <= thr) */ 0x09, 0x12, 0x07, 0x15, /* 4 2-5 (d2 <= thr) */ 0x16, 0x00, 0x14, 0x03, /* 5 2-5 */ 0x18, 0x01, 0x02, 0x17, /* E1E2=43,44,33,34 (d2 > thr) */ }; static const unsigned char parity_decode[] = { 0xf0, /* [xx] BBBBBB = RIGHT half EAN-13 */ /* UPC-E check digit encoding */ 0xff, 0xff, 0x0f, /* [07] BBBAAA = 0 */ 0xff, 0x1f, /* [0b] BBABAA = 1 */ 0x2f, /* [0d] BBAABA = 2 */ 0xf3, /* [0e] BBAAAB = 3 */ 0xff, 0x4f, /* [13] BABBAA = 4 */ 0x7f, /* [15] BABABA = 7 */ 0xf8, /* [16] BABAAB = 8 */ 0x5f, /* [19] BAABBA = 5 */ 0xf9, /* [1a] BAABAB = 9 */ 0xf6, /* [1c] BAAABB = 6 */ 0xff, /* LEFT half EAN-13 leading digit */ 0xff, 0x6f, /* [23] ABBBAA = 6 */ 0x9f, /* [25] ABBABA = 9 */ 0xf5, /* [26] ABBAAB = 5 */ 0x8f, /* [29] ABABBA = 8 */ 0xf7, /* [2a] ABABAB = 7 */ 0xf4, /* [2c] ABAABB = 4 */ 0xff, 0x3f, /* [31] AABBBA = 3 */ 0xf2, /* [32] AABBAB = 2 */ 0xf1, /* [34] AABABB = 1 */ 0xff, 0xff, 0xff, 0xff, 0x0f, /* [3f] AAAAAA = 0 */ }; #ifdef DEBUG_EAN static unsigned char debug_buf[0x18]; static inline const unsigned char *dsprintbuf(ean_decoder_t *ean) { int i; for(i = 0; i < 7; i++) debug_buf[i] = ((ean->buf[0] < 0 || ean->buf[i] < 0) ? '-' : ean->buf[i] + '0'); debug_buf[i] = ' '; for(; i < 13; i++) debug_buf[i + 1] = ((ean->buf[7] < 0 || ean->buf[i] < 0) ? '-' : ean->buf[i] + '0'); debug_buf[i + 1] = ' '; for(; i < 18; i++) debug_buf[i + 2] = ((ean->buf[13] < 0 || ean->buf[i] < 0) ? '-' : ean->buf[i] + '0'); debug_buf[i + 2] = '\0'; return(debug_buf); } #endif static inline int check_width (unsigned w0, unsigned w1) { unsigned dw0 = w0; w0 *= 8; w1 *= 8; return(w0 - dw0 <= w1 && w1 <= w0 + dw0); } /* evaluate previous N (>= 2) widths as auxiliary pattern, * using preceding 4 as character width */ static inline signed char aux_end (zbar_decoder_t *dcode, unsigned char fwd) { signed char code, i; /* reference width from previous character */ unsigned s = calc_s(dcode, 4 + fwd, 4); /* check quiet zone */ unsigned qz = get_width(dcode, 0); if(!fwd && qz && qz <= s * 3 / 4) { dbprintf(2, " [invalid quiet]"); return(-1); } dbprintf(2, " ("); code = 0; for(i = 1 - fwd; i < 3 + fwd; i++) { unsigned e = get_width(dcode, i) + get_width(dcode, i + 1); dbprintf(2, " %d", e); code = (code << 2) | decode_e(e, s, 7); if(code < 0) { dbprintf(2, " [invalid end guard]"); return(-1); } } dbprintf(2, ") s=%d aux=%x", s, code); return(code); } /* determine possible auxiliary pattern * using current 4 as possible character */ static inline signed char aux_start (zbar_decoder_t *dcode) { /* FIXME NB add-on has no guard in reverse */ unsigned e1, e2 = get_width(dcode, 5) + get_width(dcode, 6); unsigned char E1; if(dcode->ean.s4 < 6) return(-1); if(decode_e(e2, dcode->ean.s4, 7)) { dbprintf(2, " [invalid any]"); return(-1); } e1 = get_width(dcode, 4) + get_width(dcode, 5); E1 = decode_e(e1, dcode->ean.s4, 7); if(get_color(dcode) == ZBAR_BAR) { /* check for quiet-zone */ unsigned qz = get_width(dcode, 7); if(!qz || qz > dcode->ean.s4 * 3 / 4) { if(!E1) { dbprintf(2, " [valid normal]"); return(0); /* normal symbol start */ } else if(E1 == 1) { dbprintf(2, " [valid add-on]"); return(STATE_ADDON); /* add-on symbol start */ } } dbprintf(2, " [invalid start]"); return(-1); } if(!E1) { /* attempting decode from SPACE => validate center guard */ unsigned e3 = get_width(dcode, 6) + get_width(dcode, 7); unsigned e4 = get_width(dcode, 7) + get_width(dcode, 8); if(!decode_e(e3, dcode->ean.s4, 7) && !decode_e(e4, dcode->ean.s4, 7)) { dbprintf(2, " [valid center]"); return(0); /* start after center guard */ } } dbprintf(2, " [invalid center]"); return(-1); } /* check addon delimiter using current 4 as character */ static inline signed char aux_mid (zbar_decoder_t *dcode) { unsigned e = get_width(dcode, 4) + get_width(dcode, 5); return(decode_e(e, dcode->ean.s4, 7)); } /* attempt to decode previous 4 widths (2 bars and 2 spaces) as a character */ static inline signed char decode4 (zbar_decoder_t *dcode) { signed char code; /* calculate similar edge measurements */ unsigned e1 = ((get_color(dcode) == ZBAR_BAR) ? get_width(dcode, 0) + get_width(dcode, 1) : get_width(dcode, 2) + get_width(dcode, 3)); unsigned e2 = get_width(dcode, 1) + get_width(dcode, 2); dbprintf(2, "\n e1=%d e2=%d", e1, e2); if(dcode->ean.s4 < 6) return(-1); /* create compacted encoding for direct lookup */ code = ((decode_e(e1, dcode->ean.s4, 7) << 2) | decode_e(e2, dcode->ean.s4, 7)); if(code < 0) return(-1); dbprintf(2, " code=%x", code); /* 4 combinations require additional determinant (D2) E1E2 == 34 (0110) E1E2 == 43 (1001) E1E2 == 33 (0101) E1E2 == 44 (1010) */ if((1 << code) & 0x0660) { unsigned char mid, alt; /* use sum of bar widths */ unsigned d2 = ((get_color(dcode) == ZBAR_BAR) ? get_width(dcode, 0) + get_width(dcode, 2) : get_width(dcode, 1) + get_width(dcode, 3)); d2 *= 7; mid = (((1 << code) & 0x0420) ? 3 /* E1E2 in 33,44 */ : 4); /* E1E2 in 34,43 */ alt = d2 > (mid * dcode->ean.s4); if(alt) code = ((code >> 1) & 3) | 0x10; /* compress code space */ dbprintf(2, " (d2=%d(%d) alt=%d)", d2, mid * dcode->ean.s4, alt); } dbprintf(2, " char=%02x", digits[(unsigned char)code]); zassert(code < 0x14, -1, "code=%02x e1=%x e2=%x s4=%x color=%x\n", code, e1, e2, dcode->ean.s4, get_color(dcode)); return(code); } static inline char ean_part_end2 (ean_decoder_t *ean, ean_pass_t *pass) { if(!TEST_CFG(ean->ean2_config, ZBAR_CFG_ENABLE)) return(ZBAR_NONE); /* extract parity bits */ unsigned char par = ((pass->raw[1] & 0x10) >> 3 | (pass->raw[2] & 0x10) >> 4); /* calculate "checksum" */ unsigned char chk = ~((pass->raw[1] & 0xf) * 10 + (pass->raw[2] & 0xf)) & 0x3; dbprintf(2, " par=%x chk=%x", par, chk); if(par != chk) return(ZBAR_NONE); dbprintf(2, "\n"); dbprintf(1, "decode2=%x%x\n", pass->raw[1] & 0xf, pass->raw[2] & 0xf); return(ZBAR_EAN2); } static inline zbar_symbol_type_t ean_part_end4 (ean_pass_t *pass, unsigned char fwd) { /* extract parity bits */ unsigned char par = ((pass->raw[1] & 0x10) >> 1 | (pass->raw[2] & 0x10) >> 2 | (pass->raw[3] & 0x10) >> 3 | (pass->raw[4] & 0x10) >> 4); dbprintf(2, " par=%x", par); if(par && par != 0xf) /* invalid parity combination */ return(ZBAR_NONE); if((!par) == fwd) { /* reverse sampled digits */ unsigned char tmp = pass->raw[1]; pass->state |= STATE_REV; pass->raw[1] = pass->raw[4]; pass->raw[4] = tmp; tmp = pass->raw[2]; pass->raw[2] = pass->raw[3]; pass->raw[3] = tmp; } dbprintf(2, "\n"); dbprintf(1, "decode4=%x%x%x%x\n", pass->raw[1] & 0xf, pass->raw[2] & 0xf, pass->raw[3] & 0xf, pass->raw[4] & 0xf); if(!par) return(ZBAR_EAN8 | EAN_RIGHT); return(ZBAR_EAN8 | EAN_LEFT); } static inline char ean_part_end5 (ean_decoder_t *ean, ean_pass_t *pass) { if(!TEST_CFG(ean->ean5_config, ZBAR_CFG_ENABLE)) return(ZBAR_NONE); /* extract parity bits */ unsigned char par = ((pass->raw[1] & 0x10) | (pass->raw[2] & 0x10) >> 1 | (pass->raw[3] & 0x10) >> 2 | (pass->raw[4] & 0x10) >> 3 | (pass->raw[5] & 0x10) >> 4); /* calculate checksum */ unsigned char chk = (((pass->raw[1] & 0x0f) + (pass->raw[2] & 0x0f) * 3 + (pass->raw[3] & 0x0f) + (pass->raw[4] & 0x0f) * 3 + (pass->raw[5] & 0x0f)) * 3) % 10; unsigned char parchk = parity_decode[par >> 1]; if(par & 1) parchk >>= 4; parchk &= 0xf; dbprintf(2, " par=%x(%d) chk=%d", par, parchk, chk); if(parchk != chk) return(ZBAR_NONE); dbprintf(2, "\n"); dbprintf(1, "decode5=%x%x%x%x%x\n", pass->raw[1] & 0xf, pass->raw[2] & 0xf, pass->raw[3] & 0xf, pass->raw[4] & 0xf, pass->raw[5] & 0xf); return(ZBAR_EAN5); } static inline zbar_symbol_type_t ean_part_end7 (ean_decoder_t *ean, ean_pass_t *pass, unsigned char fwd) { /* calculate parity index */ unsigned char par = ((fwd) ? ((pass->raw[1] & 0x10) << 1 | (pass->raw[2] & 0x10) | (pass->raw[3] & 0x10) >> 1 | (pass->raw[4] & 0x10) >> 2 | (pass->raw[5] & 0x10) >> 3 | (pass->raw[6] & 0x10) >> 4) : ((pass->raw[1] & 0x10) >> 4 | (pass->raw[2] & 0x10) >> 3 | (pass->raw[3] & 0x10) >> 2 | (pass->raw[4] & 0x10) >> 1 | (pass->raw[5] & 0x10) | (pass->raw[6] & 0x10) << 1)); /* lookup parity combination */ pass->raw[0] = parity_decode[par >> 1]; if(par & 1) pass->raw[0] >>= 4; pass->raw[0] &= 0xf; dbprintf(2, " par=%02x(%x)", par, pass->raw[0]); if(pass->raw[0] == 0xf) /* invalid parity combination */ return(ZBAR_NONE); if((!par) == fwd) { unsigned char i; pass->state |= STATE_REV; /* reverse sampled digits */ for(i = 1; i < 4; i++) { unsigned char tmp = pass->raw[i]; pass->raw[i] = pass->raw[7 - i]; pass->raw[7 - i] = tmp; } } dbprintf(2, "\n"); dbprintf(1, "decode=%x%x%x%x%x%x%x(%02x)\n", pass->raw[0] & 0xf, pass->raw[1] & 0xf, pass->raw[2] & 0xf, pass->raw[3] & 0xf, pass->raw[4] & 0xf, pass->raw[5] & 0xf, pass->raw[6] & 0xf, par); if(TEST_CFG(ean->ean13_config, ZBAR_CFG_ENABLE)) { if(!par) return(ZBAR_EAN13 | EAN_RIGHT); if(par & 0x20) return(ZBAR_EAN13 | EAN_LEFT); } if(par && !(par & 0x20)) return(ZBAR_UPCE); return(ZBAR_NONE); } /* update state for one of 4 parallel passes */ static inline zbar_symbol_type_t decode_pass (zbar_decoder_t *dcode, ean_pass_t *pass) { unsigned char idx, fwd; pass->state++; idx = pass->state & STATE_IDX; fwd = pass->state & 1; if(get_color(dcode) == ZBAR_SPACE) { if(pass->state & STATE_ADDON) { dbprintf(2, " i=%d", idx); if(idx == 0x09 || idx == 0x21) { unsigned qz = get_width(dcode, 0); unsigned s = calc_s(dcode, 1, 4); zbar_symbol_type_t part = !qz || (qz >= s * 3 / 4); if(part && idx == 0x09) part = ean_part_end2(&dcode->ean, pass); else if(part) part = ean_part_end5(&dcode->ean, pass); if(part || idx == 0x21) { dcode->ean.direction = 0; pass->state = -1; return(part); } } if((idx & 7) == 1) { dbprintf(2, " +"); pass->state += 2; idx += 2; } } else if((idx == 0x10 || idx == 0x11) && TEST_CFG(dcode->ean.ean8_config, ZBAR_CFG_ENABLE) && !aux_end(dcode, fwd)) { dbprintf(2, " fwd=%x", fwd); zbar_symbol_type_t part = ean_part_end4(pass, fwd); if(part) dcode->ean.direction = (pass->state & STATE_REV) != 0; pass->state = -1; return(part); } else if((idx == 0x18 || idx == 0x19)) { zbar_symbol_type_t part = ZBAR_NONE; dbprintf(2, " fwd=%x", fwd); if(!aux_end(dcode, fwd) && pass->raw[5] != 0xff) part = ean_part_end7(&dcode->ean, pass, fwd); if(part) dcode->ean.direction = (pass->state & STATE_REV) != 0; pass->state = -1; return(part); } } if(pass->state & STATE_ADDON) idx >>= 1; if(!(idx & 0x03) && idx <= 0x14) { signed char code = -1; unsigned w = pass->width; if(!dcode->ean.s4) return(0); /* validate guard bars before decoding first char of symbol */ if(!pass->state) { pass->state = aux_start(dcode); pass->width = dcode->ean.s4; if(pass->state < 0) return(0); idx = pass->state & STATE_IDX; } else { w = check_width(w, dcode->ean.s4); if(w) pass->width = (pass->width + dcode->ean.s4 * 3) / 4; } if(w) code = decode4(dcode); else dbprintf(2, " [bad width]"); if((code < 0 && idx != 0x10) || (idx > 0 && (pass->state & STATE_ADDON) && aux_mid(dcode))) pass->state = -1; else if(code < 0) pass->raw[5] = 0xff; else { dbprintf(2, "\n raw[%x]=%02x =>", idx >> 2, digits[(unsigned char)code]); pass->raw[(idx >> 2) + 1] = digits[(unsigned char)code]; dbprintf(2, " raw=%d%d%d%d%d%d%d", pass->raw[0] & 0xf, pass->raw[1] & 0xf, pass->raw[2] & 0xf, pass->raw[3] & 0xf, pass->raw[4] & 0xf, pass->raw[5] & 0xf, pass->raw[6] & 0xf); } } return(0); } static inline signed char ean_verify_checksum (ean_decoder_t *ean, int n) { unsigned char chk = 0; unsigned char i, d; for(i = 0; i < n; i++) { unsigned char d = ean->buf[i]; zassert(d < 10, -1, "i=%x d=%x chk=%x %s\n", i, d, chk, _zbar_decoder_buf_dump((void*)ean->buf, 18)); chk += d; if((i ^ n) & 1) { chk += d << 1; if(chk >= 20) chk -= 20; } if(chk >= 10) chk -= 10; } zassert(chk < 10, -1, "chk=%x n=%x %s", chk, n, _zbar_decoder_buf_dump((void*)ean->buf, 18)); if(chk) chk = 10 - chk; d = ean->buf[n]; zassert(d < 10, -1, "n=%x d=%x chk=%x %s\n", n, d, chk, _zbar_decoder_buf_dump((void*)ean->buf, 18)); if(chk != d) { dbprintf(1, "\nchecksum mismatch %d != %d (%s)\n", chk, d, dsprintbuf(ean)); return(-1); } return(0); } static inline unsigned char isbn10_calc_checksum (ean_decoder_t *ean) { unsigned int chk = 0; unsigned char w; for(w = 10; w > 1; w--) { unsigned char d = ean->buf[13 - w]; zassert(d < 10, '?', "w=%x d=%x chk=%x %s\n", w, d, chk, _zbar_decoder_buf_dump((void*)ean->buf, 18)); chk += d * w; } chk = chk % 11; if(!chk) return('0'); chk = 11 - chk; if(chk < 10) return(chk + '0'); return('X'); } static inline void ean_expand_upce (ean_decoder_t *ean, ean_pass_t *pass) { int i = 0; unsigned char decode; /* parity encoded digit is checksum */ ean->buf[12] = pass->raw[i++]; decode = pass->raw[6] & 0xf; ean->buf[0] = 0; ean->buf[1] = 0; ean->buf[2] = pass->raw[i++] & 0xf; ean->buf[3] = pass->raw[i++] & 0xf; ean->buf[4] = (decode < 3) ? decode : pass->raw[i++] & 0xf; ean->buf[5] = (decode < 4) ? 0 : pass->raw[i++] & 0xf; ean->buf[6] = (decode < 5) ? 0 : pass->raw[i++] & 0xf; ean->buf[7] = 0; ean->buf[8] = 0; ean->buf[9] = (decode < 3) ? pass->raw[i++] & 0xf : 0; ean->buf[10] = (decode < 4) ? pass->raw[i++] & 0xf : 0; ean->buf[11] = (decode < 5) ? pass->raw[i] & 0xf : decode; } static inline zbar_symbol_type_t integrate_partial (ean_decoder_t *ean, ean_pass_t *pass, zbar_symbol_type_t part) { /* copy raw data into holding buffer */ /* if same partial is not consistent, reset others */ dbprintf(2, " integrate part=%x (%s)", part, dsprintbuf(ean)); signed char i, j; if((ean->left && ((part & ZBAR_SYMBOL) != ean->left)) || (ean->right && ((part & ZBAR_SYMBOL) != ean->right))) { /* partial mismatch - reset collected parts */ dbprintf(2, " rst(type %x %x)", ean->left, ean->right); ean->left = ean->right = ZBAR_NONE; } if((ean->left || ean->right) && !check_width(ean->width, pass->width)) { dbprintf(2, " rst(width %d)", pass->width); ean->left = ean->right = ZBAR_NONE; } if(part & EAN_RIGHT) { part &= ZBAR_SYMBOL; j = part - 1; for(i = part >> 1; i; i--, j--) { unsigned char digit = pass->raw[i] & 0xf; if(ean->right && ean->buf[j] != digit) { /* partial mismatch - reset collected parts */ dbprintf(2, " rst(right)"); ean->left = ean->right = ZBAR_NONE; } ean->buf[j] = digit; } ean->right = part; part &= ean->left; /* FIXME!? */ } else if(part == ZBAR_EAN13 || part == ZBAR_EAN8) /* EAN_LEFT */ { j = (part - 1) >> 1; for(i = part >> 1; j >= 0; i--, j--) { unsigned char digit = pass->raw[i] & 0xf; if(ean->left && ean->buf[j] != digit) { /* partial mismatch - reset collected parts */ dbprintf(2, " rst(left)"); ean->left = ean->right = ZBAR_NONE; } ean->buf[j] = digit; } ean->left = part; part &= ean->right; /* FIXME!? */ } else if(part != ZBAR_UPCE) /* add-ons */ { for(i = part; i > 0; i--) ean->buf[i - 1] = pass->raw[i] & 0xf; ean->left = part; } else ean_expand_upce(ean, pass); ean->width = pass->width; if(!part) part = ZBAR_PARTIAL; if(((part == ZBAR_EAN13 || part == ZBAR_UPCE) && ean_verify_checksum(ean, 12)) || (part == ZBAR_EAN8 && ean_verify_checksum(ean, 7))) { /* invalid checksum */ if(ean->right) ean->left = ZBAR_NONE; else ean->right = ZBAR_NONE; part = ZBAR_NONE; } if(part == ZBAR_EAN13) { /* special case EAN-13 subsets */ if(!ean->buf[0] && TEST_CFG(ean->upca_config, ZBAR_CFG_ENABLE)) part = ZBAR_UPCA; else if(ean->buf[0] == 9 && ean->buf[1] == 7) { if((ean->buf[2] == 8 || ean->buf[2] == 9) && TEST_CFG(ean->isbn13_config, ZBAR_CFG_ENABLE)) { part = ZBAR_ISBN13; } else if(ean->buf[2] == 8 && TEST_CFG(ean->isbn10_config, ZBAR_CFG_ENABLE)) { part = ZBAR_ISBN10; } } } else if(part == ZBAR_UPCE) { if(TEST_CFG(ean->upce_config, ZBAR_CFG_ENABLE)) { /* UPC-E was decompressed for checksum verification, * but user requested compressed result */ ean->buf[0] = ean->buf[1] = 0; for(i = 2; i < 8; i++) ean->buf[i] = pass->raw[i - 1] & 0xf; ean->buf[i] = pass->raw[0] & 0xf; } else if(TEST_CFG(ean->upca_config, ZBAR_CFG_ENABLE)) /* UPC-E reported as UPC-A has priority over EAN-13 */ part = ZBAR_UPCA; else if(TEST_CFG(ean->ean13_config, ZBAR_CFG_ENABLE)) part = ZBAR_EAN13; else part = ZBAR_NONE; } dbprintf(2, " dir=%d %x/%x=%x", ean->direction, ean->left, ean->right, part); return(part); } /* copy result to output buffer */ static inline void postprocess (zbar_decoder_t *dcode, zbar_symbol_type_t sym) { ean_decoder_t *ean = &dcode->ean; zbar_symbol_type_t base = sym; int i = 0, j = 0; if(base > ZBAR_PARTIAL) { if(base == ZBAR_UPCA) i = 1; else if(base == ZBAR_UPCE) { i = 1; base--; } else if(base == ZBAR_ISBN13) base = ZBAR_EAN13; else if(base == ZBAR_ISBN10) i = 3; if(base == ZBAR_ISBN10 || (base > ZBAR_EAN5 && !TEST_CFG(ean_get_config(ean, sym), ZBAR_CFG_EMIT_CHECK))) base--; for(; j < base && ean->buf[i] >= 0; i++, j++) dcode->buf[j] = ean->buf[i] + '0'; if(sym == ZBAR_ISBN10 && j == 9 && TEST_CFG(ean->isbn10_config, ZBAR_CFG_EMIT_CHECK)) /* recalculate ISBN-10 check digit */ dcode->buf[j++] = isbn10_calc_checksum(ean); } dcode->buflen = j; dcode->buf[j] = '\0'; dcode->direction = 1 - 2 * ean->direction; dcode->modifiers = 0; dbprintf(2, " base=%d j=%d (%s)", base, j, dcode->buf); } zbar_symbol_type_t _zbar_decode_ean (zbar_decoder_t *dcode) { /* process upto 4 separate passes */ zbar_symbol_type_t sym = ZBAR_NONE; unsigned char pass_idx = dcode->idx & 3; unsigned char i; /* update latest character width */ dcode->ean.s4 -= get_width(dcode, 4); dcode->ean.s4 += get_width(dcode, 0); for(i = 0; i < 4; i++) { ean_pass_t *pass = &dcode->ean.pass[i]; if(pass->state >= 0 || i == pass_idx) { zbar_symbol_type_t part; dbprintf(2, " ean[%x/%x]: idx=%x st=%d s=%d", i, pass_idx, dcode->idx, pass->state, dcode->ean.s4); part = decode_pass(dcode, pass); if(part) { /* update accumulated data from new partial decode */ sym = integrate_partial(&dcode->ean, pass, part); if(sym) { /* this pass valid => _reset_ all passes */ dbprintf(2, " sym=%x", sym); dcode->ean.pass[0].state = dcode->ean.pass[1].state = -1; dcode->ean.pass[2].state = dcode->ean.pass[3].state = -1; if(sym > ZBAR_PARTIAL) { if(!acquire_lock(dcode, sym)) postprocess(dcode, sym); else { dbprintf(1, " [locked %d]", dcode->lock); sym = ZBAR_PARTIAL; } } } } dbprintf(2, "\n"); } } return(sym); } zbar-0.23/zbar/decoder/i25.c0000664000175000017500000001712013471225700012427 00000000000000/*------------------------------------------------------------------------ * Copyright 2008-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #include /* memmove */ #include #ifdef DEBUG_I25 # define DEBUG_LEVEL (DEBUG_I25) #endif #include "debug.h" #include "decoder.h" static inline unsigned char i25_decode1 (unsigned char enc, unsigned e, unsigned s) { unsigned char E = decode_e(e, s, 45); if(E > 7) return(0xff); enc <<= 1; if(E > 2) enc |= 1; return(enc); } static inline unsigned char i25_decode10 (zbar_decoder_t *dcode, unsigned char offset) { i25_decoder_t *dcode25 = &dcode->i25; dbprintf(2, " s=%d", dcode25->s10); if(dcode25->s10 < 10) return(0xff); /* threshold bar width ratios */ unsigned char enc = 0, par = 0; signed char i; for(i = 8; i >= 0; i -= 2) { unsigned char j = offset + ((dcode25->direction) ? i : 8 - i); enc = i25_decode1(enc, get_width(dcode, j), dcode25->s10); if(enc == 0xff) return(0xff); if(enc & 1) par++; } dbprintf(2, " enc=%02x par=%x", enc, par); /* parity check */ if(par != 2) { dbprintf(2, " [bad parity]"); return(0xff); } /* decode binary weights */ enc &= 0xf; if(enc & 8) { if(enc == 12) enc = 0; else if(--enc > 9) { dbprintf(2, " [invalid encoding]"); return(0xff); } } dbprintf(2, " => %x", enc); return(enc); } static inline signed char i25_decode_start (zbar_decoder_t *dcode) { i25_decoder_t *dcode25 = &dcode->i25; if(dcode25->s10 < 10) return(ZBAR_NONE); unsigned char enc = 0; unsigned char i = 10; enc = i25_decode1(enc, get_width(dcode, i++), dcode25->s10); enc = i25_decode1(enc, get_width(dcode, i++), dcode25->s10); enc = i25_decode1(enc, get_width(dcode, i++), dcode25->s10); if((get_color(dcode) == ZBAR_BAR) ? enc != 4 : (enc = i25_decode1(enc, get_width(dcode, i++), dcode25->s10))) { dbprintf(4, " i25: s=%d enc=%x [invalid]\n", dcode25->s10, enc); return(ZBAR_NONE); } /* check leading quiet zone - spec is 10n(?) * we require 5.25n for w=2n to 6.75n for w=3n * (FIXME should really factor in w:n ratio) */ unsigned quiet = get_width(dcode, i); if(quiet && quiet < dcode25->s10 * 3 / 8) { dbprintf(3, " i25: s=%d enc=%x q=%d [invalid qz]\n", dcode25->s10, enc, quiet); return(ZBAR_NONE); } dcode25->direction = get_color(dcode); dcode25->element = 1; dcode25->character = 0; return(ZBAR_PARTIAL); } static inline int i25_acquire_lock (zbar_decoder_t *dcode) { int i; /* lock shared resources */ if(acquire_lock(dcode, ZBAR_I25)) { dcode->i25.character = -1; return(1); } /* copy holding buffer */ for(i = 4; --i >= 0; ) dcode->buf[i] = dcode->i25.buf[i]; return(0); } static inline signed char i25_decode_end (zbar_decoder_t *dcode) { i25_decoder_t *dcode25 = &dcode->i25; /* check trailing quiet zone */ unsigned quiet = get_width(dcode, 0); if((quiet && quiet < dcode25->width * 3 / 8) || decode_e(get_width(dcode, 1), dcode25->width, 45) > 2 || decode_e(get_width(dcode, 2), dcode25->width, 45) > 2) { dbprintf(3, " i25: s=%d q=%d [invalid qz]\n", dcode25->width, quiet); return(ZBAR_NONE); } /* check exit condition */ unsigned char E = decode_e(get_width(dcode, 3), dcode25->width, 45); if((!dcode25->direction) ? E - 3 > 4 : (E > 2 || decode_e(get_width(dcode, 4), dcode25->width, 45) > 2)) return(ZBAR_NONE); if(dcode25->character <= 4 && i25_acquire_lock(dcode)) return(ZBAR_PARTIAL); dcode->direction = 1 - 2 * dcode25->direction; if(dcode25->direction) { /* reverse buffer */ dbprintf(2, " (rev)"); int i; for(i = 0; i < dcode25->character / 2; i++) { unsigned j = dcode25->character - 1 - i; char c = dcode->buf[i]; dcode->buf[i] = dcode->buf[j]; dcode->buf[j] = c; } } if(dcode25->character < CFG(*dcode25, ZBAR_CFG_MIN_LEN) || (CFG(*dcode25, ZBAR_CFG_MAX_LEN) > 0 && dcode25->character > CFG(*dcode25, ZBAR_CFG_MAX_LEN))) { dbprintf(2, " [invalid len]\n"); release_lock(dcode, ZBAR_I25); dcode25->character = -1; return(ZBAR_NONE); } zassert(dcode25->character < dcode->buf_alloc, ZBAR_NONE, "i=%02x %s\n", dcode25->character, _zbar_decoder_buf_dump(dcode->buf, dcode25->character)); dcode->buflen = dcode25->character; dcode->buf[dcode25->character] = '\0'; dcode->modifiers = 0; dbprintf(2, " [valid end]\n"); dcode25->character = -1; return(ZBAR_I25); } zbar_symbol_type_t _zbar_decode_i25 (zbar_decoder_t *dcode) { i25_decoder_t *dcode25 = &dcode->i25; /* update latest character width */ dcode25->s10 -= get_width(dcode, 10); dcode25->s10 += get_width(dcode, 0); if(dcode25->character < 0 && !i25_decode_start(dcode)) return(ZBAR_NONE); if(--dcode25->element == 6 - dcode25->direction) return(i25_decode_end(dcode)); else if(dcode25->element) return(ZBAR_NONE); /* FIXME check current character width against previous */ dcode25->width = dcode25->s10; dbprintf(2, " i25[%c%02d+%x]", (dcode25->direction) ? '<' : '>', dcode25->character, dcode25->element); if(dcode25->character == 4 && i25_acquire_lock(dcode)) return(ZBAR_PARTIAL); unsigned char c = i25_decode10(dcode, 1); dbprintf(2, " c=%x", c); if(c > 9) { dbprintf(2, " [aborted]\n"); goto reset; } if(size_buf(dcode, dcode25->character + 3)) { dbprintf(2, " [overflow]\n"); goto reset; } unsigned char *buf; if(dcode25->character >= 4) buf = dcode->buf; else buf = dcode25->buf; buf[dcode25->character++] = c + '0'; c = i25_decode10(dcode, 0); dbprintf(2, " c=%x", c); if(c > 9) { dbprintf(2, " [aborted]\n"); goto reset; } else dbprintf(2, "\n"); buf[dcode25->character++] = c + '0'; dcode25->element = 10; return((dcode25->character == 2) ? ZBAR_PARTIAL : ZBAR_NONE); reset: if(dcode25->character >= 4) release_lock(dcode, ZBAR_I25); dcode25->character = -1; return(ZBAR_NONE); } zbar-0.23/zbar/decoder/codabar.c0000664000175000017500000003002013471225700013415 00000000000000/*------------------------------------------------------------------------ * Copyright 2011 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #include /* memmove */ #include #ifdef DEBUG_CODABAR # define DEBUG_LEVEL (DEBUG_CODABAR) #endif #include "debug.h" #include "decoder.h" #define NIBUF 6 /* initial scan buffer size */ static const signed char codabar_lo[12] = { 0x0, 0x1, 0x4, 0x5, 0x2, 0xa, 0xb, 0x9, 0x6, 0x7, 0x8, 0x3 }; static const unsigned char codabar_hi[8] = { 0x1, 0x4, 0x7, 0x6, 0x2, 0x3, 0x0, 0x5 }; static const unsigned char codabar_characters[20] = "0123456789-$:/.+ABCD"; static inline int check_width (unsigned ref, unsigned w) { unsigned dref = ref; ref *= 4; w *= 4; return(ref - dref <= w && w <= ref + dref); } static inline signed char codabar_decode7 (zbar_decoder_t *dcode) { codabar_decoder_t *codabar = &dcode->codabar; unsigned s = codabar->s7; dbprintf(2, " s=%d", s); if(s < 7) return(-1); /* check width */ if(!check_width(codabar->width, s)) { dbprintf(2, " [width]"); return(-1); } /* extract min/max bar */ unsigned ibar = decode_sortn(dcode, 4, 1); dbprintf(2, " bar=%04x", ibar); unsigned wbmax = get_width(dcode, ibar & 0xf); unsigned wbmin = get_width(dcode, ibar >> 12); if(8 * wbmin < wbmax || 3 * wbmin > 2 * wbmax) { dbprintf(2, " [bar outer ratio]"); return(-1); } unsigned wb1 = get_width(dcode, (ibar >> 8) & 0xf); unsigned wb2 = get_width(dcode, (ibar >> 4) & 0xf); unsigned long b0b3 = wbmin * wbmax; unsigned long b1b2 = wb1 * wb2; if(b1b2 + b1b2 / 8 < b0b3) { /* single wide bar combinations */ if(8 * wbmin < 5 * wb1 || 8 * wb1 < 5 * wb2 || 4 * wb2 > 3 * wbmax || wb2 * wb2 >= wb1 * wbmax) { dbprintf(2, " [1bar inner ratios]"); return(-1); } ibar = (ibar >> 1) & 0x3; } else if(b1b2 > b0b3 + b0b3 / 8) { /* three wide bars, no wide spaces */ if(4 * wbmin > 3 * wb1 || 8 * wb1 < 5 * wb2 || 8 * wb2 < 5 * wbmax || wbmin * wb2 >= wb1 * wb1) { dbprintf(2, " [3bar inner ratios]"); return(-1); } ibar = (ibar >> 13) + 4; } else { dbprintf(2, " [bar inner ratios]"); return(-1); } unsigned ispc = decode_sort3(dcode, 2); dbprintf(2, "(%x) spc=%03x", ibar, ispc); unsigned wsmax = get_width(dcode, ispc & 0xf); unsigned wsmid = get_width(dcode, (ispc >> 4) & 0xf); unsigned wsmin = get_width(dcode, (ispc >> 8) & 0xf); if(ibar >> 2) { /* verify no wide spaces */ if(8 * wsmin < wsmax || 8 * wsmin < 5 * wsmid || 8 * wsmid < 5 * wsmax) { dbprintf(2, " [0space inner ratios]"); return(-1); } ibar &= 0x3; if(codabar->direction) ibar = 3 - ibar; int c = (0xfcde >> (ibar << 2)) & 0xf; dbprintf(2, " ex[%d]=%x", ibar, c); return(c); } else if(8 * wsmin < wsmax || 3 * wsmin > 2 * wsmax) { dbprintf(2, " [space outer ratio]"); return(-1); } unsigned long s0s2 = wsmin * wsmax; unsigned long s1s1 = wsmid * wsmid; if(s1s1 + s1s1 / 8 < s0s2) { /* single wide space */ if(8 * wsmin < 5 * wsmid || 4 * wsmid > 3 * wsmax) { dbprintf(2, " [1space inner ratios]"); return(-1); } ispc = ((ispc & 0xf) >> 1) - 1; unsigned ic = (ispc << 2) | ibar; if(codabar->direction) ic = 11 - ic; int c = codabar_lo[ic]; dbprintf(2, "(%d) lo[%d]=%x", ispc, ic, c); return(c); } else if(s1s1 > s0s2 + s0s2 / 8) { /* two wide spaces, check start/stop */ if(4 * wsmin > 3 * wsmid || 8 * wsmid < 5 * wsmax) { dbprintf(2, " [2space inner ratios]"); return(-1); } if((ispc >> 8) == 4) { dbprintf(2, " [space comb]"); return(-1); } ispc >>= 10; dbprintf(2, "(%d)", ispc); unsigned ic = ispc * 4 + ibar; zassert(ic < 8, -1, "ic=%d ispc=%d ibar=%d", ic, ispc, ibar); unsigned char c = codabar_hi[ic]; if(c >> 2 != codabar->direction) { dbprintf(2, " [invalid stop]"); return(-1); } c = (c & 0x3) | 0x10; dbprintf(2, " hi[%d]=%x", ic, c); return(c); } else { dbprintf(2, " [space inner ratios]"); return(-1); } } static inline signed char codabar_decode_start (zbar_decoder_t *dcode) { codabar_decoder_t *codabar = &dcode->codabar; unsigned s = codabar->s7; if(s < 8) return(ZBAR_NONE); dbprintf(2, " codabar: s=%d", s); /* check leading quiet zone - spec is 10x */ unsigned qz = get_width(dcode, 8); if((qz && qz * 2 < s) || 4 * get_width(dcode, 0) > 3 * s) { dbprintf(2, " [invalid qz/ics]\n"); return(ZBAR_NONE); } /* check space ratios first */ unsigned ispc = decode_sort3(dcode, 2); dbprintf(2, " spc=%03x", ispc); if((ispc >> 8) == 4) { dbprintf(2, " [space comb]\n"); return(ZBAR_NONE); } /* require 2 wide and 1 narrow spaces */ unsigned wsmax = get_width(dcode, ispc & 0xf); unsigned wsmin = get_width(dcode, ispc >> 8); unsigned wsmid = get_width(dcode, (ispc >> 4) & 0xf); if(8 * wsmin < wsmax || 3 * wsmin > 2 * wsmax || 4 * wsmin > 3 * wsmid || 8 * wsmid < 5 * wsmax || wsmid * wsmid <= wsmax * wsmin) { dbprintf(2, " [space ratio]\n"); return(ZBAR_NONE); } ispc >>= 10; dbprintf(2, "(%d)", ispc); /* check bar ratios */ unsigned ibar = decode_sortn(dcode, 4, 1); dbprintf(2, " bar=%04x", ibar); unsigned wbmax = get_width(dcode, ibar & 0xf); unsigned wbmin = get_width(dcode, ibar >> 12); if(8 * wbmin < wbmax || 3 * wbmin > 2 * wbmax) { dbprintf(2, " [bar outer ratio]\n"); return(ZBAR_NONE); } /* require 1 wide & 3 narrow bars */ unsigned wb1 = get_width(dcode, (ibar >> 8) & 0xf); unsigned wb2 = get_width(dcode, (ibar >> 4) & 0xf); if(8 * wbmin < 5 * wb1 || 8 * wb1 < 5 * wb2 || 4 * wb2 > 3 * wbmax || wb1 * wb2 >= wbmin * wbmax || wb2 * wb2 >= wb1 * wbmax) { dbprintf(2, " [bar inner ratios]\n"); return(ZBAR_NONE); } ibar = ((ibar & 0xf) - 1) >> 1; dbprintf(2, "(%d)", ibar); /* decode combination */ int ic = ispc * 4 + ibar; zassert(ic < 8, ZBAR_NONE, "ic=%d ispc=%d ibar=%d", ic, ispc, ibar); int c = codabar_hi[ic]; codabar->buf[0] = (c & 0x3) | 0x10; /* set character direction */ codabar->direction = c >> 2; codabar->element = 4; codabar->character = 1; codabar->width = codabar->s7; dbprintf(1, " start=%c dir=%x [valid start]\n", codabar->buf[0] + 0x31, codabar->direction); return(ZBAR_PARTIAL); } static inline int codabar_checksum (zbar_decoder_t *dcode, unsigned n) { unsigned chk = 0; unsigned char *buf = dcode->buf; while(n--) chk += *(buf++); return(!!(chk & 0xf)); } static inline zbar_symbol_type_t codabar_postprocess (zbar_decoder_t *dcode) { codabar_decoder_t *codabar = &dcode->codabar; int dir = codabar->direction; dcode->direction = 1 - 2 * dir; int i, n = codabar->character; for(i = 0; i < NIBUF; i++) dcode->buf[i] = codabar->buf[i]; if(dir) /* reverse buffer */ for(i = 0; i < n / 2; i++) { unsigned j = n - 1 - i; char code = dcode->buf[i]; dcode->buf[i] = dcode->buf[j]; dcode->buf[j] = code; } if(TEST_CFG(codabar->config, ZBAR_CFG_ADD_CHECK)) { /* validate checksum */ if(codabar_checksum(dcode, n)) return(ZBAR_NONE); if(!TEST_CFG(codabar->config, ZBAR_CFG_EMIT_CHECK)) { dcode->buf[n - 2] = dcode->buf[n - 1]; n--; } } for(i = 0; i < n; i++) { unsigned c = dcode->buf[i]; dcode->buf[i] = ((c < 0x14) ? codabar_characters[c] : '?'); } dcode->buflen = i; dcode->buf[i] = '\0'; dcode->modifiers = 0; codabar->character = -1; return(ZBAR_CODABAR); } zbar_symbol_type_t _zbar_decode_codabar (zbar_decoder_t *dcode) { codabar_decoder_t *codabar = &dcode->codabar; /* update latest character width */ codabar->s7 -= get_width(dcode, 8); codabar->s7 += get_width(dcode, 1); if(get_color(dcode) != ZBAR_SPACE) return(ZBAR_NONE); if(codabar->character < 0) return(codabar_decode_start(dcode)); if(codabar->character < 2 && codabar_decode_start(dcode)) return(ZBAR_PARTIAL); if(--codabar->element) return(ZBAR_NONE); codabar->element = 4; dbprintf(1, " codabar[%c%02d+%x]", (codabar->direction) ? '<' : '>', codabar->character, codabar->element); signed char c = codabar_decode7(dcode); dbprintf(1, " %d", c); if(c < 0) { dbprintf(1, " [aborted]\n"); goto reset; } unsigned char *buf; if(codabar->character < NIBUF) buf = codabar->buf; else { if(codabar->character >= BUFFER_MIN && size_buf(dcode, codabar->character + 1)) { dbprintf(1, " [overflow]\n"); goto reset; } buf = dcode->buf; } buf[codabar->character++] = c; /* lock shared resources */ if(codabar->character == NIBUF && acquire_lock(dcode, ZBAR_CODABAR)) { codabar->character = -1; return(ZBAR_PARTIAL); } unsigned s = codabar->s7; if(c & 0x10) { unsigned qz = get_width(dcode, 0); if(qz && qz * 2 < s) { dbprintf(2, " [invalid qz]\n"); goto reset; } unsigned n = codabar->character; if(n < CFG(*codabar, ZBAR_CFG_MIN_LEN) || (CFG(*codabar, ZBAR_CFG_MAX_LEN) > 0 && n > CFG(*codabar, ZBAR_CFG_MAX_LEN))) { dbprintf(2, " [invalid len]\n"); goto reset; } if(codabar->character < NIBUF && acquire_lock(dcode, ZBAR_CODABAR)) { codabar->character = -1; return(ZBAR_PARTIAL); } dbprintf(2, " stop=%c", c + 0x31); zbar_symbol_type_t sym = codabar_postprocess(dcode); if(sym > ZBAR_PARTIAL) dbprintf(2, " [valid stop]"); else { release_lock(dcode, ZBAR_CODABAR); codabar->character = -1; } dbprintf(2, "\n"); return(sym); } else if(4 * get_width(dcode, 0) > 3 * s) { dbprintf(2, " [ics]\n"); goto reset; } dbprintf(2, "\n"); return(ZBAR_NONE); reset: if(codabar->character >= NIBUF) release_lock(dcode, ZBAR_CODABAR); codabar->character = -1; return(ZBAR_NONE); } zbar-0.23/zbar/decoder/databar.h0000664000175000017500000000560313471225700013436 00000000000000/*------------------------------------------------------------------------ * Copyright 2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _DATABAR_H_ #define _DATABAR_H_ #define DATABAR_MAX_SEGMENTS 32 /* active DataBar (partial) segment entry */ typedef struct databar_segment_s { signed finder : 5; /* finder pattern */ unsigned exp : 1; /* DataBar expanded finder */ unsigned color : 1; /* finder coloring */ unsigned side : 1; /* data character side of finder */ unsigned partial : 1; /* unpaired partial segment */ unsigned count : 7; /* times encountered */ unsigned epoch : 8; /* age, in characters scanned */ unsigned check : 8; /* bar checksum */ signed short data; /* decoded character data */ unsigned short width; /* measured width of finder (14 modules) */ } databar_segment_t; /* DataBar specific decode state */ typedef struct databar_decoder_s { unsigned config; /* decoder configuration flags */ unsigned config_exp; unsigned csegs : 8; /* allocated segments */ unsigned epoch : 8; /* current scan */ databar_segment_t *segs; /* active segment list */ signed char chars[16]; /* outstanding character indices */ } databar_decoder_t; /* reset DataBar segment decode state */ static inline void databar_new_scan (databar_decoder_t *db) { int i; for(i = 0; i < 16; i++) if(db->chars[i] >= 0) { databar_segment_t *seg = db->segs + db->chars[i]; if(seg->partial) seg->finder = -1; db->chars[i] = -1; } } /* reset DataBar accumulated segments */ static inline void databar_reset (databar_decoder_t *db) { int i, n = db->csegs; databar_new_scan(db); for(i = 0; i < n; i++) db->segs[i].finder = -1; } /* decode DataBar symbols */ zbar_symbol_type_t _zbar_decode_databar(zbar_decoder_t *dcode); #endif zbar-0.23/zbar/decoder/sq_finder.h0000664000175000017500000000025013471225716014012 00000000000000#ifndef _DECODER_SQ_FINDER_H_ #define _DECODER_SQ_FINDER_H_ /* SQ Code symbol finder state */ typedef struct sq_finder_s { unsigned config; } sq_finder_t; #endif zbar-0.23/zbar/decoder/codabar.h0000664000175000017500000000367313471225575013452 00000000000000/*------------------------------------------------------------------------ * Copyright 2011 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _CODABAR_H_ #define _CODABAR_H_ /* Codabar specific decode state */ typedef struct codabar_decoder_s { unsigned direction : 1; /* scan direction: 0=fwd, 1=rev */ unsigned element : 4; /* element offset 0-7 */ int character : 12; /* character position in symbol */ unsigned s7; /* current character width */ unsigned width; /* last character width */ unsigned char buf[6]; /* initial scan buffer */ unsigned config; int configs[NUM_CFGS]; /* int valued configurations */ } codabar_decoder_t; /* reset Codabar specific state */ static inline void codabar_reset (codabar_decoder_t *codabar) { codabar->direction = 0; codabar->element = 0; codabar->character = -1; codabar->s7 = 0; } /* decode Codabar symbols */ zbar_symbol_type_t _zbar_decode_codabar(zbar_decoder_t *dcode); #endif zbar-0.23/zbar/decoder/databar.c0000664000175000017500000010377213471225700013437 00000000000000/*------------------------------------------------------------------------ * Copyright 2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #include #ifdef DEBUG_DATABAR # define DEBUG_LEVEL (DEBUG_DATABAR) #endif #include "debug.h" #include "decoder.h" #define GS ('\035') enum { SCH_NUM, SCH_ALNUM, SCH_ISO646 }; static const signed char finder_hash[0x20] = { 0x16, 0x1f, 0x02, 0x00, 0x03, 0x00, 0x06, 0x0b, 0x1f, 0x0e, 0x17, 0x0c, 0x0b, 0x14, 0x11, 0x0c, 0x1f, 0x03, 0x13, 0x08, 0x00, 0x0a, -1, 0x16, 0x0c, 0x09, -1, 0x1a, 0x1f, 0x1c, 0x00, -1, }; /* DataBar character encoding groups */ struct group_s { unsigned short sum; unsigned char wmax; unsigned char todd; unsigned char teven; } groups[] = { /* (17,4) DataBar Expanded character groups */ { 0, 7, 87, 4 }, { 348, 5, 52, 20 }, { 1388, 4, 30, 52 }, { 2948, 3, 10, 104 }, { 3988, 1, 1, 204 }, /* (16,4) DataBar outer character groups */ { 0, 8, 161, 1 }, { 161, 6, 80, 10 }, { 961, 4, 31, 34 }, { 2015, 3, 10, 70 }, { 2715, 1, 1, 126 }, /* (15,4) DataBar inner character groups */ { 1516, 8, 81, 1 }, { 1036, 6, 48, 10 }, { 336, 4, 20, 35 }, { 0, 2, 4, 84 }, }; static const unsigned char exp_sequences[] = { /* sequence Group 1 */ 0x01, 0x23, 0x25, 0x07, 0x29, 0x47, 0x29, 0x67, 0x0b, 0x29, 0x87, 0xab, /* sequence Group 2 */ 0x21, 0x43, 0x65, 0x07, 0x21, 0x43, 0x65, 0x89, 0x21, 0x43, 0x65, 0xa9, 0x0b, 0x21, 0x43, 0x67, 0x89, 0xab }; /* DataBar expanded checksum multipliers */ static const unsigned char exp_checksums[] = { 1, 189, 62, 113, 46, 43, 109, 134, 6, 79, 161, 45 }; static inline void append_check14 (unsigned char *buf) { unsigned char chk = 0, d; int i; for(i = 13; --i >= 0; ) { d = *(buf++) - '0'; chk += d; if(!(i & 1)) chk += d << 1; } chk %= 10; if(chk) chk = 10 - chk; *buf = chk + '0'; } static inline void decode10 (unsigned char *buf, unsigned long n, int i) { buf += i; while(--i >= 0) { unsigned char d = n % 10; n /= 10; *--buf = '0' + d; } } #define VAR_MAX(l, i) ((((l) * 12 + (i)) * 2 + 6) / 7) #define FEED_BITS(b) \ while(i < (b) && len) { \ d = (d << 12) | (*(data++) & 0xfff); \ i += 12; \ len--; \ dbprintf(2, " %03lx", d & 0xfff); \ } #define PUSH_CHAR(c) \ *(buf++) = (c) #define PUSH_CHAR4(c0, c1, c2, c3) do { \ PUSH_CHAR(c0); \ PUSH_CHAR(c1); \ PUSH_CHAR(c2); \ PUSH_CHAR(c3); \ } while(0); static inline int databar_postprocess_exp (zbar_decoder_t *dcode, int *data) { int i = 0, enc; unsigned n; unsigned char *buf; unsigned long d = *(data++); int len = d / 211 + 4, buflen; /* grok encodation method */ d = *(data++); dbprintf(2, "\n len=%d %03lx", len, d & 0xfff); n = (d >> 4) & 0x7f; if(n >= 0x40) { i = 10; enc = 1; buflen = 2 + 14 + VAR_MAX(len, 10 - 2 - 44 + 6) + 2; } else if(n >= 0x38) { i = 4; enc = 6 + (n & 7); buflen = 2 + 14 + 4 + 6 + 2 + 6 + 2; } else if(n >= 0x30) { i = 6; enc = 2 + ((n >> 2) & 1); buflen = 2 + 14 + 4 + 3 + VAR_MAX(len, 6 - 2 - 44 - 2 - 10) + 2; } else if(n >= 0x20) { i = 7; enc = 4 + ((n >> 3) & 1); buflen = 2 + 14 + 4 + 6; } else { i = 9; enc = 0; buflen = VAR_MAX(len, 9 - 2) + 2; } dbprintf(2, " buflen=%d enc=%d", buflen, enc); zassert(buflen > 2, -1, "buflen=%d\n", buflen); if(enc < 4) { /* grok variable length symbol bit field */ if((len ^ (d >> (--i))) & 1) /* even/odd length mismatch */ return(-1); if(((d >> (--i)) & 1) != (len > 14)) /* size group mismatch */ return(-1); } len -= 2; dbprintf(2, " [%d+%d]", i, len); if(size_buf(dcode, buflen)) return(-1); buf = dcode->buf; /* handle compressed fields */ if(enc) { PUSH_CHAR('0'); PUSH_CHAR('1'); } if(enc == 1) { i -= 4; n = (d >> i) & 0xf; if(i >= 10) return(-1); PUSH_CHAR('0' + n); } else if(enc) PUSH_CHAR('9'); if(enc) { int j; for(j = 0; j < 4; j++) { FEED_BITS(10); i -= 10; n = (d >> i) & 0x3ff; if(n >= 1000) return(-1); decode10(buf, n, 3); buf += 3; } append_check14(buf - 13); buf++; } switch(enc) { case 2: /* 01100: AI 392x */ FEED_BITS(2); i -= 2; n = (d >> i) & 0x3; PUSH_CHAR4('3', '9', '2', '0' + n); break; case 3: /* 01101: AI 393x */ FEED_BITS(12); i -= 2; n = (d >> i) & 0x3; PUSH_CHAR4('3', '9', '3', '0' + n); i -= 10; n = (d >> i) & 0x3ff; if(n >= 1000) return(-1); decode10(buf, n, 3); buf += 3; break; case 4: /* 0100: AI 3103 */ FEED_BITS(15); i -= 15; n = (d >> i) & 0x7fff; PUSH_CHAR4('3', '1', '0', '3'); decode10(buf, n, 6); buf += 6; break; case 5: /* 0101: AI 3202/3203 */ FEED_BITS(15); i -= 15; n = (d >> i) & 0x7fff; dbprintf(2, " v=%d", n); PUSH_CHAR4('3', '2', '0', (n >= 10000) ? '3' : '2' ); if(n >= 10000) n -= 10000; decode10(buf, n, 6); buf += 6; break; } if(enc >= 6) { /* 0111000 - 0111111: AI 310x/320x + AI 11/13/15/17 */ PUSH_CHAR4('3', '1' + (enc & 1), '0', 'x'); FEED_BITS(20); i -= 20; n = (d >> i) & 0xfffff; dbprintf(2, " [%d+%d] %d", i, len, n); if(n >= 1000000) return(-1); decode10(buf, n, 6); *(buf - 1) = *buf; *buf = '0'; buf += 6; FEED_BITS(16); i -= 16; n = (d >> i) & 0xffff; if(n < 38400) { int dd, mm, yy; dd = n % 32; n /= 32; mm = n % 12 + 1; n /= 12; yy = n; PUSH_CHAR('1'); PUSH_CHAR('0' + ((enc - 6) | 1)); decode10(buf, yy, 2); buf += 2; decode10(buf, mm, 2); buf += 2; decode10(buf, dd, 2); buf += 2; } else if(n > 38400) return(-1); } if(enc < 4) { /* remainder is general-purpose data compaction */ int scheme = SCH_NUM; while(i > 0 || len > 0) { FEED_BITS(8); dbprintf(2, " [%d+%d]", i, len); if(scheme == SCH_NUM) { int n1; i -= 4; if(i < 0) break; if(!((d >> i) & 0xf)) { scheme = SCH_ALNUM; dbprintf(2, ">A"); continue; } if(!len && i < 3) { /* special case last digit */ n = ((d >> i) & 0xf) - 1; if(n > 9) return(-1); *(buf++) = '0' + n; break; } i -= 3; zassert(i >= 0, -1, "\n"); n = ((d >> i) & 0x7f) - 8; n1 = n % 11; n = n / 11; dbprintf(2, "N%d%d", n, n1); *(buf++) = (n < 10) ? '0' + n : GS; *(buf++) = (n1 < 10) ? '0' + n1 : GS; } else { unsigned c = 0; i -= 3; if(i < 0) break; if(!((d >> i) & 0x7)) { scheme = SCH_NUM; continue; } i -= 2; if(i < 0) break; n = (d >> i) & 0x1f; if(n == 0x04) { scheme ^= 0x3; dbprintf(2, ">%d", scheme); } else if(n == 0x0f) c = GS; else if(n < 0x0f) c = 43 + n; else if(scheme == SCH_ALNUM) { i--; if(i < 0) return(-1); n = (d >> i) & 0x1f; if(n < 0x1a) c = 'A' + n; else if(n == 0x1a) c = '*'; else if(n < 0x1f) c = ',' + n - 0x1b; else return(-1); } else if(scheme == SCH_ISO646 && n < 0x1d) { i -= 2; if(i < 0) return(-1); n = (d >> i) & 0x3f; if(n < 0x1a) c = 'A' + n; else if(n < 0x34) c = 'a' + n - 0x1a; else return(-1); } else if(scheme == SCH_ISO646) { i -= 3; if(i < 0) return(-1); n = ((d >> i) & 0x1f); dbprintf(2, "(%02x)", n); if(n < 0xa) c = '!' + n - 8; else if(n < 0x15) c = '%' + n - 0xa; else if(n < 0x1b) c = ':' + n - 0x15; else if(n == 0x1b) c = '_'; else if(n == 0x1c) c = ' '; else return(-1); } else return(-1); if(c) { dbprintf(2, "%d%c", scheme, c); *(buf++) = c; } } } /* FIXME check pad? */ } i = buf - dcode->buf; zassert(i < dcode->buf_alloc, -1, "i=%02x %s\n", i, _zbar_decoder_buf_dump(dcode->buf, i)); *buf = 0; dcode->buflen = i; if(i && *--buf == GS) { *buf = 0; dcode->buflen--; } dbprintf(2, "\n %s", _zbar_decoder_buf_dump(dcode->buf, dcode->buflen)); return(0); } #undef FEED_BITS /* convert from heterogeneous base {1597,2841} * to base 10 character representation */ static inline void databar_postprocess (zbar_decoder_t *dcode, unsigned d[4]) { databar_decoder_t *db = &dcode->databar; int i; unsigned c, chk = 0; unsigned char *buf = dcode->buf; *(buf++) = '0'; *(buf++) = '1'; buf += 15; *--buf = '\0'; *--buf = '\0'; dbprintf(2, "\n d={%d,%d,%d,%d}", d[0], d[1], d[2], d[3]); unsigned long r = d[0] * 1597 + d[1]; d[1] = r / 10000; r %= 10000; r = r * 2841 + d[2]; d[2] = r / 10000; r %= 10000; r = r * 1597 + d[3]; d[3] = r / 10000; dbprintf(2, " r=%ld", r); for(i = 4; --i >= 0; ) { c = r % 10; chk += c; if(i & 1) chk += c << 1; *--buf = c + '0'; if(i) r /= 10; } dbprintf(2, " d={%d,%d,%d}", d[1], d[2], d[3]); r = d[1] * 2841 + d[2]; d[2] = r / 10000; r %= 10000; r = r * 1597 + d[3]; d[3] = r / 10000; dbprintf(2, " r=%ld", r); for(i = 4; --i >= 0; ) { c = r % 10; chk += c; if(i & 1) chk += c << 1; *--buf = c + '0'; if(i) r /= 10; } r = d[2] * 1597 + d[3]; dbprintf(2, " d={%d,%d} r=%ld", d[2], d[3], r); for(i = 5; --i >= 0; ) { c = r % 10; chk += c; if(!(i & 1)) chk += c << 1; *--buf = c + '0'; if(i) r /= 10; } /* NB linkage flag not supported */ if(TEST_CFG(db->config, ZBAR_CFG_EMIT_CHECK)) { chk %= 10; if(chk) chk = 10 - chk; buf[13] = chk + '0'; dcode->buflen = buf - dcode->buf + 14; } else dcode->buflen = buf - dcode->buf + 13; dbprintf(2, "\n %s", _zbar_decoder_buf_dump(dcode->buf, 16)); } static inline int check_width (unsigned wf, unsigned wd, unsigned n) { unsigned dwf = wf * 3; wd *= 14; wf *= n; return(wf - dwf <= wd && wd <= wf + dwf); } static inline void merge_segment (databar_decoder_t *db, databar_segment_t *seg) { unsigned csegs = db->csegs; int i; for(i = 0; i < csegs; i++) { databar_segment_t *s = db->segs + i; if(s != seg && s->finder == seg->finder && s->exp == seg->exp && s->color == seg->color && s->side == seg->side && s->data == seg->data && s->check == seg->check && check_width(seg->width, s->width, 14)) { /* merge with existing segment */ unsigned cnt = s->count; if(cnt < 0x7f) cnt++; seg->count = cnt; seg->partial &= s->partial; seg->width = (3 * seg->width + s->width + 2) / 4; s->finder = -1; dbprintf(2, " dup@%d(%d,%d)", i, cnt, (db->epoch - seg->epoch) & 0xff); } else if(s->finder >= 0) { unsigned age = (db->epoch - s->epoch) & 0xff; if(age >= 248 || (age >= 128 && s->count < 2)) s->finder = -1; } } } static inline zbar_symbol_type_t match_segment (zbar_decoder_t *dcode, databar_segment_t *seg) { databar_decoder_t *db = &dcode->databar; unsigned csegs = db->csegs, maxage = 0xfff; int i0, i1, i2, maxcnt = 0; databar_segment_t *smax[3] = { NULL, }; if(seg->partial && seg->count < 4) return(ZBAR_PARTIAL); for(i0 = 0; i0 < csegs; i0++) { databar_segment_t *s0 = db->segs + i0; if(s0 == seg || s0->finder != seg->finder || s0->exp || s0->color != seg->color || s0->side == seg->side || (s0->partial && s0->count < 4) || !check_width(seg->width, s0->width, 14)) continue; for(i1 = 0; i1 < csegs; i1++) { databar_segment_t *s1 = db->segs + i1; int chkf, chks, chk; unsigned age1; if(i1 == i0 || s1->finder < 0 || s1->exp || s1->color == seg->color || (s1->partial && s1->count < 4) || !check_width(seg->width, s1->width, 14)) continue; dbprintf(2, "\n\t[%d,%d] f=%d(0%xx)/%d(%x%x%x)", i0, i1, seg->finder, seg->color, s1->finder, s1->exp, s1->color, s1->side); if(seg->color) chkf = seg->finder + s1->finder * 9; else chkf = s1->finder + seg->finder * 9; if(chkf > 72) chkf--; if(chkf > 8) chkf--; chks = (seg->check + s0->check + s1->check) % 79; if(chkf >= chks) chk = chkf - chks; else chk = 79 + chkf - chks; dbprintf(2, " chk=(%d,%d) => %d", chkf, chks, chk); age1 = (((db->epoch - s0->epoch) & 0xff) + ((db->epoch - s1->epoch) & 0xff)); for(i2 = i1 + 1; i2 < csegs; i2++) { databar_segment_t *s2 = db->segs + i2; unsigned cnt, age2, age; if(i2 == i0 || s2->finder != s1->finder || s2->exp || s2->color != s1->color || s2->side == s1->side || s2->check != chk || (s2->partial && s2->count < 4) || !check_width(seg->width, s2->width, 14)) continue; age2 = (db->epoch - s2->epoch) & 0xff; age = age1 + age2; cnt = s0->count + s1->count + s2->count; dbprintf(2, " [%d] MATCH cnt=%d age=%d", i2, cnt, age); if(maxcnt < cnt || (maxcnt == cnt && maxage > age)) { maxcnt = cnt; maxage = age; smax[0] = s0; smax[1] = s1; smax[2] = s2; } } } } if(!smax[0]) return(ZBAR_PARTIAL); unsigned d[4]; d[(seg->color << 1) | seg->side] = seg->data; for(i0 = 0; i0 < 3; i0++) { d[(smax[i0]->color << 1) | smax[i0]->side] = smax[i0]->data; if(!--(smax[i0]->count)) smax[i0]->finder = -1; } seg->finder = -1; if(size_buf(dcode, 18)) return(ZBAR_PARTIAL); if(acquire_lock(dcode, ZBAR_DATABAR)) return(ZBAR_PARTIAL); databar_postprocess(dcode, d); dcode->modifiers = MOD(ZBAR_MOD_GS1); dcode->direction = 1 - 2 * (seg->side ^ seg->color ^ 1); return(ZBAR_DATABAR); } static inline unsigned lookup_sequence (databar_segment_t *seg, int fixed, int seq[22]) { unsigned n = seg->data / 211, i; const unsigned char *p; i = (n + 1) / 2 + 1; n += 4; i = (i * i) / 4; dbprintf(2, " {%d,%d:", i, n); p = exp_sequences + i; fixed >>= 1; seq[0] = 0; seq[1] = 1; for(i = 2; i < n; ) { int s = *p; if(!(i & 2)) { p++; s >>= 4; } else s &= 0xf; if(s == fixed) fixed = -1; s <<= 1; dbprintf(2, "%x", s); seq[i++] = s++; seq[i++] = s; } dbprintf(2, "}"); seq[n] = -1; return(fixed < 1); } #define IDX(s) \ (((s)->finder << 2) | ((s)->color << 1) | ((s)->color ^ (s)->side)) static inline zbar_symbol_type_t match_segment_exp (zbar_decoder_t *dcode, databar_segment_t *seg, int dir) { databar_decoder_t *db = &dcode->databar; int bestsegs[22], i = 0, segs[22], seq[22]; int ifixed = seg - db->segs, fixed = IDX(seg), maxcnt = 0; int iseg[DATABAR_MAX_SEGMENTS]; unsigned csegs = db->csegs, width = seg->width, maxage = 0x7fff; bestsegs[0] = segs[0] = seq[1] = -1; seq[0] = 0; dbprintf(2, "\n fixed=%d@%d: ", fixed, ifixed); for(i = csegs, seg = db->segs + csegs - 1; --i >= 0; seg--) { if(seg->exp && seg->finder >= 0 && (!seg->partial || seg->count >= 4)) iseg[i] = IDX(seg); else iseg[i] = -1; dbprintf(2, " %d", iseg[i]); } for(i = 0; ; i--) { if(!i) dbprintf(2, "\n "); for(; i >= 0 && seq[i] >= 0; i--) { int j; dbprintf(2, " [%d]%d", i, seq[i]); if(seq[i] == fixed) { seg = db->segs + ifixed; if(segs[i] < 0 && check_width(width, seg->width, 14)) { dbprintf(2, "*"); j = ifixed; } else continue; } else { for(j = segs[i] + 1; j < csegs; j++) { if(iseg[j] == seq[i] && (!i || check_width(width, db->segs[j].width, 14))) { seg = db->segs + j; break; } } if(j == csegs) continue; } if(!i) { if(!lookup_sequence(seg, fixed, seq)) { dbprintf(2, "[nf]"); continue; } width = seg->width; dbprintf(2, " A00@%d", j); } else { width = (width + seg->width) / 2; dbprintf(2, " %c%x%x@%d", 'A' + seg->finder, seg->color, seg->side, j); } segs[i++] = j; segs[i++] = -1; } if(i < 0) break; seg = db->segs + segs[0]; unsigned cnt = 0, chk = 0, age = (db->epoch - seg->epoch) & 0xff; for(i = 1; segs[i] >= 0; i++) { seg = db->segs + segs[i]; chk += seg->check; cnt += seg->count; age += (db->epoch - seg->epoch) & 0xff; } unsigned data0 = db->segs[segs[0]].data; unsigned chk0 = data0 % 211; chk %= 211; dbprintf(2, " chk=%d ?= %d", chk, chk0); if(chk != chk0) continue; dbprintf(2, " cnt=%d age=%d", cnt, age); if(maxcnt > cnt || (maxcnt == cnt && maxage <= age)) continue; dbprintf(2, " !"); maxcnt = cnt; maxage = age; for(i = 0; segs[i] >= 0; i++) bestsegs[i] = segs[i]; bestsegs[i] = -1; } if(bestsegs[0] < 0) return(ZBAR_PARTIAL); if(acquire_lock(dcode, ZBAR_DATABAR_EXP)) return(ZBAR_PARTIAL); for(i = 0; bestsegs[i] >= 0; i++) segs[i] = db->segs[bestsegs[i]].data; if(databar_postprocess_exp(dcode, segs)) { release_lock(dcode, ZBAR_DATABAR_EXP); return(ZBAR_PARTIAL); } for(i = 0; bestsegs[i] >= 0; i++) if(bestsegs[i] != ifixed) { seg = db->segs + bestsegs[i]; if(!--seg->count) seg->finder = -1; } /* FIXME stacked rows are frequently reversed, * so direction is impossible to determine at this level */ dcode->direction = (1 - 2 * (seg->side ^ seg->color)) * dir; dcode->modifiers = MOD(ZBAR_MOD_GS1); return(ZBAR_DATABAR_EXP); } #undef IDX static inline unsigned calc_check (unsigned sig0, unsigned sig1, unsigned side, unsigned mod) { unsigned chk = 0; int i; for(i = 4; --i >= 0; ) { chk = (chk * 3 + (sig1 & 0xf) + 1) * 3 + (sig0 & 0xf) + 1; sig1 >>= 4; sig0 >>= 4; if(!(i & 1)) chk %= mod; } dbprintf(2, " chk=%d", chk); if(side) chk = (chk * (6561 % mod)) % mod; return(chk); } static inline int calc_value4 (unsigned sig, unsigned n, unsigned wmax, unsigned nonarrow) { unsigned v = 0; n--; unsigned w0 = (sig >> 12) & 0xf; if(w0 > 1) { if(w0 > wmax) return(-1); unsigned n0 = n - w0; unsigned sk20 = (n - 1) * n * (2 * n - 1); unsigned sk21 = n0 * (n0 + 1) * (2 * n0 + 1); v = sk20 - sk21 - 3 * (w0 - 1) * (2 * n - w0); if(!nonarrow && w0 > 2 && n > 4) { unsigned k = (n - 2) * (n - 1) * (2 * n - 3) - sk21; k -= 3 * (w0 - 2) * (14 * n - 7 * w0 - 31); v -= k; } if(n - 2 > wmax) { unsigned wm20 = 2 * wmax * (wmax + 1); unsigned wm21 = (2 * wmax + 1); unsigned k = sk20; if(n0 > wmax) { k -= sk21; k += 3 * (w0 - 1) * (wm20 - wm21 * (2 * n - w0)); } else { k -= (wmax + 1) * (wmax + 2) * (2 * wmax + 3); k += 3 * (n - wmax - 2) * (wm20 - wm21 * (n + wmax + 1)); } k *= 3; v -= k; } v /= 12; } else nonarrow = 1; n -= w0; unsigned w1 = (sig >> 8) & 0xf; if(w1 > 1) { if(w1 > wmax) return(-1); v += (2 * n - w1) * (w1 - 1) / 2; if(!nonarrow && w1 > 2 && n > 3) v -= (2 * n - w1 - 5) * (w1 - 2) / 2; if(n - 1 > wmax) { if(n - w1 > wmax) v -= (w1 - 1) * (2 * n - w1 - 2 * wmax); else v -= (n - wmax) * (n - wmax - 1); } } else nonarrow = 1; n -= w1; unsigned w2 = (sig >> 4) & 0xf; if(w2 > 1) { if(w2 > wmax) return(-1); v += w2 - 1; if(!nonarrow && w2 > 2 && n > 2) v -= n - 2; if(n > wmax) v -= n - wmax; } else nonarrow = 1; unsigned w3 = sig & 0xf; if(w3 == 1) nonarrow = 1; else if(w3 > wmax) return(-1); if(!nonarrow) return(-1); return(v); } static inline zbar_symbol_type_t decode_char (zbar_decoder_t *dcode, databar_segment_t *seg, int off, int dir) { databar_decoder_t *db = &dcode->databar; unsigned s = calc_s(dcode, (dir > 0) ? off : off - 6, 8); int n, i, emin[2] = { 0, }, sum = 0; unsigned sig0 = 0, sig1 = 0; if(seg->exp) n = 17; else if(seg->side) n = 15; else n = 16; emin[1] = -n; dbprintf(2, "\n char[%c%d]: n=%d s=%d w=%d sig=", (dir < 0) ? '>' : '<', off, n, s, seg->width); if(s < 13 || !check_width(seg->width, s, n)) return(ZBAR_NONE); for(i = 4; --i >= 0; ) { int e = decode_e(pair_width(dcode, off), s, n); if(e < 0) return(ZBAR_NONE); dbprintf(2, "%d", e); sum = e - sum; off += dir; sig1 <<= 4; if(emin[1] < -sum) emin[1] = -sum; sig1 += sum; if(!i) break; e = decode_e(pair_width(dcode, off), s, n); if(e < 0) return(ZBAR_NONE); dbprintf(2, "%d", e); sum = e - sum; off += dir; sig0 <<= 4; if(emin[0] > sum) emin[0] = sum; sig0 += sum; } int diff = emin[~n & 1]; diff = diff + (diff << 4); diff = diff + (diff << 8); sig0 -= diff; sig1 += diff; dbprintf(2, " emin=%d,%d el=%04x/%04x", emin[0], emin[1], sig0, sig1); unsigned sum0 = sig0 + (sig0 >> 8); unsigned sum1 = sig1 + (sig1 >> 8); sum0 += sum0 >> 4; sum1 += sum1 >> 4; sum0 &= 0xf; sum1 &= 0xf; dbprintf(2, " sum=%d/%d", sum0, sum1); if(sum0 + sum1 + 8 != n) { dbprintf(2, " [SUM]"); return(ZBAR_NONE); } if(((sum0 ^ (n >> 1)) | (sum1 ^ (n >> 1) ^ n)) & 1) { dbprintf(2, " [ODD]"); return(ZBAR_NONE); } i = ((n & 0x3) ^ 1) * 5 + (sum1 >> 1); zassert(i < sizeof(groups) / sizeof(*groups), -1, "n=%d sum=%d/%d sig=%04x/%04x g=%d", n, sum0, sum1, sig0, sig1, i); struct group_s *g = groups + i; dbprintf(2, "\n g=%d(%d,%d,%d/%d)", i, g->sum, g->wmax, g->todd, g->teven); int vodd = calc_value4(sig0 + 0x1111, sum0 + 4, g->wmax, ~n & 1); dbprintf(2, " v=%d", vodd); if(vodd < 0 || vodd > g->todd) return(ZBAR_NONE); int veven = calc_value4(sig1 + 0x1111, sum1 + 4, 9 - g->wmax, n & 1); dbprintf(2, "/%d", veven); if(veven < 0 || veven > g->teven) return(ZBAR_NONE); int v = g->sum; if(n & 2) v += vodd + veven * g->todd; else v += veven + vodd * g->teven; dbprintf(2, " f=%d(%x%x%x)", seg->finder, seg->exp, seg->color, seg->side); unsigned chk = 0; if(seg->exp) { unsigned side = seg->color ^ seg->side ^ 1; if(v >= 4096) return(ZBAR_NONE); /* skip A1 left */ chk = calc_check(sig0, sig1, side, 211); if(seg->finder || seg->color || seg->side) { i = (seg->finder << 1) - side + seg->color; zassert(i >= 0 && i < 12, ZBAR_NONE, "f=%d(%x%x%x) side=%d i=%d\n", seg->finder, seg->exp, seg->color, seg->side, side, i); chk = (chk * exp_checksums[i]) % 211; } else if(v >= 4009) return(ZBAR_NONE); else chk = 0; } else { chk = calc_check(sig0, sig1, seg->side, 79); if(seg->color) chk = (chk * 16) % 79; } dbprintf(2, " => %d val=%d", chk, v); seg->check = chk; seg->data = v; merge_segment(db, seg); if(seg->exp) return(match_segment_exp(dcode, seg, dir)); else if(dir > 0) return(match_segment(dcode, seg)); return(ZBAR_PARTIAL); } static inline int alloc_segment (databar_decoder_t *db) { unsigned maxage = 0, csegs = db->csegs; int i, old = -1; for(i = 0; i < csegs; i++) { databar_segment_t *seg = db->segs + i; unsigned age; if(seg->finder < 0) { dbprintf(2, " free@%d", i); return(i); } age = (db->epoch - seg->epoch) & 0xff; if(age >= 128 && seg->count < 2) { seg->finder = -1; dbprintf(2, " stale@%d (%d - %d = %d)", i, db->epoch, seg->epoch, age); return(i); } /* score based on both age and count */ if(age > seg->count) age = age - seg->count + 1; else age = 1; if(maxage < age) { maxage = age; old = i; dbprintf(2, " old@%d(%u)", i, age); } } if(csegs < DATABAR_MAX_SEGMENTS) { dbprintf(2, " new@%d", i); i = csegs; csegs *= 2; if(csegs > DATABAR_MAX_SEGMENTS) csegs = DATABAR_MAX_SEGMENTS; if(csegs != db->csegs) { databar_segment_t *seg; db->segs = realloc(db->segs, csegs * sizeof(*db->segs)); db->csegs = csegs; seg = db->segs + csegs; while(--seg, --csegs >= i) { seg->finder = -1; seg->exp = 0; seg->color = 0; seg->side = 0; seg->partial = 0; seg->count = 0; seg->epoch = 0; seg->check = 0; } return(i); } } zassert(old >= 0, -1, "\n"); db->segs[old].finder = -1; return(old); } static inline zbar_symbol_type_t decode_finder (zbar_decoder_t *dcode) { databar_decoder_t *db = &dcode->databar; databar_segment_t *seg; unsigned e0 = pair_width(dcode, 1); unsigned e2 = pair_width(dcode, 3); unsigned e1, e3, s, finder, dir; int sig, iseg; dbprintf(2, " databar: e0=%d e2=%d", e0, e2); if(e0 < e2) { unsigned e = e2 * 4; if(e < 15 * e0 || e > 34 * e0) return(ZBAR_NONE); dir = 0; e3 = pair_width(dcode, 4); } else { unsigned e = e0 * 4; if(e < 15 * e2 || e > 34 * e2) return(ZBAR_NONE); dir = 1; e2 = e0; e3 = pair_width(dcode, 0); } e1 = pair_width(dcode, 2); s = e1 + e3; dbprintf(2, " e1=%d e3=%d dir=%d s=%d", e1, e3, dir, s); if(s < 12) return(ZBAR_NONE); sig = ((decode_e(e3, s, 14) << 8) | (decode_e(e2, s, 14) << 4) | decode_e(e1, s, 14)); dbprintf(2, " sig=%04x", sig & 0xfff); if(sig < 0 || ((sig >> 4) & 0xf) < 8 || ((sig >> 4) & 0xf) > 10 || (sig & 0xf) >= 10 || ((sig >> 8) & 0xf) >= 10 || (((sig >> 8) + sig) & 0xf) != 10) return(ZBAR_NONE); finder = (finder_hash[(sig - (sig >> 5)) & 0x1f] + finder_hash[(sig >> 1) & 0x1f]) & 0x1f; dbprintf(2, " finder=%d", finder); if(finder == 0x1f || !TEST_CFG((finder < 9) ? db->config : db->config_exp, ZBAR_CFG_ENABLE)) return(ZBAR_NONE); zassert(finder >= 0, ZBAR_NONE, "dir=%d sig=%04x f=%d\n", dir, sig & 0xfff, finder); iseg = alloc_segment(db); if(iseg < 0) return(ZBAR_NONE); seg = db->segs + iseg; seg->finder = (finder >= 9) ? finder - 9 : finder; seg->exp = (finder >= 9); seg->color = get_color(dcode) ^ dir ^ 1; seg->side = dir; seg->partial = 0; seg->count = 1; seg->width = s; seg->epoch = db->epoch; int rc = decode_char(dcode, seg, 12 - dir, -1); if(!rc) seg->partial = 1; else db->epoch++; int i = (dcode->idx + 8 + dir) & 0xf; zassert(db->chars[i] == -1, ZBAR_NONE, "\n"); db->chars[i] = iseg; return(rc); } zbar_symbol_type_t _zbar_decode_databar (zbar_decoder_t *dcode) { databar_decoder_t *db = &dcode->databar; databar_segment_t *seg, *pair; zbar_symbol_type_t sym; int iseg, i = dcode->idx & 0xf; sym = decode_finder(dcode); dbprintf(2, "\n"); iseg = db->chars[i]; if(iseg < 0) return(sym); db->chars[i] = -1; seg = db->segs + iseg; dbprintf(2, " databar: i=%d part=%d f=%d(%x%x%x)", iseg, seg->partial, seg->finder, seg->exp, seg->color, seg->side); zassert(seg->finder >= 0, ZBAR_NONE, "i=%d f=%d(%x%x%x) part=%x\n", iseg, seg->finder, seg->exp, seg->color, seg->side, seg->partial); if(seg->partial) { pair = NULL; seg->side = !seg->side; } else { int jseg = alloc_segment(db); pair = db->segs + iseg; seg = db->segs + jseg; seg->finder = pair->finder; seg->exp = pair->exp; seg->color = pair->color; seg->side = !pair->side; seg->partial = 0; seg->count = 1; seg->width = pair->width; seg->epoch = db->epoch; } sym = decode_char(dcode, seg, 1, 1); if(!sym) { seg->finder = -1; if(pair) pair->partial = 1; } else db->epoch++; dbprintf(2, "\n"); return(sym); } zbar-0.23/zbar/decoder/ean.h0000664000175000017500000000631613471225700012605 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _EAN_H_ #define _EAN_H_ /* state of each parallel decode attempt */ typedef struct ean_pass_s { signed char state; /* module position of w[idx] in symbol */ #define STATE_REV 0x80 /* scan direction reversed */ #define STATE_ADDON 0x40 /* scanning add-on */ #define STATE_IDX 0x3f /* element offset into symbol */ unsigned width; /* width of last character */ unsigned char raw[7]; /* decode in process */ } ean_pass_t; /* EAN/UPC specific decode state */ typedef struct ean_decoder_s { ean_pass_t pass[4]; /* state of each parallel decode attempt */ zbar_symbol_type_t left; /* current holding buffer contents */ zbar_symbol_type_t right; int direction; /* scan direction */ unsigned s4, width; /* character width */ signed char buf[18]; /* holding buffer */ signed char enable; unsigned ean13_config; unsigned ean8_config; unsigned upca_config; unsigned upce_config; unsigned isbn10_config; unsigned isbn13_config; unsigned ean5_config; unsigned ean2_config; } ean_decoder_t; /* reset EAN/UPC pass specific state */ static inline void ean_new_scan (ean_decoder_t *ean) { ean->pass[0].state = ean->pass[1].state = -1; ean->pass[2].state = ean->pass[3].state = -1; ean->s4 = 0; } /* reset all EAN/UPC state */ static inline void ean_reset (ean_decoder_t *ean) { ean_new_scan(ean); ean->left = ean->right = ZBAR_NONE; } static inline unsigned ean_get_config (ean_decoder_t *ean, zbar_symbol_type_t sym) { switch(sym) { case ZBAR_EAN2: return(ean->ean2_config); case ZBAR_EAN5: return(ean->ean5_config); case ZBAR_EAN8: return(ean->ean8_config); case ZBAR_UPCE: return(ean->upce_config); case ZBAR_ISBN10: return(ean->isbn10_config); case ZBAR_UPCA: return(ean->upca_config); case ZBAR_EAN13: return(ean->ean13_config); case ZBAR_ISBN13: return(ean->isbn13_config); default: return(0); } } /* decode EAN/UPC symbols */ zbar_symbol_type_t _zbar_decode_ean(zbar_decoder_t *dcode); #endif zbar-0.23/zbar/decoder/code128.c0000664000175000017500000004777613471225716013230 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #include /* memmove */ #include #ifdef DEBUG_CODE128 # define DEBUG_LEVEL (DEBUG_CODE128) #endif #include "debug.h" #include "decoder.h" #define NUM_CHARS 108 /* total number of character codes */ typedef enum code128_char_e { FNC3 = 0x60, FNC2 = 0x61, SHIFT = 0x62, CODE_C = 0x63, CODE_B = 0x64, CODE_A = 0x65, FNC1 = 0x66, START_A = 0x67, START_B = 0x68, START_C = 0x69, STOP_FWD = 0x6a, STOP_REV = 0x6b, FNC4 = 0x6c, } code128_char_t; static const unsigned char characters[NUM_CHARS] = { 0x5c, 0xbf, 0xa1, /* [00] 00 */ 0x2a, 0xc5, 0x0c, 0xa4, /* [03] 01 */ 0x2d, 0xe3, 0x0f, /* [07] 02 */ 0x5f, 0xe4, /* [0a] 03 */ 0x6b, 0xe8, 0x69, 0xa7, 0xe7, /* [0c] 10 */ 0xc1, 0x51, 0x1e, 0x83, 0xd9, 0x00, 0x84, 0x1f, /* [11] 11 */ 0xc7, 0x0d, 0x33, 0x86, 0xb5, 0x0e, 0x15, 0x87, /* [19] 12 */ 0x10, 0xda, 0x11, /* [21] 13 */ 0x36, 0xe5, 0x18, 0x37, /* [24] 20 */ 0xcc, 0x13, 0x39, 0x89, 0x97, 0x14, 0x1b, 0x8a, 0x3a, 0xbd, /* [28] 21 */ 0xa2, 0x5e, 0x01, 0x85, 0xb0, 0x02, 0xa3, /* [32] 22 */ 0xa5, 0x2c, 0x16, 0x88, 0xbc, 0x12, 0xa6, /* [39] 23 */ 0x61, 0xe6, 0x56, 0x62, /* [40] 30 */ 0x19, 0xdb, 0x1a, /* [44] 31 */ 0xa8, 0x32, 0x1c, 0x8b, 0xcd, 0x1d, 0xa9, /* [47] 32 */ 0xc3, 0x20, 0xc4, /* [4e] 33 */ 0x50, 0x5d, 0xc0, /* [51] 0014 0025 0034 */ 0x2b, 0xc6, /* [54] 0134 0143 */ 0x2e, /* [56] 0243 */ 0x53, 0x60, /* [57] 0341 0352 */ 0x31, /* [59] 1024 */ 0x52, 0xc2, /* [5a] 1114 1134 */ 0x34, 0xc8, /* [5c] 1242 1243 */ 0x55, /* [5e] 1441 */ 0x57, 0x3e, 0xce, /* [5f] 4100 5200 4300 */ 0x3b, 0xc9, /* [62] 4310 3410 */ 0x6a, /* [64] 3420 */ 0x54, 0x4f, /* [65] 1430 2530 */ 0x38, /* [67] 4201 */ 0x58, 0xcb, /* [68] 4111 4311 */ 0x2f, 0xca, /* [6a] 2421 3421 */ }; static const unsigned char lo_base[8] = { 0x00, 0x07, 0x0c, 0x19, 0x24, 0x32, 0x40, 0x47 }; static const unsigned char lo_offset[0x80] = { 0xff, 0xf0, 0xff, 0x1f, 0xff, 0xf2, 0xff, 0xff, /* 00 [00] */ 0xff, 0xff, 0xff, 0x3f, 0xf4, 0xf5, 0xff, 0x6f, /* 01 */ 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf1, 0xff, 0x2f, /* 02 [07] */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x4f, /* 03 */ 0xff, 0x0f, 0xf1, 0xf2, 0xff, 0x3f, 0xff, 0xf4, /* 10 [0c] */ 0xf5, 0xf6, 0xf7, 0x89, 0xff, 0xab, 0xff, 0xfc, /* 11 */ 0xff, 0xff, 0x0f, 0x1f, 0x23, 0x45, 0xf6, 0x7f, /* 12 [19] */ 0xff, 0xff, 0xff, 0xff, 0xf8, 0xff, 0xf9, 0xaf, /* 13 */ 0xf0, 0xf1, 0xff, 0x2f, 0xff, 0xf3, 0xff, 0xff, /* 20 [24] */ 0x4f, 0x5f, 0x67, 0x89, 0xfa, 0xbf, 0xff, 0xcd, /* 21 */ 0xf0, 0xf1, 0xf2, 0x3f, 0xf4, 0x56, 0xff, 0xff, /* 22 [32] */ 0xff, 0xff, 0x7f, 0x8f, 0x9a, 0xff, 0xbc, 0xdf, /* 23 */ 0x0f, 0x1f, 0xf2, 0xff, 0xff, 0x3f, 0xff, 0xff, /* 30 [40] */ 0xf4, 0xff, 0xf5, 0x6f, 0xff, 0xff, 0xff, 0xff, /* 31 */ 0x0f, 0x1f, 0x23, 0xff, 0x45, 0x6f, 0xff, 0xff, /* 32 [47] */ 0xf7, 0xff, 0xf8, 0x9f, 0xff, 0xff, 0xff, 0xff, /* 33 */ }; static inline signed char decode_lo (int sig) { unsigned char offset = (((sig >> 1) & 0x01) | ((sig >> 3) & 0x06) | ((sig >> 5) & 0x18) | ((sig >> 7) & 0x60)); unsigned char idx = lo_offset[offset]; unsigned char base, c; if(sig & 1) idx &= 0xf; else idx >>= 4; if(idx == 0xf) return(-1); base = (sig >> 11) | ((sig >> 9) & 1); zassert(base < 8, -1, "sig=%x offset=%x idx=%x base=%x\n", sig, offset, idx, base); idx += lo_base[base]; zassert(idx <= 0x50, -1, "sig=%x offset=%x base=%x idx=%x\n", sig, offset, base, idx); c = characters[idx]; dbprintf(2, " %02x(%x(%02x)/%x(%02x)) => %02x", idx, base, lo_base[base], offset, lo_offset[offset], (unsigned char)c); return(c); } static inline signed char decode_hi (int sig) { unsigned char rev = (sig & 0x4400) != 0; unsigned char idx, c; if(rev) sig = (((sig >> 12) & 0x000f) | ((sig >> 4) & 0x00f0) | ((sig << 4) & 0x0f00) | ((sig << 12) & 0xf000)); dbprintf(2, " rev=%x", rev != 0); switch(sig) { case 0x0014: idx = 0x0; break; case 0x0025: idx = 0x1; break; case 0x0034: idx = 0x2; break; case 0x0134: idx = 0x3; break; case 0x0143: idx = 0x4; break; case 0x0243: idx = 0x5; break; case 0x0341: idx = 0x6; break; case 0x0352: idx = 0x7; break; case 0x1024: idx = 0x8; break; case 0x1114: idx = 0x9; break; case 0x1134: idx = 0xa; break; case 0x1242: idx = 0xb; break; case 0x1243: idx = 0xc; break; case 0x1441: idx = 0xd; rev = 0; break; default: return(-1); } if(rev) idx += 0xe; c = characters[0x51 + idx]; dbprintf(2, " %02x => %02x", idx, c); return(c); } static inline unsigned char calc_check (unsigned char c) { if(!(c & 0x80)) return(0x18); c &= 0x7f; if(c < 0x3d) return((c < 0x30 && c != 0x17) ? 0x10 : 0x20); if(c < 0x50) return((c == 0x4d) ? 0x20 : 0x10); return((c < 0x67) ? 0x20 : 0x10); } static inline signed char decode6 (zbar_decoder_t *dcode) { int sig; signed char c, chk; unsigned bars; /* build edge signature of character */ unsigned s = dcode->code128.s6; dbprintf(2, " s=%d", s); if(s < 5) return(-1); /* calculate similar edge measurements */ sig = (get_color(dcode) == ZBAR_BAR) ? ((decode_e(get_width(dcode, 0) + get_width(dcode, 1), s, 11) << 12) | (decode_e(get_width(dcode, 1) + get_width(dcode, 2), s, 11) << 8) | (decode_e(get_width(dcode, 2) + get_width(dcode, 3), s, 11) << 4) | (decode_e(get_width(dcode, 3) + get_width(dcode, 4), s, 11))) : ((decode_e(get_width(dcode, 5) + get_width(dcode, 4), s, 11) << 12) | (decode_e(get_width(dcode, 4) + get_width(dcode, 3), s, 11) << 8) | (decode_e(get_width(dcode, 3) + get_width(dcode, 2), s, 11) << 4) | (decode_e(get_width(dcode, 2) + get_width(dcode, 1), s, 11))); if(sig < 0) return(-1); dbprintf(2, " sig=%04x", sig); /* lookup edge signature */ c = (sig & 0x4444) ? decode_hi(sig) : decode_lo(sig); if(c == -1) return(-1); /* character validation */ bars = (get_color(dcode) == ZBAR_BAR) ? (get_width(dcode, 0) + get_width(dcode, 2) + get_width(dcode, 4)) : (get_width(dcode, 1) + get_width(dcode, 3) + get_width(dcode, 5)); bars = bars * 11 * 4 / s; chk = calc_check(c); dbprintf(2, " bars=%d chk=%d", bars, chk); if(chk - 7 > bars || bars > chk + 7) return(-1); return(c & 0x7f); } static inline unsigned char validate_checksum (zbar_decoder_t *dcode) { unsigned idx, sum, i, acc = 0; unsigned char check, err; code128_decoder_t *dcode128 = &dcode->code128; if(dcode128->character < 3) return(1); /* add in irregularly weighted start character */ idx = (dcode128->direction) ? dcode128->character - 1 : 0; sum = dcode->buf[idx]; if(sum >= 103) sum -= 103; /* calculate sum in reverse to avoid multiply operations */ for(i = dcode128->character - 3; i; i--) { zassert(sum < 103, -1, "dir=%x i=%x sum=%x acc=%x %s\n", dcode128->direction, i, sum, acc, _zbar_decoder_buf_dump(dcode->buf, dcode128->character)); idx = (dcode128->direction) ? dcode128->character - 1 - i : i; acc += dcode->buf[idx]; if(acc >= 103) acc -= 103; zassert(acc < 103, -1, "dir=%x i=%x sum=%x acc=%x %s\n", dcode128->direction, i, sum, acc, _zbar_decoder_buf_dump(dcode->buf, dcode128->character)); sum += acc; if(sum >= 103) sum -= 103; } /* and compare to check character */ idx = (dcode128->direction) ? 1 : dcode128->character - 2; check = dcode->buf[idx]; dbprintf(2, " chk=%02x(%02x)", sum, check); err = (sum != check); if(err) dbprintf(1, " [checksum error]\n"); return(err); } /* expand and decode character set C */ static inline unsigned postprocess_c (zbar_decoder_t *dcode, unsigned start, unsigned end, unsigned dst) { unsigned i, j; /* expand buffer to accommodate 2x set C characters (2 digits per-char) */ unsigned delta = end - start; unsigned newlen = dcode->code128.character + delta; if (size_buf(dcode, newlen)) { dbprintf(2, " [overflow]\n"); return ZBAR_NONE; } /* relocate unprocessed data to end of buffer */ memmove(dcode->buf + start + delta, dcode->buf + start, dcode->code128.character - start); dcode->code128.character = newlen; for(i = 0, j = dst; i < delta; i++, j += 2) { /* convert each set C character into two ASCII digits */ unsigned char code = dcode->buf[start + delta + i]; dcode->buf[j] = '0'; if(code >= 50) { code -= 50; dcode->buf[j] += 5; } if(code >= 30) { code -= 30; dcode->buf[j] += 3; } if(code >= 20) { code -= 20; dcode->buf[j] += 2; } if(code >= 10) { code -= 10; dcode->buf[j] += 1; } zassert(dcode->buf[j] <= '9', delta, "start=%x end=%x i=%x j=%x %s\n", start, end, i, j, _zbar_decoder_buf_dump(dcode->buf, dcode->code128.character)); zassert(code <= 9, delta, "start=%x end=%x i=%x j=%x %s\n", start, end, i, j, _zbar_decoder_buf_dump(dcode->buf, dcode->code128.character)); dcode->buf[j + 1] = '0' + code; } return(delta); } /* resolve scan direction and convert to ASCII */ static inline unsigned char postprocess (zbar_decoder_t *dcode) { unsigned i, j, cexp; unsigned char code = 0, charset; code128_decoder_t *dcode128 = &dcode->code128; dbprintf(2, "\n postproc len=%d", dcode128->character); dcode->modifiers = 0; dcode->direction = 1 - 2 * dcode128->direction; if(dcode128->direction) { /* reverse buffer */ dbprintf(2, " (rev)"); for(i = 0; i < dcode128->character / 2; i++) { unsigned j = dcode128->character - 1 - i; code = dcode->buf[i]; dcode->buf[i] = dcode->buf[j]; dcode->buf[j] = code; } zassert(dcode->buf[dcode128->character - 1] == STOP_REV, 1, "dir=%x %s\n", dcode128->direction, _zbar_decoder_buf_dump(dcode->buf, dcode->code128.character)); } else zassert(dcode->buf[dcode128->character - 1] == STOP_FWD, 1, "dir=%x %s\n", dcode128->direction, _zbar_decoder_buf_dump(dcode->buf, dcode->code128.character)); code = dcode->buf[0]; zassert(code >= START_A && code <= START_C, 1, "%s\n", _zbar_decoder_buf_dump(dcode->buf, dcode->code128.character)); charset = code - START_A; cexp = (code == START_C) ? 1 : 0; dbprintf(2, " start=%c", 'A' + charset); for(i = 1, j = 0; i < dcode128->character - 2; i++) { unsigned char code = dcode->buf[i]; zassert(!(code & 0x80), 1, "i=%x j=%x code=%02x charset=%x cexp=%x %s\n", i, j, code, charset, cexp, _zbar_decoder_buf_dump(dcode->buf, dcode->code128.character)); if((charset & 0x2) && (code < 100)) /* defer character set C for expansion */ continue; else if(code < 0x60) { /* convert character set B to ASCII */ code = code + 0x20; if((!charset || (charset == 0x81)) && (code >= 0x60)) /* convert character set A to ASCII */ code -= 0x60; dcode->buf[j++] = code; if(charset & 0x80) charset &= 0x7f; } else { dbprintf(2, " %02x", code); if(charset & 0x2) { unsigned delta; /* expand character set C to ASCII */ zassert(cexp, 1, "i=%x j=%x code=%02x charset=%x cexp=%x %s\n", i, j, code, charset, cexp, _zbar_decoder_buf_dump(dcode->buf, dcode->code128.character)); delta = postprocess_c(dcode, cexp, i, j); i += delta; j += delta * 2; cexp = 0; } if(code < CODE_C) { if(code == SHIFT) charset |= 0x80; else if(code == FNC2) { /* FIXME FNC2 - message append */ } else if(code == FNC3) { /* FIXME FNC3 - initialize */ } } else if(code == FNC1) { /* FNC1 - Code 128 subsets or ASCII 0x1d */ if(i == 1) dcode->modifiers |= MOD(ZBAR_MOD_GS1); else if(i == 2) dcode->modifiers |= MOD(ZBAR_MOD_AIM); else if(i < dcode->code128.character - 3) dcode->buf[j++] = 0x1d; /*else drop trailing FNC1 */ } else if(code >= START_A) { dbprintf(1, " [truncated]\n"); return(1); } else { unsigned char newset = CODE_A - code; zassert(code >= CODE_C && code <= CODE_A, 1, "i=%x j=%x code=%02x charset=%x cexp=%x %s\n", i, j, code, charset, cexp, _zbar_decoder_buf_dump(dcode->buf, dcode->code128.character)); if(newset != charset) charset = newset; else { /* FIXME FNC4 - extended ASCII */ } } if(charset & 0x2) cexp = i + 1; } } if(charset & 0x2) { zassert(cexp, 1, "i=%x j=%x code=%02x charset=%x cexp=%x %s\n", i, j, code, charset, cexp, _zbar_decoder_buf_dump(dcode->buf, dcode->code128.character)); j += postprocess_c(dcode, cexp, i, j) * 2; } zassert(j < dcode->buf_alloc, 1, "j=%02x %s\n", j, _zbar_decoder_buf_dump(dcode->buf, dcode->code128.character)); dcode->buflen = j; dcode->buf[j] = '\0'; dcode->code128.character = j; return(0); } zbar_symbol_type_t _zbar_decode_code128 (zbar_decoder_t *dcode) { code128_decoder_t *dcode128 = &dcode->code128; signed char c; /* update latest character width */ dcode128->s6 -= get_width(dcode, 6); dcode128->s6 += get_width(dcode, 0); if((dcode128->character < 0) ? get_color(dcode) != ZBAR_SPACE : (/* process every 6th element of active symbol */ ++dcode128->element != 6 || /* decode color based on direction */ get_color(dcode) != dcode128->direction)) return(0); dcode128->element = 0; dbprintf(2, " code128[%c%02d+%x]:", (dcode128->direction) ? '<' : '>', dcode128->character, dcode128->element); c = decode6(dcode); if(dcode128->character < 0) { unsigned qz; dbprintf(2, " c=%02x", c); if(c < START_A || c > STOP_REV || c == STOP_FWD) { dbprintf(2, " [invalid]\n"); return(0); } qz = get_width(dcode, 6); if(qz && qz < (dcode128->s6 * 3) / 4) { dbprintf(2, " [invalid qz %d]\n", qz); return(0); } /* decoded valid start/stop */ /* initialize state */ dcode128->character = 1; if(c == STOP_REV) { dcode128->direction = ZBAR_BAR; dcode128->element = 7; } else dcode128->direction = ZBAR_SPACE; dcode128->start = c; dcode128->width = dcode128->s6; dbprintf(2, " dir=%x [valid start]\n", dcode128->direction); return(0); } else if(c < 0 || size_buf(dcode, dcode128->character + 1)) { dbprintf(1, (c < 0) ? " [aborted]\n" : " [overflow]\n"); if(dcode128->character > 1) release_lock(dcode, ZBAR_CODE128); dcode128->character = -1; return(0); } else { unsigned dw; if(dcode128->width > dcode128->s6) dw = dcode128->width - dcode128->s6; else dw = dcode128->s6 - dcode128->width; dw *= 4; if(dw > dcode128->width) { dbprintf(1, " [width var]\n"); if(dcode128->character > 1) release_lock(dcode, ZBAR_CODE128); dcode128->character = -1; return(0); } } dcode128->width = dcode128->s6; zassert(dcode->buf_alloc > dcode128->character, 0, "alloc=%x idx=%x c=%02x %s\n", dcode->buf_alloc, dcode128->character, c, _zbar_decoder_buf_dump(dcode->buf, dcode->buf_alloc)); if(dcode128->character == 1) { /* lock shared resources */ if(acquire_lock(dcode, ZBAR_CODE128)) { dcode128->character = -1; return(0); } dcode->buf[0] = dcode128->start; } dcode->buf[dcode128->character++] = c; if(dcode128->character > 2 && ((dcode128->direction) ? c >= START_A && c <= START_C : c == STOP_FWD)) { /* FIXME STOP_FWD should check extra bar (and QZ!) */ zbar_symbol_type_t sym = ZBAR_CODE128; if(validate_checksum(dcode) || postprocess(dcode)) sym = ZBAR_NONE; else if(dcode128->character < CFG(*dcode128, ZBAR_CFG_MIN_LEN) || (CFG(*dcode128, ZBAR_CFG_MAX_LEN) > 0 && dcode128->character > CFG(*dcode128, ZBAR_CFG_MAX_LEN))) { dbprintf(2, " [invalid len]\n"); sym = ZBAR_NONE; } else dbprintf(2, " [valid end]\n"); dcode128->character = -1; if(!sym) release_lock(dcode, ZBAR_CODE128); return(sym); } dbprintf(2, "\n"); return(0); } zbar-0.23/zbar/decoder/code128.h0000664000175000017500000000370613471225700013207 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _CODE128_H_ #define _CODE128_H_ /* Code 128 specific decode state */ typedef struct code128_decoder_s { unsigned direction : 1; /* scan direction: 0=fwd/space, 1=rev/bar */ unsigned element : 3; /* element offset 0-5 */ int character : 12; /* character position in symbol */ unsigned char start; /* start character */ unsigned s6; /* character width */ unsigned width; /* last character width */ unsigned config; int configs[NUM_CFGS]; /* int valued configurations */ } code128_decoder_t; /* reset Code 128 specific state */ static inline void code128_reset (code128_decoder_t *dcode128) { dcode128->direction = 0; dcode128->element = 0; dcode128->character = -1; dcode128->s6 = 0; } /* decode Code 128 symbols */ zbar_symbol_type_t _zbar_decode_code128(zbar_decoder_t *dcode); #endif zbar-0.23/zbar/decoder/pdf417.c0000664000175000017500000001543113471225700013040 00000000000000/*------------------------------------------------------------------------ * Copyright 2008-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #include #ifdef DEBUG_PDF417 # define DEBUG_LEVEL (DEBUG_PDF417) #endif #include "debug.h" #include "decoder.h" #include "pdf417_hash.h" #define PDF417_STOP 0xbff static inline signed short pdf417_decode8 (zbar_decoder_t *dcode) { /* build edge signature of character * from similar edge measurements */ unsigned s = dcode->pdf417.s8; dbprintf(2, " s=%d ", s); if(s < 8) return(-1); long sig = 0; signed char e; unsigned char i; for(i = 0; i < 7; i++) { if(get_color(dcode) == ZBAR_SPACE) e = decode_e(get_width(dcode, i) + get_width(dcode, i + 1), s, 17); else e = decode_e(get_width(dcode, 7 - i) + get_width(dcode, 6 - i), s, 17); dbprintf(4, "%x", e); if(e < 0 || e > 8) return(-1); sig = (sig << 3) ^ e; } dbprintf(2, " sig=%06lx", sig); /* determine cluster number */ int clst = ((sig & 7) - ((sig >> 3) & 7) + ((sig >> 12) & 7) - ((sig >> 15) & 7)); if(clst < 0) clst += 9; dbprintf(2, " k=%d", clst); zassert(clst >= 0 && clst < 9, -1, "dir=%x sig=%lx k=%x %s\n", dcode->pdf417.direction, sig, clst, _zbar_decoder_buf_dump(dcode->buf, dcode->pdf417.character)); if(clst != 0 && clst != 3 && clst != 6) { if(get_color(dcode) && clst == 7 && sig == 0x080007) return(PDF417_STOP); return(-1); } signed short g[3]; sig &= 0x3ffff; g[0] = pdf417_hash[(sig - (sig >> 10)) & PDF417_HASH_MASK]; g[1] = pdf417_hash[((sig >> 8) - sig) & PDF417_HASH_MASK]; g[2] = pdf417_hash[((sig >> 14) - (sig >> 1)) & PDF417_HASH_MASK]; zassert(g[0] >= 0 && g[1] >= 0 && g[2] >= 0, -1, "dir=%x sig=%lx k=%x g0=%03x g1=%03x g2=%03x %s\n", dcode->pdf417.direction, sig, clst, g[0], g[1], g[2], _zbar_decoder_buf_dump(dcode->buf, dcode->pdf417.character)); unsigned short c = (g[0] + g[1] + g[2]) & PDF417_HASH_MASK; dbprintf(2, " g0=%x g1=%x g2=%x c=%03d(%d)", g[0], g[1], g[2], c & 0x3ff, c >> 10); return(c); } static inline signed char pdf417_decode_start(zbar_decoder_t *dcode) { unsigned s = dcode->pdf417.s8; if(s < 8) return(0); int ei = decode_e(get_width(dcode, 0) + get_width(dcode, 1), s, 17); int ex = (get_color(dcode) == ZBAR_SPACE) ? 2 : 6; if(ei != ex) return(0); ei = decode_e(get_width(dcode, 1) + get_width(dcode, 2), s, 17); if(ei) return(0); ei = decode_e(get_width(dcode, 2) + get_width(dcode, 3), s, 17); ex = (get_color(dcode) == ZBAR_SPACE) ? 0 : 2; if(ei != ex) return(0); ei = decode_e(get_width(dcode, 3) + get_width(dcode, 4), s, 17); ex = (get_color(dcode) == ZBAR_SPACE) ? 0 : 2; if(ei != ex) return(0); ei = decode_e(get_width(dcode, 4) + get_width(dcode, 5), s, 17); if(ei) return(0); ei = decode_e(get_width(dcode, 5) + get_width(dcode, 6), s, 17); if(ei) return(0); ei = decode_e(get_width(dcode, 6) + get_width(dcode, 7), s, 17); ex = (get_color(dcode) == ZBAR_SPACE) ? 7 : 1; if(ei != ex) return(0); ei = decode_e(get_width(dcode, 7) + get_width(dcode, 8), s, 17); ex = (get_color(dcode) == ZBAR_SPACE) ? 8 : 1; if(get_color(dcode) == ZBAR_BAR) { /* stop character has extra bar */ if(ei != 1) return(0); ei = decode_e(get_width(dcode, 8) + get_width(dcode, 9), s, 17); } dbprintf(2, " pdf417[%c]: s=%d", (get_color(dcode)) ? '<' : '>', s); /* check quiet zone */ if(ei >= 0 && ei < ex) { dbprintf(2, " [invalid quiet]\n"); return(0); } /* lock shared resources */ if(acquire_lock(dcode, ZBAR_PDF417)) { dbprintf(2, " [locked %d]\n", dcode->lock); return(0); } pdf417_decoder_t *dcode417 = &dcode->pdf417; dcode417->direction = get_color(dcode); dcode417->element = 0; dcode417->character = 0; dbprintf(2, " [valid start]\n"); return(ZBAR_PARTIAL); } zbar_symbol_type_t _zbar_decode_pdf417 (zbar_decoder_t *dcode) { pdf417_decoder_t *dcode417 = &dcode->pdf417; /* update latest character width */ dcode417->s8 -= get_width(dcode, 8); dcode417->s8 += get_width(dcode, 0); if(dcode417->character < 0) { pdf417_decode_start(dcode); dbprintf(4, "\n"); return(0); } /* process every 8th element of active symbol */ if(++dcode417->element) return(0); dcode417->element = 0; dbprintf(2, " pdf417[%c%02d]:", (dcode417->direction) ? '<' : '>', dcode417->character); if(get_color(dcode) != dcode417->direction) { int c = dcode417->character; release_lock(dcode, ZBAR_PDF417); dcode417->character = -1; zassert(get_color(dcode) == dcode417->direction, ZBAR_NONE, "color=%x dir=%x char=%d elem=0 %s\n", get_color(dcode), dcode417->direction, c, _zbar_decoder_buf_dump(dcode->buf, c)); } signed short c = pdf417_decode8(dcode); if(c < 0 || size_buf(dcode, dcode417->character + 1)) { dbprintf(1, (c < 0) ? " [aborted]\n" : " [overflow]\n"); release_lock(dcode, ZBAR_PDF417); dcode417->character = -1; return(0); } /* FIXME TBD infer dimensions, save codewords */ if(c == PDF417_STOP) { dbprintf(1, " [valid stop]"); /* FIXME check trailing bar and qz */ dcode->direction = 1 - 2 * dcode417->direction; dcode->modifiers = 0; release_lock(dcode, ZBAR_PDF417); dcode417->character = -1; } dbprintf(2, "\n"); return(0); } zbar-0.23/zbar/decoder/pdf417_hash.h0000664000175000017500000007340613466560613014067 00000000000000/*------------------------------------------------------------------------ * Copyright 2008-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _PDF417_HASH_H_ #define _PDF417_HASH_H_ /* PDF417 bar to codeword decode table */ #define PDF417_HASH_MASK 0xfff static const signed short pdf417_hash[PDF417_HASH_MASK + 1] = { 0x170, 0xd8e, 0x02e, 0x000, 0xa21, 0xc99, 0x000, 0xf06, 0xdaa, 0x7a1, 0xc5f, 0x7ff, 0xbcf, 0xac8, 0x000, 0xc51, 0x49a, 0x5c7, 0x000, 0xef2, 0x000, 0x7dd, 0x9ee, 0xe32, 0x1b7, 0x489, 0x3b7, 0xe70, 0x9c8, 0xe5e, 0xdf4, 0x599, 0x4e0, 0x608, 0x639, 0xead, 0x0ac, 0x57c, 0x000, 0x20d, 0x61b, 0x000, 0x7d1, 0x80f, 0x803, 0x000, 0x946, 0x093, 0x79c, 0xf9c, 0xb34, 0x6d8, 0x4f1, 0x975, 0x886, 0x313, 0xe8a, 0xf20, 0x3c9, 0xa92, 0xb90, 0xa1d, 0x091, 0x0ac, 0xb50, 0x3af, 0x90a, 0x45a, 0x815, 0xf29, 0xb20, 0xb6d, 0xc5c, 0x1cd, 0x1e2, 0x1bf, 0x963, 0x80b, 0xa7c, 0x9b7, 0xb65, 0x6b7, 0x117, 0xc04, 0x000, 0x18e, 0x000, 0x77f, 0xe0e, 0xf48, 0x370, 0x818, 0x379, 0x000, 0x090, 0xe77, 0xd99, 0x8b8, 0xb95, 0x8a9, 0x94c, 0xc48, 0x679, 0x000, 0x41a, 0x9ea, 0xb0e, 0x9c1, 0x1b4, 0x000, 0x630, 0x811, 0x4b1, 0xc05, 0x98f, 0xa68, 0x485, 0x706, 0xfff, 0x0d9, 0xddc, 0x000, 0x83f, 0x54e, 0x290, 0xfe7, 0x64f, 0xf36, 0x000, 0x151, 0xb9b, 0x5cd, 0x961, 0x690, -1, 0xa7a, 0x328, 0x707, 0xe6d, 0xe1f, -1, 0x6a0, 0xf3e, 0xb27, 0x315, 0xc8c, 0x6de, 0x996, 0x2f9, 0xc4c, 0x90f, -1, 0xaa7, 0x9e9, 0xfff, 0x0bb, 0x33b, 0xbc6, 0xe17, 0x000, 0x85d, 0x912, 0x5f7, 0x000, 0xff1, 0xba1, 0x086, 0xa1e, 0x85a, 0x4cf, 0xd47, 0x5a9, 0x5dc, 0x0bc, -1, 0x544, 0x522, 0x1ff, 0xfa6, 0xa83, 0xc7d, 0x545, 0xd75, 0xb6f, 0x284, 0xf11, 0xe46, -1, 0x900, 0x0f3, 0xe31, 0x705, 0x06d, 0xd59, 0x67b, 0xe56, -1, 0xde2, 0x000, 0xd42, -1, 0x24b, 0x000, 0xf87, 0x842, -1, 0xbb9, 0x065, 0x626, 0x86a, 0x9f8, -1, 0x7ac, 0xe20, 0xbe9, 0x357, 0xfff, 0xf82, 0x219, 0x9d4, 0x269, 0x8a6, 0x251, 0x0af, 0xd02, 0x09a, 0x803, 0x0a5, 0xfed, 0x278, -1, 0x338, 0x1e5, 0xcad, 0xf9e, 0x73e, 0xb39, 0xe48, 0x754, -1, 0x680, 0xd99, 0x4d4, 0x80b, 0x4be, 0xb0d, 0x5f2, -1, 0x4b1, 0x38a, 0xff5, 0x000, 0xa1b, 0xece, 0xa06, 0x8e6, 0xdcb, 0xcb8, 0xc63, 0x98c, 0x346, 0x69c, 0x299, 0xa52, 0xfff, 0x000, -1, 0x7b2, 0xbf8, 0x2d1, 0xaff, 0x2f2, 0xd69, 0xf20, -1, 0xdcf, 0x9fb, 0x68f, 0x24e, 0xfd7, 0xfdb, 0x894, 0xc8f, 0x615, 0xa25, 0x36d, 0x1bb, 0x064, 0xb80, 0x280, 0xd7a, -1, 0xd75, 0xc90, 0xdce, 0xdce, 0x011, 0x869, 0xb2f, 0xd24, 0xe26, 0x492, 0xe0a, 0xcae, -1, 0x2ac, 0x38c, 0x0b9, 0xc4f, -1, 0x32b, 0x415, 0x49c, 0x11c, 0x816, 0xd08, 0xf5c, 0x356, 0x2b3, 0xfbf, 0x7ff, 0x35d, 0x276, 0x292, 0x4f5, 0x0e2, 0xc68, 0x4c4, 0x000, 0xb5e, 0xd0b, 0xca7, 0x624, 0x247, 0xf0d, 0x017, 0x7ec, 0x2a6, 0x62c, 0x192, 0x610, 0xd98, 0x7a4, 0xfa3, 0x80b, 0x043, 0xd7b, 0x301, 0x69d, 0x7e4, 0x10c, 0xacb, 0x6eb, 0xea7, 0xe65, 0x75d, 0x4f5, 0x5b0, 0xa50, 0x7b6, 0x0ec, -1, 0xcf9, 0x4b4, 0x639, 0x111, 0xbdf, 0xe89, 0x9fa, 0x76b, 0xdf6, 0x2d0, 0x857, 0x3a3, 0x000, 0xa3e, 0x8cb, 0x35f, 0x4f0, 0x022, 0xb38, 0xc12, 0x93c, 0x2fc, 0x546, 0xe6e, 0x91f, 0x145, 0xfff, 0x1af, 0x957, 0xbde, 0x09d, 0xfd2, 0x9df, 0x2dc, 0x07f, 0x115, 0x7bf, 0xa35, 0x061, 0x9bf, 0xc85, 0x918, 0x0c8, 0x317, 0xce5, 0xf28, 0x108, 0x51b, 0x621, 0x188, 0x000, 0x28c, 0xf67, 0x6ef, 0x000, 0xd72, 0xce2, 0x1be, 0x000, 0x000, 0x282, 0x357, -1, 0x4e5, 0x246, 0x859, 0x66c, 0x5d3, 0x9fd, 0x000, 0x000, 0x82f, 0xc29, 0x331, 0xa93, 0x000, 0xae4, 0x48a, 0x254, 0x000, 0x0ba, 0xe83, 0x7c7, 0xb6e, 0x88e, 0x774, 0xf6f, 0x85d, 0x47f, 0xcd6, 0xe41, 0xdb6, 0x000, 0x0f4, 0xb4d, 0x77f, 0x000, 0x901, 0x1a2, 0x44a, 0x482, 0x000, 0xe99, 0xa75, 0x000, 0x7ab, 0x000, 0x0b6, 0x35c, 0x306, 0x11c, 0x08e, 0x6eb, 0x11c, 0x771, 0xff9, 0x1c8, 0x63b, 0x58b, 0x9d2, 0x250, 0x198, 0xfe7, 0xebc, 0x000, 0xa97, 0xacc, 0xd4b, 0x28b, 0x892, 0x150, 0xcf4, 0xbc1, 0x000, 0x662, 0xdd8, 0x61f, 0x903, 0x083, 0x000, 0xc55, 0x02f, 0xc29, 0x4f5, 0xbcf, 0xe27, 0x9e3, 0xb13, 0xadc, 0x845, 0x415, 0x0ae, 0x000, 0xe30, 0x931, 0x84a, 0xb09, 0x250, 0x631, 0x7aa, 0x026, 0xdc9, 0x486, 0x3a7, 0xab0, 0xe04, 0xe1a, 0xe17, 0x611, 0x556, 0xfac, 0x3c6, 0x5ab, 0x002, 0xc16, 0xe60, -1, 0xc51, 0x772, 0x67f, 0xfa9, 0x83c, 0x974, 0x96a, 0xe94, 0x250, 0xa20, 0xc95, 0x65b, 0x479, 0xe48, 0xa35, 0x23f, 0x5cf, 0x40a, 0xcf0, 0xe82, 0x1da, 0x390, 0xc86, 0xa92, 0x433, 0xbed, 0x4a7, 0x09a, 0x15a, 0xb8d, 0x9c7, 0x5fb, 0x8a0, 0x000, 0xf9a, 0xf3c, 0x11c, 0x20c, 0xf23, 0x79d, 0xc79, 0xb71, 0x7af, 0xc5b, 0x771, 0x629, 0x834, 0xb34, 0x20c, 0x940, 0x2ca, 0x60b, 0x000, 0x4cb, 0x70b, 0x000, 0x000, 0x9e8, 0x000, 0xdca, 0x000, 0x1ae, 0xb21, 0xfe3, 0x191, 0x9e1, 0x7f6, 0x04f, 0x64a, 0xba2, 0x59e, 0x1ae, 0x000, 0x728, 0x000, 0x081, 0xecd, 0x946, 0x000, 0xdee, 0x3ff, 0xdf9, 0x1bf, 0x01a, 0x1a9, 0xc58, 0xe05, 0x3bf, 0x5e8, 0x39d, 0xbfa, 0x23f, 0xb8d, -1, 0x000, 0x779, 0x540, 0xf2c, 0x7cc, 0x340, 0x77a, 0xa8e, 0xe8d, 0x2fd, 0xfed, 0x5d1, 0x308, 0x00f, 0xf4a, 0x39b, 0xbe2, 0x0e5, -1, 0xf4d, 0x1fe, 0xf00, 0x867, 0x195, 0x2de, 0x712, 0x000, 0x00c, 0x0a3, 0x1f3, 0x4ee, 0x317, 0x665, 0x000, 0x5d8, 0x291, 0x6c4, 0xa46, 0x492, 0x8d4, 0x647, 0x57f, 0x000, 0x259, 0xd87, 0x5c2, 0x1d8, 0xfad, -1, -1, 0x79f, 0x43a, 0xfd1, 0x164, 0x6e1, 0x350, 0xf00, 0x0e9, 0xac4, 0xe35, 0x307, 0xfff, 0xabb, 0xc1a, 0x768, 0x000, 0x372, 0x839, 0xf4b, 0x1c3, 0xab0, 0xcb6, 0x943, 0xbe9, 0x20f, 0xddc, 0xe18, 0x4eb, 0x21d, 0x530, 0x24c, 0x000, 0xf79, -1, 0x1bd, -1, 0x155, 0x435, -1, 0x132, 0x5c2, 0xb3d, 0x802, 0x733, -1, 0x336, 0xf19, 0xfea, 0xd2a, 0x07f, 0x8e9, 0x000, 0xdab, -1, 0x088, 0x4b1, 0x7ac, 0x000, 0xe66, 0xde0, 0x73c, 0xfff, 0x02f, -1, 0x000, -1, 0x000, 0x562, 0x389, 0xb20, 0x9ea, -1, 0x3f8, 0x567, 0x035, 0xa55, 0x255, 0xc98, 0x65f, -1, 0x1ac, 0x571, 0x13d, 0xf57, 0x32a, 0xbdb, 0x0ec, 0x47d, 0x43a, -1, 0x1aa, 0x9d6, 0x843, -1, 0x244, 0xb03, 0xd0d, 0x579, 0x1b1, 0xea7, 0x000, 0x062, -1, 0x533, 0x1db, 0xf1f, 0x2f7, 0x2df, 0x3e5, 0xdec, 0xc5c, 0x55a, 0xf6c, 0x4c1, 0x5a8, 0xcd4, 0x6fd, 0x1a6, 0x4b8, 0x98a, 0xe17, 0xeb9, 0xfd1, -1, 0x175, 0x4d6, 0xba2, 0x000, 0x614, 0x147, 0x429, 0xfee, -1, 0x0d8, -1, 0x98a, 0xdd2, 0xedd, 0x255, 0xef3, 0x345, 0x000, 0xf3e, -1, -1, 0x210, 0x88a, 0x699, -1, 0x02c, 0xfee, 0x1c1, 0xb38, 0x000, 0x7cc, 0x165, 0x536, -1, 0x1ae, 0xefb, 0x734, -1, 0x1a4, 0x984, 0x804, 0x487, -1, -1, 0x31e, 0x9f2, 0x966, 0x000, 0xcb0, 0x552, 0x0c9, -1, 0x750, 0x650, 0x064, 0xffe, 0xe84, 0x537, 0xee7, 0x834, -1, 0x998, 0xa03, -1, 0xcdf, 0x4be, 0x310, 0x051, 0xf3f, 0x040, 0x973, 0x925, 0x000, 0x000, 0xe51, 0x8b1, 0x468, 0xe11, 0xd4f, 0x374, 0x33a, 0x126, 0x88b, 0x43a, 0xc9b, 0xdb9, 0x3c2, 0x3bd, 0x1ae, 0x000, 0xc4a, 0x000, 0x4c4, 0x859, 0xe5a, 0x000, 0xeb4, 0xd40, 0x87d, 0xc79, 0xe13, 0x50b, -1, 0x724, 0x000, 0x7be, 0x062, 0xe7f, 0xad0, 0x5f3, 0x69e, 0x381, 0x272, 0x50f, 0xac8, 0x053, 0x55e, 0xf19, 0xd71, 0x75b, 0xbf2, 0x000, 0x3ac, 0xdf0, 0xd75, 0x7e3, 0xe75, 0xa13, 0xfd8, 0xbdc, 0x1d9, 0x15f, 0x8cc, 0xba4, 0xb79, 0xb7f, 0x812, 0xfe6, 0x000, 0x2d3, 0xd7b, 0x5d4, 0xad2, 0x316, 0x908, 0x323, 0x758, 0xb0b, 0x965, 0x1a9, 0xdce, 0x660, 0x625, 0xeff, 0x0ed, 0x000, 0x323, 0x986, 0x831, 0x5c5, 0x22f, 0xd49, 0xec6, 0x90e, 0x234, 0x000, 0x80f, 0x16c, 0x528, 0x1f8, 0x2bd, 0x97d, 0xe20, 0xf29, 0x97d, 0x3a0, 0x7fc, 0x086, 0x720, 0x1f9, 0x3eb, 0xf67, 0x423, 0xa55, 0x69e, 0xede, 0x206, 0x7fa, 0x809, 0xfa8, 0xe22, 0x15e, 0x2a0, 0x04a, 0xf7b, 0x4ea, 0xd9a, -1, 0x1d8, 0x0b4, 0xb87, 0x406, -1, 0xcdf, 0x187, 0xf6d, 0x914, 0x4b1, 0x000, 0x104, 0x67e, 0xc74, 0x6da, 0xe67, 0x7d2, 0xd1f, 0x64c, 0x19d, 0x000, 0xa17, 0xfd5, 0x000, 0x8ad, 0xf38, 0xd65, 0xabd, 0x75e, 0x667, 0x632, 0x346, 0xc48, 0xa77, 0x45e, 0x2b5, 0xded, 0x7da, 0x160, 0x560, -1, 0xf4e, 0xb0c, 0xdb0, 0x287, 0x34a, 0x065, 0x439, 0x2ec, 0x679, 0xefa, 0x208, 0xeb1, 0x1b0, 0x8c8, 0xca6, 0x62c, 0xa10, 0x673, 0x000, 0x000, 0xc6a, 0x7b2, 0xbd7, 0xb2b, 0x17a, 0x6f3, 0x1ab, 0xffa, 0x5e0, 0x1fa, 0xb8f, 0xe5c, 0xcab, 0xdbc, 0x10f, 0x000, 0x000, 0xefe, 0x34b, 0x1d9, 0x834, 0x52f, 0xb58, 0x82b, 0x6e8, 0x1f3, 0x719, 0x64e, 0xf55, 0xccd, 0x531, 0x0de, 0x3aa, 0x150, 0x89a, 0x3b9, 0x26e, 0xebc, 0x7ae, 0x670, 0x315, 0x8a9, 0x03b, 0x896, 0x247, 0x2f4, 0x450, 0xd10, 0xb79, 0x0ed, 0x041, -1, 0x707, 0x9e1, 0xed6, 0x6d2, 0x000, 0xfff, 0xb1a, 0x084, 0xaf3, 0x47f, 0x02f, 0xac3, 0x751, 0x8c4, 0x291, 0xadd, 0x000, 0xea1, 0x8ec, 0xf9f, 0x5c2, 0x000, 0xd6b, 0x71e, 0x000, 0xcea, 0x971, 0x5f8, 0x4b9, 0x7c6, 0xb7e, 0x353, 0xd25, 0x423, 0x6ec, 0xb71, 0xf93, 0x000, 0x795, 0xc43, 0xaa2, 0x96a, 0xcbd, 0xb55, 0x184, 0xdf0, 0x3d9, 0xbfe, 0xf79, 0x8f0, 0x22c, 0xeeb, 0x000, 0xa4b, 0xe07, 0xf34, 0xc9d, 0x4be, 0x95b, 0x371, 0x78c, 0x9e9, 0xde6, 0x072, 0xf0d, 0x60b, 0x5a5, 0xab1, 0x000, 0x260, 0x000, 0xd2a, 0xd90, 0x154, 0x4c6, 0x438, 0x5d9, 0x736, 0x062, 0x000, 0x000, 0xb84, 0x72e, 0x0b7, 0x000, 0x050, 0x063, 0xa95, 0x89b, 0x917, 0x049, 0xb14, 0x9a0, 0x734, 0x0c3, 0xd50, 0x917, 0xb02, 0x8cf, 0x453, 0x0af, 0x8e5, 0x000, 0x7aa, 0x5d5, 0x81b, 0x788, 0xb9c, 0x01a, 0x974, 0x000, 0x000, 0x37f, 0xd9f, 0x000, 0xec4, 0x4f4, 0xbff, 0x4fe, 0x860, 0x11c, 0x74e, 0x34a, 0x281, 0x52f, 0xb05, 0xa89, 0xbee, 0x6ad, 0x9fc, 0x9ba, 0xb0b, 0x515, 0x1c7, 0x330, 0xfde, 0x97e, 0x6e7, 0xc45, -1, 0x658, 0x710, 0x28a, 0x921, 0x1de, 0x4a1, 0x9d7, 0xe32, 0xa2d, 0xb0f, 0x545, 0xd6f, 0x329, 0x9b8, 0xb4d, 0x9a0, 0x938, 0x783, 0xfa7, 0xd0a, 0xdc9, 0x0fe, 0x000, 0x249, 0x000, 0x8cd, 0x922, 0x7cd, 0x021, 0xa89, 0x3d5, 0xcee, 0x0a1, 0x6d6, 0x000, -1, 0x48b, 0x000, 0x87a, 0x8bb, 0x9ed, 0x01f, 0xe20, 0xb7f, -1, 0xe95, 0x593, 0x1da, 0x57a, -1, 0xf3a, 0x000, 0x000, -1, -1, 0x160, 0x501, 0x7a3, 0xb59, -1, -1, 0xc7f, -1, 0xf79, -1, -1, 0x48d, 0x781, -1, -1, 0xb74, -1, 0x3c4, 0xbe9, -1, -1, 0x9a4, 0x9ae, 0xa75, -1, -1, 0x9cd, 0x000, -1, -1, -1, 0xc3c, 0x2d4, -1, 0x173, 0xf38, 0x000, -1, 0xee9, -1, 0xb91, 0xcc1, 0x86d, 0x8ab, 0xeb0, 0xec7, 0x687, 0xd98, 0xa95, 0x744, 0xe7c, 0x826, 0x80e, 0x599, 0x3d9, 0xf2f, -1, 0x96a, 0xfd1, 0x174, -1, 0x000, 0x1aa, 0x50e, -1, 0x5a2, 0xbcd, 0x000, -1, 0x019, 0x588, 0x18d, 0x470, 0x812, 0xeec, 0xf63, 0x05c, -1, 0x000, 0xb7f, 0x357, 0x436, 0xbb4, 0x1fb, 0x425, 0x1ed, 0xe13, 0x66c, 0x555, 0xb11, 0x7b5, 0x48d, 0x38d, 0xf72, 0x000, 0x000, 0xa66, 0x4fa, 0xf36, 0x1eb, 0x000, 0x95f, 0x000, 0xd9a, 0x82f, 0x07f, 0x253, 0x70f, 0x915, -1, 0x12d, 0x040, 0x2ca, 0x446, 0x90a, 0x7a8, 0x687, 0x000, 0x04e, 0x74f, 0x1ca, 0x793, 0x3c7, 0x3f0, 0x4c7, 0x000, 0xc30, 0x533, 0x889, 0x9ef, 0xebd, 0x984, 0x18f, 0xfe1, 0x8ea, 0x185, 0x410, 0x107, 0x000, 0x73e, 0xd4b, 0x8fc, 0xd34, 0x1e6, 0x4bf, 0xbac, 0x7c3, 0x000, 0x7c8, 0xb2f, 0x02c, 0xa46, 0x000, 0x0f9, 0x680, 0x94d, 0x6ad, 0x767, 0xfeb, 0x6c7, 0x2d5, 0x43f, 0x9af, 0x261, 0xe83, 0xfa7, 0xb7b, 0xf2d, 0x2f5, 0x4d7, 0x494, 0xbc2, 0x45b, 0x000, 0x17d, 0x5c6, 0xe2b, 0xb20, 0x19e, 0x6ba, 0x973, 0xedd, 0xea8, 0x000, 0x9f3, 0xd9a, 0x7fa, 0xb78, 0x556, 0xbb6, 0xc58, 0x210, 0x000, 0xf9a, 0x56d, 0x48b, 0xf12, 0x000, 0x54d, 0x5f4, 0x1ad, 0x86e, 0xe16, 0x6ff, 0xa35, 0x47e, 0x4c7, 0x93c, -1, -1, 0xc98, 0xd3f, 0x000, 0x788, 0x6ef, 0x959, 0xec2, 0x45e, 0xa4d, 0xa90, 0x000, 0x768, 0x8bb, 0x6ee, 0x7f5, 0x770, 0xfa8, 0xba4, 0xf49, 0x7b8, 0x616, 0x2bd, 0x23f, 0xe8c, 0x9fa, 0xa49, 0x213, 0x98a, 0x2c1, 0x595, 0x885, 0x6de, 0x057, 0x1bc, 0x000, 0xc58, 0x7a8, 0x5c1, 0x3d0, 0xa78, 0xb80, 0x000, 0xc06, -1, 0x428, 0xe92, 0xfa3, 0x341, -1, 0x000, 0x000, 0x1ca, 0x27c, 0xdeb, 0x835, 0x4c8, 0xdb3, 0x000, 0xf9d, 0x000, 0xe81, 0xc22, 0xfce, -1, 0xe6e, 0x96e, 0x161, -1, 0x3b9, 0x945, 0xa95, 0x13d, 0x748, 0x184, 0x588, 0x636, 0xf7e, 0xb44, 0x2b7, 0x217, 0xee5, 0x65a, 0xc47, -1, 0xca3, 0x83e, 0x431, 0xc64, 0x636, 0x06e, 0x404, 0x993, -1, 0xeb3, 0x134, 0x8a3, 0xca9, -1, -1, 0x2ab, 0x000, 0x8ed, 0x877, 0x1a8, 0xc89, 0x000, 0x000, 0xf94, 0x000, 0x709, 0x249, 0x9ac, 0x22a, 0x605, 0x000, 0x000, 0x6b4, 0x00c, 0xc53, 0xf23, 0x005, 0x29f, 0x865, 0xf79, 0x000, 0x5fa, 0x764, 0xe51, 0xbdc, 0xb64, 0x0f3, 0xf29, 0x2f7, 0x5da, 0x000, 0x16f, 0xb8b, 0x255, 0x9cc, 0xe43, 0x279, 0x2c2, 0x483, -1, 0xf7d, 0x7bb, 0x000, 0x9e3, 0xd84, 0xe36, 0x6e6, 0x000, -1, 0x33f, 0x41d, 0x5b5, 0x83e, 0x2f4, 0xf5b, 0x9fc, 0xb1e, -1, 0x8f4, 0xb26, 0x856, 0x3b6, 0x126, 0x4c2, 0x274, 0x0c1, 0xfa9, 0x57d, 0x000, 0x100, 0x7af, 0xc62, 0x000, 0xa55, 0x416, 0x93f, 0x78c, 0xfba, 0x5a2, 0x0c2, 0x4d4, 0xa3e, 0xcc3, 0xe73, 0xd02, 0x8df, 0x3e9, 0xe9a, 0x0f6, 0x32c, 0x23d, 0xdab, 0xf50, 0xfc2, 0x000, 0x065, 0xc23, 0xd3d, 0xc84, 0x35e, 0x000, 0xa24, 0x634, 0x4b4, 0xa52, 0x098, 0xb39, 0x9a4, 0xe71, 0x8aa, 0x741, 0x000, 0xb16, 0x5c2, 0xea1, 0xc01, 0x5c1, 0x30d, 0xca4, 0x201, 0xc9c, 0x717, 0x000, 0xba0, 0x537, 0x619, 0x000, 0xfd9, 0x6dc, 0xdaa, 0x1da, 0xe51, 0xd39, 0xb4c, 0x8a1, 0x098, 0x2f8, 0x191, 0x9dc, 0xdb0, 0x5e1, 0x000, 0xe97, 0xef1, 0x8d3, 0xb0d, 0xfce, 0x336, 0xee1, 0x7a2, 0xbc8, 0x494, 0x580, 0xba7, 0x000, 0x62a, 0x96a, 0x527, 0x859, 0x811, 0xef0, 0x429, 0xef4, 0xf3d, 0x000, 0x9d6, 0xb71, 0x000, 0x14b, 0xf3d, 0xb16, 0x204, 0x0c1, 0xcd4, 0x339, 0x39d, 0xfe3, 0x837, 0x8c7, 0x955, 0x69a, 0x5f6, 0x4c6, -1, 0x3d5, 0x000, 0x0e7, 0x4b1, -1, 0xa3e, 0xb03, 0x1ea, 0xac8, -1, 0x000, 0xed8, -1, 0x4e0, 0x9f7, 0xc91, 0x6b3, -1, -1, 0xa53, 0x290, 0xa64, 0x0e3, 0x3dc, 0xed3, 0xf2f, 0x000, 0xd7c, 0xf44, -1, 0x205, 0x900, 0x864, -1, -1, 0xed3, 0x7d2, 0x000, -1, 0xdd2, 0x79b, 0x000, -1, 0xae6, 0x5cf, 0xde8, 0x000, 0x1f2, -1, 0x2f3, 0x000, -1, 0x2ce, 0xcf2, 0x8f4, 0xee8, 0x165, 0x309, 0x15f, -1, 0x714, 0xbfc, 0x532, 0xad0, 0x151, 0x2d5, 0x0a4, 0x391, -1, 0x0dc, 0x0c1, 0x451, -1, -1, 0x6a0, 0x250, -1, 0xab8, 0x977, 0xa86, 0x407, 0x72f, -1, 0x05f, 0x000, 0xefe, 0x950, 0x4f4, 0x957, -1, 0xd68, 0x26c, 0xa30, 0x4f1, 0x279, 0x584, 0xb34, -1, 0x4d7, 0x258, 0x000, 0x518, 0x685, 0x91c, 0x3ac, 0x0fa, -1, 0x979, 0x40c, 0x506, 0x000, -1, 0x7bd, 0xb97, 0x87f, 0xc06, 0x050, 0x7bf, 0xe3e, 0xc81, 0x000, 0x65e, 0x000, -1, 0xb76, 0xc37, 0x4c4, 0xfc9, 0x336, 0x9fa, 0xaa2, 0x32c, 0xb8b, 0xaa9, 0xc95, 0x85a, 0xa9a, 0x260, 0x4cd, 0x8fe, 0xd3c, 0x982, 0x0d7, 0xbc1, 0xdcf, 0xe62, 0xe0d, 0xf8f, 0xd7b, 0x91a, 0x3e0, 0x33a, 0x1c5, 0xf00, 0xde5, 0xad1, 0xebc, 0xebc, 0x942, 0xd86, 0x3bf, 0x8ce, 0xb8c, 0x000, 0x8d6, 0x784, 0xb74, -1, 0x818, 0x000, 0xfff, 0x07e, 0x029, 0xf48, 0xb65, 0xd81, 0x220, 0x095, 0x21f, 0xac4, 0xb31, -1, 0x864, 0x000, 0x3bd, 0xf85, 0x237, 0x369, 0x2d9, 0xfdf, 0x25a, 0x782, 0x7b8, 0xabd, 0x5e3, 0x438, 0x230, 0xbc4, 0x7ad, 0x00a, 0x441, 0x6dc, 0x2c4, 0xf16, 0x0b3, 0x04c, 0xfd2, 0x8aa, 0xad8, 0x3e4, 0x142, 0x585, 0xc8f, 0x9bf, 0x29b, 0xac9, 0x743, 0xfb5, 0x7fc, 0x05e, 0xd38, 0x002, -1, 0xb4e, 0xd0c, 0x84c, 0xf93, 0x91f, 0xcd2, 0x04f, 0x569, 0xd1b, 0xfc6, 0x630, 0x6f6, 0x1d8, 0x91a, 0x4da, 0x9f5, 0x07a, 0xcf5, 0x634, 0x42f, 0xfff, 0x951, 0x0f9, 0xc01, 0x491, 0xbd6, 0x730, 0xfea, 0x9f4, 0xbfc, 0xf1a, 0x413, 0xa2a, 0xdc6, 0xc87, 0x9db, 0xc2c, 0x30f, 0xdb5, 0x785, 0xbaa, 0x000, 0x000, 0xa49, 0x000, 0x61d, 0xf6f, -1, 0x031, -1, 0x441, 0x7bf, 0x53e, -1, 0x6fd, 0x0f6, -1, 0xadb, -1, 0x000, 0x432, 0x187, 0xd37, 0x154, 0x539, 0xc08, 0xe51, 0x219, 0x1e9, 0x897, 0xa0e, 0x201, 0x447, 0x89f, 0x000, 0x463, 0x726, 0xa05, 0xab9, 0xd01, 0x1e4, 0xfea, 0x895, 0x816, 0x313, 0xae3, 0x3a4, -1, 0x70f, -1, 0xa42, 0x5e9, 0x78e, -1, 0x317, 0x6c8, 0x000, 0xbf7, 0xefd, -1, 0xb17, 0x382, 0xd26, 0x5ff, 0xf81, 0x20b, 0x373, 0x774, 0x081, 0xaae, 0xfdb, 0xe5d, -1, -1, 0xcb7, 0x738, 0x919, 0x933, 0x398, 0x000, 0x14e, -1, 0xe14, 0xbf8, 0x11c, 0x94b, 0x031, -1, 0x000, 0x2d4, 0xd41, 0xdc6, 0x9f6, 0xea7, 0x9e8, 0x2ec, 0x10a, 0x50d, 0xeae, 0xdb0, 0xef0, 0x9c8, 0x000, -1, 0x82e, 0x9d3, 0xdb7, 0x46d, -1, 0x230, 0x73b, 0x45b, -1, -1, 0x000, 0x4a7, -1, -1, 0x47c, 0x10e, 0x4b4, -1, -1, -1, 0x1d7, 0xa5d, 0x233, 0x6b2, 0x6bd, 0x387, 0x7ca, 0xb1a, 0xf75, 0xea4, 0xdc9, 0x98b, 0x80c, 0x702, 0xe22, 0xa6e, 0x6f8, 0x05b, 0x17c, -1, 0x000, 0xebe, 0xc8e, 0xaec, -1, 0x42b, 0xdce, -1, -1, -1, 0xef3, 0xc52, 0x31b, -1, 0xdff, 0xbd0, 0x000, 0xa72, 0x525, 0x9cf, 0x2ff, 0xfc8, 0x37c, 0xbce, 0xd8c, 0xd88, 0x3a6, 0xed8, 0x4ab, 0x000, 0x449, 0x9d7, -1, -1, 0x9be, 0x59f, 0x000, 0x882, -1, 0x742, 0x000, -1, -1, -1, 0xe8b, 0x0f3, 0x771, -1, 0x3ea, 0x8f9, 0xcbb, 0x548, 0x46d, 0x000, -1, 0xf74, 0xa23, 0x15b, -1, 0xaeb, 0x7f8, 0xbe2, 0x000, -1, 0x023, 0x61e, 0x95d, 0x7ac, 0x024, 0x141, 0x561, 0x9fe, 0xb10, -1, 0x623, 0xc47, 0x413, 0x0e7, 0x663, 0xcdf, 0xebe, 0x5c9, 0x573, 0x21d, 0xb28, 0x280, 0xb9f, 0xd1a, 0xecf, 0xff0, 0x000, 0xfc0, 0x085, 0x9c4, 0x48c, 0x000, 0xb0b, 0x43d, -1, 0x73b, 0x802, 0x633, 0x6ef, -1, -1, 0x5c1, 0xea6, 0x0a9, 0xab4, 0xacd, 0xb81, 0xa32, -1, -1, 0xa26, 0x9d5, 0xf7c, -1, 0xf69, 0xdbb, 0x6d5, 0x405, -1, 0xd0a, 0xfe0, 0xf5e, 0xbd7, -1, 0x89a, 0x868, 0xeb2, 0x792, 0x7fe, 0x115, 0x000, 0x8bb, 0xdd1, 0xc40, 0x453, 0xbb3, 0x7cc, 0x3e6, 0x071, 0x0f1, 0xbae, 0xf67, 0x896, 0x38e, 0x86e, 0xfaa, 0xccc, -1, 0x411, 0x8e5, 0x699, 0x2ef, 0x785, 0x9d4, 0xe30, 0xb2e, 0x976, 0x203, 0x035, 0x75d, 0x8f1, 0x144, 0x092, 0x1a5, -1, 0x55f, 0x000, 0xa43, 0x5be, 0x68d, 0x852, 0xb87, 0x9af, 0x0c0, -1, 0xa50, 0x9ca, 0x15f, 0xf06, 0x869, 0x0f3, -1, 0x000, -1, 0x9a9, -1, -1, -1, -1, 0xf05, 0x000, -1, 0x000, 0x4a9, 0xf9d, -1, 0x000, 0xab1, 0x04c, -1, 0xd17, 0x893, 0x763, 0x332, -1, 0xc41, 0x5bd, 0xa72, 0x67c, 0xb78, 0x973, 0x6c7, 0x569, -1, 0x96a, 0xc68, 0x48c, -1, 0x6fa, -1, 0xa2a, 0x44f, -1, 0x73f, 0x28f, 0x536, 0xd91, 0xc86, 0xef8, 0x1f5, 0xfb4, 0x060, 0x230, 0xe10, -1, 0x000, 0x305, 0x0e6, 0xb19, 0x1e2, 0x7fc, 0xf35, -1, 0x7d9, 0x000, 0x000, 0xd2f, 0xb3a, 0x0a2, 0x7c9, 0xda6, 0x37c, 0xe43, -1, 0x7da, 0x0d6, 0x000, -1, 0xd40, -1, 0x156, 0xee9, -1, 0x239, 0x10f, 0x60c, 0x9d4, 0x663, 0x565, 0x603, 0x38b, -1, 0x606, 0x13c, 0x681, 0x436, 0xc29, 0x9c7, 0x1d9, 0x000, 0x0a6, 0x996, 0x231, 0x055, 0x01f, 0x0a3, 0xd96, 0x7c8, 0x0f3, 0xaa7, 0xd99, -1, 0x3be, 0x476, 0x25f, 0x38c, 0xdf3, 0x6d5, 0xcb5, 0xadd, 0x000, 0x136, 0x64d, 0xc0d, 0xe61, 0xd0b, -1, 0x000, 0x535, 0x9c3, 0x279, 0x00c, 0xa87, 0xa31, 0xc4a, 0x167, 0x423, 0xec8, -1, 0x926, 0xa4d, 0x5ba, -1, -1, 0x9bf, 0x000, 0x47f, 0x8f3, 0xd5b, 0xc3b, 0xa18, -1, 0x548, 0x8f7, 0x8cf, 0x000, 0x9bd, 0xaa2, 0x7ec, 0x000, 0xfb8, 0xafd, 0xe68, -1, 0xfa7, 0x31c, 0xef3, 0x288, 0xdf0, 0x1bc, 0xfe9, 0x1ea, 0xa9f, 0x000, 0x53f, 0x000, 0xda6, 0x09c, 0x1bf, 0x09c, 0x31c, 0x0c8, 0x31c, -1, 0x689, 0x211, -1, 0x77f, 0x723, 0xb8f, 0x683, 0x351, -1, 0xb33, 0xce0, -1, 0x61c, 0x073, 0x783, 0x6b2, 0x6a8, 0x729, 0x81b, 0xabf, 0xd15, 0x563, 0x433, -1, 0x823, 0xf99, 0x2c5, -1, 0x367, 0xcc4, 0x934, 0x6f2, 0xdf0, 0xa1f, 0x579, 0x012, -1, 0x508, 0x070, -1, 0x018, 0x270, 0xa6f, -1, 0x7a7, -1, 0x826, 0x4b5, -1, 0x7d8, 0xb20, -1, 0xc28, 0x463, -1, 0xdf9, 0x22c, 0xe17, 0x4f2, 0xe13, 0x4ff, 0x40a, 0xdcb, 0x9ed, 0x34a, 0xeb8, 0xa0e, 0x5f2, 0x594, 0x60d, 0x4b6, 0xd3c, 0x675, 0x1c4, 0xbb5, 0xc73, 0xfad, 0xead, -1, 0xfb6, -1, 0x146, 0xd40, 0x02f, 0x000, 0x302, -1, -1, 0x6e5, 0x000, 0xed7, 0xd8c, 0x7a3, 0x0fc, 0x259, 0x34b, 0xa1b, 0x882, -1, 0x211, 0x000, 0xd30, 0xe02, 0x5cd, 0x53e, 0x11b, 0xa16, -1, 0x24e, -1, 0xace, 0xe9a, -1, 0x5c6, 0x9be, 0x000, 0x169, 0x982, -1, 0x3fd, 0x457, 0x06f, 0x7e7, 0xed1, 0x5ee, 0xcef, 0x62b, 0x26c, 0xc9f, 0xe68, 0x59f, 0x0b5, 0x000, 0x0bc, 0x086, 0x890, 0x005, 0xc42, 0x939, 0xaca, 0xdd9, -1, -1, 0x6e5, 0x0dd, 0x434, 0x297, 0xe21, 0x0f5, -1, 0xa6c, 0x4ad, 0x978, 0x433, 0xa41, 0xd6f, 0x8bf, 0xfb8, -1, 0x928, 0x85e, 0xfb6, 0x5c7, 0x99a, 0x8ec, 0xebc, 0x226, 0x7d4, 0xdcd, 0xc0b, 0x000, 0x7f4, 0xc6f, 0x000, 0x3ad, 0x5b2, -1, 0x67b, -1, 0x568, 0x6e2, -1, -1, -1, 0x3f3, 0xaf5, 0x33f, -1, 0x022, 0x1bd, 0xae5, -1, 0x9c3, 0x000, 0x92b, 0xee5, 0x29c, 0x000, 0x15e, 0xe71, 0xacb, 0x9d2, 0x1a3, 0xb7f, 0xa5b, 0x095, -1, 0xb6e, 0x79f, 0x3d1, 0x7d0, 0x131, 0xcd7, -1, 0x2c3, -1, 0x396, 0x4d2, 0x297, 0x405, 0x634, -1, -1, -1, 0x928, 0xbca, 0xb6c, 0x011, 0xfc0, 0xbaf, 0xbd2, -1, 0x585, 0x000, 0xb8a, 0x7f9, 0xd6b, 0x4eb, 0x9a3, 0x000, -1, 0xaeb, 0xa47, 0xcef, 0x9c6, -1, 0x000, -1, 0x2a9, 0x371, 0xca6, -1, 0xb7d, 0x15f, 0x2a9, -1, 0xe80, 0x7a7, 0x23a, 0x000, 0x000, 0xcc9, 0x60e, -1, 0x130, 0x9cd, 0x498, 0xe25, 0x366, 0x34b, 0x899, 0xe49, 0x1a8, 0xc93, 0x94d, 0x05e, -1, 0x0c2, 0x757, 0xb9d, 0xaa3, 0x086, 0x395, 0x3c3, 0xa2e, 0xf77, 0xcb1, 0x45e, 0x169, 0xbba, 0x367, 0x8cb, 0x260, 0x5a0, 0x8cb, 0x737, 0xa1f, 0xaaf, 0xf92, 0x430, 0x97d, 0x542, 0xb09, -1, 0x774, 0x084, 0x4c0, 0x2b3, 0xaf6, 0x93c, 0x32d, 0xee2, -1, 0x605, 0xece, 0x8eb, 0xc62, 0x01d, 0x000, 0xaba, 0xfc5, 0xb8e, 0xc07, 0xfb6, 0xbca, 0x8f0, 0xd33, -1, 0x283, 0x6d6, 0x6ad, 0x678, 0x51a, 0xc95, 0xda4, 0x962, 0x9ed, 0x307, 0x94a, 0x052, 0xf4e, 0x3bd, 0x210, 0x71a, 0x3c7, 0x5a4, 0x6e7, 0x23a, 0x523, 0x1dc, 0x6b2, 0x5e0, 0xbb0, 0xae4, 0xdb1, 0xd40, 0xc0d, 0x59e, 0x21b, 0x4e6, 0x8be, 0x3b1, 0xc71, 0x5e4, 0x4aa, 0xaf3, 0xa27, 0x43c, 0x9ea, 0x2ee, 0x6b2, 0xd51, 0x59d, 0xd3a, 0xd43, 0x59d, 0x405, 0x2d4, 0x05b, 0x1b9, 0x68b, 0xbfa, 0xbb9, 0x77a, 0xf91, 0xfcb, -1, 0x949, 0x177, 0x68d, 0xcc3, 0xcf2, 0x000, 0xa87, 0x2e6, 0xd2f, 0x111, 0x168, 0x94c, 0x54c, 0x000, 0x0c5, 0x829, 0xcbc, 0xc0b, 0x1ed, 0x836, 0x9d8, 0xbdc, 0xc5e, 0x4e5, 0xb94, 0x6f2, 0x74f, 0x878, 0x3b2, 0x48d, 0xc72, 0xcff, 0xccb, 0x8f9, 0x7ee, 0x869, 0x228, 0x035, 0x81e, 0xcf9, 0x309, 0xdf2, -1, 0x047, 0xdd3, 0xcab, 0x11d, 0xe76, 0xb52, 0xbbd, 0x12d, 0xf37, 0x552, 0x61d, 0xdd8, 0x2cd, 0x298, 0x9e2, 0xf2c, 0x9f7, 0xf41, 0xcb4, 0x277, 0xfde, 0xe7e, 0x82a, 0x86b, 0x9cc, 0x580, 0xfcc, 0x33a, 0x438, 0xd6e, 0x000, 0xc04, 0xd50, 0x681, 0x1b3, 0x322, 0x86c, 0x4a6, 0x000, 0xa17, 0xd53, 0xdc0, 0xb61, 0x323, 0x3d1, 0x3fb, 0x929, 0xa6e, 0x919, 0xae0, 0x283, 0xe6a, 0xed3, 0x371, 0xd51, 0x309, 0x510, 0xd50, 0x6f4, 0xc84, 0x566, 0xba7, 0x75b, 0xbeb, 0x793, 0x58f, 0x974, 0xe77, 0x52c, 0xcef, 0x942, 0xa7c, 0x56a, 0xaa0, 0x784, 0x0ec, 0xad3, 0xccf, 0xecf, 0xc3f, 0x846, 0x1b2, 0x112, 0x4ee, 0x18b, 0xa76, 0xe14, -1, 0xfb1, 0xb4c, -1, 0xd54, 0x0e0, 0x72d, 0xdf0, 0xf0c, 0x881, 0xc60, 0xe1b, 0x000, 0x453, 0xe21, 0xb2a, 0x6df, 0x84f, 0x000, 0x12a, 0x991, 0x587, 0xa4e, 0x522, 0x000, 0xe17, 0xc64, 0x994, 0x4cc, 0x0e5, 0xc2b, 0x8cf, 0x458, 0x992, 0xec0, 0xc80, 0xefb, 0x7b7, 0x863, 0xc0a, 0x250, 0x338, 0xa44, 0x8ab, 0x873, 0x134, 0x23c, 0x4f6, 0x066, 0xd0f, 0xdd6, 0x93d, 0xf20, 0x000, 0x9bb, 0x255, 0xe7b, 0x916, 0x4f3, 0x68e, 0xb82, 0x2b4, 0x9d7, 0xfd1, 0x0fb, 0x11e, 0x204, 0x241, 0x67f, 0x1c4, 0xe91, 0xf41, 0xb4a, -1, 0x6d2, 0xce6, 0xdfb, -1, 0xdd0, 0xb8d, 0x8db, 0x86c, 0x224, 0xdeb, 0x7bb, 0x50e, 0x000, 0xb79, 0x11e, 0x486, 0xd4c, 0x000, 0xa54, 0x946, 0x83a, 0x537, 0x875, 0x000, 0x8e4, 0x95a, 0xdd5, 0x9d5, 0x910, 0x95b, 0x8c8, 0xd22, 0x07c, 0xac0, 0x000, 0x048, 0x170, 0x9b2, 0xcea, 0xb0f, 0x958, 0x0f9, 0xa9e, 0x87a, 0x166, 0x69c, 0x112, 0xde0, 0x487, 0xeca, 0x639, 0x4ee, 0x7fa, 0x2cc, 0x709, 0x87a, 0x5bb, 0xf64, 0x173, 0xdc6, 0xaaf, 0xbff, 0xf2a, 0x8fb, 0xd44, 0x0ca, 0xf34, 0xb3a, 0xeb3, 0xfc5, 0x61d, 0x92f, 0x6fb, 0x1a1, 0xd85, 0x8fe, 0xb6a, 0x0a1, 0x44f, 0x89a, 0xc5d, 0x13b, 0x5cc, 0x000, 0x9ac, 0x9e6, 0xf95, 0x511, 0xf2e, 0xf3c, 0x707, 0xec5, 0xaec, 0xc72, 0xeb1, 0x105, 0xda3, 0xbcb, 0x1d6, 0xf16, 0xd50, 0x306, 0x03f, 0xe6a, 0x25c, 0x9fe, 0xd3f, 0x8a4, 0x7bc, 0x0bc, 0x532, 0x62e, 0x111, 0x797, 0xc2c, 0x9d0, 0x338, 0xbc7, 0xd64, 0xb09, 0x4d6, 0xcba, 0x62c, 0xef2, 0x32b, 0x9c5, 0xc06, 0x38b, 0xbb2, 0x8b7, 0x6f2, 0x7ec, 0xa77, -1, 0x7a3, 0xc95, 0xa91, 0x5d3, 0xffc, -1, 0xe27, 0xa0a, 0x071, 0x9da, 0x000, 0xba3, 0x3fd, 0x120, 0x845, 0x151, 0xb5f, 0x193, 0xe99, 0x0f6, 0x640, 0xef4, 0xe17, 0x46b, 0x432, 0x8a4, 0x415, 0x252, 0x79c, 0xbe5, 0x3f0, 0xb64, 0x984, 0x5a7, 0x1be, 0xedc, -1, 0xd7e, 0x5b4, -1, 0xd27, 0x03e, 0x136, 0xb30, 0xfff, 0x1dc, 0xc32, 0x84a, 0x392, 0xf4f, 0x911, 0x501, 0x836, 0x700, 0x9ac, 0x000, 0xdb5, 0xfa3, 0x5d3, 0x1f8, 0x888, -1, 0xfa4, 0xfe7, 0xd87, 0x9fe, 0x6af, 0x9a5, 0xfd5, 0xf49, 0xded, 0x416, 0x2fc, 0x078, 0xd2e, 0xbf1, 0xcd9, 0x733, -1, 0xb50, 0xd57, 0xaa1, -1, 0x9b0, 0x874, 0x18f, -1, -1, 0x2f9, 0xfbb, 0xf73, 0x646, 0x868, 0x000, 0x000, 0xba2, 0xd74, 0xc8f, 0xe36, 0xcfd, 0x5b8, 0x850, 0x48a, 0x689, 0x7ad, 0xefd, 0x7e1, 0xf45, 0xd9e, 0x0f0, 0x7c0, 0x675, -1, 0xf26, 0x3c0, 0xe2d, 0xb62, 0x276, -1, 0xf90, 0x837, 0xc7c, 0x8ed, 0x08d, 0x1d6, 0x506, 0xac9, 0xd81, 0x1be, 0xf7e, 0x1a3, 0xb2a, 0x5e2, 0x217, 0x1df, 0x5a3, 0x498, 0xfb1, 0x432, 0x2ca, 0x5a1, 0x5d5, 0x135, 0x6f0, -1, 0xf70, 0x000, 0xd4c, 0x634, -1, 0x8ca, 0x198, -1, 0x7b9, 0x629, 0xc16, 0x68c, 0xea2, -1, 0xba0, 0x6d9, 0xce9, 0x7b2, 0x000, 0xf59, 0x252, 0x575, 0x0a8, 0x894, 0x000, 0x824, 0xf63, 0xd70, 0xdd8, 0x856, 0xc77, 0x334, 0xeb2, 0x2b8, 0x307, 0xc34, 0x2e7, 0xa74, 0x6b9, 0x0e1, 0x20f, 0x3ee, 0xf80, 0xa1f, 0x6e6, 0xa03, 0x3c7, 0x72f, 0xfff, 0x156, 0x273, 0x1b7, 0xd90, 0x998, 0x474, 0xf1b, 0x80f, 0xe4c, 0x0ba, 0xfff, 0x85e, 0x3af, 0x58f, 0x000, 0xf6b, 0x71c, 0x4ed, 0xec3, 0x4cb, 0x000, 0xa68, 0x6ca, 0x086, 0x000, 0x6e4, 0xab3, 0xff5, 0x281, 0xf0a, 0xc92, 0x8d5, 0x486, 0xdd1, 0x903, 0x8e3, 0x9df, 0x2ab, 0xd08, 0x144, 0xdcd, 0x281, 0x046, 0x161, 0xe83, 0xf24, 0xce7, 0x30a, 0xf89, 0xf01, 0x308, 0x142, 0x9df, 0x44d, 0x9dd, 0x3ed, 0x81b, 0xd9d, 0x000, 0x8c2, 0xe01, 0xfe6, 0xa20, 0x167, 0xedd, 0xdb1, 0x470, 0xe70, 0x3aa, 0x0ff, 0x4d1, 0xd30, 0x67a, 0xc56, 0x3d8, 0xf2e, 0x86a, 0x18b, 0x3f5, 0x1a7, 0xd97, 0x652, 0x000, 0x00d, 0xbc7, 0xed3, 0x39e, 0xb0d, 0xd8d, 0xc49, 0x2db, 0x44e, 0x820, 0x189, 0xd51, 0x523, 0x161, 0x2eb, 0x41c, 0x951, -1, 0xbb7, -1, -1, 0x0a7, 0x3ed, 0xfaa, 0x18e, 0xa34, 0x820, 0x2b4, -1, 0x8c2, 0x3ee, 0x59d, 0x97b, 0x209, 0x3a2, 0x102, 0x351, 0x6bf, 0xd3f, 0x4fc, 0x55f, 0x4b5, 0xe22, 0xf13, 0x53a, 0x08a, 0x38d, 0xf4b, 0x424, 0xea6, 0x48e, 0x11c, 0x339, 0x5bd, 0xf7c, 0x3bd, 0x15a, 0x35c, 0x854, 0x71b, 0x30f, 0x065, 0x97e, 0x354, 0x28e, 0x344, 0x926, 0xc0b, 0xae0, 0x5db, 0xb3e, 0x661, 0x432, 0x3c8, 0xf5e, 0x368, 0xc85, 0xfff, 0x7f5, 0x0b6, 0x98b, -1, 0x28c, 0x784, 0xb78, 0x50a, 0x696, 0x47c, 0x40d, -1, 0xe4d, 0x5fc, -1, -1, 0xadb, 0x1db, 0x830, 0xd48, -1, 0xf3a, 0xee4, 0xed4, 0xb1a, 0xa14, 0x36d, 0xf1c, 0x774, 0x000, 0x942, 0x278, 0x7ee, 0x000, 0x550, 0x57c, 0x343, 0x22b, 0x324, 0xa34, 0x0ea, 0x230, 0x51b, 0x2d1, 0x500, 0x59f, 0xd56, 0x540, 0x2f4, 0x87d, 0x9e5, 0x9c5, 0x5ea, 0x771, 0x491, 0x206, 0xa4b, 0x4bf, 0xdaf, 0x308, 0xb25, 0x261, 0x991, 0x000, 0x88e, 0x7e8, 0x3d6, 0x15d, 0xebc, 0x6c2, 0xd45, 0x000, 0x3c6, 0x48d, 0x622, 0x758, 0xfa9, 0x3cf, 0x401, 0xcdb, 0xe3f, 0x544, 0xf1f, 0x000, -1, 0x4d4, 0x000, 0x7f1, 0xba4, 0x81c, 0x92f, 0x7d1, 0xa83, 0xa31, 0xe74, 0xa20, 0x475, 0x489, 0xf20, 0x3d1, 0xac1, 0xb2d, 0x6b2, 0x1b6, 0x063, 0xd00, 0xfeb, 0x5ca, 0xb2c, 0xcb2, 0x1cb, 0x251, 0x82b, 0x8ba, 0x40b, 0xf1e, 0xa8a, 0xd24, 0x880, 0x84e, 0x8cb, 0x0a3, 0x000, 0xaf7, 0xf99, 0x6a1, 0x156, 0x382, 0x0a0, 0x000, 0xed1, 0xd07, 0xbf5, 0x000, 0x295, 0xe48, 0x760, 0x019, 0x97f, 0xb46, 0xff5, 0x7c9, 0x1cf, 0xba4, 0x630, 0xe58, 0xda6, 0xd4b, 0xc02, 0xf9f, 0x11c, 0x000, 0xb99, 0x51f, 0x43e, 0x199, 0xdfb, 0x72f, 0x913, 0x509, 0xac5, 0xa2e, 0xcdb, 0x348, 0xb15, 0x472, 0x95d, 0x67f, 0x000, 0x4b9, 0xd78, 0xc87, 0x0f6, 0x281, 0x0bd, 0x924, 0x35e, 0x129, 0xffd, 0xe24, 0x000, 0x640, 0x09b, 0xd10, 0xa0d, 0x000, 0x474, 0x189, 0x49f, 0x62d, 0xcba, 0x561, 0x000, 0x58a, 0xaa1, 0x603, 0x5ab, 0x0c7, 0x00a, 0x784, 0x5e4, 0x7e4, 0xe4d, -1, 0x276, 0x465, 0xee9, 0xe51, 0xdae, 0xbb1, 0x51f, 0xcba, 0x1c3, 0xd70, 0x000, 0x5be, 0x4ea, 0x3cc, 0xf13, 0x811, 0x813, 0x234, 0x7e4, 0xbae, 0xd97, 0xb74, 0x000, 0x76a, 0xda1, 0x000, 0xd8c, 0x53a, 0xc5a, 0x000, 0x000, 0x61b, 0xd87, 0x141, 0x383, 0xe06, 0x6a3, 0x6c3, 0xbcc, 0xc44, 0xf63, 0xd8b, 0x58d, 0x000, 0x839, 0x77a, 0x000, 0x8e4, 0x000, 0xdbe, 0x483, 0xd5b, 0xa9d, 0xca5, 0x431, 0x491, 0x29a, 0x27d, 0x2d2, 0x691, 0x000, 0x19a, 0xa0d, 0xb0b, 0xf32, 0xe49, 0xfbf, 0x399, 0xd20, 0x000, 0x66a, 0x000, 0x447, 0xb20, 0x894, 0x038, 0xc9c, 0xff0, 0x000, 0x0d4, 0xad4, 0x768, 0x65c, 0x000, 0x27b, 0x6c6, 0x9be, 0xd35, 0xc6a, 0xdd3, 0x000, 0x2a7, 0x158, 0x38d, 0x8ef, 0x7b6, 0xd49, 0x30c, 0xec3, 0x211, 0x17c, 0xcd0, 0x61f, 0x000, 0xe6e, 0x1d4, 0x6e9, 0x000, 0xc2d, 0x5c3, 0xcd4, 0x760, 0x532, 0xc94, 0x590, 0x000, 0x4a3, 0xc33, 0x000, 0x426, 0x604, 0xa06, 0xa99, 0x917, 0x0c4, 0xc8d, 0x9e5, 0xcc7, 0x415, 0xf79, 0x000, 0xaf4, 0x622, 0x756, 0x9c2, 0xa51, 0xb0f, 0x4ef, 0xbc4, 0xe15, 0x29e, 0x055, 0x6c9, 0x695, 0x94f, 0x9d6, 0x000, 0xb9f, 0xd46, 0x1d4, 0x000, 0xcb2, 0x9e8, 0x000, 0xa5e, 0xce0, 0x000, 0x098, 0xa98, 0x6d9, 0x5e2, 0x95f, 0x791, 0xeb8, 0x5fa, 0x60a, 0xacc, 0x3d3, 0x4df, 0x0df, 0x9ca, 0x972, 0x3cc, 0x583, 0xca5, 0xe1a, 0x000, 0x2d3, 0x266, 0x000, 0x06c, 0xfff, 0x62d, 0x64e, 0x40c, 0x599, 0x475, 0xaa9, 0xba6, 0x96f, 0xe32, 0x059, 0x342, 0x36d, 0xfd1, 0x09b, 0x878, 0x9f8, 0x000, 0x3ad, 0xdba, 0x000, 0x544, 0xc1a, 0x000, 0xee8, 0x492, 0xa6b, 0x447, 0xd2a, 0xb4e, 0x02c, 0xadb, 0xde2, 0x904, 0x62d, 0xf01, 0xbb8, 0x255, 0x382, 0xfff, 0x29e, 0x000, 0x000, 0x011, 0xfff, }; #endif zbar-0.23/zbar/convert.c0000664000175000017500000011644313471225716012122 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "image.h" #include "video.h" #include "window.h" /* pack bit size and location offset of a component into one byte */ #define RGB_BITS(off, size) ((((8 - (size)) & 0x7) << 5) | ((off) & 0x1f)) typedef void (conversion_handler_t)(zbar_image_t*, const zbar_format_def_t*, const zbar_image_t*, const zbar_format_def_t*); typedef struct conversion_def_s { int cost; /* conversion "badness" */ conversion_handler_t *func; /* function that accomplishes it */ } conversion_def_t; /* NULL terminated list of known formats, in order of preference * (NB Cr=V Cb=U) */ const uint32_t _zbar_formats[] = { /* planar YUV formats */ fourcc('4','2','2','P'), /* FIXME also YV16? */ fourcc('I','4','2','0'), fourcc('Y','U','1','2'), /* FIXME also IYUV? */ fourcc('Y','V','1','2'), fourcc('4','1','1','P'), /* planar Y + packed UV plane */ fourcc('N','V','1','2'), fourcc('N','V','2','1'), /* packed YUV formats */ fourcc('Y','U','Y','V'), fourcc('U','Y','V','Y'), fourcc('Y','U','Y','2'), /* FIXME add YVYU */ fourcc('Y','U','V','4'), /* FIXME where is this from? */ /* packed rgb formats */ fourcc('R','G','B','3'), fourcc( 3 , 0 , 0 , 0 ), fourcc('B','G','R','3'), fourcc('R','G','B','4'), fourcc('B','G','R','4'), fourcc('R','G','B','P'), fourcc('R','G','B','O'), fourcc('R','G','B','R'), fourcc('R','G','B','Q'), fourcc('Y','U','V','9'), fourcc('Y','V','U','9'), /* basic grayscale format */ fourcc('G','R','E','Y'), fourcc('Y','8','0','0'), fourcc('Y','8',' ',' '), fourcc('Y','8', 0 , 0 ), /* low quality RGB formats */ fourcc('R','G','B','1'), fourcc('R','4','4','4'), fourcc('B','A','8','1'), /* unsupported packed YUV formats */ fourcc('Y','4','1','P'), fourcc('Y','4','4','4'), fourcc('Y','U','V','O'), fourcc('H','M','1','2'), /* unsupported packed RGB format */ fourcc('H','I','2','4'), /* unsupported compressed formats */ fourcc('J','P','E','G'), fourcc('M','J','P','G'), fourcc('M','P','E','G'), /* terminator */ 0 }; const int _zbar_num_formats = sizeof(_zbar_formats) / sizeof(uint32_t); /* format definitions */ static const zbar_format_def_t format_defs[] = { { fourcc('R','G','B','4'), ZBAR_FMT_RGB_PACKED, { { 4, RGB_BITS(8, 8), RGB_BITS(16, 8), RGB_BITS(24, 8) } } }, { fourcc('B','G','R','1'), ZBAR_FMT_RGB_PACKED, { { 1, RGB_BITS(0, 3), RGB_BITS(3, 3), RGB_BITS(6, 2) } } }, { fourcc('4','2','2','P'), ZBAR_FMT_YUV_PLANAR, { { 1, 0, 0 /*UV*/ } } }, { fourcc('Y','8','0','0'), ZBAR_FMT_GRAY, }, { fourcc('Y','U','Y','2'), ZBAR_FMT_YUV_PACKED, { { 1, 0, 0, /*YUYV*/ } } }, { fourcc('J','P','E','G'), ZBAR_FMT_JPEG, }, { fourcc('Y','V','Y','U'), ZBAR_FMT_YUV_PACKED, { { 1, 0, 1, /*YVYU*/ } } }, { fourcc('Y','8', 0 , 0 ), ZBAR_FMT_GRAY, }, { fourcc('N','V','2','1'), ZBAR_FMT_YUV_NV, { { 1, 1, 1 /*VU*/ } } }, { fourcc('N','V','1','2'), ZBAR_FMT_YUV_NV, { { 1, 1, 0 /*UV*/ } } }, { fourcc('B','G','R','3'), ZBAR_FMT_RGB_PACKED, { { 3, RGB_BITS(16, 8), RGB_BITS(8, 8), RGB_BITS(0, 8) } } }, { fourcc('Y','V','U','9'), ZBAR_FMT_YUV_PLANAR, { { 2, 2, 1 /*VU*/ } } }, { fourcc('R','G','B','O'), ZBAR_FMT_RGB_PACKED, { { 2, RGB_BITS(10, 5), RGB_BITS(5, 5), RGB_BITS(0, 5) } } }, { fourcc('R','G','B','Q'), ZBAR_FMT_RGB_PACKED, { { 2, RGB_BITS(2, 5), RGB_BITS(13, 5), RGB_BITS(8, 5) } } }, { fourcc('G','R','E','Y'), ZBAR_FMT_GRAY, }, { fourcc( 3 , 0 , 0 , 0 ), ZBAR_FMT_RGB_PACKED, { { 4, RGB_BITS(16, 8), RGB_BITS(8, 8), RGB_BITS(0, 8) } } }, { fourcc('Y','8',' ',' '), ZBAR_FMT_GRAY, }, { fourcc('I','4','2','0'), ZBAR_FMT_YUV_PLANAR, { { 1, 1, 0 /*UV*/ } } }, { fourcc('R','G','B','1'), ZBAR_FMT_RGB_PACKED, { { 1, RGB_BITS(5, 3), RGB_BITS(2, 3), RGB_BITS(0, 2) } } }, { fourcc('Y','U','1','2'), ZBAR_FMT_YUV_PLANAR, { { 1, 1, 0 /*UV*/ } } }, { fourcc('Y','V','1','2'), ZBAR_FMT_YUV_PLANAR, { { 1, 1, 1 /*VU*/ } } }, { fourcc('R','G','B','3'), ZBAR_FMT_RGB_PACKED, { { 3, RGB_BITS(0, 8), RGB_BITS(8, 8), RGB_BITS(16, 8) } } }, { fourcc('R','4','4','4'), ZBAR_FMT_RGB_PACKED, { { 2, RGB_BITS(8, 4), RGB_BITS(4, 4), RGB_BITS(0, 4) } } }, { fourcc('B','G','R','4'), ZBAR_FMT_RGB_PACKED, { { 4, RGB_BITS(16, 8), RGB_BITS(8, 8), RGB_BITS(0, 8) } } }, { fourcc('Y','U','V','9'), ZBAR_FMT_YUV_PLANAR, { { 2, 2, 0 /*UV*/ } } }, { fourcc('M','J','P','G'), ZBAR_FMT_JPEG, }, { fourcc('4','1','1','P'), ZBAR_FMT_YUV_PLANAR, { { 2, 0, 0 /*UV*/ } } }, { fourcc('R','G','B','P'), ZBAR_FMT_RGB_PACKED, { { 2, RGB_BITS(11, 5), RGB_BITS(5, 6), RGB_BITS(0, 5) } } }, { fourcc('R','G','B','R'), ZBAR_FMT_RGB_PACKED, { { 2, RGB_BITS(3, 5), RGB_BITS(13, 6), RGB_BITS(8, 5) } } }, { fourcc('Y','U','Y','V'), ZBAR_FMT_YUV_PACKED, { { 1, 0, 0, /*YUYV*/ } } }, { fourcc('U','Y','V','Y'), ZBAR_FMT_YUV_PACKED, { { 1, 0, 2, /*UYVY*/ } } }, }; static const int num_format_defs = sizeof(format_defs) / sizeof(zbar_format_def_t); #ifdef DEBUG_CONVERT static int intsort (const void *a, const void *b) { return(*(uint32_t*)a - *(uint32_t*)b); } #endif /* verify that format list is in required sort order */ static inline int verify_format_sort (void) { int i; for(i = 0; i < num_format_defs; i++) { int j = i * 2 + 1; if((j < num_format_defs && format_defs[i].format < format_defs[j].format) || (j + 1 < num_format_defs && format_defs[j + 1].format < format_defs[i].format)) break; } if(i == num_format_defs) return(0); /* spew correct order for fix */ fprintf(stderr, "ERROR: image format list is not sorted!?\n"); #ifdef DEBUG_CONVERT assert(num_format_defs); uint32_t sorted[num_format_defs]; uint32_t ordered[num_format_defs]; for(i = 0; i < num_format_defs; i++) sorted[i] = format_defs[i].format; qsort(sorted, num_format_defs, sizeof(uint32_t), intsort); for(i = 0; i < num_format_defs; i = i << 1 | 1); i = (i - 1) / 2; ordered[i] = sorted[0]; int j, k; for(j = 1; j < num_format_defs; j++) { k = i * 2 + 2; if(k < num_format_defs) { i = k; for(k = k * 2 + 1; k < num_format_defs; k = k * 2 + 1) i = k; } else { for(k = (i - 1) / 2; i != k * 2 + 1; k = (i - 1) / 2) { assert(i); i = k; } i = k; } ordered[i] = sorted[j]; } fprintf(stderr, "correct sort order is:"); for(i = 0; i < num_format_defs; i++) fprintf(stderr, " %4.4s", (char*)&ordered[i]); fprintf(stderr, "\n"); #endif return(-1); } static inline void uv_round (zbar_image_t *img, const zbar_format_def_t *fmt) { img->width >>= fmt->p.yuv.xsub2; img->width <<= fmt->p.yuv.xsub2; img->height >>= fmt->p.yuv.ysub2; img->height <<= fmt->p.yuv.ysub2; } static inline void uv_roundup (zbar_image_t *img, const zbar_format_def_t *fmt) { unsigned xmask, ymask; if(fmt->group == ZBAR_FMT_GRAY) return; xmask = (1 << fmt->p.yuv.xsub2) - 1; if(img->width & xmask) img->width = (img->width + xmask) & ~xmask; ymask = (1 << fmt->p.yuv.ysub2) - 1; if(img->height & ymask) img->height = (img->height + ymask) & ~ymask; } static inline unsigned long uvp_size (const zbar_image_t *img, const zbar_format_def_t *fmt) { if(fmt->group == ZBAR_FMT_GRAY) return(0); return((img->width >> fmt->p.yuv.xsub2) * (img->height >> fmt->p.yuv.ysub2)); } static inline uint32_t convert_read_rgb (const uint8_t *srcp, int bpp) { uint32_t p; if(bpp == 3) { p = *srcp; p |= *(srcp + 1) << 8; p |= *(srcp + 2) << 16; } else if(bpp == 4) p = *((uint32_t*)(srcp)); else if(bpp == 2) p = *((uint16_t*)(srcp)); else p = *srcp; return(p); } static inline void convert_write_rgb (uint8_t *dstp, uint32_t p, int bpp) { if(bpp == 3) { *dstp = p & 0xff; *(dstp + 1) = (p >> 8) & 0xff; *(dstp + 2) = (p >> 16) & 0xff; } else if(bpp == 4) *((uint32_t*)dstp) = p; else if(bpp == 2) *((uint16_t*)dstp) = p; else *dstp = p; } /* cleanup linked image by unrefing */ static void cleanup_ref (zbar_image_t *img) { if(img->next) _zbar_image_refcnt(img->next, -1); } /* resize y plane, drop extra columns/rows from the right/bottom, * or duplicate last column/row to pad missing data */ static inline void convert_y_resize (zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt, size_t n) { uint8_t *psrc, *pdst; unsigned width, height, xpad, y; if(dst->width == src->width && dst->height == src->height) { memcpy((void*)dst->data, src->data, n); return; } psrc = (void*)src->data; pdst = (void*)dst->data; width = (dst->width > src->width) ? src->width : dst->width; xpad = (dst->width > src->width) ? dst->width - src->width : 0; height = (dst->height > src->height) ? src->height : dst->height; for(y = 0; y < height; y++) { memcpy(pdst, psrc, width); pdst += width; psrc += src->width; if(xpad) { memset(pdst, *(psrc - 1), xpad); pdst += xpad; } } psrc -= src->width; for(; y < dst->height; y++) { memcpy(pdst, psrc, width); pdst += width; if(xpad) { memset(pdst, *(psrc - 1), xpad); pdst += xpad; } } } /* make new image w/reference to the same image data */ static void convert_copy (zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt) { if(src->width == dst->width && src->height == dst->height) { zbar_image_t *s = (zbar_image_t*)src; dst->data = src->data; dst->datalen = src->datalen; dst->cleanup = cleanup_ref; dst->next = s; _zbar_image_refcnt(s, 1); } else /* NB only for GRAY/YUV_PLANAR formats */ convert_y_resize(dst, dstfmt, src, srcfmt, dst->width * dst->height); } /* append neutral UV plane to grayscale image */ static void convert_uvp_append (zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt) { unsigned long n; uv_roundup(dst, dstfmt); dst->datalen = uvp_size(dst, dstfmt) * 2; n = dst->width * dst->height; dst->datalen += n; assert(src->datalen >= src->width * src->height); zprintf(24, "dst=%dx%d (%lx) %lx src=%dx%d %lx\n", dst->width, dst->height, n, dst->datalen, src->width, src->height, src->datalen); dst->data = malloc(dst->datalen); if(!dst->data) return; convert_y_resize(dst, dstfmt, src, srcfmt, n); memset((uint8_t*)dst->data + n, 0x80, dst->datalen - n); } /* interleave YUV planes into packed YUV */ static void convert_yuv_pack (zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt) { unsigned long srcm, srcn; uint8_t flags, *srcy, *dstp; const uint8_t *srcu, *srcv; unsigned srcl, xmask, ymask, x, y; uint8_t y0 = 0, y1 = 0, u = 0x80, v = 0x80; uv_roundup(dst, dstfmt); dst->datalen = dst->width * dst->height + uvp_size(dst, dstfmt) * 2; dst->data = malloc(dst->datalen); if(!dst->data) return; dstp = (void*)dst->data; srcm = uvp_size(src, srcfmt); srcn = src->width * src->height; assert(src->datalen >= srcn + 2 * srcn); flags = dstfmt->p.yuv.packorder ^ srcfmt->p.yuv.packorder; srcy = (void*)src->data; if(flags & 1) { srcv = (uint8_t*)src->data + srcn; srcu = srcv + srcm; } else { srcu = (uint8_t*)src->data + srcn; srcv = srcu + srcm; } flags = dstfmt->p.yuv.packorder & 2; srcl = src->width >> srcfmt->p.yuv.xsub2; xmask = (1 << srcfmt->p.yuv.xsub2) - 1; ymask = (1 << srcfmt->p.yuv.ysub2) - 1; for(y = 0; y < dst->height; y++) { if(y >= src->height) { srcy -= src->width; srcu -= srcl; srcv -= srcl; } else if(y & ymask) { srcu -= srcl; srcv -= srcl; } for(x = 0; x < dst->width; x += 2) { if(x < src->width) { y0 = *(srcy++); y1 = *(srcy++); if(!(x & xmask)) { u = *(srcu++); v = *(srcv++); } } if(flags) { *(dstp++) = u; *(dstp++) = y0; *(dstp++) = v; *(dstp++) = y1; } else { *(dstp++) = y0; *(dstp++) = u; *(dstp++) = y1; *(dstp++) = v; } } for(; x < src->width; x += 2) { srcy += 2; if(!(x & xmask)) { srcu++; srcv++; } } } } /* split packed YUV samples and join into YUV planes * FIXME currently ignores color and grayscales the image */ static void convert_yuv_unpack (zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt) { unsigned long dstn, dstm2; uint8_t *dsty, flags; const uint8_t *srcp; unsigned srcl, x, y; uint8_t y0 = 0, y1 = 0; uv_roundup(dst, dstfmt); dstn = dst->width * dst->height; dstm2 = uvp_size(dst, dstfmt) * 2; dst->datalen = dstn + dstm2; dst->data = malloc(dst->datalen); if(!dst->data) return; if(dstm2) memset((uint8_t*)dst->data + dstn, 0x80, dstm2); dsty = (uint8_t*)dst->data; flags = srcfmt->p.yuv.packorder ^ dstfmt->p.yuv.packorder; flags &= 2; srcp = src->data; if(flags) srcp++; srcl = src->width + (src->width >> srcfmt->p.yuv.xsub2); for(y = 0; y < dst->height; y++) { if(y >= src->height) srcp -= srcl; for(x = 0; x < dst->width; x += 2) { if(x < src->width) { y0 = *(srcp++); srcp++; y1 = *(srcp++); srcp++; } *(dsty++) = y0; *(dsty++) = y1; } if(x < src->width) srcp += (src->width - x) * 2; } } /* resample and resize UV plane(s) * FIXME currently ignores color and grayscales the image */ static void convert_uvp_resample (zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt) { unsigned long dstn, dstm2; uv_roundup(dst, dstfmt); dstn = dst->width * dst->height; dstm2 = uvp_size(dst, dstfmt) * 2; dst->datalen = dstn + dstm2; dst->data = malloc(dst->datalen); if(!dst->data) return; convert_y_resize(dst, dstfmt, src, srcfmt, dstn); if(dstm2) memset((uint8_t*)dst->data + dstn, 0x80, dstm2); } /* rearrange interleaved UV componets */ static void convert_uv_resample (zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt) { unsigned long dstn; uint8_t *dstp, flags; const uint8_t *srcp; unsigned srcl, x, y; uint8_t y0 = 0, y1 = 0, u = 0x80, v = 0x80; uv_roundup(dst, dstfmt); dstn = dst->width * dst->height; dst->datalen = dstn + uvp_size(dst, dstfmt) * 2; dst->data = malloc(dst->datalen); if(!dst->data) return; dstp = (void*)dst->data; flags = (srcfmt->p.yuv.packorder ^ dstfmt->p.yuv.packorder) & 1; srcp = src->data; srcl = src->width + (src->width >> srcfmt->p.yuv.xsub2); for(y = 0; y < dst->height; y++) { if(y >= src->height) srcp -= srcl; for(x = 0; x < dst->width; x += 2) { if(x < src->width) { if(!(srcfmt->p.yuv.packorder & 2)) { y0 = *(srcp++); u = *(srcp++); y1 = *(srcp++); v = *(srcp++); } else { u = *(srcp++); y0 = *(srcp++); v = *(srcp++); y1 = *(srcp++); } if(flags) { uint8_t tmp = u; u = v; v = tmp; } } if(!(dstfmt->p.yuv.packorder & 2)) { *(dstp++) = y0; *(dstp++) = u; *(dstp++) = y1; *(dstp++) = v; } else { *(dstp++) = u; *(dstp++) = y0; *(dstp++) = v; *(dstp++) = y1; } } if(x < src->width) srcp += (src->width - x) * 2; } } /* YUV planes to packed RGB * FIXME currently ignores color and grayscales the image */ static void convert_yuvp_to_rgb (zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt) { uint8_t *dstp, *srcy; int drbits, drbit0, dgbits, dgbit0, dbbits, dbbit0; unsigned long srcm, srcn; unsigned x, y; uint32_t p = 0; dst->datalen = dst->width * dst->height * dstfmt->p.rgb.bpp; dst->data = malloc(dst->datalen); if(!dst->data) return; dstp = (void*)dst->data; drbits = RGB_SIZE(dstfmt->p.rgb.red); drbit0 = RGB_OFFSET(dstfmt->p.rgb.red); dgbits = RGB_SIZE(dstfmt->p.rgb.green); dgbit0 = RGB_OFFSET(dstfmt->p.rgb.green); dbbits = RGB_SIZE(dstfmt->p.rgb.blue); dbbit0 = RGB_OFFSET(dstfmt->p.rgb.blue); srcm = uvp_size(src, srcfmt); srcn = src->width * src->height; assert(src->datalen >= srcn + 2 * srcm); srcy = (void*)src->data; for(y = 0; y < dst->height; y++) { if(y >= src->height) srcy -= src->width; for(x = 0; x < dst->width; x++) { if(x < src->width) { /* FIXME color space? */ unsigned y0 = *(srcy++); p = (((y0 >> drbits) << drbit0) | ((y0 >> dgbits) << dgbit0) | ((y0 >> dbbits) << dbbit0)); } convert_write_rgb(dstp, p, dstfmt->p.rgb.bpp); dstp += dstfmt->p.rgb.bpp; } if(x < src->width) srcy += (src->width - x); } } /* packed RGB to YUV planes * FIXME currently ignores color and grayscales the image */ static void convert_rgb_to_yuvp (zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt) { unsigned long dstn, dstm2; uint8_t *dsty; const uint8_t *srcp; int rbits, rbit0, gbits, gbit0, bbits, bbit0; unsigned srcl, x, y; uint16_t y0 = 0; uv_roundup(dst, dstfmt); dstn = dst->width * dst->height; dstm2 = uvp_size(dst, dstfmt) * 2; dst->datalen = dstn + dstm2; dst->data = malloc(dst->datalen); if(!dst->data) return; if(dstm2) memset((uint8_t*)dst->data + dstn, 0x80, dstm2); dsty = (void*)dst->data; assert(src->datalen >= (src->width * src->height * srcfmt->p.rgb.bpp)); srcp = src->data; rbits = RGB_SIZE(srcfmt->p.rgb.red); rbit0 = RGB_OFFSET(srcfmt->p.rgb.red); gbits = RGB_SIZE(srcfmt->p.rgb.green); gbit0 = RGB_OFFSET(srcfmt->p.rgb.green); bbits = RGB_SIZE(srcfmt->p.rgb.blue); bbit0 = RGB_OFFSET(srcfmt->p.rgb.blue); srcl = src->width * srcfmt->p.rgb.bpp; for(y = 0; y < dst->height; y++) { if(y >= src->height) srcp -= srcl; for(x = 0; x < dst->width; x++) { if(x < src->width) { uint8_t r, g, b; uint32_t p = convert_read_rgb(srcp, srcfmt->p.rgb.bpp); srcp += srcfmt->p.rgb.bpp; /* FIXME endianness? */ r = ((p >> rbit0) << rbits) & 0xff; g = ((p >> gbit0) << gbits) & 0xff; b = ((p >> bbit0) << bbits) & 0xff; /* FIXME color space? */ y0 = ((77 * r + 150 * g + 29 * b) + 0x80) >> 8; } *(dsty++) = y0; } if(x < src->width) srcp += (src->width - x) * srcfmt->p.rgb.bpp; } } /* packed YUV to packed RGB */ static void convert_yuv_to_rgb (zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt) { uint8_t *dstp; unsigned long dstn = dst->width * dst->height; int drbits, drbit0, dgbits, dgbit0, dbbits, dbbit0; const uint8_t *srcp; unsigned srcl, x, y; uint32_t p = 0; dst->datalen = dstn * dstfmt->p.rgb.bpp; dst->data = malloc(dst->datalen); if(!dst->data) return; dstp = (void*)dst->data; drbits = RGB_SIZE(dstfmt->p.rgb.red); drbit0 = RGB_OFFSET(dstfmt->p.rgb.red); dgbits = RGB_SIZE(dstfmt->p.rgb.green); dgbit0 = RGB_OFFSET(dstfmt->p.rgb.green); dbbits = RGB_SIZE(dstfmt->p.rgb.blue); dbbit0 = RGB_OFFSET(dstfmt->p.rgb.blue); assert(src->datalen >= (src->width * src->height + uvp_size(src, srcfmt) * 2)); srcp = src->data; if(srcfmt->p.yuv.packorder & 2) srcp++; assert(srcfmt->p.yuv.xsub2 == 1); srcl = src->width + (src->width >> 1); for(y = 0; y < dst->height; y++) { if(y >= src->height) srcp -= srcl; for(x = 0; x < dst->width; x++) { if(x < src->width) { uint8_t y0 = *(srcp++); srcp++; if(y0 <= 16) y0 = 0; else if(y0 >= 235) y0 = 255; else y0 = (uint16_t)(y0 - 16) * 255 / 219; p = (((y0 >> drbits) << drbit0) | ((y0 >> dgbits) << dgbit0) | ((y0 >> dbbits) << dbbit0)); } convert_write_rgb(dstp, p, dstfmt->p.rgb.bpp); dstp += dstfmt->p.rgb.bpp; } if(x < src->width) srcp += (src->width - x) * 2; } } /* packed RGB to packed YUV * FIXME currently ignores color and grayscales the image */ static void convert_rgb_to_yuv (zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt) { uint8_t *dstp, flags; const uint8_t *srcp; int rbits, rbit0, gbits, gbit0, bbits, bbit0; unsigned srcl, x, y; uint16_t y0 = 0; uv_roundup(dst, dstfmt); dst->datalen = dst->width * dst->height + uvp_size(dst, dstfmt) * 2; dst->data = malloc(dst->datalen); if(!dst->data) return; dstp = (void*)dst->data; flags = dstfmt->p.yuv.packorder & 2; assert(src->datalen >= (src->width * src->height * srcfmt->p.rgb.bpp)); srcp = src->data; rbits = RGB_SIZE(srcfmt->p.rgb.red); rbit0 = RGB_OFFSET(srcfmt->p.rgb.red); gbits = RGB_SIZE(srcfmt->p.rgb.green); gbit0 = RGB_OFFSET(srcfmt->p.rgb.green); bbits = RGB_SIZE(srcfmt->p.rgb.blue); bbit0 = RGB_OFFSET(srcfmt->p.rgb.blue); srcl = src->width * srcfmt->p.rgb.bpp; for(y = 0; y < dst->height; y++) { if(y >= src->height) srcp -= srcl; for(x = 0; x < dst->width; x++) { if(x < src->width) { uint8_t r, g, b; uint32_t p = convert_read_rgb(srcp, srcfmt->p.rgb.bpp); srcp += srcfmt->p.rgb.bpp; /* FIXME endianness? */ r = ((p >> rbit0) << rbits) & 0xff; g = ((p >> gbit0) << gbits) & 0xff; b = ((p >> bbit0) << bbits) & 0xff; /* FIXME color space? */ y0 = ((77 * r + 150 * g + 29 * b) + 0x80) >> 8; } if(flags) { *(dstp++) = 0x80; *(dstp++) = y0; } else { *(dstp++) = y0; *(dstp++) = 0x80; } } if(x < src->width) srcp += (src->width - x) * srcfmt->p.rgb.bpp; } } /* resample and resize packed RGB components */ static void convert_rgb_resample (zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt) { unsigned long dstn = dst->width * dst->height; uint8_t *dstp; int drbits, drbit0, dgbits, dgbit0, dbbits, dbbit0; int srbits, srbit0, sgbits, sgbit0, sbbits, sbbit0; const uint8_t *srcp; unsigned srcl, x, y; uint32_t p = 0; dst->datalen = dstn * dstfmt->p.rgb.bpp; dst->data = malloc(dst->datalen); if(!dst->data) return; dstp = (void*)dst->data; drbits = RGB_SIZE(dstfmt->p.rgb.red); drbit0 = RGB_OFFSET(dstfmt->p.rgb.red); dgbits = RGB_SIZE(dstfmt->p.rgb.green); dgbit0 = RGB_OFFSET(dstfmt->p.rgb.green); dbbits = RGB_SIZE(dstfmt->p.rgb.blue); dbbit0 = RGB_OFFSET(dstfmt->p.rgb.blue); assert(src->datalen >= (src->width * src->height * srcfmt->p.rgb.bpp)); srcp = src->data; srbits = RGB_SIZE(srcfmt->p.rgb.red); srbit0 = RGB_OFFSET(srcfmt->p.rgb.red); sgbits = RGB_SIZE(srcfmt->p.rgb.green); sgbit0 = RGB_OFFSET(srcfmt->p.rgb.green); sbbits = RGB_SIZE(srcfmt->p.rgb.blue); sbbit0 = RGB_OFFSET(srcfmt->p.rgb.blue); srcl = src->width * srcfmt->p.rgb.bpp; for(y = 0; y < dst->height; y++) { if(y >= src->height) y -= srcl; for(x = 0; x < dst->width; x++) { if(x < src->width) { uint8_t r, g, b; p = convert_read_rgb(srcp, srcfmt->p.rgb.bpp); srcp += srcfmt->p.rgb.bpp; /* FIXME endianness? */ r = (p >> srbit0) << srbits; g = (p >> sgbit0) << sgbits; b = (p >> sbbit0) << sbbits; p = (((r >> drbits) << drbit0) | ((g >> dgbits) << dgbit0) | ((b >> dbbits) << dbbit0)); } convert_write_rgb(dstp, p, dstfmt->p.rgb.bpp); dstp += dstfmt->p.rgb.bpp; } if(x < src->width) srcp += (src->width - x) * srcfmt->p.rgb.bpp; } } #ifdef HAVE_LIBJPEG void _zbar_convert_jpeg_to_y(zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt); static void convert_jpeg(zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt); #endif /* group conversion matrix */ static conversion_def_t conversions[][ZBAR_FMT_NUM] = { { /* *from* GRAY */ { 0, convert_copy }, /* to GRAY */ { 8, convert_uvp_append }, /* to YUV_PLANAR */ { 24, convert_yuv_pack }, /* to YUV_PACKED */ { 32, convert_yuvp_to_rgb }, /* to RGB_PACKED */ { 8, convert_uvp_append }, /* to YUV_NV */ { -1, NULL }, /* to JPEG */ }, { /* from YUV_PLANAR */ { 1, convert_copy }, /* to GRAY */ { 48, convert_uvp_resample }, /* to YUV_PLANAR */ { 64, convert_yuv_pack }, /* to YUV_PACKED */ { 128, convert_yuvp_to_rgb }, /* to RGB_PACKED */ { 40, convert_uvp_append }, /* to YUV_NV */ { -1, NULL }, /* to JPEG */ }, { /* from YUV_PACKED */ { 24, convert_yuv_unpack }, /* to GRAY */ { 52, convert_yuv_unpack }, /* to YUV_PLANAR */ { 20, convert_uv_resample }, /* to YUV_PACKED */ { 144, convert_yuv_to_rgb }, /* to RGB_PACKED */ { 18, convert_yuv_unpack }, /* to YUV_NV */ { -1, NULL }, /* to JPEG */ }, { /* from RGB_PACKED */ { 112, convert_rgb_to_yuvp }, /* to GRAY */ { 160, convert_rgb_to_yuvp }, /* to YUV_PLANAR */ { 144, convert_rgb_to_yuv }, /* to YUV_PACKED */ { 120, convert_rgb_resample }, /* to RGB_PACKED */ { 152, convert_rgb_to_yuvp }, /* to YUV_NV */ { -1, NULL }, /* to JPEG */ }, { /* from YUV_NV (FIXME treated as GRAY) */ { 1, convert_copy }, /* to GRAY */ { 8, convert_uvp_append }, /* to YUV_PLANAR */ { 24, convert_yuv_pack }, /* to YUV_PACKED */ { 32, convert_yuvp_to_rgb }, /* to RGB_PACKED */ { 8, convert_uvp_append }, /* to YUV_NV */ { -1, NULL }, /* to JPEG */ }, #ifdef HAVE_LIBJPEG { /* from JPEG */ { 96, _zbar_convert_jpeg_to_y }, /* to GRAY */ { 104, convert_jpeg }, /* to YUV_PLANAR */ { 116, convert_jpeg }, /* to YUV_PACKED */ { 256, convert_jpeg }, /* to RGB_PACKED */ { 104, convert_jpeg }, /* to YUV_NV */ { -1, NULL }, /* to JPEG */ }, #else { /* from JPEG */ { -1, NULL }, /* to GRAY */ { -1, NULL }, /* to YUV_PLANAR */ { -1, NULL }, /* to YUV_PACKED */ { -1, NULL }, /* to RGB_PACKED */ { -1, NULL }, /* to YUV_NV */ { -1, NULL }, /* to JPEG */ }, #endif }; const zbar_format_def_t *_zbar_format_lookup (uint32_t fmt) { const zbar_format_def_t *def = NULL; int i = 0; while(i < num_format_defs) { def = &format_defs[i]; if(fmt == def->format) return(def); i = i * 2 + 1; if(fmt > def->format) i++; } return(NULL); } #ifdef HAVE_LIBJPEG /* convert JPEG data via an intermediate format supported by libjpeg */ static void convert_jpeg (zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt) { /* define intermediate image in a format supported by libjpeg * (currently only grayscale) */ zbar_image_t *tmp; if(!src->src) { tmp = zbar_image_create(); tmp->format = fourcc('Y','8','0','0'); _zbar_image_copy_size(tmp, dst); } else { tmp = src->src->jpeg_img; assert(tmp); _zbar_image_copy_size(dst, tmp); } const zbar_format_def_t *tmpfmt = _zbar_format_lookup(tmp->format); assert(tmpfmt); /* convert to intermediate format */ _zbar_convert_jpeg_to_y(tmp, tmpfmt, src, srcfmt); /* now convert to dst */ _zbar_image_copy_size(dst, tmp); conversion_handler_t *func = conversions[tmpfmt->group][dstfmt->group].func; func(dst, dstfmt, tmp, tmpfmt); if(!src->src) zbar_image_destroy(tmp); } #endif zbar_image_t *zbar_image_convert_resize (const zbar_image_t *src, unsigned long fmt, unsigned width, unsigned height) { const zbar_format_def_t *srcfmt, *dstfmt; conversion_handler_t *func; zbar_image_t *dst = zbar_image_create(); dst->format = fmt; dst->width = width; dst->height = height; zbar_image_set_crop(dst, src->crop_x, src->crop_y, src->crop_w, src->crop_h); if(src->format == fmt && src->width == width && src->height == height) { convert_copy(dst, NULL, src, NULL); return(dst); } srcfmt = _zbar_format_lookup(src->format); dstfmt = _zbar_format_lookup(dst->format); if(!srcfmt || !dstfmt) /* FIXME free dst */ return(NULL); if(srcfmt->group == dstfmt->group && srcfmt->p.cmp == dstfmt->p.cmp && src->width == width && src->height == height) { convert_copy(dst, NULL, src, NULL); return(dst); } func = conversions[srcfmt->group][dstfmt->group].func; dst->cleanup = zbar_image_free_data; func(dst, dstfmt, src, srcfmt); if(!dst->data) { /* conversion failed */ zbar_image_destroy(dst); return(NULL); } return(dst); } zbar_image_t *zbar_image_convert (const zbar_image_t *src, unsigned long fmt) { return(zbar_image_convert_resize(src, fmt, src->width, src->height)); } static inline int has_format (uint32_t fmt, const uint32_t *fmts) { for(; *fmts; fmts++) if(*fmts == fmt) return(1); return(0); } /* select least cost conversion from src format to available dsts */ int _zbar_best_format (uint32_t src, uint32_t *dst, const uint32_t *dsts) { const zbar_format_def_t *srcfmt; unsigned min_cost = -1; if(dst) *dst = 0; if(!dsts) return(-1); if(has_format(src, dsts)) { zprintf(8, "shared format: %4.4s\n", (char*)&src); if(dst) *dst = src; return(0); } srcfmt = _zbar_format_lookup(src); if(!srcfmt) return(-1); zprintf(8, "from %.4s(%08" PRIx32 ") to", (char*)&src, src); for(; *dsts; dsts++) { const zbar_format_def_t *dstfmt = _zbar_format_lookup(*dsts); int cost; if(!dstfmt) continue; if(srcfmt->group == dstfmt->group && srcfmt->p.cmp == dstfmt->p.cmp) cost = 0; else cost = conversions[srcfmt->group][dstfmt->group].cost; if(_zbar_verbosity >= 8) fprintf(stderr, " %.4s(%08" PRIx32 ")=%d", (char*)dsts, *dsts, cost); if(cost >= 0 && min_cost > cost) { min_cost = cost; if(dst) *dst = *dsts; } } if(_zbar_verbosity >= 8) fprintf(stderr, "\n"); return(min_cost); } int zbar_negotiate_format (zbar_video_t *vdo, zbar_window_t *win) { static const uint32_t y800[2] = { fourcc('Y','8','0','0'), 0 }; errinfo_t *errdst; const uint32_t *srcs, *dsts; unsigned min_cost = -1; uint32_t min_fmt = 0; const uint32_t *fmt; if(!vdo && !win) return(0); if(win) (void)window_lock(win); errdst = (vdo) ? &vdo->err : &win->err; if(verify_format_sort()) { if(win) (void)window_unlock(win); return(err_capture(errdst, SEV_FATAL, ZBAR_ERR_INTERNAL, __func__, "image format list is not sorted!?")); } if((vdo && !vdo->formats) || (win && !win->formats)) { if(win) (void)window_unlock(win); return(err_capture(errdst, SEV_ERROR, ZBAR_ERR_UNSUPPORTED, __func__, "no input or output formats available")); } srcs = (vdo) ? vdo->formats : y800; dsts = (win) ? win->formats : y800; for(fmt = _zbar_formats; *fmt; fmt++) { /* only consider formats supported by video device */ uint32_t win_fmt = 0; int cost; if(!has_format(*fmt, srcs)) continue; cost = _zbar_best_format(*fmt, &win_fmt, dsts); if(cost < 0) { zprintf(4, "%.4s(%08" PRIx32 ") -> ? (unsupported)\n", (char*)fmt, *fmt); continue; } zprintf(4, "%.4s(%08" PRIx32 ") -> %.4s(%08" PRIx32 ") (%d)\n", (char*)fmt, *fmt, (char*)&win_fmt, win_fmt, cost); if(min_cost > cost) { min_cost = cost; min_fmt = *fmt; if(!cost) break; } } if(!min_fmt && vdo->emu_formats) { /* As vdo->formats aren't compatible, just free them */ free(vdo->formats); vdo->formats = vdo->emu_formats; vdo->emu_formats = NULL; srcs = (vdo) ? vdo->formats : y800; dsts = (win) ? win->formats : y800; /* * Use the same cost algorithm to select emulated formats. * This might select a sub-optimal conversion, but, in practice, * it will select a conversion to YUV at libv4l, and a YUY->Y8 * in zbar, with it is OK. Yet, it is better to not select the * most performatic conversion than to not support the webcam. */ for(fmt = _zbar_formats; *fmt; fmt++) { /* only consider formats supported by video device */ uint32_t win_fmt = 0; int cost; if(!has_format(*fmt, srcs)) continue; cost = _zbar_best_format(*fmt, &win_fmt, dsts); if(cost < 0) { zprintf(4, "%.4s(%08" PRIx32 ") -> ? (unsupported)\n", (char*)fmt, *fmt); continue; } zprintf(4, "%.4s(%08" PRIx32 ") -> %.4s(%08" PRIx32 ") (%d)\n", (char*)fmt, *fmt, (char*)&win_fmt, win_fmt, cost); if(min_cost > cost) { min_cost = cost; min_fmt = *fmt; if(!cost) break; } } } if(win) (void)window_unlock(win); if(!min_fmt) return(err_capture(errdst, SEV_ERROR, ZBAR_ERR_UNSUPPORTED, __func__, "no supported image formats available")); if(!vdo) return(0); zprintf(2, "setting best format %.4s(%08" PRIx32 ") (%d)\n", (char*)&min_fmt, min_fmt, min_cost); return(zbar_video_init(vdo, min_fmt)); } zbar-0.23/zbar/svg.h0000664000175000017500000000407013466560613011240 00000000000000/*------------------------------------------------------------------------ * Copyright 2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _SVG_H_ #define _SVG_H_ #ifdef DEBUG_SVG typedef enum { SVG_REL, SVG_ABS } svg_absrel_t; void svg_open(const char *name, double x, double y, double w, double h); void svg_close(void); void svg_commentf(const char *format, ...); void svg_image(const char *name, double width, double height); void svg_group_start(const char *cls, double rotate, double scalex, double scaley, double x, double y); void svg_group_end(void); void svg_path_start(const char *cls, double scale, double x, double y); void svg_path_end(void); void svg_path_close(void); void svg_path_moveto(svg_absrel_t abs, double x, double y); void svg_path_lineto(svg_absrel_t abs, double x, double y); #else # define svg_open(...) # define svg_close(...) # define svg_image(...) # define svg_group_start(...) # define svg_group_end(...) # define svg_path_start(...) # define svg_path_end(...) # define svg_path_moveto(...) # define svg_path_lineto(...) # define svg_path_close(...) #endif #endif zbar-0.23/zbar/decoder.c0000664000175000017500000003724413471225716012050 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #include /* malloc, calloc, free */ #include /* snprintf */ #include /* memset, strlen */ #include #if defined(DEBUG_DECODER) || defined(DEBUG_EAN) || defined(DEBUG_CODE93) || \ defined(DEBUG_CODE39) || defined(DEBUG_CODABAR) || defined(DEBUG_I25) || \ defined(DEBUG_DATABAR) || defined(DEBUG_CODE128) || \ defined(DEBUG_SQ_FINDER) || \ defined(DEBUG_QR_FINDER) || (defined(DEBUG_PDF417) && (DEBUG_PDF417 >= 4)) # define DEBUG_LEVEL 1 #endif #include "debug.h" #include "decoder.h" zbar_decoder_t *zbar_decoder_create () { zbar_decoder_t *dcode = calloc(1, sizeof(zbar_decoder_t)); dcode->buf_alloc = BUFFER_MIN; dcode->buf = malloc(dcode->buf_alloc); /* initialize default configs */ #if ENABLE_EAN == 1 dcode->ean.enable = 1; dcode->ean.ean13_config = ((1 << ZBAR_CFG_ENABLE) | (1 << ZBAR_CFG_EMIT_CHECK)); dcode->ean.ean8_config = ((1 << ZBAR_CFG_ENABLE) | (1 << ZBAR_CFG_EMIT_CHECK)); dcode->ean.upca_config = 1 << ZBAR_CFG_EMIT_CHECK; dcode->ean.upce_config = 1 << ZBAR_CFG_EMIT_CHECK; dcode->ean.isbn10_config = 1 << ZBAR_CFG_EMIT_CHECK; dcode->ean.isbn13_config = 1 << ZBAR_CFG_EMIT_CHECK; # ifdef FIXME_ADDON_SYNC dcode->ean.ean2_config = 1 << ZBAR_CFG_ENABLE; dcode->ean.ean5_config = 1 << ZBAR_CFG_ENABLE; # endif #endif #if ENABLE_I25 == 1 dcode->i25.config = 1 << ZBAR_CFG_ENABLE; CFG(dcode->i25, ZBAR_CFG_MIN_LEN) = 6; #endif #if ENABLE_DATABAR == 1 dcode->databar.config = ((1 << ZBAR_CFG_ENABLE) | (1 << ZBAR_CFG_EMIT_CHECK)); dcode->databar.config_exp = ((1 << ZBAR_CFG_ENABLE) | (1 << ZBAR_CFG_EMIT_CHECK)); dcode->databar.csegs = 4; dcode->databar.segs = calloc(4, sizeof(*dcode->databar.segs)); #endif #if ENABLE_CODABAR == 1 dcode->codabar.config = 1 << ZBAR_CFG_ENABLE; CFG(dcode->codabar, ZBAR_CFG_MIN_LEN) = 4; #endif #if ENABLE_CODE39 == 1 dcode->code39.config = 1 << ZBAR_CFG_ENABLE; CFG(dcode->code39, ZBAR_CFG_MIN_LEN) = 1; #endif #if ENABLE_CODE93 == 1 dcode->code93.config = 1 << ZBAR_CFG_ENABLE; #endif #if ENABLE_CODE128 == 1 dcode->code128.config = 1 << ZBAR_CFG_ENABLE; #endif #if ENABLE_PDF417 == 1 dcode->pdf417.config = 1 << ZBAR_CFG_ENABLE; #endif #if ENABLE_QRCODE == 1 dcode->qrf.config = 1 << ZBAR_CFG_ENABLE; #endif #if ENABLE_SQCODE == 1 dcode->sqf.config = 1 << ZBAR_CFG_ENABLE; #endif zbar_decoder_reset(dcode); return(dcode); } void zbar_decoder_destroy (zbar_decoder_t *dcode) { #if ENABLE_DATABAR == 1 if(dcode->databar.segs) free(dcode->databar.segs); #endif if(dcode->buf) free(dcode->buf); free(dcode); } void zbar_decoder_reset (zbar_decoder_t *dcode) { memset(dcode, 0, (long)&dcode->buf_alloc - (long)dcode); #if ENABLE_EAN == 1 ean_reset(&dcode->ean); #endif #if ENABLE_I25 == 1 i25_reset(&dcode->i25); #endif #if ENABLE_DATABAR == 1 databar_reset(&dcode->databar); #endif #if ENABLE_CODABAR == 1 codabar_reset(&dcode->codabar); #endif #if ENABLE_CODE39 == 1 code39_reset(&dcode->code39); #endif #if ENABLE_CODE93 == 1 code93_reset(&dcode->code93); #endif #if ENABLE_CODE128 == 1 code128_reset(&dcode->code128); #endif #if ENABLE_PDF417 == 1 pdf417_reset(&dcode->pdf417); #endif #if ENABLE_QRCODE == 1 qr_finder_reset(&dcode->qrf); #endif } void zbar_decoder_new_scan (zbar_decoder_t *dcode) { /* soft reset decoder */ memset(dcode->w, 0, sizeof(dcode->w)); dcode->lock = 0; dcode->idx = 0; dcode->s6 = 0; #if ENABLE_EAN == 1 ean_new_scan(&dcode->ean); #endif #if ENABLE_I25 == 1 i25_reset(&dcode->i25); #endif #if ENABLE_DATABAR == 1 databar_new_scan(&dcode->databar); #endif #if ENABLE_CODABAR == 1 codabar_reset(&dcode->codabar); #endif #if ENABLE_CODE39 == 1 code39_reset(&dcode->code39); #endif #if ENABLE_CODE93 == 1 code93_reset(&dcode->code93); #endif #if ENABLE_CODE128 == 1 code128_reset(&dcode->code128); #endif #if ENABLE_PDF417 == 1 pdf417_reset(&dcode->pdf417); #endif #if ENABLE_QRCODE == 1 qr_finder_reset(&dcode->qrf); #endif } zbar_color_t zbar_decoder_get_color (const zbar_decoder_t *dcode) { return(get_color(dcode)); } const char *zbar_decoder_get_data (const zbar_decoder_t *dcode) { return((char*)dcode->buf); } unsigned int zbar_decoder_get_data_length (const zbar_decoder_t *dcode) { return(dcode->buflen); } int zbar_decoder_get_direction (const zbar_decoder_t *dcode) { return(dcode->direction); } zbar_decoder_handler_t * zbar_decoder_set_handler (zbar_decoder_t *dcode, zbar_decoder_handler_t *handler) { zbar_decoder_handler_t *result = dcode->handler; dcode->handler = handler; return(result); } void zbar_decoder_set_userdata (zbar_decoder_t *dcode, void *userdata) { dcode->userdata = userdata; } void *zbar_decoder_get_userdata (const zbar_decoder_t *dcode) { return(dcode->userdata); } zbar_symbol_type_t zbar_decoder_get_type (const zbar_decoder_t *dcode) { return(dcode->type); } unsigned int zbar_decoder_get_modifiers (const zbar_decoder_t *dcode) { return(dcode->modifiers); } zbar_symbol_type_t zbar_decode_width (zbar_decoder_t *dcode, unsigned w) { zbar_symbol_type_t tmp, sym = ZBAR_NONE; dcode->w[dcode->idx & (DECODE_WINDOW - 1)] = w; dbprintf(1, " decode[%x]: w=%d (%g)\n", dcode->idx, w, (w / 32.)); /* update shared character width */ dcode->s6 -= get_width(dcode, 7); dcode->s6 += get_width(dcode, 1); /* each decoder processes width stream in parallel */ #if ENABLE_QRCODE == 1 if(TEST_CFG(dcode->qrf.config, ZBAR_CFG_ENABLE) && (tmp = _zbar_find_qr(dcode)) > ZBAR_PARTIAL) sym = tmp; #endif #if ENABLE_EAN == 1 if((dcode->ean.enable) && (tmp = _zbar_decode_ean(dcode))) sym = tmp; #endif #if ENABLE_CODE39 == 1 if(TEST_CFG(dcode->code39.config, ZBAR_CFG_ENABLE) && (tmp = _zbar_decode_code39(dcode)) > ZBAR_PARTIAL) sym = tmp; #endif #if ENABLE_CODE93 == 1 if(TEST_CFG(dcode->code93.config, ZBAR_CFG_ENABLE) && (tmp = _zbar_decode_code93(dcode)) > ZBAR_PARTIAL) sym = tmp; #endif #if ENABLE_CODE128 == 1 if(TEST_CFG(dcode->code128.config, ZBAR_CFG_ENABLE) && (tmp = _zbar_decode_code128(dcode)) > ZBAR_PARTIAL) sym = tmp; #endif #if ENABLE_DATABAR == 1 if(TEST_CFG(dcode->databar.config | dcode->databar.config_exp, ZBAR_CFG_ENABLE) && (tmp = _zbar_decode_databar(dcode)) > ZBAR_PARTIAL) sym = tmp; #endif #if ENABLE_CODABAR == 1 if(TEST_CFG(dcode->codabar.config, ZBAR_CFG_ENABLE) && (tmp = _zbar_decode_codabar(dcode)) > ZBAR_PARTIAL) sym = tmp; #endif #if ENABLE_I25 == 1 if(TEST_CFG(dcode->i25.config, ZBAR_CFG_ENABLE) && (tmp = _zbar_decode_i25(dcode)) > ZBAR_PARTIAL) sym = tmp; #endif #if ENABLE_PDF417 == 1 if(TEST_CFG(dcode->pdf417.config, ZBAR_CFG_ENABLE) && (tmp = _zbar_decode_pdf417(dcode)) > ZBAR_PARTIAL) sym = tmp; #endif dcode->idx++; dcode->type = sym; if(sym) { if(dcode->lock && sym > ZBAR_PARTIAL && sym != ZBAR_QRCODE) release_lock(dcode, sym); if(dcode->handler) dcode->handler(dcode); } return(sym); } static inline const unsigned int* decoder_get_configp (const zbar_decoder_t *dcode, zbar_symbol_type_t sym) { const unsigned int *config; switch(sym) { #if ENABLE_EAN == 1 case ZBAR_EAN13: config = &dcode->ean.ean13_config; break; case ZBAR_EAN2: config = &dcode->ean.ean2_config; break; case ZBAR_EAN5: config = &dcode->ean.ean5_config; break; case ZBAR_EAN8: config = &dcode->ean.ean8_config; break; case ZBAR_UPCA: config = &dcode->ean.upca_config; break; case ZBAR_UPCE: config = &dcode->ean.upce_config; break; case ZBAR_ISBN10: config = &dcode->ean.isbn10_config; break; case ZBAR_ISBN13: config = &dcode->ean.isbn13_config; break; #endif #if ENABLE_I25 == 1 case ZBAR_I25: config = &dcode->i25.config; break; #endif #if ENABLE_DATABAR == 1 case ZBAR_DATABAR: config = &dcode->databar.config; break; case ZBAR_DATABAR_EXP: config = &dcode->databar.config_exp; break; #endif #if ENABLE_CODABAR == 1 case ZBAR_CODABAR: config = &dcode->codabar.config; break; #endif #if ENABLE_CODE39 == 1 case ZBAR_CODE39: config = &dcode->code39.config; break; #endif #if ENABLE_CODE93 == 1 case ZBAR_CODE93: config = &dcode->code93.config; break; #endif #if ENABLE_CODE128 == 1 case ZBAR_CODE128: config = &dcode->code128.config; break; #endif #if ENABLE_PDF417 == 1 case ZBAR_PDF417: config = &dcode->pdf417.config; break; #endif #if ENABLE_QRCODE == 1 case ZBAR_QRCODE: config = &dcode->qrf.config; break; #endif #if ENABLE_SQCODE == 1 case ZBAR_SQCODE: config = &dcode->sqf.config; break; #endif default: config = NULL; } return(config); } unsigned int zbar_decoder_get_configs (const zbar_decoder_t *dcode, zbar_symbol_type_t sym) { const unsigned *config = decoder_get_configp(dcode, sym); if(!config) return(0); return(*config); } static inline int decoder_set_config_bool (zbar_decoder_t *dcode, zbar_symbol_type_t sym, zbar_config_t cfg, int val) { unsigned *config = (void*)decoder_get_configp(dcode, sym); if(!config || cfg >= ZBAR_CFG_NUM) return(1); if(!val) *config &= ~(1 << cfg); else if(val == 1) *config |= (1 << cfg); else return(1); #if ENABLE_EAN == 1 dcode->ean.enable = TEST_CFG(dcode->ean.ean13_config | dcode->ean.ean2_config | dcode->ean.ean5_config | dcode->ean.ean8_config | dcode->ean.upca_config | dcode->ean.upce_config | dcode->ean.isbn10_config | dcode->ean.isbn13_config, ZBAR_CFG_ENABLE); #endif return(0); } static inline int decoder_set_config_int (zbar_decoder_t *dcode, zbar_symbol_type_t sym, zbar_config_t cfg, int val) { switch(sym) { #if ENABLE_I25 == 1 case ZBAR_I25: CFG(dcode->i25, cfg) = val; break; #endif #if ENABLE_CODABAR == 1 case ZBAR_CODABAR: CFG(dcode->codabar, cfg) = val; break; #endif #if ENABLE_CODE39 == 1 case ZBAR_CODE39: CFG(dcode->code39, cfg) = val; break; #endif #if ENABLE_CODE93 == 1 case ZBAR_CODE93: CFG(dcode->code93, cfg) = val; break; #endif #if ENABLE_CODE128 == 1 case ZBAR_CODE128: CFG(dcode->code128, cfg) = val; break; #endif #if ENABLE_PDF417 == 1 case ZBAR_PDF417: CFG(dcode->pdf417, cfg) = val; break; #endif default: return(1); } return(0); } int zbar_decoder_get_config(zbar_decoder_t *dcode, zbar_symbol_type_t sym, zbar_config_t cfg, int *val) { const unsigned *config = decoder_get_configp(dcode, sym); /* Return error if symbol doesn't have config */ if(sym <= ZBAR_PARTIAL || sym > ZBAR_CODE128 || sym == ZBAR_COMPOSITE) return 1; /* Return decoder boolean configs */ if (cfg < ZBAR_CFG_NUM) { *val = (*config & (1 << cfg)) != 0; return 0; } /* Return decoder integer configs */ if(cfg >= ZBAR_CFG_MIN_LEN && cfg <= ZBAR_CFG_MAX_LEN) { switch(sym) { #if ENABLE_I25 == 1 case ZBAR_I25: *val = CFG(dcode->i25, cfg); return 0; #endif #if ENABLE_CODABAR == 1 case ZBAR_CODABAR: *val = CFG(dcode->codabar, cfg); return 0; #endif #if ENABLE_CODE39 == 1 case ZBAR_CODE39: *val = CFG(dcode->code39, cfg); return 0; #endif #if ENABLE_CODE93 == 1 case ZBAR_CODE93: *val = CFG(dcode->code93, cfg); return 0; #endif #if ENABLE_CODE128 == 1 case ZBAR_CODE128: *val = CFG(dcode->code128, cfg); return 0; #endif #if ENABLE_PDF417 == 1 case ZBAR_PDF417: *val = CFG(dcode->pdf417, cfg); return 0; #endif default: return 1; } } return 1; } int zbar_decoder_set_config (zbar_decoder_t *dcode, zbar_symbol_type_t sym, zbar_config_t cfg, int val) { if(sym == ZBAR_NONE) { static const zbar_symbol_type_t all[] = { ZBAR_EAN13, ZBAR_EAN2, ZBAR_EAN5, ZBAR_EAN8, ZBAR_UPCA, ZBAR_UPCE, ZBAR_ISBN10, ZBAR_ISBN13, ZBAR_I25, ZBAR_DATABAR, ZBAR_DATABAR_EXP, ZBAR_CODABAR, ZBAR_CODE39, ZBAR_CODE93, ZBAR_CODE128, ZBAR_QRCODE, ZBAR_SQCODE, ZBAR_PDF417, 0 }; const zbar_symbol_type_t *symp; for(symp = all; *symp; symp++) zbar_decoder_set_config(dcode, *symp, cfg, val); return(0); } if(cfg >= 0 && cfg < ZBAR_CFG_NUM) return(decoder_set_config_bool(dcode, sym, cfg, val)); else if(cfg >= ZBAR_CFG_MIN_LEN && cfg <= ZBAR_CFG_MAX_LEN) return(decoder_set_config_int(dcode, sym, cfg, val)); else return(1); } static char *decoder_dump = NULL; static unsigned decoder_dumplen = 0; const char *_zbar_decoder_buf_dump (unsigned char *buf, unsigned int buflen) { int dumplen = (buflen * 3) + 12; char *p; int i; if(!decoder_dump || dumplen > decoder_dumplen) { if(decoder_dump) free(decoder_dump); decoder_dump = malloc(dumplen); decoder_dumplen = dumplen; } p = decoder_dump + snprintf(decoder_dump, 12, "buf[%04x]=", (buflen > 0xffff) ? 0xffff : buflen); for(i = 0; i < buflen; i++) p += snprintf(p, 4, "%s%02x", (i) ? " " : "", buf[i]); return(decoder_dump); } zbar-0.23/zbar/img_scanner.h0000664000175000017500000000320413466560613012724 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _IMG_SCANNER_H_ #define _IMG_SCANNER_H_ #include /* internal image scanner APIs for 2D readers */ extern zbar_symbol_t *_zbar_image_scanner_alloc_sym(zbar_image_scanner_t*, zbar_symbol_type_t, int); extern void _zbar_image_scanner_add_sym(zbar_image_scanner_t*, zbar_symbol_t*); extern void _zbar_image_scanner_recycle_syms(zbar_image_scanner_t*, zbar_symbol_t*); #endif zbar-0.23/zbar/window.c0000664000175000017500000002371213471225716011745 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "window.h" #include "image.h" #include "timer.h" #include /* clock_gettime */ #ifdef HAVE_SYS_TIME_H # include /* gettimeofday */ #endif zbar_window_t *zbar_window_create () { zbar_window_t *w = calloc(1, sizeof(zbar_window_t)); if(!w) return(NULL); err_init(&w->err, ZBAR_MOD_WINDOW); w->overlay = 1; (void)_zbar_mutex_init(&w->imglock); return(w); } void zbar_window_destroy (zbar_window_t *w) { /* detach */ zbar_window_attach(w, NULL, 0); err_cleanup(&w->err); _zbar_mutex_destroy(&w->imglock); free(w); } int zbar_window_attach (zbar_window_t *w, void *display, unsigned long drawable) { /* release image */ zbar_window_draw(w, NULL); if(w->cleanup) { w->cleanup(w); w->cleanup = NULL; w->draw_image = NULL; } if(w->formats) { free(w->formats); w->formats = NULL; } w->src_format = 0; w->src_width = w->src_height = 0; w->scaled_size.x = w->scaled_size.y = 0; w->dst_width = w->dst_height = 0; w->max_width = w->max_height = 1 << 15; w->scale_num = w->scale_den = 1; return(_zbar_window_attach(w, display, drawable)); } static void window_outline_symbol (zbar_window_t *w, uint32_t color, const zbar_symbol_t *sym) { if(sym->syms) { const zbar_symbol_t *s; for(s = sym->syms->head; s; s = s->next) window_outline_symbol(w, 1, s); } _zbar_window_draw_polygon(w, color, sym->pts, sym->npts); } static inline int window_draw_overlay (zbar_window_t *w) { if(!w->overlay) return(0); if(w->overlay >= 1 && w->image && w->image->syms) { /* FIXME outline each symbol */ const zbar_symbol_t *sym = w->image->syms->head; for(; sym; sym = sym->next) { uint32_t color = ((sym->cache_count < 0) ? 4 : 2); if(sym->type == ZBAR_QRCODE || sym->type == ZBAR_SQCODE) window_outline_symbol(w, color, sym); else { /* FIXME linear bbox broken */ point_t org = w->scaled_offset; int i; for(i = 0; i < sym->npts; i++) { point_t p = window_scale_pt(w, sym->pts[i]); p.x += org.x; p.y += org.y; if(p.x < 3) p.x = 3; else if(p.x > w->width - 4) p.x = w->width - 4; if(p.y < 3) p.y = 3; else if(p.y > w->height - 4) p.y = w->height - 4; _zbar_window_draw_marker(w, color, p); } } } } if(w->overlay >= 2) { /* calculate/display frame rate */ unsigned long time = _zbar_timer_now(); if(w->time) { int avg = w->time_avg = (w->time_avg + time - w->time) / 2; point_t p = { -8, -1 }; char text[32]; sprintf(text, "%d.%01d fps", 1000 / avg, (10000 / avg) % 10); _zbar_window_draw_text(w, 3, p, text); } w->time = time; } return(0); } inline int zbar_window_redraw (zbar_window_t *w) { int rc = 0; zbar_image_t *img; if(window_lock(w)) return(-1); if(!w->display || _zbar_window_begin(w)) { (void)window_unlock(w); return(-1); } img = w->image; if(w->init && w->draw_image && img) { int format_change = (w->src_format != img->format && w->format != img->format); if(format_change) { _zbar_best_format(img->format, &w->format, w->formats); if(!w->format) rc = err_capture_int(w, SEV_ERROR, ZBAR_ERR_UNSUPPORTED, __func__, "no conversion from %x to supported formats", img->format); w->src_format = img->format; } if(!rc && (format_change || !w->scaled_size.x || !w->dst_width)) { point_t size = { w->width, w->height }; zprintf(24, "init: src=%.4s(%08x) %dx%d dst=%.4s(%08x) %dx%d\n", (char*)&w->src_format, w->src_format, w->src_width, w->src_height, (char*)&w->format, w->format, w->dst_width, w->dst_height); if(!w->dst_width) { w->src_width = img->width; w->src_height = img->height; } if(size.x > w->max_width) size.x = w->max_width; if(size.y > w->max_height) size.y = w->max_height; if(size.x * w->src_height < size.y * w->src_width) { w->scale_num = size.x; w->scale_den = w->src_width; } else { w->scale_num = size.y; w->scale_den = w->src_height; } rc = w->init(w, img, format_change); if(!rc) { size.x = w->src_width; size.y = w->src_height; w->scaled_size = size = window_scale_pt(w, size); w->scaled_offset.x = ((int)w->width - size.x) / 2; w->scaled_offset.y = ((int)w->height - size.y) / 2; zprintf(24, "scale: src=%dx%d win=%dx%d by %d/%d => %dx%d @%d,%d\n", w->src_width, w->src_height, w->width, w->height, w->scale_num, w->scale_den, size.x, size.y, w->scaled_offset.x, w->scaled_offset.y); } else { /* unable to display this image */ _zbar_image_refcnt(img, -1); w->image = img = NULL; } } if(!rc && (img->format != w->format || img->width != w->dst_width || img->height != w->dst_height)) { /* save *converted* image for redraw */ zprintf(48, "convert: %.4s(%08x) %dx%d => %.4s(%08x) %dx%d\n", (char*)&img->format, img->format, img->width, img->height, (char*)&w->format, w->format, w->dst_width, w->dst_height); w->image = zbar_image_convert_resize(img, w->format, w->dst_width, w->dst_height); w->image->syms = img->syms; if(img->syms) zbar_symbol_set_ref(img->syms, 1); zbar_image_destroy(img); img = w->image; } if(!rc) { point_t org; rc = w->draw_image(w, img); org = w->scaled_offset; if(org.x > 0) { point_t p = { 0, org.y }; point_t s = { org.x, w->scaled_size.y }; _zbar_window_fill_rect(w, 0, p, s); s.x = w->width - w->scaled_size.x - s.x; if(s.x > 0) { p.x = w->width - s.x; _zbar_window_fill_rect(w, 0, p, s); } } if(org.y > 0) { point_t p = { 0, 0 }; point_t s = { w->width, org.y }; _zbar_window_fill_rect(w, 0, p, s); s.y = w->height - w->scaled_size.y - s.y; if(s.y > 0) { p.y = w->height - s.y; _zbar_window_fill_rect(w, 0, p, s); } } } if(!rc) rc = window_draw_overlay(w); } else rc = 1; if(rc) rc = _zbar_window_draw_logo(w); _zbar_window_end(w); (void)window_unlock(w); return(rc); } int zbar_window_draw (zbar_window_t *w, zbar_image_t *img) { if(window_lock(w)) return(-1); if(!w->draw_image) img = NULL; if(img) { _zbar_image_refcnt(img, 1); if(img->width != w->src_width || img->height != w->src_height) w->dst_width = 0; } if(w->image) _zbar_image_refcnt(w->image, -1); w->image = img; return(window_unlock(w)); } void zbar_window_set_overlay (zbar_window_t *w, int lvl) { if(lvl < 0) lvl = 0; if(lvl > 2) lvl = 2; if(window_lock(w)) return; if(w->overlay != lvl) w->overlay = lvl; (void)window_unlock(w); } int zbar_window_get_overlay (const zbar_window_t *w) { zbar_window_t *ncw = (zbar_window_t*)w; int lvl; if(window_lock(ncw)) return(-1); lvl = w->overlay; (void)window_unlock(ncw); return(lvl); } int zbar_window_resize (zbar_window_t *w, unsigned width, unsigned height) { if(window_lock(w)) return(-1); w->width = width; w->height = height; w->scaled_size.x = 0; _zbar_window_resize(w); return(window_unlock(w)); } zbar-0.23/zbar/image.h0000664000175000017500000001314513471225716011524 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _IMAGE_H_ #define _IMAGE_H_ #include #ifdef HAVE_INTTYPES_H # include #endif #include #include #include #include "error.h" #include "symbol.h" #include "refcnt.h" #define fourcc zbar_fourcc /* unpack size/location of component */ #define RGB_SIZE(c) ((c) >> 5) #define RGB_OFFSET(c) ((c) & 0x1f) /* coarse image format categorization. * to limit conversion variations */ typedef enum zbar_format_group_e { ZBAR_FMT_GRAY, ZBAR_FMT_YUV_PLANAR, ZBAR_FMT_YUV_PACKED, ZBAR_FMT_RGB_PACKED, ZBAR_FMT_YUV_NV, ZBAR_FMT_JPEG, /* enum size */ ZBAR_FMT_NUM } zbar_format_group_t; struct zbar_image_s { uint32_t format; /* fourcc image format code */ unsigned width, height; /* image size */ const void *data; /* image sample data */ unsigned long datalen; /* allocated/mapped size of data */ unsigned crop_x, crop_y; /* crop rectangle */ unsigned crop_w, crop_h; void *userdata; /* user specified data associated w/image */ /* cleanup handler */ zbar_image_cleanup_handler_t *cleanup; refcnt_t refcnt; /* reference count */ zbar_video_t *src; /* originator */ int srcidx; /* index used by originator */ zbar_image_t *next; /* internal image lists */ unsigned seq; /* page/frame sequence number */ zbar_symbol_set_t *syms; /* decoded result set */ }; /* description of an image format */ typedef struct zbar_format_def_s { uint32_t format; /* fourcc */ zbar_format_group_t group; /* coarse categorization */ union { uint8_t gen[4]; /* raw bytes */ struct { uint8_t bpp; /* bits per pixel */ uint8_t red, green, blue; /* size/location a la RGB_BITS() */ } rgb; struct { uint8_t xsub2, ysub2; /* chroma subsampling in each axis */ uint8_t packorder; /* channel ordering flags * bit0: 0=UV, 1=VU * bit1: 0=Y/chroma, 1=chroma/Y */ } yuv; uint32_t cmp; /* quick compare equivalent formats */ } p; } zbar_format_def_t; extern int _zbar_best_format(uint32_t, uint32_t*, const uint32_t*); extern const zbar_format_def_t *_zbar_format_lookup(uint32_t); extern void _zbar_image_free(zbar_image_t*); #ifdef DEBUG_SVG extern int zbar_image_write_png(const zbar_image_t*, const char*); #else # define zbar_image_write_png(...) #endif static inline void _zbar_image_refcnt (zbar_image_t *img, int delta) { if(!_zbar_refcnt(&img->refcnt, delta) && delta <= 0) { if(img->cleanup) img->cleanup(img); if(!img->src) _zbar_image_free(img); } } static inline void _zbar_image_swap_symbols (zbar_image_t *a, zbar_image_t *b) { zbar_symbol_set_t *tmp = a->syms; a->syms = b->syms; b->syms = tmp; } static inline void _zbar_image_copy_size (zbar_image_t *dst, const zbar_image_t *src) { dst->width = src->width; dst->height = src->height; dst->crop_x = src->crop_x; dst->crop_y = src->crop_y; dst->crop_w = src->crop_w; dst->crop_h = src->crop_h; } static inline zbar_image_t *_zbar_image_copy (const zbar_image_t *src, int inverted) { zbar_image_t *dst; if (inverted && (src->format != fourcc('Y','8','0','0')) && (src->format != fourcc('G','R','E','Y')) ) return NULL; dst = zbar_image_create(); dst->format = src->format; _zbar_image_copy_size(dst, src); dst->datalen = src->datalen; dst->data = malloc(src->datalen); assert(dst->data); if (!inverted) { memcpy((void*)dst->data, src->data, src->datalen); } else { int i, len = src->datalen; long *sp = (void *)src->data, *dp = (void *)dst->data; char *spc, *dpc; /* Do it word per word, in order to speedup */ for (i = 0; i < len; i+= sizeof(long)) *dp++ = ~(*sp++); /* Deal with non-aligned remains, if any */ len -= i; spc = (char *)sp; dpc = (char *)dp; for (i = 0; i < len; i++) *dpc++ = ~(*spc++); } dst->cleanup = zbar_image_free_data; return(dst); } #endif zbar-0.23/zbar/error.h0000664000175000017500000001730713471225700011570 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _ERROR_H_ #define _ERROR_H_ #include #ifdef HAVE_INTTYPES_H # include #endif #include #include #include #ifdef HAVE_ERRNO_H # include #endif #include #include #ifdef _WIN32 # include #endif #if __STDC_VERSION__ < 199901L # if __GNUC__ >= 2 # define __func__ __FUNCTION__ # else # define __func__ "" # endif #endif #define ERRINFO_MAGIC (0x5252457a) /* "zERR" (LE) */ typedef enum errsev_e { SEV_FATAL = -2, /* application must terminate */ SEV_ERROR = -1, /* might be able to recover and continue */ SEV_OK = 0, SEV_WARNING = 1, /* unexpected condition */ SEV_NOTE = 2, /* fyi */ } errsev_t; typedef enum errmodule_e { ZBAR_MOD_PROCESSOR, ZBAR_MOD_VIDEO, ZBAR_MOD_WINDOW, ZBAR_MOD_IMAGE_SCANNER, ZBAR_MOD_UNKNOWN, } errmodule_t; typedef struct errinfo_s { uint32_t magic; /* just in case */ errmodule_t module; /* reporting module */ char *buf; /* formatted and passed to application */ int errnum; /* errno for system errors */ errsev_t sev; zbar_error_t type; const char *func; /* reporting function */ const char *detail; /* description */ char *arg_str; /* single string argument */ int arg_int; /* single integer argument */ } errinfo_t; extern int _zbar_verbosity; /* FIXME don't we need varargs hacks here? */ #ifdef _WIN32 # define ZFLUSH fflush(stderr); #else # define ZFLUSH #endif #ifdef ZNO_MESSAGES # ifdef __GNUC__ /* older versions of gcc (< 2.95) require a named varargs parameter */ # define zprintf(args...) # else /* unfortunately named vararg parameter is a gcc-specific extension */ # define zprintf(...) # endif #else # ifdef __GNUC__ # define zprintf(level, format, args...) do { \ if(_zbar_verbosity >= level) { \ fprintf(stderr, "%s: " format, __func__ , ##args); \ ZFLUSH \ } \ } while(0) # define zwprintf(level, format, args...) do { \ if(_zbar_verbosity >= level) { \ fprintf(stderr, "%s: ", __func__); \ fwprintf(stderr, format, ##args); \ ZFLUSH \ } \ } while(0) # else # define zprintf(level, format, ...) do { \ if(_zbar_verbosity >= level) { \ fprintf(stderr, "%s: " format, __func__ , ##__VA_ARGS__); \ ZFLUSH \ } \ } while(0) # define zwprintf(level, format, ...) do { \ if(_zbar_verbosity >= level) { \ fprintf(stderr, "%s: ", __func__); \ fwprintf(stderr, format, ##__VA_ARGS__); \ ZFLUSH \ } \ } while(0) # endif #endif static inline int err_copy (void *dst_c, void *src_c) { errinfo_t *dst = dst_c; errinfo_t *src = src_c; assert(dst->magic == ERRINFO_MAGIC); assert(src->magic == ERRINFO_MAGIC); dst->errnum = src->errnum; dst->sev = src->sev; dst->type = src->type; dst->func = src->func; dst->detail = src->detail; dst->arg_str = src->arg_str; src->arg_str = NULL; /* unused at src, avoid double free */ dst->arg_int = src->arg_int; return(-1); } static inline int err_capture (const void *container, errsev_t sev, zbar_error_t type, const char *func, const char *detail) { errinfo_t *err = (errinfo_t*)container; assert(err->magic == ERRINFO_MAGIC); #ifdef HAVE_ERRNO_H if(type == ZBAR_ERR_SYSTEM) err->errnum = errno; #endif #ifdef _WIN32 if(type == ZBAR_ERR_WINAPI) err->errnum = GetLastError(); #endif err->sev = sev; err->type = type; err->func = func; err->detail = detail; if(_zbar_verbosity >= 1) _zbar_error_spew(err, 0); return(-1); } static inline int err_capture_str (const void *container, errsev_t sev, zbar_error_t type, const char *func, const char *detail, const char *arg) { errinfo_t *err = (errinfo_t*)container; assert(err->magic == ERRINFO_MAGIC); if(err->arg_str) free(err->arg_str); err->arg_str = strdup(arg); return(err_capture(container, sev, type, func, detail)); } static inline int err_capture_int (const void *container, errsev_t sev, zbar_error_t type, const char *func, const char *detail, int arg) { errinfo_t *err = (errinfo_t*)container; assert(err->magic == ERRINFO_MAGIC); err->arg_int = arg; return(err_capture(container, sev, type, func, detail)); } static inline int err_capture_num (const void *container, errsev_t sev, zbar_error_t type, const char *func, const char *detail, int num) { errinfo_t *err = (errinfo_t*)container; assert(err->magic == ERRINFO_MAGIC); err->errnum = num; return(err_capture(container, sev, type, func, detail)); } static inline void err_init (errinfo_t *err, errmodule_t module) { err->magic = ERRINFO_MAGIC; err->module = module; } static inline void err_cleanup (errinfo_t *err) { assert(err->magic == ERRINFO_MAGIC); if(err->buf) { free(err->buf); err->buf = NULL; } if(err->arg_str) { free(err->arg_str); err->arg_str = NULL; } } #endif zbar-0.23/zbar/qrcode.h0000664000175000017500000000503713466560613011722 00000000000000/*Copyright (C) 2008-2009 Timothy B. Terriberry (tterribe@xiph.org) You can redistribute this library and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.*/ #ifndef _QRCODE_H_ #define _QRCODE_H_ #include typedef struct qr_reader qr_reader; typedef int qr_point[2]; typedef struct qr_finder_line qr_finder_line; /*The number of bits of subpel precision to store image coordinates in. This helps when estimating positions in low-resolution images, which may have a module pitch only a pixel or two wide, making rounding errors matter a great deal.*/ #define QR_FINDER_SUBPREC (2) /*A line crossing a finder pattern. Whether the line is horizontal or vertical is determined by context. The offsts to various parts of the finder pattern are as follows: |*****| |*****|*****|*****| |*****| |*****| |*****|*****|*****| |*****| ^ ^ ^ ^ | | | | | | | pos[v]+len+eoffs | | pos[v]+len | pos[v] pos[v]-boffs Here v is 0 for horizontal and 1 for vertical lines.*/ struct qr_finder_line { /*The location of the upper/left endpoint of the line. The left/upper edge of the center section is used, since other lines must cross in this region.*/ qr_point pos; /*The length of the center section. This extends to the right/bottom of the center section, since other lines must cross in this region.*/ int len; /*The offset to the midpoint of the upper/left section (part of the outside ring), or 0 if we couldn't identify the edge of the beginning section. We use the midpoint instead of the edge because it can be located more reliably.*/ int boffs; /*The offset to the midpoint of the end section (part of the outside ring), or 0 if we couldn't identify the edge of the end section. We use the midpoint instead of the edge because it can be located more reliably.*/ int eoffs; }; qr_reader *_zbar_qr_create(void); void _zbar_qr_destroy(qr_reader *reader); void _zbar_qr_reset(qr_reader *reader); int _zbar_qr_found_line(qr_reader *reader, int direction, const qr_finder_line *line); int _zbar_qr_decode(qr_reader *reader, zbar_image_scanner_t *iscn, zbar_image_t *img); #endif zbar-0.23/zbar/config.c0000664000175000017500000001264013471225716011701 00000000000000/*------------------------------------------------------------------------ * Copyright 2008-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #include /* strtol */ #include /* strchr, strncmp, strlen */ #ifdef HAVE_ERRNO_H # include #endif #include int zbar_parse_config (const char *cfgstr, zbar_symbol_type_t *sym, zbar_config_t *cfg, int *val) { const char *dot, *eq; int len; char negate; if(!cfgstr) return(1); dot = strchr(cfgstr, '.'); if(dot) { int len = dot - cfgstr; if(!len || (len == 1 && !strncmp(cfgstr, "*", len))) *sym = 0; else if(len < 2) return(1); else if(!strncmp(cfgstr, "qrcode", len)) *sym = ZBAR_QRCODE; else if(!strncmp(cfgstr, "sqcode", len)) *sym = ZBAR_SQCODE; else if(!strncmp(cfgstr, "db", len)) *sym = ZBAR_DATABAR; else if(len < 3) return(1); else if(!strncmp(cfgstr, "upca", len)) *sym = ZBAR_UPCA; else if(!strncmp(cfgstr, "upce", len)) *sym = ZBAR_UPCE; else if(!strncmp(cfgstr, "ean13", len)) *sym = ZBAR_EAN13; else if(!strncmp(cfgstr, "ean8", len)) *sym = ZBAR_EAN8; else if(!strncmp(cfgstr, "ean5", len)) *sym = ZBAR_EAN5; else if(!strncmp(cfgstr, "ean2", len)) *sym = ZBAR_EAN2; else if(!strncmp(cfgstr, "composite", len)) *sym = ZBAR_COMPOSITE; else if(!strncmp(cfgstr, "i25", len)) *sym = ZBAR_I25; else if(len < 4) return(1); else if(!strncmp(cfgstr, "scanner", len)) *sym = ZBAR_PARTIAL; /* FIXME lame */ else if(!strncmp(cfgstr, "isbn13", len)) *sym = ZBAR_ISBN13; else if(!strncmp(cfgstr, "isbn10", len)) *sym = ZBAR_ISBN10; else if(!strncmp(cfgstr, "db-exp", len)) *sym = ZBAR_DATABAR_EXP; else if(!strncmp(cfgstr, "codabar", len)) *sym = ZBAR_CODABAR; else if(len < 6) return(1); else if(!strncmp(cfgstr, "code93", len)) *sym = ZBAR_CODE93; else if(!strncmp(cfgstr, "code39", len)) *sym = ZBAR_CODE39; else if(!strncmp(cfgstr, "pdf417", len)) *sym = ZBAR_PDF417; else if(len < 7) return(1); else if(!strncmp(cfgstr, "code128", len)) *sym = ZBAR_CODE128; else if(!strncmp(cfgstr, "databar", len)) *sym = ZBAR_DATABAR; else if(!strncmp(cfgstr, "databar-exp", len)) *sym = ZBAR_DATABAR_EXP; else return(1); cfgstr = dot + 1; } else *sym = 0; len = strlen(cfgstr); eq = strchr(cfgstr, '='); if(eq) len = eq - cfgstr; else *val = 1; /* handle this here so we can override later */ negate = 0; if(len > 3 && !strncmp(cfgstr, "no-", 3)) { negate = 1; cfgstr += 3; len -= 3; } if(len < 1) return(1); else if(!strncmp(cfgstr, "y-density", len)) *cfg = ZBAR_CFG_Y_DENSITY; else if(!strncmp(cfgstr, "x-density", len)) *cfg = ZBAR_CFG_X_DENSITY; else if(len < 2) return(1); else if(!strncmp(cfgstr, "enable", len)) *cfg = ZBAR_CFG_ENABLE; else if(len < 3) return(1); else if(!strncmp(cfgstr, "disable", len)) { *cfg = ZBAR_CFG_ENABLE; negate = !negate; /* no-disable ?!? */ } else if(!strncmp(cfgstr, "min-length", len)) *cfg = ZBAR_CFG_MIN_LEN; else if(!strncmp(cfgstr, "max-length", len)) *cfg = ZBAR_CFG_MAX_LEN; else if(!strncmp(cfgstr, "ascii", len)) *cfg = ZBAR_CFG_ASCII; else if(!strncmp(cfgstr, "add-check", len)) *cfg = ZBAR_CFG_ADD_CHECK; else if(!strncmp(cfgstr, "emit-check", len)) *cfg = ZBAR_CFG_EMIT_CHECK; else if(!strncmp(cfgstr, "uncertainty", len)) *cfg = ZBAR_CFG_UNCERTAINTY; else if(!strncmp(cfgstr, "test-inverted", len)) *cfg = ZBAR_CFG_TEST_INVERTED; else if(!strncmp(cfgstr, "position", len)) *cfg = ZBAR_CFG_POSITION; else return(1); if(eq) { #ifdef HAVE_ERRNO_H errno = 0; #endif *val = strtol(eq + 1, NULL, 0); #ifdef HAVE_ERRNO_H if(errno) return(1); #endif } if(negate) *val = !*val; return(0); } zbar-0.23/zbar/processor/0000775000175000017500000000000013471606255012365 500000000000000zbar-0.23/zbar/processor/posix.h0000664000175000017500000001037013466560613013622 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _PROCESSOR_POSIX_H_ #define _PROCESSOR_POSIX_H_ #include "processor.h" #ifdef HAVE_POLL_H # include #endif #ifdef HAVE_POLL_H typedef int (poll_handler_t)(zbar_processor_t*, int); /* poll information */ typedef struct poll_desc_s { int num; /* number of descriptors */ struct pollfd *fds; /* poll descriptors */ poll_handler_t **handlers; /* poll handlers */ } poll_desc_t; #endif struct processor_state_s { #ifdef HAVE_POLL_H poll_desc_t polling; /* polling registration */ poll_desc_t thr_polling; /* thread copy */ #endif int kick_fds[2]; /* poll kicker */ poll_handler_t *pre_poll_handler; /* special case */ }; #ifdef HAVE_POLL_H static inline int alloc_polls (volatile poll_desc_t *p) { p->fds = realloc(p->fds, p->num * sizeof(struct pollfd)); p->handlers = realloc(p->handlers, p->num * sizeof(poll_handler_t*)); /* FIXME should check for ENOMEM */ return(0); } static inline int add_poll (zbar_processor_t *proc, int fd, poll_handler_t *handler) { processor_state_t *state = proc->state; _zbar_mutex_lock(&proc->mutex); poll_desc_t *polling = &state->polling; unsigned i = polling->num++; zprintf(5, "[%d] fd=%d handler=%p\n", i, fd, handler); if(!alloc_polls(polling)) { memset(&polling->fds[i], 0, sizeof(struct pollfd)); polling->fds[i].fd = fd; polling->fds[i].events = POLLIN; polling->handlers[i] = handler; } else i = -1; _zbar_mutex_unlock(&proc->mutex); if(proc->input_thread.started) { assert(state->kick_fds[1] >= 0); if(write(state->kick_fds[1], &i /* unused */, sizeof(unsigned)) < 0) return(-1); } else if(!proc->threaded) { state->thr_polling.num = polling->num; state->thr_polling.fds = polling->fds; state->thr_polling.handlers = polling->handlers; } return(i); } static inline int remove_poll (zbar_processor_t *proc, int fd) { processor_state_t *state = proc->state; _zbar_mutex_lock(&proc->mutex); poll_desc_t *polling = &state->polling; int i; for(i = polling->num - 1; i >= 0; i--) if(polling->fds[i].fd == fd) break; zprintf(5, "[%d] fd=%d n=%d\n", i, fd, polling->num); if(i >= 0) { if(i + 1 < polling->num) { int n = polling->num - i - 1; memmove(&polling->fds[i], &polling->fds[i + 1], n * sizeof(struct pollfd)); memmove(&polling->handlers[i], &polling->handlers[i + 1], n * sizeof(poll_handler_t)); } polling->num--; i = alloc_polls(polling); } _zbar_mutex_unlock(&proc->mutex); if(proc->input_thread.started) { if(write(state->kick_fds[1], &i /* unused */, sizeof(unsigned)) < 0) return(-1); } else if(!proc->threaded) { state->thr_polling.num = polling->num; state->thr_polling.fds = polling->fds; state->thr_polling.handlers = polling->handlers; } return(i); } #endif #endif zbar-0.23/zbar/processor/null.c0000664000175000017500000000403613466560613013427 00000000000000/*------------------------------------------------------------------------ * Copyright 2008-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "processor.h" static inline int null_error (void *m, const char *func) { return(err_capture(m, SEV_ERROR, ZBAR_ERR_UNSUPPORTED, func, "not compiled with output window support")); } int _zbar_processor_open (zbar_processor_t *proc, char *name, unsigned w, unsigned h) { return(null_error(proc, __func__)); } int _zbar_processor_close (zbar_processor_t *proc) { return(null_error(proc, __func__)); } int _zbar_processor_set_visible (zbar_processor_t *proc, int vis) { return(null_error(proc, __func__)); } int _zbar_processor_set_size (zbar_processor_t *proc, unsigned width, unsigned height) { return(null_error(proc, __func__)); } int _zbar_processor_invalidate (zbar_processor_t *proc) { return(null_error(proc, __func__)); } zbar-0.23/zbar/processor/x.c0000664000175000017500000002023113466560613012717 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "window.h" #include "processor.h" #include "posix.h" #include #include #include static inline int x_handle_event (zbar_processor_t *proc) { XEvent ev; XNextEvent(proc->display, &ev); switch(ev.type) { case Expose: { /* FIXME ignore when running(?) */ XExposeEvent *exp = (XExposeEvent*)&ev; while(1) { assert(ev.type == Expose); _zbar_window_expose(proc->window, exp->x, exp->y, exp->width, exp->height); if(!exp->count) break; XNextEvent(proc->display, &ev); } zbar_window_redraw(proc->window); break; } case ConfigureNotify: zprintf(3, "resized to %d x %d\n", ev.xconfigure.width, ev.xconfigure.height); zbar_window_resize(proc->window, ev.xconfigure.width, ev.xconfigure.height); _zbar_processor_invalidate(proc); break; case ClientMessage: if((ev.xclient.message_type == XInternAtom(proc->display, "WM_PROTOCOLS", 0)) && ev.xclient.format == 32 && (ev.xclient.data.l[0] == XInternAtom(proc->display, "WM_DELETE_WINDOW", 0))) { zprintf(3, "WM_DELETE_WINDOW\n"); return(_zbar_processor_handle_input(proc, -1)); } case KeyPress: { KeySym key = XLookupKeysym(&ev.xkey, 0); if(IsModifierKey(key)) break; if((key & 0xff00) == 0xff00) key &= 0x00ff; zprintf(16, "KeyPress(%04lx)\n", key); /* FIXME this doesn't really work... */ return(_zbar_processor_handle_input(proc, key & 0xffff)); } case ButtonPress: { zprintf(16, "ButtonPress(%d)\n", ev.xbutton.button); int idx = 1; switch(ev.xbutton.button) { case Button2: idx = 2; break; case Button3: idx = 3; break; case Button4: idx = 4; break; case Button5: idx = 5; break; } return(_zbar_processor_handle_input(proc, idx)); } case DestroyNotify: zprintf(16, "DestroyNotify\n"); zbar_window_attach(proc->window, NULL, 0); proc->xwin = 0; return(0); default: /* ignored */; } return(0); } static int x_handle_events (zbar_processor_t *proc) { int rc = 0; while(rc >= 0 && XPending(proc->display)) rc = x_handle_event(proc); return(rc); } static int x_connection_handler (zbar_processor_t *proc, int i) { _zbar_mutex_lock(&proc->mutex); _zbar_processor_lock(proc); _zbar_mutex_unlock(&proc->mutex); x_handle_events(proc); _zbar_mutex_lock(&proc->mutex); _zbar_processor_unlock(proc, 0); _zbar_mutex_unlock(&proc->mutex); return(0); } static int x_internal_handler (zbar_processor_t *proc, int i) { XProcessInternalConnection(proc->display, proc->state->polling.fds[i].fd); x_connection_handler(proc, i); return(0); } static void x_internal_watcher (Display *display, XPointer client_arg, int fd, Bool opening, XPointer *watch_arg) { zbar_processor_t *proc = (void*)client_arg; if(opening) add_poll(proc, fd, x_internal_handler); else remove_poll(proc, fd); } int _zbar_processor_open (zbar_processor_t *proc, char *title, unsigned width, unsigned height) { proc->display = XOpenDisplay(NULL); if(!proc->display) return(err_capture_str(proc, SEV_ERROR, ZBAR_ERR_XDISPLAY, __func__, "unable to open X display", XDisplayName(NULL))); add_poll(proc, ConnectionNumber(proc->display), x_connection_handler); XAddConnectionWatch(proc->display, x_internal_watcher, (void*)proc); /* must also flush X event queue before polling */ proc->state->pre_poll_handler = x_connection_handler; int screen = DefaultScreen(proc->display); XSetWindowAttributes attr; attr.event_mask = (ExposureMask | StructureNotifyMask | KeyPressMask | ButtonPressMask); proc->xwin = XCreateWindow(proc->display, RootWindow(proc->display, screen), 0, 0, width, height, 0, CopyFromParent, InputOutput, CopyFromParent, CWEventMask, &attr); if(!proc->xwin) { XCloseDisplay(proc->display); return(err_capture(proc, SEV_ERROR, ZBAR_ERR_XPROTO, __func__, "creating window")); } XStoreName(proc->display, proc->xwin, title); XClassHint *class_hint = XAllocClassHint(); class_hint->res_name = "zbar"; class_hint->res_class = "zbar"; XSetClassHint(proc->display, proc->xwin, class_hint); XFree(class_hint); class_hint = NULL; Atom wm_delete_window = XInternAtom(proc->display, "WM_DELETE_WINDOW", 0); if(wm_delete_window) XSetWMProtocols(proc->display, proc->xwin, &wm_delete_window, 1); if(zbar_window_attach(proc->window, proc->display, proc->xwin)) return(err_copy(proc, proc->window)); return(0); } int _zbar_processor_close (zbar_processor_t *proc) { if(proc->window) zbar_window_attach(proc->window, NULL, 0); if(proc->display) { if(proc->xwin) { XDestroyWindow(proc->display, proc->xwin); proc->xwin = 0; } proc->state->pre_poll_handler = NULL; remove_poll(proc, ConnectionNumber(proc->display)); XCloseDisplay(proc->display); proc->display = NULL; } return(0); } int _zbar_processor_invalidate (zbar_processor_t *proc) { if(!proc->display || !proc->xwin) return(0); XClearArea(proc->display, proc->xwin, 0, 0, 0, 0, 1); XFlush(proc->display); return(0); } int _zbar_processor_set_size (zbar_processor_t *proc, unsigned width, unsigned height) { if(!proc->display || !proc->xwin) return(0); /* refuse to resize greater than (default) screen size */ XWindowAttributes attr; XGetWindowAttributes(proc->display, proc->xwin, &attr); int maxw = WidthOfScreen(attr.screen); int maxh = HeightOfScreen(attr.screen); int w, h; if(width > maxw) { h = (maxw * height + width - 1) / width; w = maxw; } else { w = width; h = height; } if(h > maxh) { w = (maxh * width + height - 1) / height; h = maxh; } assert(w <= maxw); assert(h <= maxh); XResizeWindow(proc->display, proc->xwin, w, h); XFlush(proc->display); return(0); } int _zbar_processor_set_visible (zbar_processor_t *proc, int visible) { if(visible) XMapRaised(proc->display, proc->xwin); else XUnmapWindow(proc->display, proc->xwin); XFlush(proc->display); return(0); } zbar-0.23/zbar/processor/posix.c0000664000175000017500000002220113466560613013611 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "processor.h" #include "posix.h" #include #include #include static inline int proc_sleep (int timeout) { assert(timeout > 0); struct timespec sleepns, remns; sleepns.tv_sec = timeout / 1000; sleepns.tv_nsec = (timeout % 1000) * 1000000; while(nanosleep(&sleepns, &remns) && errno == EINTR) sleepns = remns; return(1); } int _zbar_event_init (zbar_event_t *event) { event->state = 0; event->pollfd = -1; #ifdef HAVE_LIBPTHREAD pthread_cond_init(&event->cond, NULL); #endif return(0); } void _zbar_event_destroy (zbar_event_t *event) { event->state = -1; event->pollfd = -1; #ifdef HAVE_LIBPTHREAD pthread_cond_destroy(&event->cond); #endif } /* lock must be held */ void _zbar_event_trigger (zbar_event_t *event) { event->state = 1; #ifdef HAVE_LIBPTHREAD pthread_cond_broadcast(&event->cond); #endif if(event->pollfd >= 0) { unsigned i = 0; /* unused */ if(write(event->pollfd, &i, sizeof(unsigned)) < 0) perror(""); event->pollfd = -1; } } #ifdef HAVE_LIBPTHREAD /* lock must be held */ int _zbar_event_wait (zbar_event_t *event, zbar_mutex_t *lock, zbar_timer_t *timeout) { int rc = 0; while(!rc && !event->state) { if(!timeout) rc = pthread_cond_wait(&event->cond, lock); else { struct timespec *timer; # if _POSIX_TIMERS > 0 timer = timeout; # else struct timespec tmp; tmp.tv_sec = timeout->tv_sec; tmp.tv_nsec = timeout->tv_usec * 1000; timer = &tmp; # endif rc = pthread_cond_timedwait(&event->cond, lock, timer); } } /* consume/reset event */ event->state = 0; if(!rc) return(1); /* got event */ if(rc == ETIMEDOUT) return(0); /* timed out */ return(-1); /* error (FIXME save info) */ } int _zbar_thread_start (zbar_thread_t *thr, zbar_thread_proc_t *proc, void *arg, zbar_mutex_t *lock) { if(thr->started || thr->running) return(-1/*FIXME*/); thr->started = 1; _zbar_event_init(&thr->notify); _zbar_event_init(&thr->activity); int rc = 0; _zbar_mutex_lock(lock); if(pthread_create(&thr->tid, NULL, proc, arg) || _zbar_event_wait(&thr->activity, lock, NULL) < 0 || !thr->running) { thr->started = 0; _zbar_event_destroy(&thr->notify); _zbar_event_destroy(&thr->activity); /*rc = err_capture_num(proc, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "spawning thread", rc);*/ rc = -1/*FIXME*/; } _zbar_mutex_unlock(lock); return(rc); } int _zbar_thread_stop (zbar_thread_t *thr, zbar_mutex_t *lock) { if(thr->started) { thr->started = 0; _zbar_event_trigger(&thr->notify); while(thr->running) /* FIXME time out and abandon? */ _zbar_event_wait(&thr->activity, lock, NULL); pthread_join(thr->tid, NULL); _zbar_event_destroy(&thr->notify); _zbar_event_destroy(&thr->activity); } return(0); } #else int _zbar_event_wait (zbar_event_t *event, zbar_mutex_t *lock, zbar_timer_t *timeout) { int rc = !event->state; if(rc) { if(!timeout) /* FIXME was that error or hang? */ return(-1); int sleep = _zbar_timer_check(timeout); if(sleep) proc_sleep(sleep); } rc = !event->state; /* consume/reset event */ event->state = 0; return(rc); } #endif /* used by poll interface. lock is already held */ static int proc_video_handler (zbar_processor_t *proc, int i) { _zbar_mutex_lock(&proc->mutex); _zbar_processor_lock(proc); _zbar_mutex_unlock(&proc->mutex); zbar_image_t *img = NULL; if(proc->streaming) { /* not expected to block */ img = zbar_video_next_image(proc->video); if(img) _zbar_process_image(proc, img); } _zbar_mutex_lock(&proc->mutex); _zbar_processor_unlock(proc, 0); _zbar_mutex_unlock(&proc->mutex); if(img) zbar_image_destroy(img); return(0); } static inline void proc_cache_polling (processor_state_t *state) { /* make a thread-local copy of polling data */ int n = state->thr_polling.num = state->polling.num; alloc_polls(&state->thr_polling); memcpy(state->thr_polling.fds, state->polling.fds, n * sizeof(struct pollfd)); memcpy(state->thr_polling.handlers, state->polling.handlers, n * sizeof(poll_handler_t*)); } static int proc_kick_handler (zbar_processor_t *proc, int i) { processor_state_t *state = proc->state; zprintf(5, "kicking %d fds\n", state->polling.num); unsigned junk[2]; int rc = read(state->kick_fds[0], junk, 2 * sizeof(unsigned)); assert(proc->threaded); _zbar_mutex_lock(&proc->mutex); proc_cache_polling(proc->state); _zbar_mutex_unlock(&proc->mutex); return(rc); } static inline int proc_poll_inputs (zbar_processor_t *proc, int timeout) { processor_state_t *state = proc->state; if(state->pre_poll_handler) state->pre_poll_handler(proc, -1); poll_desc_t *p = &state->thr_polling; assert(p->num); int rc = poll(p->fds, p->num, timeout); if(rc <= 0) /* FIXME detect and handle fatal errors (somehow) */ return(rc); int i; for(i = p->num - 1; i >= 0; i--) if(p->fds[i].revents) { if(p->handlers[i]) p->handlers[i](proc, i); p->fds[i].revents = 0; /* debug */ rc--; } assert(!rc); return(1); } int _zbar_processor_input_wait (zbar_processor_t *proc, zbar_event_t *event, int timeout) { processor_state_t *state = proc->state; if(state->thr_polling.num) { if(event) { _zbar_mutex_lock(&proc->mutex); event->pollfd = state->kick_fds[1]; _zbar_mutex_unlock(&proc->mutex); } return(proc_poll_inputs(proc, timeout)); } else if(timeout) return(proc_sleep(timeout)); return(-1); } int _zbar_processor_init (zbar_processor_t *proc) { processor_state_t *state = proc->state = calloc(1, sizeof(processor_state_t)); state->kick_fds[0] = state->kick_fds[1] = -1; if(proc->threaded) { /* FIXME check errors */ if(pipe(state->kick_fds)) return(err_capture(proc, SEV_FATAL, ZBAR_ERR_SYSTEM, __func__, "failed to open pipe")); add_poll(proc, state->kick_fds[0], proc_kick_handler); proc_cache_polling(proc->state); } return(0); } int _zbar_processor_cleanup (zbar_processor_t *proc) { processor_state_t *state = proc->state; if(proc->threaded) { close(state->kick_fds[0]); close(state->kick_fds[1]); state->kick_fds[0] = state->kick_fds[1] = -1; } if(state->polling.fds) { free(state->polling.fds); state->polling.fds = NULL; if(!proc->threaded) state->thr_polling.fds = NULL; } if(state->polling.handlers) { free(state->polling.handlers); state->polling.handlers = NULL; if(!proc->threaded) state->thr_polling.handlers = NULL; } if(state->thr_polling.fds) { free(state->thr_polling.fds); state->thr_polling.fds = NULL; } if(state->thr_polling.handlers) { free(state->thr_polling.handlers); state->thr_polling.handlers = NULL; } free(proc->state); proc->state = NULL; return(0); } int _zbar_processor_enable (zbar_processor_t *proc) { int vid_fd = zbar_video_get_fd(proc->video); if(vid_fd < 0) return(0); if(proc->streaming) add_poll(proc, vid_fd, proc_video_handler); else remove_poll(proc, vid_fd); /* FIXME failure recovery? */ return(0); } zbar-0.23/zbar/processor/lock.c0000664000175000017500000001556713466560613013420 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "processor.h" #include /* the processor api lock is a recursive mutex with added capabilities * to completely drop all lock levels before blocking and atomically * unblock a waiting set. the lock is implemented using a variation * of the "specific notification pattern" [cargill], which makes it * easy to provide these features across platforms with consistent, * predictable semantics. probably overkill, but additional overhead * associated with this mechanism should fall in the noise, as locks * are only exchanged O(frame/image) * * [cargill] * http://www.profcon.com/profcon/cargill/jgf/9809/SpecificNotification.html */ static inline proc_waiter_t *proc_waiter_queue (zbar_processor_t *proc) { proc_waiter_t *waiter = proc->free_waiter; if(waiter) { proc->free_waiter = waiter->next; waiter->events = 0; } else { waiter = calloc(1, sizeof(proc_waiter_t)); _zbar_event_init(&waiter->notify); } waiter->next = NULL; waiter->requester = _zbar_thread_self(); if(proc->wait_head) proc->wait_tail->next = waiter; else proc->wait_head = waiter; proc->wait_tail = waiter; return(waiter); } static inline proc_waiter_t *proc_waiter_dequeue (zbar_processor_t *proc) { proc_waiter_t *prev = proc->wait_next, *waiter; if(prev) waiter = prev->next; else waiter = proc->wait_head; while(waiter && (waiter->events & EVENTS_PENDING)) { prev = waiter; proc->wait_next = waiter; waiter = waiter->next; } if(waiter) { if(prev) prev->next = waiter->next; else proc->wait_head = waiter->next; if(!waiter->next) proc->wait_tail = prev; waiter->next = NULL; proc->lock_level = 1; proc->lock_owner = waiter->requester; } return(waiter); } static inline void proc_waiter_release (zbar_processor_t *proc, proc_waiter_t *waiter) { if(waiter) { waiter->next = proc->free_waiter; proc->free_waiter = waiter; } } int _zbar_processor_lock (zbar_processor_t *proc) { if(!proc->lock_level) { proc->lock_owner = _zbar_thread_self(); proc->lock_level = 1; return(0); } if(_zbar_thread_is_self(proc->lock_owner)) { proc->lock_level++; return(0); } proc_waiter_t *waiter = proc_waiter_queue(proc); _zbar_event_wait(&waiter->notify, &proc->mutex, NULL); assert(proc->lock_level == 1); assert(_zbar_thread_is_self(proc->lock_owner)); proc_waiter_release(proc, waiter); return(0); } int _zbar_processor_unlock (zbar_processor_t *proc, int all) { assert(proc->lock_level > 0); assert(_zbar_thread_is_self(proc->lock_owner)); if(all) proc->lock_level = 0; else proc->lock_level--; if(!proc->lock_level) { proc_waiter_t *waiter = proc_waiter_dequeue(proc); if(waiter) _zbar_event_trigger(&waiter->notify); } return(0); } void _zbar_processor_notify (zbar_processor_t *proc, unsigned events) { proc->wait_next = NULL; proc_waiter_t *waiter; for(waiter = proc->wait_head; waiter; waiter = waiter->next) waiter->events = ((waiter->events & ~events) | (events & EVENT_CANCELED)); if(!proc->lock_level) { waiter = proc_waiter_dequeue(proc); if(waiter) _zbar_event_trigger(&waiter->notify); } } static inline int proc_wait_unthreaded (zbar_processor_t *proc, proc_waiter_t *waiter, zbar_timer_t *timeout) { int blocking = proc->streaming && zbar_video_get_fd(proc->video) < 0; _zbar_mutex_unlock(&proc->mutex); int rc = 1; while(rc > 0 && (waiter->events & EVENTS_PENDING)) { /* FIXME lax w/the locking (though shouldn't matter...) */ if(blocking) { zbar_image_t *img = zbar_video_next_image(proc->video); if(!img) { rc = -1; break; } /* FIXME reacquire API lock! (refactor w/video thread?) */ _zbar_mutex_lock(&proc->mutex); _zbar_process_image(proc, img); zbar_image_destroy(img); _zbar_mutex_unlock(&proc->mutex); } int reltime = _zbar_timer_check(timeout); if(blocking && (reltime < 0 || reltime > MAX_INPUT_BLOCK)) reltime = MAX_INPUT_BLOCK; rc = _zbar_processor_input_wait(proc, NULL, reltime); } _zbar_mutex_lock(&proc->mutex); return(rc); } int _zbar_processor_wait (zbar_processor_t *proc, unsigned events, zbar_timer_t *timeout) { _zbar_mutex_lock(&proc->mutex); int save_level = proc->lock_level; proc_waiter_t *waiter = proc_waiter_queue(proc); waiter->events = events & EVENTS_PENDING; _zbar_processor_unlock(proc, 1); int rc; if(proc->threaded) rc = _zbar_event_wait(&waiter->notify, &proc->mutex, timeout); else rc = proc_wait_unthreaded(proc, waiter, timeout); if(rc <= 0 || !proc->threaded) { /* reacquire api lock */ waiter->events &= EVENT_CANCELED; proc->wait_next = NULL; if(!proc->lock_level) { proc_waiter_t *w = proc_waiter_dequeue(proc); assert(w == waiter); } else _zbar_event_wait(&waiter->notify, &proc->mutex, NULL); } if(rc > 0 && (waiter->events & EVENT_CANCELED)) rc = -1; assert(proc->lock_level == 1); assert(_zbar_thread_is_self(proc->lock_owner)); proc->lock_level = save_level; proc_waiter_release(proc, waiter); _zbar_mutex_unlock(&proc->mutex); return(rc); } zbar-0.23/zbar/processor/win.c0000664000175000017500000002324213471225716013250 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "processor.h" #include #include #define WIN_STYLE (WS_CAPTION | \ WS_SYSMENU | \ WS_THICKFRAME | \ WS_MINIMIZEBOX | \ WS_MAXIMIZEBOX) #define EXT_STYLE (WS_EX_APPWINDOW | WS_EX_OVERLAPPEDWINDOW) struct processor_state_s { ATOM registeredClass; }; int _zbar_event_init (zbar_event_t *event) { *event = CreateEvent(NULL, 0, 0, NULL); return((*event) ? 0 : -1); } void _zbar_event_destroy (zbar_event_t *event) { if(*event) { CloseHandle(*event); *event = NULL; } } void _zbar_event_trigger (zbar_event_t *event) { SetEvent(*event); } /* lock must be held */ int _zbar_event_wait (zbar_event_t *event, zbar_mutex_t *lock, zbar_timer_t *timeout) { if(lock) _zbar_mutex_unlock(lock); int rc = WaitForSingleObject(*event, _zbar_timer_check(timeout)); if(lock) _zbar_mutex_lock(lock); if(!rc) return(1); /* got event */ if(rc == WAIT_TIMEOUT) return(0); /* timed out */ return(-1); /* error (FIXME save info) */ } int _zbar_thread_start (zbar_thread_t *thr, zbar_thread_proc_t *proc, void *arg, zbar_mutex_t *lock) { if(thr->started || thr->running) return(-1/*FIXME*/); thr->started = 1; _zbar_event_init(&thr->notify); _zbar_event_init(&thr->activity); HANDLE hthr = CreateThread(NULL, 0, proc, arg, 0, NULL); int rc = (!hthr || _zbar_event_wait(&thr->activity, NULL, NULL) < 0 || !thr->running); CloseHandle(hthr); if(rc) { thr->started = 0; _zbar_event_destroy(&thr->notify); _zbar_event_destroy(&thr->activity); return(-1/*FIXME*/); } return(0); } int _zbar_thread_stop (zbar_thread_t *thr, zbar_mutex_t *lock) { if(thr->started) { thr->started = 0; _zbar_event_trigger(&thr->notify); while(thr->running) /* FIXME time out and abandon? */ _zbar_event_wait(&thr->activity, lock, NULL); _zbar_event_destroy(&thr->notify); _zbar_event_destroy(&thr->activity); } return(0); } static LRESULT CALLBACK win_handle_event (HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) { zbar_processor_t *proc = (zbar_processor_t*)GetWindowLongPtr(hwnd, GWLP_USERDATA); /* initialized during window creation */ if(message == WM_NCCREATE) { proc = ((LPCREATESTRUCT)lparam)->lpCreateParams; assert(proc); SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)proc); proc->display = hwnd; zbar_window_attach(proc->window, proc->display, proc->xwin); } else if(!proc) return(DefWindowProc(hwnd, message, wparam, lparam)); switch(message) { case WM_SIZE: { RECT r; GetClientRect(hwnd, &r); zprintf(3, "WM_SIZE %ldx%ld\n", r.right, r.bottom); assert(proc); zbar_window_resize(proc->window, r.right, r.bottom); InvalidateRect(hwnd, NULL, 0); return(0); } case WM_PAINT: { PAINTSTRUCT ps; BeginPaint(hwnd, &ps); if(zbar_window_redraw(proc->window)) { HDC hdc = GetDC(hwnd); RECT r; GetClientRect(hwnd, &r); FillRect(hdc, &r, GetStockObject(BLACK_BRUSH)); ReleaseDC(hwnd, hdc); } EndPaint(hwnd, &ps); return(0); } case WM_CHAR: { _zbar_processor_handle_input(proc, wparam); return(0); } case WM_LBUTTONDOWN: { _zbar_processor_handle_input(proc, 1); return(0); } case WM_MBUTTONDOWN: { _zbar_processor_handle_input(proc, 2); return(0); } case WM_RBUTTONDOWN: { _zbar_processor_handle_input(proc, 3); return(0); } case WM_CLOSE: { zprintf(3, "WM_CLOSE\n"); _zbar_processor_handle_input(proc, -1); return(1); } case WM_DESTROY: { zprintf(3, "WM_DESTROY\n"); proc->display = NULL; zbar_window_attach(proc->window, NULL, 0); return(0); } } return(DefWindowProc(hwnd, message, wparam, lparam)); } static inline int win_handle_events (zbar_processor_t *proc) { int rc = 0; while(1) { MSG msg; rc = PeekMessage(&msg, proc->display, 0, 0, PM_NOYIELD | PM_REMOVE); if(!rc) return(0); if(rc < 0) return(err_capture(proc, SEV_ERROR, ZBAR_ERR_WINAPI, __func__, "failed to obtain event")); TranslateMessage(&msg); DispatchMessage(&msg); } } int _zbar_processor_init (zbar_processor_t *proc) { proc->state = calloc(1, sizeof(processor_state_t)); return(0); } int _zbar_processor_cleanup (zbar_processor_t *proc) { free(proc->state); proc->state = 0; return(0); } int _zbar_processor_input_wait (zbar_processor_t *proc, zbar_event_t *event, int timeout) { int n = (event) ? 1 : 0; int rc = MsgWaitForMultipleObjects(n, event, 0, timeout, QS_ALLINPUT); if(rc == n) { if(win_handle_events(proc) < 0) return(-1); return(1); } if(!rc) return(1); if(rc == WAIT_TIMEOUT) return(0); return(-1); } int _zbar_processor_enable (zbar_processor_t *proc) { return(0); } static inline ATOM win_register_class (HINSTANCE hmod) { BYTE and_mask[1] = { 0xff }; BYTE xor_mask[1] = { 0x00 }; WNDCLASSEX wc = { sizeof(WNDCLASSEX), 0, }; wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); wc.hInstance = hmod; wc.lpfnWndProc = win_handle_event; wc.lpszClassName = "_ZBar Class"; wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC; wc.hCursor = CreateCursor(hmod, 0, 0, 1, 1, and_mask, xor_mask); return(RegisterClassEx(&wc)); } int _zbar_processor_open (zbar_processor_t *proc, char *title, unsigned width, unsigned height) { HMODULE hmod = NULL; if(!GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, (void*)_zbar_processor_open, (HINSTANCE*)&hmod)) return(err_capture(proc, SEV_ERROR, ZBAR_ERR_WINAPI, __func__, "failed to obtain module handle")); ATOM wca = win_register_class(hmod); if(!wca) return(err_capture(proc, SEV_ERROR, ZBAR_ERR_WINAPI, __func__, "failed to register window class")); proc->state->registeredClass = wca; RECT r = { 0, 0, width, height }; AdjustWindowRectEx(&r, WIN_STYLE, 0, EXT_STYLE); proc->display = CreateWindowEx(EXT_STYLE, (LPCTSTR)(long)wca, "ZBar", WIN_STYLE, CW_USEDEFAULT, CW_USEDEFAULT, r.right - r.left, r.bottom - r.top, NULL, NULL, hmod, proc); if(!proc->display) return(err_capture(proc, SEV_ERROR, ZBAR_ERR_WINAPI, __func__, "failed to open window")); return(0); } int _zbar_processor_close (zbar_processor_t *proc) { if(proc->display) { DestroyWindow(proc->display); UnregisterClass((LPCTSTR)(long)proc->state->registeredClass, 0); proc->display = NULL; } return(0); } int _zbar_processor_set_visible (zbar_processor_t *proc, int visible) { ShowWindow(proc->display, (visible) ? SW_SHOWNORMAL : SW_HIDE); if(visible) InvalidateRect(proc->display, NULL, 0); /* no error conditions */ return(0); } int _zbar_processor_set_size (zbar_processor_t *proc, unsigned width, unsigned height) { RECT r = { 0, 0, width, height }; AdjustWindowRectEx(&r, GetWindowLong(proc->display, GWL_STYLE), 0, GetWindowLong(proc->display, GWL_EXSTYLE)); if(!SetWindowPos(proc->display, NULL, 0, 0, r.right - r.left, r.bottom - r.top, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOREPOSITION)) return(-1/*FIXME*/); return(0); } int _zbar_processor_invalidate (zbar_processor_t *proc) { if(!InvalidateRect(proc->display, NULL, 0)) return(-1/*FIXME*/); return(0); } zbar-0.23/zbar/error.c0000664000175000017500000001344213471225716011566 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "error.h" #include int _zbar_verbosity = 0; static const char * const sev_str[] = { "FATAL ERROR", "ERROR", "OK", "WARNING", "NOTE" }; #define SEV_MAX (strlen(sev_str[0])) static const char * const mod_str[] = { "processor", "video", "window", "image scanner", "" }; #define MOD_MAX (strlen(mod_str[ZBAR_MOD_IMAGE_SCANNER])) static const char * const err_str[] = { "no error", /* OK */ "out of memory", /* NOMEM */ "internal library error", /* INTERNAL */ "unsupported request", /* UNSUPPORTED */ "invalid request", /* INVALID */ "system error", /* SYSTEM */ "locking error", /* LOCKING */ "all resources busy", /* BUSY */ "X11 display error", /* XDISPLAY */ "X11 protocol error", /* XPROTO */ "output window is closed", /* CLOSED */ "windows system error", /* WINAPI */ "unknown error" /* NUM */ }; #define ERR_MAX (strlen(err_str[ZBAR_ERR_CLOSED])) int zbar_version (unsigned *major, unsigned *minor, unsigned *patch) { if(major) *major = ZBAR_VERSION_MAJOR; if(minor) *minor = ZBAR_VERSION_MINOR; if(patch) *patch = ZBAR_VERSION_PATCH; return(0); } void zbar_set_verbosity (int level) { _zbar_verbosity = level; } void zbar_increase_verbosity () { if(!_zbar_verbosity) _zbar_verbosity++; else _zbar_verbosity <<= 1; } int _zbar_error_spew (const void *container, int verbosity) { const errinfo_t *err = container; assert(err->magic == ERRINFO_MAGIC); fprintf(stderr, "%s", _zbar_error_string(err, verbosity)); return(-err->sev); } zbar_error_t _zbar_get_error_code (const void *container) { const errinfo_t *err = container; assert(err->magic == ERRINFO_MAGIC); return(err->type); } /* ERROR: zbar video in v4l1_set_format(): * system error: blah[: blah] */ const char *_zbar_error_string (const void *container, int verbosity) { static const char basefmt[] = "%s: zbar %s in %s():\n %s: "; errinfo_t *err = (errinfo_t*)container; const char *sev, *mod, *func, *type; int len; assert(err->magic == ERRINFO_MAGIC); if(err->sev >= SEV_FATAL && err->sev <= SEV_NOTE) sev = sev_str[err->sev + 2]; else sev = sev_str[1]; if(err->module >= ZBAR_MOD_PROCESSOR && err->module < ZBAR_MOD_UNKNOWN) mod = mod_str[err->module]; else mod = mod_str[ZBAR_MOD_UNKNOWN]; func = (err->func) ? err->func : ""; if(err->type >= 0 && err->type < ZBAR_ERR_NUM) type = err_str[err->type]; else type = err_str[ZBAR_ERR_NUM]; len = SEV_MAX + MOD_MAX + ERR_MAX + strlen(func) + sizeof(basefmt); err->buf = realloc(err->buf, len); len = sprintf(err->buf, basefmt, sev, mod, func, type); if(len <= 0) return(""); if(err->detail) { int newlen = len + strlen(err->detail) + 1; if(strstr(err->detail, "%s")) { if(!err->arg_str) err->arg_str = strdup(""); err->buf = realloc(err->buf, newlen + strlen(err->arg_str)); len += sprintf(err->buf + len, err->detail, err->arg_str); } else if(strstr(err->detail, "%d") || strstr(err->detail, "%x")) { err->buf = realloc(err->buf, newlen + 32); len += sprintf(err->buf + len, err->detail, err->arg_int); } else { err->buf = realloc(err->buf, newlen); len += sprintf(err->buf + len, "%s", err->detail); } if(len <= 0) return(""); } #ifdef HAVE_ERRNO_H if(err->type == ZBAR_ERR_SYSTEM) { static const char sysfmt[] = ": %s (%d)\n"; const char *syserr = strerror(err->errnum); err->buf = realloc(err->buf, len + strlen(sysfmt) + strlen(syserr)); len += sprintf(err->buf + len, sysfmt, syserr, err->errnum); } #endif #ifdef _WIN32 else if(err->type == ZBAR_ERR_WINAPI) { char *syserr = NULL; if(FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err->errnum, 0, (LPTSTR)&syserr, 1, NULL) && syserr) { char sysfmt[] = ": %s (%d)\n"; err->buf = realloc(err->buf, len + strlen(sysfmt) + strlen(syserr)); len += sprintf(err->buf + len, sysfmt, syserr, err->errnum); LocalFree(syserr); } } #endif else { err->buf = realloc(err->buf, len + 2); len += sprintf(err->buf + len, "\n"); } return(err->buf); } zbar-0.23/zbar/jpeg.c0000664000175000017500000001571513471225716011367 00000000000000/*------------------------------------------------------------------------ * Copyright 2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #include #include #include #include /* FIXME tmp debug */ #undef HAVE_STDLIB_H #include #include "image.h" #include "video.h" #define HAVE_LONGJMP #ifdef HAVE_LONGJMP typedef struct errenv_s { struct jpeg_error_mgr err; int valid; jmp_buf env; } errenv_t; void zbar_jpeg_error (j_common_ptr cinfo) { errenv_t *jerr = (errenv_t*)cinfo->err; assert(jerr->valid); jerr->valid = 0; longjmp(jerr->env, 1); assert(0); } #endif typedef struct zbar_src_mgr_s { struct jpeg_source_mgr src; const zbar_image_t *img; } zbar_src_mgr_t; static const JOCTET fake_eoi[2] = { 0xff, JPEG_EOI }; void init_source (j_decompress_ptr cinfo) { /* buffer/length refer to compressed data */ /* FIXME find img */ const zbar_image_t *img = ((zbar_src_mgr_t*)cinfo->src)->img; cinfo->src->next_input_byte = img->data; cinfo->src->bytes_in_buffer = img->datalen; } boolean fill_input_buffer (j_decompress_ptr cinfo) { /* buffer underrun error case */ cinfo->src->next_input_byte = fake_eoi; cinfo->src->bytes_in_buffer = 2; return(1); } void skip_input_data (j_decompress_ptr cinfo, long num_bytes) { if(num_bytes > 0) { if (num_bytes < cinfo->src->bytes_in_buffer) { cinfo->src->next_input_byte += num_bytes; cinfo->src->bytes_in_buffer -= num_bytes; } else { fill_input_buffer(cinfo); } } } void term_source (j_decompress_ptr cinfo) { /* nothing todo */ } struct jpeg_decompress_struct * _zbar_jpeg_decomp_create (void) { j_decompress_ptr cinfo = calloc(1, sizeof(struct jpeg_decompress_struct)); if(!cinfo) return(NULL); errenv_t *jerr = calloc(1, sizeof(errenv_t)); if(!jerr) { free(cinfo); return(NULL); } cinfo->err = jpeg_std_error(&jerr->err); jerr->err.error_exit = zbar_jpeg_error; jerr->valid = 1; if(setjmp(jerr->env)) { jpeg_destroy_decompress(cinfo); /* FIXME TBD save error to errinfo_t */ (*cinfo->err->output_message)((j_common_ptr)cinfo); free(jerr); free(cinfo); return(NULL); } jpeg_create_decompress(cinfo); jerr->valid = 0; return(cinfo); } void _zbar_jpeg_decomp_destroy (struct jpeg_decompress_struct *cinfo) { if(cinfo->err) { free(cinfo->err); cinfo->err = NULL; } if(cinfo->src) { free(cinfo->src); cinfo->src = NULL; } /* FIXME can this error? */ jpeg_destroy_decompress(cinfo); free(cinfo); } /* invoke libjpeg to decompress JPEG format to luminance plane */ void _zbar_convert_jpeg_to_y (zbar_image_t *dst, const zbar_format_def_t *dstfmt, const zbar_image_t *src, const zbar_format_def_t *srcfmt) { /* create decompressor, or use cached video stream decompressor */ errenv_t *jerr = NULL; j_decompress_ptr cinfo; if(!src->src) cinfo = _zbar_jpeg_decomp_create(); else { cinfo = src->src->jpeg; assert(cinfo); } if(!cinfo) goto error; jerr = (errenv_t*)cinfo->err; jerr->valid = 1; if(setjmp(jerr->env)) { /* FIXME TBD save error to src->src->err */ (*cinfo->err->output_message)((j_common_ptr)cinfo); if(dst->data) { free((void*)dst->data); dst->data = NULL; } dst->datalen = 0; goto error; } /* setup input image */ if(!cinfo->src) { cinfo->src = calloc(1, sizeof(zbar_src_mgr_t)); cinfo->src->init_source = init_source; cinfo->src->fill_input_buffer = fill_input_buffer; cinfo->src->skip_input_data = skip_input_data; cinfo->src->resync_to_restart = jpeg_resync_to_restart; cinfo->src->term_source = term_source; } cinfo->src->next_input_byte = NULL; cinfo->src->bytes_in_buffer = 0; ((zbar_src_mgr_t*)cinfo->src)->img = src; int rc = jpeg_read_header(cinfo, TRUE); zprintf(30, "header: %s\n", (rc == 2) ? "tables-only" : "normal"); /* supporting color with jpeg became...complicated, * so we skip that for now */ cinfo->out_color_space = JCS_GRAYSCALE; /* FIXME set scaling based on dst->{width,height} * then pass bigger buffer... */ jpeg_start_decompress(cinfo); /* adjust dst image parameters to match(?) decompressor */ if(dst->width < cinfo->output_width) { dst->width = cinfo->output_width; if(dst->crop_x + dst->crop_w > dst->width) dst->crop_w = dst->width - dst->crop_x; } if(dst->height < cinfo->output_height) { dst->height = cinfo->output_height; if(dst->crop_y + dst->crop_h > dst->height) dst->crop_h = dst->height - dst->crop_y; } unsigned long datalen = (cinfo->output_width * cinfo->output_height * cinfo->out_color_components); zprintf(24, "dst=%dx%d %lx src=%dx%d %lx dct=%x\n", dst->width, dst->height, dst->datalen, src->width, src->height, src->datalen, cinfo->dct_method); if(!dst->data) { dst->datalen = datalen; dst->data = malloc(dst->datalen); dst->cleanup = zbar_image_free_data; } else assert(datalen <= dst->datalen); if(!dst->data) return; unsigned bpl = dst->width * cinfo->output_components; JSAMPROW buf = (void*)dst->data; JSAMPARRAY line = &buf; for(; cinfo->output_scanline < cinfo->output_height; buf += bpl) { jpeg_read_scanlines(cinfo, line, 1); /* FIXME pad out to dst->width */ } /* FIXME always do this? */ jpeg_finish_decompress(cinfo); error: if(jerr) jerr->valid = 0; if(!src->src && cinfo) /* cleanup only if we allocated locally */ _zbar_jpeg_decomp_destroy(cinfo); } zbar-0.23/zbar/symbol.h0000664000175000017500000000673613471225700011750 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _SYMBOL_H_ #define _SYMBOL_H_ #include #include #include "refcnt.h" #define NUM_SYMS 20 typedef struct point_s { int x, y; } point_t; struct zbar_symbol_set_s { refcnt_t refcnt; int nsyms; /* number of filtered symbols */ zbar_symbol_t *head; /* first of decoded symbol results */ zbar_symbol_t *tail; /* last of unfiltered symbol results */ }; struct zbar_symbol_s { zbar_symbol_type_t type; /* symbol type */ unsigned int configs; /* symbology boolean config bitmask */ unsigned int modifiers; /* symbology modifier bitmask */ unsigned int data_alloc; /* allocation size of data */ unsigned int datalen; /* length of binary symbol data */ char *data; /* symbol data */ unsigned pts_alloc; /* allocation size of pts */ unsigned npts; /* number of points in location polygon */ point_t *pts; /* list of points in location polygon */ zbar_orientation_t orient; /* coarse orientation */ refcnt_t refcnt; /* reference count */ zbar_symbol_t *next; /* linked list of results (or siblings) */ zbar_symbol_set_t *syms; /* components of composite result */ unsigned long time; /* relative symbol capture time */ int cache_count; /* cache state */ int quality; /* relative symbol reliability metric */ }; extern int _zbar_get_symbol_hash(zbar_symbol_type_t); extern void _zbar_symbol_free(zbar_symbol_t*); extern zbar_symbol_set_t *_zbar_symbol_set_create(void); extern void _zbar_symbol_set_free(zbar_symbol_set_t*); static inline void sym_add_point (zbar_symbol_t *sym, int x, int y) { int i = sym->npts; if(++sym->npts >= sym->pts_alloc) sym->pts = realloc(sym->pts, ++sym->pts_alloc * sizeof(point_t)); sym->pts[i].x = x; sym->pts[i].y = y; } static inline void _zbar_symbol_refcnt (zbar_symbol_t *sym, int delta) { if(!_zbar_refcnt(&sym->refcnt, delta) && delta <= 0) _zbar_symbol_free(sym); } static inline void _zbar_symbol_set_add (zbar_symbol_set_t *syms, zbar_symbol_t *sym) { sym->next = syms->head; syms->head = sym; syms->nsyms++; _zbar_symbol_refcnt(sym, 1); } #endif zbar-0.23/zbar/Makefile.in0000664000175000017500000031003513471606247012336 00000000000000# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @ENABLE_EAN_TRUE@am__append_1 = decoder/ean.h decoder/ean.c @ENABLE_DATABAR_TRUE@am__append_2 = decoder/databar.h decoder/databar.c @ENABLE_CODE128_TRUE@am__append_3 = decoder/code128.h decoder/code128.c @ENABLE_CODE93_TRUE@am__append_4 = decoder/code93.h decoder/code93.c @ENABLE_CODE39_TRUE@am__append_5 = decoder/code39.h decoder/code39.c @ENABLE_CODABAR_TRUE@am__append_6 = decoder/codabar.h decoder/codabar.c @ENABLE_I25_TRUE@am__append_7 = decoder/i25.h decoder/i25.c @ENABLE_PDF417_TRUE@am__append_8 = decoder/pdf417.h decoder/pdf417.c \ @ENABLE_PDF417_TRUE@ decoder/pdf417_hash.h @ENABLE_QRCODE_TRUE@am__append_9 = qrcode.h \ @ENABLE_QRCODE_TRUE@ decoder/qr_finder.h decoder/qr_finder.c \ @ENABLE_QRCODE_TRUE@ qrcode/qrdec.h qrcode/qrdec.c qrcode/qrdectxt.c \ @ENABLE_QRCODE_TRUE@ qrcode/rs.h qrcode/rs.c \ @ENABLE_QRCODE_TRUE@ qrcode/isaac.h qrcode/isaac.c \ @ENABLE_QRCODE_TRUE@ qrcode/bch15_5.h qrcode/bch15_5.c \ @ENABLE_QRCODE_TRUE@ qrcode/binarize.h qrcode/binarize.c \ @ENABLE_QRCODE_TRUE@ qrcode/util.h qrcode/util.c @ENABLE_SQCODE_TRUE@am__append_10 = sqcode.h sqcode.c \ @ENABLE_SQCODE_TRUE@ decoder/sq_finder.h decoder/sq_finder.c @WIN32_TRUE@am__append_11 = processor/win.c libzbar.rc @WIN32_TRUE@am__append_12 = -mthreads @WIN32_TRUE@am__append_13 = -mthreads # FIXME broken @WIN32_TRUE@am__append_14 = libzbar-rc.lo @WIN32_FALSE@am__append_15 = processor/posix.h processor/posix.c @HAVE_V4L2_TRUE@am__append_16 = video/v4l.c video/v4l2.c @HAVE_V4L1_TRUE@@HAVE_V4L2_FALSE@am__append_17 = video/v4l.c @HAVE_V4L1_TRUE@am__append_18 = video/v4l1.c @HAVE_VIDEO_TRUE@@WIN32_TRUE@@WITH_DIRECTSHOW_FALSE@am__append_19 = video/vfw.c @HAVE_VIDEO_TRUE@@WIN32_TRUE@@WITH_DIRECTSHOW_FALSE@am__append_20 = -lvfw32 @HAVE_VIDEO_TRUE@@WIN32_TRUE@@WITH_DIRECTSHOW_TRUE@am__append_21 = video/dshow.c @HAVE_VIDEO_TRUE@@WIN32_TRUE@@WITH_DIRECTSHOW_TRUE@am__append_22 = -DCOBJMACROS @HAVE_VIDEO_TRUE@@WIN32_TRUE@@WITH_DIRECTSHOW_TRUE@am__append_23 = -loleaut32 -lole32 @HAVE_VIDEO_FALSE@am__append_24 = video/null.c @HAVE_LIBV4L_TRUE@am__append_25 = $(V4L2_LIBS) @HAVE_JPEG_TRUE@am__append_26 = jpeg.c @HAVE_X_TRUE@am__append_27 = processor/x.c \ @HAVE_X_TRUE@ window/x.h window/x.c window/ximage.c @HAVE_X_TRUE@am__append_28 = $(X_CFLAGS) @HAVE_X_TRUE@am__append_29 = $(X_LIBS) @HAVE_X_TRUE@am__append_30 = $(X_PRE_LIBS) -lX11 $(X_EXTRA_LIBS) @HAVE_XV_TRUE@@HAVE_X_TRUE@am__append_31 = window/xv.c @HAVE_XV_TRUE@@HAVE_X_TRUE@am__append_32 = $(XV_LIBS) @HAVE_X_FALSE@@WIN32_TRUE@am__append_33 = window/win.h window/win.c \ @HAVE_X_FALSE@@WIN32_TRUE@ window/dib.c # window/vfw.c -lvfw32 @HAVE_X_FALSE@@WIN32_TRUE@am__append_34 = -lgdi32 -lwinmm @HAVE_X_FALSE@@WIN32_FALSE@am__append_35 = processor/null.c window/null.c @HAVE_DBUS_TRUE@am__append_36 = $(DBUS_LIBS) subdir = zbar ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = @HAVE_LIBV4L_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) @HAVE_X_TRUE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) \ @HAVE_X_TRUE@ $(am__DEPENDENCIES_1) @HAVE_XV_TRUE@@HAVE_X_TRUE@am__DEPENDENCIES_4 = $(am__DEPENDENCIES_1) libzbar_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__append_14) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \ $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_1) am__libzbar_la_SOURCES_DIST = debug.h config.c error.h error.c \ symbol.h symbol.c image.h image.c convert.c processor.c \ processor.h processor/lock.c refcnt.h refcnt.c timer.h mutex.h \ event.h thread.h window.h window.c video.h video.c \ img_scanner.h img_scanner.c scanner.c decoder.h decoder.c \ misc.h misc.c decoder/ean.h decoder/ean.c decoder/databar.h \ decoder/databar.c decoder/code128.h decoder/code128.c \ decoder/code93.h decoder/code93.c decoder/code39.h \ decoder/code39.c decoder/codabar.h decoder/codabar.c \ decoder/i25.h decoder/i25.c decoder/pdf417.h decoder/pdf417.c \ decoder/pdf417_hash.h qrcode.h decoder/qr_finder.h \ decoder/qr_finder.c qrcode/qrdec.h qrcode/qrdec.c \ qrcode/qrdectxt.c qrcode/rs.h qrcode/rs.c qrcode/isaac.h \ qrcode/isaac.c qrcode/bch15_5.h qrcode/bch15_5.c \ qrcode/binarize.h qrcode/binarize.c qrcode/util.h \ qrcode/util.c sqcode.h sqcode.c decoder/sq_finder.h \ decoder/sq_finder.c processor/win.c libzbar.rc \ processor/posix.h processor/posix.c video/v4l.c video/v4l2.c \ video/v4l1.c video/vfw.c video/dshow.c video/null.c jpeg.c \ processor/x.c window/x.h window/x.c window/ximage.c \ window/xv.c window/win.h window/win.c window/dib.c \ processor/null.c window/null.c am__dirstamp = $(am__leading_dot)dirstamp @ENABLE_EAN_TRUE@am__objects_1 = decoder/libzbar_la-ean.lo @ENABLE_DATABAR_TRUE@am__objects_2 = decoder/libzbar_la-databar.lo @ENABLE_CODE128_TRUE@am__objects_3 = decoder/libzbar_la-code128.lo @ENABLE_CODE93_TRUE@am__objects_4 = decoder/libzbar_la-code93.lo @ENABLE_CODE39_TRUE@am__objects_5 = decoder/libzbar_la-code39.lo @ENABLE_CODABAR_TRUE@am__objects_6 = decoder/libzbar_la-codabar.lo @ENABLE_I25_TRUE@am__objects_7 = decoder/libzbar_la-i25.lo @ENABLE_PDF417_TRUE@am__objects_8 = decoder/libzbar_la-pdf417.lo @ENABLE_QRCODE_TRUE@am__objects_9 = decoder/libzbar_la-qr_finder.lo \ @ENABLE_QRCODE_TRUE@ qrcode/libzbar_la-qrdec.lo \ @ENABLE_QRCODE_TRUE@ qrcode/libzbar_la-qrdectxt.lo \ @ENABLE_QRCODE_TRUE@ qrcode/libzbar_la-rs.lo \ @ENABLE_QRCODE_TRUE@ qrcode/libzbar_la-isaac.lo \ @ENABLE_QRCODE_TRUE@ qrcode/libzbar_la-bch15_5.lo \ @ENABLE_QRCODE_TRUE@ qrcode/libzbar_la-binarize.lo \ @ENABLE_QRCODE_TRUE@ qrcode/libzbar_la-util.lo @ENABLE_SQCODE_TRUE@am__objects_10 = libzbar_la-sqcode.lo \ @ENABLE_SQCODE_TRUE@ decoder/libzbar_la-sq_finder.lo @WIN32_TRUE@am__objects_11 = processor/libzbar_la-win.lo @WIN32_FALSE@am__objects_12 = processor/libzbar_la-posix.lo @HAVE_V4L2_TRUE@am__objects_13 = video/libzbar_la-v4l.lo \ @HAVE_V4L2_TRUE@ video/libzbar_la-v4l2.lo @HAVE_V4L1_TRUE@@HAVE_V4L2_FALSE@am__objects_14 = \ @HAVE_V4L1_TRUE@@HAVE_V4L2_FALSE@ video/libzbar_la-v4l.lo @HAVE_V4L1_TRUE@am__objects_15 = video/libzbar_la-v4l1.lo @HAVE_VIDEO_TRUE@@WIN32_TRUE@@WITH_DIRECTSHOW_FALSE@am__objects_16 = video/libzbar_la-vfw.lo @HAVE_VIDEO_TRUE@@WIN32_TRUE@@WITH_DIRECTSHOW_TRUE@am__objects_17 = video/libzbar_la-dshow.lo @HAVE_VIDEO_FALSE@am__objects_18 = video/libzbar_la-null.lo @HAVE_JPEG_TRUE@am__objects_19 = libzbar_la-jpeg.lo @HAVE_X_TRUE@am__objects_20 = processor/libzbar_la-x.lo \ @HAVE_X_TRUE@ window/libzbar_la-x.lo \ @HAVE_X_TRUE@ window/libzbar_la-ximage.lo @HAVE_XV_TRUE@@HAVE_X_TRUE@am__objects_21 = window/libzbar_la-xv.lo @HAVE_X_FALSE@@WIN32_TRUE@am__objects_22 = window/libzbar_la-win.lo \ @HAVE_X_FALSE@@WIN32_TRUE@ window/libzbar_la-dib.lo @HAVE_X_FALSE@@WIN32_FALSE@am__objects_23 = \ @HAVE_X_FALSE@@WIN32_FALSE@ processor/libzbar_la-null.lo \ @HAVE_X_FALSE@@WIN32_FALSE@ window/libzbar_la-null.lo am_libzbar_la_OBJECTS = libzbar_la-config.lo libzbar_la-error.lo \ libzbar_la-symbol.lo libzbar_la-image.lo libzbar_la-convert.lo \ libzbar_la-processor.lo processor/libzbar_la-lock.lo \ libzbar_la-refcnt.lo libzbar_la-window.lo libzbar_la-video.lo \ libzbar_la-img_scanner.lo libzbar_la-scanner.lo \ libzbar_la-decoder.lo libzbar_la-misc.lo $(am__objects_1) \ $(am__objects_2) $(am__objects_3) $(am__objects_4) \ $(am__objects_5) $(am__objects_6) $(am__objects_7) \ $(am__objects_8) $(am__objects_9) $(am__objects_10) \ $(am__objects_11) $(am__objects_12) $(am__objects_13) \ $(am__objects_14) $(am__objects_15) $(am__objects_16) \ $(am__objects_17) $(am__objects_18) $(am__objects_19) \ $(am__objects_20) $(am__objects_21) $(am__objects_22) \ $(am__objects_23) libzbar_la_OBJECTS = $(am_libzbar_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libzbar_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libzbar_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libzbar_la-config.Plo \ ./$(DEPDIR)/libzbar_la-convert.Plo \ ./$(DEPDIR)/libzbar_la-decoder.Plo \ ./$(DEPDIR)/libzbar_la-error.Plo \ ./$(DEPDIR)/libzbar_la-image.Plo \ ./$(DEPDIR)/libzbar_la-img_scanner.Plo \ ./$(DEPDIR)/libzbar_la-jpeg.Plo \ ./$(DEPDIR)/libzbar_la-misc.Plo \ ./$(DEPDIR)/libzbar_la-processor.Plo \ ./$(DEPDIR)/libzbar_la-refcnt.Plo \ ./$(DEPDIR)/libzbar_la-scanner.Plo \ ./$(DEPDIR)/libzbar_la-sqcode.Plo \ ./$(DEPDIR)/libzbar_la-svg.Plo \ ./$(DEPDIR)/libzbar_la-symbol.Plo \ ./$(DEPDIR)/libzbar_la-video.Plo \ ./$(DEPDIR)/libzbar_la-window.Plo \ decoder/$(DEPDIR)/libzbar_la-codabar.Plo \ decoder/$(DEPDIR)/libzbar_la-code128.Plo \ decoder/$(DEPDIR)/libzbar_la-code39.Plo \ decoder/$(DEPDIR)/libzbar_la-code93.Plo \ decoder/$(DEPDIR)/libzbar_la-databar.Plo \ decoder/$(DEPDIR)/libzbar_la-ean.Plo \ decoder/$(DEPDIR)/libzbar_la-i25.Plo \ decoder/$(DEPDIR)/libzbar_la-pdf417.Plo \ decoder/$(DEPDIR)/libzbar_la-qr_finder.Plo \ decoder/$(DEPDIR)/libzbar_la-sq_finder.Plo \ processor/$(DEPDIR)/libzbar_la-lock.Plo \ processor/$(DEPDIR)/libzbar_la-null.Plo \ processor/$(DEPDIR)/libzbar_la-posix.Plo \ processor/$(DEPDIR)/libzbar_la-win.Plo \ processor/$(DEPDIR)/libzbar_la-x.Plo \ qrcode/$(DEPDIR)/libzbar_la-bch15_5.Plo \ qrcode/$(DEPDIR)/libzbar_la-binarize.Plo \ qrcode/$(DEPDIR)/libzbar_la-isaac.Plo \ qrcode/$(DEPDIR)/libzbar_la-qrdec.Plo \ qrcode/$(DEPDIR)/libzbar_la-qrdectxt.Plo \ qrcode/$(DEPDIR)/libzbar_la-rs.Plo \ qrcode/$(DEPDIR)/libzbar_la-util.Plo \ video/$(DEPDIR)/libzbar_la-dshow.Plo \ video/$(DEPDIR)/libzbar_la-null.Plo \ video/$(DEPDIR)/libzbar_la-v4l.Plo \ video/$(DEPDIR)/libzbar_la-v4l1.Plo \ video/$(DEPDIR)/libzbar_la-v4l2.Plo \ video/$(DEPDIR)/libzbar_la-vfw.Plo \ window/$(DEPDIR)/libzbar_la-dib.Plo \ window/$(DEPDIR)/libzbar_la-null.Plo \ window/$(DEPDIR)/libzbar_la-win.Plo \ window/$(DEPDIR)/libzbar_la-x.Plo \ window/$(DEPDIR)/libzbar_la-ximage.Plo \ window/$(DEPDIR)/libzbar_la-xv.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libzbar_la_SOURCES) $(EXTRA_libzbar_la_SOURCES) DIST_SOURCES = $(am__libzbar_la_SOURCES_DIST) \ $(EXTRA_libzbar_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CFLAGS = @AM_CFLAGS@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLASSPATH = @CLASSPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_CONFDIR = @DBUS_CONFDIR@ DBUS_LIBS = @DBUS_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_CODABAR = @ENABLE_CODABAR@ ENABLE_CODE128 = @ENABLE_CODE128@ ENABLE_CODE39 = @ENABLE_CODE39@ ENABLE_CODE93 = @ENABLE_CODE93@ ENABLE_DATABAR = @ENABLE_DATABAR@ ENABLE_EAN = @ENABLE_EAN@ ENABLE_I25 = @ENABLE_I25@ ENABLE_PDF417 = @ENABLE_PDF417@ ENABLE_QRCODE = @ENABLE_QRCODE@ ENABLE_SQCODE = @ENABLE_SQCODE@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GM_CFLAGS = @GM_CFLAGS@ GM_LIBS = @GM_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTK_VERSION_MAJOR = @GTK_VERSION_MAJOR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JAR = @JAR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CFLAGS = @JAVA_CFLAGS@ JAVA_HOME = @JAVA_HOME@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBQT_EXTRA_LDFLAGS = @LIBQT_EXTRA_LDFLAGS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MOC = @MOC@ NM = @NM@ NMEDIT = @NMEDIT@ NPAPI_CFLAGS = @NPAPI_CFLAGS@ NPAPI_LIBS = @NPAPI_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYGTK_CFLAGS = @PYGTK_CFLAGS@ PYGTK_CODEGEN = @PYGTK_CODEGEN@ PYGTK_DEFS = @PYGTK_DEFS@ PYGTK_H2DEF = @PYGTK_H2DEF@ PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ QT_CFLAGS = @QT_CFLAGS@ QT_LIBS = @QT_LIBS@ RANLIB = @RANLIB@ RC = @RC@ RELDATE = @RELDATE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ V4L2_CFLAGS = @V4L2_CFLAGS@ V4L2_LIBS = @V4L2_LIBS@ VERSION = @VERSION@ XMKMF = @XMKMF@ XMLTO = @XMLTO@ XMLTOFLAGS = @XMLTOFLAGS@ XSHM_LIBS = @XSHM_LIBS@ XV_LIBS = @XV_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZGTK_LIB_VERSION = @ZGTK_LIB_VERSION@ ZQT_LIB_VERSION = @ZQT_LIB_VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ lib_LTLIBRARIES = libzbar.la libzbar_la_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_12) $(am__append_22) \ $(am__append_28) libzbar_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION) \ -export-symbols-regex "^(zbar|_zbar.*_error)_.*" $(AM_LDFLAGS) \ $(am__append_13) $(am__append_29) $(am__append_36) \ $(AM_LDFLAGS) libzbar_la_LIBADD = $(LTLIBICONV) $(am__append_14) $(am__append_20) \ $(am__append_23) $(am__append_25) $(am__append_30) \ $(am__append_32) $(am__append_34) $(AM_LIBADD) libzbar_la_SOURCES = debug.h config.c error.h error.c symbol.h \ symbol.c image.h image.c convert.c processor.c processor.h \ processor/lock.c refcnt.h refcnt.c timer.h mutex.h event.h \ thread.h window.h window.c video.h video.c img_scanner.h \ img_scanner.c scanner.c decoder.h decoder.c misc.h misc.c \ $(am__append_1) $(am__append_2) $(am__append_3) \ $(am__append_4) $(am__append_5) $(am__append_6) \ $(am__append_7) $(am__append_8) $(am__append_9) \ $(am__append_10) $(am__append_11) $(am__append_15) \ $(am__append_16) $(am__append_17) $(am__append_18) \ $(am__append_19) $(am__append_21) $(am__append_24) \ $(am__append_26) $(am__append_27) $(am__append_31) \ $(am__append_33) $(am__append_35) EXTRA_libzbar_la_SOURCES = svg.h svg.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign zbar/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign zbar/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } processor/$(am__dirstamp): @$(MKDIR_P) processor @: > processor/$(am__dirstamp) processor/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) processor/$(DEPDIR) @: > processor/$(DEPDIR)/$(am__dirstamp) processor/libzbar_la-lock.lo: processor/$(am__dirstamp) \ processor/$(DEPDIR)/$(am__dirstamp) decoder/$(am__dirstamp): @$(MKDIR_P) decoder @: > decoder/$(am__dirstamp) decoder/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) decoder/$(DEPDIR) @: > decoder/$(DEPDIR)/$(am__dirstamp) decoder/libzbar_la-ean.lo: decoder/$(am__dirstamp) \ decoder/$(DEPDIR)/$(am__dirstamp) decoder/libzbar_la-databar.lo: decoder/$(am__dirstamp) \ decoder/$(DEPDIR)/$(am__dirstamp) decoder/libzbar_la-code128.lo: decoder/$(am__dirstamp) \ decoder/$(DEPDIR)/$(am__dirstamp) decoder/libzbar_la-code93.lo: decoder/$(am__dirstamp) \ decoder/$(DEPDIR)/$(am__dirstamp) decoder/libzbar_la-code39.lo: decoder/$(am__dirstamp) \ decoder/$(DEPDIR)/$(am__dirstamp) decoder/libzbar_la-codabar.lo: decoder/$(am__dirstamp) \ decoder/$(DEPDIR)/$(am__dirstamp) decoder/libzbar_la-i25.lo: decoder/$(am__dirstamp) \ decoder/$(DEPDIR)/$(am__dirstamp) decoder/libzbar_la-pdf417.lo: decoder/$(am__dirstamp) \ decoder/$(DEPDIR)/$(am__dirstamp) decoder/libzbar_la-qr_finder.lo: decoder/$(am__dirstamp) \ decoder/$(DEPDIR)/$(am__dirstamp) qrcode/$(am__dirstamp): @$(MKDIR_P) qrcode @: > qrcode/$(am__dirstamp) qrcode/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qrcode/$(DEPDIR) @: > qrcode/$(DEPDIR)/$(am__dirstamp) qrcode/libzbar_la-qrdec.lo: qrcode/$(am__dirstamp) \ qrcode/$(DEPDIR)/$(am__dirstamp) qrcode/libzbar_la-qrdectxt.lo: qrcode/$(am__dirstamp) \ qrcode/$(DEPDIR)/$(am__dirstamp) qrcode/libzbar_la-rs.lo: qrcode/$(am__dirstamp) \ qrcode/$(DEPDIR)/$(am__dirstamp) qrcode/libzbar_la-isaac.lo: qrcode/$(am__dirstamp) \ qrcode/$(DEPDIR)/$(am__dirstamp) qrcode/libzbar_la-bch15_5.lo: qrcode/$(am__dirstamp) \ qrcode/$(DEPDIR)/$(am__dirstamp) qrcode/libzbar_la-binarize.lo: qrcode/$(am__dirstamp) \ qrcode/$(DEPDIR)/$(am__dirstamp) qrcode/libzbar_la-util.lo: qrcode/$(am__dirstamp) \ qrcode/$(DEPDIR)/$(am__dirstamp) decoder/libzbar_la-sq_finder.lo: decoder/$(am__dirstamp) \ decoder/$(DEPDIR)/$(am__dirstamp) processor/libzbar_la-win.lo: processor/$(am__dirstamp) \ processor/$(DEPDIR)/$(am__dirstamp) processor/libzbar_la-posix.lo: processor/$(am__dirstamp) \ processor/$(DEPDIR)/$(am__dirstamp) video/$(am__dirstamp): @$(MKDIR_P) video @: > video/$(am__dirstamp) video/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) video/$(DEPDIR) @: > video/$(DEPDIR)/$(am__dirstamp) video/libzbar_la-v4l.lo: video/$(am__dirstamp) \ video/$(DEPDIR)/$(am__dirstamp) video/libzbar_la-v4l2.lo: video/$(am__dirstamp) \ video/$(DEPDIR)/$(am__dirstamp) video/libzbar_la-v4l1.lo: video/$(am__dirstamp) \ video/$(DEPDIR)/$(am__dirstamp) video/libzbar_la-vfw.lo: video/$(am__dirstamp) \ video/$(DEPDIR)/$(am__dirstamp) video/libzbar_la-dshow.lo: video/$(am__dirstamp) \ video/$(DEPDIR)/$(am__dirstamp) video/libzbar_la-null.lo: video/$(am__dirstamp) \ video/$(DEPDIR)/$(am__dirstamp) processor/libzbar_la-x.lo: processor/$(am__dirstamp) \ processor/$(DEPDIR)/$(am__dirstamp) window/$(am__dirstamp): @$(MKDIR_P) window @: > window/$(am__dirstamp) window/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) window/$(DEPDIR) @: > window/$(DEPDIR)/$(am__dirstamp) window/libzbar_la-x.lo: window/$(am__dirstamp) \ window/$(DEPDIR)/$(am__dirstamp) window/libzbar_la-ximage.lo: window/$(am__dirstamp) \ window/$(DEPDIR)/$(am__dirstamp) window/libzbar_la-xv.lo: window/$(am__dirstamp) \ window/$(DEPDIR)/$(am__dirstamp) window/libzbar_la-win.lo: window/$(am__dirstamp) \ window/$(DEPDIR)/$(am__dirstamp) window/libzbar_la-dib.lo: window/$(am__dirstamp) \ window/$(DEPDIR)/$(am__dirstamp) processor/libzbar_la-null.lo: processor/$(am__dirstamp) \ processor/$(DEPDIR)/$(am__dirstamp) window/libzbar_la-null.lo: window/$(am__dirstamp) \ window/$(DEPDIR)/$(am__dirstamp) libzbar.la: $(libzbar_la_OBJECTS) $(libzbar_la_DEPENDENCIES) $(EXTRA_libzbar_la_DEPENDENCIES) $(AM_V_CCLD)$(libzbar_la_LINK) -rpath $(libdir) $(libzbar_la_OBJECTS) $(libzbar_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f decoder/*.$(OBJEXT) -rm -f decoder/*.lo -rm -f processor/*.$(OBJEXT) -rm -f processor/*.lo -rm -f qrcode/*.$(OBJEXT) -rm -f qrcode/*.lo -rm -f video/*.$(OBJEXT) -rm -f video/*.lo -rm -f window/*.$(OBJEXT) -rm -f window/*.lo distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzbar_la-config.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzbar_la-convert.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzbar_la-decoder.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzbar_la-error.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzbar_la-image.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzbar_la-img_scanner.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzbar_la-jpeg.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzbar_la-misc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzbar_la-processor.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzbar_la-refcnt.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzbar_la-scanner.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzbar_la-sqcode.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzbar_la-svg.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzbar_la-symbol.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzbar_la-video.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzbar_la-window.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@decoder/$(DEPDIR)/libzbar_la-codabar.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@decoder/$(DEPDIR)/libzbar_la-code128.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@decoder/$(DEPDIR)/libzbar_la-code39.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@decoder/$(DEPDIR)/libzbar_la-code93.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@decoder/$(DEPDIR)/libzbar_la-databar.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@decoder/$(DEPDIR)/libzbar_la-ean.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@decoder/$(DEPDIR)/libzbar_la-i25.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@decoder/$(DEPDIR)/libzbar_la-pdf417.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@decoder/$(DEPDIR)/libzbar_la-qr_finder.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@decoder/$(DEPDIR)/libzbar_la-sq_finder.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@processor/$(DEPDIR)/libzbar_la-lock.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@processor/$(DEPDIR)/libzbar_la-null.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@processor/$(DEPDIR)/libzbar_la-posix.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@processor/$(DEPDIR)/libzbar_la-win.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@processor/$(DEPDIR)/libzbar_la-x.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@qrcode/$(DEPDIR)/libzbar_la-bch15_5.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@qrcode/$(DEPDIR)/libzbar_la-binarize.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@qrcode/$(DEPDIR)/libzbar_la-isaac.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@qrcode/$(DEPDIR)/libzbar_la-qrdec.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@qrcode/$(DEPDIR)/libzbar_la-qrdectxt.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@qrcode/$(DEPDIR)/libzbar_la-rs.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@qrcode/$(DEPDIR)/libzbar_la-util.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@video/$(DEPDIR)/libzbar_la-dshow.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@video/$(DEPDIR)/libzbar_la-null.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@video/$(DEPDIR)/libzbar_la-v4l.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@video/$(DEPDIR)/libzbar_la-v4l1.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@video/$(DEPDIR)/libzbar_la-v4l2.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@video/$(DEPDIR)/libzbar_la-vfw.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@window/$(DEPDIR)/libzbar_la-dib.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@window/$(DEPDIR)/libzbar_la-null.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@window/$(DEPDIR)/libzbar_la-win.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@window/$(DEPDIR)/libzbar_la-x.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@window/$(DEPDIR)/libzbar_la-ximage.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@window/$(DEPDIR)/libzbar_la-xv.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libzbar_la-config.lo: config.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libzbar_la-config.lo -MD -MP -MF $(DEPDIR)/libzbar_la-config.Tpo -c -o libzbar_la-config.lo `test -f 'config.c' || echo '$(srcdir)/'`config.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzbar_la-config.Tpo $(DEPDIR)/libzbar_la-config.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='config.c' object='libzbar_la-config.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libzbar_la-config.lo `test -f 'config.c' || echo '$(srcdir)/'`config.c libzbar_la-error.lo: error.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libzbar_la-error.lo -MD -MP -MF $(DEPDIR)/libzbar_la-error.Tpo -c -o libzbar_la-error.lo `test -f 'error.c' || echo '$(srcdir)/'`error.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzbar_la-error.Tpo $(DEPDIR)/libzbar_la-error.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='error.c' object='libzbar_la-error.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libzbar_la-error.lo `test -f 'error.c' || echo '$(srcdir)/'`error.c libzbar_la-symbol.lo: symbol.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libzbar_la-symbol.lo -MD -MP -MF $(DEPDIR)/libzbar_la-symbol.Tpo -c -o libzbar_la-symbol.lo `test -f 'symbol.c' || echo '$(srcdir)/'`symbol.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzbar_la-symbol.Tpo $(DEPDIR)/libzbar_la-symbol.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='symbol.c' object='libzbar_la-symbol.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libzbar_la-symbol.lo `test -f 'symbol.c' || echo '$(srcdir)/'`symbol.c libzbar_la-image.lo: image.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libzbar_la-image.lo -MD -MP -MF $(DEPDIR)/libzbar_la-image.Tpo -c -o libzbar_la-image.lo `test -f 'image.c' || echo '$(srcdir)/'`image.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzbar_la-image.Tpo $(DEPDIR)/libzbar_la-image.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='image.c' object='libzbar_la-image.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libzbar_la-image.lo `test -f 'image.c' || echo '$(srcdir)/'`image.c libzbar_la-convert.lo: convert.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libzbar_la-convert.lo -MD -MP -MF $(DEPDIR)/libzbar_la-convert.Tpo -c -o libzbar_la-convert.lo `test -f 'convert.c' || echo '$(srcdir)/'`convert.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzbar_la-convert.Tpo $(DEPDIR)/libzbar_la-convert.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='convert.c' object='libzbar_la-convert.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libzbar_la-convert.lo `test -f 'convert.c' || echo '$(srcdir)/'`convert.c libzbar_la-processor.lo: processor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libzbar_la-processor.lo -MD -MP -MF $(DEPDIR)/libzbar_la-processor.Tpo -c -o libzbar_la-processor.lo `test -f 'processor.c' || echo '$(srcdir)/'`processor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzbar_la-processor.Tpo $(DEPDIR)/libzbar_la-processor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='processor.c' object='libzbar_la-processor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libzbar_la-processor.lo `test -f 'processor.c' || echo '$(srcdir)/'`processor.c processor/libzbar_la-lock.lo: processor/lock.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT processor/libzbar_la-lock.lo -MD -MP -MF processor/$(DEPDIR)/libzbar_la-lock.Tpo -c -o processor/libzbar_la-lock.lo `test -f 'processor/lock.c' || echo '$(srcdir)/'`processor/lock.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) processor/$(DEPDIR)/libzbar_la-lock.Tpo processor/$(DEPDIR)/libzbar_la-lock.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='processor/lock.c' object='processor/libzbar_la-lock.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o processor/libzbar_la-lock.lo `test -f 'processor/lock.c' || echo '$(srcdir)/'`processor/lock.c libzbar_la-refcnt.lo: refcnt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libzbar_la-refcnt.lo -MD -MP -MF $(DEPDIR)/libzbar_la-refcnt.Tpo -c -o libzbar_la-refcnt.lo `test -f 'refcnt.c' || echo '$(srcdir)/'`refcnt.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzbar_la-refcnt.Tpo $(DEPDIR)/libzbar_la-refcnt.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='refcnt.c' object='libzbar_la-refcnt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libzbar_la-refcnt.lo `test -f 'refcnt.c' || echo '$(srcdir)/'`refcnt.c libzbar_la-window.lo: window.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libzbar_la-window.lo -MD -MP -MF $(DEPDIR)/libzbar_la-window.Tpo -c -o libzbar_la-window.lo `test -f 'window.c' || echo '$(srcdir)/'`window.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzbar_la-window.Tpo $(DEPDIR)/libzbar_la-window.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='window.c' object='libzbar_la-window.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libzbar_la-window.lo `test -f 'window.c' || echo '$(srcdir)/'`window.c libzbar_la-video.lo: video.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libzbar_la-video.lo -MD -MP -MF $(DEPDIR)/libzbar_la-video.Tpo -c -o libzbar_la-video.lo `test -f 'video.c' || echo '$(srcdir)/'`video.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzbar_la-video.Tpo $(DEPDIR)/libzbar_la-video.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='video.c' object='libzbar_la-video.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libzbar_la-video.lo `test -f 'video.c' || echo '$(srcdir)/'`video.c libzbar_la-img_scanner.lo: img_scanner.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libzbar_la-img_scanner.lo -MD -MP -MF $(DEPDIR)/libzbar_la-img_scanner.Tpo -c -o libzbar_la-img_scanner.lo `test -f 'img_scanner.c' || echo '$(srcdir)/'`img_scanner.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzbar_la-img_scanner.Tpo $(DEPDIR)/libzbar_la-img_scanner.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='img_scanner.c' object='libzbar_la-img_scanner.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libzbar_la-img_scanner.lo `test -f 'img_scanner.c' || echo '$(srcdir)/'`img_scanner.c libzbar_la-scanner.lo: scanner.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libzbar_la-scanner.lo -MD -MP -MF $(DEPDIR)/libzbar_la-scanner.Tpo -c -o libzbar_la-scanner.lo `test -f 'scanner.c' || echo '$(srcdir)/'`scanner.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzbar_la-scanner.Tpo $(DEPDIR)/libzbar_la-scanner.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scanner.c' object='libzbar_la-scanner.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libzbar_la-scanner.lo `test -f 'scanner.c' || echo '$(srcdir)/'`scanner.c libzbar_la-decoder.lo: decoder.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libzbar_la-decoder.lo -MD -MP -MF $(DEPDIR)/libzbar_la-decoder.Tpo -c -o libzbar_la-decoder.lo `test -f 'decoder.c' || echo '$(srcdir)/'`decoder.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzbar_la-decoder.Tpo $(DEPDIR)/libzbar_la-decoder.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='decoder.c' object='libzbar_la-decoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libzbar_la-decoder.lo `test -f 'decoder.c' || echo '$(srcdir)/'`decoder.c libzbar_la-misc.lo: misc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libzbar_la-misc.lo -MD -MP -MF $(DEPDIR)/libzbar_la-misc.Tpo -c -o libzbar_la-misc.lo `test -f 'misc.c' || echo '$(srcdir)/'`misc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzbar_la-misc.Tpo $(DEPDIR)/libzbar_la-misc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='misc.c' object='libzbar_la-misc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libzbar_la-misc.lo `test -f 'misc.c' || echo '$(srcdir)/'`misc.c decoder/libzbar_la-ean.lo: decoder/ean.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT decoder/libzbar_la-ean.lo -MD -MP -MF decoder/$(DEPDIR)/libzbar_la-ean.Tpo -c -o decoder/libzbar_la-ean.lo `test -f 'decoder/ean.c' || echo '$(srcdir)/'`decoder/ean.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) decoder/$(DEPDIR)/libzbar_la-ean.Tpo decoder/$(DEPDIR)/libzbar_la-ean.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='decoder/ean.c' object='decoder/libzbar_la-ean.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o decoder/libzbar_la-ean.lo `test -f 'decoder/ean.c' || echo '$(srcdir)/'`decoder/ean.c decoder/libzbar_la-databar.lo: decoder/databar.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT decoder/libzbar_la-databar.lo -MD -MP -MF decoder/$(DEPDIR)/libzbar_la-databar.Tpo -c -o decoder/libzbar_la-databar.lo `test -f 'decoder/databar.c' || echo '$(srcdir)/'`decoder/databar.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) decoder/$(DEPDIR)/libzbar_la-databar.Tpo decoder/$(DEPDIR)/libzbar_la-databar.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='decoder/databar.c' object='decoder/libzbar_la-databar.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o decoder/libzbar_la-databar.lo `test -f 'decoder/databar.c' || echo '$(srcdir)/'`decoder/databar.c decoder/libzbar_la-code128.lo: decoder/code128.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT decoder/libzbar_la-code128.lo -MD -MP -MF decoder/$(DEPDIR)/libzbar_la-code128.Tpo -c -o decoder/libzbar_la-code128.lo `test -f 'decoder/code128.c' || echo '$(srcdir)/'`decoder/code128.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) decoder/$(DEPDIR)/libzbar_la-code128.Tpo decoder/$(DEPDIR)/libzbar_la-code128.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='decoder/code128.c' object='decoder/libzbar_la-code128.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o decoder/libzbar_la-code128.lo `test -f 'decoder/code128.c' || echo '$(srcdir)/'`decoder/code128.c decoder/libzbar_la-code93.lo: decoder/code93.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT decoder/libzbar_la-code93.lo -MD -MP -MF decoder/$(DEPDIR)/libzbar_la-code93.Tpo -c -o decoder/libzbar_la-code93.lo `test -f 'decoder/code93.c' || echo '$(srcdir)/'`decoder/code93.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) decoder/$(DEPDIR)/libzbar_la-code93.Tpo decoder/$(DEPDIR)/libzbar_la-code93.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='decoder/code93.c' object='decoder/libzbar_la-code93.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o decoder/libzbar_la-code93.lo `test -f 'decoder/code93.c' || echo '$(srcdir)/'`decoder/code93.c decoder/libzbar_la-code39.lo: decoder/code39.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT decoder/libzbar_la-code39.lo -MD -MP -MF decoder/$(DEPDIR)/libzbar_la-code39.Tpo -c -o decoder/libzbar_la-code39.lo `test -f 'decoder/code39.c' || echo '$(srcdir)/'`decoder/code39.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) decoder/$(DEPDIR)/libzbar_la-code39.Tpo decoder/$(DEPDIR)/libzbar_la-code39.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='decoder/code39.c' object='decoder/libzbar_la-code39.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o decoder/libzbar_la-code39.lo `test -f 'decoder/code39.c' || echo '$(srcdir)/'`decoder/code39.c decoder/libzbar_la-codabar.lo: decoder/codabar.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT decoder/libzbar_la-codabar.lo -MD -MP -MF decoder/$(DEPDIR)/libzbar_la-codabar.Tpo -c -o decoder/libzbar_la-codabar.lo `test -f 'decoder/codabar.c' || echo '$(srcdir)/'`decoder/codabar.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) decoder/$(DEPDIR)/libzbar_la-codabar.Tpo decoder/$(DEPDIR)/libzbar_la-codabar.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='decoder/codabar.c' object='decoder/libzbar_la-codabar.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o decoder/libzbar_la-codabar.lo `test -f 'decoder/codabar.c' || echo '$(srcdir)/'`decoder/codabar.c decoder/libzbar_la-i25.lo: decoder/i25.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT decoder/libzbar_la-i25.lo -MD -MP -MF decoder/$(DEPDIR)/libzbar_la-i25.Tpo -c -o decoder/libzbar_la-i25.lo `test -f 'decoder/i25.c' || echo '$(srcdir)/'`decoder/i25.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) decoder/$(DEPDIR)/libzbar_la-i25.Tpo decoder/$(DEPDIR)/libzbar_la-i25.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='decoder/i25.c' object='decoder/libzbar_la-i25.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o decoder/libzbar_la-i25.lo `test -f 'decoder/i25.c' || echo '$(srcdir)/'`decoder/i25.c decoder/libzbar_la-pdf417.lo: decoder/pdf417.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT decoder/libzbar_la-pdf417.lo -MD -MP -MF decoder/$(DEPDIR)/libzbar_la-pdf417.Tpo -c -o decoder/libzbar_la-pdf417.lo `test -f 'decoder/pdf417.c' || echo '$(srcdir)/'`decoder/pdf417.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) decoder/$(DEPDIR)/libzbar_la-pdf417.Tpo decoder/$(DEPDIR)/libzbar_la-pdf417.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='decoder/pdf417.c' object='decoder/libzbar_la-pdf417.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o decoder/libzbar_la-pdf417.lo `test -f 'decoder/pdf417.c' || echo '$(srcdir)/'`decoder/pdf417.c decoder/libzbar_la-qr_finder.lo: decoder/qr_finder.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT decoder/libzbar_la-qr_finder.lo -MD -MP -MF decoder/$(DEPDIR)/libzbar_la-qr_finder.Tpo -c -o decoder/libzbar_la-qr_finder.lo `test -f 'decoder/qr_finder.c' || echo '$(srcdir)/'`decoder/qr_finder.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) decoder/$(DEPDIR)/libzbar_la-qr_finder.Tpo decoder/$(DEPDIR)/libzbar_la-qr_finder.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='decoder/qr_finder.c' object='decoder/libzbar_la-qr_finder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o decoder/libzbar_la-qr_finder.lo `test -f 'decoder/qr_finder.c' || echo '$(srcdir)/'`decoder/qr_finder.c qrcode/libzbar_la-qrdec.lo: qrcode/qrdec.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT qrcode/libzbar_la-qrdec.lo -MD -MP -MF qrcode/$(DEPDIR)/libzbar_la-qrdec.Tpo -c -o qrcode/libzbar_la-qrdec.lo `test -f 'qrcode/qrdec.c' || echo '$(srcdir)/'`qrcode/qrdec.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) qrcode/$(DEPDIR)/libzbar_la-qrdec.Tpo qrcode/$(DEPDIR)/libzbar_la-qrdec.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='qrcode/qrdec.c' object='qrcode/libzbar_la-qrdec.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o qrcode/libzbar_la-qrdec.lo `test -f 'qrcode/qrdec.c' || echo '$(srcdir)/'`qrcode/qrdec.c qrcode/libzbar_la-qrdectxt.lo: qrcode/qrdectxt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT qrcode/libzbar_la-qrdectxt.lo -MD -MP -MF qrcode/$(DEPDIR)/libzbar_la-qrdectxt.Tpo -c -o qrcode/libzbar_la-qrdectxt.lo `test -f 'qrcode/qrdectxt.c' || echo '$(srcdir)/'`qrcode/qrdectxt.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) qrcode/$(DEPDIR)/libzbar_la-qrdectxt.Tpo qrcode/$(DEPDIR)/libzbar_la-qrdectxt.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='qrcode/qrdectxt.c' object='qrcode/libzbar_la-qrdectxt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o qrcode/libzbar_la-qrdectxt.lo `test -f 'qrcode/qrdectxt.c' || echo '$(srcdir)/'`qrcode/qrdectxt.c qrcode/libzbar_la-rs.lo: qrcode/rs.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT qrcode/libzbar_la-rs.lo -MD -MP -MF qrcode/$(DEPDIR)/libzbar_la-rs.Tpo -c -o qrcode/libzbar_la-rs.lo `test -f 'qrcode/rs.c' || echo '$(srcdir)/'`qrcode/rs.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) qrcode/$(DEPDIR)/libzbar_la-rs.Tpo qrcode/$(DEPDIR)/libzbar_la-rs.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='qrcode/rs.c' object='qrcode/libzbar_la-rs.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o qrcode/libzbar_la-rs.lo `test -f 'qrcode/rs.c' || echo '$(srcdir)/'`qrcode/rs.c qrcode/libzbar_la-isaac.lo: qrcode/isaac.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT qrcode/libzbar_la-isaac.lo -MD -MP -MF qrcode/$(DEPDIR)/libzbar_la-isaac.Tpo -c -o qrcode/libzbar_la-isaac.lo `test -f 'qrcode/isaac.c' || echo '$(srcdir)/'`qrcode/isaac.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) qrcode/$(DEPDIR)/libzbar_la-isaac.Tpo qrcode/$(DEPDIR)/libzbar_la-isaac.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='qrcode/isaac.c' object='qrcode/libzbar_la-isaac.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o qrcode/libzbar_la-isaac.lo `test -f 'qrcode/isaac.c' || echo '$(srcdir)/'`qrcode/isaac.c qrcode/libzbar_la-bch15_5.lo: qrcode/bch15_5.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT qrcode/libzbar_la-bch15_5.lo -MD -MP -MF qrcode/$(DEPDIR)/libzbar_la-bch15_5.Tpo -c -o qrcode/libzbar_la-bch15_5.lo `test -f 'qrcode/bch15_5.c' || echo '$(srcdir)/'`qrcode/bch15_5.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) qrcode/$(DEPDIR)/libzbar_la-bch15_5.Tpo qrcode/$(DEPDIR)/libzbar_la-bch15_5.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='qrcode/bch15_5.c' object='qrcode/libzbar_la-bch15_5.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o qrcode/libzbar_la-bch15_5.lo `test -f 'qrcode/bch15_5.c' || echo '$(srcdir)/'`qrcode/bch15_5.c qrcode/libzbar_la-binarize.lo: qrcode/binarize.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT qrcode/libzbar_la-binarize.lo -MD -MP -MF qrcode/$(DEPDIR)/libzbar_la-binarize.Tpo -c -o qrcode/libzbar_la-binarize.lo `test -f 'qrcode/binarize.c' || echo '$(srcdir)/'`qrcode/binarize.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) qrcode/$(DEPDIR)/libzbar_la-binarize.Tpo qrcode/$(DEPDIR)/libzbar_la-binarize.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='qrcode/binarize.c' object='qrcode/libzbar_la-binarize.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o qrcode/libzbar_la-binarize.lo `test -f 'qrcode/binarize.c' || echo '$(srcdir)/'`qrcode/binarize.c qrcode/libzbar_la-util.lo: qrcode/util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT qrcode/libzbar_la-util.lo -MD -MP -MF qrcode/$(DEPDIR)/libzbar_la-util.Tpo -c -o qrcode/libzbar_la-util.lo `test -f 'qrcode/util.c' || echo '$(srcdir)/'`qrcode/util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) qrcode/$(DEPDIR)/libzbar_la-util.Tpo qrcode/$(DEPDIR)/libzbar_la-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='qrcode/util.c' object='qrcode/libzbar_la-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o qrcode/libzbar_la-util.lo `test -f 'qrcode/util.c' || echo '$(srcdir)/'`qrcode/util.c libzbar_la-sqcode.lo: sqcode.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libzbar_la-sqcode.lo -MD -MP -MF $(DEPDIR)/libzbar_la-sqcode.Tpo -c -o libzbar_la-sqcode.lo `test -f 'sqcode.c' || echo '$(srcdir)/'`sqcode.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzbar_la-sqcode.Tpo $(DEPDIR)/libzbar_la-sqcode.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sqcode.c' object='libzbar_la-sqcode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libzbar_la-sqcode.lo `test -f 'sqcode.c' || echo '$(srcdir)/'`sqcode.c decoder/libzbar_la-sq_finder.lo: decoder/sq_finder.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT decoder/libzbar_la-sq_finder.lo -MD -MP -MF decoder/$(DEPDIR)/libzbar_la-sq_finder.Tpo -c -o decoder/libzbar_la-sq_finder.lo `test -f 'decoder/sq_finder.c' || echo '$(srcdir)/'`decoder/sq_finder.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) decoder/$(DEPDIR)/libzbar_la-sq_finder.Tpo decoder/$(DEPDIR)/libzbar_la-sq_finder.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='decoder/sq_finder.c' object='decoder/libzbar_la-sq_finder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o decoder/libzbar_la-sq_finder.lo `test -f 'decoder/sq_finder.c' || echo '$(srcdir)/'`decoder/sq_finder.c processor/libzbar_la-win.lo: processor/win.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT processor/libzbar_la-win.lo -MD -MP -MF processor/$(DEPDIR)/libzbar_la-win.Tpo -c -o processor/libzbar_la-win.lo `test -f 'processor/win.c' || echo '$(srcdir)/'`processor/win.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) processor/$(DEPDIR)/libzbar_la-win.Tpo processor/$(DEPDIR)/libzbar_la-win.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='processor/win.c' object='processor/libzbar_la-win.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o processor/libzbar_la-win.lo `test -f 'processor/win.c' || echo '$(srcdir)/'`processor/win.c processor/libzbar_la-posix.lo: processor/posix.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT processor/libzbar_la-posix.lo -MD -MP -MF processor/$(DEPDIR)/libzbar_la-posix.Tpo -c -o processor/libzbar_la-posix.lo `test -f 'processor/posix.c' || echo '$(srcdir)/'`processor/posix.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) processor/$(DEPDIR)/libzbar_la-posix.Tpo processor/$(DEPDIR)/libzbar_la-posix.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='processor/posix.c' object='processor/libzbar_la-posix.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o processor/libzbar_la-posix.lo `test -f 'processor/posix.c' || echo '$(srcdir)/'`processor/posix.c video/libzbar_la-v4l.lo: video/v4l.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT video/libzbar_la-v4l.lo -MD -MP -MF video/$(DEPDIR)/libzbar_la-v4l.Tpo -c -o video/libzbar_la-v4l.lo `test -f 'video/v4l.c' || echo '$(srcdir)/'`video/v4l.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) video/$(DEPDIR)/libzbar_la-v4l.Tpo video/$(DEPDIR)/libzbar_la-v4l.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='video/v4l.c' object='video/libzbar_la-v4l.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o video/libzbar_la-v4l.lo `test -f 'video/v4l.c' || echo '$(srcdir)/'`video/v4l.c video/libzbar_la-v4l2.lo: video/v4l2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT video/libzbar_la-v4l2.lo -MD -MP -MF video/$(DEPDIR)/libzbar_la-v4l2.Tpo -c -o video/libzbar_la-v4l2.lo `test -f 'video/v4l2.c' || echo '$(srcdir)/'`video/v4l2.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) video/$(DEPDIR)/libzbar_la-v4l2.Tpo video/$(DEPDIR)/libzbar_la-v4l2.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='video/v4l2.c' object='video/libzbar_la-v4l2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o video/libzbar_la-v4l2.lo `test -f 'video/v4l2.c' || echo '$(srcdir)/'`video/v4l2.c video/libzbar_la-v4l1.lo: video/v4l1.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT video/libzbar_la-v4l1.lo -MD -MP -MF video/$(DEPDIR)/libzbar_la-v4l1.Tpo -c -o video/libzbar_la-v4l1.lo `test -f 'video/v4l1.c' || echo '$(srcdir)/'`video/v4l1.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) video/$(DEPDIR)/libzbar_la-v4l1.Tpo video/$(DEPDIR)/libzbar_la-v4l1.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='video/v4l1.c' object='video/libzbar_la-v4l1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o video/libzbar_la-v4l1.lo `test -f 'video/v4l1.c' || echo '$(srcdir)/'`video/v4l1.c video/libzbar_la-vfw.lo: video/vfw.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT video/libzbar_la-vfw.lo -MD -MP -MF video/$(DEPDIR)/libzbar_la-vfw.Tpo -c -o video/libzbar_la-vfw.lo `test -f 'video/vfw.c' || echo '$(srcdir)/'`video/vfw.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) video/$(DEPDIR)/libzbar_la-vfw.Tpo video/$(DEPDIR)/libzbar_la-vfw.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='video/vfw.c' object='video/libzbar_la-vfw.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o video/libzbar_la-vfw.lo `test -f 'video/vfw.c' || echo '$(srcdir)/'`video/vfw.c video/libzbar_la-dshow.lo: video/dshow.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT video/libzbar_la-dshow.lo -MD -MP -MF video/$(DEPDIR)/libzbar_la-dshow.Tpo -c -o video/libzbar_la-dshow.lo `test -f 'video/dshow.c' || echo '$(srcdir)/'`video/dshow.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) video/$(DEPDIR)/libzbar_la-dshow.Tpo video/$(DEPDIR)/libzbar_la-dshow.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='video/dshow.c' object='video/libzbar_la-dshow.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o video/libzbar_la-dshow.lo `test -f 'video/dshow.c' || echo '$(srcdir)/'`video/dshow.c video/libzbar_la-null.lo: video/null.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT video/libzbar_la-null.lo -MD -MP -MF video/$(DEPDIR)/libzbar_la-null.Tpo -c -o video/libzbar_la-null.lo `test -f 'video/null.c' || echo '$(srcdir)/'`video/null.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) video/$(DEPDIR)/libzbar_la-null.Tpo video/$(DEPDIR)/libzbar_la-null.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='video/null.c' object='video/libzbar_la-null.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o video/libzbar_la-null.lo `test -f 'video/null.c' || echo '$(srcdir)/'`video/null.c libzbar_la-jpeg.lo: jpeg.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libzbar_la-jpeg.lo -MD -MP -MF $(DEPDIR)/libzbar_la-jpeg.Tpo -c -o libzbar_la-jpeg.lo `test -f 'jpeg.c' || echo '$(srcdir)/'`jpeg.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzbar_la-jpeg.Tpo $(DEPDIR)/libzbar_la-jpeg.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='jpeg.c' object='libzbar_la-jpeg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libzbar_la-jpeg.lo `test -f 'jpeg.c' || echo '$(srcdir)/'`jpeg.c processor/libzbar_la-x.lo: processor/x.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT processor/libzbar_la-x.lo -MD -MP -MF processor/$(DEPDIR)/libzbar_la-x.Tpo -c -o processor/libzbar_la-x.lo `test -f 'processor/x.c' || echo '$(srcdir)/'`processor/x.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) processor/$(DEPDIR)/libzbar_la-x.Tpo processor/$(DEPDIR)/libzbar_la-x.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='processor/x.c' object='processor/libzbar_la-x.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o processor/libzbar_la-x.lo `test -f 'processor/x.c' || echo '$(srcdir)/'`processor/x.c window/libzbar_la-x.lo: window/x.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT window/libzbar_la-x.lo -MD -MP -MF window/$(DEPDIR)/libzbar_la-x.Tpo -c -o window/libzbar_la-x.lo `test -f 'window/x.c' || echo '$(srcdir)/'`window/x.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) window/$(DEPDIR)/libzbar_la-x.Tpo window/$(DEPDIR)/libzbar_la-x.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='window/x.c' object='window/libzbar_la-x.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o window/libzbar_la-x.lo `test -f 'window/x.c' || echo '$(srcdir)/'`window/x.c window/libzbar_la-ximage.lo: window/ximage.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT window/libzbar_la-ximage.lo -MD -MP -MF window/$(DEPDIR)/libzbar_la-ximage.Tpo -c -o window/libzbar_la-ximage.lo `test -f 'window/ximage.c' || echo '$(srcdir)/'`window/ximage.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) window/$(DEPDIR)/libzbar_la-ximage.Tpo window/$(DEPDIR)/libzbar_la-ximage.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='window/ximage.c' object='window/libzbar_la-ximage.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o window/libzbar_la-ximage.lo `test -f 'window/ximage.c' || echo '$(srcdir)/'`window/ximage.c window/libzbar_la-xv.lo: window/xv.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT window/libzbar_la-xv.lo -MD -MP -MF window/$(DEPDIR)/libzbar_la-xv.Tpo -c -o window/libzbar_la-xv.lo `test -f 'window/xv.c' || echo '$(srcdir)/'`window/xv.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) window/$(DEPDIR)/libzbar_la-xv.Tpo window/$(DEPDIR)/libzbar_la-xv.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='window/xv.c' object='window/libzbar_la-xv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o window/libzbar_la-xv.lo `test -f 'window/xv.c' || echo '$(srcdir)/'`window/xv.c window/libzbar_la-win.lo: window/win.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT window/libzbar_la-win.lo -MD -MP -MF window/$(DEPDIR)/libzbar_la-win.Tpo -c -o window/libzbar_la-win.lo `test -f 'window/win.c' || echo '$(srcdir)/'`window/win.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) window/$(DEPDIR)/libzbar_la-win.Tpo window/$(DEPDIR)/libzbar_la-win.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='window/win.c' object='window/libzbar_la-win.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o window/libzbar_la-win.lo `test -f 'window/win.c' || echo '$(srcdir)/'`window/win.c window/libzbar_la-dib.lo: window/dib.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT window/libzbar_la-dib.lo -MD -MP -MF window/$(DEPDIR)/libzbar_la-dib.Tpo -c -o window/libzbar_la-dib.lo `test -f 'window/dib.c' || echo '$(srcdir)/'`window/dib.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) window/$(DEPDIR)/libzbar_la-dib.Tpo window/$(DEPDIR)/libzbar_la-dib.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='window/dib.c' object='window/libzbar_la-dib.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o window/libzbar_la-dib.lo `test -f 'window/dib.c' || echo '$(srcdir)/'`window/dib.c processor/libzbar_la-null.lo: processor/null.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT processor/libzbar_la-null.lo -MD -MP -MF processor/$(DEPDIR)/libzbar_la-null.Tpo -c -o processor/libzbar_la-null.lo `test -f 'processor/null.c' || echo '$(srcdir)/'`processor/null.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) processor/$(DEPDIR)/libzbar_la-null.Tpo processor/$(DEPDIR)/libzbar_la-null.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='processor/null.c' object='processor/libzbar_la-null.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o processor/libzbar_la-null.lo `test -f 'processor/null.c' || echo '$(srcdir)/'`processor/null.c window/libzbar_la-null.lo: window/null.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT window/libzbar_la-null.lo -MD -MP -MF window/$(DEPDIR)/libzbar_la-null.Tpo -c -o window/libzbar_la-null.lo `test -f 'window/null.c' || echo '$(srcdir)/'`window/null.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) window/$(DEPDIR)/libzbar_la-null.Tpo window/$(DEPDIR)/libzbar_la-null.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='window/null.c' object='window/libzbar_la-null.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o window/libzbar_la-null.lo `test -f 'window/null.c' || echo '$(srcdir)/'`window/null.c libzbar_la-svg.lo: svg.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libzbar_la-svg.lo -MD -MP -MF $(DEPDIR)/libzbar_la-svg.Tpo -c -o libzbar_la-svg.lo `test -f 'svg.c' || echo '$(srcdir)/'`svg.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzbar_la-svg.Tpo $(DEPDIR)/libzbar_la-svg.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='svg.c' object='libzbar_la-svg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbar_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libzbar_la-svg.lo `test -f 'svg.c' || echo '$(srcdir)/'`svg.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -rm -rf decoder/.libs decoder/_libs -rm -rf processor/.libs processor/_libs -rm -rf qrcode/.libs qrcode/_libs -rm -rf video/.libs video/_libs -rm -rf window/.libs window/_libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f decoder/$(DEPDIR)/$(am__dirstamp) -rm -f decoder/$(am__dirstamp) -rm -f processor/$(DEPDIR)/$(am__dirstamp) -rm -f processor/$(am__dirstamp) -rm -f qrcode/$(DEPDIR)/$(am__dirstamp) -rm -f qrcode/$(am__dirstamp) -rm -f video/$(DEPDIR)/$(am__dirstamp) -rm -f video/$(am__dirstamp) -rm -f window/$(DEPDIR)/$(am__dirstamp) -rm -f window/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libzbar_la-config.Plo -rm -f ./$(DEPDIR)/libzbar_la-convert.Plo -rm -f ./$(DEPDIR)/libzbar_la-decoder.Plo -rm -f ./$(DEPDIR)/libzbar_la-error.Plo -rm -f ./$(DEPDIR)/libzbar_la-image.Plo -rm -f ./$(DEPDIR)/libzbar_la-img_scanner.Plo -rm -f ./$(DEPDIR)/libzbar_la-jpeg.Plo -rm -f ./$(DEPDIR)/libzbar_la-misc.Plo -rm -f ./$(DEPDIR)/libzbar_la-processor.Plo -rm -f ./$(DEPDIR)/libzbar_la-refcnt.Plo -rm -f ./$(DEPDIR)/libzbar_la-scanner.Plo -rm -f ./$(DEPDIR)/libzbar_la-sqcode.Plo -rm -f ./$(DEPDIR)/libzbar_la-svg.Plo -rm -f ./$(DEPDIR)/libzbar_la-symbol.Plo -rm -f ./$(DEPDIR)/libzbar_la-video.Plo -rm -f ./$(DEPDIR)/libzbar_la-window.Plo -rm -f decoder/$(DEPDIR)/libzbar_la-codabar.Plo -rm -f decoder/$(DEPDIR)/libzbar_la-code128.Plo -rm -f decoder/$(DEPDIR)/libzbar_la-code39.Plo -rm -f decoder/$(DEPDIR)/libzbar_la-code93.Plo -rm -f decoder/$(DEPDIR)/libzbar_la-databar.Plo -rm -f decoder/$(DEPDIR)/libzbar_la-ean.Plo -rm -f decoder/$(DEPDIR)/libzbar_la-i25.Plo -rm -f decoder/$(DEPDIR)/libzbar_la-pdf417.Plo -rm -f decoder/$(DEPDIR)/libzbar_la-qr_finder.Plo -rm -f decoder/$(DEPDIR)/libzbar_la-sq_finder.Plo -rm -f processor/$(DEPDIR)/libzbar_la-lock.Plo -rm -f processor/$(DEPDIR)/libzbar_la-null.Plo -rm -f processor/$(DEPDIR)/libzbar_la-posix.Plo -rm -f processor/$(DEPDIR)/libzbar_la-win.Plo -rm -f processor/$(DEPDIR)/libzbar_la-x.Plo -rm -f qrcode/$(DEPDIR)/libzbar_la-bch15_5.Plo -rm -f qrcode/$(DEPDIR)/libzbar_la-binarize.Plo -rm -f qrcode/$(DEPDIR)/libzbar_la-isaac.Plo -rm -f qrcode/$(DEPDIR)/libzbar_la-qrdec.Plo -rm -f qrcode/$(DEPDIR)/libzbar_la-qrdectxt.Plo -rm -f qrcode/$(DEPDIR)/libzbar_la-rs.Plo -rm -f qrcode/$(DEPDIR)/libzbar_la-util.Plo -rm -f video/$(DEPDIR)/libzbar_la-dshow.Plo -rm -f video/$(DEPDIR)/libzbar_la-null.Plo -rm -f video/$(DEPDIR)/libzbar_la-v4l.Plo -rm -f video/$(DEPDIR)/libzbar_la-v4l1.Plo -rm -f video/$(DEPDIR)/libzbar_la-v4l2.Plo -rm -f video/$(DEPDIR)/libzbar_la-vfw.Plo -rm -f window/$(DEPDIR)/libzbar_la-dib.Plo -rm -f window/$(DEPDIR)/libzbar_la-null.Plo -rm -f window/$(DEPDIR)/libzbar_la-win.Plo -rm -f window/$(DEPDIR)/libzbar_la-x.Plo -rm -f window/$(DEPDIR)/libzbar_la-ximage.Plo -rm -f window/$(DEPDIR)/libzbar_la-xv.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libzbar_la-config.Plo -rm -f ./$(DEPDIR)/libzbar_la-convert.Plo -rm -f ./$(DEPDIR)/libzbar_la-decoder.Plo -rm -f ./$(DEPDIR)/libzbar_la-error.Plo -rm -f ./$(DEPDIR)/libzbar_la-image.Plo -rm -f ./$(DEPDIR)/libzbar_la-img_scanner.Plo -rm -f ./$(DEPDIR)/libzbar_la-jpeg.Plo -rm -f ./$(DEPDIR)/libzbar_la-misc.Plo -rm -f ./$(DEPDIR)/libzbar_la-processor.Plo -rm -f ./$(DEPDIR)/libzbar_la-refcnt.Plo -rm -f ./$(DEPDIR)/libzbar_la-scanner.Plo -rm -f ./$(DEPDIR)/libzbar_la-sqcode.Plo -rm -f ./$(DEPDIR)/libzbar_la-svg.Plo -rm -f ./$(DEPDIR)/libzbar_la-symbol.Plo -rm -f ./$(DEPDIR)/libzbar_la-video.Plo -rm -f ./$(DEPDIR)/libzbar_la-window.Plo -rm -f decoder/$(DEPDIR)/libzbar_la-codabar.Plo -rm -f decoder/$(DEPDIR)/libzbar_la-code128.Plo -rm -f decoder/$(DEPDIR)/libzbar_la-code39.Plo -rm -f decoder/$(DEPDIR)/libzbar_la-code93.Plo -rm -f decoder/$(DEPDIR)/libzbar_la-databar.Plo -rm -f decoder/$(DEPDIR)/libzbar_la-ean.Plo -rm -f decoder/$(DEPDIR)/libzbar_la-i25.Plo -rm -f decoder/$(DEPDIR)/libzbar_la-pdf417.Plo -rm -f decoder/$(DEPDIR)/libzbar_la-qr_finder.Plo -rm -f decoder/$(DEPDIR)/libzbar_la-sq_finder.Plo -rm -f processor/$(DEPDIR)/libzbar_la-lock.Plo -rm -f processor/$(DEPDIR)/libzbar_la-null.Plo -rm -f processor/$(DEPDIR)/libzbar_la-posix.Plo -rm -f processor/$(DEPDIR)/libzbar_la-win.Plo -rm -f processor/$(DEPDIR)/libzbar_la-x.Plo -rm -f qrcode/$(DEPDIR)/libzbar_la-bch15_5.Plo -rm -f qrcode/$(DEPDIR)/libzbar_la-binarize.Plo -rm -f qrcode/$(DEPDIR)/libzbar_la-isaac.Plo -rm -f qrcode/$(DEPDIR)/libzbar_la-qrdec.Plo -rm -f qrcode/$(DEPDIR)/libzbar_la-qrdectxt.Plo -rm -f qrcode/$(DEPDIR)/libzbar_la-rs.Plo -rm -f qrcode/$(DEPDIR)/libzbar_la-util.Plo -rm -f video/$(DEPDIR)/libzbar_la-dshow.Plo -rm -f video/$(DEPDIR)/libzbar_la-null.Plo -rm -f video/$(DEPDIR)/libzbar_la-v4l.Plo -rm -f video/$(DEPDIR)/libzbar_la-v4l1.Plo -rm -f video/$(DEPDIR)/libzbar_la-v4l2.Plo -rm -f video/$(DEPDIR)/libzbar_la-vfw.Plo -rm -f window/$(DEPDIR)/libzbar_la-dib.Plo -rm -f window/$(DEPDIR)/libzbar_la-null.Plo -rm -f window/$(DEPDIR)/libzbar_la-win.Plo -rm -f window/$(DEPDIR)/libzbar_la-x.Plo -rm -f window/$(DEPDIR)/libzbar_la-ximage.Plo -rm -f window/$(DEPDIR)/libzbar_la-xv.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libLTLIBRARIES clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES .PRECIOUS: Makefile @WIN32_TRUE@%-rc.o: %.rc @WIN32_TRUE@ $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ @WIN32_TRUE@ $(AM_CPPFLAGS) $(CPPFLAGS) -o $@ $< @WIN32_TRUE@%-rc.lo: %.rc @WIN32_TRUE@ $(LIBTOOL) --tag=RC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ @WIN32_TRUE@ --mode=compile $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ @WIN32_TRUE@ $(AM_CPPFLAGS) $(CPPFLAGS) -o $@ $< # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zbar-0.23/zbar/symbol.c0000664000175000017500000002715413471225716011747 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #include #include #include #include #include "symbol.h" const char *zbar_get_symbol_name (zbar_symbol_type_t sym) { switch(sym & ZBAR_SYMBOL) { case ZBAR_EAN2: return("EAN-2"); case ZBAR_EAN5: return("EAN-5"); case ZBAR_EAN8: return("EAN-8"); case ZBAR_UPCE: return("UPC-E"); case ZBAR_ISBN10: return("ISBN-10"); case ZBAR_UPCA: return("UPC-A"); case ZBAR_EAN13: return("EAN-13"); case ZBAR_ISBN13: return("ISBN-13"); case ZBAR_COMPOSITE: return("COMPOSITE"); case ZBAR_I25: return("I2/5"); case ZBAR_DATABAR: return("DataBar"); case ZBAR_DATABAR_EXP: return("DataBar-Exp"); case ZBAR_CODABAR: return("Codabar"); case ZBAR_CODE39: return("CODE-39"); case ZBAR_CODE93: return("CODE-93"); case ZBAR_CODE128: return("CODE-128"); case ZBAR_PDF417: return("PDF417"); case ZBAR_QRCODE: return("QR-Code"); case ZBAR_SQCODE: return("SQ-Code"); default: return("UNKNOWN"); } } const char *zbar_get_addon_name (zbar_symbol_type_t sym) { return(""); } const char *zbar_get_config_name (zbar_config_t cfg) { switch(cfg) { case ZBAR_CFG_ENABLE: return("ENABLE"); case ZBAR_CFG_ADD_CHECK: return("ADD_CHECK"); case ZBAR_CFG_EMIT_CHECK: return("EMIT_CHECK"); case ZBAR_CFG_ASCII: return("ASCII"); case ZBAR_CFG_MIN_LEN: return("MIN_LEN"); case ZBAR_CFG_MAX_LEN: return("MAX_LEN"); case ZBAR_CFG_UNCERTAINTY: return("UNCERTAINTY"); case ZBAR_CFG_POSITION: return("POSITION"); case ZBAR_CFG_X_DENSITY: return("X_DENSITY"); case ZBAR_CFG_Y_DENSITY: return("Y_DENSITY"); default: return(""); } } const char *zbar_get_modifier_name (zbar_modifier_t mod) { switch(mod) { case ZBAR_MOD_GS1: return("GS1"); case ZBAR_MOD_AIM: return("AIM"); default: return(""); } } const char *zbar_get_orientation_name (zbar_orientation_t orient) { switch(orient) { case ZBAR_ORIENT_UP: return("UP"); case ZBAR_ORIENT_RIGHT: return("RIGHT"); case ZBAR_ORIENT_DOWN: return("DOWN"); case ZBAR_ORIENT_LEFT: return("LEFT"); default: return("UNKNOWN"); } } int _zbar_get_symbol_hash (zbar_symbol_type_t sym) { static const signed char hash[ZBAR_CODE128 + 1] = { [0 ... ZBAR_CODE128] = -1, /* [ZBAR_FOO] = 0, is empty */ [ZBAR_SQCODE] = 1, [ZBAR_CODE128] = 2, [ZBAR_EAN13] = 3, [ZBAR_UPCA] = 4, [ZBAR_EAN8] = 5, [ZBAR_UPCE] = 6, [ZBAR_ISBN13] = 7, [ZBAR_ISBN10] = 8, [ZBAR_CODE39] = 9, [ZBAR_I25] = 10, [ZBAR_PDF417] = 11, [ZBAR_QRCODE] = 12, [ZBAR_DATABAR] = 13, [ZBAR_DATABAR_EXP] = 14, [ZBAR_CODE93] = 15, [ZBAR_EAN2] = 16, [ZBAR_EAN5] = 17, [ZBAR_COMPOSITE] = 18, [ZBAR_CODABAR] = 19, /* Please update NUM_SYMS accordingly */ }; int h; assert (sym >= ZBAR_PARTIAL && sym <= ZBAR_CODE128); h = hash[sym]; assert (h >= 0 && h < NUM_SYMS); return h; } void _zbar_symbol_free (zbar_symbol_t *sym) { if(sym->syms) { zbar_symbol_set_ref(sym->syms, -1); sym->syms = NULL; } if(sym->pts) free(sym->pts); if(sym->data_alloc && sym->data) free(sym->data); free(sym); } void zbar_symbol_ref (const zbar_symbol_t *sym, int refs) { zbar_symbol_t *ncsym = (zbar_symbol_t*)sym; _zbar_symbol_refcnt(ncsym, refs); } zbar_symbol_type_t zbar_symbol_get_type (const zbar_symbol_t *sym) { return(sym->type); } unsigned int zbar_symbol_get_configs (const zbar_symbol_t *sym) { return(sym->configs); } unsigned int zbar_symbol_get_modifiers (const zbar_symbol_t *sym) { return(sym->modifiers); } const char *zbar_symbol_get_data (const zbar_symbol_t *sym) { return(sym->data); } unsigned int zbar_symbol_get_data_length (const zbar_symbol_t *sym) { return(sym->datalen); } int zbar_symbol_get_count (const zbar_symbol_t *sym) { return(sym->cache_count); } int zbar_symbol_get_quality (const zbar_symbol_t *sym) { return(sym->quality); } unsigned zbar_symbol_get_loc_size (const zbar_symbol_t *sym) { return(sym->npts); } int zbar_symbol_get_loc_x (const zbar_symbol_t *sym, unsigned idx) { if(idx < sym->npts) return(sym->pts[idx].x); else return(-1); } int zbar_symbol_get_loc_y (const zbar_symbol_t *sym, unsigned idx) { if(idx < sym->npts) return(sym->pts[idx].y); else return(-1); } zbar_orientation_t zbar_symbol_get_orientation (const zbar_symbol_t *sym) { return(sym->orient); } const zbar_symbol_t *zbar_symbol_next (const zbar_symbol_t *sym) { return((sym) ? sym->next : NULL); } const zbar_symbol_set_t* zbar_symbol_get_components (const zbar_symbol_t *sym) { return(sym->syms); } const zbar_symbol_t *zbar_symbol_first_component (const zbar_symbol_t *sym) { return((sym && sym->syms) ? sym->syms->head : NULL); } unsigned base64_encode (char *dst, const char *src, unsigned srclen) { static const char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; char *start = dst; int nline = 19; for(; srclen; srclen -= 3) { unsigned int buf = *(src++) << 16; if(srclen > 1) buf |= *(src++) << 8; if(srclen > 2) buf |= *(src++); *(dst++) = alphabet[(buf >> 18) & 0x3f]; *(dst++) = alphabet[(buf >> 12) & 0x3f]; *(dst++) = (srclen > 1) ? alphabet[(buf >> 6) & 0x3f] : '='; *(dst++) = (srclen > 2) ? alphabet[buf & 0x3f] : '='; if(srclen < 3) break; if(!--nline) { *(dst++) = '\n'; nline = 19; } } *(dst++) = '\n'; *(dst++) = '\0'; return(dst - start - 1); } enum { TMPL_START, TMPL_MOD_START, TMPL_MOD_ITEM, TMPL_MOD_END, TMPL_COUNT, TMPL_DATA_START, TMPL_FORMAT, TMPL_CDATA, TMPL_NL, TMPL_END, }; /* FIXME suspect... */ #define MAX_STATIC 256 #define MAX_MOD (5 * ZBAR_MOD_NUM) #define MAX_CFG (10 * ZBAR_CFG_NUM) #define MAX_INT_DIGITS 10 #define TMPL_COPY(t) do { \ static const char *_st = (t); \ i = strlen(_st); \ memcpy(*buf + n, _st, i + 1); \ n += i; \ assert(n <= maxlen); \ } while(0) #define TMPL_FMT(t, ...) do { \ static const char *_st = (t); \ i = snprintf(*buf + n, maxlen - n, _st, __VA_ARGS__); \ assert(i > 0); \ n += i; \ assert(n <= maxlen); \ } while(0) char *zbar_symbol_xml (const zbar_symbol_t *sym, char **buf, unsigned *len) { unsigned int datalen, maxlen; int i, n = 0; const char *type = zbar_get_symbol_name(sym->type); const char *orient = zbar_get_orientation_name(sym->orient); /* check for binary data */ unsigned char *data = (unsigned char*)sym->data; char binary = ((data[0] == 0xff && data[1] == 0xfe) || (data[0] == 0xfe && data[1] == 0xff) || !strncmp(sym->data, "datalen; i++) { unsigned char c = sym->data[i]; binary = ((c < 0x20 && ((~0x00002600 >> c) & 1)) || (c >= 0x7f && c < 0xa0) || (c == ']' && i + 2 < sym->datalen && sym->data[i + 1] == ']' && sym->data[i + 2] == '>')); } datalen = strlen(sym->data); if(binary) datalen = (sym->datalen + 2) / 3 * 4 + sym->datalen / 57 + 3; maxlen = (MAX_STATIC + strlen(type) + strlen(orient) + datalen + MAX_INT_DIGITS + 1); unsigned int mods = sym->modifiers; if(mods) maxlen += MAX_MOD; unsigned int cfgs = sym->configs & ~(1 << ZBAR_CFG_ENABLE); if(cfgs) maxlen += MAX_CFG; if(binary) maxlen += MAX_INT_DIGITS; if(!*buf || (*len < maxlen)) { if(*buf) free(*buf); *buf = malloc(maxlen); /* FIXME check OOM */ *len = maxlen; } TMPL_FMT("quality, orient); if(mods) { int j; TMPL_COPY(" modifiers='"); for(j = 0; mods && j < ZBAR_MOD_NUM; j++, mods >>= 1) if(mods & 1) TMPL_FMT("%s ", zbar_get_modifier_name(j)); /* cleanup trailing space */ n--; TMPL_COPY("'"); } if(cfgs) { int j; TMPL_COPY(" configs='"); for(j = 0; cfgs && j < ZBAR_CFG_NUM; j++, cfgs >>= 1) if(cfgs & 1) TMPL_FMT("%s ", zbar_get_config_name(j)); /* cleanup trailing space */ n--; TMPL_COPY("'"); } if(sym->cache_count) TMPL_FMT(" count='%d'", sym->cache_count); TMPL_COPY(">datalen); TMPL_COPY(">data, sym->datalen + 1); n += sym->datalen; } else { TMPL_COPY("\n"); n += base64_encode(*buf + n, sym->data, sym->datalen); } assert(n <= maxlen); TMPL_COPY("]]>"); *len = n; return(*buf); } zbar_symbol_set_t *_zbar_symbol_set_create () { zbar_symbol_set_t *syms = calloc(1, sizeof(*syms)); _zbar_refcnt(&syms->refcnt, 1); return(syms); } inline void _zbar_symbol_set_free (zbar_symbol_set_t *syms) { zbar_symbol_t *sym, *next; for(sym = syms->head; sym; sym = next) { next = sym->next; sym->next = NULL; _zbar_symbol_refcnt(sym, -1); } syms->head = NULL; free(syms); } void zbar_symbol_set_ref (const zbar_symbol_set_t *syms, int delta) { zbar_symbol_set_t *ncsyms = (zbar_symbol_set_t*)syms; if(!_zbar_refcnt(&ncsyms->refcnt, delta) && delta <= 0) _zbar_symbol_set_free(ncsyms); } int zbar_symbol_set_get_size (const zbar_symbol_set_t *syms) { return(syms->nsyms); } const zbar_symbol_t* zbar_symbol_set_first_symbol (const zbar_symbol_set_t *syms) { zbar_symbol_t *sym = syms->tail; if(sym) return(sym->next); return(syms->head); } const zbar_symbol_t* zbar_symbol_set_first_unfiltered (const zbar_symbol_set_t *syms) { return(syms->head); } zbar-0.23/zbar/video.h0000664000175000017500000001376513471225716011560 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _VIDEO_H_ #define _VIDEO_H_ #include #ifdef HAVE_INTTYPES_H # include #endif #include #include #include #include #include "image.h" #include "error.h" #include "mutex.h" /* number of images to preallocate */ #define ZBAR_VIDEO_IMAGES_MAX 4 typedef enum video_interface_e { VIDEO_INVALID = 0, /* uninitialized */ VIDEO_V4L1, /* v4l protocol version 1 */ VIDEO_V4L2, /* v4l protocol version 2 */ VIDEO_VFW, /* video for windows */ VIDEO_DSHOW /* direct show */ } video_interface_t; typedef enum video_iomode_e { VIDEO_READWRITE = 1, /* standard system calls */ VIDEO_MMAP, /* mmap interface */ VIDEO_USERPTR, /* userspace buffers */ } video_iomode_t; typedef struct video_state_s video_state_t; struct zbar_video_s { errinfo_t err; /* error reporting */ int fd; /* open camera device */ unsigned width, height; /* video frame size */ video_interface_t intf; /* input interface type */ video_iomode_t iomode; /* video data transfer mode */ unsigned initialized : 1; /* format selected and images mapped */ unsigned active : 1; /* current streaming state */ uint32_t format; /* selected fourcc */ unsigned palette; /* v4l1 format index corresponding to format */ uint32_t *formats; /* 0 terminated list of supported formats */ uint32_t *emu_formats; /* 0 terminated list of emulated formats */ struct video_resolution_s *res; /* 0 terminated list of resolutions */ struct video_controls_s *controls; /* linked list of controls */ unsigned long datalen; /* size of image data for selected format */ unsigned long buflen; /* total size of image data buffer */ void *buf; /* image data buffer */ unsigned frame; /* frame count */ zbar_mutex_t qlock; /* lock image queue */ int num_images; /* number of allocated images */ zbar_image_t **images; /* indexed list of images */ zbar_image_t *nq_image; /* last image enqueued */ zbar_image_t *dq_image; /* first image to dequeue (when ordered) */ zbar_image_t *shadow_image; /* special case internal double buffering */ video_state_t *state; /* platform/interface specific state */ #ifdef HAVE_LIBJPEG struct jpeg_decompress_struct *jpeg; /* JPEG decompressor */ zbar_image_t *jpeg_img; /* temporary image */ #endif /* interface dependent methods */ int (*init)(zbar_video_t*, uint32_t); int (*cleanup)(zbar_video_t*); int (*start)(zbar_video_t*); int (*stop)(zbar_video_t*); int (*nq)(zbar_video_t*, zbar_image_t*); /** set value of video control * implemented by v4l2_set_control() * @param name name of a control, acceptable names are listed * in processor.h * @param value pointer to value of a type specified by flags */ int (*set_control)(zbar_video_t*, const char* name, void* value); /** get value of video control * implemented by v4l2_get_control() * @param name name of a control, acceptable names are listed * in processor.h * @param value pointer to a receiver of a value of a type * specified by flags */ int (*get_control)(zbar_video_t*, const char* name, void* value); void (*free)(zbar_video_t*); zbar_image_t* (*dq)(zbar_video_t*); }; /* video.next_image and video.recycle_image have to be thread safe * wrt/other apis */ static inline int video_lock (zbar_video_t *vdo) { int rc = 0; if((rc = _zbar_mutex_lock(&vdo->qlock))) { err_capture(vdo, SEV_FATAL, ZBAR_ERR_LOCKING, __func__, "unable to acquire lock"); vdo->err.errnum = rc; return(-1); } return(0); } static inline int video_unlock (zbar_video_t *vdo) { int rc = 0; if((rc = _zbar_mutex_unlock(&vdo->qlock))) { err_capture(vdo, SEV_FATAL, ZBAR_ERR_LOCKING, __func__, "unable to release lock"); vdo->err.errnum = rc; return(-1); } return(0); } static inline int video_nq_image (zbar_video_t *vdo, zbar_image_t *img) { /* maintains queued buffers in order */ img->next = NULL; if(vdo->nq_image) vdo->nq_image->next = img; vdo->nq_image = img; if(!vdo->dq_image) vdo->dq_image = img; return(video_unlock(vdo)); } static inline zbar_image_t *video_dq_image (zbar_video_t *vdo) { zbar_image_t *img = vdo->dq_image; if(img) { vdo->dq_image = img->next; img->next = NULL; } if(video_unlock(vdo)) /* FIXME reclaim image */ return(NULL); return(img); } /* PAL interface */ extern int _zbar_video_open(zbar_video_t*, const char*); #endif zbar-0.23/zbar/image.c0000664000175000017500000002102113471225716011507 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "error.h" #include "image.h" #include "refcnt.h" zbar_image_t *zbar_image_create () { zbar_image_t *img = calloc(1, sizeof(zbar_image_t)); _zbar_refcnt_init(); _zbar_image_refcnt(img, 1); img->srcidx = -1; return(img); } void _zbar_image_free (zbar_image_t *img) { if(img->syms) { zbar_symbol_set_ref(img->syms, -1); img->syms = NULL; } free(img); } void zbar_image_destroy (zbar_image_t *img) { _zbar_image_refcnt(img, -1); } void zbar_image_ref (zbar_image_t *img, int refs) { _zbar_image_refcnt(img, refs); } unsigned long zbar_image_get_format (const zbar_image_t *img) { return(img->format); } unsigned zbar_image_get_sequence (const zbar_image_t *img) { return(img->seq); } unsigned zbar_image_get_width (const zbar_image_t *img) { return(img->width); } unsigned zbar_image_get_height (const zbar_image_t *img) { return(img->height); } void zbar_image_get_size (const zbar_image_t *img, unsigned *w, unsigned *h) { if(w) *w = img->width; if(h) *h = img->height; } void zbar_image_get_crop (const zbar_image_t *img, unsigned *x, unsigned *y, unsigned *w, unsigned *h) { if(x) *x = img->crop_x; if(y) *y = img->crop_y; if(w) *w = img->crop_w; if(h) *h = img->crop_h; } const void *zbar_image_get_data (const zbar_image_t *img) { return(img->data); } unsigned long zbar_image_get_data_length (const zbar_image_t *img) { return(img->datalen); } void zbar_image_set_format (zbar_image_t *img, unsigned long fmt) { img->format = fmt; } void zbar_image_set_sequence (zbar_image_t *img, unsigned seq) { img->seq = seq; } void zbar_image_set_size (zbar_image_t *img, unsigned w, unsigned h) { img->crop_x = img->crop_y = 0; img->width = img->crop_w = w; img->height = img->crop_h = h; } void zbar_image_set_crop (zbar_image_t *img, unsigned x, unsigned y, unsigned w, unsigned h) { unsigned img_w = img->width; if(x > img_w) x = img_w; if(x + w > img_w) w = img_w - x; img->crop_x = x; img->crop_w = w; unsigned img_h = img->height; if(y > img_h) y = img_h; if(y + h > img_h) h = img_h - y; img->crop_y = y; img->crop_h = h; } inline void zbar_image_free_data (zbar_image_t *img) { if(!img) return; if(img->src) { zbar_image_t *newimg; /* replace video image w/new copy */ assert(img->refcnt); /* FIXME needs lock */ newimg = zbar_image_create(); memcpy(newimg, img, sizeof(zbar_image_t)); /* recycle video image */ newimg->cleanup(newimg); /* detach old image from src */ img->cleanup = NULL; img->src = NULL; img->srcidx = -1; } else if(img->cleanup && img->data) { if(img->cleanup != zbar_image_free_data) { /* using function address to detect this case is a bad idea; * windows link libraries add an extra layer of indirection... * this works around that problem (bug #2796277) */ zbar_image_cleanup_handler_t *cleanup = img->cleanup; img->cleanup = zbar_image_free_data; cleanup(img); } else free((void*)img->data); } img->data = NULL; } void zbar_image_set_data (zbar_image_t *img, const void *data, unsigned long len, zbar_image_cleanup_handler_t *cleanup) { zbar_image_free_data(img); img->data = data; img->datalen = len; img->cleanup = cleanup; } void zbar_image_set_userdata (zbar_image_t *img, void *userdata) { img->userdata = userdata; } void *zbar_image_get_userdata (const zbar_image_t *img) { return(img->userdata); } zbar_image_t *zbar_image_copy (const zbar_image_t *src) { return _zbar_image_copy(src, 0); } const zbar_symbol_set_t *zbar_image_get_symbols (const zbar_image_t *img) { return(img->syms); } void zbar_image_set_symbols (zbar_image_t *img, const zbar_symbol_set_t *syms) { if(syms) zbar_symbol_set_ref(syms, 1); if(img->syms) zbar_symbol_set_ref(img->syms, -1); img->syms = (zbar_symbol_set_t*)syms; } const zbar_symbol_t *zbar_image_first_symbol (const zbar_image_t *img) { return((img->syms) ? img->syms->head : NULL); } typedef struct zimg_hdr_s { uint32_t magic, format; uint16_t width, height; uint32_t size; } zimg_hdr_t; int zbar_image_write (const zbar_image_t *img, const char *filebase) { int len = strlen(filebase) + 16; char *filename = malloc(len); int n = 0, rc = 0; FILE *f; zimg_hdr_t hdr; strcpy(filename, filebase); if((img->format & 0xff) >= ' ') n = snprintf(filename, len, "%s.%.4s.zimg", filebase, (char*)&img->format); else n = snprintf(filename, len, "%s.%08" PRIx32 ".zimg", filebase, img->format); assert(n < len - 1); filename[len - 1] = '\0'; zprintf(1, "dumping %.4s(%08" PRIx32 ") image to %s\n", (char*)&img->format, img->format, filename); f = fopen(filename, "w"); if(!f) { #ifdef HAVE_ERRNO_H rc = errno; zprintf(1, "ERROR opening %s: %s\n", filename, strerror(rc)); #else rc = 1; #endif goto error; } hdr.magic = 0x676d697a; hdr.format = img->format; hdr.width = img->width; hdr.height = img->height; hdr.size = img->datalen; if(fwrite(&hdr, sizeof(hdr), 1, f) != 1 || fwrite(img->data, 1, img->datalen, f) != img->datalen) { #ifdef HAVE_ERRNO_H rc = errno; zprintf(1, "ERROR writing %s: %s\n", filename, strerror(rc)); #else rc = 1; #endif fclose(f); goto error; } rc = fclose(f); error: free(filename); return(rc); } #ifdef DEBUG_SVG # include int zbar_image_write_png (const zbar_image_t *img, const char *filename) { int rc = -1; FILE *file = NULL; png_struct *png = NULL; png_info *info = NULL; const uint8_t **rows = NULL; rows = malloc(img->height * sizeof(*rows)); if(!rows) goto done; rows[0] = img->data; int y; for(y = 1; y < img->height; y++) rows[y] = rows[y - 1] + img->width; file = fopen(filename, "wb"); if(!file) goto done; png = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if(!png) goto done; info = png_create_info_struct(png); if(!info) goto done; if(setjmp(png_jmpbuf(png))) goto done; png_init_io(png, file); png_set_compression_level(png, 9); png_set_IHDR(png, info, img->width, img->height, 8, PNG_COLOR_TYPE_GRAY, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); png_set_rows(png, info, (void*)rows); png_write_png(png, info, PNG_TRANSFORM_IDENTITY, NULL); png_write_end(png,info); rc = 0; done: if(png) png_destroy_write_struct(&png, &info); if(rows) free(rows); if(file) fclose(file); return(rc); } #endif zbar-0.23/zbar/img_scanner.c0000664000175000017500000010342713471225716012725 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #ifdef HAVE_UNISTD_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_DBUS #include #endif #include /* malloc, free */ #include /* memcmp, memset, memcpy */ #include #include #include "error.h" #include "image.h" #include "timer.h" #if ENABLE_QRCODE == 1 # include "qrcode.h" #endif #if ENABLE_SQCODE == 1 # include "sqcode.h" #endif #include "img_scanner.h" #include "svg.h" #if 1 # define ASSERT_POS \ assert(p == data + x + y * (intptr_t)w) #else # define ASSERT_POS #endif /* FIXME cache setting configurability */ /* time interval for which two images are considered "nearby" */ #define CACHE_PROXIMITY 1000 /* ms */ /* time that a result must *not* be detected before * it will be reported again */ #define CACHE_HYSTERESIS 2000 /* ms */ /* time after which cache entries are invalidated */ #define CACHE_TIMEOUT (CACHE_HYSTERESIS * 2) /* ms */ #define NUM_SCN_CFGS (ZBAR_CFG_Y_DENSITY - ZBAR_CFG_X_DENSITY + 1) #define CFG(iscn, cfg) ((iscn)->configs[(cfg) - ZBAR_CFG_X_DENSITY]) #define TEST_CFG(iscn, cfg) (((iscn)->config >> ((cfg) - ZBAR_CFG_POSITION)) & 1) #ifndef NO_STATS # define STAT(x) iscn->stat_##x++ #else # define STAT(...) # define dump_stats(...) #endif #define RECYCLE_BUCKETS 5 typedef struct recycle_bucket_s { int nsyms; zbar_symbol_t *head; } recycle_bucket_t; /* image scanner state */ struct zbar_image_scanner_s { zbar_scanner_t *scn; /* associated linear intensity scanner */ zbar_decoder_t *dcode; /* associated symbol decoder */ #if ENABLE_QRCODE == 1 qr_reader *qr; /* QR Code 2D reader */ #endif #if ENABLE_SQCODE == 1 sq_reader *sq; /* SQ Code 2D reader */ #endif const void *userdata; /* application data */ /* user result callback */ zbar_image_data_handler_t *handler; unsigned long time; /* scan start time */ zbar_image_t *img; /* currently scanning image *root* */ int dx, dy, du, umin, v; /* current scan direction */ zbar_symbol_set_t *syms; /* previous decode results */ /* recycled symbols in 4^n size buckets */ recycle_bucket_t recycle[RECYCLE_BUCKETS]; int enable_cache; /* current result cache state */ zbar_symbol_t *cache; /* inter-image result cache entries */ /* configuration settings */ unsigned config; /* config flags */ unsigned ean_config; int configs[NUM_SCN_CFGS]; /* int valued configurations */ int sym_configs[1][NUM_SYMS]; /* per-symbology configurations */ #ifndef NO_STATS int stat_syms_new; int stat_iscn_syms_inuse, stat_iscn_syms_recycle; int stat_img_syms_inuse, stat_img_syms_recycle; int stat_sym_new; int stat_sym_recycle[RECYCLE_BUCKETS]; #endif #ifdef HAVE_DBUS int is_dbus_enabled; /* dbus enabled flag */ #endif }; void _zbar_image_scanner_recycle_syms (zbar_image_scanner_t *iscn, zbar_symbol_t *sym) { zbar_symbol_t *next = NULL; for(; sym; sym = next) { next = sym->next; if(sym->refcnt && _zbar_refcnt(&sym->refcnt, -1)) { /* unlink referenced symbol */ /* FIXME handle outstanding component refs (currently unsupported) */ assert(sym->data_alloc); sym->next = NULL; } else { int i; recycle_bucket_t *bucket; /* recycle unreferenced symbol */ if(!sym->data_alloc) { sym->data = NULL; sym->datalen = 0; } if(sym->syms) { if(_zbar_refcnt(&sym->syms->refcnt, -1)) assert(0); _zbar_image_scanner_recycle_syms(iscn, sym->syms->head); sym->syms->head = NULL; _zbar_symbol_set_free(sym->syms); sym->syms = NULL; } for(i = 0; i < RECYCLE_BUCKETS; i++) if(sym->data_alloc < 1 << (i * 2)) break; if(i == RECYCLE_BUCKETS) { assert(sym->data); free(sym->data); sym->data = NULL; sym->data_alloc = 0; i = 0; } bucket = &iscn->recycle[i]; /* FIXME cap bucket fill */ bucket->nsyms++; sym->next = bucket->head; bucket->head = sym; } } } static inline int recycle_syms (zbar_image_scanner_t *iscn, zbar_symbol_set_t *syms) { if(_zbar_refcnt(&syms->refcnt, -1)) return(1); _zbar_image_scanner_recycle_syms(iscn, syms->head); syms->head = syms->tail = NULL; syms->nsyms = 0; return(0); } inline void zbar_image_scanner_recycle_image (zbar_image_scanner_t *iscn, zbar_image_t *img) { zbar_symbol_set_t *syms = iscn->syms; if(syms && syms->refcnt) { if(recycle_syms(iscn, syms)) { STAT(iscn_syms_inuse); iscn->syms = NULL; } else STAT(iscn_syms_recycle); } syms = img->syms; img->syms = NULL; if(syms && recycle_syms(iscn, syms)) STAT(img_syms_inuse); else if(syms) { STAT(img_syms_recycle); /* select one set to resurrect, destroy the other */ if(iscn->syms) _zbar_symbol_set_free(syms); else iscn->syms = syms; } } inline zbar_symbol_t* _zbar_image_scanner_alloc_sym (zbar_image_scanner_t *iscn, zbar_symbol_type_t type, int datalen) { /* recycle old or alloc new symbol */ zbar_symbol_t *sym = NULL; int i; for(i = 0; i < RECYCLE_BUCKETS - 1; i++) if(datalen <= 1 << (i * 2)) break; for(; i > 0; i--) if((sym = iscn->recycle[i].head)) { STAT(sym_recycle[i]); break; } if(sym) { iscn->recycle[i].head = sym->next; sym->next = NULL; assert(iscn->recycle[i].nsyms); iscn->recycle[i].nsyms--; } else { sym = calloc(1, sizeof(zbar_symbol_t)); STAT(sym_new); } /* init new symbol */ sym->type = type; sym->quality = 1; sym->npts = 0; sym->orient = ZBAR_ORIENT_UNKNOWN; sym->cache_count = 0; sym->time = iscn->time; assert(!sym->syms); if(datalen > 0) { sym->datalen = datalen - 1; if(sym->data_alloc < datalen) { if(sym->data) free(sym->data); sym->data_alloc = datalen; sym->data = malloc(datalen); } } else { if(sym->data) free(sym->data); sym->data = NULL; sym->datalen = sym->data_alloc = 0; } return(sym); } static inline zbar_symbol_t *cache_lookup (zbar_image_scanner_t *iscn, zbar_symbol_t *sym) { /* search for matching entry in cache */ zbar_symbol_t **entry = &iscn->cache; while(*entry) { if((*entry)->type == sym->type && (*entry)->datalen == sym->datalen && !memcmp((*entry)->data, sym->data, sym->datalen)) break; if((sym->time - (*entry)->time) > CACHE_TIMEOUT) { /* recycle stale cache entry */ zbar_symbol_t *next = (*entry)->next; (*entry)->next = NULL; _zbar_image_scanner_recycle_syms(iscn, *entry); *entry = next; } else entry = &(*entry)->next; } return(*entry); } static inline void cache_sym (zbar_image_scanner_t *iscn, zbar_symbol_t *sym) { if(iscn->enable_cache) { uint32_t age, near_thresh, far_thresh, dup; zbar_symbol_t *entry = cache_lookup(iscn, sym); if(!entry) { /* FIXME reuse sym */ entry = _zbar_image_scanner_alloc_sym(iscn, sym->type, sym->datalen + 1); entry->configs = sym->configs; entry->modifiers = sym->modifiers; memcpy(entry->data, sym->data, sym->datalen); entry->time = sym->time - CACHE_HYSTERESIS; entry->cache_count = 0; /* add to cache */ entry->next = iscn->cache; iscn->cache = entry; } /* consistency check and hysteresis */ age = sym->time - entry->time; entry->time = sym->time; near_thresh = (age < CACHE_PROXIMITY); far_thresh = (age >= CACHE_HYSTERESIS); dup = (entry->cache_count >= 0); if((!dup && !near_thresh) || far_thresh) { int type = sym->type; int h = _zbar_get_symbol_hash(type); entry->cache_count = -iscn->sym_configs[0][h]; } else if(dup || near_thresh) entry->cache_count++; sym->cache_count = entry->cache_count; } else sym->cache_count = 0; } void _zbar_image_scanner_add_sym(zbar_image_scanner_t *iscn, zbar_symbol_t *sym) { zbar_symbol_set_t *syms; cache_sym(iscn, sym); syms = iscn->syms; if(sym->cache_count || !syms->tail) { sym->next = syms->head; syms->head = sym; } else { sym->next = syms->tail->next; syms->tail->next = sym; } if(!sym->cache_count) syms->nsyms++; else if(!syms->tail) syms->tail = sym; _zbar_symbol_refcnt(sym, 1); } #if ENABLE_QRCODE == 1 extern qr_finder_line *_zbar_decoder_get_qr_finder_line(zbar_decoder_t*); # define QR_FIXED(v, rnd) ((((v) << 1) + (rnd)) << (QR_FINDER_SUBPREC - 1)) # define PRINT_FIXED(val, prec) \ ((val) >> (prec)), \ (1000 * ((val) & ((1 << (prec)) - 1)) / (1 << (prec))) static inline void qr_handler (zbar_image_scanner_t *iscn) { unsigned u; int vert; qr_finder_line *line = _zbar_decoder_get_qr_finder_line(iscn->dcode); assert(line); u = zbar_scanner_get_edge(iscn->scn, line->pos[0], QR_FINDER_SUBPREC); line->boffs = u - zbar_scanner_get_edge(iscn->scn, line->boffs, QR_FINDER_SUBPREC); line->len = zbar_scanner_get_edge(iscn->scn, line->len, QR_FINDER_SUBPREC); line->eoffs = zbar_scanner_get_edge(iscn->scn, line->eoffs, QR_FINDER_SUBPREC) - line->len; line->len -= u; u = QR_FIXED(iscn->umin, 0) + iscn->du * u; if(iscn->du < 0) { int tmp = line->boffs; line->boffs = line->eoffs; line->eoffs = tmp; u -= line->len; } vert = !iscn->dx; line->pos[vert] = u; line->pos[!vert] = QR_FIXED(iscn->v, 1); _zbar_qr_found_line(iscn->qr, vert, line); } #endif #if ENABLE_SQCODE == 1 extern unsigned _zbar_decoder_get_sq_finder_config(zbar_decoder_t*); static void sq_handler (zbar_image_scanner_t *iscn) { unsigned config = _zbar_decoder_get_sq_finder_config(iscn->dcode); _zbar_sq_new_config(iscn->sq, config); } #endif static void symbol_handler (zbar_decoder_t *dcode) { zbar_image_scanner_t *iscn = zbar_decoder_get_userdata(dcode); zbar_symbol_type_t type = zbar_decoder_get_type(dcode); int x = 0, y = 0, dir; const char *data; unsigned datalen; zbar_symbol_t *sym; #if ENABLE_QRCODE == 1 if(type == ZBAR_QRCODE) { qr_handler(iscn); return; } #else assert(type != ZBAR_QRCODE); #endif if(TEST_CFG(iscn, ZBAR_CFG_POSITION)) { /* tmp position fixup */ int w = zbar_scanner_get_width(iscn->scn); int u = iscn->umin + iscn->du * zbar_scanner_get_edge(iscn->scn, w, 0); if(iscn->dx) { x = u; y = iscn->v; } else { x = iscn->v; y = u; } } /* FIXME debug flag to save/display all PARTIALs */ if(type <= ZBAR_PARTIAL) { zprintf(256, "partial symbol @(%d,%d)\n", x, y); return; } data = zbar_decoder_get_data(dcode); datalen = zbar_decoder_get_data_length(dcode); /* FIXME need better symbol matching */ for(sym = iscn->syms->head; sym; sym = sym->next) if(sym->type == type && sym->datalen == datalen && !memcmp(sym->data, data, datalen)) { sym->quality++; zprintf(224, "dup symbol @(%d,%d): dup %s: %.20s\n", x, y, zbar_get_symbol_name(type), data); if(TEST_CFG(iscn, ZBAR_CFG_POSITION)) /* add new point to existing set */ /* FIXME should be polygon */ sym_add_point(sym, x, y); return; } sym = _zbar_image_scanner_alloc_sym(iscn, type, datalen + 1); sym->configs = zbar_decoder_get_configs(dcode, type); sym->modifiers = zbar_decoder_get_modifiers(dcode); /* FIXME grab decoder buffer */ memcpy(sym->data, data, datalen + 1); /* initialize first point */ if(TEST_CFG(iscn, ZBAR_CFG_POSITION)) { zprintf(192, "new symbol @(%d,%d): %s: %.20s\n", x, y, zbar_get_symbol_name(type), data); sym_add_point(sym, x, y); } dir = zbar_decoder_get_direction(dcode); if(dir) sym->orient = (iscn->dy != 0) + ((iscn->du ^ dir) & 2); _zbar_image_scanner_add_sym(iscn, sym); } zbar_image_scanner_t *zbar_image_scanner_create () { zbar_image_scanner_t *iscn = calloc(1, sizeof(zbar_image_scanner_t)); if(!iscn) return(NULL); iscn->dcode = zbar_decoder_create(); iscn->scn = zbar_scanner_create(iscn->dcode); if(!iscn->dcode || !iscn->scn) { zbar_image_scanner_destroy(iscn); return(NULL); } zbar_decoder_set_userdata(iscn->dcode, iscn); zbar_decoder_set_handler(iscn->dcode, symbol_handler); #if ENABLE_QRCODE == 1 iscn->qr = _zbar_qr_create(); #endif #if ENABLE_SQCODE == 1 iscn->sq = _zbar_sq_create(); #endif /* apply default configuration */ CFG(iscn, ZBAR_CFG_X_DENSITY) = 1; CFG(iscn, ZBAR_CFG_Y_DENSITY) = 1; zbar_image_scanner_set_config(iscn, 0, ZBAR_CFG_POSITION, 1); zbar_image_scanner_set_config(iscn, 0, ZBAR_CFG_UNCERTAINTY, 2); zbar_image_scanner_set_config(iscn, 0, ZBAR_CFG_TEST_INVERTED, 0); zbar_image_scanner_set_config(iscn, ZBAR_QRCODE, ZBAR_CFG_UNCERTAINTY, 0); zbar_image_scanner_set_config(iscn, ZBAR_CODE128, ZBAR_CFG_UNCERTAINTY, 0); zbar_image_scanner_set_config(iscn, ZBAR_CODE93, ZBAR_CFG_UNCERTAINTY, 0); zbar_image_scanner_set_config(iscn, ZBAR_CODE39, ZBAR_CFG_UNCERTAINTY, 0); zbar_image_scanner_set_config(iscn, ZBAR_CODABAR, ZBAR_CFG_UNCERTAINTY, 1); zbar_image_scanner_set_config(iscn, ZBAR_COMPOSITE, ZBAR_CFG_UNCERTAINTY, 0); return(iscn); } #ifndef NO_STATS static inline void dump_stats (const zbar_image_scanner_t *iscn) { int i; zprintf(1, "symbol sets allocated = %-4d\n", iscn->stat_syms_new); zprintf(1, " scanner syms in use = %-4d\trecycled = %-4d\n", iscn->stat_iscn_syms_inuse, iscn->stat_iscn_syms_recycle); zprintf(1, " image syms in use = %-4d\trecycled = %-4d\n", iscn->stat_img_syms_inuse, iscn->stat_img_syms_recycle); zprintf(1, "symbols allocated = %-4d\n", iscn->stat_sym_new); for(i = 0; i < RECYCLE_BUCKETS; i++) zprintf(1, " recycled[%d] = %-4d\n", i, iscn->stat_sym_recycle[i]); } #endif void zbar_image_scanner_destroy (zbar_image_scanner_t *iscn) { int i; dump_stats(iscn); if(iscn->syms) { if(iscn->syms->refcnt) zbar_symbol_set_ref(iscn->syms, -1); else _zbar_symbol_set_free(iscn->syms); iscn->syms = NULL; } if(iscn->scn) zbar_scanner_destroy(iscn->scn); iscn->scn = NULL; if(iscn->dcode) zbar_decoder_destroy(iscn->dcode); iscn->dcode = NULL; for(i = 0; i < RECYCLE_BUCKETS; i++) { zbar_symbol_t *sym, *next; for(sym = iscn->recycle[i].head; sym; sym = next) { next = sym->next; _zbar_symbol_free(sym); } } #if ENABLE_QRCODE == 1 if(iscn->qr) { _zbar_qr_destroy(iscn->qr); iscn->qr = NULL; } #endif #if ENABLE_SQCODE == 1 if(iscn->sq) { _zbar_sq_destroy(iscn->sq); iscn->sq = NULL; } #endif free(iscn); } zbar_image_data_handler_t* zbar_image_scanner_set_data_handler (zbar_image_scanner_t *iscn, zbar_image_data_handler_t *handler, const void *userdata) { zbar_image_data_handler_t *result = iscn->handler; iscn->handler = handler; iscn->userdata = userdata; return(result); } int zbar_image_scanner_set_config (zbar_image_scanner_t *iscn, zbar_symbol_type_t sym, zbar_config_t cfg, int val) { if((sym == 0 || sym == ZBAR_COMPOSITE) && cfg == ZBAR_CFG_ENABLE) { iscn->ean_config = !!val; if(sym) return(0); } if(cfg < ZBAR_CFG_UNCERTAINTY) return(zbar_decoder_set_config(iscn->dcode, sym, cfg, val)); if(cfg < ZBAR_CFG_POSITION) { int c, i; if(cfg > ZBAR_CFG_UNCERTAINTY) return(1); c = cfg - ZBAR_CFG_UNCERTAINTY; if(sym > ZBAR_PARTIAL) { i = _zbar_get_symbol_hash(sym); iscn->sym_configs[c][i] = val; } else for(i = 0; i < NUM_SYMS; i++) iscn->sym_configs[c][i] = val; return(0); } /* Image scanner parameters apply only to ZBAR_PARTIAL */ if(sym > ZBAR_PARTIAL) return(1); if(cfg >= ZBAR_CFG_X_DENSITY && cfg <= ZBAR_CFG_Y_DENSITY) { CFG(iscn, cfg) = val; return(0); } cfg -= ZBAR_CFG_POSITION; if(!val) iscn->config &= ~(1 << cfg); else if(val == 1) iscn->config |= (1 << cfg); else return(1); return(0); } int zbar_image_scanner_get_config(zbar_image_scanner_t *iscn, zbar_symbol_type_t sym, zbar_config_t cfg, int *val) { /* Return error if symbol doesn't have config */ if(sym < ZBAR_PARTIAL || sym > ZBAR_CODE128 || sym == ZBAR_COMPOSITE) return 1; if (cfg < ZBAR_CFG_UNCERTAINTY) return zbar_decoder_get_config(iscn->dcode, sym, cfg, val); if(cfg < ZBAR_CFG_POSITION) { if(sym == ZBAR_PARTIAL) return(1); int i = _zbar_get_symbol_hash(sym); *val = iscn->sym_configs[cfg - ZBAR_CFG_UNCERTAINTY][i]; return 0; } /* Image scanner parameters apply only to ZBAR_PARTIAL */ if(sym > ZBAR_PARTIAL) return(1); if(cfg < ZBAR_CFG_X_DENSITY) { *val = (iscn->config & (1 << (cfg - ZBAR_CFG_POSITION))) != 0; return 0; } if(cfg <= ZBAR_CFG_Y_DENSITY) { *val = CFG(iscn, cfg); return 0; } return 1; } void zbar_image_scanner_enable_cache (zbar_image_scanner_t *iscn, int enable) { if(iscn->cache) { /* recycle all cached syms */ _zbar_image_scanner_recycle_syms(iscn, iscn->cache); iscn->cache = NULL; } iscn->enable_cache = (enable) ? 1 : 0; } const zbar_symbol_set_t * zbar_image_scanner_get_results (const zbar_image_scanner_t *iscn) { return(iscn->syms); } static inline void quiet_border (zbar_image_scanner_t *iscn) { /* flush scanner pipeline */ zbar_scanner_t *scn = iscn->scn; zbar_scanner_flush(scn); zbar_scanner_flush(scn); zbar_scanner_new_scan(scn); } #ifdef HAVE_DBUS static int dict_add_property (DBusMessageIter *property, const char *key, const char *value) { DBusMessageIter dict_entry, dict_val; DBusError err; dbus_error_init(&err); dbus_message_iter_open_container(property, DBUS_TYPE_DICT_ENTRY, NULL, &dict_entry); if (!dbus_message_iter_append_basic(&dict_entry, DBUS_TYPE_STRING, &key)){ fprintf(stderr, "Key Error\n"); dbus_message_iter_close_container(property, &dict_entry); goto error; } dbus_message_iter_open_container(&dict_entry, DBUS_TYPE_VARIANT, DBUS_TYPE_STRING_AS_STRING, &dict_val); if (!dbus_message_iter_append_basic(&dict_val, DBUS_TYPE_STRING, &value)){ fprintf(stderr, "Value Error\n"); dbus_message_iter_close_container(&dict_entry, &dict_val); dbus_message_iter_close_container(property, &dict_entry); goto error; } dbus_message_iter_close_container(&dict_entry, &dict_val); dbus_message_iter_close_container(property, &dict_entry); return(1); error: if (dbus_error_is_set(&err)) { fprintf(stderr, "Name Error (%s)\n", err.message); dbus_error_free(&err); } return(0); } static void zbar_send_dbus(int type, const char* sigvalue) { DBusMessage* msg; DBusMessageIter args, dict; DBusConnection* conn; const char *type_name; DBusError err; int ret; dbus_uint32_t serial = 0; // initialise the error value dbus_error_init(&err); // connect to the DBUS system bus, and check for errors conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err); if (dbus_error_is_set(&err)) { fprintf(stderr, "Connection Error (%s)\n", err.message); dbus_error_free(&err); } if (NULL == conn) { fprintf(stderr, "Connection Null\n"); return; } // register our name on the bus, and check for errors ret = dbus_bus_request_name(conn, "org.linuxtv.Zbar", DBUS_NAME_FLAG_REPLACE_EXISTING, &err); if (dbus_error_is_set(&err)) { fprintf(stderr, "Name Error (%s)\n", err.message); dbus_error_free(&err); } if (DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER != ret) { return; } // create a signal & check for errors msg = dbus_message_new_signal("/org/linuxtv/Zbar1/Code", // object name of the signal "org.linuxtv.Zbar1.Code", // interface name of the signal "Code"); // name of the signal if (NULL == msg) { fprintf(stderr, "Message Null\n"); return; } // append arguments onto signal dbus_message_iter_init_append(msg, &args); if (!dbus_message_iter_open_container(&args, DBUS_TYPE_ARRAY, "{sv}", &dict)) { fprintf(stderr, "Out Of Dict Container Memory!\n"); dbus_message_unref(msg); return; } type_name = zbar_get_symbol_name(type); if (!dict_add_property(&dict, "Type", type_name)) { fprintf(stderr, "Out Of Property Memory!\n"); dbus_message_unref(msg); return; } if (!dict_add_property(&dict, "Data", sigvalue)) { fprintf(stderr, "Out Of Property Memory!\n"); dbus_message_unref(msg); return; } dbus_message_iter_close_container(&args, &dict); // send the message and flush the connection if (!dbus_connection_send(conn, msg, &serial)) { fprintf(stderr, "Out Of Memory!\n"); dbus_message_unref(msg); return; } dbus_connection_flush(conn); dbus_bus_release_name(conn, "org.linuxtv.Zbar", &err); if (dbus_error_is_set(&err)) { fprintf(stderr, "Name Release Error (%s)\n", err.message); dbus_error_free(&err); } // free the message dbus_message_unref(msg); } static void zbar_send_code_via_dbus(zbar_image_t *img) { const zbar_symbol_t *sym = zbar_image_first_symbol(img); if (!sym) return; for(; sym; sym = zbar_symbol_next(sym)) { if(zbar_symbol_get_count(sym)) continue; zbar_symbol_type_t type = zbar_symbol_get_type(sym); if(type == ZBAR_PARTIAL) continue; zbar_send_dbus(type, zbar_symbol_get_data(sym)); } } #endif #define movedelta(dx, dy) do { \ x += (dx); \ y += (dy); \ p += (dx) + ((uintptr_t)(dy) * w); \ } while(0); static void *_zbar_scan_image(zbar_image_scanner_t *iscn, zbar_image_t *img) { zbar_symbol_set_t *syms; const uint8_t *data; zbar_scanner_t *scn = iscn->scn; unsigned w, h, cx1, cy1; int density; /* timestamp image * FIXME prefer video timestamp */ iscn->time = _zbar_timer_now(); #if ENABLE_QRCODE == 1 _zbar_qr_reset(iscn->qr); #endif #if ENABLE_SQCODE == 1 _zbar_sq_reset(iscn->sq); #endif /* image must be in grayscale format */ if(img->format != fourcc('Y','8','0','0') && img->format != fourcc('G','R','E','Y')) return NULL; iscn->img = img; /* recycle previous scanner and image results */ zbar_image_scanner_recycle_image(iscn, img); syms = iscn->syms; if(!syms) { syms = iscn->syms = _zbar_symbol_set_create(); STAT(syms_new); zbar_symbol_set_ref(syms, 1); } else zbar_symbol_set_ref(syms, 2); img->syms = syms; w = img->width; h = img->height; cx1 = img->crop_x + img->crop_w; assert(cx1 <= w); cy1 = img->crop_y + img->crop_h; assert(cy1 <= h); data = img->data; zbar_image_write_png(img, "debug.png"); svg_open("debug.svg", 0, 0, w, h); svg_image("debug.png", w, h); zbar_scanner_new_scan(scn); density = CFG(iscn, ZBAR_CFG_Y_DENSITY); if(density > 0) { const uint8_t *p = data; int x = 0, y = 0; int border = (((img->crop_h - 1) % density) + 1) / 2; if(border > img->crop_h / 2) border = img->crop_h / 2; border += img->crop_y; assert(border <= h); svg_group_start("scanner", 0, 1, 1, 0, 0); iscn->dy = 0; movedelta(img->crop_x, border); iscn->v = y; while(y < cy1) { int cx0 = img->crop_x;; zprintf(128, "img_x+: %04d,%04d @%p\n", x, y, p); svg_path_start("vedge", 1. / 32, 0, y + 0.5); iscn->dx = iscn->du = 1; iscn->umin = cx0; while(x < cx1) { uint8_t d = *p; movedelta(1, 0); zbar_scan_y(scn, d); } ASSERT_POS; quiet_border(iscn); svg_path_end(); movedelta(-1, density); iscn->v = y; if(y >= cy1) break; zprintf(128, "img_x-: %04d,%04d @%p\n", x, y, p); svg_path_start("vedge", -1. / 32, w, y + 0.5); iscn->dx = iscn->du = -1; iscn->umin = cx1; while(x >= cx0) { uint8_t d = *p; movedelta(-1, 0); zbar_scan_y(scn, d); } ASSERT_POS; quiet_border(iscn); svg_path_end(); movedelta(1, density); iscn->v = y; } svg_group_end(); } iscn->dx = 0; density = CFG(iscn, ZBAR_CFG_X_DENSITY); if(density > 0) { const uint8_t *p = data; int x = 0, y = 0; int border = (((img->crop_w - 1) % density) + 1) / 2; if(border > img->crop_w / 2) border = img->crop_w / 2; border += img->crop_x; assert(border <= w); svg_group_start("scanner", 90, 1, -1, 0, 0); movedelta(border, img->crop_y); iscn->v = x; while(x < cx1) { int cy0 = img->crop_y; zprintf(128, "img_y+: %04d,%04d @%p\n", x, y, p); svg_path_start("vedge", 1. / 32, 0, x + 0.5); iscn->dy = iscn->du = 1; iscn->umin = cy0; while(y < cy1) { uint8_t d = *p; movedelta(0, 1); zbar_scan_y(scn, d); } ASSERT_POS; quiet_border(iscn); svg_path_end(); movedelta(density, -1); iscn->v = x; if(x >= cx1) break; zprintf(128, "img_y-: %04d,%04d @%p\n", x, y, p); svg_path_start("vedge", -1. / 32, h, x + 0.5); iscn->dy = iscn->du = -1; iscn->umin = cy1; while(y >= cy0) { uint8_t d = *p; movedelta(0, -1); zbar_scan_y(scn, d); } ASSERT_POS; quiet_border(iscn); svg_path_end(); movedelta(density, 1); iscn->v = x; } svg_group_end(); } iscn->dy = 0; iscn->img = NULL; #if ENABLE_QRCODE == 1 _zbar_qr_decode(iscn->qr, iscn, img); #endif #if ENABLE_SQCODE == 1 sq_handler(iscn); _zbar_sq_decode(iscn->sq, iscn, img); #endif /* FIXME tmp hack to filter bad EAN results */ /* FIXME tmp hack to merge simple case EAN add-ons */ char filter = (!iscn->enable_cache && (density == 1 || CFG(iscn, ZBAR_CFG_Y_DENSITY) == 1)); int nean = 0, naddon = 0; if(syms->nsyms) { zbar_symbol_t **symp; for(symp = &syms->head; *symp; ) { zbar_symbol_t *sym = *symp; if(sym->cache_count <= 0 && ((sym->type < ZBAR_COMPOSITE && sym->type > ZBAR_PARTIAL) || sym->type == ZBAR_DATABAR || sym->type == ZBAR_DATABAR_EXP || sym->type == ZBAR_CODABAR)) { if((sym->type == ZBAR_CODABAR || filter) && sym->quality < 4) { if(iscn->enable_cache) { /* revert cache update */ zbar_symbol_t *entry = cache_lookup(iscn, sym); if(entry) entry->cache_count--; else assert(0); } /* recycle */ *symp = sym->next; syms->nsyms--; sym->next = NULL; _zbar_image_scanner_recycle_syms(iscn, sym); continue; } else if(sym->type < ZBAR_COMPOSITE && sym->type != ZBAR_ISBN10) { if(sym->type > ZBAR_EAN5) nean++; else naddon++; } } symp = &sym->next; } if(nean == 1 && naddon == 1 && iscn->ean_config) { /* create container symbol for composite result */ zbar_symbol_t *ean = NULL, *addon = NULL; for(symp = &syms->head; *symp; ) { zbar_symbol_t *sym = *symp; if(sym->type < ZBAR_COMPOSITE && sym->type > ZBAR_PARTIAL) { /* move to composite */ *symp = sym->next; syms->nsyms--; sym->next = NULL; if(sym->type <= ZBAR_EAN5) addon = sym; else ean = sym; } else symp = &sym->next; } assert(ean); assert(addon); int datalen = ean->datalen + addon->datalen + 1; zbar_symbol_t *ean_sym = _zbar_image_scanner_alloc_sym(iscn, ZBAR_COMPOSITE, datalen); ean_sym->orient = ean->orient; ean_sym->syms = _zbar_symbol_set_create(); memcpy(ean_sym->data, ean->data, ean->datalen); memcpy(ean_sym->data + ean->datalen, addon->data, addon->datalen + 1); ean_sym->syms->head = ean; ean->next = addon; ean_sym->syms->nsyms = 2; _zbar_image_scanner_add_sym(iscn, ean_sym); } } return syms; } int zbar_scan_image(zbar_image_scanner_t *iscn, zbar_image_t *img) { zbar_symbol_set_t *syms; zbar_image_t *inv = NULL; syms = _zbar_scan_image(iscn, img); if (!syms) return -1; if(!syms->nsyms && TEST_CFG(iscn, ZBAR_CFG_TEST_INVERTED)) { inv = _zbar_image_copy (img, 1); if (inv) { if(iscn->cache) { /* recycle all cached syms, if any */ _zbar_image_scanner_recycle_syms(iscn, iscn->cache); iscn->cache = NULL; } syms = _zbar_scan_image(iscn, inv); _zbar_image_swap_symbols(img, inv); } } if(syms->nsyms && iscn->handler) iscn->handler(img, iscn->userdata); #ifdef HAVE_DBUS if(iscn->is_dbus_enabled) zbar_send_code_via_dbus(img); #endif svg_close(); if (inv) zbar_image_destroy(inv); return(syms->nsyms); } int zbar_image_scanner_request_dbus(zbar_image_scanner_t *scanner, int req_dbus_enabled) { #ifdef HAVE_DBUS scanner->is_dbus_enabled = req_dbus_enabled; return 0; #else return 1; #endif } #ifdef DEBUG_SVG /* FIXME lame...*/ # include "svg.c" #endif zbar-0.23/zbar/misc.c0000664000175000017500000000630213471225716011365 00000000000000/*------------------------------------------------------------------------ * Copyright 2012 (c) Jarek Czekalski * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "misc.h" #include "error.h" static int module_initialized = 0; static errinfo_t err; static void module_init() { if (module_initialized) return; err_init(&err, ZBAR_MOD_UNKNOWN); module_initialized = 1; } void resolution_list_init(resolution_list_t *list) { module_init(); list->cnt = 0; // an empty list consists of 1 zeroed element list->resolutions = calloc(1, sizeof(resolution_t)); if (!list->resolutions) { err_capture(&err, SEV_FATAL, ZBAR_ERR_NOMEM, __func__, "allocating resources"); } } void resolution_list_cleanup(resolution_list_t *list) { free(list->resolutions); } void resolution_list_add(resolution_list_t *list, resolution_t *resolution) { list->cnt++; list->resolutions = realloc(list->resolutions, (list->cnt + 1) * sizeof(resolution_t)); if (!list->resolutions) { err_capture(&err, SEV_FATAL, ZBAR_ERR_NOMEM, __func__, "allocating resources"); } list->resolutions[list->cnt - 1] = *resolution; memset(&list->resolutions[list->cnt], 0, sizeof(resolution_t)); } void get_closest_resolution(resolution_t *resolution, resolution_list_t *list) { resolution_t *test_res; long min_diff = 0; long idx_best = -1; // the index of best resolution in resolutions int i = 0; for (test_res = list->resolutions; !is_struct_null(test_res); test_res++) { long diff; if (resolution->cx) { diff = test_res->cx - resolution->cx; if (diff < 0) diff = -diff; } else { // empty resolution, looking for the biggest diff = -test_res->cx; } if (idx_best < 0 || diff < min_diff) { idx_best = i; min_diff = diff; } i++; } if (idx_best >= 0) { *resolution = list->resolutions[idx_best]; } } int is_struct_null_fun(const void *pdata, const int len) { int i; for (i = 0; i < len; i++) { if (((char*)pdata)[i] != 0) { return 0; } } return 1; } zbar-0.23/zbar/debug.h0000664000175000017500000000572313471225700011524 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ /* varargs variations on compile time debug spew */ # include #ifndef DEBUG_LEVEL # ifdef __GNUC__ /* older versions of gcc (< 2.95) require a named varargs parameter */ # define dbprintf(args...) while(0) # else /* unfortunately named vararg parameter is a gcc-specific extension */ # define dbprintf(...) while(0) # endif #else # ifdef __GNUC__ # define dbprintf(level, args...) do { \ if((level) <= DEBUG_LEVEL) \ fprintf(stderr, args); \ } while(0) # else # define dbprintf(level, ...) do { \ if((level) <= DEBUG_LEVEL) \ fprintf(stderr, __VA_ARGS__); \ } while(0) # endif #endif /* DEBUG_LEVEL */ /* spew warnings for non-fatal assertions. * returns specified error code if assertion fails. * NB check/return is still performed for NDEBUG * only the message is inhibited * FIXME don't we need varargs hacks here? */ #ifndef NDEBUG # include #if __STDC_VERSION__ < 199901L && !defined(__func__) # if __GNUC__ >= 2 # define __func__ __FUNCTION__ # else # define __func__ "" # endif #endif # define zassert(condition, retval, format, ...) do { \ if(!(condition)) { \ fprintf(stderr, "WARNING: %s:%d: %s:" \ " Assertion \"%s\" failed.\n\t" format, \ __FILE__, __LINE__, __func__, #condition , \ ##__VA_ARGS__); \ return(retval); \ } \ } while(0) #else # define zassert(condition, retval, format, ...) do { \ if(!(condition)) \ return(retval); \ } while(0) #endif zbar-0.23/zbar/processor.h0000664000175000017500000001144013471225716012455 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _PROCESSOR_H_ #define _PROCESSOR_H_ #include #ifdef HAVE_INTTYPES_H # include #endif #include #include #include #include #include "error.h" #include "thread.h" #include "event.h" /* max time to wait for input before looking for the next frame. * only used in unthreaded mode with blocking (non-pollable) video. * NB subject to precision of whatever timer is in use */ #define MAX_INPUT_BLOCK 15/*ms*/ /* platform specific state wrapper */ typedef struct processor_state_s processor_state_t; /* specific notification tracking */ typedef struct proc_waiter_s { struct proc_waiter_s *next; zbar_event_t notify; zbar_thread_id_t requester; unsigned events; } proc_waiter_t; /* high-level API events */ #define EVENT_INPUT 0x01 /* user input */ #define EVENT_OUTPUT 0x02 /* decoded output data available */ #define EVENT_CANCELED 0x80 /* cancellation flag */ #define EVENTS_PENDING (EVENT_INPUT | EVENT_OUTPUT) struct zbar_processor_s { errinfo_t err; /* error reporting */ const void *userdata; /* application data */ zbar_video_t *video; /* input video device abstraction */ zbar_window_t *window; /* output window abstraction */ zbar_image_scanner_t *scanner; /* barcode scanner */ zbar_image_data_handler_t *handler; /* application data handler */ unsigned req_width, req_height; /* application requested video size */ int req_intf, req_iomode; /* application requested interface */ uint32_t force_input; /* force input format (debug) */ uint32_t force_output; /* force format conversion (debug) */ int input; /* user input status */ /* state flags */ int threaded; int visible; /* output window mapped to display */ int streaming; /* video enabled */ int dumping; /* debug image dump */ void *display; /* X display connection */ unsigned long xwin; /* toplevel window */ zbar_thread_t input_thread; /* video input handler */ zbar_thread_t video_thread; /* window event handler */ const zbar_symbol_set_t *syms; /* previous decode results */ zbar_mutex_t mutex; /* shared data mutex */ /* API serialization lock */ int lock_level; zbar_thread_id_t lock_owner; proc_waiter_t *wait_head, *wait_tail, *wait_next; proc_waiter_t *free_waiter; processor_state_t *state; int is_dbus_enabled; /* dbus enabled flag */ }; /* processor lock API */ extern int _zbar_processor_lock(zbar_processor_t*); extern int _zbar_processor_unlock(zbar_processor_t*, int); extern void _zbar_processor_notify(zbar_processor_t*, unsigned); extern int _zbar_processor_wait(zbar_processor_t*, unsigned, zbar_timer_t*); /* platform API */ extern int _zbar_processor_init(zbar_processor_t*); extern int _zbar_processor_cleanup(zbar_processor_t*); extern int _zbar_processor_input_wait(zbar_processor_t*, zbar_event_t*, int); extern int _zbar_processor_enable(zbar_processor_t*); extern int _zbar_process_image(zbar_processor_t*, zbar_image_t*); extern int _zbar_processor_handle_input(zbar_processor_t*, int); /* windowing platform API */ extern int _zbar_processor_open(zbar_processor_t*, char*, unsigned, unsigned); extern int _zbar_processor_close(zbar_processor_t*); extern int _zbar_processor_set_visible(zbar_processor_t*, int); extern int _zbar_processor_set_size(zbar_processor_t*, unsigned, unsigned); extern int _zbar_processor_invalidate(zbar_processor_t*); #endif zbar-0.23/zbar/decoder.h0000664000175000017500000002205313471225716012045 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _DECODER_H_ #define _DECODER_H_ #include #include /* realloc */ #include #include #include "debug.h" #define NUM_CFGS (ZBAR_CFG_MAX_LEN - ZBAR_CFG_MIN_LEN + 1) #if ENABLE_EAN == 1 # include "decoder/ean.h" #endif #if ENABLE_I25 == 1 # include "decoder/i25.h" #endif #if ENABLE_DATABAR == 1 # include "decoder/databar.h" #endif #if ENABLE_CODABAR == 1 # include "decoder/codabar.h" #endif #if ENABLE_CODE39 == 1 # include "decoder/code39.h" #endif #if ENABLE_CODE93 == 1 # include "decoder/code93.h" #endif #if ENABLE_CODE128 == 1 # include "decoder/code128.h" #endif #if ENABLE_PDF417 == 1 # include "decoder/pdf417.h" #endif #if ENABLE_QRCODE == 1 # include "decoder/qr_finder.h" #endif #if ENABLE_SQCODE == 1 # include "decoder/sq_finder.h" #endif /* size of bar width history (implementation assumes power of two) */ #ifndef DECODE_WINDOW # define DECODE_WINDOW 16 #endif /* initial data buffer allocation */ #ifndef BUFFER_MIN # define BUFFER_MIN 0x20 #endif /* maximum data buffer allocation * (longer symbols are rejected) */ #ifndef BUFFER_MAX # define BUFFER_MAX 0x100 #endif /* buffer allocation increment */ #ifndef BUFFER_INCR # define BUFFER_INCR 0x10 #endif #define CFG(dcode, cfg) ((dcode).configs[(cfg) - ZBAR_CFG_MIN_LEN]) #define TEST_CFG(config, cfg) (((config) >> (cfg)) & 1) #define MOD(mod) (1 << (mod)) /* symbology independent decoder state */ struct zbar_decoder_s { unsigned char idx; /* current width index */ unsigned w[DECODE_WINDOW]; /* window of last N bar widths */ zbar_symbol_type_t type; /* type of last decoded data */ zbar_symbol_type_t lock; /* buffer lock */ unsigned modifiers; /* symbology modifier */ int direction; /* direction of last decoded data */ unsigned s6; /* 6-element character width */ /* everything above here is automatically reset */ unsigned buf_alloc; /* dynamic buffer allocation */ unsigned buflen; /* binary data length */ unsigned char *buf; /* decoded characters */ void *userdata; /* application data */ zbar_decoder_handler_t *handler; /* application callback */ /* symbology specific state */ #if ENABLE_EAN == 1 ean_decoder_t ean; /* EAN/UPC parallel decode attempts */ #endif #if ENABLE_I25 == 1 i25_decoder_t i25; /* Interleaved 2 of 5 decode state */ #endif #if ENABLE_DATABAR == 1 databar_decoder_t databar; /* DataBar decode state */ #endif #if ENABLE_CODABAR == 1 codabar_decoder_t codabar; /* Codabar decode state */ #endif #if ENABLE_CODE39 == 1 code39_decoder_t code39; /* Code 39 decode state */ #endif #if ENABLE_CODE93 == 1 code93_decoder_t code93; /* Code 93 decode state */ #endif #if ENABLE_CODE128 == 1 code128_decoder_t code128; /* Code 128 decode state */ #endif #if ENABLE_PDF417 == 1 pdf417_decoder_t pdf417; /* PDF417 decode state */ #endif #if ENABLE_QRCODE == 1 qr_finder_t qrf; /* QR Code finder state */ #endif #if ENABLE_SQCODE == 1 sq_finder_t sqf; /* SQ Code finder state */ #endif }; /* return current element color */ static inline char get_color (const zbar_decoder_t *dcode) { return(dcode->idx & 1); } /* retrieve i-th previous element width */ static inline unsigned get_width (const zbar_decoder_t *dcode, unsigned char offset) { return(dcode->w[(dcode->idx - offset) & (DECODE_WINDOW - 1)]); } /* retrieve bar+space pair width starting at offset i */ static inline unsigned pair_width (const zbar_decoder_t *dcode, unsigned char offset) { return(get_width(dcode, offset) + get_width(dcode, offset + 1)); } /* calculate total character width "s" * - start of character identified by context sensitive offset * (<= DECODE_WINDOW - n) * - size of character is n elements */ static inline unsigned calc_s (const zbar_decoder_t *dcode, unsigned char offset, unsigned char n) { /* FIXME check that this gets unrolled for constant n */ unsigned s = 0; while(n--) s += get_width(dcode, offset++); return(s); } /* fixed character width decode assist * bar+space width are compared as a fraction of the reference dimension "x" * - +/- 1/2 x tolerance * - measured total character width (s) compared to symbology baseline (n) * (n = 7 for EAN/UPC, 11 for Code 128) * - bar+space *pair width* "e" is used to factor out bad "exposures" * ("blooming" or "swelling" of dark or light areas) * => using like-edge measurements avoids these issues * - n should be > 3 */ static inline int decode_e (unsigned e, unsigned s, unsigned n) { /* result is encoded number of units - 2 * (for use as zero based index) * or -1 if invalid */ unsigned char E = ((e * n * 2 + 1) / s - 3) / 2; return((E >= n - 3) ? -1 : E); } /* sort three like-colored elements and return ordering */ static inline unsigned decode_sort3 (zbar_decoder_t *dcode, int i0) { unsigned w0 = get_width(dcode, i0); unsigned w2 = get_width(dcode, i0 + 2); unsigned w4 = get_width(dcode, i0 + 4); if(w0 < w2) { if(w2 < w4) return((i0 << 8) | ((i0 + 2) << 4) | (i0 + 4)); if(w0 < w4) return((i0 << 8) | ((i0 + 4) << 4) | (i0 + 2)); return(((i0 + 4) << 8) | (i0 << 4) | (i0 + 2)); } if(w4 < w2) return(((i0 + 4) << 8) | ((i0 + 2) << 4) | i0); if(w0 < w4) return(((i0 + 2) << 8) | (i0 << 4) | (i0 + 4)); return(((i0 + 2) << 8) | ((i0 + 4) << 4) | i0); } /* sort N like-colored elements and return ordering */ static inline unsigned decode_sortn (zbar_decoder_t *dcode, int n, int i0) { unsigned mask = 0, sort = 0; int i; for(i = n - 1; i >= 0; i--) { unsigned wmin = UINT_MAX; int jmin = -1, j; for(j = n - 1; j >= 0; j--) { if((mask >> j) & 1) continue; unsigned w = get_width(dcode, i0 + j * 2); if(wmin >= w) { wmin = w; jmin = j; } } zassert(jmin >= 0, 0, "sortn(%d,%d) jmin=%d", n, i0, jmin); sort <<= 4; mask |= 1 << jmin; sort |= i0 + jmin * 2; } return(sort); } /* acquire shared state lock */ static inline char acquire_lock (zbar_decoder_t *dcode, zbar_symbol_type_t req) { if(dcode->lock) { dbprintf(2, " [locked %d]\n", dcode->lock); return(1); } dcode->lock = req; return(0); } /* check and release shared state lock */ static inline char release_lock (zbar_decoder_t *dcode, zbar_symbol_type_t req) { zassert(dcode->lock == req, 1, "lock=%d req=%d\n", dcode->lock, req); dcode->lock = 0; return(0); } /* ensure output buffer has sufficient allocation for request */ static inline char size_buf (zbar_decoder_t *dcode, unsigned len) { unsigned char *buf; if(len <= BUFFER_MIN) return(0); if(len < dcode->buf_alloc) /* FIXME size reduction heuristic? */ return(0); if(len > BUFFER_MAX) return(1); if(len < dcode->buf_alloc + BUFFER_INCR) { len = dcode->buf_alloc + BUFFER_INCR; if(len > BUFFER_MAX) len = BUFFER_MAX; } buf = realloc(dcode->buf, len); if(!buf) return(1); dcode->buf = buf; dcode->buf_alloc = len; return(0); } extern const char *_zbar_decoder_buf_dump (unsigned char *buf, unsigned int buflen); #endif zbar-0.23/zbar/qrcode/0000775000175000017500000000000013471606255011623 500000000000000zbar-0.23/zbar/qrcode/util.c0000664000175000017500000000653213471225716012671 00000000000000/*Copyright (C) 2008-2009 Timothy B. Terriberry (tterribe@xiph.org) You can redistribute this library and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.*/ #include #include "util.h" /*Computes floor(sqrt(_val)) exactly.*/ unsigned qr_isqrt(unsigned _val){ unsigned g; unsigned b; int bshift; /*Uses the second method from http://www.azillionmonkeys.com/qed/sqroot.html The main idea is to search for the largest binary digit b such that (g+b)*(g+b) <= _val, and add it to the solution g.*/ g=0; b=0x8000; for(bshift=16;bshift-->0;){ unsigned t; t=(g<<1)+b<>=1; } return g; } /*Computes sqrt(_x*_x+_y*_y) using CORDIC. This implementation is valid for all 32-bit inputs and returns a result accurate to about 27 bits of precision. It has been tested for all positive 16-bit inputs, where it returns correctly rounded results in 99.998% of cases and the maximum error is 0.500137134862598032 (for _x=48140, _y=63018). Very nearly all results less than (1<<16) are correctly rounded. All Pythagorean triples with a hypotenuse of less than ((1<<27)-1) evaluate correctly, and the total bias over all Pythagorean triples is -0.04579, with a relative RMS error of 7.2864E-10 and a relative peak error of 7.4387E-9.*/ unsigned qr_ihypot(int _x,int _y){ unsigned x; unsigned y; int mask; int shift; int u; int v; int i; x=_x=abs(_x); y=_y=abs(_y); mask=-(x>y)&(_x^_y); x^=mask; y^=mask; _y^=mask; shift=31-qr_ilog(y); shift=QR_MAXI(shift,0); x=(unsigned)((x<>32); _y=(int)((_y<>32); u=x; mask=-(_y<0); x+=_y+mask^mask; _y-=u+mask^mask; u=x+1>>1; v=_y+1>>1; mask=-(_y<0); x+=v+mask^mask; _y-=u+mask^mask; for(i=1;i<16;i++){ int r; u=x+1>>2; r=(1<<2*i)>>1; v=_y+r>>2*i; mask=-(_y<0); x+=v+mask^mask; _y=_y-(u+mask^mask)<<1; } return x+((1U<>1)>>shift; } #if defined(__GNUC__) && defined(HAVE_FEATURES_H) # include # if __GNUC_PREREQ(3,4) # include # if INT_MAX>=2147483647 # define QR_CLZ0 sizeof(unsigned)*CHAR_BIT # define QR_CLZ(_x) (__builtin_clz(_x)) # elif LONG_MAX>=2147483647L # define QR_CLZ0 sizeof(unsigned long)*CHAR_BIT # define QR_CLZ(_x) (__builtin_clzl(_x)) # endif # endif #endif int qr_ilog(unsigned _v){ #if defined(QR_CLZ) /*Note that __builtin_clz is not defined when _x==0, according to the gcc documentation (and that of the x86 BSR instruction that implements it), so we have to special-case it.*/ return QR_CLZ0-QR_CLZ(_v)&-!!_v; #else int ret; int m; m=!!(_v&0xFFFF0000)<<4; _v>>=m; ret=m; m=!!(_v&0xFF00)<<3; _v>>=m; ret|=m; m=!!(_v&0xF0)<<2; _v>>=m; ret|=m; m=!!(_v&0xC)<<1; _v>>=m; ret|=m; ret|=!!(_v&0x2); return ret + !!_v; #endif } #if defined(QR_TEST_SQRT) #include #include /*Exhaustively test the integer square root function.*/ int main(void){ unsigned u; u=0; do{ unsigned r; unsigned s; r=qr_isqrt(u); s=(int)sqrt(u); if(r!=s)printf("%u: %u!=%u\n",u,r,s); u++; } while(u); return 0; } #endif zbar-0.23/zbar/qrcode/qrdec.c0000664000175000017500000041512613471225716013015 00000000000000/*Copyright (C) 2008-2009 Timothy B. Terriberry (tterribe@xiph.org) You can redistribute this library and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.*/ #include #include #include #include #include #include "qrcode.h" #include "qrdec.h" #include "bch15_5.h" #include "rs.h" #include "isaac.h" #include "util.h" #include "binarize.h" #include "image.h" #include "error.h" #include "svg.h" typedef int qr_line[3]; typedef struct qr_finder_cluster qr_finder_cluster; typedef struct qr_finder_edge_pt qr_finder_edge_pt; typedef struct qr_finder_center qr_finder_center; typedef struct qr_aff qr_aff; typedef struct qr_hom qr_hom; typedef struct qr_finder qr_finder; typedef struct qr_hom_cell qr_hom_cell; typedef struct qr_sampling_grid qr_sampling_grid; typedef struct qr_pack_buf qr_pack_buf; /*The number of bits in an int. Note the cast to (int): this prevents this value from "promoting" whole expressions to an (unsigned) size_t.*/ #define QR_INT_BITS ((int)sizeof(int)*CHAR_BIT) #define QR_INT_LOGBITS (QR_ILOG(QR_INT_BITS)) /*A 14 bit resolution for a homography ensures that the ideal module size for a version 40 code differs from that of a version 39 code by at least 2.*/ #define QR_HOM_BITS (14) /*The number of bits of sub-module precision to use when searching for alignment patterns. Two bits allows an alignment pattern to be found even if the modules have been eroded by up to 50% (due to blurring, etc.). This must be at least one, since it affects the dynamic range of the transforms, and we sample at half-module resolution to compute a bounding quadrilateral for the code.*/ #define QR_ALIGN_SUBPREC (2) /* collection of finder lines */ typedef struct qr_finder_lines { qr_finder_line *lines; int nlines, clines; } qr_finder_lines; struct qr_reader { /*The GF(256) representation used in Reed-Solomon decoding.*/ rs_gf256 gf; /*The random number generator used by RANSAC.*/ isaac_ctx isaac; /* current finder state, horizontal and vertical lines */ qr_finder_lines finder_lines[2]; }; /*Initializes a client reader handle.*/ static void qr_reader_init (qr_reader *reader) { /*time_t now; now=time(NULL); isaac_init(&_reader->isaac,&now,sizeof(now));*/ isaac_init(&reader->isaac, NULL, 0); rs_gf256_init(&reader->gf, QR_PPOLY); } /*Allocates a client reader handle.*/ qr_reader *_zbar_qr_create (void) { qr_reader *reader = (qr_reader*)calloc(1, sizeof(*reader)); qr_reader_init(reader); return(reader); } /*Frees a client reader handle.*/ void _zbar_qr_destroy (qr_reader *reader) { zprintf(1, "max finder lines = %dx%d\n", reader->finder_lines[0].clines, reader->finder_lines[1].clines); if(reader->finder_lines[0].lines) free(reader->finder_lines[0].lines); if(reader->finder_lines[1].lines) free(reader->finder_lines[1].lines); free(reader); } /* reset finder state between scans */ void _zbar_qr_reset (qr_reader *reader) { reader->finder_lines[0].nlines = 0; reader->finder_lines[1].nlines = 0; } /*A cluster of lines crossing a finder pattern (all in the same direction).*/ struct qr_finder_cluster{ /*Pointers to the lines crossing the pattern.*/ qr_finder_line **lines; /*The number of lines in the cluster.*/ int nlines; }; /*A point on the edge of a finder pattern. These are obtained from the endpoints of the lines crossing this particular pattern.*/ struct qr_finder_edge_pt{ /*The location of the edge point.*/ qr_point pos; /*A label classifying which edge this belongs to: 0: negative u edge (left) 1: positive u edge (right) 2: negative v edge (top) 3: positive v edge (bottom)*/ int edge; /*The (signed) perpendicular distance of the edge point from a line parallel to the edge passing through the finder center, in (u,v) coordinates. This is also re-used by RANSAC to store inlier flags.*/ int extent; }; /*The center of a finder pattern obtained from the crossing of one or more clusters of horizontal finder lines with one or more clusters of vertical finder lines.*/ struct qr_finder_center{ /*The estimated location of the finder center.*/ qr_point pos; /*The list of edge points from the crossing lines.*/ qr_finder_edge_pt *edge_pts; /*The number of edge points from the crossing lines.*/ int nedge_pts; }; static int qr_finder_vline_cmp(const void *_a,const void *_b){ const qr_finder_line *a; const qr_finder_line *b; a=(const qr_finder_line *)_a; b=(const qr_finder_line *)_b; return ((a->pos[0]>b->pos[0])-(a->pos[0]pos[0])<<1)+ (a->pos[1]>b->pos[1])-(a->pos[1]pos[1]); } /*Clusters adjacent lines into groups that are large enough to be crossing a finder pattern (relative to their length). _clusters: The buffer in which to store the clusters found. _neighbors: The buffer used to store the lists of lines in each cluster. _lines: The list of lines to cluster. Horizontal lines must be sorted in ascending order by Y coordinate, with ties broken by X coordinate. Vertical lines must be sorted in ascending order by X coordinate, with ties broken by Y coordinate. _nlines: The number of lines in the set of lines to cluster. _v: 0 for horizontal lines, or 1 for vertical lines. Return: The number of clusters.*/ static int qr_finder_cluster_lines(qr_finder_cluster *_clusters, qr_finder_line **_neighbors,qr_finder_line *_lines,int _nlines,int _v){ unsigned char *mark; qr_finder_line **neighbors; int nneighbors; int nclusters; int i; /*TODO: Kalman filters!*/ mark=(unsigned char *)calloc(_nlines,sizeof(*mark)); neighbors=_neighbors; nclusters=0; for(i=0;i<_nlines-1;i++)if(!mark[i]){ int len; int j; nneighbors=1; neighbors[0]=_lines+i; len=_lines[i].len; for(j=i+1;j<_nlines;j++)if(!mark[j]){ const qr_finder_line *a; const qr_finder_line *b; int thresh; a=neighbors[nneighbors-1]; b=_lines+j; /*The clustering threshold is proportional to the size of the lines, since minor noise in large areas can interrupt patterns more easily at high resolutions.*/ thresh=a->len+7>>2; if(abs(a->pos[1-_v]-b->pos[1-_v])>thresh)break; if(abs(a->pos[_v]-b->pos[_v])>thresh)continue; if(abs(a->pos[_v]+a->len-b->pos[_v]-b->len)>thresh)continue; if(a->boffs>0&&b->boffs>0&& abs(a->pos[_v]-a->boffs-b->pos[_v]+b->boffs)>thresh){ continue; } if(a->eoffs>0&&b->eoffs>0&& abs(a->pos[_v]+a->len+a->eoffs-b->pos[_v]-b->len-b->eoffs)>thresh){ continue; } neighbors[nneighbors++]=_lines+j; len+=b->len; } /*We require at least three lines to form a cluster, which eliminates a large number of false positives, saving considerable decoding time. This should still be sufficient for 1-pixel codes with no noise.*/ if(nneighbors<3)continue; /*The expected number of lines crossing a finder pattern is equal to their average length. We accept the cluster if size is at least 1/3 their average length (this is a very small threshold, but was needed for some test images).*/ len=((len<<1)+nneighbors)/(nneighbors<<1); if(nneighbors*(5<=len){ _clusters[nclusters].lines=neighbors; _clusters[nclusters].nlines=nneighbors; for(j=0;jnlines;j++){ qr_finder_line *l; l=c->lines[j]; if(l->boffs>0){ _edge_pts[_nedge_pts].pos[0]=l->pos[0]; _edge_pts[_nedge_pts].pos[1]=l->pos[1]; _edge_pts[_nedge_pts].pos[_v]-=l->boffs; _nedge_pts++; } if(l->eoffs>0){ _edge_pts[_nedge_pts].pos[0]=l->pos[0]; _edge_pts[_nedge_pts].pos[1]=l->pos[1]; _edge_pts[_nedge_pts].pos[_v]+=l->len+l->eoffs; _nedge_pts++; } } } return _nedge_pts; } static int qr_finder_center_cmp(const void *_a,const void *_b){ const qr_finder_center *a; const qr_finder_center *b; a=(const qr_finder_center *)_a; b=(const qr_finder_center *)_b; return ((b->nedge_pts>a->nedge_pts)-(b->nedge_ptsnedge_pts)<<2)+ ((a->pos[1]>b->pos[1])-(a->pos[1]pos[1])<<1)+ (a->pos[0]>b->pos[0])-(a->pos[0]pos[0]); } /*Determine if a horizontal line crosses a vertical line. _hline: The horizontal line. _vline: The vertical line. Return: A non-zero value if the lines cross, or zero if they do not.*/ static int qr_finder_lines_are_crossing(const qr_finder_line *_hline, const qr_finder_line *_vline){ return _hline->pos[0]<=_vline->pos[0]&&_vline->pos[0]<_hline->pos[0]+_hline->len&& _vline->pos[1]<=_hline->pos[1]&&_hline->pos[1]<_vline->pos[1]+_vline->len; } /*Finds horizontal clusters that cross corresponding vertical clusters, presumably corresponding to a finder center. _center: The buffer in which to store putative finder centers. _edge_pts: The buffer to use for the edge point lists for each finder center. _hclusters: The clusters of horizontal lines crossing finder patterns. _nhclusters: The number of horizontal line clusters. _vclusters: The clusters of vertical lines crossing finder patterns. _nvclusters: The number of vertical line clusters. Return: The number of putative finder centers.*/ static int qr_finder_find_crossings(qr_finder_center *_centers, qr_finder_edge_pt *_edge_pts,qr_finder_cluster *_hclusters,int _nhclusters, qr_finder_cluster *_vclusters,int _nvclusters){ qr_finder_cluster **hneighbors; qr_finder_cluster **vneighbors; unsigned char *hmark; unsigned char *vmark; int ncenters; int i; int j; hneighbors=(qr_finder_cluster **)malloc(_nhclusters*sizeof(*hneighbors)); vneighbors=(qr_finder_cluster **)malloc(_nvclusters*sizeof(*vneighbors)); hmark=(unsigned char *)calloc(_nhclusters,sizeof(*hmark)); vmark=(unsigned char *)calloc(_nvclusters,sizeof(*vmark)); ncenters=0; /*TODO: This may need some re-working. We should be finding groups of clusters such that _all_ horizontal lines in _all_ horizontal clusters in the group cross _all_ vertical lines in _all_ vertical clusters in the group. This is equivalent to finding the maximum bipartite clique in the connectivity graph, which requires linear progamming to solve efficiently. In principle, that is easy to do, but a realistic implementation without floating point is a lot of work (and computationally expensive). Right now we are relying on a sufficient border around the finder patterns to prevent false positives.*/ for(i=0;i<_nhclusters;i++)if(!hmark[i]){ qr_finder_line *a; qr_finder_line *b; int nvneighbors; int nedge_pts; int y; a=_hclusters[i].lines[_hclusters[i].nlines>>1]; y=nvneighbors=0; for(j=0;j<_nvclusters;j++)if(!vmark[j]){ b=_vclusters[j].lines[_vclusters[j].nlines>>1]; if(qr_finder_lines_are_crossing(a,b)){ vmark[j]=1; y+=(b->pos[1]<<1)+b->len; if(b->boffs>0&&b->eoffs>0)y+=b->eoffs-b->boffs; vneighbors[nvneighbors++]=_vclusters+j; } } if(nvneighbors>0){ qr_finder_center *c; int nhneighbors; int x; x=(a->pos[0]<<1)+a->len; if(a->boffs>0&&a->eoffs>0)x+=a->eoffs-a->boffs; hneighbors[0]=_hclusters+i; nhneighbors=1; j=nvneighbors>>1; b=vneighbors[j]->lines[vneighbors[j]->nlines>>1]; for(j=i+1;j<_nhclusters;j++)if(!hmark[j]){ a=_hclusters[j].lines[_hclusters[j].nlines>>1]; if(qr_finder_lines_are_crossing(a,b)){ hmark[j]=1; x+=(a->pos[0]<<1)+a->len; if(a->boffs>0&&a->eoffs>0)x+=a->eoffs-a->boffs; hneighbors[nhneighbors++]=_hclusters+j; } } c=_centers+ncenters++; c->pos[0]=(x+nhneighbors)/(nhneighbors<<1); c->pos[1]=(y+nvneighbors)/(nvneighbors<<1); c->edge_pts=_edge_pts; nedge_pts=qr_finder_edge_pts_fill(_edge_pts,0, hneighbors,nhneighbors,0); nedge_pts=qr_finder_edge_pts_fill(_edge_pts,nedge_pts, vneighbors,nvneighbors,1); c->nedge_pts=nedge_pts; _edge_pts+=nedge_pts; } } free(vmark); free(hmark); free(vneighbors); free(hneighbors); /*Sort the centers by decreasing numbers of edge points.*/ qsort(_centers,ncenters,sizeof(*_centers),qr_finder_center_cmp); return ncenters; } /*Locates a set of putative finder centers in the image. First we search for horizontal and vertical lines that have (dark:light:dark:light:dark) runs with size ratios of roughly (1:1:3:1:1). Then we cluster them into groups such that each subsequent pair of endpoints is close to the line before it in the cluster. This will locate many line clusters that don't cross a finder pattern, but qr_finder_find_crossings() will filter most of them out. Where horizontal and vertical clusters cross, a prospective finder center is returned. _centers: Returns a pointer to a freshly-allocated list of finder centers. This must be freed by the caller. _edge_pts: Returns a pointer to a freshly-allocated list of edge points around those centers. This must be freed by the caller. _img: The binary image to search. _width: The width of the image. _height: The height of the image. Return: The number of putative finder centers located.*/ static int qr_finder_centers_locate(qr_finder_center **_centers, qr_finder_edge_pt **_edge_pts, qr_reader *reader, int _width,int _height){ qr_finder_line *hlines = reader->finder_lines[0].lines; int nhlines = reader->finder_lines[0].nlines; qr_finder_line *vlines = reader->finder_lines[1].lines; int nvlines = reader->finder_lines[1].nlines; qr_finder_line **hneighbors; qr_finder_cluster *hclusters; int nhclusters; qr_finder_line **vneighbors; qr_finder_cluster *vclusters; int nvclusters; int ncenters; /*Cluster the detected lines.*/ hneighbors=(qr_finder_line **)malloc(nhlines*sizeof(*hneighbors)); /*We require more than one line per cluster, so there are at most nhlines/2.*/ hclusters=(qr_finder_cluster *)malloc((nhlines>>1)*sizeof(*hclusters)); nhclusters=qr_finder_cluster_lines(hclusters,hneighbors,hlines,nhlines,0); /*We need vertical lines to be sorted by X coordinate, with ties broken by Y coordinate, for clustering purposes. We scan the image in the opposite order for cache efficiency, so sort the lines we found here.*/ qsort(vlines,nvlines,sizeof(*vlines),qr_finder_vline_cmp); vneighbors=(qr_finder_line **)malloc(nvlines*sizeof(*vneighbors)); /*We require more than one line per cluster, so there are at most nvlines/2.*/ vclusters=(qr_finder_cluster *)malloc((nvlines>>1)*sizeof(*vclusters)); nvclusters=qr_finder_cluster_lines(vclusters,vneighbors,vlines,nvlines,1); /*Find line crossings among the clusters.*/ if(nhclusters>=3&&nvclusters>=3){ qr_finder_edge_pt *edge_pts; qr_finder_center *centers; int nedge_pts; int i; nedge_pts=0; for(i=0;i>1)); dround=(1<>1; if(_sxx>_syy){ _l[0]=v+dround>>dshift; _l[1]=u+w+dround>>dshift; } else{ _l[0]=u+w+dround>>dshift; _l[1]=v+dround>>dshift; } _l[2]=-(_x0*_l[0]+_y0*_l[1]); } /*Perform a least-squares line fit to a list of points. At least two points are required.*/ static void qr_line_fit_points(qr_line _l,qr_point *_p,int _np,int _res){ int sx; int sy; int xmin; int xmax; int ymin; int ymax; int xbar; int ybar; int dx; int dy; int sxx; int sxy; int syy; int sshift; int sround; int i; sx=sy=0; ymax=xmax=INT_MIN; ymin=xmin=INT_MAX; for(i=0;i<_np;i++){ sx+=_p[i][0]; xmin=QR_MINI(xmin,_p[i][0]); xmax=QR_MAXI(xmax,_p[i][0]); sy+=_p[i][1]; ymin=QR_MINI(ymin,_p[i][1]); ymax=QR_MAXI(ymax,_p[i][1]); } xbar=(sx+(_np>>1))/_np; ybar=(sy+(_np>>1))/_np; sshift=QR_MAXI(0,qr_ilog(_np*QR_MAXI(QR_MAXI(xmax-xbar,xbar-xmin), QR_MAXI(ymax-ybar,ybar-ymin)))-(QR_INT_BITS-1>>1)); sround=(1<>1; sxx=sxy=syy=0; for(i=0;i<_np;i++){ dx=_p[i][0]-xbar+sround>>sshift; dy=_p[i][1]-ybar+sround>>sshift; sxx+=dx*dx; sxy+=dx*dy; syy+=dy*dy; } qr_line_fit(_l,xbar,ybar,sxx,sxy,syy,_res); } static void qr_line_orient(qr_line _l,int _x,int _y){ if(qr_line_eval(_l,_x,_y)<0){ _l[0]=-_l[0]; _l[1]=-_l[1]; _l[2]=-_l[2]; } } static int qr_line_isect(qr_point _p,const qr_line _l0,const qr_line _l1){ int d; int x; int y; d=_l0[0]*_l1[1]-_l0[1]*_l1[0]; if(d==0)return -1; x=_l0[1]*_l1[2]-_l1[1]*_l0[2]; y=_l1[0]*_l0[2]-_l0[0]*_l1[2]; if(d<0){ x=-x; y=-y; d=-d; } _p[0]=QR_DIVROUND(x,d); _p[1]=QR_DIVROUND(y,d); return 0; } /*An affine homography. This maps from the image (at subpel resolution) to a square domain with power-of-two sides (of res bits) and back.*/ struct qr_aff{ int fwd[2][2]; int inv[2][2]; int x0; int y0; int res; int ires; }; static void qr_aff_init(qr_aff *_aff, const qr_point _p0,const qr_point _p1,const qr_point _p2,int _res){ int det; int ires; int dx1; int dy1; int dx2; int dy2; /*det is ensured to be positive by our caller.*/ dx1=_p1[0]-_p0[0]; dx2=_p2[0]-_p0[0]; dy1=_p1[1]-_p0[1]; dy2=_p2[1]-_p0[1]; det=dx1*dy2-dy1*dx2; ires=QR_MAXI((qr_ilog(abs(det))>>1)-2,0); _aff->fwd[0][0]=dx1; _aff->fwd[0][1]=dx2; _aff->fwd[1][0]=dy1; _aff->fwd[1][1]=dy2; _aff->inv[0][0]=QR_DIVROUND(dy2<<_res,det>>ires); _aff->inv[0][1]=QR_DIVROUND(-dx2<<_res,det>>ires); _aff->inv[1][0]=QR_DIVROUND(-dy1<<_res,det>>ires); _aff->inv[1][1]=QR_DIVROUND(dx1<<_res,det>>ires); _aff->x0=_p0[0]; _aff->y0=_p0[1]; _aff->res=_res; _aff->ires=ires; } /*Map from the image (at subpel resolution) into the square domain.*/ static void qr_aff_unproject(qr_point _q,const qr_aff *_aff, int _x,int _y){ _q[0]=_aff->inv[0][0]*(_x-_aff->x0)+_aff->inv[0][1]*(_y-_aff->y0) +(1<<_aff->ires>>1)>>_aff->ires; _q[1]=_aff->inv[1][0]*(_x-_aff->x0)+_aff->inv[1][1]*(_y-_aff->y0) +(1<<_aff->ires>>1)>>_aff->ires; } /*Map from the square domain into the image (at subpel resolution).*/ static void qr_aff_project(qr_point _p,const qr_aff *_aff, int _u,int _v){ _p[0]=(_aff->fwd[0][0]*_u+_aff->fwd[0][1]*_v+(1<<_aff->res-1)>>_aff->res) +_aff->x0; _p[1]=(_aff->fwd[1][0]*_u+_aff->fwd[1][1]*_v+(1<<_aff->res-1)>>_aff->res) +_aff->y0; } /*A full homography. Like the affine homography, this maps from the image (at subpel resolution) to a square domain with power-of-two sides (of res bits) and back.*/ struct qr_hom{ int fwd[3][2]; int inv[3][2]; int fwd22; int inv22; int x0; int y0; int res; }; static void qr_hom_init(qr_hom *_hom,int _x0,int _y0, int _x1,int _y1,int _x2,int _y2,int _x3,int _y3,int _res){ int dx10; int dx20; int dx30; int dx31; int dx32; int dy10; int dy20; int dy30; int dy31; int dy32; int a20; int a21; int a22; int b0; int b1; int b2; int s1; int s2; int r1; int r2; dx10=_x1-_x0; dx20=_x2-_x0; dx30=_x3-_x0; dx31=_x3-_x1; dx32=_x3-_x2; dy10=_y1-_y0; dy20=_y2-_y0; dy30=_y3-_y0; dy31=_y3-_y1; dy32=_y3-_y2; a20=dx32*dy10-dx10*dy32; a21=dx20*dy31-dx31*dy20; a22=dx32*dy31-dx31*dy32; /*Figure out if we need to downscale anything.*/ b0=qr_ilog(QR_MAXI(abs(dx10),abs(dy10)))+qr_ilog(abs(a20+a22)); b1=qr_ilog(QR_MAXI(abs(dx20),abs(dy20)))+qr_ilog(abs(a21+a22)); b2=qr_ilog(QR_MAXI(QR_MAXI(abs(a20),abs(a21)),abs(a22))); s1=QR_MAXI(0,_res+QR_MAXI(QR_MAXI(b0,b1),b2)-(QR_INT_BITS-2)); r1=(1<>1; /*Compute the final coefficients of the forward transform. The 32x32->64 bit multiplies are really needed for accuracy with large versions.*/ _hom->fwd[0][0]=QR_FIXMUL(dx10,a20+a22,r1,s1); _hom->fwd[0][1]=QR_FIXMUL(dx20,a21+a22,r1,s1); _hom->x0=_x0; _hom->fwd[1][0]=QR_FIXMUL(dy10,a20+a22,r1,s1); _hom->fwd[1][1]=QR_FIXMUL(dy20,a21+a22,r1,s1); _hom->y0=_y0; _hom->fwd[2][0]=a20+r1>>s1; _hom->fwd[2][1]=a21+r1>>s1; _hom->fwd22=s1>_res?a22+(r1>>_res)>>s1-_res:a22<<_res-s1; /*Now compute the inverse transform.*/ b0=qr_ilog(QR_MAXI(QR_MAXI(abs(dx10),abs(dx20)),abs(dx30)))+ qr_ilog(QR_MAXI(abs(_hom->fwd[0][0]),abs(_hom->fwd[1][0]))); b1=qr_ilog(QR_MAXI(QR_MAXI(abs(dy10),abs(dy20)),abs(dy30)))+ qr_ilog(QR_MAXI(abs(_hom->fwd[0][1]),abs(_hom->fwd[1][1]))); b2=qr_ilog(abs(a22))-s1; s2=QR_MAXI(0,QR_MAXI(b0,b1)+b2-(QR_INT_BITS-3)); r2=(1<>1; s1+=s2; r1<<=s2; /*The 32x32->64 bit multiplies are really needed for accuracy with large versions.*/ _hom->inv[0][0]=QR_FIXMUL(_hom->fwd[1][1],a22,r1,s1); _hom->inv[0][1]=QR_FIXMUL(-_hom->fwd[0][1],a22,r1,s1); _hom->inv[1][0]=QR_FIXMUL(-_hom->fwd[1][0],a22,r1,s1); _hom->inv[1][1]=QR_FIXMUL(_hom->fwd[0][0],a22,r1,s1); _hom->inv[2][0]=QR_FIXMUL(_hom->fwd[1][0],_hom->fwd[2][1], -QR_EXTMUL(_hom->fwd[1][1],_hom->fwd[2][0],r2),s2); _hom->inv[2][1]=QR_FIXMUL(_hom->fwd[0][1],_hom->fwd[2][0], -QR_EXTMUL(_hom->fwd[0][0],_hom->fwd[2][1],r2),s2); _hom->inv22=QR_FIXMUL(_hom->fwd[0][0],_hom->fwd[1][1], -QR_EXTMUL(_hom->fwd[0][1],_hom->fwd[1][0],r2),s2); _hom->res=_res; } /*Map from the image (at subpel resolution) into the square domain. Returns a negative value if the point went to infinity.*/ static int qr_hom_unproject(qr_point _q,const qr_hom *_hom,int _x,int _y){ int x; int y; int w; _x-=_hom->x0; _y-=_hom->y0; x=_hom->inv[0][0]*_x+_hom->inv[0][1]*_y; y=_hom->inv[1][0]*_x+_hom->inv[1][1]*_y; w=_hom->inv[2][0]*_x+_hom->inv[2][1]*_y +_hom->inv22+(1<<_hom->res-1)>>_hom->res; if(w==0){ _q[0]=x<0?INT_MIN:INT_MAX; _q[1]=y<0?INT_MIN:INT_MAX; return -1; } else{ if(w<0){ x=-x; y=-y; w=-w; } _q[0]=QR_DIVROUND(x,w); _q[1]=QR_DIVROUND(y,w); } return 0; } /*Finish a partial projection, converting from homogeneous coordinates to the normal 2-D representation. In loops, we can avoid many multiplies by computing the homogeneous _x, _y, and _w incrementally, but we cannot avoid the divisions, done here.*/ static void qr_hom_fproject(qr_point _p,const qr_hom *_hom, int _x,int _y,int _w){ if(_w==0){ _p[0]=_x<0?INT_MIN:INT_MAX; _p[1]=_y<0?INT_MIN:INT_MAX; } else{ if(_w<0){ _x=-_x; _y=-_y; _w=-_w; } _p[0]=QR_DIVROUND(_x,_w)+_hom->x0; _p[1]=QR_DIVROUND(_y,_w)+_hom->y0; } } #if defined(QR_DEBUG) /*Map from the square domain into the image (at subpel resolution). Currently only used directly by debug code.*/ static void qr_hom_project(qr_point _p,const qr_hom *_hom, int _u,int _v){ qr_hom_fproject(_p,_hom, _hom->fwd[0][0]*_u+_hom->fwd[0][1]*_v, _hom->fwd[1][0]*_u+_hom->fwd[1][1]*_v, _hom->fwd[2][0]*_u+_hom->fwd[2][1]*_v+_hom->fwd22); } #endif /*All the information we've collected about a finder pattern in the current configuration.*/ struct qr_finder{ /*The module size along each axis (in the square domain).*/ int size[2]; /*The version estimated from the module size along each axis.*/ int eversion[2]; /*The list of classified edge points for each edge.*/ qr_finder_edge_pt *edge_pts[4]; /*The number of edge points classified as belonging to each edge.*/ int nedge_pts[4]; /*The number of inliers found after running RANSAC on each edge.*/ int ninliers[4]; /*The center of the finder pattern (in the square domain).*/ qr_point o; /*The finder center information from the original image.*/ qr_finder_center *c; }; static int qr_cmp_edge_pt(const void *_a,const void *_b){ const qr_finder_edge_pt *a; const qr_finder_edge_pt *b; a=(const qr_finder_edge_pt *)_a; b=(const qr_finder_edge_pt *)_b; return ((a->edge>b->edge)-(a->edgeedge)<<1)+ (a->extent>b->extent)-(a->extentextent); } /*Computes the index of the edge each edge point belongs to, and its (signed) distance along the corresponding axis from the center of the finder pattern (in the square domain). The resulting list of edge points is sorted by edge index, with ties broken by extent.*/ static void qr_finder_edge_pts_aff_classify(qr_finder *_f,const qr_aff *_aff){ qr_finder_center *c; int i; int e; c=_f->c; for(e=0;e<4;e++)_f->nedge_pts[e]=0; for(i=0;inedge_pts;i++){ qr_point q; int d; qr_aff_unproject(q,_aff,c->edge_pts[i].pos[0],c->edge_pts[i].pos[1]); qr_point_translate(q,-_f->o[0],-_f->o[1]); d=abs(q[1])>abs(q[0]); e=d<<1|(q[d]>=0); _f->nedge_pts[e]++; c->edge_pts[i].edge=e; c->edge_pts[i].extent=q[d]; } qsort(c->edge_pts,c->nedge_pts,sizeof(*c->edge_pts),qr_cmp_edge_pt); _f->edge_pts[0]=c->edge_pts; for(e=1;e<4;e++)_f->edge_pts[e]=_f->edge_pts[e-1]+_f->nedge_pts[e-1]; } /*Computes the index of the edge each edge point belongs to, and its (signed) distance along the corresponding axis from the center of the finder pattern (in the square domain). The resulting list of edge points is sorted by edge index, with ties broken by extent.*/ static void qr_finder_edge_pts_hom_classify(qr_finder *_f,const qr_hom *_hom){ qr_finder_center *c; int i; int e; c=_f->c; for(e=0;e<4;e++)_f->nedge_pts[e]=0; for(i=0;inedge_pts;i++){ qr_point q; int d; if(qr_hom_unproject(q,_hom, c->edge_pts[i].pos[0],c->edge_pts[i].pos[1])>=0){ qr_point_translate(q,-_f->o[0],-_f->o[1]); d=abs(q[1])>abs(q[0]); e=d<<1|(q[d]>=0); _f->nedge_pts[e]++; c->edge_pts[i].edge=e; c->edge_pts[i].extent=q[d]; } else{ c->edge_pts[i].edge=4; c->edge_pts[i].extent=q[0]; } } qsort(c->edge_pts,c->nedge_pts,sizeof(*c->edge_pts),qr_cmp_edge_pt); _f->edge_pts[0]=c->edge_pts; for(e=1;e<4;e++)_f->edge_pts[e]=_f->edge_pts[e-1]+_f->nedge_pts[e-1]; } /*TODO: Perhaps these thresholds should be on the module size instead? Unfortunately, I'd need real-world images of codes with larger versions to see if these thresholds are still effective, but such versions aren't used often.*/ /*The amount that the estimated version numbers are allowed to differ from the real version number and still be considered valid.*/ #define QR_SMALL_VERSION_SLACK (1) /*Since cell phone cameras can have severe radial distortion, the estimated version for larger versions can be off by larger amounts.*/ #define QR_LARGE_VERSION_SLACK (3) /*Estimates the size of a module after classifying the edge points. _width: The distance between UL and UR in the square domain. _height: The distance between UL and DL in the square domain.*/ static int qr_finder_estimate_module_size_and_version(qr_finder *_f, int _width,int _height){ qr_point offs; int sums[4]; int nsums[4]; int usize; int nusize; int vsize; int nvsize; int uversion; int vversion; int e; offs[0]=offs[1]=0; for(e=0;e<4;e++)if(_f->nedge_pts[e]>0){ qr_finder_edge_pt *edge_pts; int sum; int mean; int n; int i; /*Average the samples for this edge, dropping the top and bottom 25%.*/ edge_pts=_f->edge_pts[e]; n=_f->nedge_pts[e]; sum=0; for(i=(n>>2);i>2);i++)sum+=edge_pts[i].extent; n=n-((n>>2)<<1); mean=QR_DIVROUND(sum,n); offs[e>>1]+=mean; sums[e]=sum; nsums[e]=n; } else nsums[e]=sums[e]=0; /*If we have samples on both sides of an axis, refine our idea of where the unprojected finder center is located.*/ if(_f->nedge_pts[0]>0&&_f->nedge_pts[1]>0){ _f->o[0]-=offs[0]>>1; sums[0]-=offs[0]*nsums[0]>>1; sums[1]-=offs[0]*nsums[1]>>1; } if(_f->nedge_pts[2]>0&&_f->nedge_pts[3]>0){ _f->o[1]-=offs[1]>>1; sums[2]-=offs[1]*nsums[2]>>1; sums[3]-=offs[1]*nsums[3]>>1; } /*We must have _some_ samples along each axis... if we don't, our transform must be pretty severely distorting the original square (e.g., with coordinates so large as to cause overflow).*/ nusize=nsums[0]+nsums[1]; if(nusize<=0)return -1; /*The module size is 1/3 the average edge extent.*/ nusize*=3; usize=sums[1]-sums[0]; usize=((usize<<1)+nusize)/(nusize<<1); if(usize<=0)return -1; /*Now estimate the version directly from the module size and the distance between the finder patterns. This is done independently using the extents along each axis. If either falls significantly outside the valid range (1 to 40), reject the configuration.*/ uversion=(_width-8*usize)/(usize<<2); if(uversion<1||uversion>40+QR_LARGE_VERSION_SLACK)return -1; /*Now do the same for the other axis.*/ nvsize=nsums[2]+nsums[3]; if(nvsize<=0)return -1; nvsize*=3; vsize=sums[3]-sums[2]; vsize=((vsize<<1)+nvsize)/(nvsize<<1); if(vsize<=0)return -1; vversion=(_height-8*vsize)/(vsize<<2); if(vversion<1||vversion>40+QR_LARGE_VERSION_SLACK)return -1; /*If the estimated version using extents along one axis is significantly different than the estimated version along the other axis, then the axes have significantly different scalings (relative to the grid). This can happen, e.g., when we have multiple adjacent QR codes, and we've picked two finder patterns from one and the third finder pattern from another, e.g.: X---DL UL---X |.... |.... X.... UR.... Such a configuration might even pass any other geometric checks if we didn't reject it here.*/ if(abs(uversion-vversion)>QR_LARGE_VERSION_SLACK)return -1; _f->size[0]=usize; _f->size[1]=vsize; /*We intentionally do not compute an average version from the sizes along both axes. In the presence of projective distortion, one of them will be much more accurate than the other.*/ _f->eversion[0]=uversion; _f->eversion[1]=vversion; return 0; } /*Eliminate outliers from the classified edge points with RANSAC.*/ static void qr_finder_ransac(qr_finder *_f,const qr_aff *_hom, isaac_ctx *_isaac,int _e){ qr_finder_edge_pt *edge_pts; int best_ninliers; int n; edge_pts=_f->edge_pts[_e]; n=_f->nedge_pts[_e]; best_ninliers=0; if(n>1){ int max_iters; int i; int j; /*17 iterations is enough to guarantee an outlier-free sample with more than 99% probability given as many as 50% outliers.*/ max_iters=17; for(i=0;i=p0i)p1i++; p0=edge_pts[p0i].pos; p1=edge_pts[p1i].pos; /*If the corresponding line is not within 45 degrees of the proper orientation in the square domain, reject it outright. This can happen, e.g., when highly skewed orientations cause points to be misclassified into the wrong edge. The irony is that using such points might produce a line which _does_ pass the corresponding validity checks.*/ qr_aff_unproject(q0,_hom,p0[0],p0[1]); qr_aff_unproject(q1,_hom,p1[0],p1[1]); qr_point_translate(q0,-_f->o[0],-_f->o[1]); qr_point_translate(q1,-_f->o[0],-_f->o[1]); if(abs(q0[_e>>1]-q1[_e>>1])>abs(q0[1-(_e>>1)]-q1[1-(_e>>1)]))continue; /*Identify the other edge points which are inliers. The squared distance should be distributed as a \Chi^2 distribution with one degree of freedom, which means for a 95% confidence the point should lie within a factor 3.8414588 ~= 4 times the expected variance of the point locations. We grossly approximate the standard deviation as 1 pixel in one direction, and 0.5 pixels in the other (because we average two coordinates).*/ thresh=qr_isqrt(qr_point_distance2(p0,p1)<<2*QR_FINDER_SUBPREC+1); ninliers=0; for(j=0;jbest_ninliers){ for(j=0;jn>>1)max_iters=(67*n-63*ninliers-1)/(n<<1); } } /*Now collect all the inliers at the beginning of the list.*/ for(i=j=0;jninliers[_e]=best_ninliers; } /*Perform a least-squares line fit to an edge of a finder pattern using the inliers found by RANSAC.*/ static int qr_line_fit_finder_edge(qr_line _l, const qr_finder *_f,int _e,int _res){ qr_finder_edge_pt *edge_pts; qr_point *pts; int npts; int i; npts=_f->ninliers[_e]; if(npts<2)return -1; /*We could write a custom version of qr_line_fit_points that accesses edge_pts directly, but this saves on code size and doesn't measurably slow things down.*/ pts=(qr_point *)malloc(npts*sizeof(*pts)); edge_pts=_f->edge_pts[_e]; for(i=0;ic->pos[0],_f->c->pos[1]); free(pts); return 0; } /*Perform a least-squares line fit to a pair of common finder edges using the inliers found by RANSAC. Unlike a normal edge fit, we guarantee that this one succeeds by creating at least one point on each edge using the estimated module size if it has no inliers.*/ static void qr_line_fit_finder_pair(qr_line _l,const qr_aff *_aff, const qr_finder *_f0,const qr_finder *_f1,int _e){ qr_point *pts; int npts; qr_finder_edge_pt *edge_pts; qr_point q; int n0; int n1; int i; n0=_f0->ninliers[_e]; n1=_f1->ninliers[_e]; /*We could write a custom version of qr_line_fit_points that accesses edge_pts directly, but this saves on code size and doesn't measurably slow things down.*/ npts=QR_MAXI(n0,1)+QR_MAXI(n1,1); pts=(qr_point *)malloc(npts*sizeof(*pts)); if(n0>0){ edge_pts=_f0->edge_pts[_e]; for(i=0;io[0]; q[1]=_f0->o[1]; q[_e>>1]+=_f0->size[_e>>1]*(2*(_e&1)-1); qr_aff_project(pts[0],_aff,q[0],q[1]); n0++; } if(n1>0){ edge_pts=_f1->edge_pts[_e]; for(i=0;io[0]; q[1]=_f1->o[1]; q[_e>>1]+=_f1->size[_e>>1]*(2*(_e&1)-1); qr_aff_project(pts[n0],_aff,q[0],q[1]); n1++; } qr_line_fit_points(_l,pts,npts,_aff->res); /*Make sure at least one finder center lies in the positive halfspace.*/ qr_line_orient(_l,_f0->c->pos[0],_f0->c->pos[1]); free(pts); } static int qr_finder_quick_crossing_check(const unsigned char *_img, int _width,int _height,int _x0,int _y0,int _x1,int _y1,int _v){ /*The points must be inside the image, and have a !_v:_v:!_v pattern. We don't scan the whole line initially, but quickly reject if the endpoints aren't !_v, or the midpoint isn't _v. If either end point is out of the image, or we don't encounter a _v pixel, we return a negative value, indicating the region should be considered empty. Otherwise, we return a positive value to indicate it is non-empty.*/ if(_x0<0||_x0>=_width||_y0<0||_y0>=_height|| _x1<0||_x1>=_width||_y1<0||_y1>=_height){ return -1; } if((!_img[_y0*_width+_x0])!=_v||(!_img[_y1*_width+_x1])!=_v)return 1; if((!_img[(_y0+_y1>>1)*_width+(_x0+_x1>>1)])==_v)return -1; return 0; } /*Locate the midpoint of a _v segment along a !_v:_v:!_v line from (_x0,_y0) to (_x1,_y1). All coordinates, which are NOT in subpel resolution, must lie inside the image, and the endpoints are already assumed to have the value !_v. The returned value is in subpel resolution.*/ static int qr_finder_locate_crossing(const unsigned char *_img, int _width,int _height,int _x0,int _y0,int _x1,int _y1,int _v,qr_point _p){ qr_point x0; qr_point x1; qr_point dx; int step[2]; int steep; int err; int derr; /*Use Bresenham's algorithm to trace along the line and find the exact transitions from !_v to _v and back.*/ x0[0]=_x0; x0[1]=_y0; x1[0]=_x1; x1[1]=_y1; dx[0]=abs(_x1-_x0); dx[1]=abs(_y1-_y0); steep=dx[1]>dx[0]; err=0; derr=dx[1-steep]; step[0]=((_x0<_x1)<<1)-1; step[1]=((_y0<_y1)<<1)-1; /*Find the first crossing from !_v to _v.*/ for(;;){ /*If we make it all the way to the other side, there's no crossing.*/ if(x0[steep]==x1[steep])return -1; x0[steep]+=step[steep]; err+=derr; if(err<<1>dx[steep]){ x0[1-steep]+=step[1-steep]; err-=dx[steep]; } if((!_img[x0[1]*_width+x0[0]])!=_v)break; } /*Find the last crossing from _v to !_v.*/ err=0; for(;;){ if(x0[steep]==x1[steep])break; x1[steep]-=step[steep]; err+=derr; if(err<<1>dx[steep]){ x1[1-steep]-=step[1-steep]; err-=dx[steep]; } if((!_img[x1[1]*_width+x1[0]])!=_v)break; } /*Return the midpoint of the _v segment.*/ _p[0]=(x0[0]+x1[0]+1<>1; _p[1]=(x0[1]+x1[1]+1<>1; return 0; } static int qr_aff_line_step(const qr_aff *_aff,qr_line _l, int _v,int _du,int *_dv){ int shift; int round; int dv; int n; int d; n=_aff->fwd[0][_v]*_l[0]+_aff->fwd[1][_v]*_l[1]; d=_aff->fwd[0][1-_v]*_l[0]+_aff->fwd[1][1-_v]*_l[1]; if(d<0){ n=-n; d=-d; } shift=QR_MAXI(0,qr_ilog(_du)+qr_ilog(abs(n))+3-QR_INT_BITS); round=(1<>1; n=n+round>>shift; d=d+round>>shift; /*The line should not be outside 45 degrees of horizontal/vertical. TODO: We impose this restriction to help ensure the loop below terminates, but it should not technically be required. It also, however, ensures we avoid division by zero.*/ if(abs(n)>=d)return -1; n=-_du*n; dv=QR_DIVROUND(n,d); if(abs(dv)>=_du)return -1; *_dv=dv; return 0; } /*Computes the Hamming distance between two bit patterns (the number of bits that differ). May stop counting after _maxdiff differences.*/ static int qr_hamming_dist(unsigned _y1,unsigned _y2,int _maxdiff){ unsigned y; int ret; y=_y1^_y2; for(ret=0;ret<_maxdiff&&y;ret++)y&=y-1; return ret; } /*Retrieve a bit (guaranteed to be 0 or 1) from the image, given coordinates in subpel resolution which have not been bounds checked.*/ static int qr_img_get_bit(const unsigned char *_img,int _width,int _height, int _x,int _y){ _x>>=QR_FINDER_SUBPREC; _y>>=QR_FINDER_SUBPREC; return _img[QR_CLAMPI(0,_y,_height-1)*_width+QR_CLAMPI(0,_x,_width-1)]!=0; } #if defined(QR_DEBUG) #include "image.h" static void qr_finder_dump_aff_undistorted(qr_finder *_ul,qr_finder *_ur, qr_finder *_dl,qr_aff *_aff,const unsigned char *_img,int _width,int _height){ unsigned char *gimg; FILE *fout; int lpsz; int pixel_size; int dim; int min; int max; int u; int y; int i; int j; lpsz=qr_ilog(_ur->size[0]+_ur->size[1]+_dl->size[0]+_dl->size[1])-6; pixel_size=1<res-lpsz)+128; gimg=(unsigned char *)malloc(dim*dim*sizeof(*gimg)); for(i=0;i>QR_FINDER_SUBPREC,_height-1)*_width+ QR_CLAMPI(0,p[0]>>QR_FINDER_SUBPREC,_width-1)]; } { min=(_ur->o[0]-7*_ur->size[0]>>lpsz)+64; if(min<0)min=0; max=(_ur->o[0]+7*_ur->size[0]>>lpsz)+64; if(max>dim)max=dim; for(y=-7;y<=7;y++){ i=(_ur->o[1]+y*_ur->size[1]>>lpsz)+64; if(i<0||i>=dim)continue; for(j=min;jo[1]-7*_ur->size[1]>>lpsz)+64; if(min<0)min=0; max=(_ur->o[1]+7*_ur->size[1]>>lpsz)+64; if(max>dim)max=dim; for(u=-7;u<=7;u++){ j=(_ur->o[0]+u*_ur->size[0]>>lpsz)+64; if(j<0||j>=dim)continue; for(i=min;io[0]-7*_dl->size[0]>>lpsz)+64; if(min<0)min=0; max=(_dl->o[0]+7*_dl->size[0]>>lpsz)+64; if(max>dim)max=dim; for(y=-7;y<=7;y++){ i=(_dl->o[1]+y*_dl->size[1]>>lpsz)+64; if(i<0||i>=dim)continue; for(j=min;jo[1]-7*_dl->size[1]>>lpsz)+64; if(min<0)min=0; max=(_dl->o[1]+7*_dl->size[1]>>lpsz)+64; if(max>dim)max=dim; for(u=-7;u<=7;u++){ j=(_dl->o[0]+u*_dl->size[0]>>lpsz)+64; if(j<0||j>=dim)continue; for(i=min;isize[0]+_ur->size[1]+_dl->size[0]+_dl->size[1])-6; pixel_size=1<res-lpsz)+256; gimg=(unsigned char *)malloc(dim*dim*sizeof(*gimg)); for(i=0;i>QR_FINDER_SUBPREC,_height-1)*_width+ QR_CLAMPI(0,p[0]>>QR_FINDER_SUBPREC,_width-1)]; } { min=(_ur->o[0]-7*_ur->size[0]>>lpsz)+128; if(min<0)min=0; max=(_ur->o[0]+7*_ur->size[0]>>lpsz)+128; if(max>dim)max=dim; for(v=-7;v<=7;v++){ i=(_ur->o[1]+v*_ur->size[1]>>lpsz)+128; if(i<0||i>=dim)continue; for(j=min;jo[1]-7*_ur->size[1]>>lpsz)+128; if(min<0)min=0; max=(_ur->o[1]+7*_ur->size[1]>>lpsz)+128; if(max>dim)max=dim; for(u=-7;u<=7;u++){ j=(_ur->o[0]+u*_ur->size[0]>>lpsz)+128; if(j<0||j>=dim)continue; for(i=min;io[0]-7*_dl->size[0]>>lpsz)+128; if(min<0)min=0; max=(_dl->o[0]+7*_dl->size[0]>>lpsz)+128; if(max>dim)max=dim; for(v=-7;v<=7;v++){ i=(_dl->o[1]+v*_dl->size[1]>>lpsz)+128; if(i<0||i>=dim)continue; for(j=min;jo[1]-7*_dl->size[1]>>lpsz)+128; if(min<0)min=0; max=(_dl->o[1]+7*_dl->size[1]>>lpsz)+128; if(max>dim)max=dim; for(u=-7;u<=7;u++){ j=(_dl->o[0]+u*_dl->size[0]>>lpsz)+128; if(j<0||j>=dim)continue; for(i=min;i>1; /*Compute the final coefficients of the forward transform.*/ a00=QR_FIXMUL(dx10,a20+a22,round,shift); a01=QR_FIXMUL(dx20,a21+a22,round,shift); a10=QR_FIXMUL(dy10,a20+a22,round,shift); a11=QR_FIXMUL(dy20,a21+a22,round,shift); /*And compose the two transforms. Since we inverted the coefficients above, we divide by them here instead of multiplying. This lets us take advantage of the full dynamic range. Note a zero divisor is really "infinity", and thus the quotient should also be zero.*/ _cell->fwd[0][0]=(i00?QR_DIVROUND(a00,i00):0)+(i10?QR_DIVROUND(a01,i10):0); _cell->fwd[0][1]=(i01?QR_DIVROUND(a00,i01):0)+(i11?QR_DIVROUND(a01,i11):0); _cell->fwd[1][0]=(i00?QR_DIVROUND(a10,i00):0)+(i10?QR_DIVROUND(a11,i10):0); _cell->fwd[1][1]=(i01?QR_DIVROUND(a10,i01):0)+(i11?QR_DIVROUND(a11,i11):0); _cell->fwd[2][0]=(i00?QR_DIVROUND(a20,i00):0)+(i10?QR_DIVROUND(a21,i10):0) +(i20?QR_DIVROUND(a22,i20):0)+round>>shift; _cell->fwd[2][1]=(i01?QR_DIVROUND(a20,i01):0)+(i11?QR_DIVROUND(a21,i11):0) +(i21?QR_DIVROUND(a22,i21):0)+round>>shift; _cell->fwd[2][2]=a22+round>>shift; /*Mathematically, a02 and a12 are exactly zero. However, that concentrates all of the rounding error in the (_u3,_v3) corner; we compute offsets which distribute it over the whole range.*/ x=_cell->fwd[0][0]*du10+_cell->fwd[0][1]*dv10; y=_cell->fwd[1][0]*du10+_cell->fwd[1][1]*dv10; w=_cell->fwd[2][0]*du10+_cell->fwd[2][1]*dv10+_cell->fwd[2][2]; a02=dx10*w-x; a12=dy10*w-y; x=_cell->fwd[0][0]*du20+_cell->fwd[0][1]*dv20; y=_cell->fwd[1][0]*du20+_cell->fwd[1][1]*dv20; w=_cell->fwd[2][0]*du20+_cell->fwd[2][1]*dv20+_cell->fwd[2][2]; a02+=dx20*w-x; a12+=dy20*w-y; x=_cell->fwd[0][0]*du30+_cell->fwd[0][1]*dv30; y=_cell->fwd[1][0]*du30+_cell->fwd[1][1]*dv30; w=_cell->fwd[2][0]*du30+_cell->fwd[2][1]*dv30+_cell->fwd[2][2]; a02+=dx30*w-x; a12+=dy30*w-y; _cell->fwd[0][2]=a02+2>>2; _cell->fwd[1][2]=a12+2>>2; _cell->x0=_x0; _cell->y0=_y0; _cell->u0=_u0; _cell->v0=_v0; } /*Finish a partial projection, converting from homogeneous coordinates to the normal 2-D representation. In loops, we can avoid many multiplies by computing the homogeneous _x, _y, and _w incrementally, but we cannot avoid the divisions, done here.*/ static void qr_hom_cell_fproject(qr_point _p,const qr_hom_cell *_cell, int _x,int _y,int _w){ if(_w==0){ _p[0]=_x<0?INT_MIN:INT_MAX; _p[1]=_y<0?INT_MIN:INT_MAX; } else{ if(_w<0){ _x=-_x; _y=-_y; _w=-_w; } _p[0]=QR_DIVROUND(_x,_w)+_cell->x0; _p[1]=QR_DIVROUND(_y,_w)+_cell->y0; } } static void qr_hom_cell_project(qr_point _p,const qr_hom_cell *_cell, int _u,int _v,int _res){ _u-=_cell->u0<<_res; _v-=_cell->v0<<_res; qr_hom_cell_fproject(_p,_cell, _cell->fwd[0][0]*_u+_cell->fwd[0][1]*_v+(_cell->fwd[0][2]<<_res), _cell->fwd[1][0]*_u+_cell->fwd[1][1]*_v+(_cell->fwd[1][2]<<_res), _cell->fwd[2][0]*_u+_cell->fwd[2][1]*_v+(_cell->fwd[2][2]<<_res)); } /*Retrieves the bits corresponding to the alignment pattern template centered at the given location in the original image (at subpel precision).*/ static unsigned qr_alignment_pattern_fetch(qr_point _p[5][5],int _x0,int _y0, const unsigned char *_img,int _width,int _height){ unsigned v; int i; int j; int k; int dx; int dy; dx=_x0-_p[2][2][0]; dy=_y0-_p[2][2][1]; v=0; for(k=i=0;i<5;i++)for(j=0;j<5;j++,k++){ v|=qr_img_get_bit(_img,_width,_height,_p[i][j][0]+dx,_p[i][j][1]+dy)<u0; v=(_v-2)-_cell->v0; x0=_cell->fwd[0][0]*u+_cell->fwd[0][1]*v+_cell->fwd[0][2]; y0=_cell->fwd[1][0]*u+_cell->fwd[1][1]*v+_cell->fwd[1][2]; w0=_cell->fwd[2][0]*u+_cell->fwd[2][1]*v+_cell->fwd[2][2]; dxdu=_cell->fwd[0][0]; dydu=_cell->fwd[1][0]; dwdu=_cell->fwd[2][0]; dxdv=_cell->fwd[0][1]; dydv=_cell->fwd[1][1]; dwdv=_cell->fwd[2][1]; for(i=0;i<5;i++){ x=x0; y=y0; w=w0; for(j=0;j<5;j++){ qr_hom_cell_fproject(p[i][j],_cell,x,y,w); x+=dxdu; y+=dydu; w+=dwdu; } x0+=dxdv; y0+=dydv; w0+=dwdv; } bestx=p[2][2][0]; besty=p[2][2][1]; best_match=qr_alignment_pattern_fetch(p,bestx,besty,_img,_width,_height); best_dist=qr_hamming_dist(best_match,0x1F8D63F,25); if(best_dist>0){ u=_u-_cell->u0; v=_v-_cell->v0; x=_cell->fwd[0][0]*u+_cell->fwd[0][1]*v+_cell->fwd[0][2]<fwd[1][0]*u+_cell->fwd[1][1]*v+_cell->fwd[1][2]<fwd[2][0]*u+_cell->fwd[2][1]*v+_cell->fwd[2][2]<=side_len; x+=_cell->fwd[0][dir]; y+=_cell->fwd[1][dir]; w+=_cell->fwd[2][dir]; } else{ dir=j>=3*side_len; x-=_cell->fwd[0][dir]; y-=_cell->fwd[1][dir]; w-=_cell->fwd[2][dir]; } if(!best_dist)break; } if(!best_dist)break; } } /*If the best result we got was sufficiently bad, reject the match. If we're wrong and we include it, we can grossly distort the nearby region, whereas using the initial starting point should at least be consistent with the geometry we already have.*/ if(best_dist>6){ _p[0]=p[2][2][0]; _p[1]=p[2][2][1]; return -1; } /*Now try to get a more accurate location of the pattern center.*/ dx=bestx-p[2][2][0]; dy=besty-p[2][2][1]; memset(nc,0,sizeof(nc)); memset(c,0,sizeof(c)); /*We consider 8 lines across the finder pattern in turn. If we actually found a symmetric pattern along that line, search for its exact center in the image. There are plenty more lines we could use if these don't work, but if we've found anything remotely close to an alignment pattern, we should be able to use most of these.*/ for(i=0;i<8;i++){ static const unsigned MASK_TESTS[8][2]={ {0x1040041,0x1000001},{0x0041040,0x0001000}, {0x0110110,0x0100010},{0x0011100,0x0001000}, {0x0420084,0x0400004},{0x0021080,0x0001000}, {0x0006C00,0x0004400},{0x0003800,0x0001000}, }; static const unsigned char MASK_COORDS[8][2]={ {0,0},{1,1},{4,0},{3,1},{2,0},{2,1},{0,2},{1,2} }; if((best_match&MASK_TESTS[i][0])==MASK_TESTS[i][1]){ int x0; int y0; int x1; int y1; x0=p[MASK_COORDS[i][1]][MASK_COORDS[i][0]][0]+dx>>QR_FINDER_SUBPREC; if(x0<0||x0>=_width)continue; y0=p[MASK_COORDS[i][1]][MASK_COORDS[i][0]][1]+dy>>QR_FINDER_SUBPREC; if(y0<0||y0>=_height)continue; x1=p[4-MASK_COORDS[i][1]][4-MASK_COORDS[i][0]][0]+dx>>QR_FINDER_SUBPREC; if(x1<0||x1>=_width)continue; y1=p[4-MASK_COORDS[i][1]][4-MASK_COORDS[i][0]][1]+dy>>QR_FINDER_SUBPREC; if(y1<0||y1>=_height)continue; if(!qr_finder_locate_crossing(_img,_width,_height,x0,y0,x1,y1,i&1,pc)){ int w; int cx; int cy; cx=pc[0]-bestx; cy=pc[1]-besty; if(i&1){ /*Weight crossings around the center dot more highly, as they are generally more reliable.*/ w=3; cx+=cx<<1; cy+=cy<<1; } else w=1; nc[i>>1]+=w; c[i>>1][0]+=cx; c[i>>1][1]+=cy; } } } /*Sum offsets from lines in orthogonal directions.*/ for(i=0;i<2;i++){ int a; int b; a=nc[i<<1]; b=nc[i<<1|1]; if(a&&b){ int w; w=QR_MAXI(a,b); c[i<<1][0]=QR_DIVROUND(w*(b*c[i<<1][0]+a*c[i<<1|1][0]),a*b); c[i<<1][1]=QR_DIVROUND(w*(b*c[i<<1][1]+a*c[i<<1|1][1]),a*b); nc[i<<1]=w<<1; } else{ c[i<<1][0]+=c[i<<1|1][0]; c[i<<1][1]+=c[i<<1|1][1]; nc[i<<1]+=b; } } /*Average offsets from pairs of orthogonal lines.*/ c[0][0]+=c[2][0]; c[0][1]+=c[2][1]; nc[0]+=nc[2]; /*If we actually found any such lines, apply the adjustment.*/ if(nc[0]){ dx=QR_DIVROUND(c[0][0],nc[0]); dy=QR_DIVROUND(c[0][1],nc[0]); /*But only if it doesn't make things too much worse.*/ match=qr_alignment_pattern_fetch(p,bestx+dx,besty+dy,_img,_width,_height); dist=qr_hamming_dist(match,0x1F8D63F,best_dist+1); if(dist<=best_dist+1){ bestx+=dx; besty+=dy; } } _p[0]=bestx; _p[1]=besty; return 0; } static int qr_hom_fit(qr_hom *_hom,qr_finder *_ul,qr_finder *_ur, qr_finder *_dl,qr_point _p[4],const qr_aff *_aff,isaac_ctx *_isaac, const unsigned char *_img,int _width,int _height){ qr_point *b; int nb; int cb; qr_point *r; int nr; int cr; qr_line l[4]; qr_point q; qr_point p; int ox; int oy; int ru; int rv; int dru; int drv; int bu; int bv; int dbu; int dbv; int rx; int ry; int drxi; int dryi; int drxj; int dryj; int rdone; int nrempty; int rlastfit; int bx; int by; int dbxi; int dbyi; int dbxj; int dbyj; int bdone; int nbempty; int blastfit; int shift; int round; int version4; int brx; int bry; int i; /*We attempt to correct large-scale perspective distortion by fitting lines to the edge of the code area. We could also look for an alignment pattern now, but that wouldn't work for version 1 codes, which have no alignment pattern. Even if the code is supposed to have one, there's go guarantee we'd find it intact.*/ /*Fitting lines is easy for the edges on which we have two finder patterns. After the fit, UL is guaranteed to be on the proper side, but if either of the other two finder patterns aren't, something is wrong.*/ qr_finder_ransac(_ul,_aff,_isaac,0); qr_finder_ransac(_dl,_aff,_isaac,0); qr_line_fit_finder_pair(l[0],_aff,_ul,_dl,0); if(qr_line_eval(l[0],_dl->c->pos[0],_dl->c->pos[1])<0|| qr_line_eval(l[0],_ur->c->pos[0],_ur->c->pos[1])<0){ return -1; } qr_finder_ransac(_ul,_aff,_isaac,2); qr_finder_ransac(_ur,_aff,_isaac,2); qr_line_fit_finder_pair(l[2],_aff,_ul,_ur,2); if(qr_line_eval(l[2],_dl->c->pos[0],_dl->c->pos[1])<0|| qr_line_eval(l[2],_ur->c->pos[0],_ur->c->pos[1])<0){ return -1; } /*The edges which only have one finder pattern are more difficult. We start by fitting a line to the edge of the one finder pattern we do have. This can fail due to an insufficient number of sample points, and even if it succeeds can be fairly inaccurate, because all of the points are clustered in one corner of the QR code. If it fails, we just use an axis-aligned line in the affine coordinate system. Then we walk along the edge of the entire code, looking for light:dark:light patterns perpendicular to the edge. Wherever we find one, we take the center of the dark portion as an additional sample point. At the end, we re-fit the line using all such sample points found.*/ drv=_ur->size[1]>>1; qr_finder_ransac(_ur,_aff,_isaac,1); if(qr_line_fit_finder_edge(l[1],_ur,1,_aff->res)>=0){ if(qr_line_eval(l[1],_ul->c->pos[0],_ul->c->pos[1])<0|| qr_line_eval(l[1],_dl->c->pos[0],_dl->c->pos[1])<0){ return -1; } /*Figure out the change in ru for a given change in rv when stepping along the fitted line.*/ if(qr_aff_line_step(_aff,l[1],1,drv,&dru)<0)return -1; } else dru=0; ru=_ur->o[0]+3*_ur->size[0]-2*dru; rv=_ur->o[1]-2*drv; dbu=_dl->size[0]>>1; qr_finder_ransac(_dl,_aff,_isaac,3); if(qr_line_fit_finder_edge(l[3],_dl,3,_aff->res)>=0){ if(qr_line_eval(l[3],_ul->c->pos[0],_ul->c->pos[1])<0|| qr_line_eval(l[3],_ur->c->pos[0],_ur->c->pos[1])<0){ return -1; } /*Figure out the change in bv for a given change in bu when stepping along the fitted line.*/ if(qr_aff_line_step(_aff,l[3],0,dbu,&dbv)<0)return -1; } else dbv=0; bu=_dl->o[0]-2*dbu; bv=_dl->o[1]+3*_dl->size[1]-2*dbv; /*Set up the initial point lists.*/ nr=rlastfit=_ur->ninliers[1]; cr=nr+(_dl->o[1]-rv+drv-1)/drv; r=(qr_point *)malloc(cr*sizeof(*r)); for(i=0;i<_ur->ninliers[1];i++){ memcpy(r[i],_ur->edge_pts[1][i].pos,sizeof(r[i])); } nb=blastfit=_dl->ninliers[3]; cb=nb+(_ur->o[0]-bu+dbu-1)/dbu; b=(qr_point *)malloc(cb*sizeof(*b)); for(i=0;i<_dl->ninliers[3];i++){ memcpy(b[i],_dl->edge_pts[3][i].pos,sizeof(b[i])); } /*Set up the step parameters for the affine projection.*/ ox=(_aff->x0<<_aff->res)+(1<<_aff->res-1); oy=(_aff->y0<<_aff->res)+(1<<_aff->res-1); rx=_aff->fwd[0][0]*ru+_aff->fwd[0][1]*rv+ox; ry=_aff->fwd[1][0]*ru+_aff->fwd[1][1]*rv+oy; drxi=_aff->fwd[0][0]*dru+_aff->fwd[0][1]*drv; dryi=_aff->fwd[1][0]*dru+_aff->fwd[1][1]*drv; drxj=_aff->fwd[0][0]*_ur->size[0]; dryj=_aff->fwd[1][0]*_ur->size[0]; bx=_aff->fwd[0][0]*bu+_aff->fwd[0][1]*bv+ox; by=_aff->fwd[1][0]*bu+_aff->fwd[1][1]*bv+oy; dbxi=_aff->fwd[0][0]*dbu+_aff->fwd[0][1]*dbv; dbyi=_aff->fwd[1][0]*dbu+_aff->fwd[1][1]*dbv; dbxj=_aff->fwd[0][1]*_dl->size[1]; dbyj=_aff->fwd[1][1]*_dl->size[1]; /*Now step along the lines, looking for new sample points.*/ nrempty=nbempty=0; for(;;){ int ret; int x0; int y0; int x1; int y1; /*If we take too many steps without encountering a non-zero pixel, assume we have wandered off the edge and stop looking before we hit the other side of the quiet region. Otherwise, stop when the lines cross (if they do so inside the affine region) or come close to crossing (outside the affine region). TODO: We don't have any way of detecting when we've wandered into the code interior; we could stop if the outside sample ever shows up dark, but this could happen because of noise in the quiet region, too.*/ rdone=rv>=QR_MINI(bv,_dl->o[1]+bv>>1)||nrempty>14; bdone=bu>=QR_MINI(ru,_ur->o[0]+ru>>1)||nbempty>14; if(!rdone&&(bdone||rv>_aff->res+QR_FINDER_SUBPREC; y0=ry+dryj>>_aff->res+QR_FINDER_SUBPREC; x1=rx-drxj>>_aff->res+QR_FINDER_SUBPREC; y1=ry-dryj>>_aff->res+QR_FINDER_SUBPREC; if(nr>=cr){ cr=cr<<1|1; r=(qr_point *)realloc(r,cr*sizeof(*r)); } ret=qr_finder_quick_crossing_check(_img,_width,_height,x0,y0,x1,y1,1); if(!ret){ ret=qr_finder_locate_crossing(_img,_width,_height,x0,y0,x1,y1,1,r[nr]); } if(ret>=0){ if(!ret){ qr_aff_unproject(q,_aff,r[nr][0],r[nr][1]); /*Move the current point halfway towards the crossing. We don't move the whole way to give us some robustness to noise.*/ ru=ru+q[0]>>1; /*But ensure that rv monotonically increases.*/ if(q[1]+drv>rv)rv=rv+q[1]>>1; rx=_aff->fwd[0][0]*ru+_aff->fwd[0][1]*rv+ox; ry=_aff->fwd[1][0]*ru+_aff->fwd[1][1]*rv+oy; nr++; /*Re-fit the line to update the step direction periodically.*/ if(nr>QR_MAXI(1,rlastfit+(rlastfit>>2))){ qr_line_fit_points(l[1],r,nr,_aff->res); if(qr_aff_line_step(_aff,l[1],1,drv,&dru)>=0){ drxi=_aff->fwd[0][0]*dru+_aff->fwd[0][1]*drv; dryi=_aff->fwd[1][0]*dru+_aff->fwd[1][1]*drv; } rlastfit=nr; } } nrempty=0; } else nrempty++; ru+=dru; /*Our final defense: if we overflow, stop.*/ if(rv+drv>rv)rv+=drv; else nrempty=INT_MAX; rx+=drxi; ry+=dryi; } else if(!bdone){ x0=bx+dbxj>>_aff->res+QR_FINDER_SUBPREC; y0=by+dbyj>>_aff->res+QR_FINDER_SUBPREC; x1=bx-dbxj>>_aff->res+QR_FINDER_SUBPREC; y1=by-dbyj>>_aff->res+QR_FINDER_SUBPREC; if(nb>=cb){ cb=cb<<1|1; b=(qr_point *)realloc(b,cb*sizeof(*b)); } ret=qr_finder_quick_crossing_check(_img,_width,_height,x0,y0,x1,y1,1); if(!ret){ ret=qr_finder_locate_crossing(_img,_width,_height,x0,y0,x1,y1,1,b[nb]); } if(ret>=0){ if(!ret){ qr_aff_unproject(q,_aff,b[nb][0],b[nb][1]); /*Move the current point halfway towards the crossing. We don't move the whole way to give us some robustness to noise.*/ /*But ensure that bu monotonically increases.*/ if(q[0]+dbu>bu)bu=bu+q[0]>>1; bv=bv+q[1]>>1; bx=_aff->fwd[0][0]*bu+_aff->fwd[0][1]*bv+ox; by=_aff->fwd[1][0]*bu+_aff->fwd[1][1]*bv+oy; nb++; /*Re-fit the line to update the step direction periodically.*/ if(nb>QR_MAXI(1,blastfit+(blastfit>>2))){ qr_line_fit_points(l[3],b,nb,_aff->res); if(qr_aff_line_step(_aff,l[3],0,dbu,&dbv)>=0){ dbxi=_aff->fwd[0][0]*dbu+_aff->fwd[0][1]*dbv; dbyi=_aff->fwd[1][0]*dbu+_aff->fwd[1][1]*dbv; } blastfit=nb; } } nbempty=0; } else nbempty++; /*Our final defense: if we overflow, stop.*/ if(bu+dbu>bu)bu+=dbu; else nbempty=INT_MAX; bv+=dbv; bx+=dbxi; by+=dbyi; } else break; } /*Fit the new lines. If we _still_ don't have enough sample points, then just use an axis-aligned line from the affine coordinate system (e.g., one parallel to the opposite edge in the image).*/ if(nr>1)qr_line_fit_points(l[1],r,nr,_aff->res); else{ qr_aff_project(p,_aff,_ur->o[0]+3*_ur->size[0],_ur->o[1]); shift=QR_MAXI(0, qr_ilog(QR_MAXI(abs(_aff->fwd[0][1]),abs(_aff->fwd[1][1]))) -(_aff->res+1>>1)); round=(1<>1; l[1][0]=_aff->fwd[1][1]+round>>shift; l[1][1]=-_aff->fwd[0][1]+round>>shift; l[1][2]=-(l[1][0]*p[0]+l[1][1]*p[1]); } free(r); if(nb>1)qr_line_fit_points(l[3],b,nb,_aff->res); else{ qr_aff_project(p,_aff,_dl->o[0],_dl->o[1]+3*_dl->size[1]); shift=QR_MAXI(0, qr_ilog(QR_MAXI(abs(_aff->fwd[0][1]),abs(_aff->fwd[1][1]))) -(_aff->res+1>>1)); round=(1<>1; l[3][0]=_aff->fwd[1][0]+round>>shift; l[3][1]=-_aff->fwd[0][0]+round>>shift; l[3][2]=-(l[1][0]*p[0]+l[1][1]*p[1]); } free(b); for(i=0;i<4;i++){ if(qr_line_isect(_p[i],l[i&1],l[2+(i>>1)])<0)return -1; /*It's plausible for points to be somewhat outside the image, but too far and too much of the pattern will be gone for it to be decodable.*/ if(_p[i][0]<-_width<=_width<=_height<eversion[0]+_ul->eversion[1]+_ur->eversion[0]+_dl->eversion[1]; if(version4>4){ qr_hom_cell cell; qr_point p3; int dim; dim=17+version4; qr_hom_cell_init(&cell,0,0,dim-1,0,0,dim-1,dim-1,dim-1, _p[0][0],_p[0][1],_p[1][0],_p[1][1], _p[2][0],_p[2][1],_p[3][0],_p[3][1]); if(qr_alignment_pattern_search(p3,&cell,dim-7,dim-7,4, _img,_width,_height)>=0){ long long w; long long mask; int c21; int dx21; int dy21; /*There's no real need to update the bounding box corner, and in fact we actively perform worse if we do. Clearly it was good enough for us to find this alignment pattern, so it should be good enough to use for grid initialization. The point of doing the search was to get more accurate version estimates and a better chance of decoding the version and format info. This is particularly important for small versions that have no encoded version info, since any mismatch in version renders the code undecodable.*/ /*We do, however, need four points in a square to initialize our homography, so project the point from the alignment center to the corner of the code area.*/ c21=_p[2][0]*_p[1][1]-_p[2][1]*_p[1][0]; dx21=_p[2][0]-_p[1][0]; dy21=_p[2][1]-_p[1][1]; w=QR_EXTMUL(dim-7,c21, QR_EXTMUL(dim-13,_p[0][0]*dy21-_p[0][1]*dx21, QR_EXTMUL(6,p3[0]*dy21-p3[1]*dx21,0))); /*The projection failed: invalid geometry.*/ if(w==0)return -1; mask=QR_SIGNMASK(w); w=w+mask^mask; brx=(int)QR_DIVROUND(QR_EXTMUL((dim-7)*_p[0][0],p3[0]*dy21, QR_EXTMUL((dim-13)*p3[0],c21-_p[0][1]*dx21, QR_EXTMUL(6*_p[0][0],c21-p3[1]*dx21,0)))+mask^mask,w); bry=(int)QR_DIVROUND(QR_EXTMUL((dim-7)*_p[0][1],-p3[1]*dx21, QR_EXTMUL((dim-13)*p3[1],c21+_p[0][0]*dy21, QR_EXTMUL(6*_p[0][1],c21+p3[0]*dy21,0)))+mask^mask,w); } } /*Now we have four points that map to a square: initialize the projection.*/ qr_hom_init(_hom,_p[0][0],_p[0][1],_p[1][0],_p[1][1], _p[2][0],_p[2][1],brx,bry,QR_HOM_BITS); return 0; } /*The BCH(18,6,3) codes are only used for version information, which must lie between 7 and 40 (inclusive).*/ static const unsigned BCH18_6_CODES[34]={ 0x07C94, 0x085BC,0x09A99,0x0A4D3,0x0BBF6,0x0C762,0x0D847,0x0E60D,0x0F928, 0x10B78,0x1145D,0x12A17,0x13532,0x149A6,0x15683,0x168C9,0x177EC, 0x18EC4,0x191E1,0x1AFAB,0x1B08E,0x1CC1A,0x1D33F,0x1ED75,0x1F250, 0x209D5,0x216F0,0x228BA,0x2379F,0x24B0B,0x2542E,0x26A64,0x27541, 0x28C69 }; /*Corrects a BCH(18,6,3) code word. _y: Contains the code word to be checked on input, and the corrected value on output. Return: The number of errors. If more than 3 errors are detected, returns a negative value and performs no correction.*/ static int bch18_6_correct(unsigned *_y){ unsigned x; unsigned y; int nerrs; y=*_y; /*Check the easy case first: see if the data bits were uncorrupted.*/ x=y>>12; if(x>=7&&x<=40){ nerrs=qr_hamming_dist(y,BCH18_6_CODES[x-7],4); if(nerrs<4){ *_y=BCH18_6_CODES[x-7]; return nerrs; } } /*Exhaustive search is faster than field operations in GF(19).*/ for(x=0;x<34;x++)if(x+7!=y>>12){ nerrs=qr_hamming_dist(y,BCH18_6_CODES[x],4); if(nerrs<4){ *_y=BCH18_6_CODES[x]; return nerrs; } } return -1; } #if 0 static unsigned bch18_6_encode(unsigned _x){ return (-(_x&1)&0x01F25)^(-(_x>>1&1)&0x0216F)^(-(_x>>2&1)&0x042DE)^ (-(_x>>3&1)&0x085BC)^(-(_x>>4&1)&0x10B78)^(-(_x>>5&1)&0x209D5); } #endif /*Reads the version bits near a finder module and decodes the version number.*/ static int qr_finder_version_decode(qr_finder *_f,const qr_hom *_hom, const unsigned char *_img,int _width,int _height,int _dir){ qr_point q; unsigned v; int x0; int y0; int w0; int dxi; int dyi; int dwi; int dxj; int dyj; int dwj; int ret; int i; int j; int k; v=0; q[_dir]=_f->o[_dir]-7*_f->size[_dir]; q[1-_dir]=_f->o[1-_dir]-3*_f->size[1-_dir]; x0=_hom->fwd[0][0]*q[0]+_hom->fwd[0][1]*q[1]; y0=_hom->fwd[1][0]*q[0]+_hom->fwd[1][1]*q[1]; w0=_hom->fwd[2][0]*q[0]+_hom->fwd[2][1]*q[1]+_hom->fwd22; dxi=_hom->fwd[0][1-_dir]*_f->size[1-_dir]; dyi=_hom->fwd[1][1-_dir]*_f->size[1-_dir]; dwi=_hom->fwd[2][1-_dir]*_f->size[1-_dir]; dxj=_hom->fwd[0][_dir]*_f->size[_dir]; dyj=_hom->fwd[1][_dir]*_f->size[_dir]; dwj=_hom->fwd[2][_dir]*_f->size[_dir]; for(k=i=0;i<6;i++){ int x; int y; int w; x=x0; y=y0; w=w0; for(j=0;j<3;j++,k++){ qr_point p; qr_hom_fproject(p,_hom,x,y,w); v|=qr_img_get_bit(_img,_width,_height,p[0],p[1])<o[_dir]+_f->size[_dir]*(-5-i); for(j=0;j<6;j++,k++){ qr_point q; p[1-_dir]=_f->o[1-_dir]+_f->size[1-_dir]*(2-j); qr_hom_project(q,_hom,p[0],p[1]); v|=qr_img_get_bit(_img,_width,_height,q[0],q[1])<=0?(int)(v>>12):ret; } /*Reads the format info bits near the finder modules and decodes them.*/ static int qr_finder_fmt_info_decode(qr_finder *_ul,qr_finder *_ur, qr_finder *_dl,const qr_hom *_hom, const unsigned char *_img,int _width,int _height){ qr_point p; unsigned lo[2]; unsigned hi[2]; int u; int v; int x; int y; int w; int dx; int dy; int dw; int fmt_info[4]; int count[4]; int nerrs[4]; int nfmt_info; int besti; int imax; int di; int i; int k; /*Read the bits around the UL corner.*/ lo[0]=0; u=_ul->o[0]+5*_ul->size[0]; v=_ul->o[1]-3*_ul->size[1]; x=_hom->fwd[0][0]*u+_hom->fwd[0][1]*v; y=_hom->fwd[1][0]*u+_hom->fwd[1][1]*v; w=_hom->fwd[2][0]*u+_hom->fwd[2][1]*v+_hom->fwd22; dx=_hom->fwd[0][1]*_ul->size[1]; dy=_hom->fwd[1][1]*_ul->size[1]; dw=_hom->fwd[2][1]*_ul->size[1]; for(k=i=0;;i++){ /*Skip the timing pattern row.*/ if(i!=6){ qr_hom_fproject(p,_hom,x,y,w); lo[0]|=qr_img_get_bit(_img,_width,_height,p[0],p[1])<=8)break; } x+=dx; y+=dy; w+=dw; } hi[0]=0; dx=-_hom->fwd[0][0]*_ul->size[0]; dy=-_hom->fwd[1][0]*_ul->size[0]; dw=-_hom->fwd[2][0]*_ul->size[0]; while(i-->0){ x+=dx; y+=dy; w+=dw; /*Skip the timing pattern column.*/ if(i!=6){ qr_hom_fproject(p,_hom,x,y,w); hi[0]|=qr_img_get_bit(_img,_width,_height,p[0],p[1])<o[0]+3*_ur->size[0]; v=_ur->o[1]+5*_ur->size[1]; x=_hom->fwd[0][0]*u+_hom->fwd[0][1]*v; y=_hom->fwd[1][0]*u+_hom->fwd[1][1]*v; w=_hom->fwd[2][0]*u+_hom->fwd[2][1]*v+_hom->fwd22; dx=-_hom->fwd[0][0]*_ur->size[0]; dy=-_hom->fwd[1][0]*_ur->size[0]; dw=-_hom->fwd[2][0]*_ur->size[0]; for(k=0;k<8;k++){ qr_hom_fproject(p,_hom,x,y,w); lo[1]|=qr_img_get_bit(_img,_width,_height,p[0],p[1])<o[0]+5*_dl->size[0]; v=_dl->o[1]-3*_dl->size[1]; x=_hom->fwd[0][0]*u+_hom->fwd[0][1]*v; y=_hom->fwd[1][0]*u+_hom->fwd[1][1]*v; w=_hom->fwd[2][0]*u+_hom->fwd[2][1]*v+_hom->fwd22; dx=_hom->fwd[0][1]*_dl->size[1]; dy=_hom->fwd[1][1]*_dl->size[1]; dw=_hom->fwd[2][1]*_dl->size[1]; for(k=8;k<15;k++){ qr_hom_fproject(p,_hom,x,y,w); hi[1]|=qr_img_get_bit(_img,_width,_height,p[0],p[1])<>1])^0x5412; ret=bch15_5_correct(&v); v>>=10; if(ret<0)ret=4; for(j=0;;j++){ if(j>=nfmt_info){ fmt_info[j]=v; count[j]=1; nerrs[j]=ret; nfmt_info++; break; } if(fmt_info[j]==(int)v){ count[j]++; if(ret3&&nerrs[i]<=3|| count[i]>count[besti]||count[i]==count[besti]&&nerrs[i]>QR_INT_LOGBITS; /*Note that we store bits column-wise, since that's how they're read out of the grid.*/ for(j=_u;j<_u+_w;j++)for(i=_v;i<_v+_h;i++){ _grid->fpmask[j*stride+(i>>QR_INT_LOGBITS)]|=1<<(i&QR_INT_BITS-1); } } /*Determine if a given grid location is inside the function pattern.*/ static int qr_sampling_grid_is_in_fp(const qr_sampling_grid *_grid,int _dim, int _u,int _v){ return _grid->fpmask[_u*(_dim+QR_INT_BITS-1>>QR_INT_LOGBITS) +(_v>>QR_INT_LOGBITS)]>>(_v&QR_INT_BITS-1)&1; } /*The spacing between alignment patterns after the second for versions >= 7. We could compact this more, but the code to access it would eliminate the gains.*/ static const unsigned char QR_ALIGNMENT_SPACING[34]={ 16,18,20,22,24,26,28, 20,22,24,24,26,28,28, 22,24,24,26,26,28,28, 24,24,26,26,26,28,28, 24,26,26,26,28,28 }; static inline void qr_svg_points(const char *cls, qr_point *p, int n) { int i; svg_path_start(cls, 1, 0, 0); for(i = 0; i < n; i++, p++) svg_path_moveto(SVG_ABS, p[0][0], p[0][1]); svg_path_end(); } /*Initialize the sampling grid for each region of the code. _version: The (decoded) version number. _ul_pos: The location of the UL finder pattern. _ur_pos: The location of the UR finder pattern. _dl_pos: The location of the DL finder pattern. _p: On input, contains estimated positions of the four corner modules. On output, contains a bounding quadrilateral for the code. _img: The binary input image. _width: The width of the input image. _height: The height of the input image. Return: 0 on success, or a negative value on error.*/ static void qr_sampling_grid_init(qr_sampling_grid *_grid,int _version, const qr_point _ul_pos,const qr_point _ur_pos,const qr_point _dl_pos, qr_point _p[4],const unsigned char *_img,int _width,int _height){ qr_hom_cell base_cell; int align_pos[7]; int dim; int nalign; int i; dim=17+(_version<<2); nalign=(_version/7)+2; /*Create a base cell to bootstrap the alignment pattern search.*/ qr_hom_cell_init(&base_cell,0,0,dim-1,0,0,dim-1,dim-1,dim-1, _p[0][0],_p[0][1],_p[1][0],_p[1][1],_p[2][0],_p[2][1],_p[3][0],_p[3][1]); /*Allocate the array of cells.*/ _grid->ncells=nalign-1; _grid->cells[0]=(qr_hom_cell *)malloc( (nalign-1)*(nalign-1)*sizeof(*_grid->cells[0])); for(i=1;i<_grid->ncells;i++)_grid->cells[i]=_grid->cells[i-1]+_grid->ncells; /*Initialize the function pattern mask.*/ _grid->fpmask=(unsigned *)calloc(dim, (dim+QR_INT_BITS-1>>QR_INT_LOGBITS)*sizeof(*_grid->fpmask)); /*Mask out the finder patterns (and separators and format info bits).*/ qr_sampling_grid_fp_mask_rect(_grid,dim,0,0,9,9); qr_sampling_grid_fp_mask_rect(_grid,dim,0,dim-8,9,8); qr_sampling_grid_fp_mask_rect(_grid,dim,dim-8,0,8,9); /*Mask out the version number bits.*/ if(_version>6){ qr_sampling_grid_fp_mask_rect(_grid,dim,0,dim-11,6,3); qr_sampling_grid_fp_mask_rect(_grid,dim,dim-11,0,3,6); } /*Mask out the timing patterns.*/ qr_sampling_grid_fp_mask_rect(_grid,dim,9,6,dim-17,1); qr_sampling_grid_fp_mask_rect(_grid,dim,6,9,1,dim-17); /*If we have no alignment patterns (e.g., this is a version 1 code), just use the base cell and hope it's good enough.*/ if(_version<2)memcpy(_grid->cells[0],&base_cell,sizeof(base_cell)); else{ qr_point *q; qr_point *p; int j; int k; q=(qr_point *)malloc(nalign*nalign*sizeof(*q)); p=(qr_point *)malloc(nalign*nalign*sizeof(*p)); /*Initialize the alignment pattern position list.*/ align_pos[0]=6; align_pos[nalign-1]=dim-7; if(_version>6){ int d; d=QR_ALIGNMENT_SPACING[_version-7]; for(i=nalign-1;i-->1;)align_pos[i]=align_pos[i+1]-d; } /*Three of the corners use a finder pattern instead of a separate alignment pattern.*/ q[0][0]=3; q[0][1]=3; p[0][0]=_ul_pos[0]; p[0][1]=_ul_pos[1]; q[nalign-1][0]=dim-4; q[nalign-1][1]=3; p[nalign-1][0]=_ur_pos[0]; p[nalign-1][1]=_ur_pos[1]; q[(nalign-1)*nalign][0]=3; q[(nalign-1)*nalign][1]=dim-4; p[(nalign-1)*nalign][0]=_dl_pos[0]; p[(nalign-1)*nalign][1]=_dl_pos[1]; /*Scan for alignment patterns using a diagonal sweep.*/ for(k=1;k<2*nalign-1;k++){ int jmin; int jmax; jmax=QR_MINI(k,nalign-1)-(k==nalign-1); jmin=QR_MAXI(0,k-(nalign-1))+(k==nalign-1); for(j=jmin;j<=jmax;j++){ qr_hom_cell *cell; int u; int v; int k; i=jmax-(j-jmin); k=i*nalign+j; u=align_pos[j]; v=align_pos[i]; q[k][0]=u; q[k][1]=v; /*Mask out the alignment pattern.*/ qr_sampling_grid_fp_mask_rect(_grid,dim,u-2,v-2,5,5); /*Pick a cell to use to govern the alignment pattern search.*/ if(i>1&&j>1){ qr_point p0; qr_point p1; qr_point p2; /*Each predictor is basically a straight-line extrapolation from two neighboring alignment patterns (except possibly near the opposing finder patterns).*/ qr_hom_cell_project(p0,_grid->cells[i-2]+j-1,u,v,0); qr_hom_cell_project(p1,_grid->cells[i-2]+j-2,u,v,0); qr_hom_cell_project(p2,_grid->cells[i-1]+j-2,u,v,0); /*Take the median of the predictions as the search center.*/ QR_SORT2I(p0[0],p1[0]); QR_SORT2I(p0[1],p1[1]); QR_SORT2I(p1[0],p2[0]); QR_SORT2I(p1[1],p2[1]); QR_SORT2I(p0[0],p1[0]); QR_SORT2I(p0[1],p1[1]); /*We need a cell that has the target point at a known (u,v) location. Since our cells don't have inverses, just construct one from our neighboring points.*/ cell=_grid->cells[i-1]+j-1; qr_hom_cell_init(cell, q[k-nalign-1][0],q[k-nalign-1][1],q[k-nalign][0],q[k-nalign][1], q[k-1][0],q[k-1][1],q[k][0],q[k][1], p[k-nalign-1][0],p[k-nalign-1][1],p[k-nalign][0],p[k-nalign][1], p[k-1][0],p[k-1][1],p1[0],p1[1]); } else if(i>1&&j>0)cell=_grid->cells[i-2]+j-1; else if(i>0&&j>1)cell=_grid->cells[i-1]+j-2; else cell=&base_cell; /*Use a very small search radius. A large displacement here usually means a false positive (e.g., when the real alignment pattern is damaged or missing), which can severely distort the projection.*/ qr_alignment_pattern_search(p[k],cell,u,v,2,_img,_width,_height); if(i>0&&j>0){ qr_hom_cell_init(_grid->cells[i-1]+j-1, q[k-nalign-1][0],q[k-nalign-1][1],q[k-nalign][0],q[k-nalign][1], q[k-1][0],q[k-1][1],q[k][0],q[k][1], p[k-nalign-1][0],p[k-nalign-1][1],p[k-nalign][0],p[k-nalign][1], p[k-1][0],p[k-1][1],p[k][0],p[k][1]); } } } qr_svg_points("align", p, nalign * nalign); free(q); free(p); } /*Set the limits over which each cell is used.*/ memcpy(_grid->cell_limits,align_pos+1, (_grid->ncells-1)*sizeof(*_grid->cell_limits)); _grid->cell_limits[_grid->ncells-1]=dim; /*Produce a bounding square for the code (to mark finder centers with). Because of non-linear distortion, this might not actually bound the code, but it should be good enough. I don't think it's worth computing a convex hull or anything silly like that.*/ qr_hom_cell_project(_p[0],_grid->cells[0]+0,-1,-1,1); qr_hom_cell_project(_p[1],_grid->cells[0]+_grid->ncells-1,(dim<<1)-1,-1,1); qr_hom_cell_project(_p[2],_grid->cells[_grid->ncells-1]+0,-1,(dim<<1)-1,1); qr_hom_cell_project(_p[3],_grid->cells[_grid->ncells-1]+_grid->ncells-1, (dim<<1)-1,(dim<<1)-1,1); /*Clamp the points somewhere near the image (this is really just in case a corner is near the plane at infinity).*/ for(i=0;i<4;i++){ _p[i][0]=QR_CLAMPI(-_width<fpmask); free(_grid->cells[0]); } #if defined(QR_DEBUG) static void qr_sampling_grid_dump(qr_sampling_grid *_grid,int _version, const unsigned char *_img,int _width,int _height){ unsigned char *gimg; FILE *fout; int dim; int u; int v; int x; int y; int w; int i; int j; int r; int s; dim=17+(_version<<2)+8<=(4<=(4<>QR_ALIGN_SUBPREC)-4; v=(i>>QR_ALIGN_SUBPREC)-4; for(r=0;r<_grid->ncells-1;r++)if(u<_grid->cell_limits[r])break; for(s=0;s<_grid->ncells-1;s++)if(v<_grid->cell_limits[s])break; cell=_grid->cells[s]+r; u=j-(cell->u0+4<v0+4<fwd[0][0]*u+cell->fwd[0][1]*v+(cell->fwd[0][2]<fwd[1][0]*u+cell->fwd[1][1]*v+(cell->fwd[1][2]<fwd[2][0]*u+cell->fwd[2][1]*v+(cell->fwd[2][2]<>QR_FINDER_SUBPREC,_height-1)*_width+ QR_CLAMPI(0,p[0]>>QR_FINDER_SUBPREC,_width-1)]; } } for(v=0;v<17+(_version<<2);v++)for(u=0;u<17+(_version<<2);u++){ if(qr_sampling_grid_is_in_fp(_grid,17+(_version<<2),u,v)){ j=u+4<>QR_INT_LOGBITS; /*Note that we store bits column-wise, since that's how they're read out of the grid.*/ switch(_pattern){ /*10101010 i+j+1&1 01010101 10101010 01010101*/ case 0:{ int m; m=0x55; for(j=0;j<_dim;j++){ memset(_mask+j*stride,m,stride*sizeof(*_mask)); m^=0xFF; } }break; /*11111111 i+1&1 00000000 11111111 00000000*/ case 1:memset(_mask,0x55,_dim*stride*sizeof(*_mask));break; /*10010010 (j+1)%3&1 10010010 10010010 10010010*/ case 2:{ unsigned m; m=0xFF; for(j=0;j<_dim;j++){ memset(_mask+j*stride,m&0xFF,stride*sizeof(*_mask)); m=m<<8|m>>16; } }break; /*10010010 (i+j+1)%3&1 00100100 01001001 10010010*/ case 3:{ unsigned mi; unsigned mj; mj=0; for(i=0;i<(QR_INT_BITS+2)/3;i++)mj|=1<<3*i; for(j=0;j<_dim;j++){ mi=mj; for(i=0;i>QR_INT_BITS%3|mi<<3-QR_INT_BITS%3; } mj=mj>>1|mj<<2; } }break; /*11100011 (i>>1)+(j/3)+1&1 11100011 00011100 00011100*/ case 4:{ unsigned m; m=7; for(j=0;j<_dim;j++){ memset(_mask+j*stride,(0xCC^-(m&1))&0xFF,stride*sizeof(*_mask)); m=m>>1|m<<5; } }break; /*11111111 !((i*j)%6) 10000010 10010010 10101010*/ case 5:{ for(j=0;j<_dim;j++){ unsigned m; m=0; for(i=0;i<6;i++)m|=!((i*j)%6)<>QR_INT_BITS%6|m<<6-QR_INT_BITS%6; } } }break; /*11111111 (i*j)%3+i*j+1&1 11100011 11011011 10101010*/ case 6:{ for(j=0;j<_dim;j++){ unsigned m; m=0; for(i=0;i<6;i++)m|=((i*j)%3+i*j+1&1)<>QR_INT_BITS%6|m<<6-QR_INT_BITS%6; } } }break; /*10101010 (i*j)%3+i+j+1&1 00011100 10001110 01010101*/ default:{ for(j=0;j<_dim;j++){ unsigned m; m=0; for(i=0;i<6;i++)m|=((i*j)%3+i+j+1&1)<>QR_INT_BITS%6|m<<6-QR_INT_BITS%6; } } }break; } } static void qr_sampling_grid_sample(const qr_sampling_grid *_grid, unsigned *_data_bits,int _dim,int _fmt_info, const unsigned char *_img,int _width,int _height){ int stride; int u0; int u1; int j; /*We initialize the buffer with the data mask and XOR bits into it as we read them out of the image instead of unmasking in a separate step.*/ qr_data_mask_fill(_data_bits,_dim,_fmt_info&7); stride=_dim+QR_INT_BITS-1>>QR_INT_LOGBITS; u0=0; svg_path_start("sampling-grid", 1, 0, 0); /*We read data cell-by-cell to avoid having to constantly change which projection we're using as we read each bit. This (and the position-dependent data mask) is the reason we buffer the bits we read instead of converting them directly to codewords here. Note that bits are stored column-wise, since that's how we'll scan them.*/ for(j=0;j<_grid->ncells;j++){ int i; int v0; int v1; u1=_grid->cell_limits[j]; v0=0; for(i=0;i<_grid->ncells;i++){ qr_hom_cell *cell; int x0; int y0; int w0; int u; int du; int dv; v1=_grid->cell_limits[i]; cell=_grid->cells[i]+j; du=u0-cell->u0; dv=v0-cell->v0; x0=cell->fwd[0][0]*du+cell->fwd[0][1]*dv+cell->fwd[0][2]; y0=cell->fwd[1][0]*du+cell->fwd[1][1]*dv+cell->fwd[1][2]; w0=cell->fwd[2][0]*du+cell->fwd[2][1]*dv+cell->fwd[2][2]; for(u=u0;u>QR_INT_LOGBITS)]^= qr_img_get_bit(_img,_width,_height,p[0],p[1])<<(v&QR_INT_BITS-1); svg_path_moveto(SVG_ABS, p[0], p[1]); } x+=cell->fwd[0][1]; y+=cell->fwd[1][1]; w+=cell->fwd[2][1]; } x0+=cell->fwd[0][0]; y0+=cell->fwd[1][0]; w0+=cell->fwd[2][0]; } v0=v1; } u0=u1; } svg_path_end(); } /*Arranges the sample bits read by qr_sampling_grid_sample() into bytes and groups those bytes into Reed-Solomon blocks. The individual block pointers are destroyed by this routine.*/ static void qr_samples_unpack(unsigned char **_blocks,int _nblocks, int _nshort_data,int _nshort_blocks,const unsigned *_data_bits, const unsigned *_fp_mask,int _dim){ unsigned bits; int biti; int stride; int blocki; int blockj; int i; int j; stride=_dim+QR_INT_BITS-1>>QR_INT_LOGBITS; /*If _all_ the blocks are short, don't skip anything (see below).*/ if(_nshort_blocks>=_nblocks)_nshort_blocks=0; /*Scan columns in pairs from right to left.*/ bits=0; for(blocki=blockj=biti=0,j=_dim-1;j>0;j-=2){ unsigned data1; unsigned data2; unsigned fp_mask1; unsigned fp_mask2; int nbits; int l; /*Scan up a pair of columns.*/ nbits=(_dim-1&QR_INT_BITS-1)+1; l=j*stride; for(i=stride;i-->0;){ data1=_data_bits[l+i]; fp_mask1=_fp_mask[l+i]; data2=_data_bits[l+i-stride]; fp_mask2=_fp_mask[l+i-stride]; while(nbits-->0){ /*Pull a bit from the right column.*/ if(!(fp_mask1>>nbits&1)){ bits=bits<<1|data1>>nbits&1; biti++; } /*Pull a bit from the left column.*/ if(!(fp_mask2>>nbits&1)){ bits=bits<<1|data2>>nbits&1; biti++; } /*If we finished a byte, drop it in a block.*/ if(biti>=8){ biti-=8; *_blocks[blocki++]++=(unsigned char)(bits>>biti); /*For whatever reason, the long blocks are at the _end_ of the list, instead of the beginning. Even worse, the extra bytes they get come at the end of the data bytes, before the parity bytes. Hence the logic here: when we've filled up the data portion of the short blocks, skip directly to the long blocks for the next byte. It's also the reason we increment _blocks[blocki] on each store, instead of just indexing with blockj (after this iteration the number of bytes in each block differs).*/ if(blocki>=_nblocks)blocki=++blockj==_nshort_data?_nshort_blocks:0; } } nbits=QR_INT_BITS; } j-=2; /*Skip the column with the vertical timing pattern.*/ if(j==6)j--; /*Scan down a pair of columns.*/ l=j*stride; for(i=0;i0){ /*Pull a bit from the right column.*/ if(!(fp_mask1&1)){ bits=bits<<1|data1&1; biti++; } data1>>=1; fp_mask1>>=1; /*Pull a bit from the left column.*/ if(!(fp_mask2&1)){ bits=bits<<1|data2&1; biti++; } data2>>=1; fp_mask2>>=1; /*If we finished a byte, drop it in a block.*/ if(biti>=8){ biti-=8; *_blocks[blocki++]++=(unsigned char)(bits>>biti); /*See comments on the "up" loop for the reason behind this mess.*/ if(blocki>=_nblocks)blocki=++blockj==_nshort_data?_nshort_blocks:0; } } } } } /*Bit reading code blatantly stolen^W^Wadapted from libogg/libtheora (because I've already debugged it and I know it works). Portions (C) Xiph.Org Foundation 1994-2008, BSD-style license.*/ struct qr_pack_buf{ const unsigned char *buf; int endbyte; int endbit; int storage; }; static void qr_pack_buf_init(qr_pack_buf *_b, const unsigned char *_data,int _ndata){ _b->buf=_data; _b->storage=_ndata; _b->endbyte=_b->endbit=0; } /*Assumes 0<=_bits<=16.*/ static int qr_pack_buf_read(qr_pack_buf *_b,int _bits){ const unsigned char *p; unsigned ret; int m; int d; m=16-_bits; _bits+=_b->endbit; d=_b->storage-_b->endbyte; if(d<=2){ /*Not the main path.*/ if(d*8<_bits){ _b->endbyte+=_bits>>3; _b->endbit=_bits&7; return -1; } /*Special case to avoid reading p[0] below, which might be past the end of the buffer; also skips some useless accounting.*/ else if(!_bits)return 0; } p=_b->buf+_b->endbyte; ret=p[0]<<8+_b->endbit; if(_bits>8){ ret|=p[1]<<_b->endbit; if(_bits>16)ret|=p[2]>>8-_b->endbit; } _b->endbyte+=_bits>>3; _b->endbit=_bits&7; return (ret&0xFFFF)>>m; } static int qr_pack_buf_avail(const qr_pack_buf *_b){ return (_b->storage-_b->endbyte<<3)-_b->endbit; } /*The characters available in QR_MODE_ALNUM.*/ static const unsigned char QR_ALNUM_TABLE[45]={ '0','1','2','3','4','5','6','7','8','9', 'A','B','C','D','E','F','G','H','I','J', 'K','L','M','N','O','P','Q','R','S','T', 'U','V','W','X','Y','Z',' ','$','%','*', '+','-','.','/',':' }; static int qr_code_data_parse(qr_code_data *_qrdata,int _version, const unsigned char *_data,int _ndata){ qr_pack_buf qpb; unsigned self_parity; int centries; int len_bits_idx; /*Entries are stored directly in the struct during parsing. Caller cleans up any allocated data on failure.*/ _qrdata->entries=NULL; _qrdata->nentries=0; _qrdata->sa_size=0; self_parity=0; centries=0; /*The versions are divided into 3 ranges that each use a different number of bits for length fields.*/ len_bits_idx=(_version>9)+(_version>26); qr_pack_buf_init(&qpb,_data,_ndata); /*While we have enough bits to read a mode...*/ while(qr_pack_buf_avail(&qpb)>=4){ qr_code_data_entry *entry; int mode; mode=qr_pack_buf_read(&qpb,4); /*Mode 0 is a terminator.*/ if(!mode)break; if(_qrdata->nentries>=centries){ centries=centries<<1|1; _qrdata->entries=(qr_code_data_entry *)realloc(_qrdata->entries, centries*sizeof(*_qrdata->entries)); } entry=_qrdata->entries+_qrdata->nentries++; entry->mode=mode; /*Set the buffer to NULL, because if parsing fails, we might try to free it on clean-up.*/ entry->payload.data.buf=NULL; switch(mode){ /*The number of bits used to encode the character count for each version range and each data mode.*/ static const unsigned char LEN_BITS[3][4]={ {10, 9, 8, 8}, {12,11,16,10}, {14,13,16,12} }; case QR_MODE_NUM:{ unsigned char *buf; unsigned bits; unsigned c; int len; int count; int rem; len=qr_pack_buf_read(&qpb,LEN_BITS[len_bits_idx][0]); if(len<0)return -1; /*Check to see if there are enough bits left now, so we don't have to in the decode loop.*/ count=len/3; rem=len%3; if(qr_pack_buf_avail(&qpb)<10*count+7*(rem>>1&1)+4*(rem&1))return -1; entry->payload.data.buf=buf=(unsigned char *)malloc(len*sizeof(*buf)); entry->payload.data.len=len; /*Read groups of 3 digits encoded in 10 bits.*/ while(count-->0){ bits=qr_pack_buf_read(&qpb,10); if(bits>=1000)return -1; c='0'+bits/100; self_parity^=c; *buf++=(unsigned char)c; bits%=100; c='0'+bits/10; self_parity^=c; *buf++=(unsigned char)c; c='0'+bits%10; self_parity^=c; *buf++=(unsigned char)c; } /*Read the last two digits encoded in 7 bits.*/ if(rem>1){ bits=qr_pack_buf_read(&qpb,7); if(bits>=100)return -1; c='0'+bits/10; self_parity^=c; *buf++=(unsigned char)c; c='0'+bits%10; self_parity^=c; *buf++=(unsigned char)c; } /*Or the last one digit encoded in 4 bits.*/ else if(rem){ bits=qr_pack_buf_read(&qpb,4); if(bits>=10)return -1; c='0'+bits; self_parity^=c; *buf++=(unsigned char)c; } }break; case QR_MODE_ALNUM:{ unsigned char *buf; unsigned bits; unsigned c; int len; int count; int rem; len=qr_pack_buf_read(&qpb,LEN_BITS[len_bits_idx][1]); if(len<0)return -1; /*Check to see if there are enough bits left now, so we don't have to in the decode loop.*/ count=len>>1; rem=len&1; if(qr_pack_buf_avail(&qpb)<11*count+6*rem)return -1; entry->payload.data.buf=buf=(unsigned char *)malloc(len*sizeof(*buf)); entry->payload.data.len=len; /*Read groups of two characters encoded in 11 bits.*/ while(count-->0){ bits=qr_pack_buf_read(&qpb,11); if(bits>=2025)return -1; c=QR_ALNUM_TABLE[bits/45]; self_parity^=c; *buf++=(unsigned char)c; c=QR_ALNUM_TABLE[bits%45]; self_parity^=c; *buf++=(unsigned char)c; len-=2; } /*Read the last character encoded in 6 bits.*/ if(rem){ bits=qr_pack_buf_read(&qpb,6); if(bits>=45)return -1; c=QR_ALNUM_TABLE[bits]; self_parity^=c; *buf++=(unsigned char)c; } }break; /*Structured-append header.*/ case QR_MODE_STRUCT:{ int bits; bits=qr_pack_buf_read(&qpb,16); if(bits<0)return -1; /*We save a copy of the data in _qrdata for easy reference when grouping structured-append codes. If for some reason the code has multiple S-A headers, first one wins, since it is supposed to come before everything else (TODO: should we return an error instead?).*/ if(_qrdata->sa_size==0){ _qrdata->sa_index=entry->payload.sa.sa_index= (unsigned char)(bits>>12&0xF); _qrdata->sa_size=entry->payload.sa.sa_size= (unsigned char)((bits>>8&0xF)+1); _qrdata->sa_parity=entry->payload.sa.sa_parity= (unsigned char)(bits&0xFF); } }break; case QR_MODE_BYTE:{ unsigned char *buf; unsigned c; int len; len=qr_pack_buf_read(&qpb,LEN_BITS[len_bits_idx][2]); if(len<0)return -1; /*Check to see if there are enough bits left now, so we don't have to in the decode loop.*/ if(qr_pack_buf_avail(&qpb)payload.data.buf=buf=(unsigned char *)malloc(len*sizeof(*buf)); entry->payload.data.len=len; while(len-->0){ c=qr_pack_buf_read(&qpb,8); self_parity^=c; *buf++=(unsigned char)c; } }break; /*FNC1 first position marker.*/ case QR_MODE_FNC1_1ST:break; /*Extended Channel Interpretation data.*/ case QR_MODE_ECI:{ unsigned val; int bits; /*ECI uses a variable-width encoding similar to UTF-8*/ bits=qr_pack_buf_read(&qpb,8); if(bits<0)return -1; /*One byte:*/ if(!(bits&0x80))val=bits; /*Two bytes:*/ else if(!(bits&0x40)){ val=bits&0x3F<<8; bits=qr_pack_buf_read(&qpb,8); if(bits<0)return -1; val|=bits; } /*Three bytes:*/ else if(!(bits&0x20)){ val=bits&0x1F<<16; bits=qr_pack_buf_read(&qpb,16); if(bits<0)return -1; val|=bits; /*Valid ECI values are 0...999999.*/ if(val>=1000000)return -1; } /*Invalid lead byte.*/ else return -1; entry->payload.eci=val; }break; case QR_MODE_KANJI:{ unsigned char *buf; unsigned bits; int len; len=qr_pack_buf_read(&qpb,LEN_BITS[len_bits_idx][3]); if(len<0)return -1; /*Check to see if there are enough bits left now, so we don't have to in the decode loop.*/ if(qr_pack_buf_avail(&qpb)<13*len)return -1; entry->payload.data.buf=buf=(unsigned char *)malloc(2*len*sizeof(*buf)); entry->payload.data.len=2*len; /*Decode 2-byte SJIS characters encoded in 13 bits.*/ while(len-->0){ bits=qr_pack_buf_read(&qpb,13); bits=(bits/0xC0<<8|bits%0xC0)+0x8140; if(bits>=0xA000)bits+=0x4000; /*TODO: Are values 0xXX7F, 0xXXFD...0xXXFF always invalid? Should we reject them here?*/ self_parity^=bits; *buf++=(unsigned char)(bits>>8); *buf++=(unsigned char)(bits&0xFF); } }break; /*FNC1 second position marker.*/ case QR_MODE_FNC1_2ND:{ int bits; /*FNC1 in the 2nd position encodes an Application Indicator in one byte, which is either a letter (A...Z or a...z) or a 2-digit number. The letters are encoded with their ASCII value plus 100, the numbers are encoded directly with their numeric value. Values 100...164, 191...196, and 223...255 are invalid, so we reject them here.*/ bits=qr_pack_buf_read(&qpb,8); if(!(bits>=0&&bits<100||bits>=165&&bits<191||bits>=197&&bits<223)){ return -1; } entry->payload.ai=bits; }break; /*Unknown mode number:*/ default:{ /*Unfortunately, because we have to understand the format of a mode to know how many bits it occupies, we can't skip unknown modes. Therefore we have to fail.*/ return -1; }break; } } /*Store the parity of the data from this code, for S-A. The final parity is the 8-bit XOR of all the decoded bytes of literal data. We don't combine the 2-byte kanji codes into one byte in the loops above, because we can just do it here instead.*/ _qrdata->self_parity=((self_parity>>8)^self_parity)&0xFF; /*Success.*/ _qrdata->entries=(qr_code_data_entry *)realloc(_qrdata->entries, _qrdata->nentries*sizeof(*_qrdata->entries)); return 0; } static void qr_code_data_clear(qr_code_data *_qrdata){ int i; for(i=0;i<_qrdata->nentries;i++){ if(QR_MODE_HAS_DATA(_qrdata->entries[i].mode)){ free(_qrdata->entries[i].payload.data.buf); } } free(_qrdata->entries); } void qr_code_data_list_init(qr_code_data_list *_qrlist){ _qrlist->qrdata=NULL; _qrlist->nqrdata=_qrlist->cqrdata=0; } void qr_code_data_list_clear(qr_code_data_list *_qrlist){ int i; for(i=0;i<_qrlist->nqrdata;i++)qr_code_data_clear(_qrlist->qrdata+i); free(_qrlist->qrdata); qr_code_data_list_init(_qrlist); } static void qr_code_data_list_add(qr_code_data_list *_qrlist, qr_code_data *_qrdata){ if(_qrlist->nqrdata>=_qrlist->cqrdata){ _qrlist->cqrdata=_qrlist->cqrdata<<1|1; _qrlist->qrdata=(qr_code_data *)realloc(_qrlist->qrdata, _qrlist->cqrdata*sizeof(*_qrlist->qrdata)); } memcpy(_qrlist->qrdata+_qrlist->nqrdata++,_qrdata,sizeof(*_qrdata)); } #if 0 static const unsigned short QR_NCODEWORDS[40]={ 26, 44, 70, 100, 134, 172, 196, 242, 292, 346, 404, 466, 532, 581, 655, 733, 815, 901, 991,1085, 1156,1258,1364,1474,1588,1706,1828,1921,2051,2185, 2323,2465,2611,2761,2876,3034,3196,3362,3532,3706 }; #endif /*The total number of codewords in a QR code.*/ static int qr_code_ncodewords(unsigned _version){ unsigned nalign; /*This is 24-27 instructions on ARM in thumb mode, or a 26-32 byte savings over just using a table (not counting the instructions that would be needed to do the table lookup).*/ if(_version==1)return 26; nalign=(_version/7)+2; return (_version<<4)*(_version+8) -(5*nalign)*(5*nalign-2)+36*(_version<7)+83>>3; } #if 0 /*The number of parity bytes per Reed-Solomon block for each version and error correction level.*/ static const unsigned char QR_RS_NPAR[40][4]={ { 7,10,13,17},{10,16,22,28},{15,26,18,22},{20,18,26,16}, {26,24,18,22},{18,16,24,28},{20,18,18,26},{24,22,22,26}, {30,22,20,24},{18,26,24,28},{20,30,28,24},{24,22,26,28}, {26,22,24,22},{30,24,20,24},{22,24,30,24},{24,28,24,30}, {28,28,28,28},{30,26,28,28},{28,26,26,26},{28,26,30,28}, {28,26,28,30},{28,28,30,24},{30,28,30,30},{30,28,30,30}, {26,28,30,30},{28,28,28,30},{30,28,30,30},{30,28,30,30}, {30,28,30,30},{30,28,30,30},{30,28,30,30},{30,28,30,30}, {30,28,30,30},{30,28,30,30},{30,28,30,30},{30,28,30,30}, {30,28,30,30},{30,28,30,30},{30,28,30,30},{30,28,30,30} }; #endif /*Bulk data for the number of parity bytes per Reed-Solomon block.*/ static const unsigned char QR_RS_NPAR_VALS[71]={ /*[ 0]*/ 7,10,13,17, /*[ 4]*/10,16,22, 28,26,26, 26,22, 24,22,22, 26,24,18,22, /*[19]*/15,26,18, 22,24, 30,24,20,24, /*[28]*/18,16,24, 28, 28, 28,28,30,24, /*[37]*/20,18, 18,26, 24,28,24, 30,26,28, 28, 26,28,30, 30,22,20,24, /*[55]*/20,18,26,16, /*[59]*/20,30,28, 24,22,26, 28,26, 30,28,30,30 }; /*An offset into QR_RS_NPAR_DATA for each version that gives the number of parity bytes per Reed-Solomon block for each error correction level.*/ static const unsigned char QR_RS_NPAR_OFFS[40]={ 0, 4,19,55,15,28,37,12,51,39, 59,62,10,24,22,41,31,44, 7,65, 47,33,67,67,48,32,67,67,67,67, 67,67,67,67,67,67,67,67,67,67 }; /*The number of Reed-Solomon blocks for each version and error correction level.*/ static const unsigned char QR_RS_NBLOCKS[40][4]={ { 1, 1, 1, 1},{ 1, 1, 1, 1},{ 1, 1, 2, 2},{ 1, 2, 2, 4}, { 1, 2, 4, 4},{ 2, 4, 4, 4},{ 2, 4, 6, 5},{ 2, 4, 6, 6}, { 2, 5, 8, 8},{ 4, 5, 8, 8},{ 4, 5, 8,11},{ 4, 8,10,11}, { 4, 9,12,16},{ 4, 9,16,16},{ 6,10,12,18},{ 6,10,17,16}, { 6,11,16,19},{ 6,13,18,21},{ 7,14,21,25},{ 8,16,20,25}, { 8,17,23,25},{ 9,17,23,34},{ 9,18,25,30},{10,20,27,32}, {12,21,29,35},{12,23,34,37},{12,25,34,40},{13,26,35,42}, {14,28,38,45},{15,29,40,48},{16,31,43,51},{17,33,45,54}, {18,35,48,57},{19,37,51,60},{19,38,53,63},{20,40,56,66}, {21,43,59,70},{22,45,62,74},{24,47,65,77},{25,49,68,81} }; /*Attempts to fully decode a QR code. _qrdata: Returns the parsed code data. _gf: Used for Reed-Solomon error correction. _ul_pos: The location of the UL finder pattern. _ur_pos: The location of the UR finder pattern. _dl_pos: The location of the DL finder pattern. _version: The (decoded) version number. _fmt_info: The decoded format info. _img: The binary input image. _width: The width of the input image. _height: The height of the input image. Return: 0 on success, or a negative value on error.*/ static int qr_code_decode(qr_code_data *_qrdata,const rs_gf256 *_gf, const qr_point _ul_pos,const qr_point _ur_pos,const qr_point _dl_pos, int _version,int _fmt_info, const unsigned char *_img,int _width,int _height){ qr_sampling_grid grid; unsigned *data_bits; unsigned char **blocks; unsigned char *block_data; int nblocks; int nshort_blocks; int ncodewords; int block_sz; int ecc_level; int ndata; int npar; int dim; int ret; int i; /*Read the bits out of the image.*/ qr_sampling_grid_init(&grid,_version,_ul_pos,_ur_pos,_dl_pos,_qrdata->bbox, _img,_width,_height); #if defined(QR_DEBUG) qr_sampling_grid_dump(&grid,_version,_img,_width,_height); #endif dim=17+(_version<<2); data_bits=(unsigned *)malloc( dim*(dim+QR_INT_BITS-1>>QR_INT_LOGBITS)*sizeof(*data_bits)); qr_sampling_grid_sample(&grid,data_bits,dim,_fmt_info,_img,_width,_height); /*Group those bits into Reed-Solomon codewords.*/ ecc_level=(_fmt_info>>3)^1; nblocks=QR_RS_NBLOCKS[_version-1][ecc_level]; npar=*(QR_RS_NPAR_VALS+QR_RS_NPAR_OFFS[_version-1]+ecc_level); ncodewords=qr_code_ncodewords(_version); block_sz=ncodewords/nblocks; nshort_blocks=nblocks-(ncodewords%nblocks); blocks=(unsigned char **)malloc(nblocks*sizeof(*blocks)); block_data=(unsigned char *)malloc(ncodewords*sizeof(*block_data)); blocks[0]=block_data; for(i=1;inshort_blocks); qr_samples_unpack(blocks,nblocks,block_sz-npar,nshort_blocks, data_bits,grid.fpmask,dim); qr_sampling_grid_clear(&grid); free(blocks); free(data_bits); /*Perform the error correction.*/ ndata=0; ncodewords=0; ret=0; for(i=0;i=nshort_blocks); ret=rs_correct(_gf,QR_M0,block_data+ncodewords,block_szi,npar,NULL,0); /*For version 1 symbols and version 2-L and 3-L symbols, we aren't allowed to use all the parity bytes for correction. They are instead used to improve detection. Version 1-L reserves 3 parity bytes for detection. Versions 1-M and 2-L reserve 2 parity bytes for detection. Versions 1-Q, 1-H, and 3-L reserve 1 parity byte for detection. We can ignore the version 3-L restriction because it has an odd number of parity bytes, and we don't support erasure detection.*/ if(ret<0||_version==1&&ret>ecc_level+1<<1|| _version==2&&ecc_level==0&&ret>4){ ret=-1; break; } ndatai=block_szi-npar; memmove(block_data+ndata,block_data+ncodewords,ndatai*sizeof(*block_data)); ncodewords+=block_szi; ndata+=ndatai; } /*Parse the corrected bitstream.*/ if(ret>=0){ ret=qr_code_data_parse(_qrdata,_version,block_data,ndata); /*We could return any partially decoded data, but then we'd have to have API support for that; a mode ignoring ECC errors might also be useful.*/ if(ret<0)qr_code_data_clear(_qrdata); _qrdata->version=_version; _qrdata->ecc_level=ecc_level; } free(block_data); return ret; } /*Searches for an arrangement of these three finder centers that yields a valid configuration. _c: On input, the three finder centers to consider in any order. Return: The detected version number, or a negative value on error.*/ static int qr_reader_try_configuration(qr_reader *_reader, qr_code_data *_qrdata,const unsigned char *_img,int _width,int _height, qr_finder_center *_c[3]){ int ci[7]; unsigned maxd; int ccw; int i0; int i; /*Sort the points in counter-clockwise order.*/ ccw=qr_point_ccw(_c[0]->pos,_c[1]->pos,_c[2]->pos); /*Colinear points can't be the corners of a quadrilateral.*/ if(!ccw)return -1; /*Include a few extra copies of the cyclical list to avoid mods.*/ ci[6]=ci[3]=ci[0]=0; ci[4]=ci[1]=1+(ccw<0); ci[5]=ci[2]=2-(ccw<0); /*Assume the points farthest from each other are the opposite corners, and find the top-left point.*/ maxd=qr_point_distance2(_c[1]->pos,_c[2]->pos); i0=0; for(i=1;i<3;i++){ unsigned d; d=qr_point_distance2(_c[ci[i+1]]->pos,_c[ci[i+2]]->pos); if(d>maxd){ i0=i; maxd=d; } } /*However, try all three possible orderings, just to be sure (a severely skewed projection could move opposite corners closer than adjacent).*/ for(i=i0;ipos,ur.c->pos,dl.c->pos,res); qr_aff_unproject(ur.o,&aff,ur.c->pos[0],ur.c->pos[1]); qr_finder_edge_pts_aff_classify(&ur,&aff); if(qr_finder_estimate_module_size_and_version(&ur,1<pos[0],dl.c->pos[1]); qr_finder_edge_pts_aff_classify(&dl,&aff); if(qr_finder_estimate_module_size_and_version(&dl,1<QR_LARGE_VERSION_SLACK)continue; qr_aff_unproject(ul.o,&aff,ul.c->pos[0],ul.c->pos[1]); qr_finder_edge_pts_aff_classify(&ul,&aff); if(qr_finder_estimate_module_size_and_version(&ul,1<QR_LARGE_VERSION_SLACK|| abs(ul.eversion[0]-dl.eversion[0])>QR_LARGE_VERSION_SLACK){ continue; } #if defined(QR_DEBUG) qr_finder_dump_aff_undistorted(&ul,&ur,&dl,&aff,_img,_width,_height); #endif /*If we made it this far, upgrade the affine homography to a full homography.*/ if(qr_hom_fit(&hom,&ul,&ur,&dl,bbox,&aff, &_reader->isaac,_img,_width,_height)<0){ continue; } memcpy(_qrdata->bbox,bbox,sizeof(bbox)); qr_hom_unproject(ul.o,&hom,ul.c->pos[0],ul.c->pos[1]); qr_hom_unproject(ur.o,&hom,ur.c->pos[0],ur.c->pos[1]); qr_hom_unproject(dl.o,&hom,dl.c->pos[0],dl.c->pos[1]); qr_finder_edge_pts_hom_classify(&ur,&hom); if(qr_finder_estimate_module_size_and_version(&ur, ur.o[0]-ul.o[0],ur.o[0]-ul.o[0])<0){ continue; } qr_finder_edge_pts_hom_classify(&dl,&hom); if(qr_finder_estimate_module_size_and_version(&dl, dl.o[1]-ul.o[1],dl.o[1]-ul.o[1])<0){ continue; } #if defined(QR_DEBUG) qr_finder_dump_hom_undistorted(&ul,&ur,&dl,&hom,_img,_width,_height); #endif /*If we have a small version (less than 7), there's no encoded version information. If the estimated version on the two corners matches and is sufficiently small, we assume this is the case.*/ if(ur.eversion[1]==dl.eversion[0]&&ur.eversion[1]<7){ /*We used to do a whole bunch of extra geometric checks for small versions, because with just an affine correction, it was fairly easy to estimate two consistent module sizes given a random configuration. However, now that we're estimating a full homography, these appear to be unnecessary.*/ #if 0 static const signed char LINE_TESTS[12][6]={ /*DL left, UL > 0, UR > 0*/ {2,0,0, 1,1, 1}, /*DL right, UL > 0, UR < 0*/ {2,1,0, 1,1,-1}, /*UR top, UL > 0, DL > 0*/ {1,2,0, 1,2, 1}, /*UR bottom, UL > 0, DL < 0*/ {1,3,0, 1,2,-1}, /*UR left, DL < 0, UL < 0*/ {1,0,2,-1,0,-1}, /*UR right, DL > 0, UL > 0*/ {1,1,2, 1,0, 1}, /*DL top, UR < 0, UL < 0*/ {2,2,1,-1,0,-1}, /*DL bottom, UR > 0, UL > 0*/ {2,3,1, 1,0, 1}, /*UL left, DL > 0, UR > 0*/ {0,0,2, 1,1, 1}, /*UL right, DL > 0, UR < 0*/ {0,1,2, 1,1,-1}, /*UL top, UR > 0, DL > 0*/ {0,2,1, 1,2, 1}, /*UL bottom, UR > 0, DL < 0*/ {0,3,1, 1,2,-1} }; qr_finder *f[3]; int j; /*Start by decoding the format information. This is cheap, but unlikely to reject invalid configurations. 56.25% of all bitstrings are valid, and we mix and match several pieces until we find a valid combination, so our real chances of finding a valid codeword in random bits are even higher.*/ fmt_info=qr_finder_fmt_info_decode(&ul,&ur,&dl,&aff,_img,_width,_height); if(fmt_info<0)continue; /*Now we fit lines to the edges of each finder pattern and check to make sure the centers of the other finder patterns lie on the proper side.*/ f[0]=&ul; f[1]=&ur; f[2]=&dl; for(j=0;j<12;j++){ const signed char *t; qr_line l0; int *p; t=LINE_TESTS[j]; qr_finder_ransac(f[t[0]],&aff,&_reader->isaac,t[1]); /*We may not have enough points to fit a line accurately here. If not, we just skip the test.*/ if(qr_line_fit_finder_edge(l0,f[t[0]],t[1],res)<0)continue; p=f[t[2]]->c->pos; if(qr_line_eval(l0,p[0],p[1])*t[3]<0)break; p=f[t[4]]->c->pos; if(qr_line_eval(l0,p[0],p[1])*t[5]<0)break; } if(j<12)continue; /*All tests passed.*/ #endif ur_version=ur.eversion[1]; } else{ /*If the estimated versions are significantly different, reject the configuration.*/ if(abs(ur.eversion[1]-dl.eversion[0])>QR_LARGE_VERSION_SLACK)continue; /*Otherwise we try to read the actual version data from the image. If the real version is not sufficiently close to our estimated version, then we assume there was an unrecoverable decoding error (so many bit errors we were within 3 errors of another valid code), and throw that value away. If no decoded version could be sufficiently close, we don't even try.*/ if(ur.eversion[1]>=7-QR_LARGE_VERSION_SLACK){ ur_version=qr_finder_version_decode(&ur,&hom,_img,_width,_height,0); if(abs(ur_version-ur.eversion[1])>QR_LARGE_VERSION_SLACK)ur_version=-1; } else ur_version=-1; if(dl.eversion[0]>=7-QR_LARGE_VERSION_SLACK){ dl_version=qr_finder_version_decode(&dl,&hom,_img,_width,_height,1); if(abs(dl_version-dl.eversion[0])>QR_LARGE_VERSION_SLACK)dl_version=-1; } else dl_version=-1; /*If we got at least one valid version, or we got two and they match, then we found a valid configuration.*/ if(ur_version>=0){ if(dl_version>=0&&dl_version!=ur_version)continue; } else if(dl_version<0)continue; else ur_version=dl_version; } qr_finder_edge_pts_hom_classify(&ul,&hom); if(qr_finder_estimate_module_size_and_version(&ul, ur.o[0]-dl.o[0],dl.o[1]-ul.o[1])<0|| abs(ul.eversion[1]-ur.eversion[1])>QR_SMALL_VERSION_SLACK|| abs(ul.eversion[0]-dl.eversion[0])>QR_SMALL_VERSION_SLACK){ continue; } fmt_info=qr_finder_fmt_info_decode(&ul,&ur,&dl,&hom,_img,_width,_height); if(fmt_info<0|| qr_code_decode(_qrdata,&_reader->gf,ul.c->pos,ur.c->pos,dl.c->pos, ur_version,fmt_info,_img,_width,_height)<0){ /*The code may be flipped. Try again, swapping the UR and DL centers. We should get a valid version either way, so it's relatively cheap to check this, as we've already filtered out a lot of invalid configurations.*/ QR_SWAP2I(hom.inv[0][0],hom.inv[1][0]); QR_SWAP2I(hom.inv[0][1],hom.inv[1][1]); QR_SWAP2I(hom.fwd[0][0],hom.fwd[0][1]); QR_SWAP2I(hom.fwd[1][0],hom.fwd[1][1]); QR_SWAP2I(hom.fwd[2][0],hom.fwd[2][1]); QR_SWAP2I(ul.o[0],ul.o[1]); QR_SWAP2I(ul.size[0],ul.size[1]); QR_SWAP2I(ur.o[0],ur.o[1]); QR_SWAP2I(ur.size[0],ur.size[1]); QR_SWAP2I(dl.o[0],dl.o[1]); QR_SWAP2I(dl.size[0],dl.size[1]); #if defined(QR_DEBUG) qr_finder_dump_hom_undistorted(&ul,&dl,&ur,&hom,_img,_width,_height); #endif fmt_info=qr_finder_fmt_info_decode(&ul,&dl,&ur,&hom,_img,_width,_height); if(fmt_info<0)continue; QR_SWAP2I(bbox[1][0],bbox[2][0]); QR_SWAP2I(bbox[1][1],bbox[2][1]); memcpy(_qrdata->bbox,bbox,sizeof(bbox)); if(qr_code_decode(_qrdata,&_reader->gf,ul.c->pos,dl.c->pos,ur.c->pos, ur_version,fmt_info,_img,_width,_height)<0){ continue; } } return ur_version; } return -1; } void qr_reader_match_centers(qr_reader *_reader,qr_code_data_list *_qrlist, qr_finder_center *_centers,int _ncenters, const unsigned char *_img,int _width,int _height){ /*The number of centers should be small, so an O(n^3) exhaustive search of which ones go together should be reasonable.*/ unsigned char *mark; int nfailures_max; int nfailures; int i; int j; int k; mark=(unsigned char *)calloc(_ncenters,sizeof(*mark)); nfailures_max=QR_MAXI(8192,_width*_height>>9); nfailures=0; for(i=0;i<_ncenters;i++){ /*TODO: We might be able to accelerate this step significantly by considering the remaining finder centers in a more intelligent order, based on the first finder center we just chose.*/ for(j=i+1;!mark[i]&&j<_ncenters;j++){ for(k=j+1;!mark[j]&&k<_ncenters;k++)if(!mark[k]){ qr_finder_center *c[3]; qr_code_data qrdata; int version; c[0]=_centers+i; c[1]=_centers+j; c[2]=_centers+k; version=qr_reader_try_configuration(_reader,&qrdata, _img,_width,_height,c); if(version>=0){ int ninside; int l; /*Add the data to the list.*/ qr_code_data_list_add(_qrlist,&qrdata); /*Convert the bounding box we're returning to the user to normal image coordinates.*/ for(l=0;l<4;l++){ _qrlist->qrdata[_qrlist->nqrdata-1].bbox[l][0]>>=QR_FINDER_SUBPREC; _qrlist->qrdata[_qrlist->nqrdata-1].bbox[l][1]>>=QR_FINDER_SUBPREC; } /*Mark these centers as used.*/ mark[i]=mark[j]=mark[k]=1; /*Find any other finder centers located inside this code.*/ for(l=ninside=0;l<_ncenters;l++)if(!mark[l]){ if(qr_point_ccw(qrdata.bbox[0],qrdata.bbox[1],_centers[l].pos)>=0&& qr_point_ccw(qrdata.bbox[1],qrdata.bbox[3],_centers[l].pos)>=0&& qr_point_ccw(qrdata.bbox[3],qrdata.bbox[2],_centers[l].pos)>=0&& qr_point_ccw(qrdata.bbox[2],qrdata.bbox[0],_centers[l].pos)>=0){ mark[l]=2; ninside++; } } if(ninside>=3){ /*We might have a "Double QR": a code inside a code. Copy the relevant centers to a new array and do a search confined to that subset.*/ qr_finder_center *inside; inside=(qr_finder_center *)malloc(ninside*sizeof(*inside)); for(l=ninside=0;l<_ncenters;l++){ if(mark[l]==2)*&inside[ninside++]=*&_centers[l]; } qr_reader_match_centers(_reader,_qrlist,inside,ninside, _img,_width,_height); free(inside); } /*Mark _all_ such centers used: codes cannot partially overlap.*/ for(l=0;l<_ncenters;l++)if(mark[l]==2)mark[l]=1; nfailures=0; } else if(++nfailures>nfailures_max){ /*Give up. We're unlikely to find a valid code in all this clutter, and we could spent quite a lot of time trying.*/ i=j=k=_ncenters; } } } } free(mark); } int _zbar_qr_found_line (qr_reader *reader, int dir, const qr_finder_line *line) { /* minimally intrusive brute force version */ qr_finder_lines *lines = &reader->finder_lines[dir]; if(lines->nlines >= lines->clines) { lines->clines *= 2; lines->lines = realloc(lines->lines, ++lines->clines * sizeof(*lines->lines)); } memcpy(lines->lines + lines->nlines++, line, sizeof(*line)); return(0); } static inline void qr_svg_centers (const qr_finder_center *centers, int ncenters) { int i, j; svg_path_start("centers", 1, 0, 0); for(i = 0; i < ncenters; i++) svg_path_moveto(SVG_ABS, centers[i].pos[0], centers[i].pos[1]); svg_path_end(); svg_path_start("edge-pts", 1, 0, 0); for(i = 0; i < ncenters; i++) { const qr_finder_center *cen = centers + i; for(j = 0; j < cen->nedge_pts; j++) svg_path_moveto(SVG_ABS, cen->edge_pts[j].pos[0], cen->edge_pts[j].pos[1]); } svg_path_end(); } int _zbar_qr_decode (qr_reader *reader, zbar_image_scanner_t *iscn, zbar_image_t *img) { int nqrdata = 0, ncenters; qr_finder_edge_pt *edge_pts = NULL; qr_finder_center *centers = NULL; if(reader->finder_lines[0].nlines < 9 || reader->finder_lines[1].nlines < 9) return(0); svg_group_start("finder", 0, 1. / (1 << QR_FINDER_SUBPREC), 0, 0, 0); ncenters = qr_finder_centers_locate(¢ers, &edge_pts, reader, 0, 0); zprintf(14, "%dx%d finders, %d centers:\n", reader->finder_lines[0].nlines, reader->finder_lines[1].nlines, ncenters); qr_svg_centers(centers, ncenters); if(ncenters >= 3) { void *bin = qr_binarize(img->data, img->width, img->height); qr_code_data_list qrlist; qr_code_data_list_init(&qrlist); qr_reader_match_centers(reader, &qrlist, centers, ncenters, bin, img->width, img->height); if(qrlist.nqrdata > 0) nqrdata = qr_code_data_list_extract_text(&qrlist, iscn, img); qr_code_data_list_clear(&qrlist); free(bin); } svg_group_end(); if(centers) free(centers); if(edge_pts) free(edge_pts); return(nqrdata); } zbar-0.23/zbar/qrcode/qrdectxt.c0000664000175000017500000004207713471266145013557 00000000000000/*Copyright (C) 2008-2010 Timothy B. Terriberry (tterribe@xiph.org) You can redistribute this library and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.*/ #include #include #include #include #include #include "qrcode.h" #include "qrdec.h" #include "util.h" #include "image.h" #include "decoder.h" #include "error.h" #include "img_scanner.h" static int text_is_ascii(const unsigned char *_text,int _len){ int i; for(i=0;i<_len;i++)if(_text[i]>=0x80)return 0; return 1; } static int text_is_latin1(const unsigned char *_text,int _len){ int i; for(i=0;i<_len;i++){ /*The following line fails to compile correctly with gcc 3.4.4 on ARM with any optimizations enabled.*/ if(_text[i]>=0x80&&_text[i]<0xA0)return 0; } return 1; } static int text_is_big5(const unsigned char *_text, int _len){ int i; for(i=0;i<_len;i++){ if(_text[i]==0xFF) return 0; else if(_text[i]>=0x80){ // first byte is big5 i++; if(i >= _len) // second byte not exists return 0; if(_text[i]<0x40 || (_text[i]>0x7E && _text[i]<0xA1) || _text[i]>0xFE){ // second byte not in range return 0; } }else{ // normal ascii encoding, it's okay } } return 1; } static void enc_list_mtf(iconv_t _enc_list[3],iconv_t _enc){ int i; for(i=0;i<4;i++)if(_enc_list[i]==_enc){ int j; for(j=i;j-->0;)_enc_list[j+1]=_enc_list[j]; _enc_list[0]=_enc; break; } } int qr_code_data_list_extract_text(const qr_code_data_list *_qrlist, zbar_image_scanner_t *iscn, zbar_image_t *img) { iconv_t sjis_cd; iconv_t utf8_cd; iconv_t latin1_cd; iconv_t big5_cd; const qr_code_data *qrdata; int nqrdata; unsigned char *mark; int ntext; int i; qrdata=_qrlist->qrdata; nqrdata=_qrlist->nqrdata; mark=(unsigned char *)calloc(nqrdata,sizeof(*mark)); ntext=0; /*This is the encoding the standard says is the default.*/ latin1_cd=iconv_open("UTF-8","ISO8859-1"); /*But this one is often used, as well.*/ sjis_cd=iconv_open("UTF-8","SJIS"); /*This is a trivial conversion just to check validity without extra code.*/ utf8_cd=iconv_open("UTF-8","UTF-8"); /* add support for big5 encoding. */ big5_cd=iconv_open("UTF-8","BIG-5"); for(i=0;i=0){ qrdataj=qrdata+sa[j]; for(k=0;knentries;k++){ int shift; entry=qrdataj->entries+k; shift=0; switch(entry->mode){ /*FNC1 applies to the entire code and ignores subsequent markers.*/ case QR_MODE_FNC1_1ST:{ if(!fnc1)fnc1=MOD(ZBAR_MOD_GS1); }break; case QR_MODE_FNC1_2ND:{ if(!fnc1){ fnc1=MOD(ZBAR_MOD_AIM); fnc1_2ai=entry->payload.ai; sa_ctext+=2; } }break; /*We assume at most 4 UTF-8 bytes per input byte. I believe this is true for all the encodings we actually use.*/ case QR_MODE_KANJI:has_kanji=1; case QR_MODE_BYTE:shift=2; default:{ /*The remaining two modes are already valid UTF-8.*/ if(QR_MODE_HAS_DATA(entry->mode)){ sa_ctext+=entry->payload.data.len<next) { *sym = _zbar_image_scanner_alloc_sym(iscn, ZBAR_QRCODE, 0); (*sym)->datalen = sa_ntext; if(sa[j]<0){ /* generic placeholder for unfinished results */ (*sym)->type = ZBAR_PARTIAL; /*Skip all contiguous missing segments.*/ for(j++;j=sa_size)break; /* mark break in data */ sa_text[sa_ntext++]='\0'; (*sym)->datalen = sa_ntext; /* advance to next symbol */ sym = &(*sym)->next; *sym = _zbar_image_scanner_alloc_sym(iscn, ZBAR_QRCODE, 0); } qrdataj=qrdata+sa[j]; /* expose bounding box */ sym_add_point(*sym, qrdataj->bbox[0][0], qrdataj->bbox[0][1]); sym_add_point(*sym, qrdataj->bbox[2][0], qrdataj->bbox[2][1]); sym_add_point(*sym, qrdataj->bbox[3][0], qrdataj->bbox[3][1]); sym_add_point(*sym, qrdataj->bbox[1][0], qrdataj->bbox[1][1]); /* approx symbol "up" direction */ dir[0] = (qrdataj->bbox[0][0] - qrdataj->bbox[2][0] + qrdataj->bbox[1][0] - qrdataj->bbox[3][0]); dir[1] = (qrdataj->bbox[2][1] - qrdataj->bbox[0][1] + qrdataj->bbox[3][1] - qrdataj->bbox[1][1]); horiz = abs(dir[0]) > abs(dir[1]); (*sym)->orient = horiz + 2 * (dir[1 - horiz] < 0); for(k=0;k<=qrdataj->nentries&&!err;k++){ size_t inleft; size_t outleft; char *in; char *out; // Check if bytebuf_text is empty INSIDE for loop. if(bytebuf_ntext > 0){ entry = (k == qrdataj->nentries)? NULL : qrdataj->entries+k; // next entry is not byte mode, convert bytes to text. if(entry == NULL || (entry->mode != QR_MODE_BYTE && entry->mode != QR_MODE_KANJI)){ in=bytebuf_text; inleft=bytebuf_ntext; out=sa_text+sa_ntext; outleft=sa_ctext-sa_ntext; /*If we have no specified encoding, attempt to auto-detect it.*/ if(eci<0){ int ei; /*If there was data encoded in kanji mode, assume it's SJIS.*/ if(has_kanji)enc_list_mtf(enc_list,sjis_cd); /*Otherwise check for the UTF-8 BOM. UTF-8 is rarely specified with ECI, and few decoders currently support doing so, so this is the best way for encoders to reliably indicate it.*/ else if(inleft>=3&& in[0]==(char)0xEF&&in[1]==(char)0xBB&&in[2]==(char)0xBF){ in+=3; inleft-=3; /*Actually try converting (to check validity).*/ err=utf8_cd==(iconv_t)-1|| iconv(utf8_cd,&in,&inleft,&out,&outleft)==(size_t)-1; if(!err){ sa_ntext=out-sa_text; enc_list_mtf(enc_list,utf8_cd); continue; } in=bytebuf_text; inleft=bytebuf_ntext; out=sa_text+sa_ntext; outleft=sa_ctext-sa_ntext; } /*If the text is 8-bit clean, prefer UTF-8 over SJIS, since SJIS will corrupt the backslashes used for DoCoMo formats.*/ else if(text_is_ascii((unsigned char *)in,inleft)){ enc_list_mtf(enc_list,utf8_cd); } /* Check if it's big5 encoding. */ else if(text_is_big5((unsigned char *)in,inleft)){ enc_list_mtf(enc_list,big5_cd); } /*Try our list of encodings.*/ for(ei=0;ei<4;ei++)if(enc_list[ei]!=(iconv_t)-1){ /*According to the 2005 version of the standard, ISO/IEC 8859-1 (one hyphen) is supposed to be used, but reality is not always so (and in the 2000 version of the standard, it was JIS8/SJIS that was the default). It's got an invalid range that is used often with SJIS and UTF-8, though, which makes detection easier. However, iconv() does not properly reject characters in those ranges, since ISO-8859-1 (two hyphens) defines a number of seldom-used control code characters there. So if we see any of those characters, move this conversion to the end of the list.*/ if(ei<3&&enc_list[ei]==latin1_cd&& !text_is_latin1((unsigned char *)in,inleft)){ int ej; for(ej=ei+1;ej<4;ej++)enc_list[ej-1]=enc_list[ej]; enc_list[3]=latin1_cd; } err=iconv(enc_list[ei],&in,&inleft,&out,&outleft)==(size_t)-1; if(!err){ sa_ntext=out-sa_text; enc_list_mtf(enc_list,enc_list[ei]); break; } in=bytebuf_text; inleft=bytebuf_ntext; out=sa_text+sa_ntext; outleft=sa_ctext-sa_ntext; } } /*We were actually given a character set; use it. The spec says that in this case, data should be treated as if it came from the given character set even when encoded in kanji mode.*/ else{ err=eci_cd==(iconv_t)-1|| iconv(eci_cd,&in,&inleft,&out,&outleft)==(size_t)-1; if(!err)sa_ntext=out-sa_text; } bytebuf_ntext = 0; } } if(k == qrdataj->nentries) break; entry=qrdataj->entries+k; switch(entry->mode){ case QR_MODE_NUM:{ if(sa_ctext-sa_ntext>=(size_t)entry->payload.data.len){ memcpy(sa_text+sa_ntext,entry->payload.data.buf, entry->payload.data.len*sizeof(*sa_text)); sa_ntext+=entry->payload.data.len; } else err=1; }break; case QR_MODE_ALNUM:{ char *p; in=(char *)entry->payload.data.buf; inleft=entry->payload.data.len; /*FNC1 uses '%' as an escape character.*/ if(fnc1)for(;;){ size_t plen; char c; p=memchr(in,'%',inleft*sizeof(*in)); if(p==NULL)break; plen=p-in; if(sa_ctext-sa_ntextpayload.data.buf; inleft=entry->payload.data.len; memcpy(bytebuf_text+bytebuf_ntext,in,inleft*sizeof(*bytebuf_text)); bytebuf_ntext += inleft; }break; /*Check to see if a character set was specified.*/ case QR_MODE_ECI:{ const char *enc; char buf[16]; unsigned cur_eci; cur_eci=entry->payload.eci; if(cur_eci<=QR_ECI_ISO8859_16&&cur_eci!=14){ if(cur_eci!=QR_ECI_GLI0&&cur_eci!=QR_ECI_CP437){ sprintf(buf,"ISO8859-%i",QR_MAXI(cur_eci,3)-2); enc=buf; } /*Note that CP437 requires an iconv compiled with --enable-extra-encodings, and thus may not be available.*/ else enc="CP437"; } else if(cur_eci==QR_ECI_SJIS)enc="SJIS"; else if(cur_eci==QR_ECI_UTF8)enc="UTF-8"; /*Don't know what this ECI code specifies, but not an encoding that we recognize.*/ else continue; eci=cur_eci; eci_cd=iconv_open("UTF-8",enc); }break; /*Silence stupid compiler warnings.*/ default:break; } } /*If eci should be reset between codes, do so.*/ if(eci<=QR_ECI_GLI1){ eci=-1; if(eci_cd!=(iconv_t)-1)iconv_close(eci_cd); } } free(bytebuf_text); if(eci_cd!=(iconv_t)-1)iconv_close(eci_cd); if(!err){ zbar_symbol_t *sa_sym; sa_text[sa_ntext++]='\0'; if(sa_ctext+1>sa_ntext){ sa_text=(char *)realloc(sa_text,sa_ntext*sizeof(*sa_text)); } if(sa_size == 1) sa_sym = syms; else { /* cheap out w/axis aligned bbox for now */ int xmin = img->width, xmax = -2; int ymin = img->height, ymax = -2; /* create "virtual" container symbol for composite result */ sa_sym = _zbar_image_scanner_alloc_sym(iscn, ZBAR_QRCODE, 0); sa_sym->syms = _zbar_symbol_set_create(); sa_sym->syms->head = syms; /* fixup data references */ for(; syms; syms = syms->next) { int next; _zbar_symbol_refcnt(syms, 1); if(syms->type == ZBAR_PARTIAL) sa_sym->type = ZBAR_PARTIAL; else for(j = 0; j < syms->npts; j++) { int u = syms->pts[j].x; if(xmin >= u) xmin = u - 1; if(xmax <= u) xmax = u + 1; u = syms->pts[j].y; if(ymin >= u) ymin = u - 1; if(ymax <= u) ymax = u + 1; } syms->data = sa_text + syms->datalen; next = (syms->next) ? syms->next->datalen : sa_ntext; if (next > syms->datalen) syms->datalen = next - syms->datalen - 1; else { zprintf(1, "Assertion `next > syms->datalen' failed\n"); syms->datalen = 0; } } if(xmax >= -1) { sym_add_point(sa_sym, xmin, ymin); sym_add_point(sa_sym, xmin, ymax); sym_add_point(sa_sym, xmax, ymax); sym_add_point(sa_sym, xmax, ymin); } } sa_sym->data = sa_text; sa_sym->data_alloc = sa_ntext; sa_sym->datalen = sa_ntext - 1; sa_sym->modifiers = fnc1; _zbar_image_scanner_add_sym(iscn, sa_sym); } else { _zbar_image_scanner_recycle_syms(iscn, syms); free(sa_text); } } if(utf8_cd!=(iconv_t)-1)iconv_close(utf8_cd); if(sjis_cd!=(iconv_t)-1)iconv_close(sjis_cd); if(latin1_cd!=(iconv_t)-1)iconv_close(latin1_cd); if(big5_cd!=(iconv_t)-1)iconv_close(big5_cd); free(mark); return ntext; } zbar-0.23/zbar/qrcode/qrdec.h0000664000175000017500000001250513471225700013005 00000000000000/*Copyright (C) 2008-2009 Timothy B. Terriberry (tterribe@xiph.org) You can redistribute this library and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.*/ #if !defined(_qrdec_H) # define _qrdec_H (1) #include typedef struct qr_code_data_entry qr_code_data_entry; typedef struct qr_code_data qr_code_data; typedef struct qr_code_data_list qr_code_data_list; typedef enum qr_mode{ /*Numeric digits ('0'...'9').*/ QR_MODE_NUM=1, /*Alphanumeric characters ('0'...'9', 'A'...'Z', plus the punctuation ' ', '$', '%', '*', '+', '-', '.', '/', ':').*/ QR_MODE_ALNUM, /*Structured-append header.*/ QR_MODE_STRUCT, /*Raw 8-bit bytes.*/ QR_MODE_BYTE, /*FNC1 marker (for more info, see http://www.mecsw.com/specs/uccean128.html). In the "first position" data is formatted in accordance with GS1 General Specifications.*/ QR_MODE_FNC1_1ST, /*Mode 6 reserved?*/ /*Extended Channel Interpretation code.*/ QR_MODE_ECI=7, /*SJIS kanji characters.*/ QR_MODE_KANJI, /*FNC1 marker (for more info, see http://www.mecsw.com/specs/uccean128.html). In the "second position" data is formatted in accordance with an industry application as specified by AIM Inc.*/ QR_MODE_FNC1_2ND }qr_mode; /*Check if a mode has a data buffer associated with it. Currently this is only modes with exactly one bit set.*/ #define QR_MODE_HAS_DATA(_mode) (!((_mode)&(_mode)-1)) /*ECI may be used to signal a character encoding for the data.*/ typedef enum qr_eci_encoding{ /*GLI0 is like CP437, but the encoding is reset at the beginning of each structured append symbol.*/ QR_ECI_GLI0, /*GLI1 is like ISO8859_1, but the encoding is reset at the beginning of each structured append symbol.*/ QR_ECI_GLI1, /*The remaining encodings do not reset at the start of the next structured append symbol.*/ QR_ECI_CP437, /*Western European.*/ QR_ECI_ISO8859_1, /*Central European.*/ QR_ECI_ISO8859_2, /*South European.*/ QR_ECI_ISO8859_3, /*North European.*/ QR_ECI_ISO8859_4, /*Cyrillic.*/ QR_ECI_ISO8859_5, /*Arabic.*/ QR_ECI_ISO8859_6, /*Greek.*/ QR_ECI_ISO8859_7, /*Hebrew.*/ QR_ECI_ISO8859_8, /*Turkish.*/ QR_ECI_ISO8859_9, /*Nordic.*/ QR_ECI_ISO8859_10, /*Thai.*/ QR_ECI_ISO8859_11, /*There is no ISO/IEC 8859-12.*/ /*Baltic rim.*/ QR_ECI_ISO8859_13=QR_ECI_ISO8859_11+2, /*Celtic.*/ QR_ECI_ISO8859_14, /*Western European with euro.*/ QR_ECI_ISO8859_15, /*South-Eastern European (with euro).*/ QR_ECI_ISO8859_16, /*ECI 000019 is reserved?*/ /*Shift-JIS.*/ QR_ECI_SJIS=20, /*UTF-8.*/ QR_ECI_UTF8=26 }qr_eci_encoding; /*A single unit of parsed QR code data.*/ struct qr_code_data_entry{ /*The mode of this data block.*/ qr_mode mode; union{ /*Data buffer for modes that have one.*/ struct{ unsigned char *buf; int len; }data; /*Decoded "Extended Channel Interpretation" data.*/ unsigned eci; /*Decoded "Application Indicator" for FNC1 in 2nd position.*/ int ai; /*Structured-append header data.*/ struct{ unsigned char sa_index; unsigned char sa_size; unsigned char sa_parity; }sa; }payload; }; /*Low-level QR code data.*/ struct qr_code_data{ /*The decoded data entries.*/ qr_code_data_entry *entries; int nentries; /*The code version (1...40).*/ unsigned char version; /*The ECC level (0...3, corresponding to 'L', 'M', 'Q', and 'H').*/ unsigned char ecc_level; /*Structured-append information.*/ /*The index of this code in the structured-append group. If sa_size is zero, this is undefined.*/ unsigned char sa_index; /*The size of the structured-append group, or 0 if there was no S-A header.*/ unsigned char sa_size; /*The parity of the entire structured-append group. If sa_size is zero, this is undefined.*/ unsigned char sa_parity; /*The parity of this code. If sa_size is zero, this is undefined.*/ unsigned char self_parity; /*An approximate bounding box for the code. Points appear in the order up-left, up-right, down-left, down-right, relative to the orientation of the QR code.*/ qr_point bbox[4]; }; struct qr_code_data_list{ qr_code_data *qrdata; int nqrdata; int cqrdata; }; /*Extract symbol data from a list of QR codes and attach to the image. All text is converted to UTF-8. Any structured-append group that does not have all of its members is decoded as ZBAR_PARTIAL with ZBAR_PARTIAL components for the discontinuities. Note that isolated members of a structured-append group may be decoded with the wrong character set, since the correct setting cannot be propagated between codes. Return: The number of symbols which were successfully extracted from the codes; this will be at most the number of codes.*/ int qr_code_data_list_extract_text(const qr_code_data_list *_qrlist, zbar_image_scanner_t *iscn, zbar_image_t *img); /*TODO: Parse DoCoMo standard barcode data formats. See http://www.nttdocomo.co.jp/english/service/imode/make/content/barcode/function/application/ for details.*/ #endif zbar-0.23/zbar/qrcode/bch15_5.c0000664000175000017500000001167613466560613013051 00000000000000/*Copyright (C) 2008-2009 Timothy B. Terriberry (tterribe@xiph.org) You can redistribute this library and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.*/ #include "bch15_5.h" /*A cycle in GF(2**4) generated by alpha=(x**4+x+1). It is extended an extra 16 entries to avoid some expensive mod operations.*/ static const unsigned char gf16_exp[31]={ 1,2,4,8,3,6,12,11,5,10,7,14,15,13,9,1,2,4,8,3,6,12,11,5,10,7,14,15,13,9,1 }; /*The location of each integer 1...16 in the cycle.*/ static const signed char gf16_log[16]={ -1,0,1,4,2,8,5,10,3,14,9,7,6,13,11,12 }; /*Multiplication in GF(2**4) using logarithms.*/ static unsigned gf16_mul(unsigned _a,unsigned _b){ return _a==0||_b==0?0:gf16_exp[gf16_log[_a]+gf16_log[_b]]; } /*Division in GF(2**4) using logarithms. The result when dividing by zero is undefined.*/ static unsigned gf16_div(unsigned _a,unsigned _b){ return _a==0?0:gf16_exp[gf16_log[_a]+15-gf16_log[_b]]; } /*Multiplication in GF(2**4) when the second argument is known to be non-zero (proven by representing it by its logarithm).*/ static unsigned gf16_hmul(unsigned _a,unsigned _logb){ return _a==0?0:gf16_exp[gf16_log[_a]+_logb]; } /*The syndrome normally has five values, S_1 ... S_5. We only calculate and store the odd ones in _s, since S_2=S_1**2 and S_4=S_2**2. Returns zero iff all the syndrome values are zero.*/ static int bch15_5_calc_syndrome(unsigned _s[3],unsigned _y){ unsigned p; int i; int j; p=0; for(i=0;i<15;i++)if(_y&1<0&&!_o[d-1];d--); return d; } /*Find the roots of the error polynomial. Returns the number of roots found, or a negative value if the polynomial did not have enough roots, indicating a decoding error.*/ static int bch15_5_calc_epos(unsigned _epos[3],unsigned _s[3]){ unsigned o[3]; int nerrors; int d; int i; d=bch15_5_calc_omega(o,_s); nerrors=0; if(d==1)_epos[nerrors++]=gf16_log[o[0]]; else if(d>0){ for(i=0;i<15;i++){ int i2; i2=gf16_log[gf16_exp[i<<1]]; if(!(gf16_exp[i+i2]^gf16_hmul(o[0],i2)^gf16_hmul(o[1],i)^o[2])){ _epos[nerrors++]=i; } } if(nerrors0){ /*If we had a non-zero syndrome value, we should always find at least one error location, or we've got a decoding error.*/ for(i=0;i>10)==y){ /*Decoding succeeded.*/ *_y=y; return nerrors; } } /*Decoding failed due to too many bit errors.*/ return -1; } unsigned bch15_5_encode(unsigned _x){ return (-(_x&1)&0x0537)^(-(_x>>1&1)&0x0A6E)^(-(_x>>2&1)&0x11EB)^ (-(_x>>3&1)&0x23D6)^(-(_x>>4&1)&0x429B); } #if 0 #include static unsigned codes[32]; static int hamming(int _a,int _b){ int d; int n; d=_a^_b; for(n=0;d;n++)d&=d-1; return n; } static int closest(int _y){ int min_i; int min_d; int i; int d; min_i=0; min_d=hamming(_y,codes[0]); for(i=1;i<32;i++){ d=hamming(_y,codes[i]); if(dFailed\n",i); if(hamming(i,z)<=3)printf("Error: 0x%04X should map to 0x%04X\n",i,z); } else{ printf("0x%04X->0x%04X\n",i,y); if(z!=y)printf("Error: 0x%04X should map to 0x%04X\n",i,z); } } return 0; } #endif zbar-0.23/zbar/qrcode/binarize.h0000664000175000017500000000121513466560613013517 00000000000000/*Copyright (C) 2008-2009 Timothy B. Terriberry (tterribe@xiph.org) You can redistribute this library and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.*/ #if !defined(_qrcode_binarize_H) # define _qrcode_binarize_H (1) void qr_image_cross_masking_median_filter(unsigned char *_img, int _width,int _height); void qr_wiener_filter(unsigned char *_img,int _width,int _height); /*Binarizes a grayscale image.*/ unsigned char *qr_binarize(const unsigned char *_img,int _width,int _height); #endif zbar-0.23/zbar/qrcode/binarize.c0000664000175000017500000004617213466560613013525 00000000000000/*Copyright (C) 2008-2009 Timothy B. Terriberry (tterribe@xiph.org) You can redistribute this library and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.*/ #include #include #include #include "util.h" #include "image.h" #include "binarize.h" #if 0 /*Binarization based on~\cite{GPP06}. @ARTICLE{GPP06, author="Basilios Gatos and Ioannis E. Pratikakis and Stavros J. Perantonis", title="Adaptive Degraded Document Image Binarization", journal="Pattern Recognition", volume=39, number=3, pages="317-327", month=Mar, year=2006 }*/ #if 0 /*Applies a 5x5 Wiener filter to the image, in-place, emphasizing differences where the local variance is small, and de-emphasizing them where it is large.*/ void qr_wiener_filter(unsigned char *_img,int _width,int _height){ unsigned *m_buf[8]; unsigned *sn2_buf[8]; unsigned char g; int x; int y; if(_width<=0||_height<=0)return; m_buf[0]=(unsigned *)malloc((_width+4<<3)*sizeof(*m_buf)); sn2_buf[0]=(unsigned *)malloc((_width+4<<3)*sizeof(*sn2_buf)); for(y=1;y<8;y++){ m_buf[y]=m_buf[y-1]+_width+4; sn2_buf[y]=sn2_buf[y-1]+_width+4; } for(y=-4;y<_height;y++){ unsigned *pm; unsigned *psn2; int i; int j; pm=m_buf[y+2&7]; psn2=sn2_buf[y+2&7]; for(x=-4;x<_width;x++){ unsigned m; unsigned m2; m=m2=0; if(y>=0&&y<_height-4&&x>=0&&x<_width-4)for(i=0;i<5;i++)for(j=0;j<5;j++){ g=_img[(y+i)*_width+x+j]; m+=g; m2+=g*g; } else for(i=0;i<5;i++)for(j=0;j<5;j++){ g=_img[QR_CLAMPI(0,y+i,_height-1)*_width+QR_CLAMPI(0,x+j,_width-1)]; m+=g; m2+=g*g; } pm[x+4]=m; psn2[x+4]=(m2*25-m*m); } pm=m_buf[y&7]; if(y>=0)for(x=0;x<_width;x++){ int sn2; sn2=sn2_buf[y&7][x+2]; if(sn2){ int vn3; int m; /*Gatos et al. give the expression mu+(s2-v2)*(g-mu)/s2 , which we reduce to mu+(s2-v2)*g/s2-(s2-v2)*mu/s2 , g-(v2/s2)*g+(v2/s2)*mu , g+(mu-g)*(v2/s2) . However, s2 is much noisier than v2, and dividing by it often gives extremely large adjustments, causing speckle near edges. Therefore we limit the ratio (v2/s2) to lie between 0 and 1.*/ vn3=0; for(i=-2;i<3;i++){ psn2=sn2_buf[y+i&7]; for(j=0;j<5;j++)vn3+=psn2[x+j]; } m=m_buf[y&7][x+2]; vn3=vn3+1023>>10; sn2=25*sn2+1023>>10; if(vn3=0&&y<_height-2&&x>=0&&x<_width-2)for(i=0;i<3;i++)for(j=0;j<3;j++){ g=_img[(y+i)*_width+x+j]; m+=g; m2+=g*g; } else for(i=0;i<3;i++)for(j=0;j<3;j++){ g=_img[QR_CLAMPI(0,y+i,_height-1)*_width+QR_CLAMPI(0,x+j,_width-1)]; m+=g; m2+=g*g; } pm[x+2]=m; psn2[x+2]=(m2*9-m*m); } pm=m_buf[y&3]; if(y>=0)for(x=0;x<_width;x++){ int sn2; sn2=sn2_buf[y&3][x+1]; if(sn2){ int m; int vn3; /*Gatos et al. give the expression mu+(s2-v2)*(g-mu)/s2 , which we reduce to mu+(s2-v2)*g/s2-(s2-v2)*mu/s2 , g-(v2/s2)*g+(v2/s2)*mu , g+(mu-g)*(v2/s2) . However, s2 is much noisier than v2, and dividing by it often gives extremely large adjustments, causing speckle near edges. Therefore we limit the ratio (v2/s2) to lie between 0 and 1.*/ vn3=0; for(i=-1;i<2;i++){ psn2=sn2_buf[y+i&3]; for(j=0;j<3;j++)vn3+=psn2[x+j]; } m=m_buf[y&3][x+1]; vn3=vn3+31>>5; sn2=9*sn2+31>>5; if(vn30&&_height>0){ unsigned *col_sums; unsigned *col2_sums; int logwindw; int logwindh; int windw; int windh; int y0offs; int y1offs; unsigned g; unsigned g2; int x; int y; /*We keep the window size fairly large to ensure it doesn't fit completely inside the center of a finder pattern of a version 1 QR code at full resolution.*/ for(logwindw=4;logwindw<8&&(1<>3);logwindw++); for(logwindh=4;logwindh<8&&(1<>3);logwindh++); windw=1<>1);y++){ y1offs=QR_MINI(y,_height-1)*_width; for(x=0;x<_width;x++){ g=_img[y1offs+x]; col_sums[x]+=g; col2_sums[x]+=g*g; } } for(y=0;y<_height;y++){ unsigned m; unsigned m2; int x0; int x1; /*Initialize the sums over the window.*/ m=(col_sums[0]<>1);x++){ x1=QR_MINI(x,_width-1); m+=col_sums[x1]; m2+=col2_sums[x1]; } for(x=0;x<_width;x++){ int d; /*Perform the test against the threshold T = (m/n)*(1+k*(s/R-1)), where n=windw*windh, s=sqrt((m2-(m*m)/n)/n), and R=128. We don't actually compute the threshold directly, as that would require a square root. Instead we perform the equivalent test: (m/n)*(m/n)*(m2/n-(m/n)*(m/n))/16 > (((1/k)*g-((1-k)/k)*(m/n))*32)**2 R is split up across each side of the inequality to maximize the dynamic range available for the right hand side, which requires 31 bits in the worst case.*/ /*(m/n)*(1+(1/5)*(sqrt((m2-m*m/n)/n)/128-1)) > g m*(1+(1/5)*(sqrt((m2-m*m/n)/n)/128-1)) > g*n m*sqrt((m2-m*m/n)/n) > 5*g*n-4*m<<7 m*m*(m2*n-m*m) > (5*g*n-4*m<<7)**2*n*n || 5*g*n-4*m < 0 */ g=_img[y*_width+x]; d=(5*g<=0){ unsigned mm; unsigned mms2; unsigned d2; mm=(m>>logwindw)*(m>>logwindh); mms2=(m2-mm>>logwindw+logwindh)*(mm>>logwindw+logwindh)+15>>4; d2=d>>logwindw+logwindh-5; d2*=d2; if(d2>=mms2){ /*Update the background average.*/ b+=g; nb++; _mask[y*_width+x]=0; } else _mask[y*_width+x]=0xFF; } else _mask[y*_width+x]=0xFF; /*Update the window sums.*/ if(x+1<_width){ x0=QR_MAXI(0,x-(windw>>1)); x1=QR_MINI(x+(windw>>1),_width-1); m+=col_sums[x1]-col_sums[x0]; m2+=col2_sums[x1]-col2_sums[x0]; } } /*Update the column sums.*/ if(y+1<_height){ y0offs=QR_MAXI(0,y-(windh>>1))*_width; y1offs=QR_MINI(y+(windh>>1),_height-1)*_width; for(x=0;x<_width;x++){ g=_img[y0offs+x]; col_sums[x]-=g; col2_sums[x]-=g*g; g=_img[y1offs+x]; col_sums[x]+=g; col2_sums[x]+=g*g; } } } free(col2_sums); free(col_sums); } *_b=b; *_nb=nb; } /*Interpolates a background image given the source and a conservative foreground mask. If the current window contains no foreground pixels, the average background value over the whole image is used. Note on dynamic range: we assume _width*_height<=0x8000000 (23 bits). Returns the average difference between the foreground and the interpolated background.*/ static void qr_interpolate_background(unsigned char *_dst, int *_delta,int *_ndelta,const unsigned char *_img,const unsigned char *_mask, int _width,int _height,unsigned _b,int _nb){ int delta; int ndelta; delta=ndelta=0; if(_width>0&&_height>0){ unsigned *col_sums; unsigned *ncol_sums; int logwindw; int logwindh; int windw; int windh; int y0offs; int y1offs; unsigned b; unsigned g; int x; int y; b=_nb>0?((_b<<1)+_nb)/(_nb<<1):0xFF; for(logwindw=4;logwindw<8&&(1<>4);logwindw++); for(logwindh=4;logwindh<8&&(1<>4);logwindh++); windw=1<>1);y++){ y1offs=QR_MINI(y,_height-1)*_width; for(x=0;x<_width;x++)if(!_mask[y1offs+x]){ col_sums[x]+=_img[y1offs+x]; ncol_sums[x]++; } } for(y=0;y<_height;y++){ unsigned n; unsigned m; int x0; int x1; /*Initialize the sums over the window.*/ m=(col_sums[0]<>1);x++){ x1=QR_MINI(x,_width-1); m+=col_sums[x1]; n+=ncol_sums[x1]; } for(x=0;x<_width;x++){ if(!_mask[y*_width+x])g=_img[y*_width+x]; else{ g=n>0?((m<<1)+n)/(n<<1):b; delta+=(int)g-_img[y*_width+x]; ndelta++; } _dst[y*_width+x]=(unsigned char)g; /*Update the window sums.*/ if(x+1<_width){ x0=QR_MAXI(0,x-(windw>>1)); x1=QR_MINI(x+(windw>>1),_width-1); m+=col_sums[x1]-col_sums[x0]; n+=ncol_sums[x1]-ncol_sums[x0]; } } /*Update the column sums.*/ if(y+1<_height){ y0offs=QR_MAXI(0,y-(windh>>1))*_width; y1offs=QR_MINI(y+(windh>>1),_height-1)*_width; for(x=0;x<_width;x++){ if(!_mask[y0offs+x]){ col_sums[x]-=_img[y0offs+x]; ncol_sums[x]--; } if(!_mask[y1offs+x]){ col_sums[x]+=_img[y1offs+x]; ncol_sums[x]++; } } } } free(ncol_sums); free(col_sums); } *_delta=delta; *_ndelta=ndelta; } /*Parameters of the logistic sigmoid function that defines the threshold based on the background intensity. They should all be between 0 and 1.*/ #define QR_GATOS_Q (0.7) #define QR_GATOS_P1 (0.5) #define QR_GATOS_P2 (0.8) /*Compute the final binarization mask according to Gatos et al.'s method~\cite{GPP06}.*/ static void qr_gatos_mask(unsigned char *_mask,const unsigned char *_img, const unsigned char *_background,int _width,int _height, unsigned _b,int _nb,int _delta,int _ndelta){ unsigned thresh[256]; unsigned g; double delta; double b; int x; int y; /*Construct a lookup table for the thresholds. This bit uses floating point, but doesn't need to do much calculation, so emulation should be fine.*/ b=_nb>0?(_b+0.5)/_nb:0xFF; delta=_ndelta>0?(_delta+0.5)/_ndelta:0xFF; for(g=0;g<256;g++){ double d; d=QR_GATOS_Q*delta*(QR_GATOS_P2+(1-QR_GATOS_P2)/ (1+exp(2*(1+QR_GATOS_P1)/(1-QR_GATOS_P1)-4*g/(b*(1-QR_GATOS_P1))))); if(d<1)d=1; else if(d>0xFF)d=0xFF; thresh[g]=(unsigned)floor(d); } /*Apply the adaptive threshold.*/ for(y=0;y<_height;y++)for(x=0;x<_width;x++){ g=_background[y*_width+x]; /*_background[y*_width+x]=thresh[g];*/ _mask[y*_width+x]=(unsigned char)(-(g-_img[y*_width+x]>thresh[g])&0xFF); } /*{ FILE *fout; fout=fopen("thresh.png","wb"); image_write_png(_background,_width,_height,fout); fclose(fout); }*/ } /*Binarizes a grayscale image.*/ void qr_binarize(unsigned char *_img,int _width,int _height){ unsigned char *mask; unsigned char *background; unsigned b; int nb; int delta; int ndelta; /*qr_wiener_filter(_img,_width,_height); { FILE *fout; fout=fopen("wiener.png","wb"); image_write_png(_img,_width,_height,fout); fclose(fout); }*/ mask=(unsigned char *)malloc(_width*_height*sizeof(*mask)); qr_sauvola_mask(mask,&b,&nb,_img,_width,_height); /*{ FILE *fout; fout=fopen("foreground.png","wb"); image_write_png(mask,_width,_height,fout); fclose(fout); }*/ background=(unsigned char *)malloc(_width*_height*sizeof(*mask)); qr_interpolate_background(background,&delta,&ndelta, _img,mask,_width,_height,b,nb); /*{ FILE *fout; fout=fopen("background.png","wb"); image_write_png(background,_width,_height,fout); fclose(fout); }*/ qr_gatos_mask(_img,_img,background,_width,_height,b,nb,delta,ndelta); free(background); free(mask); } #else /*The above algorithms are computationally expensive, and do not work as well as the simple algorithm below. Sauvola by itself does an excellent job of classifying regions outside the QR code as background, which greatly reduces the chance of false alarms. However, it also tends to over-shrink isolated black dots inside the code, making them easy to miss with even slight mis-alignment. Since the Gatos method uses Sauvola as input to its background interpolation method, it cannot possibly mark any pixels as foreground which Sauvola classified as background, and thus suffers from the same problem. The following simple adaptive threshold method does not have this problem, though it produces essentially random noise outside the QR code region. QR codes are structured well enough that this does not seem to lead to any actual false alarms in practice, and it allows many more codes to be detected and decoded successfully than the Sauvola or Gatos binarization methods.*/ /*A simplified adaptive thresholder. This compares the current pixel value to the mean value of a (large) window surrounding it.*/ unsigned char *qr_binarize(const unsigned char *_img,int _width,int _height){ unsigned char *mask = NULL; if(_width>0&&_height>0){ unsigned *col_sums; int logwindw; int logwindh; int windw; int windh; int y0offs; int y1offs; unsigned g; int x; int y; mask=(unsigned char *)malloc(_width*_height*sizeof(*mask)); /*We keep the window size fairly large to ensure it doesn't fit completely inside the center of a finder pattern of a version 1 QR code at full resolution.*/ for(logwindw=4;logwindw<8&&(1<>3);logwindw++); for(logwindh=4;logwindh<8&&(1<>3);logwindh++); windw=1<>1);y++){ y1offs=QR_MINI(y,_height-1)*_width; for(x=0;x<_width;x++){ g=_img[y1offs+x]; col_sums[x]+=g; } } for(y=0;y<_height;y++){ unsigned m; int x0; int x1; /*Initialize the sum over the window.*/ m=(col_sums[0]<>1);x++){ x1=QR_MINI(x,_width-1); m+=col_sums[x1]; } for(x=0;x<_width;x++){ /*Perform the test against the threshold T = (m/n)-D, where n=windw*windh and D=3.*/ g=_img[y*_width+x]; mask[y*_width+x]=-(g+3<>1)); x1=QR_MINI(x+(windw>>1),_width-1); m+=col_sums[x1]-col_sums[x0]; } } /*Update the column sums.*/ if(y+1<_height){ y0offs=QR_MAXI(0,y-(windh>>1))*_width; y1offs=QR_MINI(y+(windh>>1),_height-1)*_width; for(x=0;x<_width;x++){ col_sums[x]-=_img[y0offs+x]; col_sums[x]+=_img[y1offs+x]; } } } free(col_sums); } #if defined(QR_DEBUG) { FILE *fout; fout=fopen("binary.png","wb"); image_write_png(_img,_width,_height,fout); fclose(fout); } #endif return(mask); } #endif #if defined(TEST_BINARIZE) #include #include "image.c" int main(int _argc,char **_argv){ unsigned char *img; int width; int height; int x; int y; if(_argc<2){ fprintf(stderr,"usage: %s .png\n",_argv[0]); return EXIT_FAILURE; } /*width=1182; height=1181; img=(unsigned char *)malloc(width*height*sizeof(*img)); for(y=0;y #include #include "rs.h" /*Reed-Solomon encoder and decoder. Original implementation (C) Henry Minsky (hqm@ua.com, hqm@ai.mit.edu), Universal Access 1991-1995. Updates by Timothy B. Terriberry (C) 2008-2009: - Properly reject codes when error-locator polynomial has repeated roots or non-trivial irreducible factors. - Removed the hard-coded parity size and performed general API cleanup. - Allow multiple representations of GF(2**8), since different standards use different irreducible polynomials. - Allow different starting indices for the generator polynomial, since different standards use different values. - Greatly reduced the computation by eliminating unnecessary operations. - Explicitly solve for the roots of low-degree polynomials instead of using an exhaustive search. This is another major speed boost when there are few errors.*/ /*Galois Field arithmetic in GF(2**8).*/ void rs_gf256_init(rs_gf256 *_gf,unsigned _ppoly){ unsigned p; int i; /*Initialize the table of powers of a primtive root, alpha=0x02.*/ p=1; for(i=0;i<256;i++){ _gf->exp[i]=_gf->exp[i+255]=p; p=((p<<1)^(-(p>>7)&_ppoly))&0xFF; } /*Invert the table to recover the logs.*/ for(i=0;i<255;i++)_gf->log[_gf->exp[i]]=i; /*Note that we rely on the fact that _gf->log[0]=0 below.*/ _gf->log[0]=0; } /*Multiplication in GF(2**8) using logarithms.*/ static unsigned rs_gmul(const rs_gf256 *_gf,unsigned _a,unsigned _b){ return _a==0||_b==0?0:_gf->exp[_gf->log[_a]+_gf->log[_b]]; } /*Division in GF(2**8) using logarithms. The result of division by zero is undefined.*/ static unsigned rs_gdiv(const rs_gf256 *_gf,unsigned _a,unsigned _b){ return _a==0?0:_gf->exp[_gf->log[_a]+255-_gf->log[_b]]; } /*Multiplication in GF(2**8) when one of the numbers is known to be non-zero (proven by representing it by its logarithm).*/ static unsigned rs_hgmul(const rs_gf256 *_gf,unsigned _a,unsigned _logb){ return _a==0?0:_gf->exp[_gf->log[_a]+_logb]; } /*Square root in GF(2**8) using logarithms.*/ static unsigned rs_gsqrt(const rs_gf256 *_gf,unsigned _a){ unsigned loga; if(!_a)return 0; loga=_gf->log[_a]; return _gf->exp[loga+(255&-(loga&1))>>1]; } /*Polynomial root finding in GF(2**8). Each routine returns a list of the distinct roots (i.e., with duplicates removed).*/ /*Solve a quadratic equation x**2 + _b*x + _c in GF(2**8) using the method of~\cite{Wal99}. Returns the number of distinct roots. ARTICLE{Wal99, author="C. Wayne Walker", title="New Formulas for Solving Quadratic Equations over Certain Finite Fields", journal="{IEEE} Transactions on Information Theory", volume=45, number=1, pages="283--284", month=Jan, year=1999 }*/ static int rs_quadratic_solve(const rs_gf256 *_gf,unsigned _b,unsigned _c, unsigned char _x[2]){ unsigned b; unsigned logb; unsigned logb2; unsigned logb4; unsigned logb8; unsigned logb12; unsigned logb14; unsigned logc; unsigned logc2; unsigned logc4; unsigned c8; unsigned g3; unsigned z3; unsigned l3; unsigned c0; unsigned g2; unsigned l2; unsigned z2; int inc; /*If _b is zero, all we need is a square root.*/ if(!_b){ _x[0]=rs_gsqrt(_gf,_c); return 1; } /*If _c is zero, 0 and _b are the roots.*/ if(!_c){ _x[0]=0; _x[1]=_b; return 2; } logb=_gf->log[_b]; logc=_gf->log[_c]; /*If _b lies in GF(2**4), scale x to move it out.*/ inc=logb%(255/15)==0; if(inc){ b=_gf->exp[logb+254]; logb=_gf->log[b]; _c=_gf->exp[logc+253]; logc=_gf->log[_c]; } else b=_b; logb2=_gf->log[_gf->exp[logb<<1]]; logb4=_gf->log[_gf->exp[logb2<<1]]; logb8=_gf->log[_gf->exp[logb4<<1]]; logb12=_gf->log[_gf->exp[logb4+logb8]]; logb14=_gf->log[_gf->exp[logb2+logb12]]; logc2=_gf->log[_gf->exp[logc<<1]]; logc4=_gf->log[_gf->exp[logc2<<1]]; c8=_gf->exp[logc4<<1]; g3=rs_hgmul(_gf, _gf->exp[logb14+logc]^_gf->exp[logb12+logc2]^_gf->exp[logb8+logc4]^c8,logb); /*If g3 doesn't lie in GF(2**4), then our roots lie in an extension field. Note that we rely on the fact that _gf->log[0]==0 here.*/ if(_gf->log[g3]%(255/15)!=0)return 0; /*Construct the corresponding quadratic in GF(2**4): x**2 + x/alpha**(255/15) + l3/alpha**(2*(255/15))*/ z3=rs_gdiv(_gf,g3,_gf->exp[logb8<<1]^b); l3=rs_hgmul(_gf,rs_gmul(_gf,z3,z3)^rs_hgmul(_gf,z3,logb)^_c,255-logb2); c0=rs_hgmul(_gf,l3,255-2*(255/15)); /*Construct the corresponding quadratic in GF(2**2): x**2 + x/alpha**(255/3) + l2/alpha**(2*(255/3))*/ g2=rs_hgmul(_gf, rs_hgmul(_gf,c0,255-2*(255/15))^rs_gmul(_gf,c0,c0),255-255/15); z2=rs_gdiv(_gf,g2,_gf->exp[255-(255/15)*4]^_gf->exp[255-(255/15)]); l2=rs_hgmul(_gf, rs_gmul(_gf,z2,z2)^rs_hgmul(_gf,z2,255-(255/15))^c0,2*(255/15)); /*Back substitute to the solution in the original field.*/ _x[0]=_gf->exp[_gf->log[z3^rs_hgmul(_gf, rs_hgmul(_gf,l2,255/3)^rs_hgmul(_gf,z2,255/15),logb)]+inc]; _x[1]=_x[0]^_b; return 2; } /*Solve a cubic equation x**3 + _a*x**2 + _b*x + _c in GF(2**8). Returns the number of distinct roots.*/ static int rs_cubic_solve(const rs_gf256 *_gf, unsigned _a,unsigned _b,unsigned _c,unsigned char _x[3]){ unsigned k; unsigned logd; unsigned d2; unsigned logd2; unsigned logw; int nroots; /*If _c is zero, factor out the 0 root.*/ if(!_c){ nroots=rs_quadratic_solve(_gf,_a,_b,_x); if(_b)_x[nroots++]=0; return nroots; } /*Substitute x=_a+y*sqrt(_a**2+_b) to get y**3 + y + k == 0, k = (_a*_b+c)/(_a**2+b)**(3/2).*/ k=rs_gmul(_gf,_a,_b)^_c; d2=rs_gmul(_gf,_a,_a)^_b; if(!d2){ int logx; if(!k){ /*We have a triple root.*/ _x[0]=_a; return 1; } logx=_gf->log[k]; if(logx%3!=0)return 0; logx/=3; _x[0]=_a^_gf->exp[logx]; _x[1]=_a^_gf->exp[logx+255/3]; _x[2]=_a^_x[0]^_x[1]; return 3; } logd2=_gf->log[d2]; logd=logd2+(255&-(logd2&1))>>1; k=rs_gdiv(_gf,k,_gf->exp[logd+logd2]); /*Substitute y=w+1/w and z=w**3 to get z**2 + k*z + 1 == 0.*/ nroots=rs_quadratic_solve(_gf,k,1,_x); if(nroots<1){ /*The Reed-Solomon code is only valid if we can find 3 distinct roots in GF(2**8), so if we know there's only one, we don't actually need to find it. Note that we're also called by the quartic solver, but if we contain a non-trivial irreducible factor, than so does the original quartic~\cite{LW72}, and failing to return a root here actually saves us some work there, also.*/ return 0; } /*Recover w from z.*/ logw=_gf->log[_x[0]]; if(logw){ if(logw%3!=0)return 0; logw/=3; /*Recover x from w.*/ _x[0]=_gf->exp[_gf->log[_gf->exp[logw]^_gf->exp[255-logw]]+logd]^_a; logw+=255/3; _x[1]=_gf->exp[_gf->log[_gf->exp[logw]^_gf->exp[255-logw]]+logd]^_a; _x[2]=_x[0]^_x[1]^_a; return 3; } else{ _x[0]=_a; /*In this case _x[1] is a double root, so we know the Reed-Solomon code is invalid. Note that we still have to return at least one root, because if we're being called by the quartic solver, the quartic might still have 4 distinct roots. But we don't need more than one root, so we can avoid computing the expensive one.*/ /*_x[1]=_gf->exp[_gf->log[_gf->exp[255/3]^_gf->exp[2*(255/3)]]+logd]^_a;*/ return 1; } } /*Solve a quartic equation x**4 + _a*x**3 + _b*x**2 + _c*x + _d in GF(2**8) by decomposing it into the cases given by~\cite{LW72}. Returns the number of distinct roots. @ARTICLE{LW72, author="Philip A. Leonard and Kenneth S. Williams", title="Quartics over $GF(2^n)$", journal="Proceedings of the American Mathematical Society", volume=36, number=2, pages="347--450", month=Dec, year=1972 }*/ static int rs_quartic_solve(const rs_gf256 *_gf, unsigned _a,unsigned _b,unsigned _c,unsigned _d,unsigned char _x[3]){ unsigned r; unsigned s; unsigned t; unsigned b; int nroots; int i; /*If _d is zero, factor out the 0 root.*/ if(!_d){ nroots=rs_cubic_solve(_gf,_a,_b,_c,_x); if(_c)_x[nroots++]=0; return nroots; } if(_a){ unsigned loga; /*Substitute x=(1/y) + sqrt(_c/_a) to eliminate the cubic term.*/ loga=_gf->log[_a]; r=rs_hgmul(_gf,_c,255-loga); s=rs_gsqrt(_gf,r); t=_d^rs_gmul(_gf,_b,r)^rs_gmul(_gf,r,r); if(t){ unsigned logti; logti=255-_gf->log[t]; /*The result is still quartic, but with no cubic term.*/ nroots=rs_quartic_solve(_gf,0,rs_hgmul(_gf,_b^rs_hgmul(_gf,s,loga),logti), _gf->exp[loga+logti],_gf->exp[logti],_x); for(i=0;iexp[255-_gf->log[_x[i]]]^s; } else{ /*s must be a root~\cite{LW72}, and is in fact a double-root~\cite{CCO69}. Thus we're left with only a quadratic to solve. @ARTICLE{CCO69, author="Robert T. Chien and B. D. Cunningham and I. B. Oldham", title="Hybrid Methods for Finding Roots of a Polynomial---With Applications to {BCH} Decoding", journal="{IEEE} Transactions on Information Theory", volume=15, number=2, pages="329--335", month=Mar, year=1969 }*/ nroots=rs_quadratic_solve(_gf,_a,_b^r,_x); /*s may be a triple root if s=_b/_a, but not quadruple, since _a!=0.*/ if(nroots!=2||_x[0]!=s&&_x[1]!=s)_x[nroots++]=s; } return nroots; } /*If there are no odd powers, it's really just a quadratic in disguise.*/ if(!_c)return rs_quadratic_solve(_gf,rs_gsqrt(_gf,_b),rs_gsqrt(_gf,_d),_x); /*Factor into (x**2 + r*x + s)*(x**2 + r*x + t) by solving for r, which can be shown to satisfy r**3 + _b*r + _c == 0.*/ nroots=rs_cubic_solve(_gf,0,_b,_c,_x); if(nroots<1){ /*The Reed-Solomon code is only valid if we can find 4 distinct roots in GF(2**8). If the cubic does not factor into 3 (possibly duplicate) roots, then we know that the quartic must have a non-trivial irreducible factor.*/ return 0; } r=_x[0]; /*Now solve for s and t.*/ b=rs_gdiv(_gf,_c,r); nroots=rs_quadratic_solve(_gf,b,_d,_x); if(nroots<2)return 0; s=_x[0]; t=_x[1]; /*_c=r*(s^t) was non-zero, so s and t must be distinct. But if z is a root of z**2 ^ r*z ^ s, then so is (z^r), and s = z*(z^r). Hence if z is also a root of z**2 ^ r*z ^ t, then t = s, a contradiction. Thus all four roots are distinct, if they exist.*/ nroots=rs_quadratic_solve(_gf,r,s,_x); return nroots+rs_quadratic_solve(_gf,r,t,_x+nroots); } /*Polynomial arithmetic with coefficients in GF(2**8).*/ static void rs_poly_zero(unsigned char *_p,int _dp1){ memset(_p,0,_dp1*sizeof(*_p)); } static void rs_poly_copy(unsigned char *_p,const unsigned char *_q,int _dp1){ memcpy(_p,_q,_dp1*sizeof(*_p)); } /*Multiply the polynomial by the free variable, x (shift the coefficients). The number of coefficients, _dp1, must be non-zero.*/ static void rs_poly_mul_x(unsigned char *_p,const unsigned char *_q,int _dp1){ memmove(_p+1,_q,(_dp1-1)*sizeof(*_p)); _p[0]=0; } /*Divide the polynomial by the free variable, x (shift the coefficients). The number of coefficients, _dp1, must be non-zero.*/ static void rs_poly_div_x(unsigned char *_p,const unsigned char *_q,int _dp1){ memmove(_p,_q+1,(_dp1-1)*sizeof(*_p)); _p[_dp1-1]=0; } /*Compute the first (d+1) coefficients of the product of a degree e and a degree f polynomial.*/ static void rs_poly_mult(const rs_gf256 *_gf,unsigned char *_p,int _dp1, const unsigned char *_q,int _ep1,const unsigned char *_r,int _fp1){ int m; int i; rs_poly_zero(_p,_dp1); m=_ep1<_dp1?_ep1:_dp1; for(i=0;ilog[_q[i]]; for(j=0;jlog[_gf->exp[j+_m0]]; for(i=0;i<_ndata;i++)sj=_data[i]^rs_hgmul(_gf,sj,alphaj); _s[j]=sj; } } /*Berlekamp-Peterson and Berlekamp-Massey Algorithms for error-location, modified to handle known erasures, from \cite{CC81}, p. 205. This finds the coefficients of the error locator polynomial. The roots are then found by looking for the values of alpha**n where evaluating the polynomial yields zero. Error correction is done using the error-evaluator equation on p. 207. @BOOK{CC81, author="George C. Clark, Jr and J. Bibb Cain", title="Error-Correction Coding for Digital Communications", series="Applications of Communications Theory", publisher="Springer", address="New York, NY", month=Jun, year=1981 }*/ /*Initialize lambda to the product of (1-x*alpha**e[i]) for erasure locations e[i]. Note that the user passes in array indices counting from the beginning of the data, while our polynomial indexes starting from the end, so e[i]=(_ndata-1)-_erasures[i].*/ static void rs_init_lambda(const rs_gf256 *_gf,unsigned char *_lambda,int _npar, const unsigned char *_erasures,int _nerasures,int _ndata){ int i; int j; rs_poly_zero(_lambda,(_npar<4?4:_npar)+1); _lambda[0]=1; for(i=0;i<_nerasures;i++)for(j=i+1;j>0;j--){ _lambda[j]^=rs_hgmul(_gf,_lambda[j-1],_ndata-1-_erasures[i]); } } /*From \cite{CC81}, p. 216. Returns the number of errors detected (degree of _lambda).*/ static int rs_modified_berlekamp_massey(const rs_gf256 *_gf, unsigned char *_lambda,const unsigned char *_s,unsigned char *_omega,int _npar, const unsigned char *_erasures,int _nerasures,int _ndata){ unsigned char tt[256]; int n; int l; int k; int i; /*Initialize _lambda, the error locator-polynomial, with the location of known erasures.*/ rs_init_lambda(_gf,_lambda,_npar,_erasures,_nerasures,_ndata); rs_poly_copy(tt,_lambda,_npar+1); l=_nerasures; k=0; for(n=_nerasures+1;n<=_npar;n++){ unsigned d; rs_poly_mul_x(tt,tt,n-k+1); d=0; for(i=0;i<=l;i++)d^=rs_gmul(_gf,_lambda[i],_s[n-1-i]); if(d!=0){ unsigned logd; logd=_gf->log[d]; if(llog[_epos[i]]; if((int)alpha<_ndata)_epos[nroots++]=alpha; } return nroots; } else for(alpha=0;(int)alpha<_ndata;alpha++){ unsigned alphai; unsigned sum; sum=0; alphai=0; for(i=0;i<=_nerrors;i++){ sum^=rs_hgmul(_gf,_lambda[_nerrors-i],alphai); alphai=_gf->log[_gf->exp[alphai+alpha]]; } if(!sum)_epos[nroots++]=alpha; } return nroots; } /*Corrects a codeword with _ndata<256 bytes, of which the last _npar are parity bytes. Known locations of errors can be passed in the _erasures array. Twice as many (up to _npar) errors with a known location can be corrected compared to errors with an unknown location. Returns the number of errors corrected if successful, or a negative number if the message could not be corrected because too many errors were detected.*/ int rs_correct(const rs_gf256 *_gf,int _m0,unsigned char *_data,int _ndata, int _npar,const unsigned char *_erasures,int _nerasures){ /*lambda must have storage for at least five entries to avoid special cases in the low-degree polynomial solver.*/ unsigned char lambda[256]; unsigned char omega[256]; unsigned char epos[256]; unsigned char s[256]; int i; /*If we already have too many erasures, we can't possibly succeed.*/ if(_nerasures>_npar)return -1; /*Compute the syndrome values.*/ rs_calc_syndrome(_gf,_m0,s,_npar,_data,_ndata); /*Check for a non-zero value.*/ for(i=0;i<_npar;i++)if(s[i]){ int nerrors; int j; /*Construct the error locator polynomial.*/ nerrors=rs_modified_berlekamp_massey(_gf,lambda,s,omega,_npar, _erasures,_nerasures,_ndata); /*If we can't locate any errors, we can't force the syndrome values to zero, and must have a decoding error. Conversely, if we have too many errors, there's no reason to even attempt the root search.*/ if(nerrors<=0||nerrors-_nerasures>_npar-_nerasures>>1)return -1; /*Compute the locations of the errors. If they are not all distinct, or some of them were outside the valid range for our block size, we have a decoding error.*/ if(rs_find_roots(_gf,epos,lambda,nerrors,_ndata)log[_gf->exp[alphanj+alphan1]]; } /*Evaluate the derivative of lambda at alpha**-1 All the odd powers vanish.*/ b=0; alphan2=_gf->log[_gf->exp[alphan1<<1]]; alphanj=alphan1+_m0*alpha%255; for(j=1;j<=_npar;j+=2){ b^=rs_hgmul(_gf,lambda[j],alphanj); alphanj=_gf->log[_gf->exp[alphanj+alphan2]]; } /*Apply the correction.*/ _data[_ndata-1-alpha]^=rs_gdiv(_gf,a,b); } return nerrors; } return 0; } /*Encoding.*/ /*Create an _npar-coefficient generator polynomial for a Reed-Solomon code with _npar<256 parity bytes.*/ void rs_compute_genpoly(const rs_gf256 *_gf,int _m0, unsigned char *_genpoly,int _npar){ int i; if(_npar<=0)return; rs_poly_zero(_genpoly,_npar); _genpoly[0]=1; /*Multiply by (x+alpha^i) for i = 1 ... _ndata.*/ for(i=0;i<_npar;i++){ unsigned alphai; int n; int j; n=i+1<_npar-1?i+1:_npar-1; alphai=_gf->log[_gf->exp[_m0+i]]; for(j=n;j>0;j--)_genpoly[j]=_genpoly[j-1]^rs_hgmul(_gf,_genpoly[j],alphai); _genpoly[0]=rs_hgmul(_gf,_genpoly[0],alphai); } } /*Adds _npar<=_ndata parity bytes to an _ndata-_npar byte message. _data must contain room for _ndata<256 bytes.*/ void rs_encode(const rs_gf256 *_gf,unsigned char *_data,int _ndata, const unsigned char *_genpoly,int _npar){ unsigned char *lfsr; unsigned d; int i; int j; if(_npar<=0)return; lfsr=_data+_ndata-_npar; rs_poly_zero(lfsr,_npar); for(i=0;i<_ndata-_npar;i++){ d=_data[i]^lfsr[0]; if(d){ unsigned logd; logd=_gf->log[d]; for(j=0;j<_npar-1;j++){ lfsr[j]=lfsr[j+1]^rs_hgmul(_gf,_genpoly[_npar-1-j],logd); } lfsr[_npar-1]=rs_hgmul(_gf,_genpoly[0],logd); } else rs_poly_div_x(lfsr,lfsr,_npar); } } #if defined(RS_TEST_ENC) #include #include int main(void){ rs_gf256 gf; int k; rs_gf256_init(&gf,QR_PPOLY); srand(0); for(k=0;k<64*1024;k++){ unsigned char genpoly[256]; unsigned char data[256]; unsigned char epos[256]; int ndata; int npar; int nerrors; int i; ndata=rand()&0xFF; npar=ndata>0?rand()%ndata:0; for(i=0;i0){ /*Corrupt it.*/ nerrors=rand()%(npar+1); if(nerrors>0){ /*This test is not quite correct: there could be so many errors it comes within (npar>>1) errors of another valid codeword. I don't know a simple way to test for that without trying to decode the corrupt codeword, though, which is the very code we're trying to test.*/ if(nerrors<=npar>>1){ fprintf(stderr,"Success!\n",nerrors); for(i=0;i int main(void){ rs_gf256 gf; rs_gf256_init(&gf,QR_PPOLY); for(;;){ unsigned char data[255]; unsigned char erasures[255]; int idata[255]; int ierasures[255]; int ndata; int npar; int nerasures; int nerrors; int i; if(scanf("%i",&ndata)<1||ndata<0||ndata>255|| scanf("%i",&npar)<1||npar<0||npar>ndata)break; for(i=0;i255)break; data[i]=idata[i]; } if(indata)break; for(i=0;i=ndata)break; erasures[i]=ierasures[i]; } nerrors=rs_correct(&gf,QR_M0,data,ndata,npar,erasures,nerasures); if(nerrors>=0){ unsigned char data2[255]; unsigned char genpoly[255]; for(i=0;i /*Exhaustively test the root finder.*/ int main(void){ rs_gf256 gf; int a; int b; int c; int d; rs_gf256_init(&gf,QR_PPOLY); for(a=0;a<256;a++)for(b=0;b<256;b++)for(c=0;c<256;c++)for(d=0;d<256;d++){ unsigned char x[4]; unsigned char r[4]; unsigned x2; unsigned e[5]; int nroots; int mroots; int i; int j; nroots=rs_quartic_solve(&gf,a,b,c,d,x); for(i=0;i=nroots){ printf("Missing root: (0x%02X)**4 ^ 0x%02X*(0x%02X)**3 ^ " "0x%02X*(0x%02X)**2 ^ 0x%02X(0x%02X) ^ 0x%02X = 0x%02X\n", r[j],a,r[j],b,r[j],c,r[j],d,e[j]); } } } return 0; } #endif zbar-0.23/zbar/qrcode/isaac.h0000664000175000017500000000211013466560613012767 00000000000000/*Written by Timothy B. Terriberry (tterribe@xiph.org) 1999-2009 public domain. Based on the public domain implementation by Robert J. Jenkins Jr.*/ #if !defined(_isaac_H) # define _isaac_H (1) typedef struct isaac_ctx isaac_ctx; #define ISAAC_SZ_LOG (8) #define ISAAC_SZ (1<(_a)))) #define QR_MINI(_a,_b) ((_a)+((_b)-(_a)&-((_b)<(_a)))) #define QR_SIGNI(_x) (((_x)>0)-((_x)<0)) #define QR_SIGNMASK(_x) (-((_x)<0)) /*Unlike copysign(), simply inverts the sign of _a if _b is negative.*/ #define QR_FLIPSIGNI(_a,_b) ((_a)+QR_SIGNMASK(_b)^QR_SIGNMASK(_b)) #define QR_COPYSIGNI(_a,_b) QR_FLIPSIGNI(abs(_a),_b) /*Divides a signed integer by a positive value with exact rounding.*/ #define QR_DIVROUND(_x,_y) (((_x)+QR_FLIPSIGNI(_y>>1,_x))/(_y)) #define QR_CLAMPI(_a,_b,_c) (QR_MAXI(_a,QR_MINI(_b,_c))) #define QR_CLAMP255(_x) ((unsigned char)((((_x)<0)-1)&((_x)|-((_x)>255)))) #define QR_SWAP2I(_a,_b) \ do{ \ int t__; \ t__=(_a); \ (_a)=(_b); \ (_b)=t__; \ } \ while(0) /*Swaps two integers _a and _b if _a>_b.*/ #define QR_SORT2I(_a,_b) \ do{ \ int t__; \ t__=QR_MINI(_a,_b)^(_a); \ (_a)^=t__; \ (_b)^=t__; \ } \ while(0) #define QR_ILOG0(_v) (!!((_v)&0x2)) #define QR_ILOG1(_v) (((_v)&0xC)?2+QR_ILOG0((_v)>>2):QR_ILOG0(_v)) #define QR_ILOG2(_v) (((_v)&0xF0)?4+QR_ILOG1((_v)>>4):QR_ILOG1(_v)) #define QR_ILOG3(_v) (((_v)&0xFF00)?8+QR_ILOG2((_v)>>8):QR_ILOG2(_v)) #define QR_ILOG4(_v) (((_v)&0xFFFF0000)?16+QR_ILOG3((_v)>>16):QR_ILOG3(_v)) /*Computes the integer logarithm of a (positive, 32-bit) constant.*/ #define QR_ILOG(_v) ((int)QR_ILOG4((unsigned)(_v))) /*Multiplies 32-bit numbers _a and _b, adds (possibly 64-bit) number _r, and takes bits [_s,_s+31] of the result.*/ #define QR_FIXMUL(_a,_b,_r,_s) ((int)((_a)*(long long)(_b)+(_r)>>(_s))) /*Multiplies 32-bit numbers _a and _b, adds (possibly 64-bit) number _r, and gives all 64 bits of the result.*/ #define QR_EXTMUL(_a,_b,_r) ((_a)*(long long)(_b)+(_r)) unsigned qr_isqrt(unsigned _val); unsigned qr_ihypot(int _x,int _y); int qr_ilog(unsigned _val); #endif zbar-0.23/zbar/qrcode/isaac.c0000664000175000017500000000733713466560613013002 00000000000000/*Written by Timothy B. Terriberry (tterribe@xiph.org) 1999-2009 public domain. Based on the public domain implementation by Robert J. Jenkins Jr.*/ #include #include #include #include "isaac.h" #define ISAAC_MASK (0xFFFFFFFFU) static void isaac_update(isaac_ctx *_ctx){ unsigned *m; unsigned *r; unsigned a; unsigned b; unsigned x; unsigned y; int i; m=_ctx->m; r=_ctx->r; a=_ctx->a; b=_ctx->b+(++_ctx->c)&ISAAC_MASK; for(i=0;i>2]+a+b&ISAAC_MASK; r[i]=b=m[y>>ISAAC_SZ_LOG+2&ISAAC_SZ-1]+x&ISAAC_MASK; x=m[++i]; a=(a^a>>6)+m[i+ISAAC_SZ/2]&ISAAC_MASK; m[i]=y=m[(x&ISAAC_SZ-1<<2)>>2]+a+b&ISAAC_MASK; r[i]=b=m[y>>ISAAC_SZ_LOG+2&ISAAC_SZ-1]+x&ISAAC_MASK; x=m[++i]; a=(a^a<<2)+m[i+ISAAC_SZ/2]&ISAAC_MASK; m[i]=y=m[(x&ISAAC_SZ-1<<2)>>2]+a+b&ISAAC_MASK; r[i]=b=m[y>>ISAAC_SZ_LOG+2&ISAAC_SZ-1]+x&ISAAC_MASK; x=m[++i]; a=(a^a>>16)+m[i+ISAAC_SZ/2]&ISAAC_MASK; m[i]=y=m[(x&ISAAC_SZ-1<<2)>>2]+a+b&ISAAC_MASK; r[i]=b=m[y>>ISAAC_SZ_LOG+2&ISAAC_SZ-1]+x&ISAAC_MASK; } for(i=ISAAC_SZ/2;i>2]+a+b&ISAAC_MASK; r[i]=b=m[y>>ISAAC_SZ_LOG+2&ISAAC_SZ-1]+x&ISAAC_MASK; x=m[++i]; a=(a^a>>6)+m[i-ISAAC_SZ/2]&ISAAC_MASK; m[i]=y=m[(x&ISAAC_SZ-1<<2)>>2]+a+b&ISAAC_MASK; r[i]=b=m[y>>ISAAC_SZ_LOG+2&ISAAC_SZ-1]+x&ISAAC_MASK; x=m[++i]; a=(a^a<<2)+m[i-ISAAC_SZ/2]&ISAAC_MASK; m[i]=y=m[(x&ISAAC_SZ-1<<2)>>2]+a+b&ISAAC_MASK; r[i]=b=m[y>>ISAAC_SZ_LOG+2&ISAAC_SZ-1]+x&ISAAC_MASK; x=m[++i]; a=(a^a>>16)+m[i-ISAAC_SZ/2]&ISAAC_MASK; m[i]=y=m[(x&ISAAC_SZ-1<<2)>>2]+a+b&ISAAC_MASK; r[i]=b=m[y>>ISAAC_SZ_LOG+2&ISAAC_SZ-1]+x&ISAAC_MASK; } _ctx->b=b; _ctx->a=a; _ctx->n=ISAAC_SZ; } static void isaac_mix(unsigned _x[8]){ static const unsigned char SHIFT[8]={11,2,8,16,10,4,8,9}; int i; for(i=0;i<8;i++){ _x[i]^=_x[i+1&7]<>SHIFT[i]; _x[i+3&7]+=_x[i]; _x[i+1&7]+=_x[i+2&7]; } } void isaac_init(isaac_ctx *_ctx,const void *_seed,int _nseed){ const unsigned char *seed; unsigned *m; unsigned *r; unsigned x[8]; int i; int j; _ctx->a=_ctx->b=_ctx->c=0; m=_ctx->m; r=_ctx->r; x[0]=x[1]=x[2]=x[3]=x[4]=x[5]=x[6]=x[7]=0x9E3779B9; for(i=0;i<4;i++)isaac_mix(x); if(_nseed>ISAAC_SEED_SZ_MAX)_nseed=ISAAC_SEED_SZ_MAX; seed=(const unsigned char *)_seed; for(i=0;i<_nseed>>2;i++){ r[i]=seed[i<<2|3]<<24|seed[i<<2|2]<<16|seed[i<<2|1]<<8|seed[i<<2]; } if(_nseed&3){ r[i]=seed[i<<2]; for(j=1;j<(_nseed&3);j++)r[i]+=seed[i<<2|j]<<(j<<3); i++; } memset(r+i,0,(ISAAC_SZ-i)*sizeof(*r)); for(i=0;in)isaac_update(_ctx); return _ctx->r[--_ctx->n]; } /*Returns a uniform random integer less than the given maximum value. _n: The upper bound on the range of numbers returned (not inclusive). This must be strictly less than 2**32. Return: An integer uniformly distributed between 0 (inclusive) and _n (exclusive).*/ unsigned isaac_next_uint(isaac_ctx *_ctx,unsigned _n){ unsigned r; unsigned v; unsigned d; do{ r=isaac_next_uint32(_ctx); v=r%_n; d=r-v; } while((d+_n-1&ISAAC_MASK) * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #include #include #include "svg.h" static const char svg_head[] = "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n"; static FILE *svg = NULL; void svg_open (const char *name, double x, double y, double w, double h) { svg = fopen(name, "w"); if(!svg) return; /* FIXME calc scaled size */ fprintf(svg, svg_head, x, y, w, h); } void svg_close () { if(!svg) return; fprintf(svg, "\n"); fclose(svg); svg = NULL; } void svg_commentf (const char *format, ...) { if(!svg) return; fprintf(svg, "\n"); } void svg_image (const char *name, double width, double height) { if(!svg) return; fprintf(svg, "\n", width, height, name); } void svg_group_start (const char *cls, double deg, double sx, double sy, double x, double y) { if(!svg) return; fprintf(svg, "\n"); } void svg_group_end () { fprintf(svg, "\n"); } void svg_path_start (const char *cls, double scale, double x, double y) { if(!svg) return; fprintf(svg, "\n"); } void svg_path_close () { if(!svg) return; fprintf(svg, "z"); } void svg_path_moveto (svg_absrel_t abs, double x, double y) { if(!svg) return; fprintf(svg, " %c%g,%g", (abs) ? 'M' : 'm', x, y); } void svg_path_lineto(svg_absrel_t abs, double x, double y) { if(!svg) return; if(x && y) fprintf(svg, "%c%g,%g", (abs) ? 'L' : 'l', x, y); else if(x) fprintf(svg, "%c%g", (abs) ? 'H' : 'h', x); else if(y) fprintf(svg, "%c%g", (abs) ? 'V' : 'v', y); } zbar-0.23/zbar/scanner.c0000664000175000017500000002361713471225700012064 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #include /* malloc, free, abs */ #include #include /* memset */ #include #include "svg.h" #ifdef DEBUG_SCANNER # define DEBUG_LEVEL (DEBUG_SCANNER) #endif #include "debug.h" #ifndef ZBAR_FIXED # define ZBAR_FIXED 5 #endif #define ROUND (1 << (ZBAR_FIXED - 1)) /* FIXME add runtime config API for these */ #ifndef ZBAR_SCANNER_THRESH_MIN # define ZBAR_SCANNER_THRESH_MIN 4 #endif #ifndef ZBAR_SCANNER_THRESH_INIT_WEIGHT # define ZBAR_SCANNER_THRESH_INIT_WEIGHT .44 #endif #define THRESH_INIT ((unsigned)((ZBAR_SCANNER_THRESH_INIT_WEIGHT \ * (1 << (ZBAR_FIXED + 1)) + 1) / 2)) #ifndef ZBAR_SCANNER_THRESH_FADE # define ZBAR_SCANNER_THRESH_FADE 8 #endif #ifndef ZBAR_SCANNER_EWMA_WEIGHT # define ZBAR_SCANNER_EWMA_WEIGHT .78 #endif #define EWMA_WEIGHT ((unsigned)((ZBAR_SCANNER_EWMA_WEIGHT \ * (1 << (ZBAR_FIXED + 1)) + 1) / 2)) /* scanner state */ struct zbar_scanner_s { zbar_decoder_t *decoder; /* associated bar width decoder */ unsigned y1_min_thresh; /* minimum threshold */ unsigned x; /* relative scan position of next sample */ int y0[4]; /* short circular buffer of average intensities */ int y1_sign; /* slope at last crossing */ unsigned y1_thresh; /* current slope threshold */ unsigned cur_edge; /* interpolated position of tracking edge */ unsigned last_edge; /* interpolated position of last located edge */ unsigned width; /* last element width */ }; zbar_scanner_t *zbar_scanner_create (zbar_decoder_t *dcode) { zbar_scanner_t *scn = malloc(sizeof(zbar_scanner_t)); scn->decoder = dcode; scn->y1_min_thresh = ZBAR_SCANNER_THRESH_MIN; zbar_scanner_reset(scn); return(scn); } void zbar_scanner_destroy (zbar_scanner_t *scn) { free(scn); } zbar_symbol_type_t zbar_scanner_reset (zbar_scanner_t *scn) { memset(&scn->x, 0, sizeof(zbar_scanner_t) - offsetof(zbar_scanner_t, x)); scn->y1_thresh = scn->y1_min_thresh; if(scn->decoder) zbar_decoder_reset(scn->decoder); return(ZBAR_NONE); } unsigned zbar_scanner_get_width (const zbar_scanner_t *scn) { return(scn->width); } unsigned zbar_scanner_get_edge (const zbar_scanner_t *scn, unsigned offset, int prec) { unsigned edge = scn->last_edge - offset - (1 << ZBAR_FIXED) - ROUND; prec = ZBAR_FIXED - prec; if(prec > 0) return(edge >> prec); else if(!prec) return(edge); else return(edge << -prec); } zbar_color_t zbar_scanner_get_color (const zbar_scanner_t *scn) { return((scn->y1_sign <= 0) ? ZBAR_SPACE : ZBAR_BAR); } static inline unsigned calc_thresh (zbar_scanner_t *scn) { /* threshold 1st to improve noise rejection */ unsigned dx, thresh = scn->y1_thresh; unsigned long t; if((thresh <= scn->y1_min_thresh) || !scn->width) { dbprintf(1, " tmin=%d", scn->y1_min_thresh); return(scn->y1_min_thresh); } /* slowly return threshold to min */ dx = (scn->x << ZBAR_FIXED) - scn->last_edge; t = thresh * dx; t /= scn->width; t /= ZBAR_SCANNER_THRESH_FADE; dbprintf(1, " thr=%d t=%ld x=%d last=%d.%d (%d)", thresh, t, scn->x, scn->last_edge >> ZBAR_FIXED, scn->last_edge & ((1 << ZBAR_FIXED) - 1), dx); if(thresh > t) { thresh -= t; if(thresh > scn->y1_min_thresh) return(thresh); } scn->y1_thresh = scn->y1_min_thresh; return(scn->y1_min_thresh); } static inline zbar_symbol_type_t process_edge (zbar_scanner_t *scn, int y1) { if(!scn->y1_sign) scn->last_edge = scn->cur_edge = (1 << ZBAR_FIXED) + ROUND; else if(!scn->last_edge) scn->last_edge = scn->cur_edge; scn->width = scn->cur_edge - scn->last_edge; dbprintf(1, " sgn=%d cur=%d.%d w=%d (%s)\n", scn->y1_sign, scn->cur_edge >> ZBAR_FIXED, scn->cur_edge & ((1 << ZBAR_FIXED) - 1), scn->width, ((y1 > 0) ? "SPACE" : "BAR")); scn->last_edge = scn->cur_edge; #if DEBUG_SVG > 1 svg_path_moveto(SVG_ABS, scn->last_edge - (1 << ZBAR_FIXED) - ROUND, 0); #endif /* pass to decoder */ if(scn->decoder) return(zbar_decode_width(scn->decoder, scn->width)); return(ZBAR_PARTIAL); } inline zbar_symbol_type_t zbar_scanner_flush (zbar_scanner_t *scn) { unsigned x; if(!scn->y1_sign) return(ZBAR_NONE); x = (scn->x << ZBAR_FIXED) + ROUND; if(scn->cur_edge != x || scn->y1_sign > 0) { zbar_symbol_type_t edge = process_edge(scn, -scn->y1_sign); dbprintf(1, "flush0:"); scn->cur_edge = x; scn->y1_sign = -scn->y1_sign; return(edge); } scn->y1_sign = scn->width = 0; if(scn->decoder) return(zbar_decode_width(scn->decoder, 0)); return(ZBAR_PARTIAL); } zbar_symbol_type_t zbar_scanner_new_scan (zbar_scanner_t *scn) { zbar_symbol_type_t edge = ZBAR_NONE; while(scn->y1_sign) { zbar_symbol_type_t tmp = zbar_scanner_flush(scn); if(tmp < 0 || tmp > edge) edge = tmp; } /* reset scanner and associated decoder */ memset(&scn->x, 0, sizeof(zbar_scanner_t) - offsetof(zbar_scanner_t, x)); scn->y1_thresh = scn->y1_min_thresh; if(scn->decoder) zbar_decoder_new_scan(scn->decoder); return(edge); } zbar_symbol_type_t zbar_scan_y (zbar_scanner_t *scn, int y) { /* FIXME calc and clip to max y range... */ /* retrieve short value history */ register int x = scn->x; register int y0_1 = scn->y0[(x - 1) & 3]; register int y0_0 = y0_1; register int y0_2, y0_3, y1_1, y2_1, y2_2; zbar_symbol_type_t edge; if(x) { /* update weighted moving average */ y0_0 += ((int)((y - y0_1) * EWMA_WEIGHT)) >> ZBAR_FIXED; scn->y0[x & 3] = y0_0; } else y0_0 = y0_1 = scn->y0[0] = scn->y0[1] = scn->y0[2] = scn->y0[3] = y; y0_2 = scn->y0[(x - 2) & 3]; y0_3 = scn->y0[(x - 3) & 3]; /* 1st differential @ x-1 */ y1_1 = y0_1 - y0_2; { register int y1_2 = y0_2 - y0_3; if((abs(y1_1) < abs(y1_2)) && ((y1_1 >= 0) == (y1_2 >= 0))) y1_1 = y1_2; } /* 2nd differentials @ x-1 & x-2 */ y2_1 = y0_0 - (y0_1 * 2) + y0_2; y2_2 = y0_1 - (y0_2 * 2) + y0_3; dbprintf(1, "scan: x=%d y=%d y0=%d y1=%d y2=%d", x, y, y0_1, y1_1, y2_1); edge = ZBAR_NONE; /* 2nd zero-crossing is 1st local min/max - could be edge */ if((!y2_1 || ((y2_1 > 0) ? y2_2 < 0 : y2_2 > 0)) && (calc_thresh(scn) <= abs(y1_1))) { /* check for 1st sign change */ char y1_rev = (scn->y1_sign > 0) ? y1_1 < 0 : y1_1 > 0; if(y1_rev) /* intensity change reversal - finalize previous edge */ edge = process_edge(scn, y1_1); if(y1_rev || (abs(scn->y1_sign) < abs(y1_1))) { int d; scn->y1_sign = y1_1; /* adaptive thresholding */ /* start at multiple of new min/max */ scn->y1_thresh = (abs(y1_1) * THRESH_INIT + ROUND) >> ZBAR_FIXED; dbprintf(1, "\tthr=%d", scn->y1_thresh); if(scn->y1_thresh < scn->y1_min_thresh) scn->y1_thresh = scn->y1_min_thresh; /* update current edge */ d = y2_1 - y2_2; scn->cur_edge = 1 << ZBAR_FIXED; if(!d) scn->cur_edge >>= 1; else if(y2_1) /* interpolate zero crossing */ scn->cur_edge -= ((y2_1 << ZBAR_FIXED) + 1) / d; scn->cur_edge += x << ZBAR_FIXED; dbprintf(1, "\n"); } } else dbprintf(1, "\n"); /* FIXME add fall-thru pass to decoder after heuristic "idle" period (eg, 6-8 * last width) */ scn->x = x + 1; return(edge); } /* undocumented API for drawing cutesy debug graphics */ void zbar_scanner_get_state (const zbar_scanner_t *scn, unsigned *x, unsigned *cur_edge, unsigned *last_edge, int *y0, int *y1, int *y2, int *y1_thresh) { register int y0_0 = scn->y0[(scn->x - 1) & 3]; register int y0_1 = scn->y0[(scn->x - 2) & 3]; register int y0_2 = scn->y0[(scn->x - 3) & 3]; zbar_scanner_t *mut_scn; if(x) *x = scn->x - 1; if(last_edge) *last_edge = scn->last_edge; if(y0) *y0 = y0_1; if(y1) *y1 = y0_1 - y0_2; if(y2) *y2 = y0_0 - (y0_1 * 2) + y0_2; /* NB not quite accurate (uses updated x) */ mut_scn = (zbar_scanner_t*)scn; if(y1_thresh) *y1_thresh = calc_thresh(mut_scn); dbprintf(1, "\n"); } zbar-0.23/zbar/sqcode.h0000664000175000017500000000133413471225716011715 00000000000000/*Copyright (C) 2018 Javier Serrano Polo You can redistribute this library and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.*/ #ifndef _SQCODE_H_ #define _SQCODE_H_ #include typedef struct sq_reader sq_reader; sq_reader *_zbar_sq_create(void); void _zbar_sq_destroy(sq_reader *reader); void _zbar_sq_reset(sq_reader *reader); int _zbar_sq_new_config(sq_reader *reader, unsigned config); int _zbar_sq_decode(sq_reader *reader, zbar_image_scanner_t *iscn, zbar_image_t *img); #endif zbar-0.23/zbar/video/0000775000175000017500000000000013471606255011454 500000000000000zbar-0.23/zbar/video/vfw.c0000664000175000017500000003704313471225716012350 00000000000000/*------------------------------------------------------------------------ * Copyright 2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "video.h" #include "thread.h" #include #include #define MAX_DRIVERS 10 #define MAX_NAME 128 #define BIH_FMT "%ldx%ld @%dbpp (%lx) cmp=%.4s(%08lx) res=%ldx%ld clr=%ld/%ld (%lx)" #define BIH_FIELDS(bih) \ (bih)->biWidth, (bih)->biHeight, (bih)->biBitCount, (bih)->biSizeImage, \ (char*)&(bih)->biCompression, (bih)->biCompression, \ (bih)->biXPelsPerMeter, (bih)->biYPelsPerMeter, \ (bih)->biClrImportant, (bih)->biClrUsed, (bih)->biSize struct video_state_s { zbar_thread_t thread; /* capture message pump */ HANDLE captured; HWND hwnd; /* vfw interface */ HANDLE notify; /* capture thread status change */ int bi_size; /* size of bih */ BITMAPINFOHEADER *bih; /* video format details */ zbar_image_t *image; /* currently capturing frame */ }; static const uint32_t vfw_formats[] = { /* planar YUV formats */ fourcc('I','4','2','0'), /* FIXME YU12 is IYUV in windows */ fourcc('Y','V','1','2'), /* FIXME IMC[1-4]? */ /* planar Y + packed UV plane */ fourcc('N','V','1','2'), /* packed YUV formats */ fourcc('U','Y','V','Y'), fourcc('Y','U','Y','2'), /* FIXME add YVYU */ /* FIXME AYUV? Y411? Y41P? */ /* packed rgb formats */ fourcc('B','G','R','3'), fourcc('B','G','R','4'), fourcc('Y','V','U','9'), /* basic grayscale format */ fourcc('G','R','E','Y'), fourcc('Y','8','0','0'), /* compressed formats */ fourcc('J','P','E','G'), /* terminator */ 0 }; #define VFW_NUM_FORMATS (sizeof(vfw_formats) / sizeof(uint32_t)) static ZTHREAD vfw_capture_thread (void *arg) { zbar_video_t *vdo = arg; video_state_t *state = vdo->state; zbar_thread_t *thr = &state->thread; state->hwnd = capCreateCaptureWindow(NULL, WS_POPUP, 0, 0, 1, 1, NULL, 0); if(!state->hwnd) goto done; _zbar_mutex_lock(&vdo->qlock); _zbar_thread_init(thr); zprintf(4, "spawned vfw capture thread (thr=%04lx)\n", _zbar_thread_self()); MSG msg; int rc = 0; while(thr->started && rc >= 0 && rc <= 1) { _zbar_mutex_unlock(&vdo->qlock); rc = MsgWaitForMultipleObjects(1, &thr->notify, 0, INFINITE, QS_ALLINPUT); if(rc == 1) while(PeekMessage(&msg, NULL, 0, 0, PM_NOYIELD | PM_REMOVE)) if(rc > 0) { TranslateMessage(&msg); DispatchMessage(&msg); } _zbar_mutex_lock(&vdo->qlock); } done: thr->running = 0; _zbar_event_trigger(&thr->activity); _zbar_mutex_unlock(&vdo->qlock); return(0); } static LRESULT CALLBACK vfw_stream_cb (HWND hwnd, VIDEOHDR *hdr) { if(!hwnd || !hdr) return(0); zbar_video_t *vdo = (void*)capGetUserData(hwnd); _zbar_mutex_lock(&vdo->qlock); zbar_image_t *img = vdo->state->image; if(!img) { _zbar_mutex_lock(&vdo->qlock); img = video_dq_image(vdo); } if(img) { img->data = hdr->lpData; img->datalen = hdr->dwBufferLength; vdo->state->image = img; SetEvent(vdo->state->captured); } _zbar_mutex_unlock(&vdo->qlock); return(1); } static LRESULT CALLBACK vfw_error_cb (HWND hwnd, int errid, const char *errmsg) { if(!hwnd) return(0); zbar_video_t *vdo = (void*)capGetUserData(hwnd); zprintf(2, "id=%d msg=%s\n", errid, errmsg); _zbar_mutex_lock(&vdo->qlock); vdo->state->image = NULL; SetEvent(vdo->state->captured); _zbar_mutex_unlock(&vdo->qlock); return(1); } static int vfw_nq (zbar_video_t *vdo, zbar_image_t *img) { img->data = NULL; img->datalen = 0; return(video_nq_image(vdo, img)); } /// Platform dependent part of #zbar_video_next_image, which blocks /// until an image is available. /** Must be called with video lock held and returns * with the lock released. *

Waits for the image from `vdo->state->image`. If available, * this field is nulled. Releases the lock temporarily when waiting for * the `vdo->state->captured` signal. */ static zbar_image_t *vfw_dq (zbar_video_t *vdo) { zbar_image_t *img = vdo->state->image; if(!img) { _zbar_mutex_unlock(&vdo->qlock); int rc = WaitForSingleObject(vdo->state->captured, INFINITE); // note: until we get the lock again the grabber thread might // already provide the next sample (which is fine) _zbar_mutex_lock(&vdo->qlock); switch (rc) { case WAIT_OBJECT_0: img = vdo->state->image; break; case WAIT_ABANDONED: err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "event handle abandoned"); break; case WAIT_FAILED: err_capture(vdo, SEV_ERROR, ZBAR_ERR_WINAPI, __func__, "Waiting for image failed"); break; } } vdo->state->image = NULL; ResetEvent(vdo->state->captured); video_unlock(vdo); return(img); } static int vfw_start (zbar_video_t *vdo) { ResetEvent(vdo->state->captured); if(!capCaptureSequenceNoFile(vdo->state->hwnd)) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "starting video stream")); return(0); } static int vfw_stop (zbar_video_t *vdo) { video_state_t *state = vdo->state; if(!capCaptureAbort(state->hwnd)) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "stopping video stream")); _zbar_mutex_lock(&vdo->qlock); if(state->image) state->image = NULL; SetEvent(state->captured); _zbar_mutex_unlock(&vdo->qlock); return(0); } static int vfw_set_format (zbar_video_t *vdo, uint32_t fmt) { const zbar_format_def_t *fmtdef = _zbar_format_lookup(fmt); if(!fmtdef->format) return(err_capture_int(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "unsupported vfw format: %x", fmt)); BITMAPINFOHEADER *bih = vdo->state->bih; assert(bih); bih->biWidth = vdo->width; bih->biHeight = vdo->height; switch(fmtdef->group) { case ZBAR_FMT_GRAY: bih->biBitCount = 8; break; case ZBAR_FMT_YUV_PLANAR: case ZBAR_FMT_YUV_PACKED: case ZBAR_FMT_YUV_NV: bih->biBitCount = 8 + (16 >> (fmtdef->p.yuv.xsub2 + fmtdef->p.yuv.ysub2)); break; case ZBAR_FMT_RGB_PACKED: bih->biBitCount = fmtdef->p.rgb.bpp * 8; break; default: bih->biBitCount = 0; } bih->biClrUsed = bih->biClrImportant = 0; bih->biCompression = fmt; zprintf(8, "setting format: %.4s(%08x) " BIH_FMT "\n", (char*)&fmt, fmt, BIH_FIELDS(bih)); if(!capSetVideoFormat(vdo->state->hwnd, bih, vdo->state->bi_size)) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "setting video format")); if(!capGetVideoFormat(vdo->state->hwnd, bih, vdo->state->bi_size)) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "getting video format")); if(bih->biCompression != fmt) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "video format set ignored")); vdo->format = fmt; vdo->width = bih->biWidth; vdo->height = bih->biHeight; vdo->datalen = bih->biSizeImage; zprintf(4, "set new format: %.4s(%08x) " BIH_FMT "\n", (char*)&fmt, fmt, BIH_FIELDS(bih)); return(0); } static int vfw_init (zbar_video_t *vdo, uint32_t fmt) { if(vfw_set_format(vdo, fmt)) return(-1); HWND hwnd = vdo->state->hwnd; CAPTUREPARMS cp; if(!capCaptureGetSetup(hwnd, &cp, sizeof(cp))) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_WINAPI, __func__, "retrieving capture parameters")); cp.dwRequestMicroSecPerFrame = 33333; cp.fMakeUserHitOKToCapture = 0; cp.wPercentDropForError = 90; cp.fYield = 1; cp.wNumVideoRequested = vdo->num_images; cp.fCaptureAudio = 0; cp.vKeyAbort = 0; cp.fAbortLeftMouse = 0; cp.fAbortRightMouse = 0; cp.fLimitEnabled = 0; if(!capCaptureSetSetup(hwnd, &cp, sizeof(cp))) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_WINAPI, __func__, "setting capture parameters")); if(!capCaptureGetSetup(hwnd, &cp, sizeof(cp))) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_WINAPI, __func__, "checking capture parameters")); /* ignore errors since we skipped checking fHasOverlay */ capOverlay(hwnd, 0); if(!capPreview(hwnd, 0) || !capPreviewScale(hwnd, 0)) err_capture(vdo, SEV_WARNING, ZBAR_ERR_WINAPI, __func__, "disabling preview"); if(!capSetCallbackOnVideoStream(hwnd, vfw_stream_cb) || !capSetCallbackOnError(hwnd, vfw_error_cb)) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_BUSY, __func__, "setting capture callbacks")); vdo->num_images = cp.wNumVideoRequested; vdo->iomode = VIDEO_MMAP; /* driver provides "locked" buffers */ zprintf(3, "initialized video capture: %d buffers %ldms/frame\n", vdo->num_images, cp.dwRequestMicroSecPerFrame); return(0); } static int vfw_cleanup (zbar_video_t *vdo) { /* close open device */ video_state_t *state = vdo->state; /* NB this has to go here so the thread can pump messages during cleanup */ capDriverDisconnect(state->hwnd); DestroyWindow(state->hwnd); state->hwnd = NULL; _zbar_thread_stop(&state->thread, &vdo->qlock); if(state->captured) { CloseHandle(state->captured); state->captured = NULL; } return(0); } static int vfw_probe_format (zbar_video_t *vdo, uint32_t fmt) { const zbar_format_def_t *fmtdef = _zbar_format_lookup(fmt); if(!fmtdef) return(0); zprintf(4, " trying %.4s(%08x)...\n", (char*)&fmt, fmt); BITMAPINFOHEADER *bih = vdo->state->bih; bih->biWidth = vdo->width; bih->biHeight = vdo->height; switch(fmtdef->group) { case ZBAR_FMT_GRAY: bih->biBitCount = 8; break; case ZBAR_FMT_YUV_PLANAR: case ZBAR_FMT_YUV_PACKED: case ZBAR_FMT_YUV_NV: bih->biBitCount = 8 + (16 >> (fmtdef->p.yuv.xsub2 + fmtdef->p.yuv.ysub2)); break; case ZBAR_FMT_RGB_PACKED: bih->biBitCount = fmtdef->p.rgb.bpp * 8; break; default: bih->biBitCount = 0; } bih->biCompression = fmt; if(!capSetVideoFormat(vdo->state->hwnd, bih, vdo->state->bi_size)) { zprintf(4, "\tno (set fails)\n"); return(0); } if(!capGetVideoFormat(vdo->state->hwnd, bih, vdo->state->bi_size)) return(0/*FIXME error...*/); zprintf(6, "\tactual: " BIH_FMT "\n", BIH_FIELDS(bih)); if(bih->biCompression != fmt) { zprintf(4, "\tno (set ignored)\n"); return(0); } zprintf(4, "\tyes\n"); return(1); } static int vfw_probe (zbar_video_t *vdo) { video_state_t *state = vdo->state; state->bi_size = capGetVideoFormatSize(state->hwnd); BITMAPINFOHEADER *bih = state->bih = realloc(state->bih, state->bi_size); /* FIXME check OOM */ if(!capSetUserData(state->hwnd, (LONG)vdo) || !state->bi_size || !bih || !capGetVideoFormat(state->hwnd, bih, state->bi_size)) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "setting up video capture")); zprintf(3, "initial format: " BIH_FMT " (bisz=%x)\n", BIH_FIELDS(bih), state->bi_size); if(!vdo->width || !vdo->height) { vdo->width = bih->biWidth; vdo->height = bih->biHeight; } vdo->datalen = bih->biSizeImage; zprintf(2, "probing supported formats:\n"); vdo->formats = calloc(VFW_NUM_FORMATS, sizeof(uint32_t)); int n = 0; const uint32_t *fmt; for(fmt = vfw_formats; *fmt; fmt++) if(vfw_probe_format(vdo, *fmt)) vdo->formats[n++] = *fmt; vdo->formats = realloc(vdo->formats, (n + 1) * sizeof(uint32_t)); vdo->width = bih->biWidth; vdo->height = bih->biHeight; vdo->intf = VIDEO_VFW; vdo->init = vfw_init; vdo->start = vfw_start; vdo->stop = vfw_stop; vdo->cleanup = vfw_cleanup; vdo->nq = vfw_nq; vdo->dq = vfw_dq; return(0); } int _zbar_video_open (zbar_video_t *vdo, const char *dev) { video_state_t *state = vdo->state; if(!state) state = vdo->state = calloc(1, sizeof(video_state_t)); int reqid = -1; if((!strncmp(dev, "/dev/video", 10) || !strncmp(dev, "\\dev\\video", 10)) && dev[10] >= '0' && dev[10] <= '9' && !dev[11]) reqid = dev[10] - '0'; else if(strlen(dev) == 1 && dev[0] >= '0' && dev[0] <= '9') reqid = dev[0] - '0'; zprintf(6, "searching for camera: %s (%d)\n", dev, reqid); char name[MAX_NAME], desc[MAX_NAME]; int devid; for(devid = 0; devid < MAX_DRIVERS; devid++) { if(!capGetDriverDescription(devid, name, MAX_NAME, desc, MAX_NAME)) { /* FIXME TBD error */ zprintf(6, " [%d] not found...\n", devid); continue; } zprintf(6, " [%d] %.100s - %.100s\n", devid, name, desc); if((reqid >= 0) ? devid == reqid : !strncmp(dev, name, MAX_NAME)) break; } if(devid >= MAX_DRIVERS) return(err_capture_str(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "video device not found '%s'", dev)); if(!state->captured) state->captured = CreateEvent(NULL, TRUE, FALSE, NULL); else ResetEvent(state->captured); if(_zbar_thread_start(&state->thread, vfw_capture_thread, vdo, NULL)) return(-1); /* FIXME error */ assert(state->hwnd); if(!capDriverConnect(state->hwnd, devid)) { _zbar_thread_stop(&state->thread, NULL); return(err_capture_str(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "failed to connect to camera '%s'", dev)); } zprintf(1, "opened camera: %.60s (%d) (thr=%04lx)\n", name, devid, _zbar_thread_self()); if(vfw_probe(vdo)) { _zbar_thread_stop(&state->thread, NULL); return(-1); } return(0); } zbar-0.23/zbar/video/v4l2.c0000664000175000017500000011713613471225716012337 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDLIB_H # include #endif #include #include #include #include #ifdef HAVE_SYS_IOCTL_H # include #endif #ifdef HAVE_SYS_MMAN_H # include #endif #ifdef HAVE_LIBV4L2_H # include # include #else # define v4l2_close close # define v4l2_ioctl ioctl # define v4l2_mmap mmap # define v4l2_munmap munmap #endif #include #include "video.h" #include "image.h" #define V4L2_FORMATS_MAX 64 #define V4L2_FORMATS_SIZE_MAX 256 typedef struct video_controls_priv_s { struct video_controls_s s; // Private fields __u32 id; } video_controls_priv_t; static int v4l2_nq (zbar_video_t *vdo, zbar_image_t *img) { if(vdo->iomode == VIDEO_READWRITE) return(video_nq_image(vdo, img)); if(video_unlock(vdo)) return(-1); struct v4l2_buffer vbuf; memset(&vbuf, 0, sizeof(vbuf)); vbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if(vdo->iomode == VIDEO_MMAP) { vbuf.memory = V4L2_MEMORY_MMAP; vbuf.index = img->srcidx; } else { vbuf.memory = V4L2_MEMORY_USERPTR; vbuf.m.userptr = (unsigned long)img->data; vbuf.length = img->datalen; vbuf.index = img->srcidx; /* FIXME workaround broken drivers */ } if(v4l2_ioctl(vdo->fd, VIDIOC_QBUF, &vbuf) < 0) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "queuing video buffer (VIDIOC_QBUF)")); return(0); } static zbar_image_t *v4l2_dq (zbar_video_t *vdo) { zbar_image_t *img; int fd = vdo->fd; if(vdo->iomode != VIDEO_READWRITE) { video_iomode_t iomode = vdo->iomode; if(video_unlock(vdo)) return(NULL); struct v4l2_buffer vbuf; memset(&vbuf, 0, sizeof(vbuf)); vbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if(iomode == VIDEO_MMAP) vbuf.memory = V4L2_MEMORY_MMAP; else vbuf.memory = V4L2_MEMORY_USERPTR; if(v4l2_ioctl(fd, VIDIOC_DQBUF, &vbuf) < 0) return(NULL); if(iomode == VIDEO_MMAP) { assert(vbuf.index >= 0); assert(vbuf.index < vdo->num_images); img = vdo->images[vbuf.index]; } else { /* reverse map pointer back to image (FIXME) */ assert(vbuf.m.userptr >= (unsigned long)vdo->buf); assert(vbuf.m.userptr < (unsigned long)(vdo->buf + vdo->buflen)); int i = (vbuf.m.userptr - (unsigned long)vdo->buf) / vdo->datalen; assert(i >= 0); assert(i < vdo->num_images); img = vdo->images[i]; assert(vbuf.m.userptr == (unsigned long)img->data); } } else { img = video_dq_image(vdo); if(!img) return(NULL); /* FIXME should read entire image */ unsigned long datalen = read(fd, (void*)img->data, img->datalen); if(datalen < 0) return(NULL); else if(datalen != img->datalen) zprintf(0, "WARNING: read() size mismatch: 0x%lx != 0x%lx\n", datalen, img->datalen); } return(img); } static int v4l2_start (zbar_video_t *vdo) { if(vdo->iomode == VIDEO_READWRITE) return(0); enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if(v4l2_ioctl(vdo->fd, VIDIOC_STREAMON, &type) < 0) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "starting video stream (VIDIOC_STREAMON)")); return(0); } static int v4l2_stop (zbar_video_t *vdo) { if(vdo->iomode == VIDEO_READWRITE) return(0); enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if(v4l2_ioctl(vdo->fd, VIDIOC_STREAMOFF, &type) < 0) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "stopping video stream (VIDIOC_STREAMOFF)")); return(0); } static int v4l2_cleanup (zbar_video_t *vdo) { if(vdo->iomode == VIDEO_READWRITE) return(0); struct v4l2_requestbuffers rb; memset(&rb, 0, sizeof(rb)); rb.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if(vdo->iomode == VIDEO_MMAP) { rb.memory = V4L2_MEMORY_MMAP; int i; for(i = 0; i < vdo->num_images; i++) { zbar_image_t *img = vdo->images[i]; if(img->data && v4l2_munmap((void*)img->data, img->datalen)) err_capture(vdo, SEV_WARNING, ZBAR_ERR_SYSTEM, __func__, "unmapping video frame buffers"); img->data = NULL; img->datalen = 0; } } else rb.memory = V4L2_MEMORY_USERPTR; /* requesting 0 buffers * should implicitly disable streaming */ if(v4l2_ioctl(vdo->fd, VIDIOC_REQBUFS, &rb) < 0) err_capture(vdo, SEV_WARNING, ZBAR_ERR_SYSTEM, __func__, "releasing video frame buffers (VIDIOC_REQBUFS)"); /* v4l2_close v4l2_open device */ if(vdo->fd >= 0) { v4l2_close(vdo->fd); vdo->fd = -1; } return(0); } static int v4l2_mmap_buffers (zbar_video_t *vdo) { struct v4l2_buffer vbuf; memset(&vbuf, 0, sizeof(vbuf)); vbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; vbuf.memory = V4L2_MEMORY_MMAP; int i; for(i = 0; i < vdo->num_images; i++) { vbuf.index = i; if(v4l2_ioctl(vdo->fd, VIDIOC_QUERYBUF, &vbuf) < 0) /* FIXME cleanup */ return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "querying video buffer (VIDIOC_QUERYBUF)")); if(vbuf.length < vdo->datalen) fprintf(stderr, "WARNING: insufficient v4l2 video buffer size:\n" "\tvbuf[%d].length=%x datalen=%lx image=%d x %d %.4s(%08x)\n", i, vbuf.length, vdo->datalen, vdo->width, vdo->height, (char*)&vdo->format, vdo->format); zbar_image_t *img = vdo->images[i]; img->datalen = vbuf.length; img->data = v4l2_mmap(NULL, vbuf.length, PROT_READ | PROT_WRITE, MAP_SHARED, vdo->fd, vbuf.m.offset); if(img->data == MAP_FAILED) /* FIXME cleanup */ return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "mapping video frame buffers")); zprintf(2, " buf[%d] 0x%lx bytes @%p\n", i, img->datalen, img->data); } return(0); } static int v4l2_request_buffers (zbar_video_t *vdo, uint32_t num_images) { struct v4l2_requestbuffers rb; memset(&rb, 0, sizeof(rb)); rb.count = num_images; rb.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if(vdo->iomode == VIDEO_MMAP) rb.memory = V4L2_MEMORY_MMAP; else rb.memory = V4L2_MEMORY_USERPTR; if(v4l2_ioctl(vdo->fd, VIDIOC_REQBUFS, &rb) < 0) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "requesting video frame buffers (VIDIOC_REQBUFS)")); if(num_images && rb.count) vdo->num_images = rb.count; return(0); } static int v4l2_set_format (zbar_video_t *vdo, uint32_t fmt) { struct v4l2_format vfmt; struct v4l2_pix_format *vpix = &vfmt.fmt.pix; memset(&vfmt, 0, sizeof(vfmt)); vfmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; vpix->width = vdo->width; vpix->height = vdo->height; vpix->pixelformat = fmt; vpix->field = V4L2_FIELD_NONE; int rc = 0; if((rc = v4l2_ioctl(vdo->fd, VIDIOC_S_FMT, &vfmt)) < 0) { /* several broken drivers return an error if we request * no interlacing (NB v4l2 spec violation) * ...try again with an interlaced request */ zprintf(1, "VIDIOC_S_FMT returned %d(%d), trying interlaced...\n", rc, errno); /* FIXME this might be _ANY once we can de-interlace */ vpix->field = V4L2_FIELD_INTERLACED; if(v4l2_ioctl(vdo->fd, VIDIOC_S_FMT, &vfmt) < 0) return(err_capture_int(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "setting format %x (VIDIOC_S_FMT)", fmt)); zprintf(0, "WARNING: broken driver returned error when non-interlaced" " format requested\n"); } struct v4l2_format newfmt; struct v4l2_pix_format *newpix = &newfmt.fmt.pix; memset(&newfmt, 0, sizeof(newfmt)); newfmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if(v4l2_ioctl(vdo->fd, VIDIOC_G_FMT, &newfmt) < 0) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "querying format (VIDIOC_G_FMT)")); if(newpix->field != V4L2_FIELD_NONE) err_capture(vdo, SEV_WARNING, ZBAR_ERR_INVALID, __func__, "video driver only supports interlaced format," " vertical scanning may not work"); if(newpix->pixelformat != fmt /* FIXME bpl/bpp checks? */) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "video driver can't provide compatible format")); vdo->format = fmt; vdo->width = newpix->width; vdo->height = newpix->height; vdo->datalen = newpix->sizeimage; zprintf(1, "set new format: %.4s(%08x) %u x %u (0x%lx)\n", (char*)&vdo->format, vdo->format, vdo->width, vdo->height, vdo->datalen); return(0); } static int v4l2_init (zbar_video_t *vdo, uint32_t fmt) { struct v4l2_requestbuffers rb; if(v4l2_set_format(vdo, fmt)) return(-1); memset(&rb, 0, sizeof(rb)); rb.count = vdo->num_images; rb.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if(vdo->iomode == VIDEO_MMAP) rb.memory = V4L2_MEMORY_MMAP; else rb.memory = V4L2_MEMORY_USERPTR; if(v4l2_ioctl(vdo->fd, VIDIOC_REQBUFS, &rb) < 0) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "requesting video frame buffers (VIDIOC_REQBUFS)")); if(!rb.count) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "driver returned 0 buffers")); if(vdo->num_images > rb.count) vdo->num_images = rb.count; zprintf(1, "using %u buffers (of %d requested)\n", rb.count, vdo->num_images); if(vdo->iomode == VIDEO_MMAP) return(v4l2_mmap_buffers(vdo)); if(vdo->iomode == VIDEO_USERPTR) return(v4l2_request_buffers(vdo, vdo->num_images)); return(0); } static int v4l2_probe_iomode (zbar_video_t *vdo) { struct v4l2_requestbuffers rb; memset(&rb, 0, sizeof(rb)); rb.count = vdo->num_images; rb.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if(vdo->iomode == VIDEO_MMAP) rb.memory = V4L2_MEMORY_MMAP; else rb.memory = V4L2_MEMORY_USERPTR; if(v4l2_ioctl(vdo->fd, VIDIOC_REQBUFS, &rb) < 0) { if(vdo->iomode) return(err_capture_int(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "unsupported iomode requested (%d)", vdo->iomode)); else if(errno != EINVAL) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "querying streaming mode (VIDIOC_REQBUFS)")); #ifdef HAVE_SYS_MMAN_H err_capture(vdo, SEV_WARNING, ZBAR_ERR_SYSTEM, __func__, "USERPTR failed. Falling back to mmap"); vdo->iomode = VIDEO_MMAP; #else return err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "Userptr not supported, and zbar was compiled without mmap support")); #endif } else { if(!vdo->iomode) rb.memory = V4L2_MEMORY_USERPTR; /* Update the num_images with the max supported by the driver */ if(rb.count) vdo->num_images = rb.count; else err_capture(vdo, SEV_WARNING, ZBAR_ERR_SYSTEM, __func__, "Something is wrong: number of buffers returned by REQBUF is zero!"); /* requesting 0 buffers * This cleans up the buffers allocated previously on probe */ rb.count = 0; if(v4l2_ioctl(vdo->fd, VIDIOC_REQBUFS, &rb) < 0) err_capture(vdo, SEV_WARNING, ZBAR_ERR_SYSTEM, __func__, "releasing video frame buffers (VIDIOC_REQBUFS)"); } return(0); } static inline void v4l2_max_size (zbar_video_t *vdo, uint32_t pixfmt, uint32_t *max_width, uint32_t *max_height) { int mwidth = 0, mheight = 0, i; struct v4l2_frmsizeenum frm; for(i = 0; i < V4L2_FORMATS_SIZE_MAX; i++) { memset(&frm, 0, sizeof(frm)); frm.index = i; frm.pixel_format = pixfmt; if(v4l2_ioctl(vdo->fd, VIDIOC_ENUM_FRAMESIZES, &frm)) break; switch (frm.type) { case V4L2_FRMSIZE_TYPE_DISCRETE: mwidth = frm.discrete.width; mheight = frm.discrete.height; break; case V4L2_FRMSIZE_TYPE_CONTINUOUS: case V4L2_FRMSIZE_TYPE_STEPWISE: mwidth = frm.stepwise.max_width; mheight = frm.stepwise.max_height; break; default: continue; } if (mwidth > *max_width) *max_width = mwidth; if (mheight > *max_height) *max_height = mheight; } } static inline int v4l2_probe_formats (zbar_video_t *vdo) { int n_formats = 0, n_emu_formats = 0; uint32_t max_width = 0, max_height = 0; if(vdo->width && vdo->height) zprintf(1, "Caller requested an specific size: %d x %d\n", vdo->width, vdo->height); zprintf(2, "enumerating supported formats:\n"); struct v4l2_fmtdesc desc; memset(&desc, 0, sizeof(desc)); desc.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; for(desc.index = 0; desc.index < V4L2_FORMATS_MAX; desc.index++) { if(v4l2_ioctl(vdo->fd, VIDIOC_ENUM_FMT, &desc) < 0) break; zprintf(2, " [%d] %.4s : %s%s%s\n", desc.index, (char*)&desc.pixelformat, desc.description, (desc.flags & V4L2_FMT_FLAG_COMPRESSED) ? " COMPRESSED" : "", (desc.flags & V4L2_FMT_FLAG_EMULATED) ? " EMULATED" : ""); if (desc.flags & V4L2_FMT_FLAG_EMULATED) { vdo->emu_formats = realloc(vdo->emu_formats, (n_emu_formats + 2) * sizeof(uint32_t)); vdo->emu_formats[n_emu_formats++] = desc.pixelformat; } else { vdo->formats = realloc(vdo->formats, (n_formats + 2) * sizeof(uint32_t)); vdo->formats[n_formats++] = desc.pixelformat; } if(!vdo->width || !vdo->height) v4l2_max_size(vdo, desc.pixelformat, &max_width, &max_height); } if(!vdo->width || !vdo->height) { zprintf(1, "Max supported size: %d x %d\n", max_width, max_height); if (max_width && max_height) { vdo->width = max_width; vdo->height = max_height; } else { /* fallback to large size, driver reduces to max available */ vdo->width = 640 * 64; vdo->height = 480 * 64; } } if(!desc.index) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "enumerating video formats (VIDIOC_ENUM_FMT)")); if(vdo->formats) vdo->formats[n_formats] = 0; if(vdo->emu_formats) vdo->emu_formats[n_emu_formats] = 0; if(!vdo->formats && vdo->emu_formats) { /* * If only emu formats are available, just move them to vdo->formats. * This happens when libv4l detects that the only available fourcc * formats are webcam proprietary formats or bayer formats. */ vdo->formats = vdo->emu_formats; vdo->emu_formats = NULL; } zprintf(2, "Found %d formats and %d emulated formats.\n", n_formats, n_emu_formats); struct v4l2_format fmt; struct v4l2_pix_format *pix = &fmt.fmt.pix; memset(&fmt, 0, sizeof(fmt)); fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if(v4l2_ioctl(vdo->fd, VIDIOC_G_FMT, &fmt) < 0) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "querying current video format (VIDIO_G_FMT)")); zprintf(1, "current format: %.4s(%08x) %u x %u%s (line=0x%x size=0x%x)\n", (char*)&pix->pixelformat, pix->pixelformat, pix->width, pix->height, (pix->field != V4L2_FIELD_NONE) ? " INTERLACED" : "", pix->bytesperline, pix->sizeimage); vdo->format = pix->pixelformat; vdo->datalen = pix->sizeimage; if(pix->width == vdo->width && pix->height == vdo->height) return(0); struct v4l2_format maxfmt; struct v4l2_pix_format *maxpix = &maxfmt.fmt.pix; memcpy(&maxfmt, &fmt, sizeof(maxfmt)); maxpix->width = vdo->width; maxpix->height = vdo->height; zprintf(1, "setting requested size: %d x %d\n", vdo->width, vdo->height); if(v4l2_ioctl(vdo->fd, VIDIOC_S_FMT, &maxfmt) < 0) { zprintf(1, "set FAILED...trying to recover original format\n"); /* ignore errors (driver broken anyway) */ v4l2_ioctl(vdo->fd, VIDIOC_S_FMT, &fmt); } memset(&fmt, 0, sizeof(fmt)); fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if(v4l2_ioctl(vdo->fd, VIDIOC_G_FMT, &fmt) < 0) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "querying current video format (VIDIOC_G_FMT)")); zprintf(1, "final format: %.4s(%08x) %u x %u%s (line=0x%x size=0x%x)\n", (char*)&pix->pixelformat, pix->pixelformat, pix->width, pix->height, (pix->field != V4L2_FIELD_NONE) ? " INTERLACED" : "", pix->bytesperline, pix->sizeimage); vdo->width = pix->width; vdo->height = pix->height; vdo->datalen = pix->sizeimage; return(0); } static inline int v4l2_reset_crop (zbar_video_t *vdo) { /* check cropping */ struct v4l2_cropcap ccap; memset(&ccap, 0, sizeof(ccap)); ccap.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if(v4l2_ioctl(vdo->fd, VIDIOC_CROPCAP, &ccap) < 0) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "querying crop support (VIDIOC_CROPCAP)")); zprintf(1, "crop bounds: %d x %d @ (%d, %d)\n", ccap.bounds.width, ccap.bounds.height, ccap.bounds.left, ccap.bounds.top); zprintf(1, "current crop win: %d x %d @ (%d, %d) aspect %d / %d\n", ccap.defrect.width, ccap.defrect.height, ccap.defrect.left, ccap.defrect.top, ccap.pixelaspect.numerator, ccap.pixelaspect.denominator); #if 0 // This logic causes the device to fallback to the current resolution if(!vdo->width || !vdo->height) { vdo->width = ccap.defrect.width; vdo->height = ccap.defrect.height; } #endif /* reset crop parameters */ struct v4l2_crop crop; memset(&crop, 0, sizeof(crop)); crop.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; crop.c = ccap.defrect; if(v4l2_ioctl(vdo->fd, VIDIOC_S_CROP, &crop) < 0 && errno != EINVAL && errno != ENOTTY) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "setting default crop window (VIDIOC_S_CROP)")); return(0); } /** locate a control entry */ static struct video_controls_priv_s *v4l2_g_control_def(zbar_video_t *vdo, const char *name) { struct video_controls_priv_s *p = (void *)vdo->controls; while (p) { if (!strcasecmp(p->s.name, name)) break; p = p->s.next; } if (!p->s.name) { zprintf(1, "Control not found: %s", name); return NULL; } return p; } void v4l2_free_controls(zbar_video_t *vdo) { int i; if(vdo->controls) { struct video_controls_s *p = vdo->controls; while (p) { free(p->name); free(p->group); if(p->menu) { for (i = 0; i < p->menu_size; i++) free(p->menu[i].name); free(p->menu); } p = p->next; } free(vdo->controls); } vdo->controls = NULL; } #ifdef VIDIOC_QUERY_EXT_CTRL static const char *v4l2_ctrl_type(uint32_t type) { switch(type) { // All controls below are available since, at least, Kernel 2.6.31 case V4L2_CTRL_TYPE_INTEGER: return "int"; case V4L2_CTRL_TYPE_BOOLEAN: return "bool"; case V4L2_CTRL_TYPE_MENU: return "menu"; case V4L2_CTRL_TYPE_BUTTON: return "button"; case V4L2_CTRL_TYPE_INTEGER64: return "int64"; case V4L2_CTRL_TYPE_CTRL_CLASS: return "ctrl class"; case V4L2_CTRL_TYPE_STRING: return "string"; #ifdef V4L2_CTRL_TYPE_INTEGER_MENU case V4L2_CTRL_TYPE_INTEGER_MENU: return "int menu"; #endif #ifdef V4L2_CTRL_TYPE_U32 // Newer controls. All of them should be there since Kernel 3.16 case V4L2_CTRL_TYPE_BITMASK: return "bitmask"; case V4L2_CTRL_TYPE_U8: return "compound u8"; case V4L2_CTRL_TYPE_U16: return "compound u16"; case V4L2_CTRL_TYPE_U32: return "compound 32"; #endif default: return "unknown"; } } static const char *v4l2_ctrl_class(uint32_t class) { switch(class) { // All classes below are available since, at least, Kernel 2.6.31 case V4L2_CTRL_CLASS_USER: return "User"; case V4L2_CTRL_CLASS_MPEG: return "MPEG-compression"; case V4L2_CTRL_CLASS_CAMERA: return "Camera"; case V4L2_CTRL_CLASS_FM_TX: return "FM Modulator"; #ifdef V4L2_CTRL_CLASS_DETECT // Newer classes added up to Kernel 3.16 case V4L2_CTRL_CLASS_FLASH: return "Camera flash"; case V4L2_CTRL_CLASS_JPEG: return "JPEG-compression"; case V4L2_CTRL_CLASS_IMAGE_SOURCE: return "Image source"; case V4L2_CTRL_CLASS_IMAGE_PROC: return "Image processing"; case V4L2_CTRL_CLASS_DV: return "Digital Video"; case V4L2_CTRL_CLASS_FM_RX: return "FM Receiver"; case V4L2_CTRL_CLASS_RF_TUNER: return "RF tuner"; case V4L2_CTRL_CLASS_DETECT: return "Detection"; #endif default: return "Unknown"; } } // return values: 1: ignore, 0: added, -1: silently ignore static int v4l2_add_control(zbar_video_t *vdo, struct v4l2_query_ext_ctrl *query, struct video_controls_priv_s **ptr) { // Control is disabled, ignore it. Please notice that disabled controls // can be re-enabled. The right thing here would be to get those too, // and add a logic to if (query->flags & V4L2_CTRL_FLAG_DISABLED) return 1; /* Silently ignore control classes */ if (query->type == V4L2_CTRL_TYPE_CTRL_CLASS) return -1; // There's not much sense on displaying permanent read-only controls if (query->flags & V4L2_CTRL_FLAG_READ_ONLY) return 1; // Allocate a new element on the linked list if (!vdo->controls) { *ptr = calloc(1, sizeof(**ptr)); vdo->controls = (void *)*ptr; } else { (*ptr)->s.next = calloc(1, sizeof(**ptr)); *ptr = (*ptr)->s.next; } // Fill control data (*ptr)->id = query->id; (*ptr)->s.name = strdup((const char *)query->name); (*ptr)->s.group = strdup(v4l2_ctrl_class(V4L2_CTRL_ID2CLASS(query->id))); switch (query->type) { case V4L2_CTRL_TYPE_INTEGER: (*ptr)->s.type = VIDEO_CNTL_INTEGER; (*ptr)->s.min = query->minimum; (*ptr)->s.max = query->maximum; (*ptr)->s.def = query->default_value; (*ptr)->s.step = query->step; return(0); case V4L2_CTRL_TYPE_INTEGER64: (*ptr)->s.type = VIDEO_CNTL_INTEGER64; (*ptr)->s.min = query->minimum; (*ptr)->s.max = query->maximum; (*ptr)->s.def = query->default_value; (*ptr)->s.step = query->step; return(0); case V4L2_CTRL_TYPE_BOOLEAN: (*ptr)->s.type = VIDEO_CNTL_BOOLEAN; return(0); case V4L2_CTRL_TYPE_BUTTON: (*ptr)->s.type = VIDEO_CNTL_BUTTON; return (0); case V4L2_CTRL_TYPE_STRING: (*ptr)->s.type = VIDEO_CNTL_STRING; return (0); #ifdef V4L2_CTRL_TYPE_INTEGER_MENU case V4L2_CTRL_TYPE_INTEGER_MENU: #endif case V4L2_CTRL_TYPE_MENU: { struct v4l2_querymenu menu; struct video_control_menu_s *first = NULL, *p; int n_menu = 0; memset(&menu, 0, sizeof(menu)); menu.id = query->id; for (menu.index = query->minimum; menu.index <= query->maximum; menu.index++) { if (!ioctl(vdo->fd, VIDIOC_QUERYMENU, &menu)) { first = realloc(first, (n_menu + 1) * sizeof(*(*ptr)->s.menu)); p = &first[n_menu]; p->value = menu.index; #ifdef V4L2_CTRL_TYPE_INTEGER_MENU if (query->type == V4L2_CTRL_TYPE_INTEGER_MENU) asprintf(p->name, "%i", menu.value); else #endif /* V4L2_CTRL_TYPE_INTEGER_MENU */ p->name = strdup((const char *)menu.name); n_menu++; } } (*ptr)->s.menu = first; (*ptr)->s.menu_size = n_menu; (*ptr)->s.min = query->minimum; (*ptr)->s.max = query->maximum; (*ptr)->s.def = query->default_value; (*ptr)->s.type = VIDEO_CNTL_MENU; return (0); } default: return (1); } } static int v4l2_query_controls(zbar_video_t *vdo) { struct video_controls_priv_s *ptr = NULL; struct v4l2_query_ext_ctrl query; int ignore; const char *old_class = NULL; // Free controls list if not NULL v4l2_free_controls(vdo); memset(&query, 0, sizeof(query)); query.id = V4L2_CTRL_FLAG_NEXT_CTRL; while (!v4l2_ioctl(vdo->fd, VIDIOC_QUERY_EXT_CTRL, &query)) { ignore = v4l2_add_control(vdo, &query, &ptr); if (ignore >= 0 && _zbar_verbosity) { int i; const char *class = v4l2_ctrl_class(V4L2_CTRL_ID2CLASS(query.id)); if (class != old_class) zprintf(1, "Control class %s:\n", class); zprintf(1, "%-10s %-32s - 0x%x%s\n", v4l2_ctrl_type(query.type), query.name, query.id, ignore ? " - Ignored" : ""); for (i = 0; i < ptr->s.menu_size; i++) zprintf(1, " %" PRId64 ": %s\n", ptr->s.menu[i].value, ptr->s.menu[i].name); old_class = class; } query.id |= V4L2_CTRL_FLAG_NEXT_CTRL; } return(0); } static int v4l2_s_control(zbar_video_t *vdo, const char *name, void *value) { struct v4l2_ext_controls ctrls; struct v4l2_ext_control c; struct video_controls_priv_s *p; p = v4l2_g_control_def(vdo, name); if (!p) return ZBAR_ERR_UNSUPPORTED; // we have no such a control on the list memset(&ctrls, 0, sizeof(ctrls)); ctrls.count = 1; #ifdef V4L2_CTRL_ID2WHICH ctrls.which = V4L2_CTRL_ID2WHICH(p->id); #else ctrls.ctrl_class = V4L2_CTRL_ID2CLASS(p->id); #endif ctrls.controls = &c; memset(&c, 0, sizeof(c)); c.id = p->id; switch (p->s.type) { case VIDEO_CNTL_INTEGER: case VIDEO_CNTL_BOOLEAN: case VIDEO_CNTL_BUTTON: case VIDEO_CNTL_MENU: c.value = *(int *)value; break; #if 0 //FIXME: Need to check callers with respect bufffer size case VIDEO_CNTL_INTEGER64: c.value64 = *(int64_t *)value; break; #endif default: return ZBAR_ERR_UNSUPPORTED; } int rv = v4l2_ioctl(vdo->fd, VIDIOC_S_EXT_CTRLS, &ctrls); if(rv) { zprintf(1, "v4l2 set user control \"%s\" returned %d\n", p->s.name, rv); rv = ZBAR_ERR_INVALID; } zprintf(1, "%-32s id: 0x%x set to value %d\n", name, p->id, *(int*)value); return 0; } static int v4l2_g_control(zbar_video_t *vdo, const char *name, void *value) { struct v4l2_ext_controls ctrls; struct v4l2_ext_control c; struct video_controls_priv_s *p; p = v4l2_g_control_def(vdo, name); if (!p) return ZBAR_ERR_UNSUPPORTED; // we have no such a control on the list memset(&ctrls, 0, sizeof(ctrls)); ctrls.count = 1; #ifdef V4L2_CTRL_ID2WHICH ctrls.which = V4L2_CTRL_ID2WHICH(p->id); #else ctrls.ctrl_class = V4L2_CTRL_ID2CLASS(p->id); #endif ctrls.controls = &c; memset(&c, 0, sizeof(c)); c.id = p->id; int rv = v4l2_ioctl(vdo->fd, VIDIOC_G_EXT_CTRLS, &ctrls); if (rv) { zprintf(1, "v4l2 get user control \"%s\" returned %d\n", p->s.name, rv); return ZBAR_ERR_UNSUPPORTED; } switch (p->s.type) { case VIDEO_CNTL_INTEGER: case VIDEO_CNTL_BOOLEAN: case VIDEO_CNTL_BUTTON: case VIDEO_CNTL_MENU: *(int *)value = c.value; zprintf(1, "v4l2 get user control \"%s\" = %d\n", p->s.name, c.value); return(0); #if 0 //FIXME: Need to check callers with respect bufffer size case VIDEO_CNTL_INTEGER64: *(int64_t *)value = c.value64; return(0); #endif default: return ZBAR_ERR_UNSUPPORTED; } } #else /* For very old Kernels < 3.16 (2014) */ static void v4l2_add_control(zbar_video_t *vdo, char *group_name, struct v4l2_queryctrl *query, struct video_controls_priv_s **ptr) { // Control is disabled, ignore it. Please notice that disabled controls // can be re-enabled. The right thing here would be to get those too, // and add a logic to if (query->flags & V4L2_CTRL_FLAG_DISABLED) return; // FIXME: add support also for other control types if (!((query->type == V4L2_CTRL_TYPE_INTEGER) || (query->type == V4L2_CTRL_TYPE_BOOLEAN))) return; zprintf(1, "%s %s ctrl %-32s id: 0x%x\n", group_name, (query->type == V4L2_CTRL_TYPE_INTEGER) ? "int " : "bool", query->name, query->id); // Allocate a new element on the linked list if (!vdo->controls) { *ptr = calloc(1, sizeof(**ptr)); vdo->controls = (void *)*ptr; } else { (*ptr)->s.next = calloc(1, sizeof(**ptr)); *ptr = (*ptr)->s.next; } // Fill control data (*ptr)->id = query->id; (*ptr)->s.name = strdup((const char *)query->name); if (query->type == V4L2_CTRL_TYPE_INTEGER) { (*ptr)->s.type = VIDEO_CNTL_INTEGER; (*ptr)->s.min = query->minimum; (*ptr)->s.max = query->maximum; (*ptr)->s.def = query->default_value; (*ptr)->s.step = query->step; } else { (*ptr)->s.type = VIDEO_CNTL_BOOLEAN; } } static int v4l2_query_controls(zbar_video_t *vdo) { int id = 0; struct video_controls_priv_s *ptr; struct v4l2_queryctrl query; // Free controls list if not NULL ptr = (void *)vdo->controls; while (ptr) { free(ptr->s.name); ptr = ptr->s.next; } free(vdo->controls); vdo->controls = NULL; ptr = NULL; id=0; do { query.id = id | V4L2_CTRL_FLAG_NEXT_CTRL; if(v4l2_ioctl(vdo->fd, VIDIOC_QUERYCTRL, &query)) break; v4l2_add_control(vdo, "extended", &query, &ptr); id = query.id; } while (1); id=V4L2_CID_PRIVATE_BASE; do { query.id = id; if(v4l2_ioctl(vdo->fd, VIDIOC_QUERYCTRL, &query)) break; v4l2_add_control(vdo, "private", &query, &ptr); id = query.id; } while (1); return(0); } static int v4l2_s_control(zbar_video_t *vdo, const char *name, void *value) { struct v4l2_control cs; struct video_controls_priv_s *p; p = v4l2_g_control_def(vdo, name); if (!p) return ZBAR_ERR_UNSUPPORTED; // we have no such a control on the list zprintf(1, "%-32s id: 0x%x set to value %d\n", name, p->id, *(int*)value); // FIXME: add support for VIDIOC_S_EXT_CTRL memset(&cs, 0, sizeof(cs)); cs.id = p->id; cs.value = *(int*)value; int rv = v4l2_ioctl(vdo->fd, VIDIOC_S_CTRL, &cs); if(rv!=0) { zprintf(1, "v4l2 set user control \"%s\" returned %d\n", p->s.name, rv); rv = ZBAR_ERR_INVALID; } return rv; } static int v4l2_g_control(zbar_video_t *vdo, const char *name, void *value) { struct v4l2_control cs; struct video_controls_priv_s *p; p = v4l2_g_control_def(vdo, name); if (!p) return ZBAR_ERR_UNSUPPORTED; // we have no such a control on the list memset(&cs, 0, sizeof(cs)); cs.id = p->id; cs.value = *(int*)value; int rv = v4l2_ioctl(vdo->fd, VIDIOC_G_CTRL, &cs); *(int*)value = cs.value; if(rv!=0) { zprintf(1, "v4l2 get user control \"%s\" returned %d\n", p->s.name, rv); rv = ZBAR_ERR_UNSUPPORTED; } return rv; } #endif /* VIDIOC_QUERY_EXT_CTRL */ static int v4l2_sort_resolutions(const void *__a, const void *__b) { const struct video_resolution_s *a = __a; const struct video_resolution_s *b = __b; int r; r = (int)b->width - a->width; if (!r) r = (int)b->height - a->height; return r; } static float v4l2_get_max_fps_discrete(zbar_video_t *vdo, struct v4l2_frmsizeenum *frmsize) { struct v4l2_frmivalenum frmival = { 0 }; float fps, max_fps = -1; frmival.width = frmsize->discrete.width; frmival.height = frmsize->discrete.height; frmival.pixel_format = frmsize->pixel_format; frmival.index = 0; for (frmival.index = 0; !v4l2_ioctl(vdo->fd, VIDIOC_ENUM_FRAMEINTERVALS, &frmival); frmival.index++) { fps = ((float)frmival.discrete.denominator)/frmival.discrete.numerator; if (fps > max_fps) max_fps = fps; } return max_fps; } static void v4l2_insert_resolution(zbar_video_t *vdo, unsigned int *n_res, unsigned int width, unsigned int height, float max_fps) { unsigned int i; for (i = 0; i < *n_res; i++) { if (vdo->res[i].width == width && vdo->res[i].height == height) return; } vdo->res = realloc(vdo->res, (*n_res + 1) * sizeof(struct video_resolution_s)); vdo->res[*n_res].width = width; vdo->res[*n_res].height = height; vdo->res[*n_res].max_fps = max_fps; (*n_res)++; } static int v4l2_get_supported_resolutions(zbar_video_t *vdo) { struct v4l2_fmtdesc fmt = { 0 }; struct v4l2_frmsizeenum frmsize = { 0 }; int i; unsigned int width, height, n_res = 0; vdo->res = NULL; fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; for (fmt.index = 0; !v4l2_ioctl(vdo->fd, VIDIOC_ENUM_FMT, &fmt); fmt.index++) { if (vdo->format != fmt.pixelformat) continue; frmsize.pixel_format = fmt.pixelformat; frmsize.index = 0; while (!v4l2_ioctl(vdo->fd, VIDIOC_ENUM_FRAMESIZES, &frmsize)) { if (frmsize.type == V4L2_FRMSIZE_TYPE_DISCRETE) { v4l2_insert_resolution(vdo, &n_res, frmsize.discrete.width, frmsize.discrete.height, v4l2_get_max_fps_discrete(vdo, &frmsize)); } else if (frmsize.type == V4L2_FRMSIZE_TYPE_STEPWISE) { for (i = 0; i <= 4; i++) { width = frmsize.stepwise.min_width + i * (frmsize.stepwise.max_width - frmsize.stepwise.min_width) / 4; height = frmsize.stepwise.min_height + i * (frmsize.stepwise.max_height - frmsize.stepwise.min_height) / 4; v4l2_insert_resolution(vdo, &n_res, width, height, -1); } } frmsize.index++; } } qsort(vdo->res, n_res, sizeof(struct video_resolution_s), v4l2_sort_resolutions); for (i = 0; i < n_res; i++) { zprintf(1, "%dx%d (%0.2f fps)\n", vdo->res[i].width, vdo->res[i].height, vdo->res[i].max_fps); } /* Make the list zero-terminated */ v4l2_insert_resolution(vdo, &n_res, 0, 0, 0); return 0; } int _zbar_v4l2_probe (zbar_video_t *vdo) { /* check capabilities */ struct v4l2_capability vcap; memset(&vcap, 0, sizeof(vcap)); if(v4l2_ioctl(vdo->fd, VIDIOC_QUERYCAP, &vcap) < 0) return(err_capture(vdo, SEV_WARNING, ZBAR_ERR_UNSUPPORTED, __func__, "video4linux version 2 not supported (VIDIOC_QUERYCAP)")); zprintf(1, "%.32s on %.32s driver %.16s (version %u.%u.%u)\n", vcap.card, (vcap.bus_info[0]) ? (char*)vcap.bus_info : "", vcap.driver, (vcap.version >> 16) & 0xff, (vcap.version >> 8) & 0xff, vcap.version & 0xff); zprintf(1, " capabilities:%s%s%s%s\n", (vcap.device_caps & V4L2_CAP_VIDEO_CAPTURE) ? " CAPTURE" : "", (vcap.device_caps & V4L2_CAP_VIDEO_OVERLAY) ? " OVERLAY" : "", (vcap.device_caps & V4L2_CAP_READWRITE) ? " READWRITE" : "", (vcap.device_caps & V4L2_CAP_STREAMING) ? " STREAMING" : ""); if(!(vcap.device_caps & V4L2_CAP_VIDEO_CAPTURE) || !(vcap.device_caps & (V4L2_CAP_READWRITE | V4L2_CAP_STREAMING))) return(err_capture(vdo, SEV_WARNING, ZBAR_ERR_UNSUPPORTED, __func__, "v4l2 device does not support usable CAPTURE")); if(v4l2_reset_crop(vdo)) /* ignoring errors (driver cropping support questionable) */; if(v4l2_probe_formats(vdo)) return(-1); if (v4l2_query_controls(vdo)) return(-1); if (v4l2_get_supported_resolutions(vdo)) return(-1); /* FIXME report error and fallback to readwrite? (if supported...) */ if(vdo->iomode != VIDEO_READWRITE && (vcap.device_caps & V4L2_CAP_STREAMING) && v4l2_probe_iomode(vdo)) return(-1); if(!vdo->iomode) vdo->iomode = VIDEO_READWRITE; zprintf(1, "using I/O mode: %s\n", (vdo->iomode == VIDEO_READWRITE) ? "READWRITE" : (vdo->iomode == VIDEO_MMAP) ? "MMAP" : (vdo->iomode == VIDEO_USERPTR) ? "USERPTR" : ""); vdo->intf = VIDEO_V4L2; vdo->init = v4l2_init; vdo->cleanup = v4l2_cleanup; vdo->start = v4l2_start; vdo->stop = v4l2_stop; vdo->nq = v4l2_nq; vdo->dq = v4l2_dq; vdo->set_control = v4l2_s_control; vdo->get_control = v4l2_g_control; vdo->free = v4l2_free_controls; return(0); } zbar-0.23/zbar/video/dshow.c0000664000175000017500000013020413471225716012663 00000000000000/*------------------------------------------------------------------------ * Copyright 2012 (c) Klaus Triendl * Copyright 2012 (c) Jarek Czekalski * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbarw *------------------------------------------------------------------------*/ #include "video.h" #include "thread.h" #include "misc.h" #include #include #include #include #include // include after ddraw.h has been included from any dshow header #include #include #define ZBAR_DEFINE_STATIC_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ static const GUID name; \ static const GUID name \ = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }; // define a special guid that can be used for fourcc formats // 00000000-0000-0010-8000-00AA00389B71 == MEDIASUBTYPE_FOURCC_PLACEHOLDER ZBAR_DEFINE_STATIC_GUID(MEDIASUBTYPE_FOURCC_PLACEHOLDER, 0x00000000, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); #define OUR_GUID_ENTRY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ ZBAR_DEFINE_STATIC_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8); #include DEFINE_GUID(IID_IUnknown, 0x00000000, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46); DEFINE_GUID(IID_ISampleGrabber, 0x6b652fff, 0x11fe, 0x4fce, 0x92,0xad, 0x02,0x66,0xb5,0xd7,0xc7,0x8f); DEFINE_GUID(IID_ISampleGrabberCB,0x0579154a,0x2b53,0x4994,0xb0,0xd0,0xe7,0x73,0x14,0x8e,0xff,0x85); DEFINE_GUID(IID_IBaseFilter,0x56a86895,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70); DEFINE_GUID(IID_ICreateDevEnum, 0x29840822, 0x5b84, 0x11d0, 0xbd,0x3b, 0x00,0xa0,0xc9,0x11,0xce,0x86); DEFINE_GUID(IID_IGraphBuilder, 0x56a868a9, 0x0ad4, 0x11ce, 0xb0,0x3a, 0x00,0x20,0xaf,0x0b,0xa7,0x70); DEFINE_GUID(IID_IMediaControl, 0x56a868b1, 0x0ad4, 0x11ce, 0xb0,0x3a, 0x00,0x20,0xaf,0x0b,0xa7,0x70); DEFINE_GUID(IID_IPropertyBag, 0x55272a00, 0x42cb, 0x11ce, 0x81,0x35, 0x00,0xaa,0x00,0x4b,0xb8,0x51); DEFINE_GUID(IID_IAMStreamConfig, 0xc6e13340, 0x30ac, 0x11d0, 0xa1,0x8c, 0x00,0xa0,0xc9,0x11,0x89,0x56); DEFINE_GUID(IID_ICaptureGraphBuilder2, 0x93e5a4e0, 0x2d50, 0x11d2, 0xab,0xfa, 0x00,0xa0,0xc9,0xc6,0xe3,0x8d); DEFINE_GUID(CLSID_NullRenderer,0xc1f400a4,0x3f08,0x11d3,0x9f,0x0b,0x00,0x60,0x08,0x03,0x9e,0x37); DEFINE_GUID(CLSID_SampleGrabber,0xc1f400a0,0x3f08,0x11d3,0x9f,0x0b,0x00,0x60,0x08,0x03,0x9e,0x37); #define BIH_FMT "%ldx%ld @%dbpp (%lx) cmp=%.4s(%08lx) res=%ldx%ld clr=%ld/%ld (%lx)" #define BIH_FIELDS(bih) \ (bih)->biWidth, (bih)->biHeight, (bih)->biBitCount, (bih)->biSizeImage, \ (char*)&(bih)->biCompression, (bih)->biCompression, \ (bih)->biXPelsPerMeter, (bih)->biYPelsPerMeter, \ (bih)->biClrImportant, (bih)->biClrUsed, (bih)->biSize // taken from Capturing an Image winapi sample #define BMP_SIZE(cx, cy, bitsPerPix) \ ((((cx) * (bitsPerPix) + 31) / 32) * 4 * (cy)) #define COM_SAFE_RELEASE(ppIface) \ if (*ppIface)\ (*ppIface)->lpVtbl->Release(*ppIface) #define CHECK_COM_ERROR(hr, msg, stmt)\ if (FAILED(hr))\ {\ LPSTR sysmsg = NULL; \ FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER \ | FORMAT_MESSAGE_FROM_SYSTEM \ | FORMAT_MESSAGE_IGNORE_INSERTS, \ NULL, hr, \ 0 /* MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US) */, \ (LPSTR)&sysmsg, 0, NULL); \ zprintf(6, "%s, hresult: 0x%lx %s", msg, hr, sysmsg); \ LocalFree(sysmsg); \ stmt; \ } static const struct uuid_desc_s { const GUID *guid; const char *name; } known_uuids[] = { #define OUR_GUID_ENTRY(m_name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)\ { &m_name, #m_name }, #include { NULL, NULL } }; static const REFERENCE_TIME _100ns_unit = 1*1000*1000*1000 / 100; // format to which we convert MJPG streams static const REFGUID mjpg_conversion_mediatype = &MEDIASUBTYPE_RGB32; static const int mjpg_conversion_fmt = fourcc('B','G','R','4'); static const int mjpg_conversion_fmt_bpp = 32; static long grabbed_count = 0; // Destroy (Release) the format block for a media type. static void DestroyMediaType(AM_MEDIA_TYPE* mt) { if (mt->cbFormat != 0) CoTaskMemFree(mt->pbFormat); if (mt->pUnk) IUnknown_Release(mt->pUnk); } // Destroy the format block for a media type and free the media type static void DeleteMediaType(AM_MEDIA_TYPE* mt) { if (!mt) return; DestroyMediaType(mt); CoTaskMemFree(mt); } static void make_fourcc_subtype(GUID* subtype, uint32_t fmt) { *subtype = MEDIASUBTYPE_FOURCC_PLACEHOLDER; subtype->Data1 = fmt; } static int dshow_is_fourcc_guid(REFGUID subtype) { // make up a fourcc guid in spe GUID clsid; make_fourcc_subtype(&clsid, subtype->Data1); return IsEqualGUID(subtype, &clsid); } /// Checks whether the given AM_MEDIA_TYPE contains a /// VIDEOINFOHEADER block. static inline int dshow_has_vih(AM_MEDIA_TYPE* mt) { // documentation for AM_MEDIA_TYPE emphasizes to do a thorough check int isvih = (IsEqualGUID(&mt->formattype, &FORMAT_VideoInfo) && mt->cbFormat >= sizeof(VIDEOINFOHEADER) && mt->pbFormat); return isvih; } /// Access the BITMAPINFOHEADER in the given AM_MEDIA_TYPE, /// access is non-const static inline BITMAPINFOHEADER* dshow_access_bih(AM_MEDIA_TYPE* mt) { VIDEOINFOHEADER* vih = (VIDEOINFOHEADER*) mt->pbFormat; return &vih->bmiHeader; } /// Access the BITMAPINFOHEADER in the given AM_MEDIA_TYPE, /// access is const static inline const BITMAPINFOHEADER* dshow_caccess_bih(const AM_MEDIA_TYPE* mt) { VIDEOINFOHEADER* vih = (VIDEOINFOHEADER*) mt->pbFormat; return &vih->bmiHeader; } /// Flips the image vertically copying it from srcBuf to img. /** @param bpp Bits Per Pixel */ static void flip_vert(zbar_image_t* const img, void* const srcBuf, int bpp) { // The formula below works only if bpp%8==0 long bytesPerLine = 1L * img->width * bpp / 8; assert(img->datalen >= img->height * bytesPerLine); void *dst = (void*)img->data; void *src = srcBuf + (img->height - 1) * bytesPerLine; int i, n; for (i=0, n = img->height; i < n; i++) { memcpy(dst, src, bytesPerLine); dst += bytesPerLine; src -= bytesPerLine; } assert(src + bytesPerLine == srcBuf); } /// Internal format information struct int_format_s { uint32_t fourcc; /// index for IAMStreamConfig::GetStreamCaps /// @note compression in bih structure may differ from one used by zbar int idx_caps; resolution_list_t resolutions; }; typedef struct int_format_s int_format_t; struct video_state_s { zbar_thread_t thread; /* capture message pump */ HANDLE captured; HANDLE notify; /* capture thread status change */ int bi_size; /* size of bih */ BITMAPINFOHEADER* bih; /* video format details of grabbed samples; format might be among fourcc or BI_RGB */ int do_flip_bitmap; /* whether uncompressed bitmap images are bottom-up and need to be vertically flipped */ zbar_image_t* image; /* current capturing frame */ IGraphBuilder* graph; /* dshow graph manager */ IMediaControl* mediacontrol; /* dshow graph control */ IBaseFilter* camera; /* dshow source filter */ ISampleGrabber* samplegrabber; /* dshow intermediate filter */ IBaseFilter* grabberbase; /* samplegrabber's IBaseFilter interface */ IBaseFilter* nullrenderer; ICaptureGraphBuilder2* builder; IAMStreamConfig* camstreamconfig; /* dshow stream configuration interface */ int caps_size; /* length of stream config caps */ /// 0 terminated list of supported internal formats. /** The size of this * array matches the size of {@link zbar_video_s#formats} array and * the consecutive entries correspond to each other, making a mapping * between internal (camera) formats and zbar formats * (presented to zbar processor). */ int_format_t *int_formats; resolution_t def_resolution; /* initial resolution read from the camera */ }; static void dshow_destroy_video_state_t(video_state_t* state) { COM_SAFE_RELEASE(&state->camstreamconfig); COM_SAFE_RELEASE(&state->builder); COM_SAFE_RELEASE(&state->nullrenderer); COM_SAFE_RELEASE(&state->grabberbase); COM_SAFE_RELEASE(&state->samplegrabber); COM_SAFE_RELEASE(&state->camera); COM_SAFE_RELEASE(&state->mediacontrol); COM_SAFE_RELEASE(&state->graph); if (state->captured) CloseHandle(state->captured); free(state->bih); if (state->int_formats) { int_format_t *fmt; for (fmt = state->int_formats; !is_struct_null(fmt); fmt++) { resolution_list_cleanup(&fmt->resolutions); } } free(state->int_formats); } /// Returns the index of the given format in formats array. /** If not found, returns -1. The array is constructed like * vdo->formats, with the terminating null. */ static int get_format_index(uint32_t* fmts, uint32_t fmt0) { uint32_t *fmt; int i = 0; for (fmt = fmts; *fmt; fmt++) { if (*fmt == fmt0) break; i++; } if (*fmt) return i; else return -1; } /// Returns the index of the given format in internal formats array. /** If not found, returns -1. The array is constructed like * vdo->state->int_formats, with the terminating zeroed * element. */ /** @param fmt0 A fourcc format code */ static int get_int_format_index(int_format_t *fmts, uint32_t fmt0) { int_format_t *fmt; int i = 0; for (fmt = fmts; !is_struct_null(fmt); fmt++) { if (fmt->fourcc == fmt0) break; i++; } if (!is_struct_null(fmt)) return i; else return -1; } /// Gets the fourcc code for the given media type. /** This is necessary because of non-standard coding of video * formats by Windows, for example BGR3/4 = BI_RGB . */ static uint32_t get_fourcc_for_mt(const AM_MEDIA_TYPE* mt) { if IsEqualGUID(&mt->subtype, &MEDIASUBTYPE_RGB24) return fourcc('B','G','R','3'); else if IsEqualGUID(&mt->subtype, &MEDIASUBTYPE_RGB32) return fourcc('B','G','R','4'); else if (dshow_is_fourcc_guid(&mt->subtype)) return mt->subtype.Data1; else return 0; } /// Dumps the mapping of internal and external formats, if the debug level /// is sufficient. static void dump_formats(zbar_video_t* vdo) { video_state_t* state = vdo->state; uint32_t *fmt; int_format_t *int_fmt; zprintf(8, "Detected formats: (internal) / (translated for zbar)\n"); fmt = vdo->formats; int_fmt = state->int_formats; while (*fmt) { zprintf(8, " %.4s / %.4s, resolutions: %lu\n", (char*)&int_fmt->fourcc, (char*)fmt, int_fmt->resolutions.cnt); fmt++; int_fmt++; } } /// Allocates a string containing given guid. /** If it's among known CLSID's, its name is returned. * Returned string should be freed with `free`. */ static char* get_clsid_string(REFGUID guid) { char *msg = NULL; // first try to determine guid name from the list int i; for (i = 0; known_uuids[i].name; i++) { if (IsEqualGUID(known_uuids[i].guid, guid)) { msg = malloc(strlen(known_uuids[i].name) + 1); strcpy(msg, known_uuids[i].name); break; } } // if that failed, give the ugly string if (msg == NULL) { LPOLESTR str = L"ERROR"; HRESULT hr = StringFromCLSID(guid, &str); int c = WideCharToMultiByte(CP_UTF8, 0, str, -1, NULL, 0, NULL, NULL); msg = malloc(c); WideCharToMultiByte(CP_UTF8, 0, str, -1, msg, c, NULL, NULL); if (!FAILED(hr)) CoTaskMemFree(str); } return msg; } /// Maps internal format MJPG (if found) to a format known to /// zbar. /** The conversion will be done by dshow mjpeg decompressor * before passing the image to zbar. */ static void prepare_mjpg_format_mapping(zbar_video_t* vdo) { video_state_t* state = vdo->state; /// The format we will convert MJPG to uint32_t fmtConv = mjpg_conversion_fmt; int iMjpg = get_int_format_index(state->int_formats, fourcc('M','J','P','G')); if (iMjpg < 0) return; assert(vdo->formats[iMjpg] == fourcc('M','J','P','G')); // If we already have fmtConv, it will lead to duplicating it in // external formats. // We can't leave it this way, because when zbar wants to use fmtConv // we must have only one internal format for that. // It's better to drop MJPG then, as it's a compressed format and // we prefer better quality images. // The index of fmtConv before mapping mjpg to fmtConv int iMjpgConv = get_int_format_index(state->int_formats, fmtConv); if (iMjpgConv >= 0) { // remove the iMjpgConv entry by moving the following entries by 1 int i; for (i=iMjpgConv; vdo->formats[i]; i++) { vdo->formats[i] = vdo->formats[i+1]; state->int_formats[i] = state->int_formats[i+1]; } // The number of formats is reduced by 1 now, but to realloc just // to save 2 times 4 bytes? Too much fuss. } else { vdo->formats[iMjpg] = fmtConv; } } /// sample grabber callback implementation (derived from ISampleGrabberCB) typedef struct zbar_samplegrabber_cb { // baseclass const struct ISampleGrabberCB _; // COM refcount ULONG refcount; zbar_video_t* vdo; } zbar_samplegrabber_cb; // ISampleGrabber methods (implementation below) HRESULT __stdcall zbar_samplegrabber_cb_QueryInterface(ISampleGrabberCB* _This, REFIID riid, void** ppvObject); ULONG __stdcall zbar_samplegrabber_cb_AddRef(ISampleGrabberCB* _This); ULONG __stdcall zbar_samplegrabber_cb_Release(ISampleGrabberCB* _This); HRESULT __stdcall zbar_samplegrabber_cb_SampleCB(ISampleGrabberCB* _This, double sampletime, IMediaSample* sample); // note: original MS version expects a long for the buffer length, wine version a LONG //HRESULT __stdcall zbar_samplegrabber_cb_BufferCB(ISampleGrabberCB* _This, double sampletime, BYTE* buffer, long bufferlen); HRESULT __stdcall zbar_samplegrabber_cb_BufferCB(ISampleGrabberCB* _This, double sampletime, BYTE* buffer, LONG bufferlen); static struct ISampleGrabberCBVtbl SampleGrabberCBVtbl = { &zbar_samplegrabber_cb_QueryInterface, &zbar_samplegrabber_cb_AddRef, &zbar_samplegrabber_cb_Release, &zbar_samplegrabber_cb_SampleCB, &zbar_samplegrabber_cb_BufferCB }; static zbar_samplegrabber_cb* new_zbar_samplegrabber_cb(zbar_video_t* vdo) { // allocate memory zbar_samplegrabber_cb* o = calloc(1, sizeof(zbar_samplegrabber_cb)); // construct parent ISampleGrabberCB* base = (ISampleGrabberCB*)o; base->lpVtbl = &SampleGrabberCBVtbl; // construct object o->refcount = 1; o->vdo = vdo; return o; } static void delete_zbar_samplegrabber_cb(zbar_samplegrabber_cb* o) { zprintf(16, "thr=%04lx\n", _zbar_thread_self()); // no destruction necessary free(o); } HRESULT __stdcall zbar_samplegrabber_cb_QueryInterface(ISampleGrabberCB* _This, REFIID riid, void** ppvObject) { if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_ISampleGrabberCB) ) { *ppvObject = _This; return NOERROR; } else { *ppvObject = NULL; return E_NOINTERFACE; } } ULONG __stdcall zbar_samplegrabber_cb_AddRef(ISampleGrabberCB* _This) { zbar_samplegrabber_cb* This = (zbar_samplegrabber_cb*)_This; return ++This->refcount; } ULONG __stdcall zbar_samplegrabber_cb_Release(ISampleGrabberCB* _This) { zbar_samplegrabber_cb* This = (zbar_samplegrabber_cb*)_This; ULONG refcnt = --This->refcount; if (!refcnt) delete_zbar_samplegrabber_cb(This); return refcnt; } HRESULT __stdcall zbar_samplegrabber_cb_SampleCB(ISampleGrabberCB* _This, double sampletime, IMediaSample* sample) { return E_NOTIMPL; } //HRESULT __stdcall zbar_samplegrabber_cb_BufferCB(ISampleGrabberCB* _This, double sampletime, BYTE* buffer, long bufferlen) HRESULT __stdcall zbar_samplegrabber_cb_BufferCB(ISampleGrabberCB* _This, double sampletime, BYTE* buffer, LONG bufferlen) { if (!buffer || !bufferlen) return S_OK; grabbed_count++; zbar_samplegrabber_cb* This = (zbar_samplegrabber_cb*)_This; zbar_video_t* vdo = This->vdo; _zbar_mutex_lock(&vdo->qlock); zprintf(16, "got sample no %ld: %p (%ld), thr=%04lx\n", grabbed_count, buffer, bufferlen, _zbar_thread_self()); zbar_image_t* img = vdo->state->image; if (!img) { _zbar_mutex_lock(&vdo->qlock); img = video_dq_image(vdo); // note: video_dq_image() has unlocked the mutex } if (img) { zprintf(16, "copying into img: %p (srcidx: %d, data: %p, len: %ld)\n", img, img->srcidx, img->data, img->datalen); assert(img->datalen == bufferlen); // The image needs to be copied now. Usually memcpy is ok, // but in case of MJPG the picture is upside-down. if (vdo->state->do_flip_bitmap) flip_vert(img, buffer, vdo->state->bih->biBitCount); else memcpy((void*)img->data, buffer, img->datalen); vdo->state->image = img; SetEvent(vdo->state->captured); } _zbar_mutex_unlock(&vdo->qlock); return S_OK; } static ZTHREAD dshow_capture_thread(void* arg) { zbar_video_t* vdo = arg; video_state_t* state = vdo->state; zbar_thread_t* thr = &state->thread; _zbar_mutex_lock(&vdo->qlock); _zbar_thread_init(thr); zprintf(4, "spawned dshow capture thread (thr=%04lx)\n", _zbar_thread_self()); MSG msg; int rc = 0; while(thr->started && rc >= 0 && rc <= 1) { _zbar_mutex_unlock(&vdo->qlock); rc = MsgWaitForMultipleObjects(1, &thr->notify, 0, INFINITE, QS_ALLINPUT); if (rc == 1) while(PeekMessage(&msg, NULL, 0, 0, PM_NOYIELD | PM_REMOVE)) if (rc > 0) { TranslateMessage(&msg); DispatchMessage(&msg); } _zbar_mutex_lock(&vdo->qlock); } //done: thr->running = 0; _zbar_event_trigger(&thr->activity); _zbar_mutex_unlock(&vdo->qlock); return 0; } static int dshow_nq(zbar_video_t* vdo, zbar_image_t* img) { zprintf(16, "img: %p (srcidx: %d, data: %p, len: %ld), thr=%04lx\n", img, img->srcidx, img->data, img->datalen, _zbar_thread_self()); return video_nq_image(vdo, img); } /// Platform dependent part of #zbar_video_next_image, which blocks /// until an image is available. /** Must be called with video lock held and returns * with the lock released. *

Waits for the image from `vdo->state->image`. If available, * this field is nulled. Releases the lock temporarily when waiting for * the `vdo->state->captured` signal. */ static zbar_image_t* dshow_dq(zbar_video_t* vdo) { zbar_image_t* img = vdo->state->image; if (!img) { _zbar_mutex_unlock(&vdo->qlock); DWORD rc = WaitForSingleObject(vdo->state->captured, INFINITE); // note: until we get the lock again the grabber thread might // already provide the next sample (which is fine) _zbar_mutex_lock(&vdo->qlock); switch (rc) { case WAIT_OBJECT_0: img = vdo->state->image; break; case WAIT_ABANDONED: err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "event handle abandoned"); break; case WAIT_FAILED: err_capture(vdo, SEV_ERROR, ZBAR_ERR_WINAPI, __func__, "Waiting for image failed"); break; } } zprintf(16, "img: %p (srcidx: %d, data: %p, len: %ld), thr=%04lx\n", img, img ? img->srcidx : 0, img ? img->data : NULL, img ? img->datalen : 0, _zbar_thread_self()); vdo->state->image = NULL; ResetEvent(vdo->state->captured); video_unlock(vdo); return img; } static int dshow_start(zbar_video_t* vdo) { video_state_t* state = vdo->state; ResetEvent(state->captured); zprintf(16, "thr=%04lx\n", _zbar_thread_self()); HRESULT hr = IMediaControl_Run(state->mediacontrol); CHECK_COM_ERROR(hr, "couldn't start video stream", (void)0); if (FAILED(hr)) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "starting video stream")); return 0; } static int dshow_stop(zbar_video_t* vdo) { video_state_t* state = vdo->state; zprintf(16, "thr=%04lx\n", _zbar_thread_self()); HRESULT hr = IMediaControl_Stop(state->mediacontrol); CHECK_COM_ERROR(hr, "couldn't stop video stream", (void)0); if (FAILED(hr)) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "stopping video stream")); _zbar_mutex_lock(&vdo->qlock); if (state->image) state->image = NULL; SetEvent(state->captured); _zbar_mutex_unlock(&vdo->qlock); return 0; } static int dshow_set_format (zbar_video_t* vdo, uint32_t fmt) { int rc = 0; // return code const zbar_format_def_t* fmtdef = _zbar_format_lookup(fmt); int fmt_ind = get_format_index(vdo->formats, fmt); if (!fmtdef->format || fmt_ind < 0) return(err_capture_int(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "unsupported vfw format: %x", fmt)); video_state_t* state = vdo->state; int_format_t *int_fmt = &state->int_formats[fmt_ind]; // prepare media type structure as read from GetStreamCaps BYTE* caps = malloc(state->caps_size); if (!caps) err_capture(vdo, SEV_FATAL, ZBAR_ERR_NOMEM, __func__, ""); AM_MEDIA_TYPE* mt = NULL; AM_MEDIA_TYPE* currentmt = NULL; // used later, but must be here // due to possible "goto cleanup" HRESULT hr = IAMStreamConfig_GetStreamCaps(state->camstreamconfig, int_fmt->idx_caps, &mt, caps); free(caps); CHECK_COM_ERROR(hr, "querying chosen stream caps failed", goto cleanup) BITMAPINFOHEADER* bih = dshow_access_bih(mt); // then, adjust the format if (!vdo->width || !vdo->height) { // video size not requested, take camera default resolution_t resolution = vdo->state->def_resolution; // the initial resolution may be not suitable for the current format get_closest_resolution(&resolution, &int_fmt->resolutions); vdo->width = resolution.cx; vdo->height = resolution.cy; } bih->biWidth = vdo->width; bih->biHeight = vdo->height; zprintf(4, "setting camera format: %.4s(%08x) " BIH_FMT "\n", (char*)&int_fmt->fourcc, int_fmt->fourcc, BIH_FIELDS(bih)); hr = IAMStreamConfig_SetFormat(state->camstreamconfig, mt); CHECK_COM_ERROR(hr, "setting camera format failed", goto cleanup) // re-read format, image data size might have changed hr = IAMStreamConfig_GetFormat(state->camstreamconfig, ¤tmt); CHECK_COM_ERROR(hr, "queried currentmt", goto cleanup); bih = dshow_access_bih(currentmt); if (get_fourcc_for_mt(currentmt) != int_fmt->fourcc) { rc = err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "video format set ignored"); goto cleanup; } vdo->format = fmt; vdo->width = bih->biWidth; vdo->height = bih->biHeight; vdo->datalen = bih->biSizeImage; // datalen was set based on the internal format, but sometimes it's // different from the format reported to zbar processor if (vdo->formats[fmt_ind] != state->int_formats[fmt_ind].fourcc) { // See prepare_mjpg_format_mapping for possible differences // between internal and zbar format. vdo->datalen = BMP_SIZE(vdo->width, vdo->height, mjpg_conversion_fmt_bpp); } zprintf(4, "set camera format: %.4s(%08x) " BIH_FMT "\n", (char*)&int_fmt->fourcc, int_fmt->fourcc, BIH_FIELDS(bih)); cleanup: DeleteMediaType(mt); DeleteMediaType(currentmt); if (FAILED(hr)) return err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "setting dshow format failed"); else // note: if an error happened it was already captured and reported return rc; } static int dshow_init(zbar_video_t* vdo, uint32_t fmt) { if (dshow_set_format(vdo, fmt)) return -1; HRESULT hr; video_state_t* state = vdo->state; int fmt_ind = get_format_index(vdo->formats, fmt); // install sample grabber callback ISampleGrabberCB* grabbercb = (ISampleGrabberCB*)new_zbar_samplegrabber_cb(vdo); hr = ISampleGrabber_SetCallback(vdo->state->samplegrabber, grabbercb, 1); ISampleGrabberCB_Release(grabbercb); if (FAILED(hr)) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_BUSY, __func__, "setting capture callbacks")); // set up directshow graph // special handling for MJPG streams: // we use the stock mjpeg decompressor filter if (state->int_formats[fmt_ind].fourcc == fourcc('M','J','P','G')) { IBaseFilter* mjpgdecompressor = NULL; hr = CoCreateInstance(&CLSID_MjpegDec, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void**)&mjpgdecompressor); CHECK_COM_ERROR(hr, "failed to create mjpeg decompressor filter", (void)0) if (FAILED(hr)) { return err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "failed to create mjpeg decompressor filter"); } // add mjpeg decompressor to graph hr = IGraphBuilder_AddFilter(state->graph, mjpgdecompressor, L"MJPEG decompressor"); CHECK_COM_ERROR(hr, "adding MJPEG decompressor", goto mjpg_cleanup) // explicitly convert MJPG to RGB32 // (sample grabber will only accept this format) // // note: the mjpeg decompressor's output seems to be RGB32 (BGR4) // by default. // This fact has been a decisive factor to choosing the mapping // (BGR4 [zbar input] -> MJPG [camera output]). // Because zbar requests BGR4 we have to ensure that we really do // provide it. AM_MEDIA_TYPE conv_mt = {}; conv_mt.majortype = MEDIATYPE_Video; conv_mt.subtype = *mjpg_conversion_mediatype; conv_mt.formattype = FORMAT_VideoInfo; hr = ISampleGrabber_SetMediaType(state->samplegrabber, &conv_mt); CHECK_COM_ERROR(hr, "setting mjpg conversion media type", goto mjpg_cleanup) // no need to destroy conv_mt hr = ICaptureGraphBuilder2_RenderStream(state->builder, &PIN_CATEGORY_PREVIEW, &MEDIATYPE_Video, (IUnknown*)state->camera, NULL, mjpgdecompressor); CHECK_COM_ERROR(hr, "rendering filter graph 1", goto mjpg_cleanup) hr = ICaptureGraphBuilder2_RenderStream(state->builder, NULL, &MEDIATYPE_Video, (IUnknown*)mjpgdecompressor, state->grabberbase, state->nullrenderer); CHECK_COM_ERROR(hr, "rendering filter graph 2", goto mjpg_cleanup) mjpg_cleanup: IBaseFilter_Release(mjpgdecompressor); if (FAILED(hr)) { return err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "rendering filter graph failed"); } } else { // ensure (again) that the sample grabber gets only // video media types with VIDEOINFOHEADER AM_MEDIA_TYPE grab_mt = {}; grab_mt.majortype = MEDIATYPE_Video; grab_mt.formattype = FORMAT_VideoInfo; hr = ISampleGrabber_SetMediaType(state->samplegrabber, &grab_mt); CHECK_COM_ERROR(hr, "setting sample grabber media type", goto render_cleanup) // no need to destroy grab_mt hr = ICaptureGraphBuilder2_RenderStream(state->builder, &PIN_CATEGORY_PREVIEW, &MEDIATYPE_Video, (IUnknown*)state->camera, state->grabberbase, state->nullrenderer); CHECK_COM_ERROR(hr, "rendering filter graph", goto render_cleanup) render_cleanup: if (FAILED(hr)) { return err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "rendering filter graph failed"); } } // scope: after the graph is built (and the pins connected) we query the // final media type from sample grabber's input pin; { AM_MEDIA_TYPE input_mt = {}; hr = ISampleGrabber_GetConnectedMediaType(state->samplegrabber, &input_mt); CHECK_COM_ERROR(hr, "couldn't query input media type from sample grabber", goto cleanup1) assert(dshow_has_vih(&input_mt)); const BITMAPINFOHEADER* bih = dshow_caccess_bih(&input_mt); // adjust state->bih state->bi_size = bih->biSize; state->bih = realloc(state->bih, state->bi_size); memcpy(state->bih, bih, state->bi_size); if (bih->biCompression == BI_RGB) { // check bitmap orientation for native BI_RGB: // positive biHeight: bottom-up bitmap -> flip // negative biHeight: top-down bitmap state->do_flip_bitmap = (bih->biHeight > 0); } cleanup1: DestroyMediaType(&input_mt); if (FAILED(hr)) return -1; } // query camera stream parameters; REFERENCE_TIME avgtime_perframe = 0; // scope: query avgtime_perframe from camera { AM_MEDIA_TYPE* currentmt = NULL; hr = IAMStreamConfig_GetFormat(state->camstreamconfig, ¤tmt); CHECK_COM_ERROR(hr, "querying camera format failed", goto cleanup2) assert(dshow_has_vih(currentmt)); VIDEOINFOHEADER* vih = (VIDEOINFOHEADER*) currentmt->pbFormat; avgtime_perframe = vih->AvgTimePerFrame; cleanup2: DeleteMediaType(currentmt); } // directshow keeps ownership of the image passed to the callback, // hence, keeping a pointer to the original data (iomode VIDEO_MMAP) is a bad idea // in a multi-threaded environment. // real case szenario on a windows 7 tablet with intel atom: // with vdo->iomode=VIDEO_MMAP and vdo->num_images=1: // 1) directshow graph provides a sample, sets the data pointer of vdo->state->img // 2) dshow_dq (called from proc_video_thread()/zbar_video_next_image()) fetches the image and makes a copy of it // 3) directshow graph provides the next sample, sets the data pointer of vdo->state->img // 4) dshow_nq (called from ) resets the data pointer of vdo->state->img (nullptr) // 5) dshow_dq returns vdo->state->img without data (nullptr) // // now, we could deal with this special case, but zbar_video_next_image() makes a copy of the sample anyway when // vdo->num_images==1 (thus VIDEO_MMAP won't save us anything); therefore rather use image buffers provided // by zbar (see video_init_images()) vdo->iomode = VIDEO_USERPTR; // keep zbar's default //vdo->num_images = ZBAR_VIDEO_IMAGES_MAX; // note: vdo->format and vdo->datalen have been set accordingly in dshow_set_format() zprintf(3, "initialized video capture: %.4s(%08x), %"PRId64" frames/s\n", (char*)&fmt, fmt, _100ns_unit / avgtime_perframe); return 0; } static int dshow_cleanup (zbar_video_t* vdo) { zprintf(16, "thr=%04lx\n", _zbar_thread_self()); /* close open device */ video_state_t* state = vdo->state; _zbar_thread_stop(&state->thread, &vdo->qlock); dshow_destroy_video_state_t(state); free(state); vdo->state = NULL; CoUninitialize(); return 0; } static int dshow_determine_formats(zbar_video_t* vdo) { video_state_t* state = vdo->state; // collect formats int resolutions; HRESULT hr = IAMStreamConfig_GetNumberOfCapabilities( state->camstreamconfig, &resolutions, &state->caps_size); CHECK_COM_ERROR(hr, "couldn't query camera capabilities", return -1) zprintf(6, "number of formats/resolutions supported by the camera as reported by directshow: %d\n", resolutions); zprintf(6, "list of those with a VIDEOINFOHEADER:\n"); vdo->formats = calloc(resolutions+1, sizeof(uint32_t)); state->int_formats = calloc(resolutions+1, sizeof(int_format_t)); // this is actually a VIDEO_STREAM_CONFIG_CAPS structure, which is mostly deprecated anyway, // so we just reserve enough buffer but treat it as opaque otherwise BYTE* caps = malloc(state->caps_size); int n = 0, i; for (i = 0; i < resolutions; ++i) { AM_MEDIA_TYPE* mt; HRESULT hr = IAMStreamConfig_GetStreamCaps(state->camstreamconfig, i, &mt, caps); CHECK_COM_ERROR(hr, "querying stream capability failed", continue) int is_supported = 0; if (dshow_has_vih(mt)) { const BITMAPINFOHEADER* bih = dshow_caccess_bih(mt); zprintf(6, BIH_FMT "\n", BIH_FIELDS(bih)); uint32_t fmt = get_fourcc_for_mt(mt); // This is actually a check if the format is recognized. // TODO: Check if the format is really supported by zbar. is_supported = (fmt != 0); if (is_supported) { // first search for existing fourcc format int j; for (j = 0; j < n; ++j) { if (state->int_formats[i].fourcc == fmt) break; } // push back if not found if (j == n) { state->int_formats[n].fourcc = fmt; state->int_formats[n].idx_caps = i; resolution_list_init(&state->int_formats[n].resolutions); vdo->formats[n] = fmt; ++n; } resolution_t resolution = { bih->biWidth, bih->biHeight }; resolution_list_add(&state->int_formats[j].resolutions, &resolution); } } // note: other format types could be possible, e.g. VIDEOINFOHEADER2 ... if (!is_supported) { char *formattype = get_clsid_string(&mt->formattype); char *subtype = get_clsid_string(&mt->subtype); zprintf(6, "unsupported format: %s / %s\n", formattype, subtype); free(formattype); free(subtype); } DeleteMediaType(mt); } free(caps); zprintf(6, "number of supported fourcc formats: %d\n", n); vdo->formats = realloc(vdo->formats, (n + 1) * sizeof(uint32_t)); state->int_formats = realloc(state->int_formats, (n + 1) * sizeof(int_format_t)); prepare_mjpg_format_mapping(vdo); dump_formats(vdo); if (n == 0) return -1; return 0; } static int dshow_probe(zbar_video_t* vdo) { if (dshow_determine_formats(vdo)) return -1; video_state_t* state = vdo->state; // query current format AM_MEDIA_TYPE* currentmt; HRESULT hr = IAMStreamConfig_GetFormat(state->camstreamconfig, ¤tmt); CHECK_COM_ERROR(hr, "couldn't query current camera format", return -1) if (!dshow_has_vih(currentmt)) { char *formattype = get_clsid_string(¤tmt->formattype); char *subtype = get_clsid_string(¤tmt->subtype); zprintf(1, "encountered unsupported initial format, " "no VIDEOINFOHEADER video format type: %s / %s\n", formattype, subtype); free(formattype); free(subtype); // if we cannot read the current resolution, we need sane defaults vdo->state->def_resolution.cx = 640; vdo->state->def_resolution.cy = 480; } else { const BITMAPINFOHEADER* current_bih = dshow_caccess_bih(currentmt); assert(current_bih); zprintf(3, "initial format: %.4s(%08lx) " BIH_FMT "\n", (char*)¤t_bih->biCompression, current_bih->biCompression, BIH_FIELDS(current_bih)); // store initial size vdo->state->def_resolution.cx = current_bih->biWidth; vdo->state->def_resolution.cy = current_bih->biHeight; } DeleteMediaType(currentmt); vdo->intf = VIDEO_DSHOW; vdo->init = dshow_init; vdo->start = dshow_start; vdo->stop = dshow_stop; vdo->cleanup = dshow_cleanup; vdo->nq = dshow_nq; vdo->dq = dshow_dq; return 0; } // search camera by index or by device path static IBaseFilter* dshow_search_camera(const char* dev) { IBaseFilter* camera = NULL; ICreateDevEnum* devenumerator = NULL; IEnumMoniker* enummoniker = NULL; int reqid = -1; if ((!strncmp(dev, "/dev/video", 10) || !strncmp(dev, "\\dev\\video", 10)) && dev[10] >= '0' && dev[10] <= '9' && !dev[11]) reqid = dev[10] - '0'; else if (strlen(dev) == 1 && dev[0] >= '0' && dev[0] <= '9') reqid = dev[0] - '0'; zprintf(6, "searching for camera (#%d): %s\n", reqid, dev); HRESULT hr = CoCreateInstance(&CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, &IID_ICreateDevEnum, (void**)&devenumerator); CHECK_COM_ERROR(hr, "failed to create system device enumerator", goto done) hr = ICreateDevEnum_CreateClassEnumerator(devenumerator, &CLSID_VideoInputDeviceCategory, &enummoniker, 0); CHECK_COM_ERROR(hr, "failed to create enumerator moniker", goto done) if (hr != S_OK) { zprintf(6, "no video devices available"); goto done; } // turn device name (the GUID) from char to wide char BSTR wdev = SysAllocStringLen(NULL, strlen(dev)); if (!wdev) goto done; MultiByteToWideChar(CP_UTF8, 0, dev, -1, wdev, strlen(dev) + 1); // Go through and find capture device int docontinue; int devid; for (devid = 0, docontinue = 1; docontinue; ++devid) { IMoniker* moniker = NULL; IPropertyBag* propbag = NULL; VARIANT devpath_variant; VARIANT friendlyname_variant; hr = IEnumMoniker_Next(enummoniker, 1, &moniker, NULL); // end of monikers if (hr != S_OK) break; VariantInit(&devpath_variant); VariantInit(&friendlyname_variant); hr = IMoniker_BindToStorage(moniker, NULL, NULL, &IID_IPropertyBag, (void**)&propbag); CHECK_COM_ERROR(hr, "failed to get property bag from moniker", goto breakout) hr = IPropertyBag_Read(propbag, L"DevicePath", &devpath_variant, NULL); CHECK_COM_ERROR(hr, "failed to read DevicePath from camera device", goto breakout) hr = IPropertyBag_Read(propbag, L"FriendlyName", &friendlyname_variant, NULL); CHECK_COM_ERROR(hr, "failed to read FriendlyName from camera device", goto breakout) if ((reqid >= 0) ? devid == reqid : !wcscmp(wdev, V_BSTR(&devpath_variant))) { // create camera from moniker hr = IMoniker_BindToObject(moniker, NULL, NULL, &IID_IBaseFilter, (void**)&camera); CHECK_COM_ERROR(hr, "failed to get camera device", goto breakout) } if (camera) { zwprintf(1, L"using camera #%d: %s (%s)\n", devid, V_BSTR(&friendlyname_variant), V_BSTR(&devpath_variant)); goto breakout; } else goto cleanup; breakout: docontinue = 0; cleanup: VariantClear(&friendlyname_variant); VariantClear(&devpath_variant); COM_SAFE_RELEASE(&propbag); COM_SAFE_RELEASE(&moniker); } SysFreeString(wdev); done: COM_SAFE_RELEASE(&enummoniker); COM_SAFE_RELEASE(&devenumerator); if (!camera) zprintf(6, "no camera found\n"); return camera; } int _zbar_video_open (zbar_video_t* vdo, const char* dev) { // assume failure int ret = -1; video_state_t* state; state = vdo->state = calloc(1, sizeof(video_state_t)); state->camera = dshow_search_camera(dev); if (!state->camera) goto done; if (!state->captured) // create manual reset event state->captured = CreateEvent(NULL, TRUE, FALSE, NULL); else ResetEvent(state->captured); if (_zbar_thread_start(&state->thread, dshow_capture_thread, vdo, NULL)) return -1; // create filter graph instance HRESULT hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IGraphBuilder, (void**)&state->graph); CHECK_COM_ERROR(hr, "graph builder creation", goto done) // query media control from filter graph hr = IGraphBuilder_QueryInterface(state->graph, &IID_IMediaControl, (void**)&state->mediacontrol); CHECK_COM_ERROR(hr, "querying media control", goto done) // create sample grabber instance hr = CoCreateInstance(&CLSID_SampleGrabber, NULL, CLSCTX_INPROC_SERVER, &IID_ISampleGrabber, (void**)&state->samplegrabber); CHECK_COM_ERROR(hr, "samplegrabber creation", goto done) // query base filter interface from sample grabber hr = ISampleGrabber_QueryInterface(state->samplegrabber, &IID_IBaseFilter, (void**)&state->grabberbase); CHECK_COM_ERROR(hr, "grabberbase query", goto done) // capture graph without preview window hr = CoCreateInstance(&CLSID_NullRenderer, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void**)&state->nullrenderer); CHECK_COM_ERROR(hr, "null renderer creation", goto done) // add camera to graph hr = IGraphBuilder_AddFilter(state->graph, state->camera, L"Camera"); CHECK_COM_ERROR(hr, "adding camera", goto done) // add sample grabber to graph hr = IGraphBuilder_AddFilter(state->graph, state->grabberbase, L"Sample Grabber"); CHECK_COM_ERROR(hr, "adding samplegrabber", goto done) // add nullrenderer to graph hr = IGraphBuilder_AddFilter(state->graph, state->nullrenderer, L"Null Renderer"); CHECK_COM_ERROR(hr, "adding null renderer", goto done) // Create the Capture Graph Builder. hr = CoCreateInstance(&CLSID_CaptureGraphBuilder2, NULL, CLSCTX_INPROC_SERVER, &IID_ICaptureGraphBuilder2, (void**)&state->builder); CHECK_COM_ERROR(hr, "capturegraph builder creation", goto done) // tell graph builder about the filter graph hr = ICaptureGraphBuilder2_SetFiltergraph(state->builder, state->graph); CHECK_COM_ERROR(hr, "setting filtergraph", goto done) // TODO: // finding the streamconfig interface on the camera's preview output pin (specifying PIN_CATEGORY_PREVIEW, MEDIATYPE_Video) // should work according to the documentation but it doesn't. // Because devices may have separate pins for capture and preview or have a video port pin (PIN_CATEGORY_VIDEOPORT) // instead of a preview pin, I do hope that we get the streamconfig interface for the correct pin hr = ICaptureGraphBuilder2_FindInterface(state->builder, &LOOK_DOWNSTREAM_ONLY, NULL, state->camera, &IID_IAMStreamConfig, (void**)&state->camstreamconfig); CHECK_COM_ERROR(hr, "querying camera's streamconfig interface", goto done) if (dshow_probe(vdo)) goto done; // success ret = 0; done: if (ret) { if (state->camera) _zbar_thread_stop(&state->thread, NULL); dshow_destroy_video_state_t(state); free(state); vdo->state = NULL; CoUninitialize(); return err_capture_str(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "failed to connect to camera '%s'", dev); } return ret; } zbar-0.23/zbar/video/null.c0000664000175000017500000000266113466560613012520 00000000000000/*------------------------------------------------------------------------ * Copyright 2008-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "video.h" static inline int null_error (void *m, const char *func) { return(err_capture(m, SEV_ERROR, ZBAR_ERR_UNSUPPORTED, func, "not compiled with video input support")); } int _zbar_video_open (zbar_video_t *vdo, const char *device) { return(null_error(vdo, __func__)); } zbar-0.23/zbar/video/v4l.c0000664000175000017500000000427313471225716012252 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2011 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef HAVE_FCNTL_H # include #endif #ifdef HAVE_UNISTD_H # include #endif #ifdef HAVE_LIBV4L2_H # include # include #else # define v4l2_open open # define v4l2_close close #endif #include "video.h" extern int _zbar_v4l1_probe(zbar_video_t*); extern int _zbar_v4l2_probe(zbar_video_t*); int _zbar_video_open (zbar_video_t *vdo, const char *dev) { vdo->fd = v4l2_open(dev, O_RDWR); if(vdo->fd < 0) return(err_capture_str(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "opening video device '%s'", dev)); zprintf(1, "opened camera device %s (fd=%d)\n", dev, vdo->fd); int rc = -1; #ifdef HAVE_LINUX_VIDEODEV2_H if(vdo->intf != VIDEO_V4L1) rc = _zbar_v4l2_probe(vdo); #endif #ifdef HAVE_LINUX_VIDEODEV_H if(rc && vdo->intf != VIDEO_V4L2) rc = _zbar_v4l1_probe(vdo); #endif if(rc && vdo->fd >= 0) { v4l2_close(vdo->fd); vdo->fd = -1; } return(rc); } zbar-0.23/zbar/video/v4l1.c0000664000175000017500000003320413471225700012320 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2011 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDLIB_H # include #endif #include #include #include #include #include #include #include #ifdef HAVE_SYS_IOCTL_H # include #endif #ifdef HAVE_SYS_MMAN_H # include #endif #include #include "video.h" #include "image.h" typedef struct v4l1_format_s { uint32_t format; uint8_t bpp; } v4l1_format_t; /* static v4l1 "palette" mappings * documentation for v4l1 formats is terrible... */ static const v4l1_format_t v4l1_formats[17] = { /* format bpp */ { 0, 0 }, { fourcc('G','R','E','Y'), 8 }, /* GREY */ { fourcc('H','I','2','4'), 8 }, /* HI240 (BT848) */ /* component ordering for RGB palettes is unspecified, * convention appears to place red in the most significant bits * FIXME is this true for other drivers? big endian machines? */ { fourcc('R','G','B','P'), 16 }, /* RGB565 */ { fourcc('B','G','R','3'), 24 }, /* RGB24 */ { fourcc('B','G','R','4'), 32 }, /* RGB32 */ { fourcc('R','G','B','O'), 16 }, /* RGB555 */ { fourcc('Y','U','Y','2'), 16 }, /* YUV422 (8 bpp?!) */ { fourcc('Y','U','Y','V'), 16 }, /* YUYV */ { fourcc('U','Y','V','Y'), 16 }, /* UYVY */ { 0, 12 }, /* YUV420 (24 bpp?) FIXME?! */ { fourcc('Y','4','1','P'), 12 }, /* YUV411 */ { 0, 0 }, /* Bt848 raw */ { fourcc('4','2','2','P'), 16 }, /* YUV422P (24 bpp?) */ { fourcc('4','1','1','P'), 12 }, /* YUV411P */ { fourcc('Y','U','1','2'), 12 }, /* YUV420P */ { fourcc('Y','U','V','9'), 9 }, /* YUV410P */ }; static int v4l1_nq (zbar_video_t *vdo, zbar_image_t *img) { if(video_nq_image(vdo, img)) return(-1); if(vdo->iomode != VIDEO_MMAP) return(0); struct video_mmap vmap; vmap.frame = img->srcidx; vmap.width = vdo->width; vmap.height = vdo->height; vmap.format = vdo->palette; if(ioctl(vdo->fd, VIDIOCMCAPTURE, &vmap) < 0) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "initiating video capture (VIDIOCMCAPTURE)")); return(0); } static zbar_image_t *v4l1_dq (zbar_video_t *vdo) { video_iomode_t iomode = vdo->iomode; int fd = vdo->fd; zbar_image_t *img = video_dq_image(vdo); if(!img) return(NULL); if(iomode == VIDEO_MMAP) { int frame = img->srcidx; if(ioctl(fd, VIDIOCSYNC, &frame) < 0) return(NULL); } else if(read(fd, (void*)img->data, img->datalen) != img->datalen) return(NULL); return(img); } static int v4l1_mmap_buffers (zbar_video_t *vdo) { #ifdef HAVE_SYS_MMAN_H /* map camera image to memory */ struct video_mbuf vbuf; memset(&vbuf, 0, sizeof(vbuf)); if(ioctl(vdo->fd, VIDIOCGMBUF, &vbuf) < 0) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "querying video frame buffers (VIDIOCGMBUF)")); assert(vbuf.frames && vbuf.size); zprintf(1, "mapping %d buffers size=0x%x\n", vbuf.frames, vbuf.size); vdo->buflen = vbuf.size; vdo->buf = mmap(0, vbuf.size, PROT_READ | PROT_WRITE, MAP_SHARED, vdo->fd, 0); if(vdo->buf == MAP_FAILED) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "mapping video frame buffers")); int i; for(i = 0; i < vbuf.frames; i++) { zbar_image_t *img = vdo->images[i]; zprintf(2, " [%02d] @%08x\n", img->srcidx, vbuf.offsets[i]); img->data = vdo->buf + vbuf.offsets[i]; img->datalen = vdo->datalen; int next_offset = ((i + 1 < vdo->num_images) ? vbuf.offsets[i + 1] : vbuf.size); if(next_offset < vbuf.offsets[i] + vdo->datalen) fprintf(stderr, "WARNING: insufficient v4l1 video buffer size:\n" "\tvbuf[%d]=%x vbuf[%d]=%x datalen=%lx\n" "\timage=%d x %d %.4s(%08x) palette=%d\n", i, vbuf.offsets[i], i + 1, next_offset, vdo->datalen, vdo->width, vdo->height, (char*)&vdo->format, vdo->format, vdo->palette); } return(0); #else return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_UNSUPPORTED, __func__, "memory mapping not supported")); #endif } static int v4l1_start (zbar_video_t *vdo) { return(0); } static int v4l1_stop (zbar_video_t *vdo) { return(0); } static inline int v4l1_set_format (zbar_video_t *vdo, uint32_t fmt) { struct video_picture vpic; memset(&vpic, 0, sizeof(vpic)); if(ioctl(vdo->fd, VIDIOCGPICT, &vpic) < 0) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "querying video format (VIDIOCGPICT)")); vdo->palette = 0; int ifmt; for(ifmt = 1; ifmt <= VIDEO_PALETTE_YUV410P; ifmt++) if(v4l1_formats[ifmt].format == fmt) break; if(!fmt || ifmt >= VIDEO_PALETTE_YUV410P) return(err_capture_int(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "invalid v4l1 format: %x", fmt)); vpic.palette = ifmt; vpic.depth = v4l1_formats[ifmt].bpp; if(ioctl(vdo->fd, VIDIOCSPICT, &vpic) < 0) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "setting format (VIDIOCSPICT)")); memset(&vpic, 0, sizeof(vpic)); if(ioctl(vdo->fd, VIDIOCGPICT, &vpic) < 0) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "querying video format (VIDIOCGPICT)")); if(vpic.palette != ifmt || vpic.depth != v4l1_formats[ifmt].bpp) { fprintf(stderr, "WARNING: set v4l1 palette %d which should have depth %d bpp\n" " but probed palette %d with depth %d bpp?" " ...continuing anyway\n", ifmt, v4l1_formats[ifmt].bpp, vpic.palette, vpic.depth); err_capture_int(vdo, SEV_WARNING, ZBAR_ERR_INVALID, __func__, "driver format (%x) inconsistency", fmt); } vdo->format = fmt; vdo->palette = ifmt; vdo->datalen = (vdo->width * vdo->height * v4l1_formats[ifmt].bpp + 7) >> 3; zprintf(1, "set new format: %.4s(%08x) depth=%d palette=%d size=0x%lx\n", (char*)&vdo->format, vdo->format, vpic.depth, vdo->palette, vdo->datalen); return(0); } static int v4l1_init (zbar_video_t *vdo, uint32_t fmt) { if(v4l1_set_format(vdo, fmt)) return(-1); if(vdo->iomode == VIDEO_MMAP && v4l1_mmap_buffers(vdo)) return(-1); return(0); } static int v4l1_cleanup (zbar_video_t *vdo) { #ifdef HAVE_SYS_MMAN_H /* FIXME should avoid holding onto mmap'd buffers so long? */ if(vdo->iomode == VIDEO_MMAP && vdo->buf) { if(munmap(vdo->buf, vdo->buflen)) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "unmapping video frame buffers")); vdo->buf = NULL; /* FIXME reset image */ } #endif /* close open device */ if(vdo->fd >= 0) { close(vdo->fd); vdo->fd = -1; } return(0); } static int v4l1_probe_iomode (zbar_video_t *vdo) { vdo->iomode = VIDEO_READWRITE; #ifdef HAVE_SYS_MMAN_H struct video_mbuf vbuf; memset(&vbuf, 0, sizeof(vbuf)); if(ioctl(vdo->fd, VIDIOCGMBUF, &vbuf) < 0) { if(errno != EINVAL) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "querying video frame buffers (VIDIOCGMBUF)")); /* not supported */ return(0); } if(!vbuf.frames || !vbuf.size) return(0); vdo->iomode = VIDEO_MMAP; if(vdo->num_images > vbuf.frames) vdo->num_images = vbuf.frames; #endif zprintf(1, "using %d images in %s mode\n", vdo->num_images, (vdo->iomode == VIDEO_READWRITE) ? "READ" : "MMAP"); return(0); } static inline int v4l1_probe_formats (zbar_video_t *vdo) { struct video_picture vpic; memset(&vpic, 0, sizeof(vpic)); if(ioctl(vdo->fd, VIDIOCGPICT, &vpic) < 0) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "querying format (VIDIOCGPICT)")); vdo->format = 0; if(vpic.palette <= VIDEO_PALETTE_YUV410P) vdo->format = v4l1_formats[vpic.palette].format; zprintf(1, "current format: %.4s(%08x) depth=%d palette=%d\n", (char*)&vdo->format, vdo->format, vpic.depth, vpic.palette); vdo->formats = calloc(16, sizeof(uint32_t)); if(!vdo->formats) return(err_capture(vdo, SEV_FATAL, ZBAR_ERR_NOMEM, __func__, "allocating format list")); int num_formats = 0; zprintf(2, "probing supported formats:\n"); int i; for(i = 1; i <= VIDEO_PALETTE_YUV410P; i++) { if(!v4l1_formats[i].format) continue; vpic.depth = v4l1_formats[i].bpp; vpic.palette = i; if(ioctl(vdo->fd, VIDIOCSPICT, &vpic) < 0) { zprintf(2, " [%02d] %.4s...no (set fails)\n", i, (char*)&v4l1_formats[i].format); continue; } if(ioctl(vdo->fd, VIDIOCGPICT, &vpic) < 0 || vpic.palette != i) { zprintf(2, " [%02d] %.4s...no (set ignored)\n", i, (char*)&v4l1_formats[i].format); continue; } zprintf(2, " [%02d] %.4s...yes\n", i, (char*)&v4l1_formats[i].format); vdo->formats[num_formats++] = v4l1_formats[i].format; } vdo->formats = realloc(vdo->formats, (num_formats + 1) * sizeof(uint32_t)); assert(vdo->formats); return(v4l1_set_format(vdo, vdo->format)); } static inline int v4l1_init_window (zbar_video_t *vdo) { struct video_window vwin; memset(&vwin, 0, sizeof(vwin)); if(ioctl(vdo->fd, VIDIOCGWIN, &vwin) < 0) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "querying video window settings (VIDIOCGWIN)")); zprintf(1, "current window: %d x %d @(%d, %d)%s\n", vwin.width, vwin.height, vwin.x, vwin.y, (vwin.flags & 1) ? " INTERLACE" : ""); if(vwin.width == vdo->width && vwin.height == vdo->height) /* max window already set */ return(0); struct video_window maxwin; memcpy(&maxwin, &vwin, sizeof(maxwin)); maxwin.width = vdo->width; maxwin.height = vdo->height; zprintf(1, "setting max win: %d x %d @(%d, %d)%s\n", maxwin.width, maxwin.height, maxwin.x, maxwin.y, (maxwin.flags & 1) ? " INTERLACE" : ""); if(ioctl(vdo->fd, VIDIOCSWIN, &maxwin) < 0) { zprintf(1, "set FAILED...trying to recover original window\n"); /* ignore errors (driver broken anyway) */ ioctl(vdo->fd, VIDIOCSWIN, &vwin); } /* re-query resulting parameters */ memset(&vwin, 0, sizeof(vwin)); if(ioctl(vdo->fd, VIDIOCGWIN, &vwin) < 0) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "querying video window settings (VIDIOCGWIN)")); zprintf(1, " final window: %d x %d @(%d, %d)%s\n", vwin.width, vwin.height, vwin.x, vwin.y, (vwin.flags & 1) ? " INTERLACE" : ""); vdo->width = vwin.width; vdo->height = vwin.height; return(0); } int _zbar_v4l1_probe (zbar_video_t *vdo) { /* check capabilities */ struct video_capability vcap; memset(&vcap, 0, sizeof(vcap)); if(ioctl(vdo->fd, VIDIOCGCAP, &vcap) < 0) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_UNSUPPORTED, __func__, "video4linux version 1 not supported (VIDIOCGCAP)")); zprintf(1, "%s (%sCAPTURE) (%d x %d) - (%d x %d)\n", vcap.name, (vcap.type & VID_TYPE_CAPTURE) ? "" : "*NO* ", vcap.minwidth, vcap.minheight, vcap.maxwidth, vcap.maxheight); if(!(vcap.type & VID_TYPE_CAPTURE)) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_UNSUPPORTED, __func__, "v4l1 device does not support CAPTURE")); if(!vdo->width || !vdo->height) { vdo->width = vcap.maxwidth; vdo->height = vcap.maxheight; } if(v4l1_init_window(vdo) || v4l1_probe_formats(vdo) || v4l1_probe_iomode(vdo)) return(-1); vdo->intf = VIDEO_V4L1; vdo->init = v4l1_init; vdo->cleanup = v4l1_cleanup; vdo->start = v4l1_start; vdo->stop = v4l1_stop; vdo->nq = v4l1_nq; vdo->dq = v4l1_dq; return(0); } zbar-0.23/zbar/Makefile.am0000664000175000017500000000656513471606200012324 00000000000000lib_LTLIBRARIES = libzbar.la libzbar_la_CPPFLAGS = $(AM_CPPFLAGS) libzbar_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION) \ -export-symbols-regex "^(zbar|_zbar.*_error)_.*" $(AM_LDFLAGS) libzbar_la_LIBADD = $(LTLIBICONV) libzbar_la_SOURCES = debug.h config.c \ error.h error.c symbol.h symbol.c \ image.h image.c convert.c \ processor.c processor.h processor/lock.c \ refcnt.h refcnt.c timer.h mutex.h \ event.h thread.h \ window.h window.c video.h video.c \ img_scanner.h img_scanner.c scanner.c \ decoder.h decoder.c misc.h misc.c EXTRA_libzbar_la_SOURCES = svg.h svg.c if ENABLE_EAN libzbar_la_SOURCES += decoder/ean.h decoder/ean.c endif if ENABLE_DATABAR libzbar_la_SOURCES += decoder/databar.h decoder/databar.c endif if ENABLE_CODE128 libzbar_la_SOURCES += decoder/code128.h decoder/code128.c endif if ENABLE_CODE93 libzbar_la_SOURCES += decoder/code93.h decoder/code93.c endif if ENABLE_CODE39 libzbar_la_SOURCES += decoder/code39.h decoder/code39.c endif if ENABLE_CODABAR libzbar_la_SOURCES += decoder/codabar.h decoder/codabar.c endif if ENABLE_I25 libzbar_la_SOURCES += decoder/i25.h decoder/i25.c endif if ENABLE_PDF417 libzbar_la_SOURCES += decoder/pdf417.h decoder/pdf417.c \ decoder/pdf417_hash.h endif if ENABLE_QRCODE libzbar_la_SOURCES += qrcode.h \ decoder/qr_finder.h decoder/qr_finder.c \ qrcode/qrdec.h qrcode/qrdec.c qrcode/qrdectxt.c \ qrcode/rs.h qrcode/rs.c \ qrcode/isaac.h qrcode/isaac.c \ qrcode/bch15_5.h qrcode/bch15_5.c \ qrcode/binarize.h qrcode/binarize.c \ qrcode/util.h qrcode/util.c endif if ENABLE_SQCODE libzbar_la_SOURCES += sqcode.h sqcode.c \ decoder/sq_finder.h decoder/sq_finder.c endif if WIN32 %-rc.o: %.rc $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) -o $@ $< %-rc.lo: %.rc $(LIBTOOL) --tag=RC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) -o $@ $< libzbar_la_SOURCES += processor/win.c libzbar.rc libzbar_la_CPPFLAGS += -mthreads libzbar_la_LDFLAGS += -mthreads # FIXME broken libzbar_la_LIBADD += libzbar-rc.lo else libzbar_la_SOURCES += processor/posix.h processor/posix.c endif if HAVE_V4L2 libzbar_la_SOURCES += video/v4l.c video/v4l2.c endif if HAVE_V4L1 if !HAVE_V4L2 libzbar_la_SOURCES += video/v4l.c endif libzbar_la_SOURCES += video/v4l1.c endif if WIN32 if HAVE_VIDEO if !WITH_DIRECTSHOW libzbar_la_SOURCES += video/vfw.c libzbar_la_LIBADD += -lvfw32 else libzbar_la_SOURCES += video/dshow.c libzbar_la_CPPFLAGS += -DCOBJMACROS libzbar_la_LIBADD += -loleaut32 -lole32 endif endif endif if !HAVE_VIDEO libzbar_la_SOURCES += video/null.c endif if HAVE_LIBV4L libzbar_la_LIBADD += $(V4L2_LIBS) endif if HAVE_JPEG libzbar_la_SOURCES += jpeg.c endif if HAVE_X libzbar_la_SOURCES += processor/x.c \ window/x.h window/x.c window/ximage.c libzbar_la_CPPFLAGS += $(X_CFLAGS) libzbar_la_LDFLAGS += $(X_LIBS) libzbar_la_LIBADD += $(X_PRE_LIBS) -lX11 $(X_EXTRA_LIBS) if HAVE_XV libzbar_la_SOURCES += window/xv.c libzbar_la_LIBADD += $(XV_LIBS) endif else if WIN32 libzbar_la_SOURCES += window/win.h window/win.c \ window/dib.c # window/vfw.c -lvfw32 libzbar_la_LIBADD += -lgdi32 -lwinmm else libzbar_la_SOURCES += processor/null.c window/null.c endif endif if HAVE_DBUS libzbar_la_LDFLAGS += $(DBUS_LIBS) endif libzbar_la_LDFLAGS += $(AM_LDFLAGS) libzbar_la_LIBADD += $(AM_LIBADD) zbar-0.23/zbar/refcnt.c0000664000175000017500000000267413471225700011714 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "refcnt.h" #if !defined(_WIN32) && !defined(TARGET_OS_MAC) && defined(HAVE_LIBPTHREAD) pthread_once_t initialized = PTHREAD_ONCE_INIT; pthread_mutex_t _zbar_reflock; static void initialize (void) { pthread_mutex_init(&_zbar_reflock, NULL); } void _zbar_refcnt_init () { pthread_once(&initialized, initialize); } #else void _zbar_refcnt_init () { } #endif zbar-0.23/zbar/event.h0000664000175000017500000000332613466560613011565 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _ZBAR_EVENT_H_ #define _ZBAR_EVENT_H_ #include #include "mutex.h" #include "timer.h" /* platform synchronization "event" abstraction */ #if defined(_WIN32) # include typedef HANDLE zbar_event_t; #else # ifdef HAVE_LIBPTHREAD # include # endif typedef struct zbar_event_s { int state; # ifdef HAVE_LIBPTHREAD pthread_cond_t cond; # endif int pollfd; } zbar_event_t; #endif extern int _zbar_event_init(zbar_event_t*); extern void _zbar_event_destroy(zbar_event_t*); extern void _zbar_event_trigger(zbar_event_t*); extern int _zbar_event_wait(zbar_event_t*, zbar_mutex_t*, zbar_timer_t*); #endif zbar-0.23/zbar/video.c0000664000175000017500000003126313471225716011544 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "video.h" #include "image.h" #ifdef HAVE_LIBJPEG extern struct jpeg_decompress_struct *_zbar_jpeg_decomp_create(void); extern void _zbar_jpeg_decomp_destroy(struct jpeg_decompress_struct *cinfo); #endif static void _zbar_video_recycle_image (zbar_image_t *img) { zbar_video_t *vdo = img->src; assert(vdo); assert(img->srcidx >= 0); video_lock(vdo); if(vdo->images[img->srcidx] != img) vdo->images[img->srcidx] = img; if(vdo->active) vdo->nq(vdo, img); else video_unlock(vdo); } static void _zbar_video_recycle_shadow (zbar_image_t *img) { zbar_video_t *vdo = img->src; assert(vdo); assert(img->srcidx == -1); video_lock(vdo); img->next = vdo->shadow_image; vdo->shadow_image = img; video_unlock(vdo); } zbar_video_t *zbar_video_create () { zbar_video_t *vdo = calloc(1, sizeof(zbar_video_t)); int i; if(!vdo) return(NULL); err_init(&vdo->err, ZBAR_MOD_VIDEO); vdo->fd = -1; (void)_zbar_mutex_init(&vdo->qlock); /* pre-allocate images */ vdo->num_images = ZBAR_VIDEO_IMAGES_MAX; vdo->images = calloc(ZBAR_VIDEO_IMAGES_MAX, sizeof(zbar_image_t*)); if(!vdo->images) { zbar_video_destroy(vdo); return(NULL); } for(i = 0; i < ZBAR_VIDEO_IMAGES_MAX; i++) { zbar_image_t *img = vdo->images[i] = zbar_image_create(); if(!img) { zbar_video_destroy(vdo); return(NULL); } img->refcnt = 0; img->cleanup = _zbar_video_recycle_image; img->srcidx = i; img->src = vdo; } return(vdo); } void zbar_video_destroy (zbar_video_t *vdo) { if(vdo->intf != VIDEO_INVALID) zbar_video_open(vdo, NULL); if(vdo->images) { int i; for(i = 0; i < ZBAR_VIDEO_IMAGES_MAX; i++) if(vdo->images[i]) _zbar_image_free(vdo->images[i]); free(vdo->images); } while(vdo->shadow_image) { zbar_image_t *img = vdo->shadow_image; vdo->shadow_image = img->next; free((void*)img->data); img->data = NULL; free(img); } if(vdo->buf) free(vdo->buf); if(vdo->formats) free(vdo->formats); if(vdo->emu_formats) free(vdo->emu_formats); if(vdo->free) vdo->free(vdo); err_cleanup(&vdo->err); _zbar_mutex_destroy(&vdo->qlock); #ifdef HAVE_LIBJPEG if(vdo->jpeg_img) { zbar_image_destroy(vdo->jpeg_img); vdo->jpeg_img = NULL; } if(vdo->jpeg) { _zbar_jpeg_decomp_destroy(vdo->jpeg); vdo->jpeg = NULL; } #endif free(vdo); } int zbar_video_open (zbar_video_t *vdo, const char *dev) { char *ldev = NULL; int rc; zbar_video_enable(vdo, 0); video_lock(vdo); if(vdo->intf != VIDEO_INVALID) { if(vdo->cleanup) { vdo->cleanup(vdo); vdo->cleanup = NULL; } zprintf(1, "closed camera (fd=%d)\n", vdo->fd); vdo->intf = VIDEO_INVALID; } video_unlock(vdo); if(!dev) return(0); if((unsigned char)dev[0] < 0x10) { /* default linux device, overloaded for other platforms */ int id = dev[0]; dev = ldev = strdup("/dev/video0"); ldev[10] = '0' + id; } rc = _zbar_video_open(vdo, dev); if(ldev) free(ldev); return(rc); } int zbar_video_get_fd (const zbar_video_t *vdo) { if(vdo->intf == VIDEO_INVALID) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "video device not opened")); if(vdo->intf != VIDEO_V4L2) return(err_capture(vdo, SEV_WARNING, ZBAR_ERR_UNSUPPORTED, __func__, "video driver does not support polling")); return(vdo->fd); } int zbar_video_request_size (zbar_video_t *vdo, unsigned width, unsigned height) { if(vdo->initialized) /* FIXME re-init different format? */ return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "already initialized, unable to resize")); vdo->width = width; vdo->height = height; zprintf(1, "request size: %d x %d\n", width, height); return(0); } int zbar_video_request_interface (zbar_video_t *vdo, int ver) { if(vdo->intf != VIDEO_INVALID) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "device already opened, unable to change interface")); vdo->intf = (video_interface_t)ver; zprintf(1, "request interface version %d\n", vdo->intf); return(0); } int zbar_video_request_iomode (zbar_video_t *vdo, int iomode) { if(vdo->intf != VIDEO_INVALID) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "device already opened, unable to change iomode")); if(iomode < 0 || iomode > VIDEO_USERPTR) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "invalid iomode requested")); vdo->iomode = iomode; return(0); } int zbar_video_get_width (const zbar_video_t *vdo) { return(vdo->width); } int zbar_video_get_height (const zbar_video_t *vdo) { return(vdo->height); } uint32_t zbar_video_get_format (const zbar_video_t *vdo) { return(vdo->format); } static inline int video_init_images (zbar_video_t *vdo) { int i; assert(vdo->datalen); if(vdo->iomode != VIDEO_MMAP) { assert(!vdo->buf); vdo->buflen = vdo->num_images * vdo->datalen; vdo->buf = calloc(1, vdo->buflen); if(!vdo->buf) return(err_capture(vdo, SEV_FATAL, ZBAR_ERR_NOMEM, __func__, "unable to allocate image buffers")); zprintf(1, "pre-allocated %d %s buffers size=0x%lx\n", vdo->num_images, (vdo->iomode == VIDEO_READWRITE) ? "READ" : "USERPTR", vdo->buflen); } for(i = 0; i < vdo->num_images; i++) { zbar_image_t *img = vdo->images[i]; img->format = vdo->format; zbar_image_set_size(img, vdo->width, vdo->height); if(vdo->iomode != VIDEO_MMAP) { unsigned long offset = i * vdo->datalen; img->datalen = vdo->datalen; img->data = (uint8_t*)vdo->buf + offset; zprintf(2, " [%02d] @%08lx\n", i, offset); } } return(0); } int zbar_video_init (zbar_video_t *vdo, unsigned long fmt) { #ifdef HAVE_LIBJPEG const zbar_format_def_t *vidfmt; #endif if(vdo->initialized) /* FIXME re-init different format? */ return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "already initialized, re-init unimplemented")); if(vdo->init(vdo, fmt)) return(-1); vdo->format = fmt; if(video_init_images(vdo)) return(-1); #ifdef HAVE_LIBJPEG vidfmt = _zbar_format_lookup(fmt); if(vidfmt && vidfmt->group == ZBAR_FMT_JPEG) { zbar_image_t *img; /* prepare for decoding */ if(!vdo->jpeg) vdo->jpeg = _zbar_jpeg_decomp_create(); if(vdo->jpeg_img) zbar_image_destroy(vdo->jpeg_img); /* create intermediate image for decoder to use*/ img = vdo->jpeg_img = zbar_image_create(); img->format = fourcc('Y','8','0','0'); zbar_image_set_size(img, vdo->width, vdo->height); img->datalen = vdo->width * vdo->height; } #endif vdo->initialized = 1; return(0); } int zbar_video_enable (zbar_video_t *vdo, int enable) { if(vdo->active == enable) return(0); if(enable) { if(vdo->intf == VIDEO_INVALID) return(err_capture(vdo, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "video device not opened")); if(!vdo->initialized && zbar_negotiate_format(vdo, NULL)) return(-1); } if(video_lock(vdo)) return(-1); vdo->active = enable; if(enable) { /* enqueue all buffers */ int i; for(i = 0; i < vdo->num_images; i++) if(vdo->nq(vdo, vdo->images[i]) || ((i + 1 < vdo->num_images) && video_lock(vdo))) return(-1); return(vdo->start(vdo)); } else { int i; for(i = 0; i < vdo->num_images; i++) vdo->images[i]->next = NULL; vdo->nq_image = vdo->dq_image = NULL; if(video_unlock(vdo)) return(-1); return(vdo->stop(vdo)); } } zbar_image_t *zbar_video_next_image (zbar_video_t *vdo) { unsigned frame; zbar_image_t *img; if(video_lock(vdo)) return(NULL); if(!vdo->active) { video_unlock(vdo); return(NULL); } frame = vdo->frame++; img = vdo->dq(vdo); if(img) { img->seq = frame; if(vdo->num_images < 2) { /* return a *copy* of the video image and immediately recycle * the driver's buffer to avoid deadlocking the resources */ zbar_image_t *tmp = img; video_lock(vdo); img = vdo->shadow_image; vdo->shadow_image = (img) ? img->next : NULL; video_unlock(vdo); if(!img) { img = zbar_image_create(); assert(img); img->refcnt = 0; img->src = vdo; /* recycle the shadow images */ img->format = vdo->format; zbar_image_set_size(img, vdo->width, vdo->height); img->datalen = vdo->datalen; img->data = malloc(vdo->datalen); } img->cleanup = _zbar_video_recycle_shadow; img->seq = frame; memcpy((void*)img->data, tmp->data, img->datalen); _zbar_video_recycle_image(tmp); } else img->cleanup = _zbar_video_recycle_image; _zbar_image_refcnt(img, 1); } return(img); } /** @brief return if fun unsupported, otherwise continue */ #define return_if_not_supported(fun, name) \ { \ if(!(fun)) { \ zprintf(1, "video driver does not implement %s\n", name); \ return ZBAR_ERR_UNSUPPORTED; \ } \ } #define return_if_non_zero(a) { int rv=a; if (rv!=0) return(rv); } int zbar_video_set_control (zbar_video_t *vdo, const char *control_name, int value) { int loc_value, rv; return_if_not_supported(vdo->set_control, "set_control"); loc_value = value; rv = vdo->set_control(vdo, control_name, &loc_value); if(rv==0) zprintf(1, "value of %s set to: %d\n", control_name, loc_value); return(rv); } int zbar_video_get_control (zbar_video_t *vdo, const char *control_name, int *value) { return_if_not_supported(vdo->get_control, "get_control"); return(vdo->get_control(vdo, control_name, value)); } struct video_controls_s *zbar_video_get_controls (const zbar_video_t *vdo, int index) { int i = 0; struct video_controls_s *p = vdo->controls; while (p && i != index) { i++; p = p->next; } if (!p) return NULL; return p; } struct video_resolution_s *zbar_video_get_resolutions (const zbar_video_t *vdo, int index) { int i = 0; struct video_resolution_s *p = vdo->res; while (i != index) { if (!p->width || !p->height) return NULL; i++; p++; } if (!p->width || !p->height) return NULL; return p; } zbar-0.23/zbar/libzbar.rc0000664000175000017500000000205113471225716012236 00000000000000#include #include #define STR(s) #s #define XSTR(s) STR(s) VS_VERSION_INFO VERSIONINFO FILEVERSION LIB_VERSION_MAJOR, LIB_VERSION_MINOR, LIB_VERSION_REVISION, 0 PRODUCTVERSION ZBAR_VERSION_MAJOR, ZBAR_VERSION_MINOR, ZBAR_VERSION_PATCH, 0 FILEOS VOS__WINDOWS32 FILETYPE VFT_DLL { BLOCK "StringFileInfo" { BLOCK "040904E4" { VALUE "ProductName", "ZBar Bar Code Reader" VALUE "Company Name", "ZBar Bar Code Reader" VALUE "InternalName", "libzbar" VALUE "OriginalFilename", "libzbar-" XSTR(LIB_VERSION_MAJOR) ".dll" VALUE "FileVersion", XSTR(LIB_VERSION_MAJOR) "." \ XSTR(LIB_VERSION_MINOR) "." XSTR(LIB_VERSION_REVISION) VALUE "ProductVersion", PACKAGE_VERSION VALUE "FileDescription", "Bar code reader library" VALUE "LegalCopyright", "Copyright 2007-2009 (c) Jeff Brown " } } BLOCK "VarFileInfo" { VALUE "Translation", 0x0409, 0x04e4 } } zbar-0.23/zbar/refcnt.h0000664000175000017500000000457113471225700011717 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _REFCNT_H_ #define _REFCNT_H_ #include #include #if defined(_WIN32) # include typedef LONG refcnt_t; static inline int _zbar_refcnt (refcnt_t *cnt, int delta) { int rc = -1; if(delta > 0) while(delta--) rc = InterlockedIncrement(cnt); else if(delta < 0) while(delta++) rc = InterlockedDecrement(cnt); assert(rc >= 0); return(rc); } #elif defined(TARGET_OS_MAC) # include typedef int32_t refcnt_t; static inline int _zbar_refcnt (refcnt_t *cnt, int delta) { int rc = OSAtomicAdd32Barrier(delta, cnt); assert(rc >= 0); return(rc); } #elif defined(HAVE_LIBPTHREAD) # include typedef int refcnt_t; extern pthread_mutex_t _zbar_reflock; static inline int _zbar_refcnt (refcnt_t *cnt, int delta) { pthread_mutex_lock(&_zbar_reflock); int rc = (*cnt += delta); pthread_mutex_unlock(&_zbar_reflock); assert(rc >= 0); return(rc); } #else typedef int refcnt_t; static inline int _zbar_refcnt (refcnt_t *cnt, int delta) { int rc = (*cnt += delta); assert(rc >= 0); return(rc); } #endif void _zbar_refcnt_init(void); #endif zbar-0.23/zbar/sqcode.c0000664000175000017500000004170713471225716011720 00000000000000/*Copyright (C) 2018 Javier Serrano Polo You can redistribute this library and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.*/ #include "sqcode.h" #include #include #include "image.h" #include "img_scanner.h" typedef enum { SHAPE_DOT, SHAPE_CORNER, SHAPE_OTHER, SHAPE_VOID } shape_t; typedef struct { float x; float y; } sq_point; typedef struct { shape_t type; unsigned x0; unsigned y0; unsigned width; unsigned height; sq_point center; } sq_dot; struct sq_reader { bool enabled; }; /*Initializes a client reader handle.*/ static void sq_reader_init(sq_reader *reader) { reader->enabled = true; } /*Allocates a client reader handle.*/ sq_reader *_zbar_sq_create(void) { sq_reader *reader = malloc(sizeof(sq_reader)); if (reader) sq_reader_init(reader); return reader; } /*Frees a client reader handle.*/ void _zbar_sq_destroy(sq_reader *reader) { free(reader); } /* reset finder state between scans */ void _zbar_sq_reset (sq_reader *reader) { reader->enabled = true; } int _zbar_sq_new_config(sq_reader *reader, unsigned config) { reader->enabled = config; return 0; } static const char base64_table[] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/' }; static char *base64_encode_buffer(const char *s, size_t size) { size_t encoded_size = (size + 2) / 3 * 4 + 1; char *encoded = malloc(encoded_size); if (!encoded) return NULL; char *e = encoded; for (;;) { unsigned char c = (*s >> 2) & 0x3f; *e++ = base64_table[c]; c = (*s++ << 4) & 0x30; if (!--size) { *e++ = base64_table[c]; *e++ = '='; *e++ = '='; break; } c |= (*s >> 4) & 0x0f; *e++ = base64_table[c]; c = (*s++ << 2) & 0x3c; if (!--size) { *e++ = base64_table[c]; *e++ = '='; break; } c |= (*s >> 6) & 0x03; *e++ = base64_table[c]; c = *s++ & 0x3f; *e++ = base64_table[c]; if (!--size) break; } *e = '\0'; return encoded; } static bool sq_extract_text(zbar_image_scanner_t *iscn, const char *buf, size_t len) { zbar_symbol_t *sym = _zbar_image_scanner_alloc_sym(iscn, ZBAR_SQCODE, 0); sym->data = base64_encode_buffer(buf, len); if (!sym->data) { _zbar_image_scanner_recycle_syms(iscn, sym); return true; } size_t b64_len = (len + 2) / 3 * 4; sym->data_alloc = b64_len + 1; sym->datalen = b64_len; _zbar_image_scanner_add_sym(iscn, sym); return false; } static bool is_black_color(const unsigned char c) { return c <= 0x7f; } static bool is_black(zbar_image_t *img, int x, int y) { if (x < 0 || (unsigned) x >= img->width || y < 0 || (unsigned) y >= img->height) return false; const unsigned char *data = img->data; return is_black_color(data[y * img->width + x]); } static void set_dot_center(sq_dot *dot, float x, float y) { dot->center.x = x; dot->center.y = y; } static void sq_scan_shape(zbar_image_t *img, sq_dot *dot, int start_x, int start_y) { if (!is_black(img, start_x, start_y)) { dot->type = SHAPE_VOID; dot->x0 = start_x; dot->y0 = start_y; dot->width = 0; dot->height = 0; set_dot_center(dot, start_x, start_y); return; } unsigned x0 = start_x; unsigned y0 = start_y; unsigned width = 1; unsigned height = 1; new_point: for (int x = x0 - 1; x < (int) (x0 + width + 1); x++) { if (is_black(img, x, y0 - 1)) { y0 = y0 - 1; height++; goto new_point; } if (is_black(img, x, y0 + height)) { height++; goto new_point; } } for (int y = y0; y < (int) (y0 + height); y++) { if (is_black(img, x0 - 1, y)) { x0 = x0 - 1; width++; goto new_point; } if (is_black(img, x0 + width, y)) { width++; goto new_point; } } dot->x0 = x0; dot->y0 = y0; dot->width = width; dot->height = height; /* Is it a corner? */ if (is_black(img, x0 + 0.25 * width, y0 + 0.25 * height) && !is_black(img, x0 + 0.75 * width, y0 + 0.25 * height) && !is_black(img, x0 + 0.25 * width, y0 + 0.75 * height) && is_black(img, x0 + 0.75 * width, y0 + 0.75 * height)) { dot->type = SHAPE_CORNER; set_dot_center(dot, x0 + 0.5 * width, y0 + 0.5 * height); return; } /* Set dot center */ const unsigned char *data = img->data; unsigned x_sum = 0; unsigned y_sum = 0; unsigned total_weight = 0; for (int y = y0; y < (int) (y0 + height); y++) { for (int x = x0; x < (int) (x0 + width); x++) { if (!is_black(img, x, y)) continue; unsigned char weight = 0xff - data[y * img->width + x]; x_sum += weight * x; y_sum += weight * y; total_weight += weight; } } dot->type = SHAPE_DOT; set_dot_center(dot, x_sum / (float) total_weight + 0.5, y_sum / (float) total_weight + 0.5); /* TODO: Is it other shape? White hole? Really a dot? */ } static void set_middle_point(sq_point *middle, const sq_point *start, const sq_point *end) { middle->x = (start->x + end->x) / 2; middle->y = (start->y + end->y) / 2; } bool find_left_dot(zbar_image_t *img, sq_dot *dot, unsigned *found_x, unsigned *found_y) { for (int y = dot->y0; y < (int) (dot->y0 + dot->height); y++) { for (int x = dot->x0 - 1; x >= (int) (dot->x0 - 2 * dot->width); x--) { if (is_black(img, x, y)) { *found_x = x; *found_y = y; return true; } } } return false; } bool find_right_dot(zbar_image_t *img, sq_dot *dot, unsigned *found_x, unsigned *found_y) { for (int y = dot->y0; y < (int) (dot->y0 + dot->height); y++) { for (int x = dot->x0 + dot->width; x < (int) (dot->x0 + 3 * dot->width); x++) { if (is_black(img, x, y)) { *found_x = x; *found_y = y; return true; } } } return false; } bool find_bottom_dot(zbar_image_t *img, sq_dot *dot, unsigned *found_x, unsigned *found_y) { for (int x = dot->x0 + dot->width - 1; x >= (int) dot->x0; x--) { for (int y = dot->y0 + dot->height; y < (int) (dot->y0 + 3 * dot->height); y++) { if (is_black(img, x, y)) { *found_x = x; *found_y = y; return true; } } } return false; } int _zbar_sq_decode (sq_reader *reader, zbar_image_scanner_t *iscn, zbar_image_t *img) { if (!reader->enabled) return 0; if (img->format != fourcc('Y','8','0','0')) { fputs("Unexpected image format\n", stderr); return 1; } /* Starting pixel */ unsigned scan_y; unsigned scan_x; for (scan_y = 0; scan_y < img->height; scan_y++) { for (scan_x = 0; scan_x < img->width; scan_x++) { if (is_black(img, scan_x, scan_y)) goto found_start; } } return 1; found_start: ; /* Starting dot */ sq_dot start_dot; sq_scan_shape(img, &start_dot, scan_x, scan_y); bool start_corner = start_dot.type == SHAPE_CORNER; bool error = true; sq_point *top_border = NULL; sq_point *left_border = NULL; sq_point *right_border = NULL; sq_point *bottom_border = NULL; size_t border_len; if (start_corner) { border_len = 0; } else { border_len = 1; top_border = malloc(sizeof(sq_point)); if (!top_border) return 1; top_border[0] = start_dot.center; } sq_dot top_left_dot = start_dot; while (find_left_dot(img, &top_left_dot, &scan_x, &scan_y)) { sq_scan_shape(img, &top_left_dot, scan_x, scan_y); if (top_left_dot.type != SHAPE_DOT) goto free_borders; if (border_len) { border_len += 2; void *ptr = realloc(top_border, border_len * sizeof(sq_point)); if (!ptr) goto free_borders; top_border = ptr; for (size_t i = border_len - 1; i >= 2; i--) top_border[i] = top_border[i - 2]; top_border[0] = top_left_dot.center; set_middle_point(&top_border[1], &top_border[0], &top_border[2]); } else { border_len = 1; top_border = malloc(sizeof(sq_point)); if (!top_border) return 1; top_border[0] = top_left_dot.center; } } if (top_left_dot.type != SHAPE_DOT) goto free_borders; sq_dot top_right_dot = start_dot; if (!start_corner) { while (find_right_dot(img, &top_right_dot, &scan_x, &scan_y)) { sq_scan_shape(img, &top_right_dot, scan_x, scan_y); if (top_right_dot.type == SHAPE_CORNER) break; if (top_right_dot.type != SHAPE_DOT) goto free_borders; border_len += 2; void *ptr = realloc(top_border, border_len * sizeof(sq_point)); if (!ptr) goto free_borders; top_border = ptr; top_border[border_len - 1] = top_right_dot.center; set_middle_point(&top_border[border_len - 2], &top_border[border_len - 3], &top_border[border_len - 1]); } } if (border_len < 3) goto free_borders; float inc_x = top_border[border_len - 1].x - top_border[border_len - 3].x; float inc_y = top_border[border_len - 1].y - top_border[border_len - 3].y; border_len += 3; void *ptr = realloc(top_border, border_len * sizeof(sq_point)); if (!ptr) goto free_borders; top_border = ptr; top_border[border_len - 3].x = top_border[border_len - 4].x + 0.5 * inc_x; top_border[border_len - 3].y = top_border[border_len - 4].y + 0.5 * inc_y; top_border[border_len - 2].x = top_border[border_len - 4].x + inc_x; top_border[border_len - 2].y = top_border[border_len - 4].y + inc_y; top_border[border_len - 1].x = top_border[border_len - 4].x + 1.5 * inc_x; top_border[border_len - 1].y = top_border[border_len - 4].y + 1.5 * inc_y; left_border = malloc(border_len * sizeof(sq_point)); if (!left_border) goto free_borders; left_border[0] = top_border[0]; sq_dot bottom_left_dot = top_left_dot; size_t cur_len = 1; while (find_bottom_dot(img, &bottom_left_dot, &scan_x, &scan_y)) { sq_scan_shape(img, &bottom_left_dot, scan_x, scan_y); if (bottom_left_dot.type == SHAPE_CORNER) break; if (bottom_left_dot.type != SHAPE_DOT) goto free_borders; cur_len += 2; if (cur_len > border_len) goto free_borders; left_border[cur_len - 1] = bottom_left_dot.center; set_middle_point(&left_border[cur_len - 2], &left_border[cur_len - 3], &left_border[cur_len - 1]); } if (cur_len != border_len - 3 || bottom_left_dot.type != SHAPE_CORNER) goto free_borders; inc_x = left_border[cur_len - 1].x - left_border[cur_len - 3].x; inc_y = left_border[cur_len - 1].y - left_border[cur_len - 3].y; left_border[border_len - 3].x = left_border[border_len - 4].x + 0.5 * inc_x; left_border[border_len - 3].y = left_border[border_len - 4].y + 0.5 * inc_y; left_border[border_len - 2].x = left_border[border_len - 4].x + inc_x; left_border[border_len - 2].y = left_border[border_len - 4].y + inc_y; left_border[border_len - 1].x = left_border[border_len - 4].x + 1.5 * inc_x; left_border[border_len - 1].y = left_border[border_len - 4].y + 1.5 * inc_y; right_border = malloc(border_len * sizeof(sq_point)); if (!right_border) goto free_borders; sq_dot bottom_right_dot = top_right_dot; cur_len = 3; while (find_bottom_dot(img, &bottom_right_dot, &scan_x, &scan_y)) { sq_scan_shape(img, &bottom_right_dot, scan_x, scan_y); if (bottom_right_dot.type != SHAPE_DOT) goto free_borders; if (cur_len == 3) { cur_len++; if (cur_len > border_len) goto free_borders; right_border[cur_len - 1] = bottom_right_dot.center; } else { cur_len += 2; if (cur_len > border_len) goto free_borders; right_border[cur_len - 1] = bottom_right_dot.center; set_middle_point(&right_border[cur_len - 2], &right_border[cur_len - 3], &right_border[cur_len - 1]); } } if (cur_len != border_len || border_len < 6) return 1; inc_x = right_border[5].x - right_border[3].x; inc_y = right_border[5].y - right_border[3].y; right_border[2].x = right_border[3].x - 0.5 * inc_x; right_border[2].y = right_border[3].y - 0.5 * inc_y; right_border[1].x = right_border[3].x - inc_x; right_border[1].y = right_border[3].y - inc_y; right_border[0].x = right_border[3].x - 1.5 * inc_x; right_border[0].y = right_border[3].y - 1.5 * inc_y; bottom_border = malloc(border_len * sizeof(sq_point)); if (!bottom_border) goto free_borders; bottom_border[border_len - 1] = right_border[border_len - 1]; sq_dot bottom_left2_dot = bottom_right_dot; size_t offset = border_len - 1; while (find_left_dot(img, &bottom_left2_dot, &scan_x, &scan_y)) { sq_scan_shape(img, &bottom_left2_dot, scan_x, scan_y); if (bottom_left2_dot.type == SHAPE_CORNER) break; if (bottom_left2_dot.type != SHAPE_DOT) goto free_borders; if (offset < 2) goto free_borders; offset -= 2; bottom_border[offset] = bottom_left2_dot.center; set_middle_point(&bottom_border[offset + 1], &bottom_border[offset], &bottom_border[offset + 2]); } if (offset != 3 || bottom_left2_dot.type != SHAPE_CORNER) goto free_borders; inc_x = bottom_border[5].x - bottom_border[3].x; inc_y = bottom_border[5].y - bottom_border[3].y; bottom_border[2].x = bottom_border[3].x - 0.5 * inc_x; bottom_border[2].y = bottom_border[3].y - 0.5 * inc_y; bottom_border[1].x = bottom_border[3].x - inc_x; bottom_border[1].y = bottom_border[3].y - inc_y; bottom_border[0].x = bottom_border[3].x - 1.5 * inc_x; bottom_border[0].y = bottom_border[3].y - 1.5 * inc_y; /* Size check */ if (border_len < 8 + 2 * (1 + 2) || border_len > 65535) goto free_borders; size_t bit_side_len = border_len - 2 * (1 + 2); size_t bit_len = bit_side_len * bit_side_len; if (bit_len % 8) goto free_borders; size_t byte_len = bit_len / 8; char *buf = calloc(byte_len, sizeof(char)); if (!buf) goto free_borders; size_t idx = 0; for (unsigned y = 3; y <= border_len - 4; y++) { for (unsigned x = 3; x <= border_len - 4; x++) { float bottom_weight = y / (float) (border_len - 1); float top_weight = 1 - bottom_weight; float right_weight = x / (float) (border_len - 1);; float left_weight = 1 - right_weight; sq_point top_left_source = {top_border[x].x + left_border[y].x - left_border[0].x, top_border[x].y + left_border[y].y - left_border[0].y}; sq_point bottom_right_source = {bottom_border[x].x + right_border[y].x - right_border[border_len - 1].x, bottom_border[x].y + right_border[y].y - right_border[border_len - 1].y}; const unsigned char *data = img->data; unsigned sample_x = top_left_source.x; unsigned sample_y = top_left_source.y; unsigned char top_left_color = data[sample_y * img->width + sample_x]; sample_x = bottom_right_source.x; sample_y = bottom_right_source.y; unsigned char bottom_right_color = data[sample_y * img->width + sample_x]; unsigned char mixed_color = ((top_weight + left_weight) * top_left_color + (bottom_weight + right_weight) * bottom_right_color) / 2; if (is_black_color(mixed_color)) buf[idx / 8] |= 1 << 7 - idx % 8; idx++; } } error = sq_extract_text(iscn, buf, byte_len); free(buf); free_borders: free(top_border); free(left_border); free(right_border); free(bottom_border); return error? 1: 0; } zbar-0.23/zbar/thread.h0000664000175000017500000000571713466560613011721 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _ZBAR_THREAD_H_ #define _ZBAR_THREAD_H_ /* simple platform thread abstraction */ #include #include "event.h" #if defined(_WIN32) # include # define HAVE_THREADS # define ZTHREAD DWORD WINAPI typedef ZTHREAD (zbar_thread_proc_t)(void*); typedef DWORD zbar_thread_id_t; #elif defined(HAVE_LIBPTHREAD) # include # include # define HAVE_THREADS # define ZTHREAD void* typedef ZTHREAD (zbar_thread_proc_t)(void*); typedef pthread_t zbar_thread_id_t; #else # undef HAVE_THREADS # undef ZTHREAD typedef void zbar_thread_proc_t; typedef int zbar_thread_id_t; #endif typedef struct zbar_thread_s { zbar_thread_id_t tid; int started, running; zbar_event_t notify, activity; } zbar_thread_t; #if defined(_WIN32) static inline void _zbar_thread_init (zbar_thread_t *thr) { thr->running = 1; _zbar_event_trigger(&thr->activity); } static inline zbar_thread_id_t _zbar_thread_self () { return(GetCurrentThreadId()); } static inline int _zbar_thread_is_self (zbar_thread_id_t tid) { return(tid == GetCurrentThreadId()); } #elif defined(HAVE_LIBPTHREAD) static inline void _zbar_thread_init (zbar_thread_t *thr) { sigset_t sigs; sigfillset(&sigs); pthread_sigmask(SIG_BLOCK, &sigs, NULL); thr->running = 1; _zbar_event_trigger(&thr->activity); } static inline zbar_thread_id_t _zbar_thread_self (void) { return(pthread_self()); } static inline int _zbar_thread_is_self (zbar_thread_id_t tid) { return(pthread_equal(tid, pthread_self())); } #else # define _zbar_thread_start(...) -1 # define _zbar_thread_stop(...) 0 # define _zbar_thread_self(...) 0 # define _zbar_thread_is_self(...) 1 #endif #ifdef HAVE_THREADS extern int _zbar_thread_start(zbar_thread_t*, zbar_thread_proc_t*, void*, zbar_mutex_t*); extern int _zbar_thread_stop(zbar_thread_t*, zbar_mutex_t*); #endif #endif zbar-0.23/zbar/timer.h0000664000175000017500000000763213471225700011557 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _ZBAR_TIMER_H_ #define _ZBAR_TIMER_H_ #include #ifdef HAVE_SYS_TIME_H # include /* gettimeofday */ #endif /* platform timer abstraction * * zbar_timer_t stores the absolute expiration of a delay from * when the timer was initialized. * * _zbar_timer_init() initialized timer with specified ms delay. * returns timer or NULL if timeout < 0 (no/infinite timeout) * _zbar_timer_check() returns ms remaining until expiration. * will be <= 0 if timer has expired */ #if _POSIX_TIMERS > 0 typedef struct timespec zbar_timer_t; static inline int _zbar_timer_now () { struct timespec now; clock_gettime(CLOCK_REALTIME, &now); return(now.tv_sec * 1000 + now.tv_nsec / 1000000); } static inline zbar_timer_t *_zbar_timer_init (zbar_timer_t *timer, int delay) { if(delay < 0) return(NULL); clock_gettime(CLOCK_REALTIME, timer); timer->tv_nsec += (delay % 1000) * 1000000; timer->tv_sec += (delay / 1000) + (timer->tv_nsec / 1000000000); timer->tv_nsec %= 1000000000; return(timer); } static inline int _zbar_timer_check (zbar_timer_t *timer) { struct timespec now; int delay; if(!timer) return(-1); clock_gettime(CLOCK_REALTIME, &now); delay = ((timer->tv_sec - now.tv_sec) * 1000 + (timer->tv_nsec - now.tv_nsec) / 1000000); return((delay >= 0) ? delay : 0); } #elif defined(_WIN32) # include typedef DWORD zbar_timer_t; static inline int _zbar_timer_now () { return(timeGetTime()); } static inline zbar_timer_t *_zbar_timer_init (zbar_timer_t *timer, int delay) { if(delay < 0) return(NULL); *timer = timeGetTime() + delay; return(timer); } static inline int _zbar_timer_check (zbar_timer_t *timer) { int delay; if(!timer) return(INFINITE); delay = *timer - timeGetTime(); return((delay >= 0) ? delay : 0); } #elif defined(HAVE_SYS_TIME_H) typedef struct timeval zbar_timer_t; static inline int _zbar_timer_now () { struct timeval now; gettimeofday(&now, NULL); return(now.tv_sec * 1000 + now.tv_usec / 1000); } static inline zbar_timer_t *_zbar_timer_init (zbar_timer_t *timer, int delay) { if(delay < 0) return(NULL); gettimeofday(timer, NULL); timer->tv_usec += (delay % 1000) * 1000; timer->tv_sec += (delay / 1000) + (timer->tv_usec / 1000000); timer->tv_usec %= 1000000; return(timer); } static inline int _zbar_timer_check (zbar_timer_t *timer) { struct timeval now; if(!timer) return(-1); gettimeofday(&now, NULL); return((timer->tv_sec - now.tv_sec) * 1000 + (timer->tv_usec - now.tv_usec) / 1000); } #else # error "unable to find a timer interface" #endif #endif zbar-0.23/zbar/window.h0000664000175000017500000001135713466560613011756 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _WINDOW_H_ #define _WINDOW_H_ #include #ifdef HAVE_INTTYPES_H # include #endif #include #include #include "symbol.h" #include "error.h" #include "mutex.h" typedef struct window_state_s window_state_t; struct zbar_window_s { errinfo_t err; /* error reporting */ zbar_image_t *image; /* last displayed image * NB image access must be locked! */ unsigned overlay; /* user set overlay level */ uint32_t format; /* output format */ unsigned width, height; /* current output size */ unsigned max_width, max_height; uint32_t src_format; /* current input format */ unsigned src_width; /* last displayed image size */ unsigned src_height; unsigned dst_width; /* conversion target */ unsigned dst_height; unsigned scale_num; /* output scaling */ unsigned scale_den; point_t scaled_offset; /* output position and size */ point_t scaled_size; uint32_t *formats; /* supported formats (zero terminated) */ zbar_mutex_t imglock; /* lock displayed image */ void *display; unsigned long xwin; unsigned long time; /* last image display in milliseconds */ unsigned long time_avg; /* average of inter-frame times */ window_state_t *state; /* platform/interface specific state */ /* interface dependent methods */ int (*init)(zbar_window_t*, zbar_image_t*, int); int (*draw_image)(zbar_window_t*, zbar_image_t*); int (*cleanup)(zbar_window_t*); }; /* window.draw has to be thread safe wrt/other apis * FIXME should be a semaphore */ static inline int window_lock (zbar_window_t *w) { int rc = 0; if((rc = _zbar_mutex_lock(&w->imglock))) { err_capture(w, SEV_FATAL, ZBAR_ERR_LOCKING, __func__, "unable to acquire lock"); w->err.errnum = rc; return(-1); } return(0); } static inline int window_unlock (zbar_window_t *w) { int rc = 0; if((rc = _zbar_mutex_unlock(&w->imglock))) { err_capture(w, SEV_FATAL, ZBAR_ERR_LOCKING, __func__, "unable to release lock"); w->err.errnum = rc; return(-1); } return(0); } static inline int _zbar_window_add_format (zbar_window_t *w, uint32_t fmt) { int i; for(i = 0; w->formats && w->formats[i]; i++) if(w->formats[i] == fmt) return(i); w->formats = realloc(w->formats, (i + 2) * sizeof(uint32_t)); w->formats[i] = fmt; w->formats[i + 1] = 0; return(i); } static inline point_t window_scale_pt (zbar_window_t *w, point_t p) { p.x = ((long)p.x * w->scale_num + w->scale_den - 1) / w->scale_den; p.y = ((long)p.y * w->scale_num + w->scale_den - 1) / w->scale_den; return(p); } /* PAL interface */ extern int _zbar_window_attach(zbar_window_t*, void*, unsigned long); extern int _zbar_window_expose(zbar_window_t*, int, int, int, int); extern int _zbar_window_resize(zbar_window_t*); extern int _zbar_window_clear(zbar_window_t*); extern int _zbar_window_begin(zbar_window_t*); extern int _zbar_window_end(zbar_window_t*); extern int _zbar_window_draw_marker(zbar_window_t*, uint32_t, point_t); extern int _zbar_window_draw_polygon(zbar_window_t*, uint32_t, const point_t*, int); extern int _zbar_window_draw_text(zbar_window_t*, uint32_t, point_t, const char*); extern int _zbar_window_fill_rect(zbar_window_t*, uint32_t, point_t, point_t); extern int _zbar_window_draw_logo(zbar_window_t*); #endif zbar-0.23/zbar/misc.h0000664000175000017500000000411513471225700011363 00000000000000/*------------------------------------------------------------------------ * Copyright 2012 (c) Jarek Czekalski * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _MISC_H_ #define _MISC_H_ struct resolution_s { long cx; long cy; }; typedef struct resolution_s resolution_t; struct resolution_list_s { resolution_t *resolutions; long cnt; }; typedef struct resolution_list_s resolution_list_t; void resolution_list_init(resolution_list_t *list); void resolution_list_cleanup(resolution_list_t *list); void resolution_list_add(resolution_list_t *list, resolution_t *resolution); /// Fill resolution with the closest resolution found in /// list. /** If list is empty, * the resolution is unchanged. * If resolution is empty, * the biggest resolution is chosen. */ void get_closest_resolution(resolution_t *resolution, resolution_list_t *list); /// Returns 1 if the struct is null, otherwise 0 int is_struct_null_fun(const void *pdata, const int len); /// Returns 1 if the struct is null, otherwise 0 #define is_struct_null(pdata) is_struct_null_fun(pdata, sizeof(*pdata)) #endif zbar-0.23/zbar/processor.c0000664000175000017500000005142313471225716012455 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "processor.h" #include "window.h" #include "image.h" #include "img_scanner.h" static inline int proc_enter (zbar_processor_t *proc) { _zbar_mutex_lock(&proc->mutex); return(_zbar_processor_lock(proc)); } static inline int proc_leave (zbar_processor_t *proc) { int rc = _zbar_processor_unlock(proc, 0); _zbar_mutex_unlock(&proc->mutex); return(rc); } static inline int proc_open (zbar_processor_t *proc) { /* arbitrary default */ int width = 640, height = 480; if(proc->video) { width = zbar_video_get_width(proc->video); height = zbar_video_get_height(proc->video); } return(_zbar_processor_open(proc, "zbar barcode reader", width, height)); } /* API lock is already held */ int _zbar_process_image (zbar_processor_t *proc, zbar_image_t *img) { uint32_t force_fmt = proc->force_output; if(img) { if(proc->dumping) { zbar_image_write(proc->window->image, "zbar"); proc->dumping = 0; } uint32_t format = zbar_image_get_format(img); zprintf(16, "processing: %.4s(%08" PRIx32 ") %dx%d @%p\n", (char*)&format, format, zbar_image_get_width(img), zbar_image_get_height(img), zbar_image_get_data(img)); /* FIXME locking all other interfaces while processing is conservative * but easier for now and we don't expect this to take long... */ zbar_image_t *tmp = zbar_image_convert(img, fourcc('Y','8','0','0')); if(!tmp) goto error; if(proc->syms) { zbar_symbol_set_ref(proc->syms, -1); proc->syms = NULL; } zbar_image_scanner_recycle_image(proc->scanner, img); int nsyms = zbar_scan_image(proc->scanner, tmp); _zbar_image_swap_symbols(img, tmp); zbar_image_destroy(tmp); tmp = NULL; if(nsyms < 0) goto error; proc->syms = zbar_image_scanner_get_results(proc->scanner); if(proc->syms) zbar_symbol_set_ref(proc->syms, 1); if(_zbar_verbosity >= 8) { const zbar_symbol_t *sym = zbar_image_first_symbol(img); while(sym) { zbar_symbol_type_t type = zbar_symbol_get_type(sym); int count = zbar_symbol_get_count(sym); zprintf(8, "%s: %s (%d pts) (dir=%d) (q=%d) (%s)\n", zbar_get_symbol_name(type), zbar_symbol_get_data(sym), zbar_symbol_get_loc_size(sym), zbar_symbol_get_orientation(sym), zbar_symbol_get_quality(sym), (count < 0) ? "uncertain" : (count > 0) ? "duplicate" : "new"); sym = zbar_symbol_next(sym); } } if(nsyms) { /* FIXME only call after filtering */ _zbar_mutex_lock(&proc->mutex); _zbar_processor_notify(proc, EVENT_OUTPUT); _zbar_mutex_unlock(&proc->mutex); if(proc->handler) proc->handler(img, proc->userdata); } if(force_fmt) { zbar_symbol_set_t *syms = img->syms; img = zbar_image_convert(img, force_fmt); if(!img) goto error; img->syms = syms; zbar_symbol_set_ref(syms, 1); } } /* display to window if enabled */ int rc = 0; if(proc->window) { if((rc = zbar_window_draw(proc->window, img))) err_copy(proc, proc->window); _zbar_processor_invalidate(proc); } if(force_fmt && img) zbar_image_destroy(img); return(rc); error: return(err_capture(proc, SEV_ERROR, ZBAR_ERR_UNSUPPORTED, __func__, "unknown image format")); } int _zbar_processor_handle_input (zbar_processor_t *proc, int input) { int event = EVENT_INPUT; switch(input) { case -1: event |= EVENT_CANCELED; _zbar_processor_set_visible(proc, 0); err_capture(proc, SEV_WARNING, ZBAR_ERR_CLOSED, __func__, "user closed display window"); break; case 'd': proc->dumping = 1; return(0); case '+': case '=': if(proc->window) { int ovl = zbar_window_get_overlay(proc->window); zbar_window_set_overlay(proc->window, ovl + 1); } break; case '-': if(proc->window) { int ovl = zbar_window_get_overlay(proc->window); zbar_window_set_overlay(proc->window, ovl - 1); } break; } _zbar_mutex_lock(&proc->mutex); proc->input = input; if(input == -1 && proc->visible && proc->streaming) /* also cancel outstanding output waiters */ event |= EVENT_OUTPUT; _zbar_processor_notify(proc, event); _zbar_mutex_unlock(&proc->mutex); return(input); } #ifdef ZTHREAD static ZTHREAD proc_video_thread (void *arg) { zbar_processor_t *proc = arg; zbar_thread_t *thread = &proc->video_thread; _zbar_mutex_lock(&proc->mutex); _zbar_thread_init(thread); zprintf(4, "spawned video thread\n"); while(thread->started) { /* wait for video stream to be active */ while(thread->started && !proc->streaming) _zbar_event_wait(&thread->notify, &proc->mutex, NULL); if(!thread->started) break; /* blocking capture image from video */ _zbar_mutex_unlock(&proc->mutex); zbar_image_t *img = zbar_video_next_image(proc->video); _zbar_mutex_lock(&proc->mutex); if(!img && !proc->streaming) continue; else if(!img) /* FIXME could abort streaming and keep running? */ break; /* acquire API lock */ _zbar_processor_lock(proc); _zbar_mutex_unlock(&proc->mutex); if(thread->started && proc->streaming) _zbar_process_image(proc, img); zbar_image_destroy(img); _zbar_mutex_lock(&proc->mutex); /* release API lock */ _zbar_processor_unlock(proc, 0); } thread->running = 0; _zbar_event_trigger(&thread->activity); _zbar_mutex_unlock(&proc->mutex); return(0); } static ZTHREAD proc_input_thread (void *arg) { zbar_processor_t *proc = arg; zbar_thread_t *thread = &proc->input_thread; if(proc->window && proc_open(proc)) goto done; _zbar_mutex_lock(&proc->mutex); thread->running = 1; _zbar_event_trigger(&thread->activity); zprintf(4, "spawned input thread\n"); int rc = 0; while(thread->started && rc >= 0) { _zbar_mutex_unlock(&proc->mutex); rc = _zbar_processor_input_wait(proc, &thread->notify, -1); _zbar_mutex_lock(&proc->mutex); } _zbar_mutex_unlock(&proc->mutex); _zbar_processor_close(proc); _zbar_mutex_lock(&proc->mutex); done: thread->running = 0; _zbar_event_trigger(&thread->activity); _zbar_mutex_unlock(&proc->mutex); return(0); } #endif zbar_processor_t *zbar_processor_create (int threaded) { zbar_processor_t *proc = calloc(1, sizeof(zbar_processor_t)); if(!proc) return(NULL); err_init(&proc->err, ZBAR_MOD_PROCESSOR); proc->scanner = zbar_image_scanner_create(); if(!proc->scanner) { free(proc); return(NULL); } proc->threaded = !_zbar_mutex_init(&proc->mutex) && threaded; _zbar_processor_init(proc); return(proc); } void zbar_processor_destroy (zbar_processor_t *proc) { zbar_processor_init(proc, NULL, 0); if(proc->syms) { zbar_symbol_set_ref(proc->syms, -1); proc->syms = NULL; } if(proc->scanner) { zbar_image_scanner_destroy(proc->scanner); proc->scanner = NULL; } _zbar_mutex_destroy(&proc->mutex); _zbar_processor_cleanup(proc); assert(!proc->wait_head); assert(!proc->wait_tail); assert(!proc->wait_next); proc_waiter_t *w, *next; for(w = proc->free_waiter; w; w = next) { next = w->next; _zbar_event_destroy(&w->notify); free(w); } err_cleanup(&proc->err); free(proc); } int zbar_processor_init (zbar_processor_t *proc, const char *dev, int enable_display) { if(proc->video) zbar_processor_set_active(proc, 0); if(proc->window && !proc->input_thread.started) _zbar_processor_close(proc); _zbar_mutex_lock(&proc->mutex); _zbar_thread_stop(&proc->input_thread, &proc->mutex); _zbar_thread_stop(&proc->video_thread, &proc->mutex); _zbar_processor_lock(proc); _zbar_mutex_unlock(&proc->mutex); if(proc->window) { zbar_window_destroy(proc->window); proc->window = NULL; } int rc = 0; if(proc->video) { zbar_video_destroy(proc->video); proc->video = NULL; } if(!dev && !enable_display) /* nothing to do */ goto done; if(enable_display) { proc->window = zbar_window_create(); if(!proc->window) { rc = err_capture(proc, SEV_FATAL, ZBAR_ERR_NOMEM, __func__, "allocating window resources"); goto done; } } if(dev) { proc->video = zbar_video_create(); if(!proc->video) { rc = err_capture(proc, SEV_FATAL, ZBAR_ERR_NOMEM, __func__, "allocating video resources"); goto done; } if(proc->req_width || proc->req_height) zbar_video_request_size(proc->video, proc->req_width, proc->req_height); if(proc->req_intf) zbar_video_request_interface(proc->video, proc->req_intf); if((proc->req_iomode && zbar_video_request_iomode(proc->video, proc->req_iomode)) || zbar_video_open(proc->video, dev)) { rc = err_copy(proc, proc->video); goto done; } } /* spawn blocking video thread */ int video_threaded = (proc->threaded && proc->video && zbar_video_get_fd(proc->video) < 0); if(video_threaded && _zbar_thread_start(&proc->video_thread, proc_video_thread, proc, &proc->mutex)) { rc = err_capture(proc, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "spawning video thread"); goto done; } /* spawn input monitor thread */ int input_threaded = (proc->threaded && (proc->window || (proc->video && !video_threaded))); if(input_threaded && _zbar_thread_start(&proc->input_thread, proc_input_thread, proc, &proc->mutex)) { rc = err_capture(proc, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__, "spawning input thread"); goto done; } if(proc->window && !input_threaded && (rc = proc_open(proc))) goto done; if(proc->video && proc->force_input) { if(zbar_video_init(proc->video, proc->force_input)) rc = err_copy(proc, proc->video); } else if(proc->video) { int retry = -1; if(proc->window) { retry = zbar_negotiate_format(proc->video, proc->window); if(retry) fprintf(stderr, "WARNING: no compatible input to output format\n" "...trying again with output disabled\n"); } if(retry) retry = zbar_negotiate_format(proc->video, NULL); if(retry) { zprintf(1, "ERROR: no compatible %s format\n", (proc->video) ? "video input" : "window output"); rc = err_capture(proc, SEV_ERROR, ZBAR_ERR_UNSUPPORTED, __func__, "no compatible image format"); } } done: _zbar_mutex_lock(&proc->mutex); proc_leave(proc); return(rc); } zbar_image_data_handler_t* zbar_processor_set_data_handler (zbar_processor_t *proc, zbar_image_data_handler_t *handler, const void *userdata) { zbar_image_data_handler_t *result = NULL; proc_enter(proc); result = proc->handler; proc->handler = handler; proc->userdata = userdata; proc_leave(proc); return(result); } void zbar_processor_set_userdata (zbar_processor_t *proc, void *userdata) { _zbar_mutex_lock(&proc->mutex); proc->userdata = userdata; _zbar_mutex_unlock(&proc->mutex); } void *zbar_processor_get_userdata (const zbar_processor_t *proc) { zbar_processor_t *ncproc = (zbar_processor_t*)proc; _zbar_mutex_lock(&ncproc->mutex); void *userdata = (void*)ncproc->userdata; _zbar_mutex_unlock(&ncproc->mutex); return(userdata); } int zbar_processor_set_config (zbar_processor_t *proc, zbar_symbol_type_t sym, zbar_config_t cfg, int val) { proc_enter(proc); int rc = zbar_image_scanner_set_config(proc->scanner, sym, cfg, val); proc_leave(proc); return(rc); } int zbar_processor_set_control (zbar_processor_t *proc, const char *control_name, int value) { proc_enter(proc); int value_before, value_after; if(_zbar_verbosity >= 4) if(zbar_video_get_control(proc->video, control_name, &value_before)==0) zprintf(0, "value of %s before a set: %d\n", control_name, value_before); int rc = zbar_video_set_control(proc->video, control_name, value); if(_zbar_verbosity >= 4) if(zbar_video_get_control(proc->video, control_name, &value_after)==0) zprintf(0, "value of %s after a set: %d\n", control_name, value_after); proc_leave(proc); return(rc); } int zbar_processor_get_control (zbar_processor_t *proc, const char *control_name, int *value) { proc_enter(proc); int rc = zbar_video_get_control(proc->video, control_name, value); proc_leave(proc); return(rc); } int zbar_processor_request_size (zbar_processor_t *proc, unsigned width, unsigned height) { proc_enter(proc); proc->req_width = width; proc->req_height = height; proc_leave(proc); return(0); } int zbar_processor_request_interface (zbar_processor_t *proc, int ver) { proc_enter(proc); proc->req_intf = ver; proc_leave(proc); return(0); } int zbar_processor_request_iomode (zbar_processor_t *proc, int iomode) { proc_enter(proc); proc->req_iomode = iomode; proc_leave(proc); return(0); } int zbar_processor_force_format (zbar_processor_t *proc, unsigned long input, unsigned long output) { proc_enter(proc); proc->force_input = input; proc->force_output = output; proc_leave(proc); return(0); } int zbar_processor_is_visible (zbar_processor_t *proc) { proc_enter(proc); int visible = proc->window && proc->visible; proc_leave(proc); return(visible); } int zbar_processor_set_visible (zbar_processor_t *proc, int visible) { proc_enter(proc); _zbar_mutex_unlock(&proc->mutex); int rc = 0; if(proc->window) { if(proc->video) rc = _zbar_processor_set_size(proc, zbar_video_get_width(proc->video), zbar_video_get_height(proc->video)); if(!rc) rc = _zbar_processor_set_visible(proc, visible); if(!rc) proc->visible = (visible != 0); } else if(visible) rc = err_capture(proc, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "processor display window not initialized"); _zbar_mutex_lock(&proc->mutex); proc_leave(proc); return(rc); } const zbar_symbol_set_t* zbar_processor_get_results (const zbar_processor_t *proc) { zbar_processor_t *ncproc = (zbar_processor_t*)proc; proc_enter(ncproc); const zbar_symbol_set_t *syms = proc->syms; if(syms) zbar_symbol_set_ref(syms, 1); proc_leave(ncproc); return(syms); } int zbar_processor_user_wait (zbar_processor_t *proc, int timeout) { proc_enter(proc); _zbar_mutex_unlock(&proc->mutex); int rc = -1; if(proc->visible || proc->streaming || timeout >= 0) { zbar_timer_t timer; rc = _zbar_processor_wait(proc, EVENT_INPUT, _zbar_timer_init(&timer, timeout)); } if(!proc->visible) rc = err_capture(proc, SEV_WARNING, ZBAR_ERR_CLOSED, __func__, "display window not available for input"); if(rc > 0) rc = proc->input; _zbar_mutex_lock(&proc->mutex); proc_leave(proc); return(rc); } int zbar_processor_set_active (zbar_processor_t *proc, int active) { proc_enter(proc); int rc; if(!proc->video) { rc = err_capture(proc, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "video input not initialized"); goto done; } _zbar_mutex_unlock(&proc->mutex); zbar_image_scanner_enable_cache(proc->scanner, active); rc = zbar_video_enable(proc->video, active); if(!rc) { _zbar_mutex_lock(&proc->mutex); proc->streaming = active; _zbar_mutex_unlock(&proc->mutex); rc = _zbar_processor_enable(proc); } else err_copy(proc, proc->video); if(!proc->streaming && proc->window) { if(zbar_window_draw(proc->window, NULL) && !rc) rc = err_copy(proc, proc->window); _zbar_processor_invalidate(proc); } _zbar_mutex_lock(&proc->mutex); if(proc->video_thread.started) _zbar_event_trigger(&proc->video_thread.notify); done: proc_leave(proc); return(rc); } int zbar_process_one (zbar_processor_t *proc, int timeout) { proc_enter(proc); int streaming = proc->streaming; _zbar_mutex_unlock(&proc->mutex); int rc = 0; if(!proc->video) { rc = err_capture(proc, SEV_ERROR, ZBAR_ERR_INVALID, __func__, "video input not initialized"); goto done; } if(!streaming) { rc = zbar_processor_set_active(proc, 1); if(rc) goto done; } zbar_timer_t timer; rc = _zbar_processor_wait(proc, EVENT_OUTPUT, _zbar_timer_init(&timer, timeout)); if(!streaming && zbar_processor_set_active(proc, 0)) rc = -1; done: _zbar_mutex_lock(&proc->mutex); proc_leave(proc); return(rc); } int zbar_process_image (zbar_processor_t *proc, zbar_image_t *img) { proc_enter(proc); _zbar_mutex_unlock(&proc->mutex); int rc = 0; if(img && proc->window) rc = _zbar_processor_set_size(proc, zbar_image_get_width(img), zbar_image_get_height(img)); if(!rc) { zbar_image_scanner_enable_cache(proc->scanner, 0); zbar_image_scanner_request_dbus(proc->scanner, proc->is_dbus_enabled); rc = _zbar_process_image(proc, img); if(proc->streaming) zbar_image_scanner_enable_cache(proc->scanner, 1); } _zbar_mutex_lock(&proc->mutex); proc_leave(proc); return(rc); } int zbar_processor_request_dbus (zbar_processor_t *proc, int req_dbus_enabled) { #ifdef HAVE_DBUS proc_enter(proc); proc->is_dbus_enabled = req_dbus_enabled; proc_leave(proc); return(0); #else return(1); #endif } zbar-0.23/Makefile.am0000664000175000017500000000650413471225716011370 00000000000000ACLOCAL_AMFLAGS = -I config bin_PROGRAMS = check_PROGRAMS = EXTRA_PROGRAMS = lib_LTLIBRARIES = pyexec_LTLIBRARIES = CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = BUILT_SOURCES = EXTRA_DIST = PHONY = $(SUBDIRS) pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = zbar.pc dist_doc_DATA = COPYING HACKING.md INSTALL.md LICENSE.md NEWS.md README.md TODO.md include $(srcdir)/include/Makefile.am.inc SUBDIRS = zbar zbar/libzbar.la: $(MAKE) -C @builddir@/zbar libzbar.la if HAVE_MAGICK include $(srcdir)/zbarimg/Makefile.am.inc endif if HAVE_VIDEO include $(srcdir)/zbarcam/Makefile.am.inc endif if HAVE_PYTHON include $(srcdir)/python/Makefile.am.inc endif if HAVE_GTK SUBDIRS += gtk pkgconfig_DATA += zbar-gtk.pc gtk/libzbargtk.la: $(MAKE) -C @builddir@/gtk libzbargtk.la gtk/zbarmarshal.h: $(MAKE) -C @builddir@/gtk zbarmarshal.h gtk/ZBar-1.0.typelib: $(MAKE) -C $(srcdir)/gtk ZBar-1.0.typelib if HAVE_PYGTK2 include $(srcdir)/pygtk/Makefile.am.inc endif endif if HAVE_QT include $(srcdir)/qt/Makefile.am.inc pkgconfig_DATA += zbar-qt.pc endif if HAVE_JAVA SUBDIRS += java endif if HAVE_NPAPI include $(srcdir)/plugin/Makefile.am.inc endif include $(srcdir)/test/Makefile.am.inc if HAVE_DOC include $(srcdir)/doc/Makefile.am.inc endif if HAVE_DBUS dbusconfdir = @DBUS_CONFDIR@ dbusconf_DATA = $(srcdir)/dbus/org.linuxtv.Zbar.conf EXTRA_DIST += $(dbusconf_DATA) endif EXTRA_DIST += zbar.ico zbar.nsi EXTRA_DIST += examples/*.png examples/sha1sum \ examples/upcrpc.py examples/upcrpc.pl \ examples/scan_image.c examples/scan_image.cpp examples/scan_image.vcproj EXTRA_DIST += perl/MANIFEST perl/README perl/Changes perl/COPYING.LIB \ perl/Makefile.PL perl/typemap perl/ZBar.xs perl/ppport.h \ perl/ZBar.pm perl/inc/Devel/CheckLib.pm perl/ZBar/Image.pod \ perl/ZBar/ImageScanner.pod perl/ZBar/Processor.pod perl/ZBar/Symbol.pod \ perl/examples/paginate.pl perl/examples/processor.pl \ perl/examples/read_one.pl perl/examples/scan_image.pl \ 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 if WIN32 dist_doc_DATA += README-windows.md pkgdata_DATA = $(srcdir)/python/test/barcode.png \ $(srcdir)/examples/scan_image.cpp $(srcdir)/examples/scan_image.vcproj %-rc.o: %.rc $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) -o $@ $< %-rc.lo: %.rc $(LIBTOOL) --tag=RC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) -o $@ $< # install to tmp dest and run NSIS to generate installer dist-nsis: html-local test ! -e _nsis || test -d _nsis && rm -rf _nsis mkdir _nsis tmpinst=`cd _nsis && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR=$$tmpinst prefix=/ install cp zbar/.libs/libzbar-0.dll.def _nsis/lib/libzbar-0.def cp -r doc/html _nsis/share/doc/zbar/ $(WINEXEC) lib.exe /machine:x86 /def:_nsis/lib/libzbar-0.def /out:_nsis/lib/libzbar-0.lib cd _nsis && \ makensis -NOCD -V2 -DVERSION=$(VERSION) $(builddir)/zbar.nsi @ls -l _nsis/zbar-$(VERSION)-setup.exe PHONY += dist-nsis endif SUBDIRS += . archive: git archive --format=tar --prefix=zbar-$(VERSION)/ -o zbar-$(VERSION).tar $(VERSION) bzip2 zbar-$(VERSION).tar .PHONY : $(PHONY) archive dist-hook: rm -f $(distdir)/debian $(distdir)/travis zbar-0.23/java/0000775000175000017500000000000013471606260010325 500000000000000zbar-0.23/java/Makefile.in0000664000175000017500000006610613471606247012330 00000000000000# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = java ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(javadir)" "$(DESTDIR)$(javadir)" LTLIBRARIES = $(java_LTLIBRARIES) libzbarjni_la_DEPENDENCIES = $(abs_top_builddir)/zbar/libzbar.la am__objects_1 = am_libzbarjni_la_OBJECTS = libzbarjni_la-zbarjni.lo $(am__objects_1) nodist_libzbarjni_la_OBJECTS = libzbarjni_la_OBJECTS = $(am_libzbarjni_la_OBJECTS) \ $(nodist_libzbarjni_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libzbarjni_la-zbarjni.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libzbarjni_la_SOURCES) $(nodist_libzbarjni_la_SOURCES) DIST_SOURCES = $(libzbarjni_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(java_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CFLAGS = @AM_CFLAGS@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_CXXFLAGS = @AM_CXXFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLASSPATH = @CLASSPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_CONFDIR = @DBUS_CONFDIR@ DBUS_LIBS = @DBUS_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ENABLE_CODABAR = @ENABLE_CODABAR@ ENABLE_CODE128 = @ENABLE_CODE128@ ENABLE_CODE39 = @ENABLE_CODE39@ ENABLE_CODE93 = @ENABLE_CODE93@ ENABLE_DATABAR = @ENABLE_DATABAR@ ENABLE_EAN = @ENABLE_EAN@ ENABLE_I25 = @ENABLE_I25@ ENABLE_PDF417 = @ENABLE_PDF417@ ENABLE_QRCODE = @ENABLE_QRCODE@ ENABLE_SQCODE = @ENABLE_SQCODE@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GM_CFLAGS = @GM_CFLAGS@ GM_LIBS = @GM_LIBS@ GREP = @GREP@ GTK2_CFLAGS = @GTK2_CFLAGS@ GTK2_LIBS = @GTK2_LIBS@ GTK3_CFLAGS = @GTK3_CFLAGS@ GTK3_LIBS = @GTK3_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ GTK_VERSION_MAJOR = @GTK_VERSION_MAJOR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ JAR = @JAR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CFLAGS = @JAVA_CFLAGS@ JAVA_HOME = @JAVA_HOME@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBOBJS = @LIBOBJS@ LIBQT_EXTRA_LDFLAGS = @LIBQT_EXTRA_LDFLAGS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_VERSION = @LIB_VERSION@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAGICK_CFLAGS = @MAGICK_CFLAGS@ MAGICK_LIBS = @MAGICK_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MOC = @MOC@ NM = @NM@ NMEDIT = @NMEDIT@ NPAPI_CFLAGS = @NPAPI_CFLAGS@ NPAPI_LIBS = @NPAPI_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYGTK_CFLAGS = @PYGTK_CFLAGS@ PYGTK_CODEGEN = @PYGTK_CODEGEN@ PYGTK_DEFS = @PYGTK_DEFS@ PYGTK_H2DEF = @PYGTK_H2DEF@ PYGTK_LIBS = @PYGTK_LIBS@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_CONFIG = @PYTHON_CONFIG@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ QT_CFLAGS = @QT_CFLAGS@ QT_LIBS = @QT_LIBS@ RANLIB = @RANLIB@ RC = @RC@ RELDATE = @RELDATE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ V4L2_CFLAGS = @V4L2_CFLAGS@ V4L2_LIBS = @V4L2_LIBS@ VERSION = @VERSION@ XMKMF = @XMKMF@ XMLTO = @XMLTO@ XMLTOFLAGS = @XMLTOFLAGS@ XSHM_LIBS = @XSHM_LIBS@ XV_LIBS = @XV_LIBS@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZGTK_LIB_VERSION = @ZGTK_LIB_VERSION@ ZQT_LIB_VERSION = @ZQT_LIB_VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ javadir = $(pkgdatadir)/lib PKG = net/sourceforge/zbar java_DATA = zbar.jar java_LTLIBRARIES = libzbarjni.la libzbarjni_la_CPPFLAGS = $(JAVA_CFLAGS) $(AM_CPPFLAGS) libzbarjni_la_LIBADD = $(abs_top_builddir)/zbar/libzbar.la nodist_libzbarjni_la_SOURCES = zbarjni.h libzbarjni_la_SOURCES = zbarjni.c $(nodist_libzbarjni_la_SOURCES) BUILT_SOURCES = $(nodist_libzbarjni_la_SOURCES) MAINTAINERCLEANFILES = $(nodist_libzbarjni_la_SOURCES) zbar_jar_SRCS = \ $(PKG)/Config.java $(PKG)/Modifier.java $(PKG)/Orientation.java \ $(PKG)/Symbol.java $(PKG)/SymbolIterator.java $(PKG)/SymbolSet.java \ $(PKG)/Image.java $(PKG)/ImageScanner.java zbar_jar_CLASSES = $(zbar_jar_SRCS:.java=.class) test_SRCS = test/TestImage.java test/TestImageScanner.java \ test/TestScanImage.java test_CLASSES = TestImage TestImageScanner TestScanImage EXTRA_DIST = $(zbar_jar_SRCS) $(test_SRCS) CLEANFILES = zbar.jar $(nodist_libzbarjni_la_SOURCES) $(zbar_jar_CLASSES) $(test_CLASSES:=.class) # After Java 8, it is not possible anymore to build single zbarjni.h # As we don't want to break ABI, we need to join several .h files into one @HAVE_JAVAH_FALSE@PKGH = ${shell echo ${PKG}|sed s,/,_,g} all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign java/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign java/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-javaLTLIBRARIES: $(java_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(java_LTLIBRARIES)'; test -n "$(javadir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(javadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(javadir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(javadir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(javadir)"; \ } uninstall-javaLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(java_LTLIBRARIES)'; test -n "$(javadir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(javadir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(javadir)/$$f"; \ done clean-javaLTLIBRARIES: -test -z "$(java_LTLIBRARIES)" || rm -f $(java_LTLIBRARIES) @list='$(java_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libzbarjni.la: $(libzbarjni_la_OBJECTS) $(libzbarjni_la_DEPENDENCIES) $(EXTRA_libzbarjni_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) -rpath $(javadir) $(libzbarjni_la_OBJECTS) $(libzbarjni_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzbarjni_la-zbarjni.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libzbarjni_la-zbarjni.lo: zbarjni.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbarjni_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libzbarjni_la-zbarjni.lo -MD -MP -MF $(DEPDIR)/libzbarjni_la-zbarjni.Tpo -c -o libzbarjni_la-zbarjni.lo `test -f 'zbarjni.c' || echo '$(srcdir)/'`zbarjni.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzbarjni_la-zbarjni.Tpo $(DEPDIR)/libzbarjni_la-zbarjni.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='zbarjni.c' object='libzbarjni_la-zbarjni.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzbarjni_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libzbarjni_la-zbarjni.lo `test -f 'zbarjni.c' || echo '$(srcdir)/'`zbarjni.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-javaDATA: $(java_DATA) @$(NORMAL_INSTALL) @list='$(java_DATA)'; test -n "$(javadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(javadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(javadir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(javadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(javadir)" || exit $$?; \ done uninstall-javaDATA: @$(NORMAL_UNINSTALL) @list='$(java_DATA)'; test -n "$(javadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(javadir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(javadir)" "$(DESTDIR)$(javadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-javaLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libzbarjni_la-zbarjni.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-javaDATA install-javaLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libzbarjni_la-zbarjni.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-javaDATA uninstall-javaLTLIBRARIES .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-javaLTLIBRARIES clean-libtool \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-javaDATA \ install-javaLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-javaDATA \ uninstall-javaLTLIBRARIES .PRECIOUS: Makefile # Works up to Java 8 @HAVE_JAVAH_TRUE@zbarjni.h: $(zbar_jar_SRCS) zbar.jar @HAVE_JAVAH_TRUE@ classes=`echo $(zbar_jar_CLASSES:.class=) | tr / .` ; \ @HAVE_JAVAH_TRUE@ $(JAVAH) -o $@ $$classes @HAVE_JAVAH_FALSE@zbarjni.h: $(zbar_jar_SRCS) @HAVE_JAVAH_FALSE@ $(JAVAC) -h $(abs_builddir) $(abs_srcdir)/$(PKG)/*.java @HAVE_JAVAH_FALSE@ cat $(abs_builddir)/$(PKGH)_*.h > $(abs_builddir)/zbarjni.h @HAVE_JAVAH_FALSE@ rm $(abs_builddir)/$(PKGH)_*.h zbar.jar: $(zbar_jar_SRCS) cd $(abs_srcdir); $(JAVAC) -d $(abs_builddir) $(zbar_jar_SRCS) $(JAR) cf $@ $(zbar_jar_CLASSES) || $(RM) $@ #require junit java package check-java: zbar.jar libzbarjni.la echo "making check in java" cd $(abs_srcdir); $(JAVAC) -classpath $(abs_builddir)/zbar.jar:.:$(CLASSPATH) -d $(abs_builddir) $(test_SRCS) $(abs_top_builddir)/libtool -dlopen $(abs_top_builddir)/zbar/libzbar.la -dlopen $(abs_builddir)/libzbarjni.la --mode=execute $(JAVA) -Xcheck:jni -classpath zbar.jar:.:$(CLASSPATH) org.junit.runner.JUnitCore $(test_CLASSES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zbar-0.23/java/net/0000775000175000017500000000000013471606260011113 500000000000000zbar-0.23/java/net/sourceforge/0000775000175000017500000000000013471606260013436 500000000000000zbar-0.23/java/net/sourceforge/zbar/0000775000175000017500000000000013471606260014374 500000000000000zbar-0.23/java/net/sourceforge/zbar/Symbol.java0000664000175000017500000001335013471225700016422 00000000000000/*------------------------------------------------------------------------ * Symbol * * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ package net.sourceforge.zbar; /** Immutable container for decoded result symbols associated with an image * or a composite symbol. */ public class Symbol { /** No symbol decoded. */ public static final int NONE = 0; /** Symbol detected but not decoded. */ public static final int PARTIAL = 1; /** EAN-8. */ public static final int EAN8 = 8; /** UPC-E. */ public static final int UPCE = 9; /** ISBN-10 (from EAN-13). */ public static final int ISBN10 = 10; /** UPC-A. */ public static final int UPCA = 12; /** EAN-13. */ public static final int EAN13 = 13; /** ISBN-13 (from EAN-13). */ public static final int ISBN13 = 14; /** Interleaved 2 of 5. */ public static final int I25 = 25; /** DataBar (RSS-14). */ public static final int DATABAR = 34; /** DataBar Expanded. */ public static final int DATABAR_EXP = 35; /** Codabar. */ public static final int CODABAR = 38; /** Code 39. */ public static final int CODE39 = 39; /** PDF417. */ public static final int PDF417 = 57; /** QR Code. */ public static final int QRCODE = 64; /** Code 93. */ public static final int CODE93 = 93; /** Code 128. */ public static final int CODE128 = 128; /** C pointer to a zbar_symbol_t. */ private long peer; /** Cached attributes. */ private int type; static { System.loadLibrary("zbarjni"); init(); } private static native void init(); /** Symbols are only created by other package methods. */ Symbol (long peer) { this.peer = peer; } protected void finalize () { destroy(); } /** Clean up native data associated with an instance. */ public synchronized void destroy () { if(peer != 0) { destroy(peer); peer = 0; } } /** Release the associated peer instance. */ private native void destroy(long peer); /** Retrieve type of decoded symbol. */ public int getType () { if(type == 0) type = getType(peer); return(type); } private native int getType(long peer); /** Retrieve symbology boolean configs settings used during decode. */ public native int getConfigMask(); /** Retrieve symbology characteristics detected during decode. */ public native int getModifierMask(); /** Retrieve data decoded from symbol as a String. */ public native String getData(); /** Retrieve raw data bytes decoded from symbol. */ public native byte[] getDataBytes(); /** Retrieve a symbol confidence metric. Quality is an unscaled, * relative quantity: larger values are better than smaller * values, where "large" and "small" are application dependent. */ public native int getQuality(); /** Retrieve current cache count. When the cache is enabled for * the image_scanner this provides inter-frame reliability and * redundancy information for video streams. * @returns < 0 if symbol is still uncertain * @returns 0 if symbol is newly verified * @returns > 0 for duplicate symbols */ public native int getCount(); /** Retrieve an approximate, axis-aligned bounding box for the * symbol. */ public int[] getBounds () { int n = getLocationSize(peer); if(n <= 0) return(null); int[] bounds = new int[4]; int xmin = Integer.MAX_VALUE; int xmax = Integer.MIN_VALUE; int ymin = Integer.MAX_VALUE; int ymax = Integer.MIN_VALUE; for(int i = 0; i < n; i++) { int x = getLocationX(peer, i); if(xmin > x) xmin = x; if(xmax < x) xmax = x; int y = getLocationY(peer, i); if(ymin > y) ymin = y; if(ymax < y) ymax = y; } bounds[0] = xmin; bounds[1] = ymin; bounds[2] = xmax - xmin; bounds[3] = ymax - ymin; return(bounds); } private native int getLocationSize(long peer); private native int getLocationX(long peer, int idx); private native int getLocationY(long peer, int idx); public int[] getLocationPoint (int idx) { int[] p = new int[2]; p[0] = getLocationX(peer, idx); p[1] = getLocationY(peer, idx); return(p); } /** Retrieve general axis-aligned, orientation of decoded * symbol. */ public native int getOrientation(); /** Retrieve components of a composite result. */ public SymbolSet getComponents () { return(new SymbolSet(getComponents(peer))); } private native long getComponents(long peer); native long next(); } zbar-0.23/java/net/sourceforge/zbar/Orientation.java0000664000175000017500000000310513471225700017445 00000000000000/*------------------------------------------------------------------------ * Orientation * * Copyright 2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ package net.sourceforge.zbar; /** Decoded symbol coarse orientation. */ public class Orientation { /** Unable to determine orientation. */ public static final int UNKNOWN = -1; /** Upright, read left to right. */ public static final int UP = 0; /** sideways, read top to bottom */ public static final int RIGHT = 1; /** upside-down, read right to left */ public static final int DOWN = 2; /** sideways, read bottom to top */ public static final int LEFT = 3; } zbar-0.23/java/net/sourceforge/zbar/SymbolIterator.java0000664000175000017500000000426613471225700020142 00000000000000/*------------------------------------------------------------------------ * SymbolIterator * * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ package net.sourceforge.zbar; /** Iterator over a SymbolSet. */ public class SymbolIterator implements java.util.Iterator { /** Next symbol to be returned by the iterator. */ private Symbol current; /** SymbolIterators are only created by internal interface methods. */ SymbolIterator (Symbol first) { current = first; } /** Returns true if the iteration has more elements. */ public boolean hasNext () { return(current != null); } /** Retrieves the next element in the iteration. */ public Symbol next () { if(current == null) throw(new java.util.NoSuchElementException ("access past end of SymbolIterator")); Symbol result = current; long sym = current.next(); if(sym != 0) current = new Symbol(sym); else current = null; return(result); } /** Raises UnsupportedOperationException. */ public void remove () { throw(new UnsupportedOperationException ("SymbolIterator is immutable")); } } zbar-0.23/java/net/sourceforge/zbar/SymbolSet.java0000664000175000017500000000467013471225700017103 00000000000000/*------------------------------------------------------------------------ * SymbolSet * * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ package net.sourceforge.zbar; /** Immutable container for decoded result symbols associated with an image * or a composite symbol. */ public class SymbolSet extends java.util.AbstractCollection { /** C pointer to a zbar_symbol_set_t. */ private long peer; static { System.loadLibrary("zbarjni"); init(); } private static native void init(); /** SymbolSets are only created by other package methods. */ SymbolSet (long peer) { this.peer = peer; } protected void finalize () { destroy(); } /** Clean up native data associated with an instance. */ public synchronized void destroy () { if(peer != 0) { destroy(peer); peer = 0; } } /** Release the associated peer instance. */ private native void destroy(long peer); /** Retrieve an iterator over the Symbol elements in this collection. */ public java.util.Iterator iterator () { long sym = firstSymbol(peer); if(sym == 0) return(new SymbolIterator(null)); return(new SymbolIterator(new Symbol(sym))); } /** Retrieve the number of elements in the collection. */ public native int size(); /** Retrieve C pointer to first symbol in the set. */ private native long firstSymbol(long peer); } zbar-0.23/java/net/sourceforge/zbar/Image.java0000664000175000017500000001053313471225700016177 00000000000000/*------------------------------------------------------------------------ * Image * * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ package net.sourceforge.zbar; /** stores image data samples along with associated format and size * metadata. */ public class Image { /** C pointer to a zbar_symbol_t. */ private long peer; private Object data; static { System.loadLibrary("zbarjni"); init(); } private static native void init(); public Image () { peer = create(); } public Image (int width, int height) { this(); setSize(width, height); } public Image (int width, int height, String format) { this(); setSize(width, height); setFormat(format); } public Image (String format) { this(); setFormat(format); } Image (long peer) { this.peer = peer; } /** Create an associated peer instance. */ private native long create(); protected void finalize () { destroy(); } /** Clean up native data associated with an instance. */ public synchronized void destroy () { if(peer != 0) { destroy(peer); peer = 0; } } /** Destroy the associated peer instance. */ private native void destroy(long peer); /** Image format conversion. * @returns a @em new image with the sample data from the original * image converted to the requested format fourcc. the original * image is unaffected. */ public Image convert (String format) { long newpeer = convert(peer, format); if(newpeer == 0) return(null); return(new Image(newpeer)); } private native long convert(long peer, String format); /** Retrieve the image format fourcc. */ public native String getFormat(); /** Specify the fourcc image format code for image sample data. */ public native void setFormat(String format); /** Retrieve a "sequence" (page/frame) number associated with this * image. */ public native int getSequence(); /** Associate a "sequence" (page/frame) number with this image. */ public native void setSequence(int seq); /** Retrieve the width of the image. */ public native int getWidth(); /** Retrieve the height of the image. */ public native int getHeight(); /** Retrieve the size of the image. */ public native int[] getSize(); /** Specify the pixel size of the image. */ public native void setSize(int width, int height); /** Specify the pixel size of the image. */ public native void setSize(int[] size); /** Retrieve the crop region of the image. */ public native int[] getCrop(); /** Specify the crop region of the image. */ public native void setCrop(int x, int y, int width, int height); /** Specify the crop region of the image. */ public native void setCrop(int[] crop); /** Retrieve the image sample data. */ public native byte[] getData(); /** Specify image sample data. */ public native void setData(byte[] data); /** Specify image sample data. */ public native void setData(int[] data); /** Retrieve the decoded results associated with this image. */ public SymbolSet getSymbols () { return(new SymbolSet(getSymbols(peer))); } private native long getSymbols(long peer); } zbar-0.23/java/net/sourceforge/zbar/Config.java0000664000175000017500000000406413471225700016364 00000000000000/*------------------------------------------------------------------------ * Config * * Copyright 2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ package net.sourceforge.zbar; /** Decoder configuration options. */ public class Config { /** Enable symbology/feature. */ public static final int ENABLE = 0; /** Enable check digit when optional. */ public static final int ADD_CHECK = 1; /** Return check digit when present. */ public static final int EMIT_CHECK = 2; /** Enable full ASCII character set. */ public static final int ASCII = 3; /** Minimum data length for valid decode. */ public static final int MIN_LEN = 0x20; /** Maximum data length for valid decode. */ public static final int MAX_LEN = 0x21; /** Required video consistency frames. */ public static final int UNCERTAINTY = 0x40; /** Enable scanner to collect position data. */ public static final int POSITION = 0x80; /** Image scanner vertical scan density. */ public static final int X_DENSITY = 0x100; /** Image scanner horizontal scan density. */ public static final int Y_DENSITY = 0x101; } zbar-0.23/java/net/sourceforge/zbar/Modifier.java0000664000175000017500000000276413471225700016722 00000000000000/*------------------------------------------------------------------------ * Modifier * * Copyright 2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ package net.sourceforge.zbar; /** Decoder symbology modifiers. */ public class Modifier { /** barcode tagged as GS1 (EAN.UCC) reserved * (eg, FNC1 before first data character). * data may be parsed as a sequence of GS1 AIs */ public static final int GS1 = 0; /** barcode tagged as AIM reserved * (eg, FNC1 after first character or digit pair) */ public static final int AIM = 1; } zbar-0.23/java/net/sourceforge/zbar/ImageScanner.java0000664000175000017500000000601413471225700017510 00000000000000/*------------------------------------------------------------------------ * ImageScanner * * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ package net.sourceforge.zbar; /** Read barcodes from 2-D images. */ public class ImageScanner { /** C pointer to a zbar_image_scanner_t. */ private long peer; static { System.loadLibrary("zbarjni"); init(); } private static native void init(); public ImageScanner () { peer = create(); } /** Create an associated peer instance. */ private native long create(); protected void finalize () { destroy(); } /** Clean up native data associated with an instance. */ public synchronized void destroy () { if(peer != 0) { destroy(peer); peer = 0; } } /** Destroy the associated peer instance. */ private native void destroy(long peer); /** Set config for indicated symbology (0 for all) to specified value. */ public native void setConfig(int symbology, int config, int value) throws IllegalArgumentException; /** Parse configuration string and apply to image scanner. */ public native void parseConfig(String config); /** Enable or disable the inter-image result cache (default disabled). * Mostly useful for scanning video frames, the cache filters duplicate * results from consecutive images, while adding some consistency * checking and hysteresis to the results. Invoking this method also * clears the cache. */ public native void enableCache(boolean enable); /** Retrieve decode results for last scanned image. * @returns the SymbolSet result container */ public SymbolSet getResults () { return(new SymbolSet(getResults(peer))); } private native long getResults(long peer); /** Scan for symbols in provided Image. * The image format must currently be "Y800" or "GRAY". * @returns the number of symbols successfully decoded from the image. */ public native int scanImage(Image image); } zbar-0.23/java/zbarjni.c0000664000175000017500000005170313471225700012052 00000000000000/*------------------------------------------------------------------------ * Copyright 2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #include #include #include static jfieldID SymbolSet_peer; static jfieldID Symbol_peer; static jfieldID Image_peer, Image_data; static jfieldID ImageScanner_peer; static struct { int SymbolSet_create, SymbolSet_destroy; int Symbol_create, Symbol_destroy; int Image_create, Image_destroy; int ImageScanner_create, ImageScanner_destroy; } stats; #define PEER_CAST(l) \ ((void*)(uintptr_t)(l)) #define GET_PEER(c, o) \ PEER_CAST((*env)->GetLongField(env, (o), c ## _peer)) static inline void throw_exc(JNIEnv *env, const char *name, const char *msg) { jclass cls = (*env)->FindClass(env, name); if(cls) (*env)->ThrowNew(env, cls, msg); (*env)->DeleteLocalRef(env, cls); } static inline uint32_t format_to_fourcc(JNIEnv *env, jstring format) { if(!format) goto invalid; int n = (*env)->GetStringLength(env, format); if(0 >= n || n > 4) goto invalid; char fmtstr[8]; (*env)->GetStringUTFRegion(env, format, 0, n, fmtstr); uint32_t fourcc = 0; int i; for(i = 0; i < n; i++) { if(fmtstr[i] < ' ' || 'Z' < fmtstr[i] || ('9' < fmtstr[i] && fmtstr[i] < 'A') || (' ' < fmtstr[i] && fmtstr[i] < '0')) goto invalid; fourcc |= ((uint32_t)fmtstr[i]) << (8 * i); } return(fourcc); invalid: throw_exc(env, "java/lang/IllegalArgumentException", "invalid format fourcc"); return(0); } static JavaVM *jvm = NULL; JNIEXPORT jint JNICALL JNI_OnLoad (JavaVM *_jvm, void *reserved) { jvm = _jvm; return(JNI_VERSION_1_2); } JNIEXPORT void JNICALL JNI_OnUnload (JavaVM *_jvm, void *reserved) { assert(stats.SymbolSet_create == stats.SymbolSet_destroy); assert(stats.Symbol_create == stats.Symbol_destroy); assert(stats.Image_create == stats.Image_destroy); assert(stats.ImageScanner_create == stats.ImageScanner_destroy); } JNIEXPORT void JNICALL Java_net_sourceforge_zbar_SymbolSet_init (JNIEnv *env, jclass cls) { SymbolSet_peer = (*env)->GetFieldID(env, cls, "peer", "J"); } JNIEXPORT void JNICALL Java_net_sourceforge_zbar_SymbolSet_destroy (JNIEnv *env, jobject obj, jlong peer) { zbar_symbol_set_ref(PEER_CAST(peer), -1); stats.SymbolSet_destroy++; } JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_SymbolSet_size (JNIEnv *env, jobject obj) { zbar_symbol_set_t *zsyms = GET_PEER(SymbolSet, obj); if(!zsyms) return(0); return(zbar_symbol_set_get_size(zsyms)); } JNIEXPORT jlong JNICALL Java_net_sourceforge_zbar_SymbolSet_firstSymbol (JNIEnv *env, jobject obj, jlong peer) { if(!peer) return(0); const zbar_symbol_t *zsym = zbar_symbol_set_first_symbol(PEER_CAST(peer)); if(zsym) { zbar_symbol_ref(zsym, 1); stats.Symbol_create++; } return((intptr_t)zsym); } JNIEXPORT void JNICALL Java_net_sourceforge_zbar_Symbol_init (JNIEnv *env, jclass cls) { Symbol_peer = (*env)->GetFieldID(env, cls, "peer", "J"); } JNIEXPORT void JNICALL Java_net_sourceforge_zbar_Symbol_destroy (JNIEnv *env, jobject obj, jlong peer) { zbar_symbol_ref(PEER_CAST(peer), -1); stats.Symbol_destroy++; } JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_Symbol_getType (JNIEnv *env, jobject obj, jlong peer) { return(zbar_symbol_get_type(PEER_CAST(peer))); } JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_Symbol_getConfigMask (JNIEnv *env, jobject obj) { return(zbar_symbol_get_configs(GET_PEER(Symbol, obj))); } JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_Symbol_getModifierMask (JNIEnv *env, jobject obj) { return(zbar_symbol_get_modifiers(GET_PEER(Symbol, obj))); } JNIEXPORT jstring JNICALL Java_net_sourceforge_zbar_Symbol_getData (JNIEnv *env, jobject obj) { const char *data = zbar_symbol_get_data(GET_PEER(Symbol, obj)); return((*env)->NewStringUTF(env, data)); } JNIEXPORT jstring JNICALL Java_net_sourceforge_zbar_Symbol_getDataBytes (JNIEnv *env, jobject obj) { const zbar_symbol_t *zsym = GET_PEER(Symbol, obj); const void *data = zbar_symbol_get_data(zsym); unsigned long datalen = zbar_symbol_get_data_length(zsym); if(!data || !datalen) return(NULL); jbyteArray bytes = (*env)->NewByteArray(env, datalen); if(!bytes) return(NULL); (*env)->SetByteArrayRegion(env, bytes, 0, datalen, data); return(bytes); } JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_Symbol_getQuality (JNIEnv *env, jobject obj) { return(zbar_symbol_get_quality(GET_PEER(Symbol, obj))); } JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_Symbol_getCount (JNIEnv *env, jobject obj) { return(zbar_symbol_get_count(GET_PEER(Symbol, obj))); } JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_Symbol_getLocationSize (JNIEnv *env, jobject obj, jlong peer) { return(zbar_symbol_get_loc_size(PEER_CAST(peer))); } JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_Symbol_getLocationX (JNIEnv *env, jobject obj, jlong peer, jint idx) { return(zbar_symbol_get_loc_x(PEER_CAST(peer), idx)); } JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_Symbol_getLocationY (JNIEnv *env, jobject obj, jlong peer, jint idx) { return(zbar_symbol_get_loc_y(PEER_CAST(peer), idx)); } JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_Symbol_getOrientation (JNIEnv *env, jobject obj) { return(zbar_symbol_get_orientation(GET_PEER(Symbol, obj))); } JNIEXPORT jlong JNICALL Java_net_sourceforge_zbar_Symbol_getComponents (JNIEnv *env, jobject obj, jlong peer) { const zbar_symbol_set_t *zsyms = zbar_symbol_get_components(PEER_CAST(peer)); if(zsyms) { zbar_symbol_set_ref(zsyms, 1); stats.SymbolSet_create++; } return((intptr_t)zsyms); } JNIEXPORT jlong JNICALL Java_net_sourceforge_zbar_Symbol_next (JNIEnv *env, jobject obj) { const zbar_symbol_t *zsym = zbar_symbol_next(GET_PEER(Symbol, obj)); if(zsym) { zbar_symbol_ref(zsym, 1); stats.Symbol_create++; } return((intptr_t)zsym); } static void Image_cleanupByteArray (zbar_image_t *zimg) { jobject data = zbar_image_get_userdata(zimg); assert(data); JNIEnv *env = NULL; if((*jvm)->AttachCurrentThread(jvm, (void*)&env, NULL)) return; assert(env); if(env && data) { void *raw = (void*)zbar_image_get_data(zimg); assert(raw); /* const image data is unchanged - abort copy back */ (*env)->ReleaseByteArrayElements(env, data, raw, JNI_ABORT); (*env)->DeleteGlobalRef(env, data); zbar_image_set_userdata(zimg, NULL); } } static void Image_cleanupIntArray (zbar_image_t *zimg) { jobject data = zbar_image_get_userdata(zimg); assert(data); JNIEnv *env = NULL; if((*jvm)->AttachCurrentThread(jvm, (void*)&env, NULL)) return; assert(env); if(env && data) { void *raw = (void*)zbar_image_get_data(zimg); assert(raw); /* const image data is unchanged - abort copy back */ (*env)->ReleaseIntArrayElements(env, data, raw, JNI_ABORT); (*env)->DeleteGlobalRef(env, data); zbar_image_set_userdata(zimg, NULL); } } JNIEXPORT void JNICALL Java_net_sourceforge_zbar_Image_init (JNIEnv *env, jclass cls) { Image_peer = (*env)->GetFieldID(env, cls, "peer", "J"); Image_data = (*env)->GetFieldID(env, cls, "data", "Ljava/lang/Object;"); } JNIEXPORT jlong JNICALL Java_net_sourceforge_zbar_Image_create (JNIEnv *env, jobject obj) { zbar_image_t *zimg = zbar_image_create(); if(!zimg) { throw_exc(env, "java/lang/OutOfMemoryError", NULL); return(0); } stats.Image_create++; return((intptr_t)zimg); } JNIEXPORT void JNICALL Java_net_sourceforge_zbar_Image_destroy (JNIEnv *env, jobject obj, jlong peer) { zbar_image_ref(PEER_CAST(peer), -1); stats.Image_destroy++; } JNIEXPORT jlong JNICALL Java_net_sourceforge_zbar_Image_convert (JNIEnv *env, jobject obj, jlong peer, jstring format) { uint32_t fourcc = format_to_fourcc(env, format); if(!fourcc) return(0); zbar_image_t *zimg = zbar_image_convert(PEER_CAST(peer), fourcc); if(!zimg) throw_exc(env, "java/lang/UnsupportedOperationException", "unsupported image format"); else stats.Image_create++; return((intptr_t)zimg); } JNIEXPORT jstring JNICALL Java_net_sourceforge_zbar_Image_getFormat (JNIEnv *env, jobject obj) { uint32_t fourcc = zbar_image_get_format(GET_PEER(Image, obj)); if(!fourcc) return(NULL); char fmtstr[5] = { fourcc, fourcc >> 8, fourcc >> 16, fourcc >> 24, 0 }; return((*env)->NewStringUTF(env, fmtstr)); } JNIEXPORT void JNICALL Java_net_sourceforge_zbar_Image_setFormat (JNIEnv *env, jobject obj, jstring format) { uint32_t fourcc = format_to_fourcc(env, format); if(!fourcc) return; zbar_image_set_format(GET_PEER(Image, obj), fourcc); } JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_Image_getSequence (JNIEnv *env, jobject obj) { return(zbar_image_get_sequence(GET_PEER(Image, obj))); } JNIEXPORT void JNICALL Java_net_sourceforge_zbar_Image_setSequence (JNIEnv *env, jobject obj, jint seq) { zbar_image_set_sequence(GET_PEER(Image, obj), seq); } JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_Image_getWidth (JNIEnv *env, jobject obj) { return(zbar_image_get_width(GET_PEER(Image, obj))); } JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_Image_getHeight (JNIEnv *env, jobject obj) { return(zbar_image_get_height(GET_PEER(Image, obj))); } JNIEXPORT jobject JNICALL Java_net_sourceforge_zbar_Image_getSize (JNIEnv *env, jobject obj) { jintArray size = (*env)->NewIntArray(env, 2); if(!size) return(NULL); unsigned dims[2]; zbar_image_get_size(GET_PEER(Image, obj), dims, dims + 1); jint jdims[2] = { dims[0], dims[1] }; (*env)->SetIntArrayRegion(env, size, 0, 2, jdims); return(size); } JNIEXPORT void JNICALL Java_net_sourceforge_zbar_Image_setSize__II (JNIEnv *env, jobject obj, jint width, jint height) { if(width < 0) width = 0; if(height < 0) height = 0; zbar_image_set_size(GET_PEER(Image, obj), width, height); } JNIEXPORT void JNICALL Java_net_sourceforge_zbar_Image_setSize___3I (JNIEnv *env, jobject obj, jintArray size) { if((*env)->GetArrayLength(env, size) != 2) throw_exc(env, "java/lang/IllegalArgumentException", "size must be an array of two ints"); jint dims[2]; (*env)->GetIntArrayRegion(env, size, 0, 2, dims); if(dims[0] < 0) dims[0] = 0; if(dims[1] < 0) dims[1] = 0; zbar_image_set_size(GET_PEER(Image, obj), dims[0], dims[1]); } JNIEXPORT jobject JNICALL Java_net_sourceforge_zbar_Image_getCrop (JNIEnv *env, jobject obj) { jintArray crop = (*env)->NewIntArray(env, 4); if(!crop) return(NULL); unsigned dims[4]; zbar_image_get_crop(GET_PEER(Image, obj), dims, dims + 1, dims + 2, dims + 3); jint jdims[4] = { dims[0], dims[1], dims[2], dims[3] }; (*env)->SetIntArrayRegion(env, crop, 0, 4, jdims); return(crop); } #define VALIDATE_CROP(u, m) \ if((u) < 0) { \ (m) += (u); \ (u) = 0; \ } JNIEXPORT void JNICALL Java_net_sourceforge_zbar_Image_setCrop__IIII (JNIEnv *env, jobject obj, jint x, jint y, jint w, jint h) { VALIDATE_CROP(x, w); VALIDATE_CROP(y, h); zbar_image_set_crop(GET_PEER(Image, obj), x, y, w, h); } JNIEXPORT void JNICALL Java_net_sourceforge_zbar_Image_setCrop___3I (JNIEnv *env, jobject obj, jintArray crop) { if((*env)->GetArrayLength(env, crop) != 4) throw_exc(env, "java/lang/IllegalArgumentException", "crop must be an array of four ints"); jint dims[4]; (*env)->GetIntArrayRegion(env, crop, 0, 4, dims); VALIDATE_CROP(dims[0], dims[2]); VALIDATE_CROP(dims[1], dims[3]); zbar_image_set_crop(GET_PEER(Image, obj), dims[0], dims[1], dims[2], dims[3]); } #undef VALIDATE_CROP JNIEXPORT jobject JNICALL Java_net_sourceforge_zbar_Image_getData (JNIEnv *env, jobject obj) { jobject data = (*env)->GetObjectField(env, obj, Image_data); if(data) return(data); zbar_image_t *zimg = GET_PEER(Image, obj); data = zbar_image_get_userdata(zimg); if(data) return(data); unsigned long rawlen = zbar_image_get_data_length(zimg); const void *raw = zbar_image_get_data(zimg); if(!rawlen || !raw) return(NULL); data = (*env)->NewByteArray(env, rawlen); if(!data) return(NULL); (*env)->SetByteArrayRegion(env, data, 0, rawlen, raw); (*env)->SetObjectField(env, obj, Image_data, data); return(data); } static inline void Image_setData (JNIEnv *env, jobject obj, jbyteArray data, void *raw, unsigned long rawlen, zbar_image_cleanup_handler_t *cleanup) { if(!data) cleanup = NULL; (*env)->SetObjectField(env, obj, Image_data, data); zbar_image_t *zimg = GET_PEER(Image, obj); zbar_image_set_data(zimg, raw, rawlen, cleanup); zbar_image_set_userdata(zimg, (*env)->NewGlobalRef(env, data)); } JNIEXPORT void JNICALL Java_net_sourceforge_zbar_Image_setData___3B (JNIEnv *env, jobject obj, jbyteArray data) { jbyte *raw = NULL; unsigned long rawlen = 0; if(data) { raw = (*env)->GetByteArrayElements(env, data, NULL); if(!raw) return; rawlen = (*env)->GetArrayLength(env, data); } Image_setData(env, obj, data, raw, rawlen, Image_cleanupByteArray); } JNIEXPORT void JNICALL Java_net_sourceforge_zbar_Image_setData___3I (JNIEnv *env, jobject obj, jintArray data) { jint *raw = NULL; unsigned long rawlen = 0; if(data) { raw = (*env)->GetIntArrayElements(env, data, NULL); if(!raw) return; rawlen = (*env)->GetArrayLength(env, data) * sizeof(*raw); } Image_setData(env, obj, data, raw, rawlen, Image_cleanupIntArray); } JNIEXPORT jlong JNICALL Java_net_sourceforge_zbar_Image_getSymbols (JNIEnv *env, jobject obj, jlong peer) { const zbar_symbol_set_t *zsyms = zbar_image_get_symbols(PEER_CAST(peer)); if(zsyms) { zbar_symbol_set_ref(zsyms, 1); stats.SymbolSet_create++; } return((intptr_t)zsyms); } JNIEXPORT void JNICALL Java_net_sourceforge_zbar_ImageScanner_init (JNIEnv *env, jclass cls) { ImageScanner_peer = (*env)->GetFieldID(env, cls, "peer", "J"); } JNIEXPORT jlong JNICALL Java_net_sourceforge_zbar_ImageScanner_create (JNIEnv *env, jobject obj) { zbar_image_scanner_t *zscn = zbar_image_scanner_create(); if(!zscn) { throw_exc(env, "java/lang/OutOfMemoryError", NULL); return(0); } stats.ImageScanner_create++; return((intptr_t)zscn); } JNIEXPORT void JNICALL Java_net_sourceforge_zbar_ImageScanner_destroy (JNIEnv *env, jobject obj, jlong peer) { zbar_image_scanner_destroy(PEER_CAST(peer)); stats.ImageScanner_destroy++; } JNIEXPORT void JNICALL Java_net_sourceforge_zbar_ImageScanner_setConfig (JNIEnv *env, jobject obj, jint symbology, jint config, jint value) { zbar_image_scanner_set_config(GET_PEER(ImageScanner, obj), symbology, config, value); } JNIEXPORT void JNICALL Java_net_sourceforge_zbar_ImageScanner_parseConfig (JNIEnv *env, jobject obj, jstring cfg) { const char *cfgstr = (*env)->GetStringUTFChars(env, cfg, NULL); if(!cfgstr) return; if(zbar_image_scanner_parse_config(GET_PEER(ImageScanner, obj), cfgstr)) throw_exc(env, "java/lang/IllegalArgumentException", "unknown configuration"); } JNIEXPORT void JNICALL Java_net_sourceforge_zbar_ImageScanner_enableCache (JNIEnv *env, jobject obj, jboolean enable) { zbar_image_scanner_enable_cache(GET_PEER(ImageScanner, obj), enable); } JNIEXPORT jlong JNICALL Java_net_sourceforge_zbar_ImageScanner_getResults (JNIEnv *env, jobject obj, jlong peer) { const zbar_symbol_set_t *zsyms = zbar_image_scanner_get_results(PEER_CAST(peer)); if(zsyms) { zbar_symbol_set_ref(zsyms, 1); stats.SymbolSet_create++; } return((intptr_t)zsyms); } JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_ImageScanner_scanImage (JNIEnv *env, jobject obj, jobject image) { zbar_image_scanner_t *zscn = GET_PEER(ImageScanner, obj); zbar_image_t *zimg = GET_PEER(Image, image); int n = zbar_scan_image(zscn, zimg); if(n < 0) throw_exc(env, "java/lang/UnsupportedOperationException", "unsupported image format"); return(n); } zbar-0.23/java/zbarjni.h0000664000175000017500000002704613471606260012066 00000000000000/* DO NOT EDIT THIS FILE - it is machine generated */ #include /* Header for class net_sourceforge_zbar_Image */ #ifndef _Included_net_sourceforge_zbar_Image #define _Included_net_sourceforge_zbar_Image #ifdef __cplusplus extern "C" { #endif /* * Class: net_sourceforge_zbar_Image * Method: init * Signature: ()V */ JNIEXPORT void JNICALL Java_net_sourceforge_zbar_Image_init (JNIEnv *, jclass); /* * Class: net_sourceforge_zbar_Image * Method: create * Signature: ()J */ JNIEXPORT jlong JNICALL Java_net_sourceforge_zbar_Image_create (JNIEnv *, jobject); /* * Class: net_sourceforge_zbar_Image * Method: destroy * Signature: (J)V */ JNIEXPORT void JNICALL Java_net_sourceforge_zbar_Image_destroy (JNIEnv *, jobject, jlong); /* * Class: net_sourceforge_zbar_Image * Method: convert * Signature: (JLjava/lang/String;)J */ JNIEXPORT jlong JNICALL Java_net_sourceforge_zbar_Image_convert (JNIEnv *, jobject, jlong, jstring); /* * Class: net_sourceforge_zbar_Image * Method: getFormat * Signature: ()Ljava/lang/String; */ JNIEXPORT jstring JNICALL Java_net_sourceforge_zbar_Image_getFormat (JNIEnv *, jobject); /* * Class: net_sourceforge_zbar_Image * Method: setFormat * Signature: (Ljava/lang/String;)V */ JNIEXPORT void JNICALL Java_net_sourceforge_zbar_Image_setFormat (JNIEnv *, jobject, jstring); /* * Class: net_sourceforge_zbar_Image * Method: getSequence * Signature: ()I */ JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_Image_getSequence (JNIEnv *, jobject); /* * Class: net_sourceforge_zbar_Image * Method: setSequence * Signature: (I)V */ JNIEXPORT void JNICALL Java_net_sourceforge_zbar_Image_setSequence (JNIEnv *, jobject, jint); /* * Class: net_sourceforge_zbar_Image * Method: getWidth * Signature: ()I */ JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_Image_getWidth (JNIEnv *, jobject); /* * Class: net_sourceforge_zbar_Image * Method: getHeight * Signature: ()I */ JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_Image_getHeight (JNIEnv *, jobject); /* * Class: net_sourceforge_zbar_Image * Method: getSize * Signature: ()[I */ JNIEXPORT jintArray JNICALL Java_net_sourceforge_zbar_Image_getSize (JNIEnv *, jobject); /* * Class: net_sourceforge_zbar_Image * Method: setSize * Signature: (II)V */ JNIEXPORT void JNICALL Java_net_sourceforge_zbar_Image_setSize__II (JNIEnv *, jobject, jint, jint); /* * Class: net_sourceforge_zbar_Image * Method: setSize * Signature: ([I)V */ JNIEXPORT void JNICALL Java_net_sourceforge_zbar_Image_setSize___3I (JNIEnv *, jobject, jintArray); /* * Class: net_sourceforge_zbar_Image * Method: getCrop * Signature: ()[I */ JNIEXPORT jintArray JNICALL Java_net_sourceforge_zbar_Image_getCrop (JNIEnv *, jobject); /* * Class: net_sourceforge_zbar_Image * Method: setCrop * Signature: (IIII)V */ JNIEXPORT void JNICALL Java_net_sourceforge_zbar_Image_setCrop__IIII (JNIEnv *, jobject, jint, jint, jint, jint); /* * Class: net_sourceforge_zbar_Image * Method: setCrop * Signature: ([I)V */ JNIEXPORT void JNICALL Java_net_sourceforge_zbar_Image_setCrop___3I (JNIEnv *, jobject, jintArray); /* * Class: net_sourceforge_zbar_Image * Method: getData * Signature: ()[B */ JNIEXPORT jbyteArray JNICALL Java_net_sourceforge_zbar_Image_getData (JNIEnv *, jobject); /* * Class: net_sourceforge_zbar_Image * Method: setData * Signature: ([B)V */ JNIEXPORT void JNICALL Java_net_sourceforge_zbar_Image_setData___3B (JNIEnv *, jobject, jbyteArray); /* * Class: net_sourceforge_zbar_Image * Method: setData * Signature: ([I)V */ JNIEXPORT void JNICALL Java_net_sourceforge_zbar_Image_setData___3I (JNIEnv *, jobject, jintArray); /* * Class: net_sourceforge_zbar_Image * Method: getSymbols * Signature: (J)J */ JNIEXPORT jlong JNICALL Java_net_sourceforge_zbar_Image_getSymbols (JNIEnv *, jobject, jlong); #ifdef __cplusplus } #endif #endif /* DO NOT EDIT THIS FILE - it is machine generated */ #include /* Header for class net_sourceforge_zbar_ImageScanner */ #ifndef _Included_net_sourceforge_zbar_ImageScanner #define _Included_net_sourceforge_zbar_ImageScanner #ifdef __cplusplus extern "C" { #endif /* * Class: net_sourceforge_zbar_ImageScanner * Method: init * Signature: ()V */ JNIEXPORT void JNICALL Java_net_sourceforge_zbar_ImageScanner_init (JNIEnv *, jclass); /* * Class: net_sourceforge_zbar_ImageScanner * Method: create * Signature: ()J */ JNIEXPORT jlong JNICALL Java_net_sourceforge_zbar_ImageScanner_create (JNIEnv *, jobject); /* * Class: net_sourceforge_zbar_ImageScanner * Method: destroy * Signature: (J)V */ JNIEXPORT void JNICALL Java_net_sourceforge_zbar_ImageScanner_destroy (JNIEnv *, jobject, jlong); /* * Class: net_sourceforge_zbar_ImageScanner * Method: setConfig * Signature: (III)V */ JNIEXPORT void JNICALL Java_net_sourceforge_zbar_ImageScanner_setConfig (JNIEnv *, jobject, jint, jint, jint); /* * Class: net_sourceforge_zbar_ImageScanner * Method: parseConfig * Signature: (Ljava/lang/String;)V */ JNIEXPORT void JNICALL Java_net_sourceforge_zbar_ImageScanner_parseConfig (JNIEnv *, jobject, jstring); /* * Class: net_sourceforge_zbar_ImageScanner * Method: enableCache * Signature: (Z)V */ JNIEXPORT void JNICALL Java_net_sourceforge_zbar_ImageScanner_enableCache (JNIEnv *, jobject, jboolean); /* * Class: net_sourceforge_zbar_ImageScanner * Method: getResults * Signature: (J)J */ JNIEXPORT jlong JNICALL Java_net_sourceforge_zbar_ImageScanner_getResults (JNIEnv *, jobject, jlong); /* * Class: net_sourceforge_zbar_ImageScanner * Method: scanImage * Signature: (Lnet/sourceforge/zbar/Image;)I */ JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_ImageScanner_scanImage (JNIEnv *, jobject, jobject); #ifdef __cplusplus } #endif #endif /* DO NOT EDIT THIS FILE - it is machine generated */ #include /* Header for class net_sourceforge_zbar_Symbol */ #ifndef _Included_net_sourceforge_zbar_Symbol #define _Included_net_sourceforge_zbar_Symbol #ifdef __cplusplus extern "C" { #endif #undef net_sourceforge_zbar_Symbol_NONE #define net_sourceforge_zbar_Symbol_NONE 0L #undef net_sourceforge_zbar_Symbol_PARTIAL #define net_sourceforge_zbar_Symbol_PARTIAL 1L #undef net_sourceforge_zbar_Symbol_EAN8 #define net_sourceforge_zbar_Symbol_EAN8 8L #undef net_sourceforge_zbar_Symbol_UPCE #define net_sourceforge_zbar_Symbol_UPCE 9L #undef net_sourceforge_zbar_Symbol_ISBN10 #define net_sourceforge_zbar_Symbol_ISBN10 10L #undef net_sourceforge_zbar_Symbol_UPCA #define net_sourceforge_zbar_Symbol_UPCA 12L #undef net_sourceforge_zbar_Symbol_EAN13 #define net_sourceforge_zbar_Symbol_EAN13 13L #undef net_sourceforge_zbar_Symbol_ISBN13 #define net_sourceforge_zbar_Symbol_ISBN13 14L #undef net_sourceforge_zbar_Symbol_I25 #define net_sourceforge_zbar_Symbol_I25 25L #undef net_sourceforge_zbar_Symbol_DATABAR #define net_sourceforge_zbar_Symbol_DATABAR 34L #undef net_sourceforge_zbar_Symbol_DATABAR_EXP #define net_sourceforge_zbar_Symbol_DATABAR_EXP 35L #undef net_sourceforge_zbar_Symbol_CODABAR #define net_sourceforge_zbar_Symbol_CODABAR 38L #undef net_sourceforge_zbar_Symbol_CODE39 #define net_sourceforge_zbar_Symbol_CODE39 39L #undef net_sourceforge_zbar_Symbol_PDF417 #define net_sourceforge_zbar_Symbol_PDF417 57L #undef net_sourceforge_zbar_Symbol_QRCODE #define net_sourceforge_zbar_Symbol_QRCODE 64L #undef net_sourceforge_zbar_Symbol_CODE93 #define net_sourceforge_zbar_Symbol_CODE93 93L #undef net_sourceforge_zbar_Symbol_CODE128 #define net_sourceforge_zbar_Symbol_CODE128 128L /* * Class: net_sourceforge_zbar_Symbol * Method: init * Signature: ()V */ JNIEXPORT void JNICALL Java_net_sourceforge_zbar_Symbol_init (JNIEnv *, jclass); /* * Class: net_sourceforge_zbar_Symbol * Method: destroy * Signature: (J)V */ JNIEXPORT void JNICALL Java_net_sourceforge_zbar_Symbol_destroy (JNIEnv *, jobject, jlong); /* * Class: net_sourceforge_zbar_Symbol * Method: getType * Signature: (J)I */ JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_Symbol_getType (JNIEnv *, jobject, jlong); /* * Class: net_sourceforge_zbar_Symbol * Method: getConfigMask * Signature: ()I */ JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_Symbol_getConfigMask (JNIEnv *, jobject); /* * Class: net_sourceforge_zbar_Symbol * Method: getModifierMask * Signature: ()I */ JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_Symbol_getModifierMask (JNIEnv *, jobject); /* * Class: net_sourceforge_zbar_Symbol * Method: getData * Signature: ()Ljava/lang/String; */ JNIEXPORT jstring JNICALL Java_net_sourceforge_zbar_Symbol_getData (JNIEnv *, jobject); /* * Class: net_sourceforge_zbar_Symbol * Method: getDataBytes * Signature: ()[B */ JNIEXPORT jbyteArray JNICALL Java_net_sourceforge_zbar_Symbol_getDataBytes (JNIEnv *, jobject); /* * Class: net_sourceforge_zbar_Symbol * Method: getQuality * Signature: ()I */ JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_Symbol_getQuality (JNIEnv *, jobject); /* * Class: net_sourceforge_zbar_Symbol * Method: getCount * Signature: ()I */ JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_Symbol_getCount (JNIEnv *, jobject); /* * Class: net_sourceforge_zbar_Symbol * Method: getLocationSize * Signature: (J)I */ JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_Symbol_getLocationSize (JNIEnv *, jobject, jlong); /* * Class: net_sourceforge_zbar_Symbol * Method: getLocationX * Signature: (JI)I */ JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_Symbol_getLocationX (JNIEnv *, jobject, jlong, jint); /* * Class: net_sourceforge_zbar_Symbol * Method: getLocationY * Signature: (JI)I */ JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_Symbol_getLocationY (JNIEnv *, jobject, jlong, jint); /* * Class: net_sourceforge_zbar_Symbol * Method: getOrientation * Signature: ()I */ JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_Symbol_getOrientation (JNIEnv *, jobject); /* * Class: net_sourceforge_zbar_Symbol * Method: getComponents * Signature: (J)J */ JNIEXPORT jlong JNICALL Java_net_sourceforge_zbar_Symbol_getComponents (JNIEnv *, jobject, jlong); /* * Class: net_sourceforge_zbar_Symbol * Method: next * Signature: ()J */ JNIEXPORT jlong JNICALL Java_net_sourceforge_zbar_Symbol_next (JNIEnv *, jobject); #ifdef __cplusplus } #endif #endif /* DO NOT EDIT THIS FILE - it is machine generated */ #include /* Header for class net_sourceforge_zbar_SymbolSet */ #ifndef _Included_net_sourceforge_zbar_SymbolSet #define _Included_net_sourceforge_zbar_SymbolSet #ifdef __cplusplus extern "C" { #endif #undef net_sourceforge_zbar_SymbolSet_MAX_ARRAY_SIZE #define net_sourceforge_zbar_SymbolSet_MAX_ARRAY_SIZE 2147483639L /* * Class: net_sourceforge_zbar_SymbolSet * Method: init * Signature: ()V */ JNIEXPORT void JNICALL Java_net_sourceforge_zbar_SymbolSet_init (JNIEnv *, jclass); /* * Class: net_sourceforge_zbar_SymbolSet * Method: destroy * Signature: (J)V */ JNIEXPORT void JNICALL Java_net_sourceforge_zbar_SymbolSet_destroy (JNIEnv *, jobject, jlong); /* * Class: net_sourceforge_zbar_SymbolSet * Method: size * Signature: ()I */ JNIEXPORT jint JNICALL Java_net_sourceforge_zbar_SymbolSet_size (JNIEnv *, jobject); /* * Class: net_sourceforge_zbar_SymbolSet * Method: firstSymbol * Signature: (J)J */ JNIEXPORT jlong JNICALL Java_net_sourceforge_zbar_SymbolSet_firstSymbol (JNIEnv *, jobject, jlong); #ifdef __cplusplus } #endif #endif zbar-0.23/java/Makefile.am0000664000175000017500000000404713471225716012311 00000000000000javadir = $(pkgdatadir)/lib PKG = net/sourceforge/zbar java_DATA = zbar.jar java_LTLIBRARIES = libzbarjni.la libzbarjni_la_CPPFLAGS = $(JAVA_CFLAGS) $(AM_CPPFLAGS) libzbarjni_la_LIBADD = $(abs_top_builddir)/zbar/libzbar.la nodist_libzbarjni_la_SOURCES = zbarjni.h libzbarjni_la_SOURCES = zbarjni.c $(nodist_libzbarjni_la_SOURCES) BUILT_SOURCES = $(nodist_libzbarjni_la_SOURCES) MAINTAINERCLEANFILES = $(nodist_libzbarjni_la_SOURCES) zbar_jar_SRCS = \ $(PKG)/Config.java $(PKG)/Modifier.java $(PKG)/Orientation.java \ $(PKG)/Symbol.java $(PKG)/SymbolIterator.java $(PKG)/SymbolSet.java \ $(PKG)/Image.java $(PKG)/ImageScanner.java zbar_jar_CLASSES = $(zbar_jar_SRCS:.java=.class) test_SRCS = test/TestImage.java test/TestImageScanner.java \ test/TestScanImage.java test_CLASSES = TestImage TestImageScanner TestScanImage EXTRA_DIST = $(zbar_jar_SRCS) $(test_SRCS) CLEANFILES = zbar.jar $(nodist_libzbarjni_la_SOURCES) $(zbar_jar_CLASSES) $(test_CLASSES:=.class) if HAVE_JAVAH # Works up to Java 8 zbarjni.h: $(zbar_jar_SRCS) zbar.jar classes=`echo $(zbar_jar_CLASSES:.class=) | tr / .` ; \ $(JAVAH) -o $@ $$classes else # After Java 8, it is not possible anymore to build single zbarjni.h # As we don't want to break ABI, we need to join several .h files into one PKGH = ${shell echo ${PKG}|sed s,/,_,g} zbarjni.h: $(zbar_jar_SRCS) $(JAVAC) -h $(abs_builddir) $(abs_srcdir)/$(PKG)/*.java cat $(abs_builddir)/$(PKGH)_*.h > $(abs_builddir)/zbarjni.h rm $(abs_builddir)/$(PKGH)_*.h endif zbar.jar: $(zbar_jar_SRCS) cd $(abs_srcdir); $(JAVAC) -d $(abs_builddir) $(zbar_jar_SRCS) $(JAR) cf $@ $(zbar_jar_CLASSES) || $(RM) $@ #require junit java package check-java: zbar.jar libzbarjni.la echo "making check in java" cd $(abs_srcdir); $(JAVAC) -classpath $(abs_builddir)/zbar.jar:.:$(CLASSPATH) -d $(abs_builddir) $(test_SRCS) $(abs_top_builddir)/libtool -dlopen $(abs_top_builddir)/zbar/libzbar.la -dlopen $(abs_builddir)/libzbarjni.la --mode=execute $(JAVA) -Xcheck:jni -classpath zbar.jar:.:$(CLASSPATH) org.junit.runner.JUnitCore $(test_CLASSES) zbar-0.23/java/test/0000775000175000017500000000000013471606260011304 500000000000000zbar-0.23/java/test/TestImageScanner.java0000664000175000017500000000200513471225700015254 00000000000000 import org.junit.Test; import org.junit.Before; import org.junit.After; import org.junit.Assert.*; import net.sourceforge.zbar.ImageScanner; import net.sourceforge.zbar.Config; public class TestImageScanner { protected ImageScanner scanner; @Before public void setUp () { scanner = new ImageScanner(); } @After public void tearDown () { scanner.destroy(); scanner = null; } @Test public void creation () { // create/destroy } @Test public void callSetConfig () { scanner.setConfig(0, Config.X_DENSITY, 2); scanner.setConfig(0, Config.Y_DENSITY, 4); } @Test public void callParseConfig () { scanner.parseConfig("disable"); } @Test(expected=IllegalArgumentException.class) public void callParseConfigInvalid () { scanner.parseConfig("yomama"); } @Test public void callEnableCache () { scanner.enableCache(true); scanner.enableCache(false); } } zbar-0.23/java/test/TestImage.java0000664000175000017500000001055713471225700013755 00000000000000 import org.junit.Test; import org.junit.Before; import org.junit.After; import static org.junit.Assert.*; import net.sourceforge.zbar.Image; public class TestImage { protected Image image; @Before public void setUp () { image = new Image(); } @After public void tearDown () { image.destroy(); image = null; } @Test public void creation () { Image img0 = new Image(123, 456); Image img1 = new Image("BGR3"); Image img2 = new Image(987, 654, "UYVY"); assertEquals(123, img0.getWidth()); assertEquals(456, img0.getHeight()); assertEquals(null, img0.getFormat()); assertEquals(0, img1.getWidth()); assertEquals(0, img1.getHeight()); assertEquals("BGR3", img1.getFormat()); assertEquals(987, img2.getWidth()); assertEquals(654, img2.getHeight()); assertEquals("UYVY", img2.getFormat()); } @Test public void sequence () { assertEquals(0, image.getSequence()); image.setSequence(42); assertEquals(42, image.getSequence()); } @Test public void size () { assertEquals(0, image.getWidth()); assertEquals(0, image.getHeight()); image.setSize(640, 480); int[] size0 = { 640, 480 }; assertArrayEquals(size0, image.getSize()); int[] size1 = { 320, 240 }; image.setSize(size1); assertEquals(320, image.getWidth()); assertEquals(240, image.getHeight()); } @Test public void crop () { int[] zeros = { 0, 0, 0, 0 }; assertArrayEquals(zeros, image.getCrop()); image.setSize(123, 456); int[] crop0 = { 0, 0, 123, 456 }; assertArrayEquals(crop0, image.getCrop()); image.setCrop(1, 2, 34, 56); int[] crop1 = { 1, 2, 34, 56 }; assertArrayEquals(crop1, image.getCrop()); image.setCrop(-20, -20, 200, 500); assertArrayEquals(crop0, image.getCrop()); int[] crop2 = { 7, 8, 90, 12}; image.setCrop(crop2); assertArrayEquals(crop2, image.getCrop()); image.setSize(654, 321); int[] crop3 = { 0, 0, 654, 321 }; assertArrayEquals(crop3, image.getCrop()); int[] crop4 = { -10, -10, 700, 400 }; image.setCrop(crop4); assertArrayEquals(crop3, image.getCrop()); } @Test public void format () { assertNull(image.getFormat()); image.setFormat("Y800"); assertEquals("Y800", image.getFormat()); boolean gotException = false; try { image.setFormat("[]"); } catch(IllegalArgumentException e) { // expected gotException = true; } assertTrue("Expected exception", gotException); assertEquals("Y800", image.getFormat()); } @Test(expected=IllegalArgumentException.class) public void setFormatInvalid0 () { image.setFormat(null); } @Test(expected=IllegalArgumentException.class) public void setFormatInvalid1 () { image.setFormat(""); } @Test(expected=IllegalArgumentException.class) public void setFormatInvalid2 () { image.setFormat("YOMAMA"); } @Test(expected=IllegalArgumentException.class) public void setFormatInvalid3 () { image.setFormat("foo"); } @Test public void data () { assertNull(image.getData()); int[] ints = new int[24]; image.setData(ints); assertSame(ints, image.getData()); byte[] bytes = new byte[280]; image.setData(bytes); assertSame(bytes, image.getData()); image.setData((byte[])null); assertNull(image.getData()); } @Test public void convert () { image.setSize(4, 4); image.setFormat("RGB4"); int[] rgb4 = new int[16]; byte[] exp = new byte[16]; for(int i = 0; i < 16; i++) { int c = i * 15; rgb4[i] = c | (c << 8) | (c << 16) | (c << 24); exp[i] = (byte)c; } image.setData(rgb4); Image gray = image.convert("Y800"); assertEquals(4, gray.getWidth()); assertEquals(4, gray.getHeight()); assertEquals("Y800", gray.getFormat()); byte[] y800 = gray.getData(); assertEquals(16, y800.length); assertArrayEquals(exp, y800); } } zbar-0.23/java/test/TestScanImage.java0000664000175000017500000001135313471225700014555 00000000000000 import org.junit.Test; import org.junit.Before; import org.junit.After; import static org.junit.Assert.*; import net.sourceforge.zbar.*; import java.text.CharacterIterator; import java.text.StringCharacterIterator; import java.util.Iterator; public class TestScanImage { protected ImageScanner scanner; protected Image image; @Before public void setUp () { scanner = new ImageScanner(); image = new Image(); } @After public void tearDown () { image = null; scanner = null; System.gc(); } public static final String encoded_widths = "9 111 212241113121211311141132 11111 311213121312121332111132 111 9"; protected void generateY800 () { int width = 114, height = 85; image.setSize(width, height); image.setFormat("Y800"); int datalen = width * height; byte[] data = new byte[datalen]; int y = 0; int p = 0; for(; y < 10 && y < height; y++) for(int x = 0; x < width; x++) data[p++] = -1; for(; y < height - 10; y++) { int x = 0; byte color = -1; CharacterIterator it = new StringCharacterIterator(encoded_widths); for(char c = it.first(); c != CharacterIterator.DONE; c = it.next()) { if(c == ' ') continue; for(int dx = (int)c - 0x30; dx > 0; dx--) { data[p++] = color; x++; } color = (byte)~color; } for(; x < width; x++) data[p++] = (byte)~color; } for(; y < height; y++) for(int x = 0; x < width; x++) data[p++] = -1; assert(p == datalen); image.setData(data); } protected void checkResults (SymbolSet syms) { assertNotNull(syms); assert(syms.size() == 1); Iterator it = syms.iterator(); assertTrue(it.hasNext()); Symbol sym = it.next(); assertNotNull(sym); assertFalse(it.hasNext()); assertEquals(Symbol.EAN13, sym.getType()); assertEquals(sym.EAN13, sym.getType()); // cached assertTrue(sym.getQuality() > 1); assertEquals(0, sym.getCount()); SymbolSet comps = sym.getComponents(); assertNotNull(comps); assertEquals(0, comps.size()); it = comps.iterator(); assertNotNull(it); assertFalse(it.hasNext()); String data = sym.getData(); assertEquals("6268964977804", data); byte[] bytes = sym.getDataBytes(); byte[] exp = { '6','2','6','8','9','6','4','9','7','7','8','0','4' }; assertArrayEquals(exp, bytes); int[] r = sym.getBounds(); assertTrue(r[0] > 6); assertTrue(r[1] > 6); assertTrue(r[2] < 102); assertTrue(r[3] < 73); assertEquals(Orientation.UP, sym.getOrientation()); } @Test public void generated () { generateY800(); int n = scanner.scanImage(image); assertEquals(1, n); checkResults(image.getSymbols()); checkResults(scanner.getResults()); } @Test public void config () { generateY800(); scanner.setConfig(Symbol.EAN13, Config.ENABLE, 0); int n = scanner.scanImage(image); assertEquals(0, n); } @Test public void cache () { generateY800(); scanner.enableCache(true); int n = 0; for(int i = 0; i < 10; i++) { n = scanner.scanImage(image); if(n > 0) { assertTrue(i > 1); break; } } assertEquals(1, n); checkResults(scanner.getResults()); } @Test public void orientation() { generateY800(); // flip the image int width = image.getWidth(); int height = image.getHeight(); byte[] data = image.getData(); int p = 0; for(int y = 0; y < height; y++) { for(int x0 = 0; x0 < width / 2; x0++) { int x1 = width - x0 - 1; assert(x0 < x1); byte b = data[p + x0]; data[p + x0] = data[p + x1]; data[p + x1] = b; } p += width; } image.setData(data); int n = scanner.scanImage(image); assertEquals(1, n); SymbolSet syms = scanner.getResults(); assert(syms.size() == 1); for(Symbol sym : syms) { assertEquals(Symbol.EAN13, sym.getType()); assertEquals("6268964977804", sym.getData()); assertEquals(Orientation.DOWN, sym.getOrientation()); } } } zbar-0.23/pygtk/0000775000175000017500000000000013471606255010546 500000000000000zbar-0.23/pygtk/Makefile.am.inc0000664000175000017500000000203113471225716013265 00000000000000pyexec_LTLIBRARIES += pygtk/zbarpygtk.la pygtk_zbarpygtk_la_CPPFLAGS = \ $(GTK_CFLAGS) $(PYTHON_CFLAGS) $(PYGTK_CFLAGS) $(AM_CPPFLAGS) pygtk_zbarpygtk_la_LDFLAGS = -shared -module -avoid-version -export-dynamic \ -export-symbols-regex initzbarpygtk pygtk_zbarpygtk_la_LIBADD = \ $(PYTHON_LIBS) $(PYGTK_LIBS) gtk/libzbargtk.la $(AM_LIBADD) pygtk_zbarpygtk_la_DEPENDENCIES = gtk/libzbargtk.la dist_pygtk_zbarpygtk_la_SOURCES = pygtk/zbarpygtkmodule.c nodist_pygtk_zbarpygtk_la_SOURCES = pygtk/zbarpygtk.c BUILT_SOURCES += pygtk/zbarpygtk.c pygtk/zbarpygtk.defs CLEANFILES += pygtk/zbarpygtk.c pygtk/zbarpygtk.defs EXTRA_DIST += pygtk/zbarpygtk.override # FIXME ugly hack to fixup new name... now non-standard? pygtk/zbarpygtk.defs: include/zbar/zbargtk.h $(PYTHON) $(PYGTK_H2DEF) $< | \ $(SED) -e 's/Z_TYPE_BAR_/ZBAR_TYPE_/' > $@ pygtk/%.c: pygtk/%.defs $(srcdir)/pygtk/zbarpygtk.override $(PYGTK_CODEGEN) --prefix zbarpygtk \ --register $(PYGTK_DEFS)/gdk-types.defs \ --override $(srcdir)/pygtk/zbarpygtk.override $< > $@ zbar-0.23/pygtk/zbarpygtkmodule.c0000664000175000017500000000315013466560613014055 00000000000000/*------------------------------------------------------------------------ * Copyright 2008-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ /* avoid "multiple definition" darwin link errors * for symbols defined in pygobject.h (bug #2052681) */ #define NO_IMPORT_PYGOBJECT #include void zbarpygtk_register_classes(PyObject*); extern PyMethodDef zbarpygtk_functions[]; DL_EXPORT(void) initzbarpygtk(void) { init_pygobject(); PyObject *mod = Py_InitModule("zbarpygtk", zbarpygtk_functions); PyObject *dict = PyModule_GetDict(mod); zbarpygtk_register_classes(dict); if(PyErr_Occurred()) Py_FatalError("unable to initialise module zbarpygtk"); } zbar-0.23/pygtk/zbarpygtk.override0000664000175000017500000000051313466560613014244 00000000000000%% headers #include #include #include %% modulename zbarpygtk %% import gtk.Widget as PyGtkWidget_Type import gtk.gdk.Pixbuf as PyGdkPixbuf_Type %% ignore-type ZBarGtkError %% ignore-glob *_get_type %% ignore zbar_gtk_image_from_pixbuf # until base library wrappers are in place %% zbar-0.23/zbar.pc.in0000664000175000017500000000035713466560613011225 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: zbar Description: bar code scanning and decoding URL: http://zbar.sourceforge.net Version: @VERSION@ Libs: -L${libdir} -lzbar Cflags: -I${includedir} zbar-0.23/ChangeLog0000664000175000017500000010302113471602111011062 000000000000000.23: * Windows: added support for DirectShow * Text files at main dir converted to Markdown notation * HACKING.md text now reflects the procedures we use since 0.20 * ZBar's URL locations updated on several places * Added support for using Gtk3 with zbarcam-gtk * Added support for using GObject Integration (GIR) with pygobject-3.0 * Added support for Python3 bindings * Python scripts now runs with either python2 or python3 * added Travis checks for Gtk3 with Python3 and GIR * added Travis builds for cross-compilation with winGW * added Travis builds for Windows native build * added a test script for checking python bindings * Added a test script for Python with Gtk support via GIR * Suppressed gcc warnings when building with Gtk3 * Got rid of gdk_threads for good at zbarcam-gtk, using an idle hook to handle async messages * The debian/ and travis/ directories were removed from distribution files * Java sources added to the distribution tarball 0.22.2: * Improve some pkg check logic, in order to solve some ./configure issues * Fix logic that allows disabling Qt support * Add support for Java 11 detection * Fix Java detection logic * Fix Travis CI breakages due to the usage of Java 11 on Debian Sid * Fix some issues with MinGW Windows build * Search for new ImageMagick 7 header location 0.22.1: * Ensure that version.xml and reldate.xml will be placed at the source dir * Make use of glib thread names * Windows: Make zbargtk build * Windows: Use -no-undefined for libzbargtk * Windows: Disable zbarcam-gtk * Windows: Check for clock_gettime on pthread library as well * Windows: Specify correct path to barcode.png * Windows: Include windows.h for vfw * Makefile.am: Add missing extra-dist-file * configure.ac: allow building libzbar-qt as a static library 0.22: * zbarcam-qt: allow changing resolutions in real time * zbarcam-qt: better support ZBar options * zbarcam-qt: do several visual improvements * zbarcam-qt: make it remember the geometry * zbarcam-qt: allow show/hide control and options bars * zbarcam-qt: remember lastly used settings and camera controls * zbarcam-qt: allow changing ZBar decode options via GUI * Add API to allow get/set resolutions * img_scanner: add handler for color-inverted codes * img_scanner: fix get_config parameter validation * scan_video: improve logic to remove duplicated/invalid devnodes * symbol.c: fix symbol hash logic (prevents crash with QR options) * configure.ac: fix an error at libv4l2 package check * fix some typos * exit gracefully when decoding split QR codes 0.21: * zbarcam-qt: allow selecting codes via GUI interface * When both enabled, ISBN-13 has precedence over ISBN-10 * ZBar is now using Travis CI for continuous integration tests * Convert INSTALL and README to markdown and update them * Improve ZBar testing code and make easier to run the tests * Fix build with Clang * Add simple dbus IPC API to zbarcam. * zbarimg: display only the compiled symbologies * v4l2: make ZBar build and run on Kernels < 3.16 * configure.ac: The pdf417 code is incomplete. Warn about that * Add Debian packaging and Travis CI configuration * Add barcode examples for different supported symbologies * Several improvements at the building system * Add support for SQ code symbology * v4l2: add fallback for systems without v4l2_ext_controls which field * v4l2: use device_caps instead of capabilities * v4l2: make v4l2_request_buffers() more generic * release video buffers after probing and request them again when needed * Ignore ENOTTY errors when calling VIDIOC_S_CROP * doc/Makefile.am.inc: clean html generated files * Add --disable-doc configure option to disable building docs * Fix function prototype to be compatible with recent libjpeg * Wrap logical not operations into parentheses * INSTALL: warn that autoconf should be called before configure * code128: fix error logic * convert: ensure that it will not use a freed value * zbar: use g_thread_new() instead of g_tread_create() * zbargtk: add a missing break * gtk/zbargtk: add a missing check if zbar->window is not null 0.20.1: * Be sure to use python2, as /usr/bin/python is being removed (or made non-functional) on some distributions * Prefer using pygobject-codegen-2.0 instead of pygtk-codegen-2.0 * Make it work with modern versions of python 2 0.20: * As upstream became abandoned, created a ZBar fork at linuxtv.org * Use libv4l2 for V4L2 support, using emulated formats as last resort * Add support for Qt5 * Add zbarcam-qt and zbarcam-gtk (from the example codes) * Add support for v4l2 controls * Add the needed GUI bits for zbarcam-qt to work with controls * Fix compilation issues with newer automake versions 0.11: * Codabar reliability enhancements - fix missing check - require minimum quality - bump default uncertainty * tweak Codabar bar/space ratio validation * finish Codabar support for python, perl, java and iPhone interfaces - reduce Codabar uncertainty to minimum * add core support for Codabar symbology - TBD: python, perl, java and iPhone interfaces * fix v4l config and build variations (bug #3348888) - thanks to jarekczek for reporting this! - NB v4l1 removed from kernel as of 2.6.38 * fix missing python thread initialization (bug #3349199) - thanks to jarekczek for reporting this problem! * fix missing configure check for Python.h (bug #3092663) - thanks to Zoltan Kovacs for reporting this problem! * fix C++ wrapper missing Symbol.quality (bug #3076524) - thanks to Rudy Melli for pointing this out! * fix C++ wrapper bugs (bug #3396068) - thanks to anotheruser1 for reporting this! - add new C++ wrapper test * fix avoid compositing ISBN10 data * add support for GraphicsMagick as ImageMagick alternative * mention xmlto in HACKING (patch #3297039) - thanks to jarekczek for the patch! * disable addons by default until synchronization with main symbol is working * fix image scanner min quality filtering * fix i25 buffer overrun corner case * fix EAN addon enables * fix zbarimg to accept autodetected stdin (lone dash) * fix Qt 4.6.3 compilation error (patch #3178244) - thanks to hrhristov for the patch! * add Python Processor support for request_size interface * fix Python Processor support for GIL, allowing asynchronous scanning * fix jpeg decoder skip handling - thanks to jarekczek for the patch! * rename dprintf macro to avoid conflicts (patch #3128538) - thanks to maurochehab for the patch! * add support for EAN/UPC 2 and 5 digit add-on symbols - deprecate original, unfinished add-on APIs - add self-checking to test_decode * fix support for GS1 AIs - thanks to jockusch for a patch! - add decoder/symbol "modifier" flags and config read access - set flags or emit GS appropriately for Code 128 FNC1 - add iphone, java, perl, python bindings for modifiers and configs * add support for Code 93 symbology * add video size request to (Py)GTK widget (req #3034522) - thanks to Jerome Charaoui for the patch! * add support for GS1 DataBar Expanded (RSS Expanded) symbology * add language bindings for DataBar * add preliminary support for GS1 DataBar (RSS-14) symbology * enhance decoder reliability (EAN, Code 39, Code 128) - enhance decoder test * fix documentation of command exit codes (bug #3017322) * fix C++ video callback bug - add C and C++ processor examples * add per-symbology cache consistency - reliable symbologies decode immediately by default - no more need to disable cache with video - also fix crop bugs w/video scanning * add support for scanning partial images (cropping) - update c++, python, perl, java bindings and tests * fix couple of leaks * remove doc hints about GFDL (bug #3004411) - apply LGPL to API docs * relax Code 39 width ratio checks * core library portability improvements - remove some unnecessary C99 syntax - add configure checks for errno - enhance C++ Symbol interface * adjust Python module README (add examples and note DLL in path) * fix QR Code missing from man pages (bug #2969857) * cleanup decoder assertions and locking (bug #2966916) * add Java interface to library via JNI - add Java tools and JNI build tests to configure - fix compiler warnings from binary output changes * fix output of binary data in zbarimg and zbarcam - thanks to fukuchi for a patch! - add base64 format for binary xml output * add coarse symbol orientation information (patch #2913094) - thanks to Anssi for a patch! - add decode direction feedback to decoder - update C++, Python, Perl and ObjC wrappers - add orientation to test suites * fix inconsistent fourcc endian handling bugs (bug #2918994) - thanks to jdccdevel for a patch! - add fourcc conversion and parse interfaces to zbar.h * report QR immediately for video (no inter-frame consistency check) * add python distutils build infrastructure version 0.10: * hotfix add MinGW import lib to Windows installer * attempt fix for Qt4 < 4.4 * release updates - fix perl Processor init without video * fix window closed notification during events - add read_one example, fix xs compiler warnings, update perl docs * add result query interfaces to image scanner and processor - move result filtering into image scanner (from user) - abort output blockers when window closed * Windows updates - update installer and README for distribution of dependency libraries - fix applications to use binary output for xml and raw modes * add regression tests to makefile * cleanup warnings from newer gcc versions * fix excessive i25 QZ checks * add regression script - add zbarimg xml output for every source (even empty) - add edge detection to svg debug overlay * image scanner cleanup and minor performance enhancements * bug hunt and stability improvements - fix broken processor locks - fix X connection polling, revert previous separate thread workaround - refuse to resize windows larger than screen size - fix window output scaling - preserve image aspect ratio, adjust overlay - fix window redraw - fix crash on Xv image creation failure (still need XImage fallback) - clean up zbarimg exit cases (last image window close, missing decodes) * always use separate video thread when threads enabled (even v4l2) * add configure check for features.h * overlay enhancements - add fps to overlay - add overlay control to processor - add windows overlay drawing * tweak linear code position info * trim deep qrcode hierarchy * fix zero length symbol data * fix QR structured append result handling * cleanup SVG debug dump (partial) - some QR integration API cleanup * extract explicit result container, separate from image - remove (broken/tmp) converted image result sharing - add explicit symbol recycle API, update processor/widgets to use - cleanup and update C++ API - update Python/Perl APIs - fix broken and add new Python/Perl tests * cleanup QR result integration - add hierarchy to symbol results - extract symbols during text decode, preserving position and structure - outline QR symbols in window overlay - tmp fix converted image result propagation * factor image scanner cache and apply to QR - fix image scanner handler called once per-image (vs every decode) * QZ and clustering fixes to QR integration - remove qr_finder QZ checks - decrease center clustering threshold from 1/3 to 1/5 of length - add img_scanner svg debug output - manually add config.rpath to workaround broken autofoo * finish initial integration of QR Code reader from maemo-barcode project * zbar-side updates for QR Code integration - add linear scanner position interface - add QR finder position feedback - integrate QR Code reader with img_scanner - refactor some symbol/image interaction - change default scanner density to 1 - add iconv to build infrastructure * initial hooks for QR Code, first pass at finder * fix broken builds with --disable-pthread version 0.9: * hotfix configure check for Wand as well as MagickWand (bug #2848437) * hotfix trim extraneous MagickWand calls (bug #2848445) * release updates * fix uninitialized member in Qt widget (bug #2844846) * move image conversion out of image scanner up to higher levels (preparation for library split) * add symbol quality metric and image scanner position config - update python, perl and docs * compatibility fixes - work around ImageMagick API breakages - fix some OS X compile issues * Qt widget cleanup - handle video device set before window attached - prevent exceptions from escaping event handlers * more Qt window creation hook fixes - NB may still cause problems if video is opened before window is visible * finish fix for Qt init ordering (bug #2844846) * potential fix for display init ordering (bug #2844846) - new workaround for filtering bad EAN results in the image scanner * more testing, fixes and cleanup - fix v4l1 - fix/add null processor interface * change default image scanner density to 1x1 - random cleanup, vfw hang, quit key - fix scan_image example MSVC project - windows installer tweaks * add zbarcam to windows installer * major restructuring to improve platform abstraction - add lock, thread and timer abstractions - migrate specific notification locks to platform independent layer - fixes to vfw capture interface - fix window format conversion issues - fix some broken configure checks - zbarcam working in windows! * fix symbol leaks (bug #2820658) - add symbol reference counting * add support for binary symbol data * initial VFW video support - mostly working with uvc driver, broken for others - factor out common video buffer handling - fix processor to destroy window *before* video (ref TODO) - use /dev/video* VFW pseudo-devices - windows configure skip non-windows checks - prep for platform refactoring * fix zbarimg b&w format handling * fix scan (image) boundary QZ handling (bug #2807538) - add linear scanner manual flush API - linear scanner always starts/ends w/a space of width 0 - remove artificial image scanner border - decoders special case 0 width space for QZ checks - add missing Code 128 leading QZ check * fix Code39 max ICS checks (bug #2807447) - add decoder lock owner tracking (debug) - update dbg_scan to match img_scanner * first pass installer - add version and icon resources for libzbar, zbarimg * zbarimg working in windows - switch to StretchDIBits over DrawDib - refactor some window drawing code to remove redundancies - make refcounts thread safe - clean up alloc/free bugs * convert zbarimg to C (cross compiled C++ cannot run w/native libraries) - fix DrawDib image width granularity - fix window resize dimensions to include decorations - images still inverted, otherwise zbarimg now "working" in windows * refactor processor implementation to support cross-platform - first pass windows processor (before debugging) - make processor locks reentrant (call APIs from callback) * initial Windows support for window interface - currently supports VFW DrawDib interface for image display (DirectDraw and others TBD) - also basic processor window creation/manipulation - Windows configure tests version 0.8: * release updates * add "raw" output option (without symbology prefix) to apps (req #2671863) * fix Code 39 min length and document min/max configs (bug #2787925) * fix zbar_image_free_data windows recursion loop (bug #2796277) * fix uninitialized decoder configs (bug #2800163) * switchover from subversion to mercurial version 0.7: * fix perl MANIFEST * release updates (version, NEWS, packaging) * adjust [py]gtk distributed files * draw new logo (rough, no Xrender yet) * fix Makefile.am syntax error * fixup some perl distribution details * project name change: everything "zebra" becomes "zbar" * remove old logo * add first pass python bindings! * fix perl mortality bug * add new cfg constants to perl * fix perl doc handler ref * fix processor set_active error propagation * add wiki examples (scan_image.*, processor.*) * add missing trailing quiet zone checks for ean and code39 * add min/max code length cfg/check for i25,code128,code39,pdf417 * add image scan density API/option * tweak option parser to be more strict/correct about abbreviations * add API to force specific video io modes (req #2293955) * apply patches for more broken driver workarounds (req #2293955) * fix(?) C++ string to fourcc conversion * add missing C++ wrappers * add additional examples to man pages (symbology enable/disable) * add missing options to man page synopsis * add missing --xml option to man pages version 0.6: * hotfix broken perl install (name change) * add missing files to distribution * release updates (version, NEWS, pacakging) * rename perl module to Barcode::Zebra (fit with existing cpan namespace) * add perl documentation and example * add v4l version debug/test override * add docs for new zebracam prescale option * add video pre-scaling API/option to video/processor/zebracam (req #2277340) * add few missing APIs to perl xs wrapper * fix missing libjpeg #ifdef in convert * initial support for decoding jpeg images using libjpeg! * workaround broken v4l2 drivers in USERPTR mode * have configure double check Magick++ install (bug #2582232) * update README dependency list * fix C++ warnings in Processor * fixes for building DLLs with libtool under MinGW * automatically remove "processor" layer if poll.h is unavailable * test_decode portability workarounds * add config/compile time symbology enables * add low-level PDF417 decode stage - converts widths to codewords * add XML output option to zebracam and zebraimg * add sequence number image attribute, set to frame number by video * change v4l2 interlaced only drivers to warning instead of hard fail * workaround broken drivers that return error for V4L2_FIELD_NONE request * add some initial PDF417 hooks * first pass perl bindings for Processor, Scanner and Decoder * fix error propagation double free bug * add missing APIs: processor userdata and image data length * fix configure check for v4l2 - thanks to Simon Matter for the patch! * finish support for UPC-E * fix zebraimg to scan all pages/frames of a multi-frame input * fix debian packaging dependencies (bug #2070164) * *remove* debian directory from distribution (bug #2070164) * fix inappropriately installed headers and man pages (bug #2055133) * fix pygtk multiple definition link errors on darwin (bug #2052681) * fixes to configure for detecting python settings (bug #2052663) * remove zebrapygtk module link against libpython (bug #2052663) * add drag and drop support for *images* to Qt widget...unfortunately not very useful; every application i tried drops uri-refs rather than images * minor reference documentation updates version 0.5: * release updates (version, NEWS, packaging) * add pkg-config files * update to latest libtool and new autoconf macros * cleanup library symbol exports * remove test programs using internal hooks * improve portability of some format specifiers * fix missing stub for --without-x - thanks to Simon Schmeisser for a patch! * fix --disable-pthread compile errors and warnings * fix XImage size mismatch background artifacts * fix new generated file distribution errors * switch Qt headers to old-style names (investigate possible Qt3 support?) * add independent ABI versioning for GTK and Qt widget libraries * reimplement widget internals to support image scanning and improve locking efficiency * add image scanning to widgets. including builtin conversions from toolkit image types: GtkPixbuf and QImage * add video opened hooks to widgets (improved use model) * add logo, used when there is nothing better to draw * add userdata to image object * fix image reuse cleanup bug * fix format specifiers in some error messages * enhance widget tests to support enable/disable and scan from image * fix broken deallocation assumptions in test_qt * widget API documentation (still need to hookup gtkdoc, and PyGtk docs) * API documentation toplevel overview * update configure summary for new features * replace all decoder assertions w/non-fatal debug spew (bug #1986478) * fix glib-genmarshal check * add first pass of Qt widget! - test/example in test/test_qt.cpp - factor video device scan to share among tests * more C++ integration fixes - additional Image ref tweaks - add Video.close() and Window.clear() APIs * fix missing image scanner handler call * add dereference operator to C++ Symbol * add count attribute to C++ Symbol * fix broken C++ header definitions * fix broken C++ Image references * expose internal reference counting interface * fix window locking bug * cleanup some minor memory leaks * convert Code 128 assertions to non-fatal warning spew * fix single buffer video hang (bug #1984543) * replace inferred video size assertion with warning message (bug #1984543) * add first pass of GTK widget! * add PyGTK widget wrapper * API change: modify window draw/redraw interface to improve interoperability with toolkits - add window locking for thread safety - zebra_window_draw() no longer actually "draws" anything => use window.draw to update the image from video thread then schedule window.redraw from toolkit GUI thread * fix missing C++ std lib dependencies * fix uninitialized handler/userdata bug in decoder * fix broken Code 128 checksum assertion * fix video destructor segfault * fix window destructor Xvideo errors (XID is unsigned...) * switch configure to use pkg-config to find most dependencies * API documentation updates version 0.4: * release updates (version, NEWS, packaging, examples) * couple of portability tweaks * finish format conversion resize cases * add missing conversions * fix some broken conversions * fix some broken redraw and Xv checks * add decoder configuration API - only boolean configs currently implemented - integrate config option parsing w/zebracam and zebraimg - add config to enable/disable each symbology type - add optional conversions from EAN-13 to UPC-A, ISBN-10 and ISBN-13 (disabled by default) - add config to emit/suppress check digit NB behavior change! check digit is now emitted by default * related documentation updates - split common options to a separate entity * fallback to gettimeofday when POSIX timers are not available * image format conversion fixes - fix format size roundoff (NB now rounds *down*) - add convert and resize API to pad/crop image to specific size (eg, to handle Xv min/max image size) NB this is still not implemented for many conversions * fix window deletion visibility inconsistency * add couple processor commands - 'q' to delete window - 'd' to dump displayed image for debug * remove problematic includes used for v4l2 configure test * address compiler portability concerns w/debug print vararg macro * workaround v4l1_set_format() failed consistency check for broken drivers - change from error to warning w/more useful message - calc expected image size using expected value instead of driver value * add missing example scripts to distribution * add missing files for Interleaved 2 of 5 * add support for Interleaved 2 of 5 symbology! - again no check digit option yet * increase decode window from 8 to 16 bars - remove Code 39 "extra bar" hack - add Code 39 quiet zone check - facilitate Interleaved 2 of 5 * optimize character width calculations for all symbologies * fix image scanner bug w/lost symbols at end of scan passes * fix EAN-8 buffer overrun case * add API doc footer * add API documentation generated by Doxygen - markup, cleanup and finish writing header comments - setup Doxygen config file * add/fix window GC * add base support for Code 39 (no check digit or full ASCII options yet) * cleanup decoder locking * add support for EAN-8! version 0.3: * add interface stub files * fix wait timeouts * fix XImage format filtering * fix several error handling corner cases * fix c++ error handling * add missing Window.h * add better hierarchy to library sources * build configuration fixes * portability fixes * packaging updates * fix zebracam beeps * fix some RGB component ordering and XImage format problems * fix window resize and redraw state problems * fix EAN testcase in test_decode - thanks to Steffen Kube for the patch! * add APIs and (hidden) zebracam options to force specific formats for debug * add example scripts * documentation updates * remove implementation of deprecated img_walker * add XImage formats - basic support for 16-bit depths * add some missing rgb format conversions * add basic overlay - currently only markers at detected scan locations (needs improved) * fix memory leak for converted images w/new cleanup semantics * migrate inter-frame consistency check from old zebracam into image_scanner - add API to enable/disable/flush result cache - add API to retrieve cache status from returned symbol * cleanup user_wait blocking semantics for various state combinations * fix bug w/v4l1 not unlinking dequeued image * major restructuring for improved modularity NB not all changes are are backward compatible! - modular support for v4l2 falling back to v4l1 - flexible support for more varied image formats (incomplete) - added reusable abstractions for: an "image" object and associated metadata, a "video" input object and a "window" output object - added new "processor" API to wrap everything together, simplifying trivial application usage (including zebracam and zebraimg) - removed deprecated "img_walker" interface, completely replaced by more integrated "image_scanner" (moving toward more image processing) - updated/added c++ APIs, including improved iterator interfaces * removed SDL dependency due to various usage incompatibilities (most notably the inability to embed video window into a widget) * cleaned up zebracam and zebraimg command line processing (bug #1838535) * many useful enhancements thanks to proposal by mhirsch45 (req #1759923) including: - v4l2 support - support for UYVY image format - zebracam cursor hiding - zebracam audio mute - command line video device specification, * significant error handling and debug improvements * some associated documentation updates * various new test programs (slowly working toward more formal test suite) * add missing xlink namespace to dbg_scan generated output (bug #1764188) * qualify char types as [un]signed to avoid non-portable C ambiguity - thanks to mhirsch45@users.sf.net and Colin Leroy for the patches! (bug #1759914) * add integrated 2D image scanning API - automatically ties to internal scanner and decoder - results reported via new symbol API - deprecated previous, cumbersome img_walker interface - uses new simpler/faster and denser grid pattern (FIXME add 45 and 135) - first step toward more sophisticated image processing * updated zebraimg to use new ImageScanner API - add initial decode location tracking * updated zebracam to use new img_scanner API - extended cache to track multiple symbols per-image - add initial decode location tracking - removed scan grid overlay * add configure check for ImageMagick version >= 6.3.0 * configure dumps ImageMagick, SDL and firefox versions for debug * add NPAPI plugin stub and build infrastructure * flush zebracam output after each scanned symbol * integrate RPM packaging spec file - thanks to V�t Hrachov� for the draft! (patch #1723536) * finally add HACKING to distribution/install (bug #1698202) * add extra documentation files to install (README NEWS INSTALL, etc) * Debian package patch for 0.2 - thanks to V�t Hrachov�: - add libsdl1.2-dev as a build dependency - update automake (>= 1:1.10) as a build dependency - new package version 0.2: * update distribution to include debian packaging * add consistency checking to zebracam * add redundant output suppression to zebraimg * fix couple of Code 128 decode table bugs * fix reversed Code 128 decode * add outstanding scanner edge flush to new_scan() - API change: scanner reset/new_scan() now return scan/decode status - update zebracam and zebraimg to call this between each walker pass (interface still needs improvement...) => improves in scan results for many cases * fix dbg_scan filename generation so results go in local directory * continue Code 128 refinement - finish character set C decode/expansion - add per-character validation - resolve scan direction in separate postprocessing pass before handling ASCII conversion - add several img_walker passes parallel to major axis (for long symbols) - add simple character set C example to test_decode * promote zebraimg images to TrueColor so colored scan pattern always shows * more dbg_scan tweaks * significant scanner improvements - changed "classic" [-1 0 1] first differential kernel to [-1 1] to improve minimum edge resolution to single pixel elements => still need to do some more research and validate assumptions - adaptive thresholding fixes - adjusted filtering for better edge detection - separate constants out to defines (FIXME add config API?) * fix EAN-13 secondary determinant decoding * dbg_scan tweaks to make annotations smaller/more usable * add get_color() interface to decoder * annotated zebraimg scan pattern for marginally useful high-level debug * random include cleanup * cleanup 64-bit compile warnings in zebraimg (bug #1712504) * add first-pass partial support for Code 128 - separate out more EAN state from shared state - internal interface changes - finish dynamic buffer management - add shared resource locking - add Code 128 to test_decode program => still needs additional functionality and plenty of debug => reading both Code 128 *and* EAN still destabilized * add diagnostic program test_video to dump more verbose video debug * incorporate documentation into Debian package - thanks to V�t Hrachov� for the patch! * fix VPATH doc builds (requires automake-1.10 and autoconf-2.61) * build and dist fixes - suppress documentation rebuilds in distributed sources * add Debian packaging sources - thanks to V�t Hrachov� for the patch! * add DocBook template and build infrastructure * add manpages for zebracam and zebraimg * add GNU standard options to zebracam and zebraimg * internal decoder restructuring to support additional symbologies - separated out 1-D decoder infrastructure into generic internal API - moved EAN/UPC specific decoding into it's own module * fix confusing configure behavior which quietly avoided building targets with missing dependencies(?!) configure will now fail with a descriptive error message if you do not have Magick++ and fail to specify --without-imagemagick or do not have SDL and fail to specify --without-sdl * add configure summary describing what will be built (req #1698196) * fix parity encoding in test_decode and add decoded symbol output * introduce Code 128 symbol type * increase width of zebra_symbol_type_t to 16 bits * add HACKING (bug #1698202) version 0.1: * add NEWS and ChangeLog * fix some config/build issues found on other boxes * add missing ImageWalker install * fix scanner runaway threshold calculation bug * fix zebracam/zebraimg bugs overwriting currently scanning image w/scan pattern * add c++ interface to img_walker * apply ImageWalker to zebraimg * add decoder soft reset on partial mismatch * finish basic decoder symbol assembly/reporting * add decoder symbol checksum verification * add callback API option to decoder for "async" symbol processing * add "image walker" library API to trace scan pattern over 2D images * apply image walker to zebracam (C++/zebraimg scan pattern still TBD) * add audio feedback to zebracam (still has long latency) * add zebracam key cmd to dump frame to file (for debugging) * fixes for decoder/scanner reset/new_scan * fixes to scanner initialization and algorithm tweaks * made decoder less sensitive to violated quiet-zone * apply zebraimg workaround for imagemagick image display bug * add string names for symbol types to library and API to access them * add dbg_scan test program for visually debugging image scanner (and decoder) * add test_walk for basic image walker sanity/debug * removed recursive makes in favor of monolithic build * renamed some makefiles accordingly * finished some final symbol data construction * added result callbacks to decoder APIs for data reporting * zebraimg hooks into callback * zebracam still seems to "hang" in undecodeable state? * populate svn with current sources. * most of the basic functionality is included and working. * still need to combine final decode data, finish addons, etc (see TODO). * c++ wrappers are included and tested, but API may need tweaked. * zebraimg and zebracam basically working but need cleanup/polish. * need to create some basic documentation... * initial repository layout zbar-0.23/python/0000775000175000017500000000000013471606255010731 500000000000000zbar-0.23/python/exception.c0000664000175000017500000000742513471225716013022 00000000000000/*------------------------------------------------------------------------ * Copyright 2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "zbarmodule.h" #if PY_MAJOR_VERSION < 3 static inline PyObject* exc_get_message (zbarException *self, void *closure) { PyBaseExceptionObject *super = (PyBaseExceptionObject*)self; if(!PyString_Size(super->message)) { Py_CLEAR(super->message); if(!self->obj || !zbarProcessor_Check(self->obj)) super->message = PyString_FromString("unknown zbar error"); else { const void *zobj = ((zbarProcessor*)self->obj)->zproc; super->message = PyString_FromString(_zbar_error_string(zobj, 1)); } } Py_INCREF(super->message); return(super->message); } static int exc_init (zbarException *self, PyObject *args, PyObject *kwds) { if(!_PyArg_NoKeywords(self->base.ob_type->tp_name, kwds)) return(-1); PyBaseExceptionObject *super = (PyBaseExceptionObject*)self; Py_CLEAR(super->args); Py_INCREF(args); super->args = args; if(PyTuple_GET_SIZE(args) == 1) { Py_CLEAR(self->obj); self->obj = PyTuple_GET_ITEM(args, 0); Py_INCREF(self->obj); } return(0); } static int exc_traverse (zbarException *self, visitproc visit, void *arg) { Py_VISIT(self->obj); PyTypeObject *base = (PyTypeObject*)PyExc_Exception; return(base->tp_traverse((PyObject*)self, visit, arg)); } static int exc_clear (zbarException *self) { Py_CLEAR(self->obj); ((PyTypeObject*)PyExc_Exception)->tp_clear((PyObject*)self); return(0); } static void exc_dealloc (zbarException *self) { exc_clear(self); ((PyTypeObject*)PyExc_Exception)->tp_dealloc((PyObject*)self); } static PyObject* exc_str (zbarException *self) { return(exc_get_message(self, NULL)); } static int exc_set_message (zbarException *self, PyObject *value, void *closure) { PyBaseExceptionObject *super = (PyBaseExceptionObject*)self; Py_CLEAR(super->message); if(!value) value = PyString_FromString(""); else Py_INCREF(value); super->message = value; return(0); } static PyGetSetDef exc_getset[] = { { "message", (getter)exc_get_message, (setter)exc_set_message, }, { NULL, }, }; PyTypeObject zbarException_Type = { PyVarObject_HEAD_INIT(NULL, 0) .tp_name = "zbar.Exception", .tp_basicsize = sizeof(zbarException), .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, .tp_init = (initproc)exc_init, .tp_traverse = (traverseproc)exc_traverse, .tp_clear = (inquiry)exc_clear, .tp_dealloc = (destructor)exc_dealloc, .tp_str = (reprfunc)exc_str, .tp_getset = exc_getset, }; #endif zbar-0.23/python/decoder.c0000664000175000017500000002466113471225716012432 00000000000000/*------------------------------------------------------------------------ * Copyright 2009-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "zbarmodule.h" static char decoder_doc[] = PyDoc_STR( "low level decode of measured bar/space widths.\n" "\n" "FIXME."); static zbarDecoder* decoder_new (PyTypeObject *type, PyObject *args, PyObject *kwds) { static char *kwlist[] = { NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "", kwlist)) return(NULL); zbarDecoder *self = (zbarDecoder*)type->tp_alloc(type, 0); if(!self) return(NULL); self->zdcode = zbar_decoder_create(); zbar_decoder_set_userdata(self->zdcode, self); if(!self->zdcode) { Py_DECREF(self); return(NULL); } return(self); } static int decoder_traverse (zbarDecoder *self, visitproc visit, void *arg) { Py_VISIT(self->handler); Py_VISIT(self->args); return(0); } static int decoder_clear (zbarDecoder *self) { zbar_decoder_set_handler(self->zdcode, NULL); zbar_decoder_set_userdata(self->zdcode, NULL); Py_CLEAR(self->handler); Py_CLEAR(self->args); return(0); } static void decoder_dealloc (zbarDecoder *self) { decoder_clear(self); zbar_decoder_destroy(self->zdcode); ((PyObject*)self)->ob_type->tp_free((PyObject*)self); } static zbarEnumItem* decoder_get_color (zbarDecoder *self, void *closure) { zbar_color_t zcol = zbar_decoder_get_color(self->zdcode); assert(zcol == ZBAR_BAR || zcol == ZBAR_SPACE); struct module_state *st = GETMODSTATE(); zbarEnumItem *color = st->color_enum[zcol]; Py_INCREF((PyObject*)color); return(color); } static zbarEnumItem* decoder_get_type (zbarDecoder *self, void *closure) { zbar_symbol_type_t sym = zbar_decoder_get_type(self->zdcode); if(sym == ZBAR_NONE) { /* hardcode most common case */ struct module_state *st = GETMODSTATE(); Py_INCREF((PyObject*)st->symbol_NONE); return(st->symbol_NONE); } return(zbarSymbol_LookupEnum(sym)); } static PyObject* decoder_get_configs (zbarDecoder *self, void *closure) { struct module_state *st = GETMODSTATE(); unsigned int sym = zbar_decoder_get_type(self->zdcode); unsigned int mask = zbar_decoder_get_configs(self->zdcode, sym); return(zbarEnum_SetFromMask(st->config_enum, mask)); } static PyObject* decoder_get_modifiers (zbarDecoder *self, void *closure) { unsigned int mask = zbar_decoder_get_modifiers(self->zdcode); struct module_state *st = GETMODSTATE(); return(zbarEnum_SetFromMask(st->modifier_enum, mask)); } static PyObject* decoder_get_data (zbarDecoder *self, void *closure) { #if PY_MAJOR_VERSION >= 3 return(PyUnicode_FromStringAndSize(zbar_decoder_get_data(self->zdcode), zbar_decoder_get_data_length(self->zdcode))); #else return(PyString_FromStringAndSize(zbar_decoder_get_data(self->zdcode), zbar_decoder_get_data_length(self->zdcode))); #endif } static PyObject* decoder_get_direction (zbarDecoder *self, void *closure) { #if PY_MAJOR_VERSION >= 3 return(PyLong_FromLong(zbar_decoder_get_direction(self->zdcode))); #else return(PyInt_FromLong(zbar_decoder_get_direction(self->zdcode))); #endif } static PyGetSetDef decoder_getset[] = { { "color", (getter)decoder_get_color, }, { "type", (getter)decoder_get_type, }, { "configs", (getter)decoder_get_configs, }, { "modifiers", (getter)decoder_get_modifiers, }, { "data", (getter)decoder_get_data, }, { "direction", (getter)decoder_get_direction }, { NULL, }, }; static PyObject* decoder_set_config (zbarDecoder *self, PyObject *args, PyObject *kwds) { zbar_symbol_type_t sym = ZBAR_NONE; zbar_config_t cfg = ZBAR_CFG_ENABLE; int val = 1; static char *kwlist[] = { "symbology", "config", "value", NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "|iii", kwlist, &sym, &cfg, &val)) return(NULL); if(zbar_decoder_set_config(self->zdcode, sym, cfg, val)) { PyErr_SetString(PyExc_ValueError, "invalid configuration setting"); return(NULL); } Py_RETURN_NONE; } static PyObject* decoder_get_configs_meth (zbarDecoder *self, PyObject *args, PyObject *kwds) { zbar_symbol_type_t sym = ZBAR_NONE; static char *kwlist[] = { "symbology", NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "|i", kwlist, &sym)) return(NULL); if(sym == ZBAR_NONE) sym = zbar_decoder_get_type(self->zdcode); struct module_state *st = GETMODSTATE(); unsigned int mask = zbar_decoder_get_configs(self->zdcode, sym); return(zbarEnum_SetFromMask(st->config_enum, mask)); } static PyObject* decoder_parse_config (zbarDecoder *self, PyObject *args, PyObject *kwds) { const char *cfg = NULL; static char *kwlist[] = { "config", NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "s", kwlist, &cfg)) return(NULL); if(zbar_decoder_parse_config(self->zdcode, cfg)) { PyErr_Format(PyExc_ValueError, "invalid configuration setting: %s", cfg); return(NULL); } Py_RETURN_NONE; } static PyObject* decoder_reset (zbarDecoder *self, PyObject *args, PyObject *kwds) { static char *kwlist[] = { NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "", kwlist)) return(NULL); zbar_decoder_reset(self->zdcode); Py_RETURN_NONE; } static PyObject* decoder_new_scan (zbarDecoder *self, PyObject *args, PyObject *kwds) { static char *kwlist[] = { NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "", kwlist)) return(NULL); zbar_decoder_new_scan(self->zdcode); Py_RETURN_NONE; } void decode_handler (zbar_decoder_t *zdcode) { assert(zdcode); zbarDecoder *self = zbar_decoder_get_userdata(zdcode); assert(self); assert(self->zdcode == zdcode); assert(self->handler); assert(self->args); PyObject *junk = PyObject_Call(self->handler, self->args, NULL); Py_XDECREF(junk); } static PyObject* decoder_set_handler (zbarDecoder *self, PyObject *args, PyObject *kwds) { PyObject *handler = Py_None; PyObject *closure = Py_None; static char *kwlist[] = { "handler", "closure", NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "|OO", kwlist, &handler, &closure)) return(NULL); if(handler != Py_None && !PyCallable_Check(handler)) { PyErr_Format(PyExc_ValueError, "handler %.50s is not callable", handler->ob_type->tp_name); return(NULL); } Py_CLEAR(self->handler); Py_CLEAR(self->args); if(handler != Py_None) { self->args = PyTuple_New(2); if(!self->args) return(NULL); Py_INCREF(self); Py_INCREF(closure); PyTuple_SET_ITEM(self->args, 0, (PyObject*)self); PyTuple_SET_ITEM(self->args, 1, closure); Py_INCREF(handler); self->handler = handler; zbar_decoder_set_handler(self->zdcode, decode_handler); } else { self->handler = self->args = NULL; zbar_decoder_set_handler(self->zdcode, NULL); } Py_RETURN_NONE; } static zbarEnumItem* decoder_decode_width (zbarDecoder *self, PyObject *args, PyObject *kwds) { unsigned int width = 0; static char *kwlist[] = { "width", NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "I", kwlist, &width)) return(NULL); zbar_symbol_type_t sym = zbar_decode_width(self->zdcode, width); if(PyErr_Occurred()) /* propagate errors during callback */ return(NULL); if(sym == ZBAR_NONE) { /* hardcode most common case */ struct module_state *st = GETMODSTATE(); Py_INCREF((PyObject*)st->symbol_NONE); return(st->symbol_NONE); } return(zbarSymbol_LookupEnum(sym)); } static PyMethodDef decoder_methods[] = { { "set_config", (PyCFunction)decoder_set_config, METH_VARARGS | METH_KEYWORDS, }, { "get_configs", (PyCFunction)decoder_get_configs_meth, METH_VARARGS | METH_KEYWORDS, }, { "parse_config", (PyCFunction)decoder_parse_config, METH_VARARGS | METH_KEYWORDS, }, { "reset", (PyCFunction)decoder_reset, METH_VARARGS | METH_KEYWORDS, }, { "new_scan", (PyCFunction)decoder_new_scan, METH_VARARGS | METH_KEYWORDS, }, { "set_handler", (PyCFunction)decoder_set_handler, METH_VARARGS | METH_KEYWORDS, }, { "decode_width", (PyCFunction)decoder_decode_width, METH_VARARGS | METH_KEYWORDS, }, { NULL, }, }; PyTypeObject zbarDecoder_Type = { PyVarObject_HEAD_INIT(NULL, 0) .tp_name = "zbar.Decoder", .tp_doc = decoder_doc, .tp_basicsize = sizeof(zbarDecoder), .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, .tp_new = (newfunc)decoder_new, .tp_traverse = (traverseproc)decoder_traverse, .tp_clear = (inquiry)decoder_clear, .tp_dealloc = (destructor)decoder_dealloc, .tp_getset = decoder_getset, .tp_methods = decoder_methods, }; zbar-0.23/python/Makefile.am.inc0000664000175000017500000000124513471225716013456 00000000000000pyexec_LTLIBRARIES += python/zbar.la python_zbar_la_CPPFLAGS = $(PYTHON_CFLAGS) $(AM_CPPFLAGS) python_zbar_la_LDFLAGS = -shared -module -avoid-version -export-dynamic \ -export-symbols-regex '(initzbar|PyInit_zbar)' python_zbar_la_LIBADD = $(PYTHON_LIBS) zbar/libzbar.la $(AM_LIBADD) python_zbar_la_SOURCES = python/zbarmodule.c python/zbarmodule.h \ python/enum.c python/exception.c python/symbol.c python/symbolset.c \ python/symboliter.c python/image.c \ python/processor.c python/imagescanner.c python/decoder.c python/scanner.c EXTRA_DIST += python/test/barcode.png python/test/test_zbar.py \ python/examples/processor.py python/examples/read_one.py zbar-0.23/python/examples/0000775000175000017500000000000013471606255012547 500000000000000zbar-0.23/python/examples/processor.py0000664000175000017500000000134013471225716015055 00000000000000#!/usr/bin/env python from sys import argv import zbar # create a Processor proc = zbar.Processor() # configure the Processor proc.parse_config('enable') # initialize the Processor device = '/dev/video0' if len(argv) > 1: device = argv[1] proc.init(device) # setup a callback def my_handler(proc, image, closure): # extract results for symbol in image.symbols: # do something useful with results print('decoded', symbol.type, 'symbol', '"%s"' % symbol.data) proc.set_data_handler(my_handler) # enable the preview window proc.visible = True # initiate scanning proc.active = True try: # keep scanning until user provides key/mouse input proc.user_wait() except zbar.WindowClosed as e: pass zbar-0.23/python/examples/read_one.py0000664000175000017500000000111213471225716014607 00000000000000#!/usr/bin/env python from sys import argv import zbar # create a Processor proc = zbar.Processor() # configure the Processor proc.parse_config('enable') # initialize the Processor device = '/dev/video0' if len(argv) > 1: device = argv[1] proc.init(device) # enable the preview window proc.visible = True # read at least one barcode (or until window closed) proc.process_one() # hide the preview window proc.visible = False # extract results for symbol in proc.results: # do something useful with results print('decoded', symbol.type, 'symbol', '"%s"' % symbol.data) zbar-0.23/python/symbol.c0000664000175000017500000001537513471225716012334 00000000000000/*------------------------------------------------------------------------ * Copyright 2009-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "zbarmodule.h" static char symbol_doc[] = PyDoc_STR( "symbol result object.\n" "\n" "data and associated information about a successful decode."); static int symbol_traverse (zbarSymbol *self, visitproc visit, void *arg) { return(0); } static int symbol_clear (zbarSymbol *self) { if(self->zsym) { zbar_symbol_t *zsym = (zbar_symbol_t*)self->zsym; self->zsym = NULL; zbar_symbol_ref(zsym, -1); } Py_CLEAR(self->data); Py_CLEAR(self->loc); return(0); } static void symbol_dealloc (zbarSymbol *self) { symbol_clear(self); ((PyObject*)self)->ob_type->tp_free((PyObject*)self); } static zbarSymbolSet* symbol_get_components (zbarSymbol *self, void *closure) { const zbar_symbol_set_t *zsyms = zbar_symbol_get_components(self->zsym); return(zbarSymbolSet_FromSymbolSet(zsyms)); } static zbarSymbolIter* symbol_iter (zbarSymbol *self) { zbarSymbolSet *syms = symbol_get_components(self, NULL); zbarSymbolIter *iter = zbarSymbolIter_FromSymbolSet(syms); Py_XDECREF(syms); return(iter); } static zbarEnumItem* symbol_get_type (zbarSymbol *self, void *closure) { return(zbarSymbol_LookupEnum(zbar_symbol_get_type(self->zsym))); } static PyObject* symbol_get_configs (zbarSymbol *self, void *closure) { unsigned int mask = zbar_symbol_get_configs(self->zsym); struct module_state *st = GETMODSTATE(); return(zbarEnum_SetFromMask(st->config_enum, mask)); } static PyObject* symbol_get_modifiers (zbarSymbol *self, void *closure) { unsigned int mask = zbar_symbol_get_modifiers(self->zsym); struct module_state *st = GETMODSTATE(); return(zbarEnum_SetFromMask(st->modifier_enum, mask)); } static PyObject* symbol_get_long (zbarSymbol *self, void *closure) { int val; if(!closure) val = zbar_symbol_get_quality(self->zsym); else val = zbar_symbol_get_count(self->zsym); #if PY_MAJOR_VERSION >= 3 return(PyLong_FromLong(val)); #else return(PyInt_FromLong(val)); #endif } static PyObject* symbol_get_data (zbarSymbol *self, void *closure) { if(!self->data) { #if PY_MAJOR_VERSION >= 3 self->data = PyUnicode_FromStringAndSize(zbar_symbol_get_data(self->zsym), zbar_symbol_get_data_length(self->zsym)); #else /* FIXME this could be a buffer now */ self->data = PyString_FromStringAndSize(zbar_symbol_get_data(self->zsym), zbar_symbol_get_data_length(self->zsym)); #endif if(!self->data) return(NULL); } Py_INCREF(self->data); return(self->data); } static PyObject* symbol_get_location (zbarSymbol *self, void *closure) { if(!self->loc) { /* build tuple of 2-tuples representing location polygon */ unsigned int n = zbar_symbol_get_loc_size(self->zsym); self->loc = PyTuple_New(n); unsigned int i; for(i = 0; i < n; i++) { PyObject *x, *y; #if PY_MAJOR_VERSION >= 3 x = PyLong_FromLong(zbar_symbol_get_loc_x(self->zsym, i)); y = PyLong_FromLong(zbar_symbol_get_loc_y(self->zsym, i)); #else x = PyInt_FromLong(zbar_symbol_get_loc_x(self->zsym, i)); y = PyInt_FromLong(zbar_symbol_get_loc_y(self->zsym, i)); #endif PyTuple_SET_ITEM(self->loc, i, PyTuple_Pack(2, x, y)); } } Py_INCREF(self->loc); return(self->loc); } static zbarEnumItem* symbol_get_orientation (zbarSymbol *self, void *closure) { struct module_state *st = GETMODSTATE(); return(zbarEnum_LookupValue(st->orient_enum, zbar_symbol_get_orientation(self->zsym))); } static PyGetSetDef symbol_getset[] = { { "type", (getter)symbol_get_type, }, { "configs", (getter)symbol_get_configs, }, { "modifiers", (getter)symbol_get_modifiers, }, { "quality", (getter)symbol_get_long, NULL, NULL, (void*)0 }, { "count", (getter)symbol_get_long, NULL, NULL, (void*)1 }, { "data", (getter)symbol_get_data, }, { "location", (getter)symbol_get_location, }, { "orientation",(getter)symbol_get_orientation, }, { "components", (getter)symbol_get_components, }, { NULL, }, }; PyTypeObject zbarSymbol_Type = { PyVarObject_HEAD_INIT(NULL, 0) .tp_name = "zbar.Symbol", .tp_doc = symbol_doc, .tp_basicsize = sizeof(zbarSymbol), .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, .tp_traverse = (traverseproc)symbol_traverse, .tp_clear = (inquiry)symbol_clear, .tp_dealloc = (destructor)symbol_dealloc, .tp_iter = (getiterfunc)symbol_iter, .tp_getset = symbol_getset, }; zbarSymbol* zbarSymbol_FromSymbol (const zbar_symbol_t *zsym) { /* FIXME symbol object recycle cache */ zbarSymbol *self = PyObject_GC_New(zbarSymbol, &zbarSymbol_Type); if(!self) return(NULL); assert(zsym); zbar_symbol_t *zs = (zbar_symbol_t*)zsym; zbar_symbol_ref(zs, 1); self->zsym = zsym; self->data = NULL; self->loc = NULL; return(self); } zbarEnumItem* zbarSymbol_LookupEnum (zbar_symbol_type_t type) { #if PY_MAJOR_VERSION >= 3 PyObject *key = PyLong_FromLong(type); #else PyObject *key = PyInt_FromLong(type); #endif struct module_state *st = GETMODSTATE(); zbarEnumItem *e = (zbarEnumItem*)PyDict_GetItem(st->symbol_enum, key); if(!e) return((zbarEnumItem*)key); Py_INCREF((PyObject*)e); Py_DECREF(key); return(e); } zbar-0.23/python/image.c0000664000175000017500000003304513471225716012103 00000000000000/*------------------------------------------------------------------------ * Copyright 2009-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "zbarmodule.h" #ifdef HAVE_INTTYPES_H # include #endif static char image_doc[] = PyDoc_STR( "image object.\n" "\n" "stores image data samples along with associated format and size metadata."); static zbarImage* image_new (PyTypeObject *type, PyObject *args, PyObject *kwds) { zbarImage *self = (zbarImage*)type->tp_alloc(type, 0); if(!self) return(NULL); self->zimg = zbar_image_create(); if(!self->zimg) { Py_DECREF(self); return(NULL); } zbar_image_set_userdata(self->zimg, self); return(self); } static int image_traverse (zbarImage *self, visitproc visit, void *arg) { Py_VISIT(self->data); return(0); } static int image_clear (zbarImage *self) { zbar_image_t *zimg = self->zimg; self->zimg = NULL; if(zimg) { assert(zbar_image_get_userdata(zimg) == self); if(self->data) { /* attach data directly to zbar image */ zbar_image_set_userdata(zimg, self->data); self->data = NULL; } else zbar_image_set_userdata(zimg, NULL); zbar_image_destroy(zimg); } return(0); } static void image_dealloc (zbarImage *self) { image_clear(self); ((PyObject*)self)->ob_type->tp_free((PyObject*)self); } static zbarSymbolSet* image_get_symbols (zbarImage *self, void *closure) { const zbar_symbol_set_t *zsyms = zbar_image_get_symbols(self->zimg); return(zbarSymbolSet_FromSymbolSet(zsyms)); } static int image_set_symbols (zbarImage *self, PyObject *value, void *closure) { const zbar_symbol_set_t *zsyms; if(!value || value == Py_None) zsyms = NULL; else if(zbarSymbolSet_Check(value)) zsyms = ((zbarSymbolSet*)value)->zsyms; else { PyErr_Format(PyExc_TypeError, "must set image symbols to a zbar.SymbolSet, not '%.50s'", value->ob_type->tp_name); return(-1); } zbar_image_set_symbols(self->zimg, zsyms); return(0); } static zbarSymbolIter* image_iter (zbarImage *self) { zbarSymbolSet *syms = image_get_symbols(self, NULL); if(!syms) return(NULL); return(zbarSymbolIter_FromSymbolSet(syms)); } static PyObject* image_get_format (zbarImage *self, void *closure) { unsigned long format = zbar_image_get_format(self->zimg); #if PY_MAJOR_VERSION >= 3 return(PyBytes_FromStringAndSize((char*)&format, 4)); #else return(PyString_FromStringAndSize((char*)&format, 4)); #endif } static int image_set_format (zbarImage *self, PyObject *value, void *closure) { if(!value) { PyErr_SetString(PyExc_TypeError, "cannot delete format attribute"); return(-1); } char *format = NULL; Py_ssize_t len; #if PY_MAJOR_VERSION >= 3 PyObject *bytes; if (PyUnicode_Check(value)) bytes = PyUnicode_AsEncodedString(value, "utf-8", "surrogateescape"); else bytes = value; if(PyBytes_AsStringAndSize(bytes, &format, &len) < 0 || !format || len != 4) { #else if(PyString_AsStringAndSize(value, &format, &len) || !format || len != 4) { #endif if(!format) format = "(nil)"; PyErr_Format(PyExc_ValueError, "format '%.50s' is not a valid four character code", format); return(-1); } zbar_image_set_format(self->zimg, zbar_fourcc_parse(format)); return(0); } static PyObject* image_get_size (zbarImage *self, void *closure) { unsigned int w, h; zbar_image_get_size(self->zimg, &w, &h); #if PY_MAJOR_VERSION >= 3 return(PyTuple_Pack(2, PyLong_FromLong(w), PyLong_FromLong(h))); #else return(PyTuple_Pack(2, PyInt_FromLong(w), PyInt_FromLong(h))); #endif } static int image_set_size (zbarImage *self, PyObject *value, void *closure) { if(!value) { PyErr_SetString(PyExc_TypeError, "cannot delete size attribute"); return(-1); } int dims[2]; if(parse_dimensions(value, dims, 2) || dims[0] < 0 || dims[1] < 0) { PyErr_SetString(PyExc_ValueError, "size must be a sequence of two positive ints"); return(-1); } zbar_image_set_size(self->zimg, dims[0], dims[1]); return(0); } static PyObject* image_get_crop (zbarImage *self, void *closure) { unsigned int x, y, w, h; zbar_image_get_crop(self->zimg, &x, &y, &w, &h); #if PY_MAJOR_VERSION >= 3 return(PyTuple_Pack(4, PyLong_FromLong(x), PyLong_FromLong(y), PyLong_FromLong(w), PyLong_FromLong(h))); #else return(PyTuple_Pack(4, PyInt_FromLong(x), PyInt_FromLong(y), PyInt_FromLong(w), PyInt_FromLong(h))); #endif } static int image_set_crop (zbarImage *self, PyObject *value, void *closure) { unsigned w, h; zbar_image_get_size(self->zimg, &w, &h); if(!value) { zbar_image_set_crop(self->zimg, 0, 0, w, h); return(0); } int dims[4]; if(parse_dimensions(value, dims, 4) || dims[2] < 0 || dims[3] < 0) { PyErr_SetString(PyExc_ValueError, "crop must be a sequence of four positive ints"); return(-1); } if(dims[0] < 0) { dims[2] += dims[0]; dims[0] = 0; } if(dims[1] < 0) { dims[3] += dims[1]; dims[1] = 0; } zbar_image_set_crop(self->zimg, dims[0], dims[1], dims[2], dims[3]); return(0); } static PyObject* image_get_int (zbarImage *self, void *closure) { unsigned int val = -1; switch((intptr_t)closure) { case 0: val = zbar_image_get_width(self->zimg); break; case 1: val = zbar_image_get_height(self->zimg); break; case 2: val = zbar_image_get_sequence(self->zimg); break; default: assert(0); } #if PY_MAJOR_VERSION >= 3 return(PyLong_FromLong(val)); #else return(PyInt_FromLong(val)); #endif } static int image_set_int (zbarImage *self, PyObject *value, void *closure) { unsigned int tmp; #if PY_MAJOR_VERSION >= 3 long val = PyLong_AsLong(value); #else unsigned int val = PyInt_AsSsize_t(value); #endif if(val == -1 && PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "expecting an integer"); return(-1); } switch((intptr_t)closure) { case 0: tmp = zbar_image_get_height(self->zimg); zbar_image_set_size(self->zimg, val, tmp); break; case 1: tmp = zbar_image_get_width(self->zimg); zbar_image_set_size(self->zimg, tmp, val); break; case 2: zbar_image_set_sequence(self->zimg, val); default: assert(0); } return(0); } static PyObject* image_get_data (zbarImage *self, void *closure) { assert(zbar_image_get_userdata(self->zimg) == self); if(self->data) { Py_INCREF(self->data); return(self->data); } const char *data = zbar_image_get_data(self->zimg); unsigned long datalen = zbar_image_get_data_length(self->zimg); if(!data || !datalen) { Py_INCREF(Py_None); return(Py_None); } #if PY_MAJOR_VERSION >= 3 self->data = PyMemoryView_FromMemory((void*)data, datalen, PyBUF_READ); #else self->data = PyBuffer_FromMemory((void*)data, datalen); #endif Py_INCREF(self->data); return(self->data); } void image_cleanup (zbar_image_t *zimg) { PyObject *data = zbar_image_get_userdata(zimg); zbar_image_set_userdata(zimg, NULL); if(!data) return; /* FIXME internal error */ if(PyObject_TypeCheck(data, &zbarImage_Type)) { zbarImage *self = (zbarImage*)data; assert(self->zimg == zimg); Py_CLEAR(self->data); } else Py_DECREF(data); } static int image_set_data (zbarImage *self, PyObject *value, void *closure) { if(!value) { zbar_image_free_data(self->zimg); return(0); } char *data; Py_ssize_t datalen; #if PY_MAJOR_VERSION >= 3 PyObject *bytes; if (PyUnicode_Check(value)) bytes = PyUnicode_AsEncodedString(value, "utf-8", "surrogateescape"); else bytes = value; if(PyBytes_AsStringAndSize(bytes, &data, &datalen)) return(-1); #else if(PyString_AsStringAndSize(value, &data, &datalen)) return(-1); #endif Py_INCREF(value); zbar_image_set_data(self->zimg, data, datalen, image_cleanup); assert(!self->data); self->data = value; zbar_image_set_userdata(self->zimg, self); return(0); } static PyGetSetDef image_getset[] = { { "format", (getter)image_get_format, (setter)image_set_format, }, { "size", (getter)image_get_size, (setter)image_set_size, }, { "crop", (getter)image_get_crop, (setter)image_set_crop, }, { "width", (getter)image_get_int, (setter)image_set_int, NULL, (void*)0 }, { "height", (getter)image_get_int, (setter)image_set_int, NULL, (void*)1 }, { "sequence", (getter)image_get_int, (setter)image_set_int, NULL, (void*)2 }, { "data", (getter)image_get_data, (setter)image_set_data, }, { "symbols", (getter)image_get_symbols,(setter)image_set_symbols, }, { NULL, }, }; static int image_init (zbarImage *self, PyObject *args, PyObject *kwds) { int width = -1, height = -1; PyObject *format = NULL, *data = NULL; static char *kwlist[] = { "width", "height", "format", "data", NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "|iiOO", kwlist, &width, &height, &format, &data)) return(-1); if(width > 0 && height > 0) zbar_image_set_size(self->zimg, width, height); if(format && image_set_format(self, format, NULL)) return(-1); if(data && image_set_data(self, data, NULL)) return(-1); return(0); } static zbarImage* image_convert (zbarImage *self, PyObject *args, PyObject *kwds) { const char *format = NULL; int width = -1, height = -1; static char *kwlist[] = { "format", "width", "height", NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "s|ii", kwlist, &format, &width, &height)) return(NULL); assert(format); if(strlen(format) != 4) { PyErr_Format(PyExc_ValueError, "format '%.50s' is not a valid four character code", format); return(NULL); } unsigned long fourcc = zbar_fourcc_parse(format); zbarImage *img = PyObject_GC_New(zbarImage, &zbarImage_Type); if(!img) return(NULL); img->data = NULL; if(width > 0 && height > 0) img->zimg = zbar_image_convert_resize(self->zimg, fourcc, width, height); else img->zimg = zbar_image_convert(self->zimg, fourcc); if(!img->zimg) { /* FIXME propagate exception */ Py_DECREF(img); return(NULL); } zbar_image_set_userdata(img->zimg, img); return(img); } static PyMethodDef image_methods[] = { { "convert", (PyCFunction)image_convert, METH_VARARGS | METH_KEYWORDS, }, { NULL, }, }; PyTypeObject zbarImage_Type = { PyVarObject_HEAD_INIT(NULL, 0) .tp_name = "zbar.Image", .tp_doc = image_doc, .tp_basicsize = sizeof(zbarImage), .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, .tp_new = (newfunc)image_new, .tp_init = (initproc)image_init, .tp_traverse = (traverseproc)image_traverse, .tp_clear = (inquiry)image_clear, .tp_dealloc = (destructor)image_dealloc, .tp_getset = image_getset, .tp_methods = image_methods, .tp_iter = (getiterfunc)image_iter, }; zbarImage* zbarImage_FromImage (zbar_image_t *zimg) { zbarImage *self = PyObject_GC_New(zbarImage, &zbarImage_Type); if(!self) return(NULL); zbar_image_ref(zimg, 1); zbar_image_set_userdata(zimg, self); self->zimg = zimg; self->data = NULL; return(self); } int zbarImage_validate (zbarImage *img) { if(!zbar_image_get_width(img->zimg) || !zbar_image_get_height(img->zimg) || !zbar_image_get_data(img->zimg) || !zbar_image_get_data_length(img->zimg)) { PyErr_Format(PyExc_ValueError, "image size and data must be defined"); return(-1); } return(0); } zbar-0.23/python/imagescanner.c0000664000175000017500000001375213471225716013460 00000000000000/*------------------------------------------------------------------------ * Copyright 2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "zbarmodule.h" static char imagescanner_doc[] = PyDoc_STR( "scan images for barcodes.\n" "\n" "attaches symbols to image for each decoded result."); static zbarImageScanner* imagescanner_new (PyTypeObject *type, PyObject *args, PyObject *kwds) { static char *kwlist[] = { NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "", kwlist)) return(NULL); zbarImageScanner *self = (zbarImageScanner*)type->tp_alloc(type, 0); if(!self) return(NULL); self->zscn = zbar_image_scanner_create(); if(!self->zscn) { Py_DECREF(self); return(NULL); } return(self); } static void imagescanner_dealloc (zbarImageScanner *self) { zbar_image_scanner_destroy(self->zscn); ((PyObject*)self)->ob_type->tp_free((PyObject*)self); } static zbarSymbolSet* imagescanner_get_results (zbarImageScanner *self, void *closure) { const zbar_symbol_set_t *zsyms = zbar_image_scanner_get_results(self->zscn); return(zbarSymbolSet_FromSymbolSet(zsyms)); } static PyGetSetDef imagescanner_getset[] = { { "results", (getter)imagescanner_get_results, NULL, NULL, NULL}, {NULL} /* Sentinel */ }; static PyObject* imagescanner_set_config (zbarImageScanner *self, PyObject *args, PyObject *kwds) { zbar_symbol_type_t sym = ZBAR_NONE; zbar_config_t cfg = ZBAR_CFG_ENABLE; int val = 1; static char *kwlist[] = { "symbology", "config", "value", NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "|iii", kwlist, &sym, &cfg, &val)) return(NULL); if(zbar_image_scanner_set_config(self->zscn, sym, cfg, val)) { PyErr_SetString(PyExc_ValueError, "invalid configuration setting"); return(NULL); } Py_RETURN_NONE; } static PyObject* imagescanner_parse_config (zbarImageScanner *self, PyObject *args, PyObject *kwds) { const char *cfg = NULL; static char *kwlist[] = { "config", NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "s", kwlist, &cfg)) return(NULL); if(zbar_image_scanner_parse_config(self->zscn, cfg)) { PyErr_Format(PyExc_ValueError, "invalid configuration setting: %s", cfg); return(NULL); } Py_RETURN_NONE; } static PyObject* imagescanner_enable_cache (zbarImageScanner *self, PyObject *args, PyObject *kwds) { unsigned char enable = 1; static char *kwlist[] = { "enable", NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "|O&", kwlist, object_to_bool, &enable)) return(NULL); zbar_image_scanner_enable_cache(self->zscn, enable); Py_RETURN_NONE; } static PyObject* imagescanner_recycle (zbarImageScanner *self, PyObject *args, PyObject *kwds) { zbarImage *img = NULL; static char *kwlist[] = { "image", NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "O!", kwlist, &zbarImage_Type, &img)) return(NULL); zbar_image_scanner_recycle_image(self->zscn, img->zimg); Py_RETURN_NONE; } static PyObject* imagescanner_scan (zbarImageScanner *self, PyObject *args, PyObject *kwds) { zbarImage *img = NULL; static char *kwlist[] = { "image", NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "O!", kwlist, &zbarImage_Type, &img)) return(NULL); if(zbarImage_validate(img)) return(NULL); int n = zbar_scan_image(self->zscn, img->zimg); if(n < 0) { PyErr_Format(PyExc_ValueError, "unsupported image format"); return(NULL); } #if PY_MAJOR_VERSION >= 3 return(PyLong_FromLong(n)); #else return(PyInt_FromLong(n)); #endif } static PyMethodDef imagescanner_methods[] = { { "set_config", (PyCFunction)imagescanner_set_config, METH_VARARGS | METH_KEYWORDS, }, { "parse_config", (PyCFunction)imagescanner_parse_config, METH_VARARGS | METH_KEYWORDS, }, { "enable_cache", (PyCFunction)imagescanner_enable_cache, METH_VARARGS | METH_KEYWORDS, }, { "recycle", (PyCFunction)imagescanner_recycle, METH_VARARGS | METH_KEYWORDS, }, { "scan", (PyCFunction)imagescanner_scan, METH_VARARGS | METH_KEYWORDS, }, { NULL, }, }; PyTypeObject zbarImageScanner_Type = { PyVarObject_HEAD_INIT(NULL, 0) .tp_name = "zbar.ImageScanner", .tp_doc = imagescanner_doc, .tp_basicsize = sizeof(zbarImageScanner), .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, .tp_new = (newfunc)imagescanner_new, .tp_dealloc = (destructor)imagescanner_dealloc, .tp_getset = imagescanner_getset, .tp_methods = imagescanner_methods, }; zbar-0.23/python/scanner.c0000664000175000017500000001251313471225716012447 00000000000000/*------------------------------------------------------------------------ * Copyright 2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "zbarmodule.h" static char scanner_doc[] = PyDoc_STR( "low level intensity sample stream scanner. identifies \"bar\" edges" "and measures width between them.\n" "\n" "FIXME."); static zbarScanner* scanner_new (PyTypeObject *type, PyObject *args, PyObject *kwds) { zbarDecoder *decoder = NULL; static char *kwlist[] = { "decoder", NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", kwlist, &decoder, zbarDecoder_Type)) return(NULL); zbarScanner *self = (zbarScanner*)type->tp_alloc(type, 0); if(!self) return(NULL); zbar_decoder_t *zdcode = NULL; if(decoder) { Py_INCREF(decoder); self->decoder = decoder; zdcode = decoder->zdcode; } self->zscn = zbar_scanner_create(zdcode); if(!self->zscn) { Py_DECREF(self); return(NULL); } return(self); } static int scanner_traverse (zbarScanner *self, visitproc visit, void *arg) { Py_VISIT(self->decoder); return(0); } static int scanner_clear (zbarScanner *self) { Py_CLEAR(self->decoder); return(0); } static void scanner_dealloc (zbarScanner *self) { scanner_clear(self); zbar_scanner_destroy(self->zscn); ((PyObject*)self)->ob_type->tp_free((PyObject*)self); } static PyObject* scanner_get_width (zbarScanner *self, void *closure) { unsigned int width = zbar_scanner_get_width(self->zscn); #if PY_MAJOR_VERSION >= 3 return(PyLong_FromLong(width)); #else return(PyInt_FromLong(width)); #endif } static zbarEnumItem* scanner_get_color (zbarScanner *self, void *closure) { zbar_color_t zcol = zbar_scanner_get_color(self->zscn); assert(zcol == ZBAR_BAR || zcol == ZBAR_SPACE); struct module_state *st = GETMODSTATE(); zbarEnumItem *color = st->color_enum[zcol]; Py_INCREF((PyObject*)color); return(color); } static PyGetSetDef scanner_getset[] = { { "color", (getter)scanner_get_color, }, { "width", (getter)scanner_get_width, }, { NULL, }, }; static PyObject* scanner_reset (zbarScanner *self, PyObject *args, PyObject *kwds) { static char *kwlist[] = { NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "", kwlist)) return(NULL); zbar_scanner_reset(self->zscn); Py_RETURN_NONE; } static PyObject* scanner_new_scan (zbarScanner *self, PyObject *args, PyObject *kwds) { static char *kwlist[] = { NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "", kwlist)) return(NULL); zbar_scanner_new_scan(self->zscn); Py_RETURN_NONE; } static zbarEnumItem* scanner_scan_y (zbarScanner *self, PyObject *args, PyObject *kwds) { /* FIXME should accept sequence of values */ int y = 0; static char *kwlist[] = { "y", NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "i", kwlist, &y)) return(NULL); zbar_symbol_type_t sym = zbar_scan_y(self->zscn, y); if(PyErr_Occurred()) /* propagate errors during callback */ return(NULL); if(sym == ZBAR_NONE) { /* hardcode most common case */ struct module_state *st = GETMODSTATE(); Py_INCREF((PyObject*)st->symbol_NONE); return(st->symbol_NONE); } return(zbarSymbol_LookupEnum(sym)); } static PyMethodDef scanner_methods[] = { { "reset", (PyCFunction)scanner_reset, METH_VARARGS | METH_KEYWORDS, }, { "new_scan", (PyCFunction)scanner_new_scan, METH_VARARGS | METH_KEYWORDS, }, { "scan_y", (PyCFunction)scanner_scan_y, METH_VARARGS | METH_KEYWORDS, }, { NULL, }, }; PyTypeObject zbarScanner_Type = { PyVarObject_HEAD_INIT(NULL, 0) .tp_name = "zbar.Scanner", .tp_doc = scanner_doc, .tp_basicsize = sizeof(zbarScanner), .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, .tp_new = (newfunc)scanner_new, .tp_traverse = (traverseproc)scanner_traverse, .tp_clear = (inquiry)scanner_clear, .tp_dealloc = (destructor)scanner_dealloc, .tp_getset = scanner_getset, .tp_methods = scanner_methods, }; zbar-0.23/python/symbolset.c0000664000175000017500000000525213471225716013041 00000000000000/*------------------------------------------------------------------------ * Copyright 2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "zbarmodule.h" static char symbolset_doc[] = PyDoc_STR( "symbol result container.\n" "\n" "collection of symbols."); static int symbolset_clear (zbarSymbolSet *self) { if(self->zsyms) { zbar_symbol_set_t *zsyms = (zbar_symbol_set_t*)self->zsyms; self->zsyms = NULL; zbar_symbol_set_ref(zsyms, -1); } return(0); } static void symbolset_dealloc (zbarSymbolSet *self) { symbolset_clear(self); ((PyObject*)self)->ob_type->tp_free((PyObject*)self); } static zbarSymbolIter* symbolset_iter (zbarSymbolSet *self) { return(zbarSymbolIter_FromSymbolSet(self)); } Py_ssize_t symbolset_length (zbarSymbolSet *self) { if(self->zsyms) return(zbar_symbol_set_get_size(self->zsyms)); return(0); } static PySequenceMethods symbolset_as_sequence = { .sq_length = (lenfunc)symbolset_length, }; PyTypeObject zbarSymbolSet_Type = { PyVarObject_HEAD_INIT(NULL, 0) .tp_name = "zbar.SymbolSet", .tp_doc = symbolset_doc, .tp_basicsize = sizeof(zbarSymbolSet), .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, .tp_dealloc = (destructor)symbolset_dealloc, .tp_iter = (getiterfunc)symbolset_iter, .tp_as_sequence = &symbolset_as_sequence, }; zbarSymbolSet* zbarSymbolSet_FromSymbolSet(const zbar_symbol_set_t *zsyms) { zbarSymbolSet *self = PyObject_New(zbarSymbolSet, &zbarSymbolSet_Type); if(!self) return(NULL); if(zsyms) { zbar_symbol_set_t *ncsyms = (zbar_symbol_set_t*)zsyms; zbar_symbol_set_ref(ncsyms, 1); } self->zsyms = zsyms; return(self); } zbar-0.23/python/zbarmodule.c0000664000175000017500000002401713471225716013164 00000000000000/*------------------------------------------------------------------------ * Copyright 2009-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "zbarmodule.h" typedef struct enumdef { const char *strval; int intval; } enumdef; static char *exc_names[] = { "zbar.Exception", NULL, "zbar.InternalError", "zbar.UnsupportedError", "zbar.InvalidRequestError", "zbar.SystemError", "zbar.LockingError", "zbar.BusyError", "zbar.X11DisplayError", "zbar.X11ProtocolError", "zbar.WindowClosed", "zbar.WinAPIError", }; static const enumdef symbol_defs[] = { { "NONE", ZBAR_NONE }, { "PARTIAL", ZBAR_PARTIAL }, { "EAN8", ZBAR_EAN8 }, { "UPCE", ZBAR_UPCE }, { "ISBN10", ZBAR_ISBN10 }, { "UPCA", ZBAR_UPCA }, { "EAN13", ZBAR_EAN13 }, { "ISBN13", ZBAR_ISBN13 }, { "DATABAR", ZBAR_DATABAR }, { "DATABAR_EXP", ZBAR_DATABAR_EXP }, { "I25", ZBAR_I25 }, { "CODABAR", ZBAR_CODABAR }, { "CODE39", ZBAR_CODE39 }, { "PDF417", ZBAR_PDF417 }, { "QRCODE", ZBAR_QRCODE }, { "SQCODE", ZBAR_SQCODE }, { "CODE93", ZBAR_CODE93 }, { "CODE128", ZBAR_CODE128 }, { NULL, } }; static const enumdef config_defs[] = { { "ENABLE", ZBAR_CFG_ENABLE }, { "ADD_CHECK", ZBAR_CFG_ADD_CHECK }, { "EMIT_CHECK", ZBAR_CFG_EMIT_CHECK }, { "ASCII", ZBAR_CFG_ASCII }, { "MIN_LEN", ZBAR_CFG_MIN_LEN }, { "MAX_LEN", ZBAR_CFG_MAX_LEN }, { "UNCERTAINTY", ZBAR_CFG_UNCERTAINTY }, { "POSITION", ZBAR_CFG_POSITION }, { "X_DENSITY", ZBAR_CFG_X_DENSITY }, { "Y_DENSITY", ZBAR_CFG_Y_DENSITY }, { NULL, } }; static const enumdef modifier_defs[] = { { "GS1", ZBAR_MOD_GS1 }, { "AIM", ZBAR_MOD_AIM }, { NULL, } }; static const enumdef orient_defs[] = { { "UNKNOWN", ZBAR_ORIENT_UNKNOWN }, { "UP", ZBAR_ORIENT_UP }, { "RIGHT", ZBAR_ORIENT_RIGHT }, { "DOWN", ZBAR_ORIENT_DOWN }, { "LEFT", ZBAR_ORIENT_LEFT }, { NULL, } }; #if PY_MAJOR_VERSION < 3 struct module_state zbar_state; #endif int object_to_bool (PyObject *obj, int *val) { int tmp = PyObject_IsTrue(obj); if(tmp < 0) return(0); *val = tmp; return(1); } int parse_dimensions (PyObject *seq, int *dims, int n) { if(!PySequence_Check(seq) || PySequence_Size(seq) != n) return(-1); int i; for(i = 0; i < n; i++, dims++) { PyObject *dim = PySequence_GetItem(seq, i); if(!dim) return(-1); #if PY_MAJOR_VERSION >= 3 *dims = PyLong_AsSsize_t(dim); #else *dims = PyInt_AsSsize_t(dim); #endif Py_DECREF(dim); if(*dims == -1 && PyErr_Occurred()) return(-1); } return(0); } static PyObject* version (PyObject *self, PyObject *args) { if(!PyArg_ParseTuple(args, "")) return(NULL); unsigned int major, minor; zbar_version(&major, &minor, NULL); return(Py_BuildValue("II", major, minor)); } static PyObject* set_verbosity (PyObject *self, PyObject *args) { int verbosity; if(!PyArg_ParseTuple(args, "i", &verbosity)) return(NULL); zbar_set_verbosity(verbosity); Py_INCREF(Py_None); return(Py_None); } static PyObject* increase_verbosity (PyObject *self, PyObject *args) { if(!PyArg_ParseTuple(args, "")) return(NULL); zbar_increase_verbosity(); Py_INCREF(Py_None); return(Py_None); } static PyMethodDef zbar_functions[] = { { "version", version, METH_VARARGS, NULL }, { "set_verbosity", set_verbosity, METH_VARARGS, NULL }, { "increase_verbosity", increase_verbosity, METH_VARARGS, NULL }, { NULL, }, }; #if PY_MAJOR_VERSION >= 3 static int zbar_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(GETSTATE(m)->zbar_exc[0]); return 0; } static int zbar_clear(PyObject *m) { Py_CLEAR(GETSTATE(m)->zbar_exc[0]); return 0; } struct PyModuleDef zbar_moduledef = { PyModuleDef_HEAD_INIT, "zbar", NULL, sizeof(struct module_state), zbar_functions, NULL, zbar_traverse, zbar_clear, NULL }; #define INITERROR return NULL PyMODINIT_FUNC PyInit_zbar(void) #else #define INITERROR return PyMODINIT_FUNC initzbar(void) #endif { #if PY_MAJOR_VERSION >= 3 /* initialize types */ zbarEnumItem_Type.tp_base = &PyLong_Type; #else zbarEnumItem_Type.tp_base = &PyInt_Type; zbarException_Type.tp_base = (PyTypeObject*)PyExc_Exception; if(PyType_Ready(&zbarException_Type) < 0) INITERROR; #endif if(PyType_Ready(&zbarEnumItem_Type) < 0 || PyType_Ready(&zbarEnum_Type) < 0 || PyType_Ready(&zbarImage_Type) < 0 || PyType_Ready(&zbarSymbol_Type) < 0 || PyType_Ready(&zbarSymbolSet_Type) < 0 || PyType_Ready(&zbarSymbolIter_Type) < 0 || PyType_Ready(&zbarProcessor_Type) < 0 || PyType_Ready(&zbarImageScanner_Type) < 0 || PyType_Ready(&zbarDecoder_Type) < 0 || PyType_Ready(&zbarScanner_Type) < 0) INITERROR; /* initialize module */ #if PY_MAJOR_VERSION >= 3 PyObject *mod = PyModule_Create(&zbar_moduledef); #else PyObject *mod = Py_InitModule("zbar", zbar_functions); #endif if(!mod) INITERROR; #if PY_MAJOR_VERSION >= 3 if(PyState_AddModule(mod, &zbar_moduledef)) { Py_DECREF(mod); INITERROR; } #endif struct module_state *st = GETSTATE(mod); /* initialize constant containers */ st->config_enum = zbarEnum_New(); st->modifier_enum = zbarEnum_New(); st->symbol_enum = PyDict_New(); st->orient_enum = zbarEnum_New(); if(!st->config_enum || !st->modifier_enum || !st->symbol_enum || !st->orient_enum) { Py_DECREF(mod); INITERROR; } /* internally created/read-only type overrides */ zbarEnum_Type.tp_new = NULL; zbarEnum_Type.tp_setattr = NULL; zbarEnum_Type.tp_setattro = NULL; /* zbar internal exception objects */ #if PY_MAJOR_VERSION >= 3 st->zbar_exc[0] = PyErr_NewException("zbar.Exception", NULL, NULL); #else st->zbar_exc[0] = (PyObject*)&zbarException_Type; #endif if (st->zbar_exc[0] == NULL) { Py_DECREF(mod); INITERROR; } st->zbar_exc[ZBAR_ERR_NOMEM] = NULL; zbar_error_t ei; for(ei = ZBAR_ERR_INTERNAL; ei < ZBAR_ERR_NUM; ei++) { st->zbar_exc[ei] = PyErr_NewException(exc_names[ei], st->zbar_exc[0], NULL); if (!st->zbar_exc[ei]) { Py_DECREF(mod); INITERROR; } } /* add types to module */ PyModule_AddObject(mod, "EnumItem", (PyObject*)&zbarEnumItem_Type); PyModule_AddObject(mod, "Image", (PyObject*)&zbarImage_Type); PyModule_AddObject(mod, "Config", (PyObject*)st->config_enum); PyModule_AddObject(mod, "Modifier", (PyObject*)st->modifier_enum); PyModule_AddObject(mod, "Orient", (PyObject*)st->orient_enum); PyModule_AddObject(mod, "Symbol", (PyObject*)&zbarSymbol_Type); PyModule_AddObject(mod, "SymbolSet", (PyObject*)&zbarSymbolSet_Type); PyModule_AddObject(mod, "SymbolIter", (PyObject*)&zbarSymbolIter_Type); PyModule_AddObject(mod, "Processor", (PyObject*)&zbarProcessor_Type); PyModule_AddObject(mod, "ImageScanner", (PyObject*)&zbarImageScanner_Type); PyModule_AddObject(mod, "Decoder", (PyObject*)&zbarDecoder_Type); PyModule_AddObject(mod, "Scanner", (PyObject*)&zbarScanner_Type); for(ei = 0; ei < ZBAR_ERR_NUM; ei++) if(st->zbar_exc[ei]) PyModule_AddObject(mod, exc_names[ei] + 5, st->zbar_exc[ei]); /* add constants */ PyObject *dict = PyModule_GetDict(mod); st->color_enum[ZBAR_SPACE] = zbarEnumItem_New(dict, NULL, ZBAR_SPACE, "SPACE"); st->color_enum[ZBAR_BAR] = zbarEnumItem_New(dict, NULL, ZBAR_BAR, "BAR"); const enumdef *item; for(item = config_defs; item->strval; item++) zbarEnum_Add(st->config_enum, item->intval, item->strval); for(item = modifier_defs; item->strval; item++) zbarEnum_Add(st->modifier_enum, item->intval, item->strval); for(item = orient_defs; item->strval; item++) zbarEnum_Add(st->orient_enum, item->intval, item->strval); PyObject *tp_dict = zbarSymbol_Type.tp_dict; for(item = symbol_defs; item->strval; item++) zbarEnumItem_New(tp_dict, st->symbol_enum, item->intval, item->strval); st->symbol_NONE = zbarSymbol_LookupEnum(ZBAR_NONE); #if PY_MAJOR_VERSION >= 3 return mod; #endif } PyObject* zbarErr_Set (PyObject *self) { const void *zobj = ((zbarProcessor*)self)->zproc; zbar_error_t err = _zbar_get_error_code(zobj); struct module_state *st = GETMODSTATE(); if(err == ZBAR_ERR_NOMEM) PyErr_NoMemory(); else if(err < ZBAR_ERR_NUM) { PyObject *type = st->zbar_exc[err]; assert(type); PyErr_SetObject(type, self); } else PyErr_SetObject(st->zbar_exc[0], self); return(NULL); } zbar-0.23/python/enum.c0000664000175000017500000001626213471225716011767 00000000000000/*------------------------------------------------------------------------ * Copyright 2009-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "zbarmodule.h" static char enumitem_doc[] = PyDoc_STR( "simple enumeration item.\n" "\n" "associates an int value with a name for printing."); static zbarEnumItem* enumitem_new (PyTypeObject *type, PyObject *args, PyObject *kwds) { int val = 0; PyObject *name = NULL; static char *kwlist[] = { "value", "name", NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "iS", kwlist, &val, &name)) return(NULL); zbarEnumItem *self = (zbarEnumItem*)type->tp_alloc(type, 0); if(!self) return(NULL); #if PY_MAJOR_VERSION >= 3 PyLongObject *longval = (PyLongObject*)PyLong_FromLong(val); if (!longval) { Py_DECREF(self); return(NULL); } /* we assume the "fast path" for a single-digit ints (see longobject.c) */ /* this also holds if we get a small_int preallocated long */ Py_SIZE(&self->val) = Py_SIZE(longval); self->val.ob_digit[0] = longval->ob_digit[0]; Py_DECREF(longval); #else self->val.ob_ival = val; #endif self->name = name; return(self); } static void enumitem_dealloc (zbarEnumItem *self) { Py_CLEAR(self->name); ((PyObject*)self)->ob_type->tp_free((PyObject*)self); } static PyObject* enumitem_str (zbarEnumItem *self) { Py_INCREF(self->name); return(self->name); } static int enumitem_print (zbarEnumItem *self, FILE *fp, int flags) { return(self->name->ob_type->tp_print(self->name, fp, flags)); } static PyObject* enumitem_repr (zbarEnumItem *self) { PyObject *name = PyObject_Repr(self->name); if(!name) return(NULL); #if PY_MAJOR_VERSION >= 3 PyObject *repr = PyUnicode_FromFormat("%s(%ld, %U)", ((PyObject*)self)->ob_type->tp_name, PyLong_AsLong((PyObject *)self), name); #else char *namestr = PyString_AsString(name); PyObject *repr = PyString_FromFormat("%s(%ld, %s)", ((PyObject*)self)->ob_type->tp_name, self->val.ob_ival, namestr); #endif Py_DECREF(name); return((PyObject*)repr); } PyTypeObject zbarEnumItem_Type = { PyVarObject_HEAD_INIT(NULL, 0) .tp_name = "zbar.EnumItem", .tp_doc = enumitem_doc, .tp_basicsize = sizeof(zbarEnumItem), .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, .tp_new = (newfunc)enumitem_new, .tp_dealloc = (destructor)enumitem_dealloc, .tp_str = (reprfunc)enumitem_str, .tp_print = (printfunc)enumitem_print, .tp_repr = (reprfunc)enumitem_repr, }; zbarEnumItem* zbarEnumItem_New (PyObject *byname, PyObject *byvalue, int val, const char *name) { zbarEnumItem *self = PyObject_New(zbarEnumItem, &zbarEnumItem_Type); if(!self) return(NULL); #if PY_MAJOR_VERSION >= 3 PyLongObject *longval = (PyLongObject*)PyLong_FromLong(val); if (!longval) { Py_DECREF(self); return(NULL); } /* we assume the "fast path" for a single-digit ints (see longobject.c) */ /* this also holds if we get a small_int preallocated long */ Py_SIZE(&self->val) = Py_SIZE(longval); self->val.ob_digit[0] = longval->ob_digit[0]; Py_DECREF(longval); self->name = PyUnicode_FromString(name); #else self->val.ob_ival = val; self->name = PyString_FromString(name); #endif if(!self->name || (byname && PyDict_SetItem(byname, self->name, (PyObject*)self)) || (byvalue && PyDict_SetItem(byvalue, (PyObject*)self, (PyObject*)self))) { Py_DECREF((PyObject*)self); return(NULL); } return(self); } static char enum_doc[] = PyDoc_STR( "enumeration container for EnumItems.\n" "\n" "exposes items as read-only attributes"); /* FIXME add iteration */ static int enum_traverse (zbarEnum *self, visitproc visit, void *arg) { Py_VISIT(self->byname); Py_VISIT(self->byvalue); return(0); } static int enum_clear (zbarEnum *self) { Py_CLEAR(self->byname); Py_CLEAR(self->byvalue); return(0); } static void enum_dealloc (zbarEnum *self) { enum_clear(self); ((PyObject*)self)->ob_type->tp_free((PyObject*)self); } PyTypeObject zbarEnum_Type = { PyVarObject_HEAD_INIT(NULL, 0) .tp_name = "zbar.Enum", .tp_doc = enum_doc, .tp_basicsize = sizeof(zbarEnum), .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, .tp_dictoffset = offsetof(zbarEnum, byname), .tp_traverse = (traverseproc)enum_traverse, .tp_clear = (inquiry)enum_clear, .tp_dealloc = (destructor)enum_dealloc, }; zbarEnum* zbarEnum_New () { zbarEnum *self = PyObject_GC_New(zbarEnum, &zbarEnum_Type); if(!self) return(NULL); self->byname = PyDict_New(); self->byvalue = PyDict_New(); if(!self->byname || !self->byvalue) { Py_DECREF(self); return(NULL); } return(self); } int zbarEnum_Add (zbarEnum *self, int val, const char *name) { zbarEnumItem *item; item = zbarEnumItem_New(self->byname, self->byvalue, val, name); if(!item) return(-1); return(0); } zbarEnumItem* zbarEnum_LookupValue (zbarEnum *self, int val) { #if PY_MAJOR_VERSION >= 3 PyObject *key = PyLong_FromLong(val); #else PyObject *key = PyInt_FromLong(val); #endif zbarEnumItem *e = (zbarEnumItem*)PyDict_GetItem(self->byvalue, key); if(!e) return((zbarEnumItem*)key); Py_INCREF((PyObject*)e); Py_DECREF(key); return(e); } PyObject* zbarEnum_SetFromMask (zbarEnum *self, unsigned int mask) { PyObject *result = PySet_New(NULL); PyObject *key, *item; Py_ssize_t i = 0; while(PyDict_Next(self->byvalue, &i, &key, &item)) { #if PY_MAJOR_VERSION >= 3 unsigned long val = (unsigned long)PyLong_AsLong(item); #else int val = PyInt_AsLong(item); #endif if(val < sizeof(mask) * 8 && ((mask >> val) & 1)) PySet_Add(result, item); } return(result); } zbar-0.23/python/symboliter.c0000664000175000017500000000636213471225716013214 00000000000000/*------------------------------------------------------------------------ * Copyright 2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "zbarmodule.h" static char symboliter_doc[] = PyDoc_STR( "symbol iterator.\n" "\n" "iterates over decode results attached to an image."); static int symboliter_traverse (zbarSymbolIter *self, visitproc visit, void *arg) { Py_VISIT(self->syms); return(0); } static int symboliter_clear (zbarSymbolIter *self) { if(self->zsym) { zbar_symbol_t *zsym = (zbar_symbol_t*)self->zsym; self->zsym = NULL; zbar_symbol_ref(zsym, -1); } Py_CLEAR(self->syms); return(0); } static void symboliter_dealloc (zbarSymbolIter *self) { symboliter_clear(self); ((PyObject*)self)->ob_type->tp_free((PyObject*)self); } static zbarSymbolIter* symboliter_iter (zbarSymbolIter *self) { Py_INCREF(self); return(self); } static zbarSymbol* symboliter_iternext (zbarSymbolIter *self) { if(self->zsym) { zbar_symbol_t *zsym = (zbar_symbol_t*)self->zsym; zbar_symbol_ref(zsym, -1); self->zsym = zbar_symbol_next(self->zsym); } else if(self->syms->zsyms) self->zsym = zbar_symbol_set_first_symbol(self->syms->zsyms); else self->zsym = NULL; zbar_symbol_t *zsym = (zbar_symbol_t*)self->zsym; if(!zsym) return(NULL); zbar_symbol_ref(zsym, 1); return(zbarSymbol_FromSymbol(self->zsym)); } PyTypeObject zbarSymbolIter_Type = { PyVarObject_HEAD_INIT(NULL, 0) .tp_name = "zbar.SymbolIter", .tp_doc = symboliter_doc, .tp_basicsize = sizeof(zbarSymbolIter), .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, .tp_traverse = (traverseproc)symboliter_traverse, .tp_clear = (inquiry)symboliter_clear, .tp_dealloc = (destructor)symboliter_dealloc, .tp_iter = (getiterfunc)symboliter_iter, .tp_iternext = (iternextfunc)symboliter_iternext, }; zbarSymbolIter* zbarSymbolIter_FromSymbolSet (zbarSymbolSet *syms) { zbarSymbolIter *self; self = PyObject_GC_New(zbarSymbolIter, &zbarSymbolIter_Type); if(!self) return(NULL); Py_INCREF(syms); self->syms = syms; self->zsym = NULL; return(self); } zbar-0.23/python/zbarmodule.h0000664000175000017500000001156113471225716013171 00000000000000/*------------------------------------------------------------------------ * Copyright 2009-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #include #include #ifndef _ZBARMODULE_H_ #define _ZBARMODULE_H_ #if PY_MAJOR_VERSION < 3 typedef struct { PyBaseExceptionObject base; PyObject *obj; } zbarException; extern PyTypeObject zbarException_Type; #endif extern struct PyModuleDef zbar_moduledef; #if PY_MAJOR_VERSION >= 3 #define GETSTATE(m) ((struct module_state*)PyModule_GetState(m)) #define GETMODSTATE() (GETSTATE(PyState_FindModule(&zbar_moduledef))) #else extern struct module_state zbar_state; #define GETSTATE(m) (&zbar_state) #define GETMODSTATE() (&zbar_state) #endif extern PyObject *zbarErr_Set(PyObject *self); typedef struct { #if PY_MAJOR_VERSION >= 3 PyLongObject val; /* parent type is the long type */ #else PyIntObject val; /* integer value is super type */ #endif PyObject *name; /* associated string name */ } zbarEnumItem; extern PyTypeObject zbarEnumItem_Type; extern zbarEnumItem *zbarEnumItem_New(PyObject *byname, PyObject *byvalue, int val, const char *name); typedef struct { PyObject_HEAD PyObject *byname, *byvalue; /* zbarEnumItem content dictionaries */ } zbarEnum; extern PyTypeObject zbarEnum_Type; extern zbarEnum *zbarEnum_New(void); extern int zbarEnum_Add(zbarEnum *self, int val, const char *name); extern zbarEnumItem *zbarEnum_LookupValue(zbarEnum *self, int val); extern PyObject *zbarEnum_SetFromMask(zbarEnum *self, unsigned int mask); typedef struct { PyObject_HEAD zbar_image_t *zimg; PyObject *data; } zbarImage; extern PyTypeObject zbarImage_Type; extern zbarImage *zbarImage_FromImage(zbar_image_t *zimg); extern int zbarImage_validate(zbarImage *image); typedef struct { PyObject_HEAD const zbar_symbol_set_t *zsyms; } zbarSymbolSet; extern PyTypeObject zbarSymbolSet_Type; extern zbarSymbolSet* zbarSymbolSet_FromSymbolSet(const zbar_symbol_set_t *zsyms); #define zbarSymbolSet_Check(obj) PyObject_TypeCheck(obj, &zbarSymbolSet_Type) typedef struct { PyObject_HEAD const zbar_symbol_t *zsym; PyObject *data; PyObject *loc; } zbarSymbol; extern PyTypeObject zbarSymbol_Type; extern zbarSymbol *zbarSymbol_FromSymbol(const zbar_symbol_t *zsym); extern zbarEnumItem *zbarSymbol_LookupEnum(zbar_symbol_type_t type); typedef struct { PyObject_HEAD const zbar_symbol_t *zsym; zbarSymbolSet *syms; } zbarSymbolIter; extern PyTypeObject zbarSymbolIter_Type; extern zbarSymbolIter *zbarSymbolIter_FromSymbolSet(zbarSymbolSet *syms); typedef struct { PyObject_HEAD zbar_processor_t *zproc; PyObject *handler; PyObject *closure; } zbarProcessor; extern PyTypeObject zbarProcessor_Type; #define zbarProcessor_Check(obj) PyObject_TypeCheck(obj, &zbarProcessor_Type) typedef struct { PyObject_HEAD zbar_image_scanner_t *zscn; } zbarImageScanner; extern PyTypeObject zbarImageScanner_Type; typedef struct { PyObject_HEAD zbar_decoder_t *zdcode; PyObject *handler; PyObject *args; } zbarDecoder; extern PyTypeObject zbarDecoder_Type; typedef struct { PyObject_HEAD zbar_scanner_t *zscn; zbarDecoder *decoder; } zbarScanner; extern PyTypeObject zbarScanner_Type; extern int object_to_bool(PyObject *obj, int *val); extern int parse_dimensions(PyObject *seq, int *dims, int n); struct module_state { PyObject *zbar_exc[ZBAR_ERR_NUM]; zbarEnumItem *color_enum[2]; zbarEnum *config_enum; zbarEnum *modifier_enum; PyObject *symbol_enum; zbarEnumItem *symbol_NONE; zbarEnum *orient_enum; }; #endif zbar-0.23/python/test/0000775000175000017500000000000013471606255011710 500000000000000zbar-0.23/python/test/test_zbar.py0000775000175000017500000004355413471225716014214 00000000000000#!/usr/bin/env python import sys, os, re import unittest as ut import zbar # FIXME this needs to be conditional # would be even better to auto-select PIL or ImageMagick (or...) from PIL import Image data = None size = (0, 0) def load_image(): image = Image.open(os.path.join(sys.path[0], "barcode.png")).convert('L') return(image.tobytes(), image.size) # FIXME this could be integrated w/fixture creation (data, size) = load_image() encoded_widths = \ '9 111 212241113121211311141132 11111 311213121312121332111132 111 9' databar_widths = \ '11 31111333 13911 31131231 11214222 11553 21231313 1' VIDEO_DEVICE = None if 'VIDEO_DEVICE' in os.environ: VIDEO_DEVICE = os.environ['VIDEO_DEVICE'] is_identifier = re.compile(r'^[A-Z][A-Z_0-9]*$') class TestZBarFunctions(ut.TestCase): def test_version(self): ver = zbar.version() self.assertTrue(isinstance(ver, tuple)) self.assertEqual(len(ver), 2) for v in ver: self.assertTrue(isinstance(v, int)) def test_verbosity(self): zbar.increase_verbosity() zbar.set_verbosity(16) def test_exceptions(self): self.assertTrue(isinstance(zbar.Exception, type)) for err in (zbar.InternalError, zbar.UnsupportedError, zbar.InvalidRequestError, zbar.SystemError, zbar.LockingError, zbar.BusyError, zbar.X11DisplayError, zbar.X11ProtocolError, zbar.WindowClosed, zbar.WinAPIError): self.assertTrue(issubclass(err, zbar.Exception)) def test_configs(self): for cfg in (zbar.Config.ENABLE, zbar.Config.ADD_CHECK, zbar.Config.EMIT_CHECK, zbar.Config.ASCII, zbar.Config.MIN_LEN, zbar.Config.MAX_LEN, zbar.Config.UNCERTAINTY, zbar.Config.POSITION, zbar.Config.X_DENSITY, zbar.Config.Y_DENSITY): self.assertTrue(isinstance(cfg, zbar.EnumItem)) self.assertTrue(int(cfg) >= 0) self.assertTrue(is_identifier.match(str(cfg))) def test_modifiers(self): for mod in (zbar.Modifier.GS1, zbar.Modifier.AIM): self.assertTrue(isinstance(mod, zbar.EnumItem)) self.assertTrue(int(mod) >= 0) self.assertTrue(is_identifier.match(str(mod))) def test_symbologies(self): for sym in (zbar.Symbol.NONE, zbar.Symbol.PARTIAL, zbar.Symbol.EAN8, zbar.Symbol.UPCE, zbar.Symbol.ISBN10, zbar.Symbol.UPCA, zbar.Symbol.EAN13, zbar.Symbol.ISBN13, zbar.Symbol.DATABAR, zbar.Symbol.DATABAR_EXP, zbar.Symbol.I25, zbar.Symbol.CODABAR, zbar.Symbol.CODE39, zbar.Symbol.PDF417, zbar.Symbol.QRCODE, zbar.Symbol.CODE93, zbar.Symbol.CODE128): self.assertTrue(isinstance(sym, zbar.EnumItem)) self.assertTrue(int(sym) >= 0) self.assertTrue(is_identifier.match(str(sym))) def test_orientations(self): for orient in (zbar.Orient.UNKNOWN, zbar.Orient.UP, zbar.Orient.RIGHT, zbar.Orient.DOWN, zbar.Orient.LEFT): self.assertTrue(isinstance(orient, zbar.EnumItem)) self.assertTrue(-1 <= int(orient) <= 3) self.assertTrue(is_identifier.match(str(orient))) class TestScanner(ut.TestCase): def setUp(self): self.scn = zbar.Scanner() def tearDown(self): del(self.scn) def test_type(self): self.assertTrue(isinstance(self.scn, zbar.Scanner)) self.assertTrue(callable(self.scn.reset)) self.assertTrue(callable(self.scn.new_scan)) self.assertTrue(callable(self.scn.scan_y)) def set_color(color): self.scn.color = color self.assertRaises(AttributeError, set_color, zbar.BAR) def set_width(width): self.scn.width = width self.assertRaises(AttributeError, set_width, 1) # FIXME more scanner tests class TestDecoder(ut.TestCase): def setUp(self): self.dcode = zbar.Decoder() def tearDown(self): del(self.dcode) def test_type(self): self.assertTrue(isinstance(self.dcode, zbar.Decoder)) self.assertTrue(callable(self.dcode.set_config)) self.assertTrue(callable(self.dcode.parse_config)) self.assertTrue(callable(self.dcode.reset)) self.assertTrue(callable(self.dcode.new_scan)) self.assertTrue(callable(self.dcode.set_handler)) self.assertTrue(callable(self.dcode.decode_width)) def set_type(typ): self.dcode.type = typ self.assertRaises(AttributeError, set_type, zbar.Symbol.CODE128) def set_color(color): self.dcode.color = color self.assertRaises(AttributeError, set_color, zbar.BAR) def set_data(data): self.dcode.data = data self.assertRaises(AttributeError, set_data, 'yomama') self.assertRaises(AttributeError, self.dcode.__setattr__, 'direction', -1) def test_width(self): sym = self.dcode.decode_width(5) self.assertTrue(sym is zbar.Symbol.NONE) self.assertTrue(not sym) self.assertEqual(str(sym), 'NONE') typ = self.dcode.type self.assertTrue(sym is typ) def test_reset(self): self.assertTrue(self.dcode.color is zbar.SPACE) sym = self.dcode.decode_width(1) self.assertTrue(self.dcode.color is zbar.BAR) self.dcode.reset() self.assertTrue(self.dcode.color is zbar.SPACE) self.assertEqual(self.dcode.direction, 0) def test_decode(self): inline_sym = [ -1 ] def handler(dcode, closure): self.assertTrue(dcode is self.dcode) if dcode.type > zbar.Symbol.PARTIAL: inline_sym[0] = dcode.type closure[0] += 1 explicit_closure = [ 0 ] self.dcode.set_handler(handler, explicit_closure) self.dcode.set_config(zbar.Symbol.QRCODE, zbar.Config.ENABLE, 0) for (i, width) in enumerate(encoded_widths): if width == ' ': continue sym = self.dcode.decode_width(int(width)) if i < len(encoded_widths) - 1: self.assertTrue(sym is zbar.Symbol.NONE or sym is zbar.Symbol.PARTIAL) else: self.assertTrue(sym is zbar.Symbol.EAN13) self.assertEqual(self.dcode.configs, set((zbar.Config.ENABLE, zbar.Config.EMIT_CHECK))) self.assertEqual(self.dcode.modifiers, set()) self.assertEqual(self.dcode.data, '6268964977804') self.assertTrue(self.dcode.color is zbar.BAR) self.assertEqual(self.dcode.direction, 1) self.assertTrue(sym is zbar.Symbol.EAN13) self.assertTrue(inline_sym[0] is zbar.Symbol.EAN13) self.assertEqual(explicit_closure, [ 2 ]) def test_databar(self): self.dcode.set_config(zbar.Symbol.QRCODE, zbar.Config.ENABLE, 0) for (i, width) in enumerate(databar_widths): if width == ' ': continue sym = self.dcode.decode_width(int(width)) if i < len(databar_widths) - 1: self.assertTrue(sym is zbar.Symbol.NONE or sym is zbar.Symbol.PARTIAL) self.assertTrue(sym is zbar.Symbol.DATABAR) self.assertEqual(self.dcode.get_configs(zbar.Symbol.EAN13), set((zbar.Config.ENABLE, zbar.Config.EMIT_CHECK))) self.assertEqual(self.dcode.modifiers, set((zbar.Modifier.GS1,))) self.assertEqual(self.dcode.data, '0124012345678905') self.assertTrue(self.dcode.color is zbar.BAR) self.assertEqual(self.dcode.direction, 1) # FIXME test exception during callback class TestImage(ut.TestCase): def setUp(self): self.image = zbar.Image(123, 456, 'Y800') def tearDown(self): del(self.image) def test_type(self): self.assertTrue(isinstance(self.image, zbar.Image)) self.assertTrue(callable(self.image.convert)) def test_new(self): self.assertEqual(self.image.format, 'Y800') self.assertEqual(self.image.size, (123, 456)) self.assertEqual(self.image.crop, (0, 0, 123, 456)) image = zbar.Image() self.assertTrue(isinstance(image, zbar.Image)) self.assertEqual(image.format, '\0\0\0\0') self.assertEqual(image.size, (0, 0)) self.assertEqual(image.crop, (0, 0, 0, 0)) def test_format(self): def set_format(fmt): self.image.format = fmt self.assertRaises(ValueError, set_format, 10) self.assertEqual(self.image.format, 'Y800') self.image.format = 'gOOb' self.assertEqual(self.image.format, 'gOOb') self.assertRaises(ValueError, set_format, 'yomama') self.assertEqual(self.image.format, 'gOOb') self.assertRaises(ValueError, set_format, 'JPG') self.assertEqual(self.image.format, 'gOOb') def test_size(self): def set_size(sz): self.image.size = sz self.assertRaises(ValueError, set_size, (1,)) self.assertRaises(ValueError, set_size, 1) self.image.size = (12, 6) self.assertRaises(ValueError, set_size, (1, 2, 3)) self.assertEqual(self.image.size, (12, 6)) self.assertRaises(ValueError, set_size, "foo") self.assertEqual(self.image.size, (12, 6)) self.assertEqual(self.image.width, 12) self.assertEqual(self.image.height, 6) self.image.width = 81 self.assertEqual(self.image.size, (81, 6)) self.image.height = 64 self.assertEqual(self.image.size, (81, 64)) self.assertEqual(self.image.width, 81) self.assertEqual(self.image.height, 64) def test_crop(self): def set_crop(crp): self.image.crop = crp self.assertRaises(ValueError, set_crop, (1,)) self.assertRaises(ValueError, set_crop, 1) self.image.crop = (1, 2, 100, 200) self.assertRaises(ValueError, set_crop, (1, 2, 3, 4, 5)) self.assertEqual(self.image.crop, (1, 2, 100, 200)) self.assertRaises(ValueError, set_crop, "foo") self.assertEqual(self.image.crop, (1, 2, 100, 200)) self.image.crop = (-100, -100, 400, 700) self.assertEqual(self.image.crop, (0, 0, 123, 456)) self.image.crop = (40, 50, 60, 70) self.assertEqual(self.image.crop, (40, 50, 60, 70)) self.image.size = (82, 65) self.assertEqual(self.image.crop, (0, 0, 82, 65)) class TestImageScanner(ut.TestCase): def setUp(self): self.scn = zbar.ImageScanner() def tearDown(self): del(self.scn) def test_type(self): self.assertTrue(isinstance(self.scn, zbar.ImageScanner)) self.assertTrue(callable(self.scn.set_config)) self.assertTrue(callable(self.scn.parse_config)) self.assertTrue(callable(self.scn.enable_cache)) self.assertTrue(callable(self.scn.scan)) def test_set_config(self): self.scn.set_config() self.assertRaises(ValueError, self.scn.set_config, -1) self.assertRaises(TypeError, self.scn.set_config, "yomama") self.scn.set_config() def test_parse_config(self): self.scn.parse_config("disable") self.assertRaises(ValueError, self.scn.set_config, -1) self.scn.set_config() class TestImageScan(ut.TestCase): def setUp(self): self.scn = zbar.ImageScanner() self.image = zbar.Image(size[0], size[1], 'Y800', data) def tearDown(self): del(self.image) del(self.scn) def test_scan(self): n = self.scn.scan(self.image) self.assertEqual(n, 1) syms = self.image.symbols self.assertTrue(isinstance(syms, zbar.SymbolSet)) self.assertEqual(len(syms), 1) i = iter(self.image) j = iter(syms) self.assertTrue(isinstance(i, zbar.SymbolIter)) self.assertTrue(isinstance(j, zbar.SymbolIter)) symi = next(i) symj = next(j) self.assertRaises(StopIteration, i.__next__) self.assertRaises(StopIteration, j.__next__) # this is the only way to obtain a Symbol, # so test Symbol here for sym in (symi, symj): self.assertTrue(isinstance(sym, zbar.Symbol)) self.assertTrue(sym.type is zbar.Symbol.EAN13) self.assertTrue(sym.type is sym.EAN13) self.assertEqual(str(sym.type), 'EAN13') cfgs = sym.configs self.assertTrue(isinstance(cfgs, set)) for cfg in cfgs: self.assertTrue(isinstance(cfg, zbar.EnumItem)) self.assertEqual(cfgs, set((zbar.Config.ENABLE, zbar.Config.EMIT_CHECK))) mods = sym.modifiers self.assertTrue(isinstance(mods, set)) for mod in mods: self.assertTrue(isinstance(mod, zbar.EnumItem)) self.assertEqual(mods, set()) self.assertTrue(sym.quality > 0) self.assertEqual(sym.count, 0) # FIXME put a nice QR S-A in here comps = sym.components self.assertTrue(isinstance(comps, zbar.SymbolSet)) self.assertEqual(len(comps), 0) self.assertTrue(not comps) self.assertTrue(tuple(comps) is ()) data = sym.data self.assertEqual(data, '9876543210128') loc = sym.location self.assertTrue(len(loc) >= 4) # FIXME self.assertTrue(isinstance(loc, tuple)) for pt in loc: self.assertTrue(isinstance(pt, tuple)) self.assertEqual(len(pt), 2) # FIXME test values (API currently in flux) self.assertTrue(sym.orientation is zbar.Orient.UP) self.assertTrue(data is sym.data) self.assertTrue(loc is sym.location) def set_symbols(syms): self.image.symbols = syms self.assertRaises(TypeError, set_symbols, ()) self.scn.recycle(self.image) self.assertEqual(len(self.image.symbols), 0) def test_scan_crop(self): self.image.crop = (0, 71, 114, 9) self.assertEqual(self.image.crop, (0, 71, 114, 9)) n = self.scn.scan(self.image) self.assertEqual(n, 0) self.image.crop = (12, 24, 90, 12) self.assertEqual(self.image.crop, (12, 24, 90, 12)) n = self.scn.scan(self.image) self.assertEqual(n, 0) self.image.crop = (9, 24, 96, 12) self.assertEqual(self.image.crop, (9, 24, 96, 12)) self.test_scan() def test_scan_again(self): self.test_scan() class TestProcessor(ut.TestCase): def setUp(self): self.proc = zbar.Processor() def tearDown(self): del(self.proc) def test_type(self): self.assertTrue(isinstance(self.proc, zbar.Processor)) self.assertTrue(callable(self.proc.init)) self.assertTrue(callable(self.proc.set_config)) self.assertTrue(callable(self.proc.parse_config)) self.assertTrue(callable(self.proc.set_data_handler)) self.assertTrue(callable(self.proc.user_wait)) self.assertTrue(callable(self.proc.process_one)) self.assertTrue(callable(self.proc.process_image)) def test_set_config(self): self.proc.set_config() self.assertRaises(ValueError, self.proc.set_config, -1) self.assertRaises(TypeError, self.proc.set_config, "yomama") self.proc.set_config() def test_parse_config(self): self.proc.parse_config("disable") self.assertRaises(ValueError, self.proc.set_config, -1) self.proc.set_config() def test_request_size(self): def set_size(sz): self.proc.request_size = sz self.assertRaises(ValueError, set_size, (1,)) self.assertRaises(ValueError, set_size, 1) self.proc.request_size = (12, 6) self.assertRaises(ValueError, set_size, (1, 2, 3)) self.assertRaises(ValueError, set_size, "foo") def test_processing(self): self.proc.init(VIDEO_DEVICE) self.assertTrue(self.proc.visible is False) self.proc.visible = 1 self.assertTrue(self.proc.visible is True) self.assertEqual(self.proc.user_wait(1.1), 0) self.image = zbar.Image(size[0], size[1], 'Y800', data) count = [ 0 ] def data_handler(proc, image, closure): self.assertTrue(proc is self.proc) self.assertTrue(image is self.image) self.assertEqual(count[0], 0) count[0] += 1 symiter = iter(image) self.assertTrue(isinstance(symiter, zbar.SymbolIter)) syms = tuple(image) self.assertEqual(len(syms), 1) for sym in syms: self.assertTrue(isinstance(sym, zbar.Symbol)) self.assertTrue(sym.type is zbar.Symbol.EAN13) self.assertEqual(sym.data, '9876543210128') self.assertTrue(sym.quality > 0) self.assertTrue(sym.orientation is zbar.Orient.UP) closure[0] += 1 explicit_closure = [ 0 ] self.proc.set_data_handler(data_handler, explicit_closure) rc = self.proc.process_image(self.image) self.assertEqual(rc, 0) self.assertEqual(len(self.image.symbols), 1) del(self.image.symbols) self.assertEqual(len(self.image.symbols), 0) self.assertEqual(self.proc.user_wait(.9), 0) self.assertEqual(explicit_closure, [ 1 ]) self.proc.set_data_handler() if __name__ == '__main__': ut.main() zbar-0.23/python/test/barcode.png0000664000175000017500000000223613466560613013741 00000000000000‰PNG  IHDRrPo°éËgAMA± üasRGB®Îé cHRMz&€„ú€èu0ê`:˜pœºQ<bKGDª#2 pHYs=ƒ=ƒ‡è vpAgrPéƒL—äIDATxÚí•!hcA†£N–ƒªÂAd¡âÅgj 5º#&q¥*DÄDÄ”¸ÀQê*Ž˜@D]*ª …ˆºˆx"®„º˜¹gg÷í¾¼^¡Ç'fBÞ¾·»3;ßÌìn‰ ä„6ò/ËÓ´¶Ÿ‚6?3s:'^?ûÊÛvó³6^qw,ìËû•ù–I©²B/ò/ÉÓ´¶Ÿ‚6?3s:¯Ÿ}åm»ùY¯¸;öåýÊ|SH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TH…TÈÿ2ÑL~2ùËI!dòo3C&™|0“IróqÈ”–ø2Ï%÷§2žú™æmÅÿe4¶Ôë»/–”õRo9lãÝØJÆÂõÒÈŸßB¦4 kzÝ´òD}ñè=uñëá7Ãך†Ð[óœúÌØÒÛ¸âç–n¡=/ “{hÞ`ž“‘´kØŠu#3oûVÖ72ÁûôMÛäšèœZTõK…“0Ú¡SüÌB]†9¤1FËtA <Ö€j ïH‰´è+µi?ÀŒ³õ*5åûZô¶X£á­›@ï X Úú‚À˜@VàM‚ÕÞ…˜‘sÄewr& yüÄþŒ¸à¯\,M^ÔÉN8H“‹6¬C¶€Iø²ÖÛT½)s{ÌyCãH íy0áñ¢%?ælàß"ƒìÃ8E®„Ž,g³x'pÓ(Ÿ¯!˘¾*=æ`‹Å&ÁfŸ`4ËdRí9òfóå‰+ï“ÉÒ3lÖÜL†H‰±\C&k¨¼ß„½†ú›Z›O(™Ÿ¨ô”[|œØrMX÷5Á»‘o07a­9WÁ=9g×.Ù¹A8ªtUi„¸æ Ä'¡Ù¶u>Õü>$zD¥¬¸Šª˜Wõûx×ö£Rcdä¥3,8i뀑#ÉÆ™ÄíT Kqôgdô®•ÄM[ ûô–¤Öhç¸D™´AùíRæœ}æÍ°F[$K$Çìß•±™""ÖÌCÁÔS:Ãûr'u$$M ú.'c&íáTâ$\ÚkÅg1ƒŒ÷dùOÜ^ÛãÒ,¶>„å‘Ü%s¨”‘ÅÌÉJÃìÉš¤ÿPúWÐ2…Yæ…ªÈp3ç9g;|þU‚lçë¤Â!éåô¶°kN×Câ[È ¶G‹xXïX~y%»' Ú((4s“Ù=ð ý+a#]Iôƒ™—ž vwôÌ=9îɾž\ôä4ŸâmBïÉ/¥7«ˆ‚ì>IEND®B`‚zbar-0.23/python/processor.c0000664000175000017500000003071613471225716013042 00000000000000/*------------------------------------------------------------------------ * Copyright 2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include "zbarmodule.h" #ifdef HAVE_INTTYPES_H # include #endif static char processor_doc[] = PyDoc_STR( "low level decode of measured bar/space widths.\n" "\n" "FIXME."); static zbarProcessor* processor_new (PyTypeObject *type, PyObject *args, PyObject *kwds) { static char *kwlist[] = { "enable_threads", NULL }; int threaded = -1; if(!PyArg_ParseTupleAndKeywords(args, kwds, "|O&", kwlist, object_to_bool, &threaded)) return(NULL); #ifdef WITH_THREAD /* the processor creates a thread that calls back into python, * so we must ensure that threads are initialized before attempting * to manipulate the GIL (bug #3349199) */ PyEval_InitThreads(); #else if(threaded > 0 && PyErr_WarnEx(NULL, "threading requested but not available", 1)) return(NULL); threaded = 0; #endif zbarProcessor *self = (zbarProcessor*)type->tp_alloc(type, 0); if(!self) return(NULL); self->zproc = zbar_processor_create(threaded); zbar_processor_set_userdata(self->zproc, self); if(!self->zproc) { Py_DECREF(self); return(NULL); } return(self); } static int processor_traverse (zbarProcessor *self, visitproc visit, void *arg) { Py_VISIT(self->handler); Py_VISIT(self->closure); return(0); } static int processor_clear (zbarProcessor *self) { zbar_processor_set_data_handler(self->zproc, NULL, NULL); zbar_processor_set_userdata(self->zproc, NULL); Py_CLEAR(self->handler); Py_CLEAR(self->closure); return(0); } static void processor_dealloc (zbarProcessor *self) { processor_clear(self); zbar_processor_destroy(self->zproc); ((PyObject*)self)->ob_type->tp_free((PyObject*)self); } static PyObject* processor_get_bool (zbarProcessor *self, void *closure) { int val; switch((intptr_t)closure) { case 0: val = zbar_processor_is_visible(self->zproc); break; default: assert(0); return(NULL); } if(val < 0) return(zbarErr_Set((PyObject*)self)); return(PyBool_FromLong(val)); } static int processor_set_bool (zbarProcessor *self, PyObject *value, void *closure) { if(!value) { PyErr_SetString(PyExc_TypeError, "cannot delete attribute"); return(-1); } int rc, val = PyObject_IsTrue(value); if(val < 0) return(-1); switch((intptr_t)closure) { case 0: rc = zbar_processor_set_visible(self->zproc, val); break; case 1: rc = zbar_processor_set_active(self->zproc, val); break; default: assert(0); return(-1); } if(rc < 0) { zbarErr_Set((PyObject*)self); return(-1); } return(0); } static zbarSymbolSet* processor_get_results (zbarProcessor *self, void *closure) { const zbar_symbol_set_t *zsyms = zbar_processor_get_results(self->zproc); return(zbarSymbolSet_FromSymbolSet(zsyms)); } static int processor_set_request_size (zbarProcessor *self, PyObject *value, void *closure) { if(!value) { zbar_processor_request_size(self->zproc, 0, 0); return(0); } int dims[2]; if(parse_dimensions(value, dims, 2) || dims[0] < 0 || dims[1] < 0) { PyErr_SetString(PyExc_ValueError, "request_size must be a sequence of two positive ints"); return(-1); } zbar_processor_request_size(self->zproc, dims[0], dims[1]); return(0); } static PyGetSetDef processor_getset[] = { { "visible", (getter)processor_get_bool, (setter)processor_set_bool, NULL, (void*)0 }, { "active", NULL, (setter)processor_set_bool, NULL, (void*)1 }, { "results", (getter)processor_get_results, }, { "request_size", NULL, (setter)processor_set_request_size, }, { NULL, }, }; static PyObject* processor_set_config (zbarProcessor *self, PyObject *args, PyObject *kwds) { zbar_symbol_type_t sym = ZBAR_NONE; zbar_config_t cfg = ZBAR_CFG_ENABLE; int val = 1; static char *kwlist[] = { "symbology", "config", "value", NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "|iii", kwlist, &sym, &cfg, &val)) return(NULL); if(zbar_processor_set_config(self->zproc, sym, cfg, val)) { PyErr_SetString(PyExc_ValueError, "invalid configuration setting"); return(NULL); } Py_RETURN_NONE; } static PyObject* processor_init_ (zbarProcessor *self, PyObject *args, PyObject *kwds) { const char *dev = ""; int disp = 1; static char *kwlist[] = { "video_device", "enable_display", NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "|zO&", kwlist, &dev, object_to_bool, &disp)) return(NULL); if(zbar_processor_init(self->zproc, dev, disp)) return(zbarErr_Set((PyObject*)self)); Py_RETURN_NONE; } static PyObject* processor_parse_config (zbarProcessor *self, PyObject *args, PyObject *kwds) { const char *cfg = NULL; static char *kwlist[] = { "config", NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "s", kwlist, &cfg)) return(NULL); if(zbar_processor_parse_config(self->zproc, cfg)) { PyErr_Format(PyExc_ValueError, "invalid configuration setting: %s", cfg); return(NULL); } Py_RETURN_NONE; } static int object_to_timeout (PyObject *obj, int *val) { long tmp; if(PyFloat_Check(obj)) tmp = PyFloat_AS_DOUBLE(obj) * 1000; else #if PY_MAJOR_VERSION >= 3 tmp = PyLong_AsLong(obj) * 1000; #else tmp = PyInt_AsLong(obj) * 1000; #endif if(tmp < 0 && PyErr_Occurred()) return(0); *val = tmp; return(1); } static PyObject* processor_user_wait (zbarProcessor *self, PyObject *args, PyObject *kwds) { int timeout = -1; static char *kwlist[] = { "timeout", NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "|O&", kwlist, object_to_timeout, &timeout)) return(NULL); int rc = -1; Py_BEGIN_ALLOW_THREADS rc = zbar_processor_user_wait(self->zproc, timeout); Py_END_ALLOW_THREADS if(rc < 0) return(zbarErr_Set((PyObject*)self)); #if PY_MAJOR_VERSION >= 3 return(PyLong_FromLong(rc)); #else return(PyInt_FromLong(rc)); #endif } static PyObject* processor_process_one (zbarProcessor *self, PyObject *args, PyObject *kwds) { int timeout = -1; static char *kwlist[] = { "timeout", NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "|O&", kwlist, object_to_timeout, &timeout)) return(NULL); int rc = -1; Py_BEGIN_ALLOW_THREADS rc = zbar_process_one(self->zproc, timeout); Py_END_ALLOW_THREADS if(rc < 0) return(zbarErr_Set((PyObject*)self)); #if PY_MAJOR_VERSION >= 3 return(PyLong_FromLong(rc)); #else return(PyInt_FromLong(rc)); #endif } static PyObject* processor_process_image (zbarProcessor *self, PyObject *args, PyObject *kwds) { zbarImage *img = NULL; static char *kwlist[] = { "image", NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "O!", kwlist, &zbarImage_Type, &img)) return(NULL); if(zbarImage_validate(img)) return(NULL); int n = -1; Py_BEGIN_ALLOW_THREADS n = zbar_process_image(self->zproc, img->zimg); Py_END_ALLOW_THREADS if(n < 0) return(zbarErr_Set((PyObject*)self)); #if PY_MAJOR_VERSION >= 3 return(PyLong_FromLong(n)); #else return(PyInt_FromLong(n)); #endif } void process_handler (zbar_image_t *zimg, const void *userdata) { PyGILState_STATE gstate; gstate = PyGILState_Ensure(); zbarProcessor *self = (zbarProcessor*)userdata; assert(self); assert(self->handler); assert(self->closure); zbarImage *img = zbar_image_get_userdata(zimg); if(!img || img->zimg != zimg) { img = zbarImage_FromImage(zimg); if(!img) { PyErr_NoMemory(); goto done; } } else Py_INCREF(img); PyObject *args = PyTuple_New(3); Py_INCREF(self); Py_INCREF(self->closure); PyTuple_SET_ITEM(args, 0, (PyObject*)self); PyTuple_SET_ITEM(args, 1, (PyObject*)img); PyTuple_SET_ITEM(args, 2, self->closure); PyObject *junk = PyObject_Call(self->handler, args, NULL); if(junk) Py_DECREF(junk); else { PySys_WriteStderr("in ZBar Processor data_handler:\n"); assert(PyErr_Occurred()); PyErr_Print(); } Py_DECREF(args); done: PyGILState_Release(gstate); } static PyObject* processor_set_data_handler (zbarProcessor *self, PyObject *args, PyObject *kwds) { PyObject *handler = Py_None; PyObject *closure = Py_None; static char *kwlist[] = { "handler", "closure", NULL }; if(!PyArg_ParseTupleAndKeywords(args, kwds, "|OO", kwlist, &handler, &closure)) return(NULL); if(handler != Py_None && !PyCallable_Check(handler)) { PyErr_Format(PyExc_ValueError, "handler %.50s is not callable", handler->ob_type->tp_name); return(NULL); } Py_CLEAR(self->handler); Py_CLEAR(self->closure); if(handler != Py_None) { Py_INCREF(handler); self->handler = handler; Py_INCREF(closure); self->closure = closure; zbar_processor_set_data_handler(self->zproc, process_handler, self); } else { self->handler = self->closure = NULL; zbar_processor_set_data_handler(self->zproc, NULL, self); } Py_RETURN_NONE; } static PyMethodDef processor_methods[] = { { "init", (PyCFunction)processor_init_, METH_VARARGS | METH_KEYWORDS, }, { "set_config", (PyCFunction)processor_set_config, METH_VARARGS | METH_KEYWORDS, }, { "parse_config", (PyCFunction)processor_parse_config, METH_VARARGS | METH_KEYWORDS, }, { "user_wait", (PyCFunction)processor_user_wait, METH_VARARGS | METH_KEYWORDS, }, { "process_one", (PyCFunction)processor_process_one, METH_VARARGS | METH_KEYWORDS, }, { "process_image", (PyCFunction)processor_process_image, METH_VARARGS | METH_KEYWORDS, }, { "set_data_handler", (PyCFunction)processor_set_data_handler, METH_VARARGS | METH_KEYWORDS, }, { NULL, }, }; PyTypeObject zbarProcessor_Type = { PyVarObject_HEAD_INIT(NULL, 0) .tp_name = "zbar.Processor", .tp_doc = processor_doc, .tp_basicsize = sizeof(zbarProcessor), .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, .tp_new = (newfunc)processor_new, .tp_traverse = (traverseproc)processor_traverse, .tp_clear = (inquiry)processor_clear, .tp_dealloc = (destructor)processor_dealloc, .tp_getset = processor_getset, .tp_methods = processor_methods, }; zbar-0.23/doc/0000775000175000017500000000000013471606255010155 500000000000000zbar-0.23/doc/reldate.xml0000664000175000017500000000001313433653606012231 000000000000002017-04-11 zbar-0.23/doc/Makefile.am.inc0000664000175000017500000000274613471225716012711 00000000000000# documentation sources DOCSOURCES = doc/manual.xml doc/version.xml doc/reldate.xml \ doc/ref/zbarimg.xml doc/ref/zbarcam.xml doc/ref/commonoptions.xml MAINTAINERCLEANFILES += doc/man/man.stamp doc/version.xml doc/reldate.xml # man page targets to distribute and install dist_man_MANS = if HAVE_MAGICK dist_man_MANS += doc/man/zbarimg.1 endif if HAVE_VIDEO dist_man_MANS += doc/man/zbarcam.1 endif # witness to man page build (many-to-many workaround) man_stamp = doc/man/man.stamp # TBD add manual content #dist_doc_DATA = doc/zbar.pdf doc/zbar.html # distribute all documentation related files to avoid end-user rebuilds EXTRA_DIST += $(DOCSOURCES) $(man_stamp) EXTRA_DIST += doc/api/footer.html doc/style.xsl docs: $(dist_man_MANS) #dist_doc_DATA PHONY += docs doc_path = --searchpath $(abs_builddir)/doc -m $(abs_srcdir)/doc/style.xsl # xmlto --searchpath broken again... doc_path += --skip-validation #pdf: doc/zbar-manual.pdf #doc/zbar-manual.pdf: $(DOCSOURCES) # $(XMLTO) $(XMLTOFLAGS) -o doc pdf $< html-local: doc/html/index.html doc/html/index.html: $(DOCSOURCES) $(XMLTO) $(doc_path) $(XMLTOFLAGS) -o doc/html xhtml $< CLEANFILES += doc/html/*.html $(dist_man_MANS): $(man_stamp) @if test ! -f $@ ; then \ rm -f $(man_stamp) ; \ $(MAKE) $(AM_MAKEFLAGS) $(man_stamp) ; \ fi $(man_stamp): $(DOCSOURCES) @$(mkdir_p) doc/man 2>/dev/null @rm -f $(man_stamp).tmp @touch $(man_stamp).tmp $(XMLTO) $(doc_path) $(XMLTOFLAGS) -o doc/man man $< @mv $(man_stamp).tmp $(man_stamp) zbar-0.23/doc/man/0000775000175000017500000000000013471606255010730 500000000000000zbar-0.23/doc/man/man.stamp0000664000175000017500000000000013471602273012453 00000000000000zbar-0.23/doc/man/zbarcam.10000664000175000017500000002153713471602274012356 00000000000000'\" t .\" Title: zbarcam .\" Author: Jeff Brown .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 2017-04-11 .\" Manual: ZBar Barcode Reader .\" Source: zbar-0.23 .\" Language: English .\" .TH "ZBARCAM" "1" "2017-04-11" "zbar-0.23" "ZBar Barcode Reader" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zbarcam \- scan and decode bar codes from a video device .SH "SYNOPSIS" .HP \w'\fBzbarcam\fR\ 'u \fBzbarcam\fR [\fB\-qv\fR] [\fB\-\-quiet\fR] [\fB\-\-nodisplay\fR] [\fB\-\-xml\fR] [\fB\-\-verbose\fR\fB[=\fIn\fR]\fR] [\fB\-\-prescale=\fR\fB\fIW\fR\fR\fBx\fR\fB\fIH\fR\fR] [\fB\-S\fR\fB[\fIsymbology\fR\&.]\fR\fB\fIconfig\fR\fR\fB[=\fIvalue\fR]\fR] [\fB\-\-set\ \fR\fB[\fIsymbology\fR\&.]\fR\fB\fIconfig\fR\fR\fB[=\fIvalue\fR]\fR] [\fIdevice\fR] .HP \w'\fBzbarcam\fR\ 'u \fBzbarcam\fR {\fB\-h\fR | \fB\-\-help\fR | \fB\-\-version\fR} .SH "DESCRIPTION" .PP \fBzbarcam\fR scans a video4linux video source (eg, a webcam) for bar codes and prints any decoded data to the standard output\&. The video stream is also displayed to the screen\&. .PP \fIdevice\fR is the path to the video4linux (version 1 or 2) character device special file (major number 81 and minor number 0 thru 63)\&. It defaults to /dev/video0 .PP The underlying library currently supports EAN\-13 (including UPC and ISBN subsets), EAN\-8, DataBar, DataBar Expanded, Code 128, Code 93, Code 39, Codabar, Interleaved 2 of 5 and QR Code symbologies\&. The specific type of each detected symbol is printed with the decoded data\&. .SH "OPTIONS" .PP This program follows the usual GNU command line syntax\&. Single letter options may be bundled, long options start with two dashes (`\-\*(Aq)\&. .PP \fB\-h\fR, \fB\-\-help\fR .RS 4 Print a short help message describing command line options to standard output and exit .RE .PP \fB\-\-version\fR .RS 4 Print program version information to standard output and exit .RE .PP \fB\-v\fR, \fB\-\-verbose\fR\fB[=\fIn\fR]\fR .RS 4 Increase debug output level\&. Multiple \fB\-v\fR options create more spew\&. Alternatively specify \fIn\fR to set the debug level directly .RE .PP \fB\-S\fR\fB[\fIsymbology\fR\&.]\fR\fB\fIconfig\fR\fR\fB[=\fIvalue\fR]\fR, \fB\-\-set \fR\fB[\fIsymbology\fR\&.]\fR\fB\fIconfig\fR\fR\fB[=\fIvalue\fR]\fR .RS 4 Set decoder configuration option \fIconfig\fR for \fIsymbology\fR to \fIvalue\fR\&. \fIvalue\fR defaults to 1 if omitted\&. \fIsymbology\fR is one of \fBean13\fR, \fBean8\fR, \fBupca\fR, \fBupce\fR, \fBisbn13\fR, \fBisbn10\fR, \fBi25\fR, \fBcodabar\fR, \fBcode39\fR, \fBcode93\fR, \fBcode128\fR, \fBqrcode\fR or the special value \fB*\fR\&. If \fIsymbology\fR is omitted or \fB*\fR, the \fIconfig\fR will be set for all applicable symbologies\&. These are the currently recognized \fIconfig\fRs\&. Prefix a config with "no\-" to negate it\&. Not all configs are appropriate for every symbology\&. .PP \fBenable\fR .RS 4 Control decoding/reporting of a symbology\&. For symbologies which are just subsets of \fBean13\fR (\fBupca\fR, \fBupce\fR, \fBisbn13\fR, \fBisbn10\fR), this config controls whether the subsets are detected and reported as such\&. These special cases are disabled by default, all other symbologies default to enabled .RE .PP \fBdisable\fR .RS 4 Antonym for \fBenable\fR .RE .PP \fBemit\-check\fR .RS 4 Control whether check digits are included in the decoded output\&. Enabled by default\&. This config does not apply for \fBcode128\fR, which never returns the check digit\&. It also not apply for cases where the check digit is disabled (see \fBadd\-check\fR)\&. Check digits are currently not implemented for \fBi25\fR or \fBcode39\fR .RE .PP \fBadd\-check\fR .RS 4 Enable decode and verification of a check digit for symbologies where it is optional: this will include \fBcode39\fR and \fBi25\fR, neither of which implements the check digit yet .RE .PP \fBascii\fR .RS 4 Enable escape sequences that encode the full ASCII character set\&. This would apply to \fBcode39\fR, except that it\*(Aqs not implemented either\&.\&.\&. .RE .PP \fBposition\fR .RS 4 Enable collection of symbol position information\&. Enabled by default\&. Currently, the position information is unusable, so you can save a few cycles by disabling this\&. .RE .PP \fBtest\-inverted\fR .RS 4 Specially for QR code images, sometimes the image is inverted, e\&. g\&. lines are written in white instead of black\&. This option makes ZBar to invert the image and parse again, in case it fails using the normal order\&. Enabling it affects all decoders\&. .RE .PP \fBmin\-length=\fR\fB\fIn\fR\fR, \fBmax\-length=\fR\fB\fIn\fR\fR .RS 4 Bound the number of decoded characters in a valid symbol\&. If a decode result is outside the configured min/max range (inclusive), it will not be reported\&. Set to 0 to disable the corresponding check\&. This setting applies to variable\-length symbologies: \fBi25\fR, \fBcodabar\fR, \fBcode39\fR, \fBcode128\fR and \fBpdf417\fR\&. \fBmin\-length\fR defaults to 6 for \fBi25\fR and 1 for \fBcode39\fR (per Code 39 autodiscrimination recommendation); all others default to 0 .RE .PP \fBx\-density=\fR\fB\fIn\fR\fR, \fBy\-density=\fR\fB\fIn\fR\fR .RS 4 Adjust the density of the scanner passes\&. Lower values scan more of the image at the cost of decreased performance\&. Setting to 0 disables scanning along that axis\&. Defaults are both 1\&. .RE .RE .PP \fB\-q\fR, \fB\-\-quiet\fR .RS 4 Quiet operation; disable the audible beep otherwise emitted when a symbol is decoded .RE .PP \fB\-\-nodisplay\fR .RS 4 Disable output video window\&. Video input will be scanned until the program is interrupted or otherwise signaled .RE .PP \fB\-\-xml\fR .RS 4 Stream results using an XML output format\&. This format wraps the raw data from the symbol with information about the scan in an easy to parse format\&. The latest schema is available from \m[blue]\fB\%http://zbar.sourceforge.net/2008/barcode.xsd\fR\m[] .RE .PP \fB\-\-raw\fR .RS 4 Use raw symbol data output format\&. This format prints symbol data separated by newlines without the additional symbology type information that is printed by default .RE .PP \fB\-\-prescale=\fR\fB\fIW\fR\fR\fBx\fR\fB\fIH\fR\fR .RS 4 Request video input scaling from the camera driver\&. Possibly useful for reducing huge frames to achieve a higher frame rate\&. Note that the driver may adjust or completely ignore the scaling request .RE .SH "EXAMPLES" .PP Scan for barcodes using the second video device and pipe the resulting data through a script that searches for each code in a database and does something useful with them: .sp .if n \{\ .RS 4 .\} .nf \fBzbarcam\fR /dev/video1 | \fBupcrpc\&.py\fR .fi .if n \{\ .RE .\} .sp The \fBupcrpc\&.py\fR example script included in the examples/ subdirectory of the distribution will make an XMLRPC call to a popular internet UPC database and print the product description if found\&. .PP Scan for barcodes using the default video device and stream results to stdout in XML format, also disable recognition of Interleaved 2 of 5 codes to prevent confusion with other symbologies or background noise: .sp .if n \{\ .RS 4 .\} .nf \fBzbarcam\fR \fB\-\-xml\fR \fB\-Si25\&.disable\fR .fi .if n \{\ .RE .\} .PP Scan only for Code 39, without using the preview window \- maybe for a fixed installation\&. To enable only Code 39, first all symbologies are disabled, then Code 39 is re\-enabled: .sp .if n \{\ .RS 4 .\} .nf \fBzbarcam\fR \fB\-\-nodisplay\fR \fB\-Sdisable\fR \fB\-Scode39\&.enable\fR .fi .if n \{\ .RE .\} .sp .SH "EXIT STATUS" .PP \fBzbarcam\fR returns an exit code to indicate the status of the program execution\&. Current exit codes are: .PP 0 .RS 4 Successful program completion\&. .RE .PP 1 .RS 4 An error occurred\&. This includes bad arguments and I/O errors\&. .RE .PP 2 .RS 4 A fatal error occurred\&. .RE .SH "SEE ALSO" .PP zbarimg(1) .PP \m[blue]\fB\%http://zbar.sf.net/\fR\m[] .SH "BUGS" .PP See \m[blue]\fB\%http://sf.net/tracker/?group_id=189236&atid=928515\fR\m[] .SH "AUTHOR" .PP \fBJeff Brown\fR <\&spadix@users.sourceforge.net\&> .RS 4 Lead developer .RE .SH "COPYRIGHT" .br Copyright \(co 2007-2010 Jeff Brown .br .PP All Rights Reserved .sp zbar-0.23/doc/man/zbarimg.10000664000175000017500000002273213471602274012370 00000000000000'\" t .\" Title: zbarimg .\" Author: Jeff Brown .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 2017-04-11 .\" Manual: ZBar Barcode Reader .\" Source: zbar-0.23 .\" Language: English .\" .TH "ZBARIMG" "1" "2017-04-11" "zbar-0.23" "ZBar Barcode Reader" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zbarimg \- scan and decode bar codes from image file(s) .SH "SYNOPSIS" .HP \w'\fBzbarimg\fR\ 'u \fBzbarimg\fR [\fB\-qv\fR] [\fB\-\-quiet\fR] [\fB\-\-verbose\fR\fB[=\fIn\fR]\fR] .br {\fB\-dD\fR | \fB\-\-display\fR | \fB\-\-nodisplay\fR | \fB\-\-xml\fR | \fB\-\-noxml\fR | \fB\-S\fR\fB[\fIsymbology\fR\&.]\fR\fB\fIconfig\fR\fR\fB[=\fIvalue\fR]\fR | \fB\-\-set\ \fR\fB[\fIsymbology\fR\&.]\fR\fB\fIconfig\fR\fR\fB[=\fIvalue\fR]\fR | \fIimage\fR...} .HP \w'\fBzbarimg\fR\ 'u \fBzbarimg\fR {\fB\-h\fR | \fB\-\-help\fR | \fB\-\-version\fR} .SH "DESCRIPTION" .PP For each specified \fIimage\fR file \fBzbarimg\fR scans the image for bar codes and prints any decoded data to stdout\&. Images may optionally be displayed to the screen\&. .PP The underlying library currently supports EAN\-13 (including UPC and ISBN subsets), EAN\-8, DataBar, DataBar Expanded, Code 128, Code 93, Code 39, Codabar, Interleaved 2 of 5 and QR Code symbologies\&. The specific type of each detected symbol is printed with the decoded data\&. .PP Note that "\fIimage\fR" in this context refers to any format supported by ImageMagick, including many vector formats such as PDF and PostScript\&. Keep in mind that vector formats are rasterized before scanning; manually rasterize vector images before scanning to avoid unintentionally corrupting embedded barcode bitmaps\&. .SH "OPTIONS" .PP This program follows the usual GNU command line syntax\&. Single letter options may be bundled, long options start with two dashes (`\-\*(Aq)\&. .PP \fB\-h\fR, \fB\-\-help\fR .RS 4 Print a short help message describing command line options to standard output and exit .RE .PP \fB\-\-version\fR .RS 4 Print program version information to standard output and exit .RE .PP \fB\-v\fR, \fB\-\-verbose\fR\fB[=\fIn\fR]\fR .RS 4 Increase debug output level\&. Multiple \fB\-v\fR options create more spew\&. Alternatively specify \fIn\fR to set the debug level directly .RE .PP \fB\-S\fR\fB[\fIsymbology\fR\&.]\fR\fB\fIconfig\fR\fR\fB[=\fIvalue\fR]\fR, \fB\-\-set \fR\fB[\fIsymbology\fR\&.]\fR\fB\fIconfig\fR\fR\fB[=\fIvalue\fR]\fR .RS 4 Set decoder configuration option \fIconfig\fR for \fIsymbology\fR to \fIvalue\fR\&. \fIvalue\fR defaults to 1 if omitted\&. \fIsymbology\fR is one of \fBean13\fR, \fBean8\fR, \fBupca\fR, \fBupce\fR, \fBisbn13\fR, \fBisbn10\fR, \fBi25\fR, \fBcodabar\fR, \fBcode39\fR, \fBcode93\fR, \fBcode128\fR, \fBqrcode\fR or the special value \fB*\fR\&. If \fIsymbology\fR is omitted or \fB*\fR, the \fIconfig\fR will be set for all applicable symbologies\&. These are the currently recognized \fIconfig\fRs\&. Prefix a config with "no\-" to negate it\&. Not all configs are appropriate for every symbology\&. .PP \fBenable\fR .RS 4 Control decoding/reporting of a symbology\&. For symbologies which are just subsets of \fBean13\fR (\fBupca\fR, \fBupce\fR, \fBisbn13\fR, \fBisbn10\fR), this config controls whether the subsets are detected and reported as such\&. These special cases are disabled by default, all other symbologies default to enabled .RE .PP \fBdisable\fR .RS 4 Antonym for \fBenable\fR .RE .PP \fBemit\-check\fR .RS 4 Control whether check digits are included in the decoded output\&. Enabled by default\&. This config does not apply for \fBcode128\fR, which never returns the check digit\&. It also not apply for cases where the check digit is disabled (see \fBadd\-check\fR)\&. Check digits are currently not implemented for \fBi25\fR or \fBcode39\fR .RE .PP \fBadd\-check\fR .RS 4 Enable decode and verification of a check digit for symbologies where it is optional: this will include \fBcode39\fR and \fBi25\fR, neither of which implements the check digit yet .RE .PP \fBascii\fR .RS 4 Enable escape sequences that encode the full ASCII character set\&. This would apply to \fBcode39\fR, except that it\*(Aqs not implemented either\&.\&.\&. .RE .PP \fBposition\fR .RS 4 Enable collection of symbol position information\&. Enabled by default\&. Currently, the position information is unusable, so you can save a few cycles by disabling this\&. .RE .PP \fBtest\-inverted\fR .RS 4 Specially for QR code images, sometimes the image is inverted, e\&. g\&. lines are written in white instead of black\&. This option makes ZBar to invert the image and parse again, in case it fails using the normal order\&. Enabling it affects all decoders\&. .RE .PP \fBmin\-length=\fR\fB\fIn\fR\fR, \fBmax\-length=\fR\fB\fIn\fR\fR .RS 4 Bound the number of decoded characters in a valid symbol\&. If a decode result is outside the configured min/max range (inclusive), it will not be reported\&. Set to 0 to disable the corresponding check\&. This setting applies to variable\-length symbologies: \fBi25\fR, \fBcodabar\fR, \fBcode39\fR, \fBcode128\fR and \fBpdf417\fR\&. \fBmin\-length\fR defaults to 6 for \fBi25\fR and 1 for \fBcode39\fR (per Code 39 autodiscrimination recommendation); all others default to 0 .RE .PP \fBx\-density=\fR\fB\fIn\fR\fR, \fBy\-density=\fR\fB\fIn\fR\fR .RS 4 Adjust the density of the scanner passes\&. Lower values scan more of the image at the cost of decreased performance\&. Setting to 0 disables scanning along that axis\&. Defaults are both 1\&. .RE .RE .PP \fB\-q\fR, \fB\-\-quiet\fR .RS 4 Quiet operation; only output decoded symbol data\&. specifically this disables the statistics line printed (to stderr) before exiting, as well as the warning message printed (also to stderr) when no barcodes are found in an image .RE .PP \fB\-d\fR, \fB\-\-display\fR, \fB\-D\fR, \fB\-\-nodisplay\fR .RS 4 Enable/disable display of subsequent \fIimage\fR files, until next \fB\-\-display\fR or \fB\-\-nodisplay\fR is encountered\&. This option may appear multiple times to enable display of specific images\&. Image display is disabled by default .RE .PP \fB\-\-xml\fR, \fB\-\-noxml\fR .RS 4 Enable/disable result output using an XML format\&. This format wraps the raw data from the symbol with information about the scan (such as page indices) in an easy to parse format\&. The latest schema is available from \m[blue]\fB\%http://zbar.sourceforge.net/2008/barcode.xsd\fR\m[]\&. .RE .PP \fB\-\-raw\fR .RS 4 Enable raw symbol data output\&. This format prints symbol data separated by newlines without the additional symbology type information that is printed by default .RE .SH "EXAMPLES" .PP Scan a PNG image of a UPC bar code symbol and pass resulting data to a script that searches for the code in a database and does something useful with it: .sp .if n \{\ .RS 4 .\} .nf \fBzbarimg\fR product\&.png | \fBupcrpc\&.py\fR .fi .if n \{\ .RE .\} .sp The \fBupcrpc\&.py\fR example script included in the examples/ subdirectory of the distribution will make an XMLRPC call to a popular internet UPC database and print the product description if found\&. .PP Scan a JPEG image containing several barcodes and display the image in a window, also disabling recognition of Interleaved 2 of 5 codes to prevent confusion with other symbologies or background noise: .sp .if n \{\ .RS 4 .\} .nf \fBzbarimg\fR \fB\-\-display\fR \fB\-Si25\&.disable\fR label\&.jpg .fi .if n \{\ .RE .\} .PP Look in a scanned document only for Code 39, using XML output format so the page numbers are available\&. To enable only Code 39, first all symbologies are disabled, then Code 39 is re\-enabled: .sp .if n \{\ .RS 4 .\} .nf \fBzbarimg\fR \fB\-\-xml\fR \fB\-Sdisable\fR \fB\-Scode39\&.enable\fR scan\&.tiff .fi .if n \{\ .RE .\} .sp .SH "EXIT STATUS" .PP \fBzbarimg\fR returns an exit code to indicate the status of the program execution\&. Current exit codes are: .PP 0 .RS 4 Barcodes successfully detected in all images\&. Warnings may have been generated, but no errors\&. .RE .PP 1 .RS 4 An error occurred while processing some image(s)\&. This includes bad arguments, I/O errors and image handling errors from ImageMagick\&. .RE .PP 2 .RS 4 ImageMagick fatal error\&. .RE .PP 3 .RS 4 The user quit the program before all images were scanned\&. Only applies when running in interactive mode (with \fB\-\-display\fR) .RE .PP 4 .RS 4 No barcode was detected in one or more of the images\&. No other errors occurred\&. .RE .SH "SEE ALSO" .PP zbarcam(1) .PP \m[blue]\fB\%http://zbar.sf.net/\fR\m[] .SH "BUGS" .PP See \m[blue]\fB\%http://sf.net/tracker/?group_id=189236&atid=928515\fR\m[] .SH "AUTHOR" .PP \fBJeff Brown\fR <\&spadix@users.sourceforge.net\&> .RS 4 Lead developer .RE .SH "COPYRIGHT" .br Copyright \(co 2007-2010 Jeff Brown .br .PP All Rights Reserved .sp zbar-0.23/doc/doxygen.conf.in0000664000175000017500000000144713466560613013035 00000000000000PROJECT_NAME = "ZBar Bar Code Reader Library" PROJECT_NUMBER = "version @VERSION@" INPUT = @top_srcdir@/include RECURSIVE = YES EXCLUDE = @top_srcdir@/include/zbar/zbargtk.h EXCLUDE_PATTERNS = */.svn/* */.hg/* STRIP_FROM_PATH = @top_srcdir@ OUTPUT_DIRECTORY = doc/api CREATE_SUBDIRS = NO OUTPUT_LANGUAGE = English SOURCE_BROWSER = NO VERBATIM_HEADERS = NO TAB_SIZE = 4 JAVADOC_AUTOBRIEF = YES SUBGROUPING = NO SORT_MEMBER_DOCS = NO SORT_BRIEF_DOCS = NO TYPEDEF_HIDES_STRUCT = YES HIDE_FRIEND_COMPOUNDS = YES HIDE_IN_BODY_DOCS = YES INTERNAL_DOCS = NO MAX_INITIALIZER_LINES = 0 SHOW_INCLUDE_FILES = NO EXTRACT_STATIC = YES QUIET = YES WARNINGS = YES WARN_IF_UNDOCUMENTED = YES WARN_IF_DOC_ERROR = YES GENERATE_XML = YES HTML_HEADER = HTML_FOOTER = @top_srcdir@/doc/api/footer.html HTML_STYLESHEET = zbar-0.23/doc/style.xsl0000664000175000017500000000045413466560613011771 00000000000000 zbar-0.23/doc/api/0000775000175000017500000000000013471606255010726 500000000000000zbar-0.23/doc/api/footer.html0000664000175000017500000000140413471225700013021 00000000000000


spadix@users.sourceforge.net

Copyright 2008-2010 (c) Jeff Brown

This documentation is part of the ZBar Barcode Reader; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

zbar-0.23/doc/ref/0000775000175000017500000000000013471606255010731 500000000000000zbar-0.23/doc/ref/commonoptions.xml0000664000175000017500000001570113471225716014302 00000000000000 Print a short help message describing command line options to standard output and exit Print program version information to standard output and exit Increase debug output level. Multiple options create more spew. Alternatively specify n to set the debug level directly Set decoder configuration option config for symbology to value. value defaults to 1 if omitted. symbology is one of , , , , , , , , , , , or the special value . If symbology is omitted or , the config will be set for all applicable symbologies. These are the currently recognized configs. Prefix a config with "no-" to negate it. Not all configs are appropriate for every symbology. Control decoding/reporting of a symbology. For symbologies which are just subsets of (, , , ), this config controls whether the subsets are detected and reported as such. These special cases are disabled by default, all other symbologies default to enabled Antonym for Control whether check digits are included in the decoded output. Enabled by default. This config does not apply for , which never returns the check digit. It also not apply for cases where the check digit is disabled (see ). Check digits are currently not implemented for or Enable decode and verification of a check digit for symbologies where it is optional: this will include and , neither of which implements the check digit yet Enable escape sequences that encode the full ASCII character set. This would apply to , except that it's not implemented either... Enable collection of symbol position information. Enabled by default. Currently, the position information is unusable, so you can save a few cycles by disabling this. Specially for QR code images, sometimes the image is inverted, e. g. lines are written in white instead of black. This option makes ZBar to invert the image and parse again, in case it fails using the normal order. Enabling it affects all decoders. Bound the number of decoded characters in a valid symbol. If a decode result is outside the configured min/max range (inclusive), it will not be reported. Set to 0 to disable the corresponding check. This setting applies to variable-length symbologies: , , , and . defaults to 6 for and 1 for (per Code 39 autodiscrimination recommendation); all others default to 0 Adjust the density of the scanner passes. Lower values scan more of the image at the cost of decreased performance. Setting to 0 disables scanning along that axis. Defaults are both 1. zbar-0.23/doc/ref/zbarimg.xml0000664000175000017500000002020713471225700013017 00000000000000 zbarimg 1 zbarimg scan and decode bar codes from image file(s) zbarimg image zbarimg Description For each specified image file zbarimg scans the image for bar codes and prints any decoded data to stdout. Images may optionally be displayed to the screen. The underlying library currently supports EAN-13 (including UPC and ISBN subsets), EAN-8, DataBar, DataBar Expanded, Code 128, Code 93, Code 39, Codabar, Interleaved 2 of 5 and QR Code symbologies. The specific type of each detected symbol is printed with the decoded data. Note that "image" in this context refers to any format supported by ImageMagick, including many vector formats such as PDF and PostScript. Keep in mind that vector formats are rasterized before scanning; manually rasterize vector images before scanning to avoid unintentionally corrupting embedded barcode bitmaps. Options This program follows the usual GNU command line syntax. Single letter options may be bundled, long options start with two dashes (`-'). &refcommonoptions; Quiet operation; only output decoded symbol data. specifically this disables the statistics line printed (to stderr) before exiting, as well as the warning message printed (also to stderr) when no barcodes are found in an image Enable/disable display of subsequent image files, until next or is encountered. This option may appear multiple times to enable display of specific images. Image display is disabled by default Enable/disable result output using an XML format. This format wraps the raw data from the symbol with information about the scan (such as page indices) in an easy to parse format. The latest schema is available from . Enable raw symbol data output. This format prints symbol data separated by newlines without the additional symbology type information that is printed by default Examples Scan a PNG image of a UPC bar code symbol and pass resulting data to a script that searches for the code in a database and does something useful with it: zbarimg product.png | upcrpc.py The upcrpc.py example script included in the examples/ subdirectory of the distribution will make an XMLRPC call to a popular internet UPC database and print the product description if found. Scan a JPEG image containing several barcodes and display the image in a window, also disabling recognition of Interleaved 2 of 5 codes to prevent confusion with other symbologies or background noise: zbarimg label.jpg Look in a scanned document only for Code 39, using XML output format so the page numbers are available. To enable only Code 39, first all symbologies are disabled, then Code 39 is re-enabled: zbarimg scan.tiff Exit Status zbarimg returns an exit code to indicate the status of the program execution. Current exit codes are: 0 Barcodes successfully detected in all images. Warnings may have been generated, but no errors. 1 An error occurred while processing some image(s). This includes bad arguments, I/O errors and image handling errors from ImageMagick. 2 ImageMagick fatal error. 3 The user quit the program before all images were scanned. Only applies when running in interactive mode (with ) 4 No barcode was detected in one or more of the images. No other errors occurred. See Also Bugs See zbar-0.23/doc/ref/zbarcam.xml0000664000175000017500000001602013471225700013001 00000000000000 zbarcam 1 zbarcam scan and decode bar codes from a video device zbarcam device zbarcam Description zbarcam scans a video4linux video source (eg, a webcam) for bar codes and prints any decoded data to the standard output. The video stream is also displayed to the screen. device is the path to the video4linux (version 1 or 2) character device special file (major number 81 and minor number 0 thru 63). It defaults to /dev/video0 The underlying library currently supports EAN-13 (including UPC and ISBN subsets), EAN-8, DataBar, DataBar Expanded, Code 128, Code 93, Code 39, Codabar, Interleaved 2 of 5 and QR Code symbologies. The specific type of each detected symbol is printed with the decoded data. Options This program follows the usual GNU command line syntax. Single letter options may be bundled, long options start with two dashes (`-'). &refcommonoptions; Quiet operation; disable the audible beep otherwise emitted when a symbol is decoded Disable output video window. Video input will be scanned until the program is interrupted or otherwise signaled Stream results using an XML output format. This format wraps the raw data from the symbol with information about the scan in an easy to parse format. The latest schema is available from Use raw symbol data output format. This format prints symbol data separated by newlines without the additional symbology type information that is printed by default Request video input scaling from the camera driver. Possibly useful for reducing huge frames to achieve a higher frame rate. Note that the driver may adjust or completely ignore the scaling request Examples Scan for barcodes using the second video device and pipe the resulting data through a script that searches for each code in a database and does something useful with them: zbarcam /dev/video1 | upcrpc.py The upcrpc.py example script included in the examples/ subdirectory of the distribution will make an XMLRPC call to a popular internet UPC database and print the product description if found. Scan for barcodes using the default video device and stream results to stdout in XML format, also disable recognition of Interleaved 2 of 5 codes to prevent confusion with other symbologies or background noise: zbarcam Scan only for Code 39, without using the preview window - maybe for a fixed installation. To enable only Code 39, first all symbologies are disabled, then Code 39 is re-enabled: zbarcam Exit Status zbarcam returns an exit code to indicate the status of the program execution. Current exit codes are: 0 Successful program completion. 1 An error occurred. This includes bad arguments and I/O errors. 2 A fatal error occurred. See Also Bugs See zbar-0.23/doc/version.xml0000664000175000017500000000000513471602273012273 000000000000000.23 zbar-0.23/doc/manual.xml0000664000175000017500000000230513471225700012064 00000000000000 ]> ZBar Barcode Reader zbar-&version; &date; JeffBrown
spadix@users.sourceforge.net
Lead developer
2007 2008 2009 2010 Jeff Brown All Rights Reserved
Introduction ZBar Barcode Reader - Command Reference &refzbarcam; &refzbarimg;
zbar-0.23/zbar.nsi0000664000175000017500000002323513471225716011005 00000000000000#------------------------------------------------------------------------ # Copyright 2009 (c) Jeff Brown # # This file is part of the ZBar Bar Code Reader. # # The ZBar Bar Code Reader is free software; you can redistribute it # and/or modify it under the terms of the GNU Lesser Public License as # published by the Free Software Foundation; either version 2.1 of # the License, or (at your option) any later version. # # The ZBar Bar Code Reader 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 Lesser Public License for more details. # # You should have received a copy of the GNU Lesser Public License # along with the ZBar Bar Code Reader; if not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA # # http://sourceforge.net/projects/zbar #------------------------------------------------------------------------ !ifndef VERSION !define VERSION "test" !endif !ifndef PREFIX !define PREFIX "\usr\mingw32\usr" !endif !define ZBAR_KEY "Software\ZBar" !define UNINSTALL_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\ZBar" OutFile zbar-${VERSION}-setup.exe SetCompressor /SOLID bzip2 InstType "Typical" InstType "Full" InstallDir $PROGRAMFILES\ZBar InstallDirRegKey HKLM ${ZBAR_KEY} "InstallDir" !define SMPROG_ZBAR "$SMPROGRAMS\ZBar Bar Code Reader" Icon ${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico UninstallIcon ${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico # do we need admin to install uninstall info? #RequestExecutionLevel admin !include "MUI2.nsh" !include "Memento.nsh" Name "ZBar" Caption "ZBar ${VERSION} Setup" !define MEMENTO_REGISTRY_ROOT HKLM !define MEMENTO_REGISTRY_KEY ${UNINSTALL_KEY} !define MUI_ABORTWARNING !define MUI_FINISHPAGE_NOAUTOCLOSE !define MUI_UNFINISHPAGE_NOAUTOCLOSE !define MUI_ICON ${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico !define MUI_UNICON ${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico !define MUI_WELCOMEFINISHPAGE_BITMAP ${NSISDIR}\Contrib\Graphics\Wizard\orange.bmp !define MUI_UNWELCOMEFINISHPAGE_BITMAP ${NSISDIR}\Contrib\Graphics\Wizard\orange-uninstall.bmp !define MUI_HEADERIMAGE !define MUI_HEADERIMAGE_BITMAP ${NSISDIR}\Contrib\Graphics\Header\orange.bmp !define MUI_HEADERIMAGE_UNBITMAP ${NSISDIR}\Contrib\Graphics\Header\orange-uninstall.bmp !define MUI_WELCOMEPAGE_TITLE "Welcome to the ZBar ${VERSION} Setup Wizard" !define MUI_WELCOMEPAGE_TEXT \ "This wizard will guide you through the installation of the \ ZBar Bar Code Reader version ${VERSION}." !insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_LICENSE "share\doc\zbar\LICENSE.md" !define MUI_COMPONENTSPAGE_SMALLDESC !define MUI_COMPONENTSPAGE_CHECKBITMAP ${NSISDIR}\Contrib\Graphics\Checks\simple-round2.bmp !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES Function ShowREADME Exec '"notepad.exe" "$INSTDIR\README-windows.md"' FunctionEnd !define MUI_FINISHPAGE_NOREBOOTSUPPORT !define MUI_FINISHPAGE_SHOWREADME !define MUI_FINISHPAGE_SHOWREADME_FUNCTION ShowREADME !define MUI_FINISHPAGE_LINK \ "Visit the ZBar website for the latest news, FAQs and support" !define MUI_FINISHPAGE_LINK_LOCATION "https://github.com/mchehab/zbar" !insertmacro MUI_PAGE_FINISH !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES !insertmacro MUI_LANGUAGE "English" Section "ZBar Core Files (required)" SecCore DetailPrint "Installing ZBar Program and Library..." SectionIn 1 2 RO SetOutPath $INSTDIR File share\doc\zbar\README-windows.md File share\doc\zbar\NEWS.md File share\doc\zbar\TODO.md File share\doc\zbar\COPYING File share\doc\zbar\LICENSE.md # emit a batch file to add the install directory to the path FileOpen $0 zbarvars.bat w FileWrite $0 "@rem Add the ZBar installation directory to the path$\n" FileWrite $0 "@rem so programs may be run from the command prompt$\n" FileWrite $0 "@set PATH=%PATH%;$INSTDIR\bin$\n" FileWrite $0 "@cd /D $INSTDIR$\n" FileWrite $0 "@echo For basic command instructions type:$\n" FileWrite $0 "@echo zbarcam --help$\n" FileWrite $0 "@echo zbarimg --help$\n" FileWrite $0 "@echo Try running:$\n" FileWrite $0 "@echo zbarimg -d examples\barcode.png$\n" FileClose $0 SetOutPath $INSTDIR\bin File bin\libzbar-0.dll File bin\zbarimg.exe File bin\zbarcam.exe # dependencies File ${PREFIX}\bin\zlib1.dll File ${PREFIX}\bin\libjpeg-7.dll File ${PREFIX}\bin\libpng12-0.dll File ${PREFIX}\bin\libtiff-3.dll File ${PREFIX}\bin\libxml2-2.dll File ${PREFIX}\bin\libiconv-2.dll File ${PREFIX}\bin\libMagickCore-2.dll File ${PREFIX}\bin\libMagickWand-2.dll FileOpen $0 zbarcam.bat w FileWrite $0 "@set PATH=%PATH%;$INSTDIR\bin$\n" FileWrite $0 "@echo This is the zbarcam output window.$\n" FileWrite $0 "@echo Hold a bar code in front of the camera (make sure it's in focus!)$\n" FileWrite $0 "@echo and decoded results will appear below.$\n" FileWrite $0 "@echo.$\n" FileWrite $0 "@echo Initializing camera, please wait...$\n" FileWrite $0 "@echo.$\n" FileWrite $0 "@zbarcam.exe --prescale=640x480$\n" FileWrite $0 "@if errorlevel 1 pause$\n" FileClose $0 SetOutPath $INSTDIR\doc File share\doc\zbar\html\* SetOutPath $INSTDIR\examples File share\zbar\barcode.png SectionEnd #SectionGroup "Start Menu and Desktop Shortcuts" SecShortcuts Section "Start Menu Shortcuts" SecShortcutsStartMenu DetailPrint "Creating Start Menu Shortcuts..." SectionIn 1 2 SetOutPath "${SMPROG_ZBAR}" #CreateShortCut "${SMPROG_ZBAR}\ZBar.lnk" "$INSTDIR\ZBar.exe" CreateDirectory "${SMPROG_ZBAR}" CreateShortCut "zbarcam.lnk" "$\"$INSTDIR\bin\zbarcam.bat$\"" "" \ "$INSTDIR\bin\zbarcam.exe" ExpandEnvStrings $0 '%comspec%' CreateShortCut "ZBar Command Prompt.lnk" \ $0 "/k $\"$\"$INSTDIR\zbarvars.bat$\"$\"" $0 CreateShortCut "Command Reference.lnk" \ "$\"$INSTDIR\doc\ref.html$\"" SectionEnd # Section "Desktop Shortcut" SecShortcutsDesktop # DetailPrint "Creating Desktop Shortcut..." # SectionIn 1 2 # SetOutPath $INSTDIR # #CreateShortCut "$DESKTOP\ZBar.lnk" "$INSTDIR\ZBar.exe" # SectionEnd #SectionGroupEnd Section "Development Headers and Libraries" SecDevel DetailPrint "Installing ZBar Development Files..." SectionIn 2 SetOutPath $INSTDIR\include File include\zbar.h SetOutPath $INSTDIR\include\zbar File include\zbar\Video.h File include\zbar\Exception.h File include\zbar\Symbol.h File include\zbar\Image.h File include\zbar\ImageScanner.h File include\zbar\Window.h File include\zbar\Processor.h File include\zbar\Decoder.h File include\zbar\Scanner.h SetOutPath $INSTDIR\lib File lib\libzbar-0.def File lib\libzbar-0.lib File lib\libzbar.dll.a SetOutPath $INSTDIR\examples File share\zbar\scan_image.cpp File share\zbar\scan_image.vcproj SectionEnd Section -post DetailPrint "Creating Registry Keys..." SetOutPath $INSTDIR WriteRegStr HKLM ${ZBAR_KEY} "InstallDir" $INSTDIR # register uninstaller WriteRegStr HKLM ${UNINSTALL_KEY} "UninstallString" \ "$\"$INSTDIR\uninstall.exe$\"" WriteRegStr HKLM ${UNINSTALL_KEY} "QuietUninstallString" \ "$\"$INSTDIR\uninstall.exe$\" /S" WriteRegStr HKLM ${UNINSTALL_KEY} "InstallLocation" "$\"$INSTDIR$\"" WriteRegStr HKLM ${UNINSTALL_KEY} "DisplayName" "ZBar Bar Code Reader" WriteRegStr HKLM ${UNINSTALL_KEY} "DisplayIcon" "$INSTDIR\bin\zbarimg.exe,0" WriteRegStr HKLM ${UNINSTALL_KEY} "DisplayVersion" "${VERSION}" WriteRegStr HKLM ${UNINSTALL_KEY} "URLInfoAbout" "http://zbar.sf.net/" WriteRegStr HKLM ${UNINSTALL_KEY} "HelpLink" "http://zbar.sf.net/" WriteRegDWORD HKLM ${UNINSTALL_KEY} "NoModify" "1" WriteRegDWORD HKLM ${UNINSTALL_KEY} "NoRepair" "1" DetailPrint "Generating Uninstaller..." WriteUninstaller $INSTDIR\uninstall.exe SectionEnd Section Uninstall DetailPrint "Uninstalling ZBar Bar Code Reader.." DetailPrint "Deleting Files..." Delete $INSTDIR\examples\barcode.png Delete $INSTDIR\examples\scan_image.cpp Delete $INSTDIR\examples\scan_image.vcproj RMDir $INSTDIR\examples RMDir /r $INSTDIR\include RMDir /r $INSTDIR\doc RMDir /r $INSTDIR\lib RMDir /r $INSTDIR\bin Delete $INSTDIR\README-windows.md Delete $INSTDIR\NEWS.md Delete $INSTDIR\TODO.md Delete $INSTDIR\COPYING Delete $INSTDIR\LICENSE.md Delete $INSTDIR\zbarvars.bat Delete $INSTDIR\uninstall.exe RMDir $INSTDIR DetailPrint "Removing Shortcuts..." RMDir /r "${SMPROG_ZBAR}" DetailPrint "Deleting Registry Keys..." DeleteRegKey HKLM ${ZBAR_KEY} DeleteRegKey HKLM ${UNINSTALL_KEY} SectionEnd !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${SecCore} \ "The core files required to use the bar code reader" # !insertmacro MUI_DESCRIPTION_TEXT ${SecShortcuts} \ # "Adds icons to your start menu and/or your desktop for easy access" !insertmacro MUI_DESCRIPTION_TEXT ${SecShortcutsStartMenu} \ "Adds shortcuts to your start menu" # !insertmacro MUI_DESCRIPTION_TEXT ${SecShortcutsDesktop} \ # "Adds an icon on your desktop" !insertmacro MUI_DESCRIPTION_TEXT ${SecDevel} \ "Optional files used to develop other applications using ZBar" !insertmacro MUI_FUNCTION_DESCRIPTION_END zbar-0.23/qt/0000775000175000017500000000000013471606255010034 500000000000000zbar-0.23/qt/Makefile.am.inc0000664000175000017500000000126013471225716012556 00000000000000lib_LTLIBRARIES += qt/libzbarqt.la qt_libzbarqt_la_CPPFLAGS = -Iqt $(QT_CFLAGS) $(AM_CPPFLAGS) qt_libzbarqt_la_LDFLAGS = -version-info $(ZQT_LIB_VERSION) $(AM_LDFLAGS) $(LIBQT_EXTRA_LDFLAGS) qt_libzbarqt_la_LIBADD = $(QT_LIBS) zbar/libzbar.la $(AM_LIBADD) qt_libzbarqt_la_SOURCES = qt/QZBar.cpp qt/QZBarThread.h qt/QZBarThread.cpp nodist_qt_libzbarqt_la_SOURCES = qt/moc_QZBar.cpp qt/moc_QZBarThread.cpp BUILT_SOURCES += $(nodist_qt_libzbarqt_la_SOURCES) DISTCLEANFILES += $(nodist_qt_libzbarqt_la_SOURCES) clean-local: -rm -vf qt/moc_*.cpp qt/moc_%.cpp: qt/%.h $(MOC) $(qt_libzbarqt_la_CPPFLAGS) $< -o $@ qt/moc_%.cpp: include/zbar/%.h $(MOC) $(qt_libzbarqt_la_CPPFLAGS) $< -o $@ zbar-0.23/qt/QZBarThread.cpp0000664000175000017500000002131713471225716012572 00000000000000//------------------------------------------------------------------------ // Copyright 2008-2009 (c) Jeff Brown // // This file is part of the ZBar Bar Code Reader. // // The ZBar Bar Code Reader is free software; you can redistribute it // and/or modify it under the terms of the GNU Lesser Public License as // published by the Free Software Foundation; either version 2.1 of // the License, or (at your option) any later version. // // The ZBar Bar Code Reader 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 Lesser Public License for more details. // // You should have received a copy of the GNU Lesser Public License // along with the ZBar Bar Code Reader; if not, write to the Free // Software Foundation, Inc., 51 Franklin St, Fifth Floor, // Boston, MA 02110-1301 USA // // http://sourceforge.net/projects/zbar //------------------------------------------------------------------------ #include #include "QZBarThread.h" using namespace zbar; static const QString textFormat("%1:%2"); QZBarThread::QZBarThread (int verbosity) : _videoOpened(false), reqWidth(DEFAULT_WIDTH), reqHeight(DEFAULT_HEIGHT), video(NULL), image(NULL), running(true), videoRunning(false), videoEnabled(false) { zbar_set_verbosity(verbosity); scanner.set_handler(*this); } void QZBarThread::image_callback (Image &image) { for(Image::SymbolIterator sym = image.symbol_begin(); sym != image.symbol_end(); ++sym) if(!sym->get_count()) { QString data = QString::fromStdString(sym->get_data()); emit decoded(sym->get_type(), data); emit decodedText(textFormat.arg( QString::fromStdString(sym->get_type_name()), data)); } } void QZBarThread::processImage (Image &image) { { scanner.recycle_image(image); Image tmp = image.convert(*(long*)"Y800"); scanner.scan(tmp); image.set_symbols(tmp.get_symbols()); } window.draw(image); if(this->image && this->image != &image) { delete this->image; this->image = NULL; } emit update(); } void QZBarThread::enableVideo (bool enable) { if(!video) { videoRunning = videoEnabled = false; return; } try { scanner.enable_cache(enable); video->enable(enable); videoRunning = enable; } catch(std::exception &e) { std::cerr << "ERROR: " << e.what() << std::endl; } if(!enable) { // release video image and revert to logo clear(); emit update(); } } void QZBarThread::openVideo (const QString &device) { if(videoRunning) enableVideo(false); { QMutexLocker locker(&mutex); videoEnabled = _videoOpened = false; } // ensure old video doesn't have image ref // (FIXME handle video destroyed w/images outstanding) clear(); emit update(); if(video) { delete video; video = NULL; emit videoOpened(false); } if(device.isEmpty()) return; try { std::string devstr = device.toStdString(); video = new Video(devstr); if (reqWidth != DEFAULT_WIDTH || reqHeight != DEFAULT_HEIGHT) video->request_size(reqWidth, reqHeight); negotiate_format(*video, window); { QMutexLocker locker(&mutex); videoEnabled = _videoOpened = true; reqWidth = video->get_width(); reqHeight = video->get_height(); } currentDevice = device; emit videoOpened(true); } catch(std::exception &e) { std::cerr << "ERROR: " << e.what() << std::endl; emit videoOpened(false); } } void QZBarThread::videoDeviceEvent (VideoDeviceEvent *e) { openVideo(e->device); } void QZBarThread::videoEnabledEvent (VideoEnabledEvent *e) { if(videoRunning && !e->enabled) enableVideo(false); videoEnabled = e->enabled; } void QZBarThread::scanImageEvent (ScanImageEvent *e) { if(videoRunning) enableVideo(false); try { image = new QZBarImage(e->image); processImage(*image); } catch(std::exception &e) { std::cerr << "ERROR: " << e.what() << std::endl; clear(); } } bool QZBarThread::event (QEvent *e) { switch((EventType)e->type()) { case VideoDevice: videoDeviceEvent((VideoDeviceEvent*)e); break; case VideoEnabled: videoEnabledEvent((VideoEnabledEvent*)e); break; case ScanImage: scanImageEvent((ScanImageEvent*)e); break; case Exit: if(videoRunning) enableVideo(false); running = false; break; case ReOpen: openVideo(currentDevice); break; default: return(false); } return(true); } void QZBarThread::run () { QEvent *e = NULL; while(running) { if(!videoEnabled) { QMutexLocker locker(&mutex); while(queue.isEmpty()) newEvent.wait(&mutex); e = queue.takeFirst(); } else { // release reference to any previous QImage clear(); enableVideo(true); while(videoRunning && !e) { try { Image image = video->next_image(); processImage(image); } catch(std::exception &e) { std::cerr << "ERROR: " << e.what() << std::endl; enableVideo(false); openVideo(""); } QMutexLocker locker(&mutex); if(!queue.isEmpty()) e = queue.takeFirst(); } if(videoRunning) enableVideo(false); } if(e) { event(e); delete e; e = NULL; } } clear(); openVideo(""); } QVector< QPair< int , QString > > QZBarThread::get_menu(int index) { QVector< QPair< int , QString > > vector; struct video_controls_s *ctrl; if(!video) return vector; ctrl = video->get_controls(index); if (!ctrl) return vector; for (unsigned int i = 0; i < ctrl->menu_size; i++) vector.append(qMakePair((int)ctrl->menu[i].value, QString::fromUtf8(ctrl->menu[i].name))); return vector; } int QZBarThread::get_controls(int index, char **name, char **group, enum QZBar::ControlType *type, int *min, int *max, int *def, int *step) { struct video_controls_s *ctrl; if(!video) return 0; ctrl = video->get_controls(index); if (!ctrl) return 0; if (name) *name = ctrl->name; if (group) *group = ctrl->group; if (min) *min = ctrl->min; if (max) *max = ctrl->max; if (def) *def = ctrl->def; if (step) *step = ctrl->step; if (type) { switch (ctrl->type) { case VIDEO_CNTL_INTEGER: *type = QZBar::Integer; break; case VIDEO_CNTL_MENU: *type = QZBar::Menu; break; case VIDEO_CNTL_BUTTON: *type = QZBar::Button; break; case VIDEO_CNTL_INTEGER64: *type = QZBar::Integer64; break; case VIDEO_CNTL_STRING: *type = QZBar::String; break; case VIDEO_CNTL_BOOLEAN: *type = QZBar::Boolean; break; default: *type = QZBar::Unknown; break; } } return 1; } int QZBarThread::set_control(char *name, bool value) { if(!video) return 0; return video->set_control(name, value); } int QZBarThread::set_control(char *name, int value) { if(!video) return 0; return video->set_control(name, value); } int QZBarThread::get_control(char *name, bool *value) { if(!video) return 0; return video->get_control(name, value); } int QZBarThread::get_control(char *name, int *value) { if(!video) return 0; return video->get_control(name, value); } void QZBarThread::request_size(unsigned width, unsigned height) { reqWidth = width; reqHeight = height; } int QZBarThread::get_resolution(int index, unsigned &width, unsigned &height, float &max_fps) { struct video_resolution_s *res; if(!video) return 0; res = video->get_resolution(index); if (!res) return 0; width = res->width; height = res->height; max_fps = res->max_fps; return 1; } zbar-0.23/qt/QZBarThread.h0000664000175000017500000001221013471225716012227 00000000000000//------------------------------------------------------------------------ // Copyright 2008-2009 (c) Jeff Brown // // This file is part of the ZBar Bar Code Reader. // // The ZBar Bar Code Reader is free software; you can redistribute it // and/or modify it under the terms of the GNU Lesser Public License as // published by the Free Software Foundation; either version 2.1 of // the License, or (at your option) any later version. // // The ZBar Bar Code Reader 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 Lesser Public License for more details. // // You should have received a copy of the GNU Lesser Public License // along with the ZBar Bar Code Reader; if not, write to the Free // Software Foundation, Inc., 51 Franklin St, Fifth Floor, // Boston, MA 02110-1301 USA // // http://sourceforge.net/projects/zbar //------------------------------------------------------------------------ #ifndef _QZBARTHREAD_H_ #define _QZBARTHREAD_H_ #include #include #include #include #include #include #include #define DEFAULT_WIDTH 640 #define DEFAULT_HEIGHT 480 namespace zbar { class QZBarThread : public QThread, public Image::Handler { Q_OBJECT public: enum EventType { VideoDevice = QEvent::User, VideoEnabled, ScanImage, ReOpen, Exit = QEvent::MaxUser }; class VideoDeviceEvent : public QEvent { public: VideoDeviceEvent (const QString &device) : QEvent((QEvent::Type)VideoDevice), device(device) { } const QString device; }; class VideoEnabledEvent : public QEvent { public: VideoEnabledEvent (bool enabled) : QEvent((QEvent::Type)VideoEnabled), enabled(enabled) { } bool enabled; }; class ScanImageEvent : public QEvent { public: ScanImageEvent (const QImage &image) : QEvent((QEvent::Type)ScanImage), image(image) { } const QImage image; }; QMutex mutex; QWaitCondition newEvent; // message queue for events passed from main gui thread to processor. // (NB could(/should?) be QAbstractEventDispatcher except it doesn't // work as documented!? ): // protected by mutex QList queue; // shared state: // written by processor thread just after opening video or // scanning an image, read by main gui thread during size_request. // protected by mutex bool _videoOpened; unsigned reqWidth, reqHeight; // window is also shared: owned by main gui thread. // processor thread only calls draw(), clear() and negotiate_format(). // protected by its own internal lock Window window; QZBarThread(int verbosity = 0); int get_controls(int index, char **name = NULL, char **group = NULL, enum QZBar::ControlType *type = NULL, int *min = NULL, int *max = NULL, int *def = NULL, int *step = NULL); QVector< QPair< int , QString > > get_menu(int index); int set_control(char *name, bool value); int set_control(char *name, int value); int get_control(char *name, bool *value); int get_control(char *name, int *value); int set_config(std::string cfgstr) { return scanner.set_config(cfgstr); } int set_config(zbar_symbol_type_t symbology, zbar_config_t config, int value) { return scanner.set_config(symbology, config, value); } int get_config(zbar_symbol_type_t symbology, zbar_config_t config, int &value) { return scanner.get_config(symbology, config, value); } void request_size(unsigned width, unsigned height); int get_resolution(int index, unsigned &width, unsigned &height, float &max_fps); int request_dbus(bool enabled) { return scanner.request_dbus(enabled); } void pushEvent (QEvent *e) { QMutexLocker locker(&mutex); queue.append(e); newEvent.wakeOne(); } Q_SIGNALS: void videoOpened(bool opened); void update(); void decoded(int type, const QString &data); void decodedText(const QString &data); protected: void run(); void openVideo(const QString &device); void enableVideo(bool enable); void processImage(Image &image); void clear () { window.clear(); if(image) { delete image; image = NULL; } } virtual void image_callback(Image &image); virtual bool event(QEvent *e); virtual void videoDeviceEvent(VideoDeviceEvent *event); virtual void videoEnabledEvent(VideoEnabledEvent *event); virtual void scanImageEvent(ScanImageEvent *event); private: Video *video; ImageScanner scanner; QZBarImage *image; QString currentDevice; bool running; bool videoRunning; bool videoEnabled; }; }; #endif zbar-0.23/qt/QZBar.cpp0000664000175000017500000002172713471225716011447 00000000000000//------------------------------------------------------------------------ // Copyright 2008-2009 (c) Jeff Brown // // This file is part of the ZBar Bar Code Reader. // // The ZBar Bar Code Reader is free software; you can redistribute it // and/or modify it under the terms of the GNU Lesser Public License as // published by the Free Software Foundation; either version 2.1 of // the License, or (at your option) any later version. // // The ZBar Bar Code Reader 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 Lesser Public License for more details. // // You should have received a copy of the GNU Lesser Public License // along with the ZBar Bar Code Reader; if not, write to the Free // Software Foundation, Inc., 51 Franklin St, Fifth Floor, // Boston, MA 02110-1301 USA // // http://sourceforge.net/projects/zbar //------------------------------------------------------------------------ #include #include #include #include #include "QZBarThread.h" using namespace zbar; QZBar::QZBar (QWidget *parent, int verbosity) : QWidget(parent), thread(NULL), _videoDevice(), _videoEnabled(false), _attached(false) { setAttribute(Qt::WA_OpaquePaintEvent); setAttribute(Qt::WA_PaintOnScreen); #if QT_VERSION >= 0x040400 setAttribute(Qt::WA_NativeWindow); setAttribute(Qt::WA_DontCreateNativeAncestors); #endif QSizePolicy sizing(QSizePolicy::Preferred, QSizePolicy::Preferred); sizing.setHeightForWidth(true); setSizePolicy(sizing); thread = new QZBarThread (verbosity); if(testAttribute(Qt::WA_WState_Created)) { #if QT_VERSION >= 0x050000 thread->window.attach(QX11Info::display(), winId()); #else thread->window.attach(x11Info().display(), winId()); #endif _attached = 1; } connect(thread, SIGNAL(videoOpened(bool)), this, SIGNAL(videoOpened(bool))); connect(this, SIGNAL(videoOpened(bool)), this, SLOT(sizeChange())); connect(thread, SIGNAL(update()), this, SLOT(update())); connect(thread, SIGNAL(decoded(int, const QString&)), this, SIGNAL(decoded(int, const QString&))); connect(thread, SIGNAL(decodedText(const QString&)), this, SIGNAL(decodedText(const QString&))); thread->start(); } QZBar::~QZBar () { if(thread) { thread->pushEvent(new QEvent((QEvent::Type)QZBarThread::Exit)); thread->wait(); delete thread; thread = NULL; } } QPaintEngine *QZBar::paintEngine () const { return(NULL); } QString QZBar::videoDevice () const { return(_videoDevice); } void QZBar::setVideoDevice (const QString& videoDevice) { if(!thread) return; if(_videoDevice != videoDevice) { _videoDevice = videoDevice; _videoEnabled = _attached && !videoDevice.isEmpty(); if(_attached) thread->pushEvent(new QZBarThread::VideoDeviceEvent(videoDevice)); } } int QZBar::get_controls(int index, char **name, char **group, enum ControlType *type, int *min, int *max, int *def, int *step) { if(!thread) return 0; return thread->get_controls(index, name, group, type, min, max, def, step); } void QZBar::request_size(unsigned width, unsigned height, bool trigger) { if(!thread) return; thread->request_size(width, height); if (trigger) thread->pushEvent(new QEvent((QEvent::Type)QZBarThread::ReOpen)); } int QZBar::get_resolution(int index, unsigned &width, unsigned &height, float &max_fps) { if(!thread) return 0; return thread->get_resolution(index, width, height, max_fps); } unsigned QZBar::videoWidth() { if(!thread) return 0; return thread->reqWidth; } unsigned QZBar::videoHeight() { if(!thread) return 0; return thread->reqHeight; } QVector< QPair< int , QString > > QZBar::get_menu(int index) { if(!thread) { QVector< QPair< int , QString > > empty; return empty; } return thread->get_menu(index); } int QZBar::set_control(char *name, bool value) { if(!thread) return 0; return thread->set_control(name, value); } int QZBar::set_control(char *name, int value) { if(!thread) return 0; return thread->set_control(name, value); } int QZBar::get_control(char *name, bool *value) { if(!thread) return 0; return thread->get_control(name, value); } int QZBar::get_control(char *name, int *value) { if(!thread) return 0; return thread->get_control(name, value); } int QZBar::set_config(std::string cfgstr) { if(!thread) return 0; return thread->set_config(cfgstr); } int QZBar::set_config(zbar_symbol_type_t symbology, zbar_config_t config, int value) { if(!thread) return 0; return thread->set_config(symbology, config, value); } int QZBar::get_config(zbar_symbol_type_t symbology, zbar_config_t config, int &value) { if(!thread) return 0; return thread->get_config(symbology, config, value); } int QZBar::request_dbus(bool enabled) { if(!thread) return 0; return thread->request_dbus(enabled); } bool QZBar::isVideoEnabled () const { return(_videoEnabled); } void QZBar::setVideoEnabled (bool videoEnabled) { if(!thread) return; if(_videoEnabled != videoEnabled) { _videoEnabled = videoEnabled; thread->pushEvent(new QZBarThread::VideoEnabledEvent(videoEnabled)); } } bool QZBar::isVideoOpened () const { if(!thread) return(false); QMutexLocker locker(&thread->mutex); return(thread->_videoOpened); } void QZBar::scanImage (const QImage &image) { if(!thread) return; thread->pushEvent(new QZBarThread::ScanImageEvent(image)); } void QZBar::dragEnterEvent (QDragEnterEvent *event) { if(event->mimeData()->hasImage() || event->mimeData()->hasUrls()) event->acceptProposedAction(); } void QZBar::dropEvent (QDropEvent *event) { if(event->mimeData()->hasImage()) { QImage image = qvariant_cast(event->mimeData()->imageData()); scanImage(image); event->setDropAction(Qt::CopyAction); event->accept(); } else { // FIXME TBD load URIs and queue for processing #if 0 std::cerr << "drop: " << event->mimeData()->formats().join(", ").toStdString() << std::endl; QList urls = event->mimeData()->urls(); for(int i = 0; i < urls.size(); ++i) std::cerr << "[" << i << "] " << urls.at(i).toString().toStdString() << std::endl; #endif } } QSize QZBar::sizeHint () const { if(!thread) return(QSize(640, 480)); QMutexLocker locker(&thread->mutex); return(QSize(thread->reqWidth, thread->reqHeight)); } int QZBar::heightForWidth (int width) const { if(thread) { QMutexLocker locker(&thread->mutex); int base_width = thread->reqWidth; int base_height = thread->reqHeight; if(base_width > 0 && base_height > 0) return(base_height * width / base_width); } return(width * 3 / 4); } void QZBar::paintEvent (QPaintEvent *event) { try { if(thread) thread->window.redraw(); } catch(Exception&) { // sometimes Qt attempts to paint the widget before it's parented(?) // just ignore this (can't throw from event anyway) } } void QZBar::resizeEvent (QResizeEvent *event) { QSize size = event->size(); try { if(thread) thread->window.resize(size.rwidth(), size.rheight()); } catch(Exception&) { /* ignore */ } } void QZBar::changeEvent(QEvent *event) { try { QMutexLocker locker(&thread->mutex); if(event->type() == QEvent::ParentChange) #if QT_VERSION >= 0x050000 thread->window.attach(QX11Info::display(), winId()); #else thread->window.attach(x11Info().display(), winId()); #endif } catch(Exception&) { /* ignore (FIXME do something w/error) */ } } void QZBar::attach () { if(_attached) return; try { #if QT_VERSION >= 0x050000 thread->window.attach(QX11Info::display(), winId()); #else thread->window.attach(x11Info().display(), winId()); #endif thread->window.resize(width(), height()); _attached = 1; _videoEnabled = !_videoDevice.isEmpty(); if(_videoEnabled) thread->pushEvent(new QZBarThread::VideoDeviceEvent(_videoDevice)); } catch(Exception&) { /* ignore (FIXME do something w/error) */ } } void QZBar::showEvent (QShowEvent *event) { if(thread && !_attached) attach(); } void QZBar::sizeChange () { update(); updateGeometry(); } zbar-0.23/configure.ac0000664000175000017500000007673313471602170011626 00000000000000dnl Process this file with autoconf to produce a configure script. AC_PREREQ([2.68]) AC_INIT([zbar], [0.23], [mchehab+samsung@kernel.org]) m4_ifndef([AC_LANG_DEFINES_PROVIDED], [m4_define([AC_LANG_DEFINES_PROVIDED])]) AC_CONFIG_AUX_DIR(config) AC_CONFIG_MACRO_DIR(config) AM_INIT_AUTOMAKE([1.13 -Werror foreign subdir-objects std-options dist-bzip2]) m4_pattern_allow([AM_PROG_AR]) AC_CONFIG_HEADERS([include/config.h]) AC_CONFIG_SRCDIR(zbar/scanner.c) LT_PREREQ([2.2]) LT_INIT([dlopen win32-dll]) LT_LANG([Windows Resource]) AM_SILENT_RULES([yes]) dnl update these just before each release (along w/package version above) dnl LIB_VERSION update instructions copied from libtool docs: dnl library version follows the form current:revision:age dnl - If the library source code has changed at all since the last update, dnl then increment revision (c:r:a becomes c:r+1:a). dnl - If any interfaces have been added, removed, or changed, dnl increment current, and set revision to 0. dnl - If any interfaces have been added since the last public release, dnl then increment age. dnl - If any interfaces have been removed since the last public release, dnl then set age to 0. AC_SUBST([LIB_VERSION], [3:0:3]) AC_SUBST([RELDATE], [2017-04-11]) dnl widget libraries use their own versioning. dnl NB pygtk wrapper is *unversioned* AC_SUBST([ZGTK_LIB_VERSION], [0:2:0]) AC_SUBST([ZQT_LIB_VERSION], [1:2:1]) AC_DEFINE_UNQUOTED([ZBAR_VERSION_MAJOR], [[`echo "$PACKAGE_VERSION" | sed -e 's/\..*$//'`]], [Program major version (before the '.') as a number]) AC_DEFINE_UNQUOTED([ZBAR_VERSION_MINOR], [[`echo "$PACKAGE_VERSION" | sed -e 's/^[^\.]*\.\([^\.]*\).*/\1/'`]], [Program minor version (after '.') as a number]) AC_DEFINE_UNQUOTED([ZBAR_VERSION_PATCH], [[`echo "$PACKAGE_VERSION" | sed -e 's/^[^\.]*\.[^\.]*\.*//' | sed s,^$,0,`]], [Program patch version (after the second '.') as a number]) cur=`echo "$LIB_VERSION" | sed -e 's/:.*$//'` age=`echo "$LIB_VERSION" | sed -e 's/^.*://'` AC_DEFINE_UNQUOTED([LIB_VERSION_MAJOR], [[$(( $cur - $age ))]], [Library major version]) AC_DEFINE_UNQUOTED([LIB_VERSION_MINOR], [[$age]], [Library minor version]) AC_DEFINE_UNQUOTED([LIB_VERSION_REVISION], [[`echo "$LIB_VERSION" | sed -e 's/^[^:]*:\([^:]*\):.*$/\1/'`]], [Library revision]) AM_CPPFLAGS="-I\$(top_srcdir)/include" AM_CFLAGS="-Wall -Wno-parentheses" AM_CXXFLAGS="$AM_CFLAGS" AC_SUBST([AM_CPPFLAGS]) AC_SUBST([AM_CFLAGS]) AC_SUBST([AM_CXXFLAGS]) dnl windows build AC_CANONICAL_HOST case $host_os in *cygwin* | *mingw* | *uwin* | *djgpp* | *ems* ) win32="yes" with_dbus="no" AC_DEFINE([_WIN32_WINNT], [0x0500], [Minimum Windows API version]) AC_FUNC_ALLOCA AC_FUNC_ERROR_AT_LINE AC_FUNC_FSEEKO AC_CHECK_HEADERS([arpa/inet.h libintl.h malloc.h mntent.h netdb.h netinet/in.h shadow.h sys/file.h sys/mount.h sys/param.h sys/socket.h sys/statfs.h sys/statvfs.h sys/vfs.h unistd.h values.h]) ;; * ) win32="no" ;; esac AM_CONDITIONAL([WIN32], [test "x$win32" = "xyes"]) dnl programs AC_PROG_CC AM_PROG_CC_C_O AC_PROG_CXX PKG_PROG_PKG_CONFIG AC_ARG_VAR([XMLTO], [location of xmlto, used for optional \ documentation generation]) AC_ARG_VAR([XMLTOFLAGS], [additional arguments for xmlto]) AC_CHECK_PROGS([XMLTO], [xmlto], [:]) dnl symbologies AC_ARG_ENABLE([codes], [AS_HELP_STRING([--enable-codes=SYMS], [select symbologies to compile [default=ean,databar,code128,code93,code39,codabar,i25,qrcode,sqcode]])], [], [enable_codes="ean,databar,code128,code93,code39,codabar,i25,qrcode,sqcode"]) AC_DEFUN([AC_DEFINE_SUBST], [AC_DEFINE($1,$2,$3) AC_SUBST($1,$2)]) AC_DEFUN([ZBAR_CHK_CODE], [ AC_MSG_CHECKING([whether to build $2]) enable_$1="no" AH_TEMPLATE([ENABLE_]translit($1, a-z, A-Z), [whether to build support for $2]) AS_CASE([$enable_codes], [*$1* | *all*], [enable_$1="yes" enabled_codes="$enabled_codes $1" AC_DEFINE_SUBST([ENABLE_]translit($1, a-z, A-Z), [1]) ], [ disabled_codes="$disabled_codes $1" AC_DEFINE_SUBST([ENABLE_]translit($1, a-z, A-Z), [0]) ]) AM_CONDITIONAL([ENABLE_]translit($1, a-z, A-Z), [test "x$enable_$1" = "xyes"]) AC_MSG_RESULT([$enable_$1]) ])dnl ZBAR_CHK_CODE([ean], [EAN symbologies]) ZBAR_CHK_CODE([databar], [DataBar symbology]) ZBAR_CHK_CODE([code128], [Code 128 symbology]) ZBAR_CHK_CODE([code93], [Code 93 symbology]) ZBAR_CHK_CODE([code39], [Code 39 symbology]) ZBAR_CHK_CODE([codabar], [Codabar symbology]) ZBAR_CHK_CODE([i25], [Interleaved 2 of 5 symbology]) ZBAR_CHK_CODE([qrcode], [QR Code]) ZBAR_CHK_CODE([sqcode], [SQ Code]) ZBAR_CHK_CODE([pdf417], [PDF417 symbology (incomplete)]) dnl libraries AC_SEARCH_LIBS([clock_gettime], [rt pthread]) AM_ICONV() dnl libraries linkage AC_ARG_ENABLE([static_qt], [AS_HELP_STRING([--enable-static-qt], [Produce a static library for libzbarcam-qt])]) AS_IF([test x$enable_static_qt = xyes], [AC_SUBST([LIBQT_EXTRA_LDFLAGS], ["-static"])]) dnl poll support AC_CHECK_HEADERS([poll.h], [have_poll="yes"], [have_poll="no"]) AM_CONDITIONAL([HAVE_POLL], [test "x$have_poll" = "xyes"]) dnl pthreads dnl FIXME this doesn't port well, integrate something like this: dnl http://autoconf-archive.cryp.to/acx_pthread.html AC_ARG_ENABLE([pthread], [AS_HELP_STRING([--disable-pthread], [omit support for threaded applications])], [], [AS_IF([test "x$win32" = "xno"], [enable_pthread="yes"], [enable_pthread="no" ])]) AS_IF([test "x$enable_pthread" != "xno"], [AC_CHECK_HEADERS([pthread.h], [], [AC_MSG_FAILURE([test for pthread support failed! configure --disable-pthread to skip threaded support.])]) AC_CHECK_LIB([pthread], [pthread_create], [], [AC_MSG_FAILURE([unable to link against -lpthread, although you appear to have pthread.h? set LDFLAGS and/or LIBS to help the linker, or configure --disable-pthread to skip threaded support.])]) AC_DEFINE([__USE_UNIX98], [1], [used only for pthread debug attributes]) ]) dnl doc AC_ARG_ENABLE([doc], [AS_HELP_STRING([--disable-doc], [disable building docs])], [], [enable_doc="yes"]) AM_CONDITIONAL([HAVE_DOC], [test "x$enable_doc" != "xno"]) dnl video AC_ARG_ENABLE([video], [AS_HELP_STRING([--disable-video], [exclude video scanner features])], [], [enable_video="yes"]) dnl video, directshow AC_ARG_WITH([directshow], [AS_HELP_STRING([--with-directshow], [compile directshow driver on windows instead of vfw, available only when video support is enabled])], [], [with_directshow="no"]) have_v4l1="no" have_v4l2="no" have_libv4l="no" AS_IF([test "x$enable_video" = "xno"], [], [test "x$win32" = "xno"], [AC_CHECK_HEADERS([linux/videodev.h], [have_v4l1="yes"]) AC_CHECK_HEADERS([linux/videodev2.h], [have_v4l2="yes"]) AC_CHECK_HEADERS([libv4l2.h], [have_libv4l="yes"]) AS_IF([test "x$have_v4l2" = "xno" && test "x$have_v4l1" = "xno"], [AC_MSG_FAILURE([test for video support failed! rebuild your kernel to include video4linux support or configure --disable-video to skip building video support.])], [AS_IF([test "x$have_v4l2" = "xno"], [AC_MSG_WARN([v4l2 API not detected, upgrade your kernel!])])] )], [AS_IF([test "x$with_directshow" != "xno"], [with_video="directshow"], [AC_CHECK_HEADERS([vfw.h], [with_video="vfw"], [AC_MSG_FAILURE([test for VfW video support failed! configure --disable-video to skip building video support.])],[#include ])])]) AS_IF([test "x$have_libv4l" = "xyes"], [PKG_CHECK_MODULES([V4L2], [libv4l2], [], [AC_MSG_FAILURE([unable to find libv4l2.so])])], [AC_MSG_WARN([libv4l not detected. Install it to support more cameras!])]) AM_CONDITIONAL([HAVE_VIDEO], [test "x$enable_video" != "xno"]) AM_CONDITIONAL([HAVE_V4L1], [test "x$have_v4l1" != "xno"]) AM_CONDITIONAL([HAVE_V4L2], [test "x$have_v4l2" != "xno"]) AM_CONDITIONAL([HAVE_LIBV4L], [test "x$have_libv4l" != "xno"]) AM_CONDITIONAL([WITH_DIRECTSHOW], [test "x$with_directshow" != "xno"]) dnl X AC_ARG_VAR([XSHM_LIBS], [linker flags for X shared memory extension]) AS_IF([test "x$win32" != "xno"], [have_x="no"], [AC_PATH_XTRA AH_BOTTOM([#ifndef X_DISPLAY_MISSING # define HAVE_X #endif ])]) AM_CONDITIONAL([HAVE_X], [test "x$have_x" = "xyes"]) AS_IF([test "x$XSHM_LIBS" = "x"], [XSHM_LIBS="-lXext"]) AC_ARG_WITH([xshm], [AS_HELP_STRING([--without-xshm], [disable support for X shared memory extension])], [], [with_xshm="check"]) AS_IF([test "x$with_xshm" != "xno"], [AC_CHECK_HEADERS([X11/extensions/XShm.h], [with_xshm="yes"], [AS_IF([test "x$with_xshm" = "xcheck"], [with_xshm="no"], [AC_MSG_FAILURE([test for X shared memory extension failed! install the X shared memory extension, specify --x-includes or configure --without-xshm to disable the extension])])], [[#include #include #include ]]) AS_IF([test "x$with_xshm" != "xno"], [AC_CHECK_LIB([Xext], [XShmQueryVersion], [with_xshm="yes"], [AC_MSG_FAILURE([unable to find XShmQueryVersion in $XSHM_LIBS! specify XSHM_LIBS or configure --without-xshm to disable the extension])], ["$X_LIBS" "$X_PRE_LIBS" -lX11 "$X_EXTRA_LIBS" "$XSHM_LIBS"]) ]) ]) AM_CONDITIONAL([HAVE_XSHM], [test "x$with_xshm" = "xyes"]) AC_ARG_VAR([XV_LIBS], [linker flags for XVideo extension]) AS_IF([test "x$XV_LIBS" = "x"], [XV_LIBS="-lXv"]) AC_ARG_WITH([xv], [AS_HELP_STRING([--without-xv], [disable support for XVideo extension])], [], [with_xv="check"]) AS_IF([test "x$with_xv" != "xno"], [AC_CHECK_HEADERS([X11/extensions/Xvlib.h], [with_xv="yes"], [AS_IF([test "x$with_xv" = "xcheck"], [with_xv="no"], [AC_MSG_FAILURE([test for XVideo extension failed! install the XVideo extension, specify --x-includes or configure --without-xv to disable the extension])])], [[#include ]]) AS_IF([test "x$with_xv" != "xno"], [AC_CHECK_LIB([Xv], [XvQueryExtension], [with_xv="yes"], [AC_MSG_FAILURE([unable to find XvQueryExtension in $XV_LIBS! specify XV_LIBS or configure --without-xv to disable the extension])], ["$X_LIBS" "$X_PRE_LIBS" -lX11 "$X_EXTRA_LIBS" "$XV_LIBS"]) ]) ]) AM_CONDITIONAL([HAVE_XV], [test "x$with_xv" = "xyes"]) dnl dbus AC_ARG_WITH([dbus], [AS_HELP_STRING([--without-dbus], [disable support for dbus])], [], [with_dbus="check"]) AS_IF([test "x$with_dbus" != "xno"], [PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0, have_dbus="yes", have_dbus="no") AS_IF([test "x$have_dbus$with_dbus" = "xnoyes"], [AC_MSG_FAILURE([DBus development libraries not found])], [with_dbus="$have_dbus"]) ]) AM_CONDITIONAL([HAVE_DBUS], [test "x$with_dbus" = "xyes"]) AS_IF([test "x$with_dbus" = "xyes"], [CPPFLAGS="$CPPFLAGS $DBUS_CFLAGS" AC_ARG_VAR([DBUS_LIBS], [linker flags for building dbus]) AC_DEFINE([HAVE_DBUS], [1], [Define to 1 to use dbus]) AC_ARG_WITH(dbusconfdir, AC_HELP_STRING([--with-dbusconfdir=PATH], [path to D-Bus config directory]), [path_dbusconf=$withval], [path_dbusconf="`$PKG_CONFIG --variable=sysconfdir dbus-1`"]) AS_IF([test -z "$path_dbusconf"], DBUS_CONFDIR="$sysconfdir/dbus-1/system.d", DBUS_CONFDIR="$path_dbusconf/dbus-1/system.d") AC_SUBST(DBUS_CONFDIR) ]) dnl libjpeg AC_ARG_WITH([jpeg], [AS_HELP_STRING([--without-jpeg], [disable support for JPEG image conversions])], [], [with_jpeg="check"]) have_jpeg="maybe" AS_IF([test "x$with_jpeg" != "xno"], [AC_CHECK_HEADERS([jpeglib.h], [], [have_jpeg="no"]) AC_CHECK_HEADER([jerror.h], [], [have_jpeg="no"]) AC_CHECK_LIB([jpeg], [jpeg_read_header], [], [have_jpeg="no"]) AS_IF([test "x$have_jpeg" != "xno"], [with_jpeg="yes"], [test "x$with_jpeg" = "xyes"], [AC_MSG_FAILURE([unable to find libjpeg! ensure CFLAGS/LDFLAGS are set appropriately or configure --without-jpeg])], [with_jpeg="no"]) ]) AM_CONDITIONAL([HAVE_JPEG], [test "x$with_jpeg" = "xyes"]) dnl ImageMagick or GraphicsMagick dnl disable both if IM is explicitly disabled to preserve old behavior AC_ARG_WITH([imagemagick], [AS_HELP_STRING([--without-imagemagick], [disable support for scanning images with ImageMagick])], [], [with_imagemagick="check"]) AC_ARG_WITH([graphicsmagick], [AS_HELP_STRING([--with-graphicsmagick], [use GraphicsMagick alternative to ImageMagick])], [], [with_graphicsmagick="check"]) magick="UnknownMagick" have_IM="maybe" AS_IF([test "x$with_imagemagick" = "xno"], [], [test "x$with_imagemagick" = "xyes" || \ test "x$with_graphicsmagick" != "xyes"], [looked_for="ImageMagick >= 6.2.6" PKG_CHECK_MODULES([MAGICK], [MagickWand >= 6.2.6], [MAGICK_VERSION=`$PKG_CONFIG MagickWand --modversion`], [dnl dnl Wand is deprecated in favor of MagickWand, dnl but the latter doesn't exist in older versions (bug #2848437) saved_error=$MAGICK_PKG_ERRORS PKG_CHECK_MODULES([MAGICK], [Wand >= 6.2.6], [MAGICK_VERSION=`$PKG_CONFIG Wand --modversion`], [have_IM="no"])]) AS_IF([test "x$have_IM" != "xno"], [magick="ImageMagick" AC_MSG_NOTICE([trying ImageMagick version $MAGICK_VERSION]) dnl double check ImageMagick install (bug #2582232) CPPFLAGS_save="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $MAGICK_CFLAGS" AC_CHECK_HEADER([wand/MagickWand.h], [have_IM="yes"], [have_IM="broken"]) dnl check for ImageMagick 7, see https://imagemagick.org/script/porting.php#headers AS_IF([test "x$have_IM" = "xbroken"], [ AC_CHECK_HEADER([MagickWand/MagickWand.h], [ have_IM="yes" have_IM7="yes" ], [have_IM="broken"]) ]) CPPFLAGS="$CPPFLAGS_save"])]) have_GM="maybe" AS_IF([test "x$have_IM" = "xyes"], [], [test "x$with_graphicsmagick" = "xno"], [], [test "x$with_graphicsmagick" = "xyes" || \ test "x$with_imagemagick" = "xcheck"], [AS_IF([test "x$looked_for" = "x"], [looked_for="GraphicsMagick"], [looked_for="$looked_for or GraphicsMagick"]) PKG_CHECK_MODULES([GM], [GraphicsMagickWand], [have_GM="yes" magick="GraphicsMagick" MAGICK_CFLAGS="$MAGICK_CFLAGS $GM_CFLAGS" MAGICK_LIBS="$MAGICK_LIBS $GM_LIBS" MAGICK_VERSION=`$PKG_CONFIG GraphicsMagickWand --modversion`], [have_GM="no" AS_IF([test "x$saved_error" = "x"], [saved_error=$MAGICK_PKG_ERRORS])])]) dnl now that we have collected all the info abt what Magick is available dnl let the user know what we will or can't do AS_IF([test "x$have_IM" = "xbroken" && test "x$have_GM" = "xyes"], [AC_MSG_WARN([Your ImageMagick install is broken, using GraphicsMagick instead])]) AS_IF([test "x$have_IM" = "xyes" || test "x$have_GM" = "xyes"], [AC_MSG_NOTICE([using $magick version $MAGICK_VERSION])], [test "x$with_imagemagick" = "xno" && \ test "x$with_graphicsmagick" != "xyes"], [AC_MSG_NOTICE([image scanning disabled -- zbarimg will *not* be built])], [test "x$have_IM" = "xbroken"], [AC_MSG_FAILURE([$magick package found but wand/MagickWand.h not installed?! this is a problem with your $magick install, please try again after resolving the inconsistency or installing GraphicsMagick alternative...])], [AC_MSG_FAILURE([dnl Unable to find $looked_for: $saved_error * Ensure that you installed any "development" packages for ImageMagick or GraphicsMagick. * Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. * You may set the environment variables MAGICK_CFLAGS and MAGICK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. * To avoid using ImageMagick or GraphicsMagick altogether you may add the --without-imagemagick flag to the configure command; the zbarimg program will *not* be built. ])]) AS_IF([test "x$have_IM" = "xyes"], [AC_DEFINE([HAVE_IMAGEMAGICK], [1], [Define to 1 to use ImageMagick])], [test "x$have_GM" = "xyes"], [AC_DEFINE([HAVE_GRAPHICSMAGICK], [1], [Define to 1 to use GraphicsMagick])]) AS_IF([test "x$have_IM7" = "xyes"], [AC_DEFINE([HAVE_IMAGEMAGICK7], [1], [Define to 1 to use ImageMagick 7])]) AM_CONDITIONAL([HAVE_MAGICK], [test "x$have_IM" = "xyes" || test "x$have_GM" = "xyes"]) dnl Mozilla NPAPI AC_ARG_WITH([npapi], [AS_HELP_STRING([--with-npapi], [enable support for Firefox/Mozilla/OpenOffice plugin])], [], [with_npapi="no"]) AS_IF([test "x$with_npapi" != "xno"], [PKG_CHECK_MODULES([NPAPI], [firefox-plugin]) NPAPI_VERSION=`$PKG_CONFIG firefox-plugin --modversion` AC_MSG_NOTICE([using firefox-plugin version $NPAPI_VERSION])]) AM_CONDITIONAL([HAVE_NPAPI], [test "x$with_npapi" = "xyes"]) dnl GTK dnl For now, defaults to GTK version 2 AC_ARG_WITH([gtk], [AS_HELP_STRING([--with-gtk], [Specify support for GTK. Valid values are: no, auto, gtk2, gtk3 (default is gtk2)])], [AS_IF([test "x$with_gtk" != "xno" && test "x$with_gtk" != "xauto" && test "x$with_gtk" != "xgtk2" && test "x$with_gtk" != "xgtk3"], [echo "Invalid value for --with-gtk. Falling back to 'no'" with_gtk="xno"])], [with_gtk="gtk2"]) AC_ARG_VAR([GLIB_GENMARSHAL], [full path to glib-genmarshal]) AC_ARG_VAR([GTK_VERSION_MAJOR]) AS_IF([test "x$with_gtk" == "xgtk3" || test "x$with_gtk" == "xauto"], [PKG_CHECK_MODULES([GTK3], [gtk+-3.0], [GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal` GTK_VERSION=`$PKG_CONFIG gtk+-3.0 --modversion` AC_MSG_NOTICE([using GTK+ version $GTK_VERSION]) GTK_VERSION_MAJOR=3.0 with_gtk="gtk3" GTK_CFLAGS=$GTK3_CFLAGS GTK_LIBS=$GTK3_LIBS ]) ]) AS_IF([test "x$with_gtk" == "xgtk2" || test "x$with_gtk" == "xauto"], [PKG_CHECK_MODULES([GTK2], [gtk+-2.0], [GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal` GTK_VERSION=`$PKG_CONFIG gtk+-2.0 --modversion` AC_MSG_NOTICE([using GTK+ version $GTK_VERSION]) GTK_VERSION_MAJOR=2.0 with_gtk="gtk2" GTK_CFLAGS=$GTK2_CFLAGS GTK_LIBS=$GTK2_LIBS ]) ]) # GTK not found AS_IF(test "x$with_gtk" = "xauto"],[with_gtk="no"]) AC_SUBST(GTK_LIBS) AC_SUBST(GTK_CFLAGS) AM_CONDITIONAL([HAVE_GTK], [test "x$with_gtk" != "xno"]) AC_ARG_WITH([gir], [AS_HELP_STRING([--with-gir], [enable support for GObject Introspection])], [], [with_gir="yes"]) dnl Python dnl For now, keep python2 as default dnl If both PYTHON and --with-python=foo are defined, PYTHON takes precedence AC_ARG_WITH([python], [AS_HELP_STRING([--with-python], [Specify support for Python. Valid values are: no, auto, python2, python3 (default is python2). Please notice that PYTHON var, if especified, takes precedence.])], [AS_IF([test "x$with_python" != "xno" && test "x$with_python" != "xauto" && test "x$with_python" != "xpython2" && test "x$with_python" != "xpython3"], [echo "Invalid value for --with-python. Falling back to 'no'" with_python="xno"])], [with_python="python2"]) AC_ARG_VAR([PYTHON_CONFIG], [full path to python-config program]) AC_ARG_VAR([PYTHON_CFLAGS], [compiler flags for building python extensions]) AC_ARG_VAR([PYTHON_LIBS], [linker flags for building python extensions]) AC_ARG_VAR([PYGTK_H2DEF], [full path to PyGTK h2def.py module (python2 only)]) AC_ARG_VAR([PYGTK_CODEGEN], [full path to pygtk-codegen program (python2 only)]) AC_ARG_VAR([PYGTK_DEFS], [directory where PyGTK definitions may be found (python2 only)]) AS_IF([test -z "$PYTHON"], [AS_IF([test "x$with_python" == "xauto"], [AC_PATH_PROGS([PYTHON], [python3 python2 python], [:], [$PATH])], [AS_IF([test "x$with_python" == "xpython3"], [AC_PATH_PROGS([PYTHON], [python3 python], [:], [$PATH])], [AS_IF([test "x$with_python" == "xpython2"], [AC_PATH_PROGS([PYTHON], [python2 python], [:], [$PATH])], [with_python="no"]) ]) ] )], [with_python="auto"] ) AS_IF([test "x$with_python" != "xno"], [AM_PATH_PYTHON([2.7.0])]) AS_IF([test "x$PYTHON_VERSION" != "x" && test "x$with_python" != "xno"], [PYTHON_VERSION_MAJOR="`echo $PYTHON_VERSION | cut -d'.' -f 1`" AS_IF([test "x$PYTHON_CFLAGS" != "x"], [], [test "x$PYTHON_CONFIG" != "x" && test -x "$PYTHON_CONFIG"], [PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags`], [test -x "$PYTHON-config"], [PYTHON_CFLAGS=`$PYTHON-config --cflags`], [PYTHON_CFLAGS=`$PYTHON -c 'import distutils.sysconfig as s, sys; sys.stdout.write(" ".join(s.get_config_vars("CFLAGS")) + " -I"+s.get_python_inc() + " -I"+s.get_python_inc(plat_specific=True))'`]) dnl check that #include compiles (bug #3092663) CPPFLAGS_save="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS" AC_CHECK_HEADER([Python.h], [], [AC_MSG_ERROR([dnl Python module enabled, but unable to compile Python.h. Install the development package for python-$am_cv_python_version, or configure --without-python to disable the python bindings.dnl ])]) CPPFLAGS="$CPPFLAGS_save" dnl PyGTK dnl disable pygtk when we're on Python 3 AS_IF([test "x$with_gtk" != "xno"], [AS_IF([test "x$PYTHON_VERSION_MAJOR" = "x2"], [PKG_CHECK_MODULES([PYGTK], [pygtk-2.0], [with_pygtk2="yes"], [with_pygtk2="no"]) AC_CHECK_PROGS([PYGTK_CODEGEN], [pygobject-codegen-2.0 pygtk-codegen-2.0 pygtk-codegen], [:]) AS_IF([test "x$PYGTK_H2DEF" = "x"], [PYGTK_H2DEF=`$PKG_CONFIG pygtk-2.0 --variable=codegendir`/h2def.py AS_IF([test -f "$PYGTK_H2DEF"], [], [PYGTK_H2DEF=":"])]) AS_IF([test "x$PYGTK_DEFS" = "x"], [PYGTK_DEFS=`$PKG_CONFIG pygtk-2.0 --variable=defsdir`]) ]) ]) ], [with_python="no"]) AS_IF([test "x$PYTHON_VERSION_MAJOR" != "x2"], [with_pygtk2="no"]) AM_CONDITIONAL([HAVE_PYTHON], [test "x$with_python" != "xno"]) AM_CONDITIONAL([HAVE_PYGTK2], [test "x$with_pygtk2" != "xno"]) dnl GObject Introspection (GIR) AS_IF([test "x$with_gir" == "xyes" && test "x$with_gtk" != "xno"], [m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [GOBJECT_INTROSPECTION_CHECK([0.6.7]) AS_IF([test "x$found_introspection" = "xyes"], [INTROSPECTION_TYPELIBDIR=`$PKG_CONFIG --variable=typelibdir --define-variable="libdir=${libdir}" gobject-introspection-1.0` INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir --define-variable="datadir=${datadir}" gobject-introspection-1.0` AC_SUBST(INTROSPECTION_TYPELIBDIR) AC_SUBST(INTROSPECTION_GIRDIR)])]) ]) AS_IF([test "x$found_introspection" != "xyes"], [with_gir="no"]) AM_CONDITIONAL([HAVE_INTROSPECTION], [test "x$with_gir" = "xyes"]) dnl Qt AC_ARG_WITH([qt], [AS_HELP_STRING([--without-qt], [disable support for Qt widget])], [], [with_qt="yes"]) dnl Qt5 AC_ARG_WITH([qt5], [AS_HELP_STRING([--without-qt5], [disable support for Qt5 widget. if --with-qt, it will seek only for Qt4])], [], [with_qt5="yes"]) AC_ARG_VAR([MOC], [full path to Qt moc program]) AS_IF([test "x$have_x" = "xyes"], [qt_extra="Qt5X11Extras >= 5.0"], [qt_extra=""]) AS_IF([test "x$with_qt" != "xno"], [PKG_CHECK_MODULES([QT], [Qt5Core >= 5 Qt5Gui >= 5 Qt5Widgets >= 5.0 $qt_extra],, [with_qt5 = "no" PKG_CHECK_MODULES([QT], [QtCore >= 4 QtGui >= 4],, [with_qt="no"])])]) AS_IF([test "x$with_qt" != "xno"], AS_IF([test "x$with_qt5" != "xno"], [AC_CHECK_PROGS(MOC, [moc-qt5 moc]) AC_MSG_NOTICE([using moc from $MOC]) QT_VERSION=`$PKG_CONFIG Qt5Gui --modversion` CPPFLAGS="$CPPFLAGS $QT_CPPFLAGS" dnl -fPIC has no effect on Windows and breaks windres AS_IF([test "x$win32" = "xno"], [CPPFLAGS="$CPPFLAGS -fPIC"]) AC_MSG_NOTICE([using Qt version $QT_VERSION])], [MOC=`$PKG_CONFIG QtGui --variable=moc_location` AC_MSG_NOTICE([using moc from $MOC]) QT_VERSION=`$PKG_CONFIG QtGui --modversion` AC_MSG_NOTICE([using Qt version $QT_VERSION])])) AM_CONDITIONAL([HAVE_QT], [test "x$with_qt" = "xyes"]) dnl Java have_java="maybe" AC_ARG_VAR([JAVA_HOME], [root location of JDK]) AC_ARG_VAR([JAVAC], [location of Java language compiler]) AC_ARG_VAR([JAVAH], [location of Java header generator]) # If $JAVA_HOME not defined, try to autodetect it AS_IF([test -z "$JAVA_HOME"], [AC_PATH_PROGS([JAVAC], [javac jikes ecj gcj], [:], [$PATH]) AS_IF([test ! -z "$JAVAC"], [JAVA_HOME=$( readlink -f ${JAVAC} | rev | cut -d/ -f3- | rev )])]) # If $JAVA_HOME is defined, set JAVA_PATH and JAVAC AS_IF([test ! -z "$JAVA_HOME"], [JAVA_PATH="$JAVA_HOME/bin$PATH_SEPARATOR$PATH" AS_IF([test -z "$JAVAC"], [AC_PATH_PROGS([JAVAC], [javac jikes ecj gcj], [:], [$JAVA_PATH])])]) AC_ARG_WITH([java], [AS_HELP_STRING([--without-java], [disable support for Java interface])], [], [with_java="check"]) JAVAC=${JAVAC/ecj/ecj -1.5} # Javah was obsoleted on Java 8 and removed on Java 11. So, we need to # look strictly at the $JAVA_HOME in order to avoid mixing different versions AS_IF([test -z "$JAVAH"], [AC_PATH_PROGS([JAVAH], [javah], [], [$JAVA_HOME/bin])]) AM_CONDITIONAL([HAVE_JAVAH], [test "x$JAVAH" != "x"]) AC_ARG_VAR([JAR], [location of Java archive tool]) AC_PATH_PROGS([JAR], [jar], [:], [$JAVA_PATH]) AS_IF([test "x$JAR" == "x:"], [have_java="no"]) AC_ARG_VAR([JAVA], [location of Java application launcher]) AC_PATH_PROGS([JAVA], [java], [/bin/false], [$JAVA_PATH]) AC_ARG_VAR([CLASSPATH], [Java class path (include JUnit to run java tests)]) AS_IF([test "x$CLASSPATH" == "x"], [CLASSPATH="."]) dnl Search for Java unit test library AS_IF([test -z "$JUNIT_HOME"], [JUNIT_HOME="/usr/share/java"]) AS_IF([test -f "$JUNIT_HOME/junit4.jar"], [JUNIT="$JUNIT_HOME/junit4.jar"], [AS_IF([test -f "$JUNIT_HOME/junit.jar"], [JUNIT="$JUNIT_HOME/junit.jar"])]) AS_IF([test "x$JUNIT" != "x"], [AS_IF([test -f "/usr/share/java/hamcrest/all.jar"], [CLASSPATH="$JUNIT:/usr/share/java/hamcrest/all.jar:$CLASSPATH" AC_SUBST(CLASSPATH) with_java_unit="yes"])], [AS_IF([test -f "/usr/share/java/hamcrest-all.jar"], [CLASSPATH="$JUNIT:/usr/share/java/hamcrest-all.jar:$CLASSPATH" AC_SUBST(CLASSPATH) with_java_unit="yes"])]) AM_CONDITIONAL([HAVE_JAVA_UNIT], [test "x$with_java_unit" = "xyes"]) AC_ARG_VAR([JAVA_CFLAGS], [compiler flags for building JNI extensions]) AS_IF([test "x$JAVA_CFLAGS" = "x" && test "x$JAVA_HOME" != "x"], [JAVA_CFLAGS="-I$JAVA_HOME/include"]) AS_IF([test -d "$JAVA_HOME/include/linux"], [JAVA_CFLAGS="$JAVA_CFLAGS -I$JAVA_HOME/include/linux"]) AS_IF([test "x$with_java" != "xno"], [CPPFLAGS_save="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $JAVA_CFLAGS" AC_CHECK_HEADER([jni.h], [], [have_java="no"]) CPPFLAGS="$CPPFLAGS_save" AS_IF([test "x$have_java" != "xno"], [with_java="yes"], [test "x$with_java" = "xyes"], [AC_MSG_FAILURE([unable to find Java JNI! ensure CFLAGS are set appropriately or configure --without-java])], [with_java="no"]) ]) AM_CONDITIONAL([HAVE_JAVA], [test "x$with_java" = "xyes"]) dnl header files dnl FIXME switches for shm, mmap AC_HEADER_ASSERT AC_CHECK_HEADERS([errno.h fcntl.h features.h inttypes.h float.h limits.h \ locale.h stddef.h stdlib.h string.h unistd.h sys/types.h sys/stat.h \ sys/ioctl.h sys/time.h sys/times.h sys/ipc.h sys/shm.h sys/mman.h]) AC_HEADER_MAJOR AC_CHECK_HEADER_STDBOOL dnl types AC_TYPE_INT32_T AC_TYPE_UINT32_T AC_TYPE_UINT8_T AC_TYPE_UINTPTR_T AC_TYPE_UID_T AC_TYPE_INT32_T AC_TYPE_INT64_T AC_TYPE_OFF_T AC_TYPE_SIZE_T AC_TYPE_UINT16_T AC_TYPE_UINT32_T AC_TYPE_UINT64_T AC_TYPE_UINT8_T AC_CHECK_MEMBERS([struct stat.st_rdev]) dnl compile characteristics AC_C_CONST AC_C_INLINE dnl functions AC_FUNC_MMAP AC_CHECK_FUNCS([alarm clock_gettime floor getcwd gettimeofday localeconv memchr memmove memset modf munmap pow select setenv sqrt strcasecmp strchr strdup strerror strrchr strstr strtol strtoul malloc realloc]) dnl output generation dnl avoid doc rebuilds unless revision info changes AC_CONFIG_COMMANDS([doc/version.xml], [AS_IF([test -f doc/version.xml && \ ! echo $VERSION | diff doc/version.xml - >/dev/null 2>&1 || \ ! echo $VERSION | diff $srcdir/doc/version.xml - >/dev/null 2>&1 ], [echo "writing new doc/version.xml" ; echo $VERSION > $srcdir/doc/version.xml ])], [VERSION="$VERSION"] ) AC_CONFIG_COMMANDS([doc/reldate.xml], [AS_IF([test -f doc/reldate.xml && \ ! echo $RELDATE | diff doc/reldate.xml - >/dev/null 2>&1 || \ ! echo $RELDATE | diff $srcdir/doc/reldate.xml - >/dev/null 2>&1 ], [echo "writing new doc/reldate.xml" ; echo $RELDATE > $srcdir/doc/reldate.xml ])], [RELDATE="$RELDATE"] ) echo "Generating config files" AC_CONFIG_FILES([ Makefile gtk/Makefile java/Makefile zbar/Makefile zbar.pc zbar-gtk.pc zbar-qt.pc doc/doxygen.conf]) AC_CONFIG_FILES([test/test_examples.sh],[chmod 755 test/test_examples.sh]) AC_CONFIG_FILES([test/check_dbus.sh],[chmod 755 test/check_dbus.sh]) AC_OUTPUT dnl summary log echo "" echo "please verify that the detected configuration matches your expectations:" echo "------------------------------------------------------------------------" AS_IF([test "x$win32" != "xno"], [AS_IF([test "x$with_directshow" != "xno"], [echo "DirectShow driver --with-directshow=$with_directshow"], [echo "VfW driver --with-directshow=$with_directshow"] )], [echo "X --with-x=$have_x"] ) echo "pthreads --enable-pthread=$enable_pthread" echo "doc --enable-doc=$enable_doc" echo "v4l --enable-video=$enable_video" echo "jpeg --with-jpeg=$with_jpeg" echo "Python --with-python=$with_python python${PYTHON_VERSION}" echo "GTK --with-gtk=$with_gtk Gtk${GTK_VERSION}" echo "GObject introspection --with-gir=$with_gir" echo "Qt --with-qt=$with_qt Qt${QT_VERSION}" echo "Java --with-java=$with_java" AS_IF([test "x$win32" == "xno"], [echo "Dbus --with-dbus=$with_dbus"]) AS_IF([test "x$have_GM" = "xyes"], [echo "GraphicsMagick --with-graphicsmagick=yes"], [echo "ImageMagick --with-imagemagick=$with_imagemagick"]) echo "Enabled codes: $enabled_codes" echo "Disabled codes: $disabled_codes" AS_IF([test "x$with_java" = "xyes"], [echo "JAVA_HOME $JAVA_HOME"]) dnl Display "warnings" about disabled and experimental features echo "" AS_IF([test "x$enable_video" != "xyes"], [echo " => zbarcam video scanner will *NOT* be built"]) AS_IF([test "x$have_libv4l" != "xyes"], [echo " => libv4l will *NOT* be used"]) AS_IF([test "x$with_jpeg" != "xyes"], [echo " => JPEG image conversions will *NOT* be supported"]) AS_IF([test "x$have_IM" != "xyes" && test "x$have_GM" != "xyes"], [echo " => the zbarimg file scanner will *NOT* be built"]) AS_IF([test "x$have_GM" = "xyes"], [echo " => ImageMagick is preferred, as GraphicsMagick doesn't support https"]) AS_IF([test "x$with_gtk" == "xno"], [echo " => GTK support will *NOT* be built"]) AS_IF([test "x$with_pygtk2" != "xyes" && test "xPYTHON_VERSION_MAJOR" = "x2"], [echo " => the Python 2 GTK widget wrapper will *NOT* be built"]) AS_IF([test "x$with_qt" != "xyes"], [echo " => the Qt widget will *NOT* be built"]) AS_IF([test "x$with_qt" == "xyes" && test "x$enable_static_qt" == "xyes" ], [echo " => Building a static Qt library"]) AS_IF([test "x$with_java" != "xyes"], [echo " => the Java interface will *NOT* be built"]) AS_IF([test "x$with_java_unit" != "xyes"], [echo " => the Java unit test will *NOT* be enabled"]) #echo "NPAPI Plugin --with-npapi=$with_npapi" #AS_IF([test "x$with_mozilla" != "xyes"], # [echo " => the Mozilla/Firefox/OpenOffice plugin will *NOT* be built"]) AS_IF([test "x$enable_pdf417" == "xyes"], [echo " => the pdf417 code support is incomplete!"]) zbar-0.23/HACKING.md0000664000175000017500000000560313471225716010721 00000000000000Downloading ZBar source code ============================ When hacking at ZBar, PLEASE send patches against the latest Git tree! There are currently 3 mirrors with ZBar: LinuxTV: Cgit GUI interface: https://git.linuxtv.org/zbar.git/ Git tree: git://linuxtv.org/zbar.git https://git.linuxtv.org/cgit.cgi/zbar.git http://git.linuxtv.org/cgit.cgi/zbar.git Github: https://github.com/mchehab/zbar.git Gitlab: https://github.com/mchehab/zbar You can use git clone to get the latest version from any of the above repositories. if you haven't already, grab the ZBar git repository. For example, to get it from Github, use: git clone https://github.com/mchehab/zbar.git cd zbar autoreconf -vfi This will generate ./configure and all that other foo you usually get with a release. you will need to have recent versions of some basic "developer tools" installed in order for this to work, particularly GNU autotools. these versions of autotools are known to work (newer versions should also be fine): GNU autoconf 2.61 GNU automake 1.10.1 GNU libtool 2.2.6 GNU gettext 0.18.1.1 GNU pkg-config 0.25 xmlto 0.0.20-5 (for docs building) all above mentioned tools (except xmlto) must be installed in the same prefix. mixing prefixes (i.g. /usr/bin and /usr/local/bin) may lead to errors in configuration stages Writing descriptions for your patches ===================================== Please add a good description to your patch adding why it is needed, what the patch does and how. This helps us when reviewing your work when you submit upstream. We use a process similar to the Linux Kernel for patch submissions. In particular, submitted patches should have a developer's certificate of origin, as described at: https://linuxtv.org/wiki/index.php/Development:_Submitting_Patches#Developer.27s_Certificate_of_Origin_1.1 In practice, please add: Signed-off-by: your name on your pathes. Submitting patches ================== When you're done hacking, please submit your work back upstream. If you use Github or Gitlab, you can fork ZBar from it, develop your patches and then push again to your clone, asking the patch merge using the GUI. Although we prefer if you submit patches via either Github or Gitlab, you can also submit them via e-mail to: linux-media@vger.kernel.org If you opt to do so, please place [PATCH ZBar] at the subject of your e-mails for us to not mix them with patches for the Kernel or for other media tools. and want to make your patch, run: git diff > hacked.patch Other things for you to read, in order to know more about how to submit your work for upstreaming processes in general, that could be useful for you to prepare yourself on submitting patches to ZBar: - https://linuxtv.org/wiki/index.php/Development:_Submitting_Patches - http://www.faqs.org/docs/artu/ch19s02.html - http://www.catb.org/~esr/faqs/smart-questions.html zbar-0.23/aclocal.m40000664000175000017500000035561513471606245011206 00000000000000# generated automatically by aclocal 1.16.1 -*- Autoconf -*- # Copyright (C) 1996-2018 Free Software Foundation, Inc. # 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # iconv.m4 serial 19 (gettext-0.18.2) dnl Copyright (C) 2000-2002, 2007-2014, 2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);]])], [am_cv_func_iconv=yes]) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);]])], [am_cv_lib_iconv=yes] [am_cv_func_iconv=yes]) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, dnl Solaris 10. am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi am_cv_func_iconv_works=no for ac_iconv_const in '' 'const'; do AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[ #include #include #ifndef ICONV_CONST # define ICONV_CONST $ac_iconv_const #endif ]], [[int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\263"; char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 2; iconv_close (cd_ascii_to_88591); } } /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ { iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; ICONV_CONST char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 4; iconv_close (cd_88591_to_utf8); } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 8; iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) result |= 16; return result; ]])], [am_cv_func_iconv_works=yes], , [case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac]) test "$am_cv_func_iconv_works" = no || break done LIBS="$am_save_LIBS" ]) case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then AC_DEFINE([HAVE_ICONV], [1], [Define if you have the iconv() function and it works.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST([LIBICONV]) AC_SUBST([LTLIBICONV]) ]) dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to dnl avoid warnings like dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". dnl This is tricky because of the way 'aclocal' is implemented: dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. dnl Otherwise aclocal's initial scan pass would miss the macro definition. dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. dnl Otherwise aclocal would emit many "Use of uninitialized value $1" dnl warnings. m4_define([gl_iconv_AC_DEFUN], m4_version_prereq([2.64], [[AC_DEFUN_ONCE( [$1], [$2])]], [m4_ifdef([gl_00GNULIB], [[AC_DEFUN_ONCE( [$1], [$2])]], [[AC_DEFUN( [$1], [$2])]])])) gl_iconv_AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL([am_cv_proto_iconv], [ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ]], [[]])], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"]) am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([ $am_cv_proto_iconv]) AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], [Define as const if the declaration of iconv() needs const.]) dnl Also substitute ICONV_CONST in the gnulib generated . m4_ifdef([gl_ICONV_H_DEFAULTS], [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) if test -n "$am_cv_proto_iconv_arg1"; then ICONV_CONST="const" fi ]) fi ]) dnl -*- mode: autoconf -*- dnl Copyright 2009 Johan Dahlin dnl dnl This file is free software; the author(s) gives unlimited dnl permission to copy and/or distribute it, with or without dnl modifications, as long as this notice is preserved. dnl # serial 1 m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], [ AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([LT_INIT],[$0])dnl setup libtool first dnl enable/disable introspection m4_if([$2], [require], [dnl enable_introspection=yes ],[dnl AC_ARG_ENABLE(introspection, AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]], [Enable introspection for this build]),, [enable_introspection=auto]) ])dnl AC_MSG_CHECKING([for gobject-introspection]) dnl presence/version checking AS_CASE([$enable_introspection], [no], [dnl found_introspection="no (disabled, use --enable-introspection to enable)" ],dnl [yes],[dnl PKG_CHECK_EXISTS([gobject-introspection-1.0],, AC_MSG_ERROR([gobject-introspection-1.0 is not installed])) PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME])) ],dnl [auto],[dnl PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no) dnl Canonicalize enable_introspection enable_introspection=$found_introspection ],dnl [dnl AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@]) ])dnl AC_MSG_RESULT([$found_introspection]) INTROSPECTION_SCANNER= INTROSPECTION_COMPILER= INTROSPECTION_GENERATE= INTROSPECTION_GIRDIR= INTROSPECTION_TYPELIBDIR= if test "x$found_introspection" = "xyes"; then INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection fi AC_SUBST(INTROSPECTION_SCANNER) AC_SUBST(INTROSPECTION_COMPILER) AC_SUBST(INTROSPECTION_GENERATE) AC_SUBST(INTROSPECTION_GIRDIR) AC_SUBST(INTROSPECTION_TYPELIBDIR) AC_SUBST(INTROSPECTION_CFLAGS) AC_SUBST(INTROSPECTION_LIBS) AC_SUBST(INTROSPECTION_MAKEFILE) AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes") ]) dnl Usage: dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version]) AC_DEFUN([GOBJECT_INTROSPECTION_CHECK], [ _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1]) ]) dnl Usage: dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version]) AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE], [ _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require]) ]) # lib-ld.m4 serial 6 dnl Copyright (C) 1996-2003, 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Subroutines of libtool.m4, dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid dnl collision with libtool.m4. dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], [# I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 /dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL([acl_cv_path_LD], [if test -z "$LD"; then acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$acl_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 = 1.10 to complain if config.rpath is missing. m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE([rpath], [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_FROMPACKAGE(name, package) dnl declares that libname comes from the given package. The configure file dnl will then not have a --with-libname-prefix option but a dnl --with-package-prefix option. Several libraries can come from the same dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar dnl macro call that searches for libname. AC_DEFUN([AC_LIB_FROMPACKAGE], [ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_frompackage_]NAME, [$2]) popdef([NAME]) pushdef([PACK],[$2]) pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_libsinpackage_]PACKUP, m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) popdef([PACKUP]) popdef([PACK]) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) dnl Autoconf >= 2.61 supports dots in --with options. pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_ARG_WITH(P_A_C_K[-prefix], [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= LIB[]NAME[]_PREFIX= dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been dnl computed. So it has to be reset here. HAVE_LIB[]NAME= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" dnl The same code as in the loop below: dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$acl_hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi popdef([P_A_C_K]) popdef([PACKLIBS]) popdef([PACKUP]) popdef([PACK]) popdef([NAME]) ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) dnl For those cases where a variable contains several -L and -l options dnl referring to unknown libraries and directories, this macro determines the dnl necessary additional linker options for the runtime path. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) dnl sets LDADDVAR to linker options needed together with LIBSVALUE. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, dnl otherwise linking without libtool is assumed. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], [ AC_REQUIRE([AC_LIB_RPATH]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) $1= if test "$enable_rpath" != no; then if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode directories into the resulting dnl binary. rpathdirs= next= for opt in $2; do if test -n "$next"; then dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n ""$3""; then dnl libtool is used for linking. Use -R options. for dir in $rpathdirs; do $1="${$1}${$1:+ }-R$dir" done else dnl The linker is used for linking directly. if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user dnl must pass all path elements in one option. alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="$flag" else dnl The -rpath options are cumulative. for dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="${$1}${$1:+ }$flag" done fi fi fi fi fi AC_SUBST([$1]) ]) # lib-prefix.m4 serial 7 (gettext-0.18) dnl Copyright (C) 2001-2005, 2008-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. ifdef([AC_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) dnl AC_LIB_PREPARE_MULTILIB creates dnl - a variable acl_libdirstem, containing the basename of the libdir, either dnl "lib" or "lib64" or "lib/64", dnl - a variable acl_libdirstem2, as a secondary possible value for dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or dnl "lib/amd64". AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib and lib64. dnl On glibc systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine dnl the compiler's default mode by looking at the compiler's library search dnl path. If at least one of its elements ends in /lib64 or points to a dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. dnl Otherwise we use the default, namely "lib". dnl On Solaris systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. AC_REQUIRE([AC_CANONICAL_HOST]) acl_libdirstem=lib acl_libdirstem2= case "$host_os" in solaris*) dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment dnl . dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the dnl symlink is missing, so we set acl_libdirstem2 too. AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], [AC_EGREP_CPP([sixtyfour bits], [ #ifdef _LP64 sixtyfour bits #endif ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) ]) if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" ]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 11 (pkg-config-0.29.1) dnl Copyright © 2004 Scott James Remnant . dnl Copyright © 2012-2015 Dan Nicholson dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA dnl 02111-1307, USA. dnl dnl As a special exception to the GNU General Public License, if you dnl distribute this file as part of a program that contains a dnl configuration script generated by Autoconf, you may include it under dnl the same distribution terms that you use for the rest of that dnl program. dnl PKG_PREREQ(MIN-VERSION) dnl ----------------------- dnl Since: 0.29 dnl dnl Verify that the version of the pkg-config macros are at least dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's dnl installed version of pkg-config, this checks the developer's version dnl of pkg.m4 when generating configure. dnl dnl To ensure that this macro is defined, also add: dnl m4_ifndef([PKG_PREREQ], dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) dnl dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], [m4_define([PKG_MACROS_VERSION], [0.29.1]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) dnl ---------------------------------- dnl Since: 0.16 dnl dnl Search for the pkg-config tool and set the PKG_CONFIG variable to dnl first found in the path. Checks that the version of pkg-config found dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is dnl used since that's the first version where most current features of dnl pkg-config existed. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])dnl PKG_PROG_PKG_CONFIG dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------------------------------- dnl Since: 0.18 dnl dnl Check to see whether a particular set of modules exists. Similar to dnl PKG_CHECK_MODULES(), but does not set variables or print errors. dnl dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) dnl only at the first occurence in configure.ac, so if the first place dnl it's called might be skipped (such as if it is within an "if", you dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) dnl --------------------------------------------- dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting dnl pkg_failed based on the result. m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])dnl _PKG_CONFIG dnl _PKG_SHORT_ERRORS_SUPPORTED dnl --------------------------- dnl Internal check to see if pkg-config supports short errors. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])dnl _PKG_SHORT_ERRORS_SUPPORTED dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl -------------------------------------------------------------- dnl Since: 0.4.0 dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES might not happen, you should be sure to include an dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])dnl PKG_CHECK_MODULES dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl --------------------------------------------------------------------- dnl Since: 0.29 dnl dnl Checks for existence of MODULES and gathers its build flags with dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags dnl and VARIABLE-PREFIX_LIBS from --libs. dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to dnl include an explicit call to PKG_PROG_PKG_CONFIG in your dnl configure.ac. AC_DEFUN([PKG_CHECK_MODULES_STATIC], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" PKG_CHECK_MODULES($@) PKG_CONFIG=$_save_PKG_CONFIG[]dnl ])dnl PKG_CHECK_MODULES_STATIC dnl PKG_INSTALLDIR([DIRECTORY]) dnl ------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable pkgconfigdir as the location where a module dnl should install pkg-config .pc files. By default the directory is dnl $libdir/pkgconfig, but the default can be changed by passing dnl DIRECTORY. The user can override through the --with-pkgconfigdir dnl parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_INSTALLDIR dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) dnl -------------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable noarch_pkgconfigdir as the location where a dnl module should install arch-independent pkg-config .pc files. By dnl default the directory is $datadir/pkgconfig, but the default can be dnl changed by passing DIRECTORY. The user can override through the dnl --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_NOARCH_INSTALLDIR dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------- dnl Since: 0.28 dnl dnl Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], dnl [DESCRIPTION], [DEFAULT]) dnl ------------------------------------------ dnl dnl Prepare a "--with-" configure option using the lowercase dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and dnl PKG_CHECK_MODULES in a single macro. AC_DEFUN([PKG_WITH_MODULES], [ m4_pushdef([with_arg], m4_tolower([$1])) m4_pushdef([description], [m4_default([$5], [build with ]with_arg[ support])]) m4_pushdef([def_arg], [m4_default([$6], [auto])]) m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) m4_case(def_arg, [yes],[m4_pushdef([with_without], [--without-]with_arg)], [m4_pushdef([with_without],[--with-]with_arg)]) AC_ARG_WITH(with_arg, AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, [AS_TR_SH([with_]with_arg)=def_arg]) AS_CASE([$AS_TR_SH([with_]with_arg)], [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], [auto],[PKG_CHECK_MODULES([$1],[$2], [m4_n([def_action_if_found]) $3], [m4_n([def_action_if_not_found]) $4])]) m4_popdef([with_arg]) m4_popdef([description]) m4_popdef([def_arg]) ])dnl PKG_WITH_MODULES dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [DESCRIPTION], [DEFAULT]) dnl ----------------------------------------------- dnl dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES dnl check._[VARIABLE-PREFIX] is exported as make variable. AC_DEFUN([PKG_HAVE_WITH_MODULES], [ PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) AM_CONDITIONAL([HAVE_][$1], [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) ])dnl PKG_HAVE_WITH_MODULES dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [DESCRIPTION], [DEFAULT]) dnl ------------------------------------------------------ dnl dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make dnl and preprocessor variable. AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], [ PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) ])dnl PKG_HAVE_DEFINE_WITH_MODULES # Copyright (C) 2002-2018 Free Software Foundation, Inc. # # 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. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.16.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.16.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2018 Free Software Foundation, Inc. # # 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2018 Free Software Foundation, Inc. # # 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. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2018 Free Software Foundation, Inc. # # 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. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2018 Free Software Foundation, Inc. # # 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. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. AS_CASE([$CONFIG_FILES], [*\'*], [eval set x "$CONFIG_FILES"], [*], [set x $CONFIG_FILES]) shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`AS_DIRNAME(["$am_mf"])` am_filepart=`AS_BASENAME(["$am_mf"])` AM_RUN_LOG([cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles]) || am_rc=$? done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments for automatic dependency tracking. Try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi AS_UNSET([am_dirpart]) AS_UNSET([am_filepart]) AS_UNSET([am_mf]) AS_UNSET([am_rc]) rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking is enabled. # This creates each '.Po' and '.Plo' makefile fragment that we'll need in # order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2018 Free Software Foundation, Inc. # # 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. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2018 Free Software Foundation, Inc. # # 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2018 Free Software Foundation, Inc. # # 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. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2018 Free Software Foundation, Inc. # # 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. # AM_MAKE_INCLUDE() # ----------------- # Check whether make has an 'include' directive that can support all # the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) AS_CASE([$?:`cat confinc.out 2>/dev/null`], ['0:this is the am__doit target'], [AS_CASE([$s], [BSD], [am__include='.include' am__quote='"'], [am__include='include' am__quote=''])]) if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* AC_MSG_RESULT([${_am_result}]) AC_SUBST([am__include])]) AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2018 Free Software Foundation, Inc. # # 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. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2018 Free Software Foundation, Inc. # # 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. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2018 Free Software Foundation, Inc. # # 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. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 1999-2018 Free Software Foundation, Inc. # # 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. # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------------------------- # Adds support for distributing Python modules and packages. To # install modules, copy them to $(pythondir), using the python_PYTHON # automake variable. To install a package with the same name as the # automake package, install to $(pkgpythondir), or use the # pkgpython_PYTHON automake variable. # # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as # locations to install python extension modules (shared libraries). # Another macro is required to find the appropriate flags to compile # extension modules. # # If your package is configured with a different prefix to python, # users will have to add the install directory to the PYTHONPATH # environment variable, or create a .pth file (see the python # documentation for details). # # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will # cause an error if the version of python installed on the system # doesn't meet the requirement. MINIMUM-VERSION should consist of # numbers and dots only. AC_DEFUN([AM_PATH_PYTHON], [ dnl Find a Python interpreter. Python versions prior to 2.0 are not dnl supported. (2.0 was released on October 16, 2000). m4_define_default([_AM_PYTHON_INTERPRETER_LIST], [python python2 python3 dnl python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 dnl python3.2 python3.1 python3.0 dnl python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 dnl python2.0]) AC_ARG_VAR([PYTHON], [the Python interpreter]) m4_if([$1],[],[ dnl No version check is needed. # Find any Python interpreter. if test -z "$PYTHON"; then AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) fi am_display_PYTHON=python ], [ dnl A version check is needed. if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. AC_MSG_CHECKING([whether $PYTHON version is >= $1]) AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]) AC_MSG_ERROR([Python interpreter is too old])]) am_display_PYTHON=$PYTHON else # Otherwise, try each interpreter until we find one that satisfies # VERSION. AC_CACHE_CHECK([for a Python interpreter with version >= $1], [am_cv_pathless_PYTHON],[ for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do test "$am_cv_pathless_PYTHON" = none && break AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) done]) # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. if test "$am_cv_pathless_PYTHON" = none; then PYTHON=: else AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) fi am_display_PYTHON=$am_cv_pathless_PYTHON fi ]) if test "$PYTHON" = :; then dnl Run any user-specified action, or abort. m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) else dnl Query Python for its version number. Getting [:3] seems to be dnl the best way to do this; it's what "site.py" does in the standard dnl library. AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`]) AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) dnl Use the values of $prefix and $exec_prefix for the corresponding dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made dnl distinct variables so they can be overridden if need be. However, dnl general consensus is that you shouldn't need this ability. AC_SUBST([PYTHON_PREFIX], ['${prefix}']) AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) dnl At times (like when building shared libraries) you may want dnl to know which OS platform Python thinks this is. AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) # Just factor out some code duplication. am_python_setup_sysconfig="\ import sys # Prefer sysconfig over distutils.sysconfig, for better compatibility # with python 3.x. See automake bug#10227. try: import sysconfig except ImportError: can_use_sysconfig = 0 else: can_use_sysconfig = 1 # Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: # try: from platform import python_implementation if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7': can_use_sysconfig = 0 except ImportError: pass" dnl Set up 4 directories: dnl pythondir -- where to install python scripts. This is the dnl site-packages directory, not the python standard library dnl directory like in previous automake betas. This behavior dnl is more consistent with lispdir.m4 for example. dnl Query distutils for this directory. AC_CACHE_CHECK([for $am_display_PYTHON script directory], [am_cv_python_pythondir], [if test "x$prefix" = xNONE then am_py_prefix=$ac_default_prefix else am_py_prefix=$prefix fi am_cv_python_pythondir=`$PYTHON -c " $am_python_setup_sysconfig if can_use_sysconfig: sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) else: from distutils import sysconfig sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') sys.stdout.write(sitedir)"` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` ;; *) case $am_py_prefix in /usr|/System*) ;; *) am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac ]) AC_SUBST([pythondir], [$am_cv_python_pythondir]) dnl pkgpythondir -- $PACKAGE directory under pythondir. Was dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is dnl more consistent with the rest of automake. AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) dnl pyexecdir -- directory for installing python extension modules dnl (shared libraries) dnl Query distutils for this directory. AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], [am_cv_python_pyexecdir], [if test "x$exec_prefix" = xNONE then am_py_exec_prefix=$am_py_prefix else am_py_exec_prefix=$exec_prefix fi am_cv_python_pyexecdir=`$PYTHON -c " $am_python_setup_sysconfig if can_use_sysconfig: sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) else: from distutils import sysconfig sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') sys.stdout.write(sitedir)"` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` ;; *) case $am_py_exec_prefix in /usr|/System*) ;; *) am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac ]) AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) dnl Run any user-specified action. $2 fi ]) # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # --------------------------------------------------------------------------- # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. # Run ACTION-IF-FALSE otherwise. # This test uses sys.hexversion instead of the string equivalent (first # word of sys.version), in order to cope with versions such as 2.2c1. # This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). AC_DEFUN([AM_PYTHON_CHECK_VERSION], [prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] sys.exit(sys.hexversion < minverhex)" AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) # Copyright (C) 2001-2018 Free Software Foundation, Inc. # # 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. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2018 Free Software Foundation, Inc. # # 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. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2018 Free Software Foundation, Inc. # # 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. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2018 Free Software Foundation, Inc. # # 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. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2018 Free Software Foundation, Inc. # # 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. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2018 Free Software Foundation, Inc. # # 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. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([config/libtool.m4]) m4_include([config/ltoptions.m4]) m4_include([config/ltsugar.m4]) m4_include([config/ltversion.m4]) m4_include([config/lt~obsolete.m4]) zbar-0.23/INSTALL.md0000664000175000017500000002023413471225716010760 00000000000000Basic 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 `configure.in` is used to create `configure` by a program called `autoconf`. You only need `configure.in` 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 `autoreconf -vfi && ./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 documentation. 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 this: 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 architecture. 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: CPU-COMPANY-SYSTEM 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 `config.site` that gives default values for variables like `CC`, `cache_file`, and `prefix`. `configure` looks for `PREFIX/share/config.site` if it exists, then `PREFIX/etc/config.site` 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 operates. `--cache-file=FILE` 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`. `--help` Print a summary of the options to `configure`, and exit. `--quiet` `--silent` `-q` 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). `--srcdir=DIR` Look for the package's source code in directory DIR. Usually `configure` can determine that directory automatically. `--version` Print the version of Autoconf used to generate the `configure` script, and exit. `configure` also accepts some other, not widely useful, options. Debian/Ubuntu package build =========================== For Debian/Ubuntu, one alternative way to build ZBar is by using pbuilder. In order to install pbuilder, see, for example: https://wiki.ubuntu.com/PbuilderHowto Once you have pbuilder installed and configured, you can build a ZBar package, running the following commands as root: # pbuilder create --basetgz /var/cache/pbuilder/base-test.tgz # pbuilder build --basetgz /var/cache/pbuilder/base-test.tgz ../zbar_0.20.2.dsc zbar-0.23/zbarimg/0000775000175000017500000000000013471606255011043 500000000000000zbar-0.23/zbarimg/Makefile.am.inc0000664000175000017500000000062613471225716013572 00000000000000bin_PROGRAMS += zbarimg/zbarimg zbarimg_zbarimg_SOURCES = zbarimg/zbarimg.c zbarimg_zbarimg_CPPFLAGS = $(MAGICK_CFLAGS) $(AM_CPPFLAGS) zbarimg_zbarimg_LDADD = $(MAGICK_LIBS) zbar/libzbar.la # automake bug in "monolithic mode"? CLEANFILES += zbarimg/.libs/zbarimg if WIN32 zbarimg_zbarimg_SOURCES += zbarimg/zbarimg.rc zbarimg_zbarimg_LDADD += zbarimg/zbarimg-rc.o endif EXTRA_DIST += test/barcodetest.py zbar-0.23/zbarimg/zbarimg.c0000664000175000017500000003507013471225716012566 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #include #include #include #ifdef HAVE_UNISTD_H # include #endif #ifdef HAVE_SYS_TIMES_H # include #endif #ifdef _WIN32 # include # include #endif #include #include #ifdef HAVE_GRAPHICSMAGICK # include #endif #ifdef HAVE_IMAGEMAGICK #ifdef HAVE_IMAGEMAGICK7 # include #else # include #endif /* ImageMagick frequently changes API names - just use the original * (more stable?) names to match GraphicsMagick */ # define InitializeMagick(f) MagickWandGenesis() # define DestroyMagick MagickWandTerminus # define MagickSetImageIndex MagickSetIteratorIndex /* in 6.4.5.4 MagickGetImagePixels changed to MagickExportImagePixels. * (still not sure this check is quite right... * how does MagickGetAuthenticImagePixels fit in?) * ref http://bugs.gentoo.org/247292 */ # if MagickLibVersion > 0x645 # define MagickGetImagePixels MagickExportImagePixels # endif #endif static const char *note_usage = "usage: zbarimg [options] ...\n" "\n" "scan and decode bar codes from one or more image files\n" "\n" "options:\n" " -h, --help display this help text\n" " --version display version information and exit\n" " -q, --quiet minimal output, only print decoded symbol data\n" " -v, --verbose increase debug output level\n" " --verbose=N set specific debug output level\n" #ifdef HAVE_DBUS " --nodbus disable dbus message\n" #endif " -d, --display enable display of following images to the screen\n" " -D, --nodisplay disable display of following images (default)\n" " --xml, --noxml enable/disable XML output format\n" " --raw output decoded symbol data without symbology prefix\n" " -S[=], --set [=]\n" " set decoder/scanner to (or 1)\n" // FIXME overlay level "\n" ; static const char *warning_not_found = "\n" "WARNING: barcode data was not detected in some image(s)\n" "Things to check:\n" " - is the barcode type supported? Currently supported symbologies are:\n" #if ENABLE_EAN == 1 " . EAN/UPC (EAN-13, EAN-8, EAN-2, EAN-5, UPC-A, UPC-E, ISBN-10, ISBN-13)\n" #endif #if ENABLE_DATABAR == 1 " . DataBar, DataBar Expanded\n" #endif #if ENABLE_CODE128 == 1 " . Code 128\n" #endif #if ENABLE_CODE93 == 1 " . Code 93\n" #endif #if ENABLE_CODE39 == 1 " . Code 39\n" #endif #if ENABLE_CODABAR == 1 " . Codabar\n" #endif #if ENABLE_I25 == 1 " . Interleaved 2 of 5\n" #endif #if ENABLE_QRCODE == 1 " . QR code\n" #endif #if ENABLE_SQCODE == 1 " . SQ code\n" #endif #if ENABLE_PDF417 == 1 " . PDF 417\n" #endif " - is the barcode large enough in the image?\n" " - is the barcode mostly in focus?\n" " - is there sufficient contrast/illumination?\n" " - If the symbol is split in several barcodes, are they combined in one " "image?\n" " - Did you enable the barcode type?\n" " some EAN/UPC codes are disabled by default. To enable all, use:\n" " $ zbarimg -S*.enable \n" " Please also notice that some variants take precedence over others.\n" " Due to that, if you want, for example, ISBN-10, you should do:\n" " $ zbarimg -Sisbn10.enable \n" "\n"; static const char *xml_head = "\n"; static const char *xml_foot = "\n"; static int notfound = 0, exit_code = 0; static int num_images = 0, num_symbols = 0; static int xmllvl = 0; char *xmlbuf = NULL; unsigned xmlbuflen = 0; static zbar_processor_t *processor = NULL; static inline int dump_error(MagickWand *wand) { char *desc; ExceptionType severity; desc = MagickGetException(wand, &severity); if(severity >= FatalErrorException) exit_code = 2; else if(severity >= ErrorException) exit_code = 1; else exit_code = 0; static const char *sevdesc[] = { "WARNING", "ERROR", "FATAL" }; fprintf(stderr, "%s: %s\n", sevdesc[exit_code], desc); MagickRelinquishMemory(desc); return(exit_code); } static int scan_image (const char *filename) { if(exit_code == 3) return(-1); int found = 0; MagickWand *images = NewMagickWand(); if(!MagickReadImage(images, filename) && dump_error(images)) return(-1); unsigned seq, n = MagickGetNumberImages(images); for(seq = 0; seq < n; seq++) { if(exit_code == 3) return(-1); if(!MagickSetImageIndex(images, seq) && dump_error(images)) return(-1); zbar_image_t *zimage = zbar_image_create(); assert(zimage); zbar_image_set_format(zimage, zbar_fourcc('Y','8','0','0')); int width = MagickGetImageWidth(images); int height = MagickGetImageHeight(images); zbar_image_set_size(zimage, width, height); // extract grayscale image pixels // FIXME color!! ...preserve most color w/422P // (but only if it's a color image) size_t bloblen = width * height; unsigned char *blob = malloc(bloblen); zbar_image_set_data(zimage, blob, bloblen, zbar_image_free_data); if(!MagickGetImagePixels(images, 0, 0, width, height, "I", CharPixel, blob)) return(-1); if(xmllvl == 1) { xmllvl++; printf("\n", filename); } zbar_process_image(processor, zimage); // output result data const zbar_symbol_t *sym = zbar_image_first_symbol(zimage); for(; sym; sym = zbar_symbol_next(sym)) { zbar_symbol_type_t typ = zbar_symbol_get_type(sym); unsigned len = zbar_symbol_get_data_length(sym); if(typ == ZBAR_PARTIAL) continue; else if(xmllvl <= 0) { if(!xmllvl) printf("%s:", zbar_get_symbol_name(typ)); if(len && fwrite(zbar_symbol_get_data(sym), len, 1, stdout) != 1) { exit_code = 1; return(-1); } } else { if(xmllvl < 3) { xmllvl++; printf("\n", seq); } zbar_symbol_xml(sym, &xmlbuf, &xmlbuflen); if(fwrite(xmlbuf, xmlbuflen, 1, stdout) != 1) { exit_code = 1; return(-1); } } printf("\n"); found++; num_symbols++; } if(xmllvl > 2) { xmllvl--; printf("\n"); } fflush(stdout); zbar_image_destroy(zimage); num_images++; if(zbar_processor_is_visible(processor)) { int rc = zbar_processor_user_wait(processor, -1); if(rc < 0 || rc == 'q' || rc == 'Q') exit_code = 3; } } if(xmllvl > 1) { xmllvl--; printf("\n"); } if(!found) notfound++; DestroyMagickWand(images); return(0); } int usage (int rc, const char *msg, const char *arg) { FILE *out = (rc) ? stderr : stdout; if(msg) { fprintf(out, "%s", msg); if(arg) fprintf(out, "%s", arg); fprintf(out, "\n\n"); } fprintf(out, "%s", note_usage); return(rc); } static inline int parse_config (const char *cfgstr, const char *arg) { if(!cfgstr || !cfgstr[0]) return(usage(1, "ERROR: need argument for option: ", arg)); if(zbar_processor_parse_config(processor, cfgstr)) return(usage(1, "ERROR: invalid configuration setting: ", cfgstr)); return(0); } int main (int argc, const char *argv[]) { // option pre-scan int quiet = 0; #ifdef HAVE_DBUS int dbus = 1; #endif int display = 0; int i, j; for(i = 1; i < argc; i++) { const char *arg = argv[i]; if(arg[0] != '-' || !arg[1]) // first pass, skip images num_images++; else if(arg[1] != '-') for(j = 1; arg[j]; j++) { if(arg[j] == 'S') { if(!arg[++j] && ++i >= argc) /* FIXME parse check */ return(parse_config("", "-S")); break; } switch(arg[j]) { case 'h': return(usage(0, NULL, NULL)); case 'q': quiet = 1; break; case 'v': zbar_increase_verbosity(); break; case 'd': display = 1; break; case 'D': break; default: return(usage(1, "ERROR: unknown bundled option: -", arg + j)); } } else if(!strcmp(arg, "--help")) return(usage(0, NULL, NULL)); else if(!strcmp(arg, "--version")) { printf("%s\n", PACKAGE_VERSION); return(0); } else if(!strcmp(arg, "--quiet")) { quiet = 1; argv[i] = NULL; } else if(!strcmp(arg, "--verbose")) zbar_increase_verbosity(); else if(!strncmp(arg, "--verbose=", 10)) zbar_set_verbosity(strtol(argv[i] + 10, NULL, 0)); else if(!strcmp(arg, "--nodbus")) #ifdef HAVE_DBUS dbus = 0; #else ; /* silently ignore the option */ #endif else if(!strcmp(arg, "--display")) display++; else if(!strcmp(arg, "--nodisplay") || !strcmp(arg, "--set") || !strcmp(arg, "--xml") || !strcmp(arg, "--noxml") || !strcmp(arg, "--raw") || !strncmp(arg, "--set=", 6)) continue; else if(!strcmp(arg, "--")) { num_images += argc - i - 1; break; } else return(usage(1, "ERROR: unknown option: ", arg)); } if(!num_images) return(usage(1, "ERROR: specify image file(s) to scan", NULL)); num_images = 0; InitializeMagick("zbarimg"); processor = zbar_processor_create(0); assert(processor); #ifdef HAVE_DBUS zbar_processor_request_dbus(processor, dbus); #endif if(zbar_processor_init(processor, NULL, display)) { zbar_processor_error_spew(processor, 0); return(1); } for(i = 1; i < argc; i++) { const char *arg = argv[i]; if(!arg) continue; if(arg[0] != '-' || !arg[1]) { if(scan_image(arg)) return(exit_code); } else if(arg[1] != '-') for(j = 1; arg[j]; j++) { if(arg[j] == 'S') { if((arg[++j]) ? parse_config(arg + j, "-S") : parse_config(argv[++i], "-S")) return(1); break; } switch(arg[j]) { case 'd': zbar_processor_set_visible(processor, 1); break; case 'D': zbar_processor_set_visible(processor, 0); break; } } else if(!strcmp(arg, "--display")) zbar_processor_set_visible(processor, 1); else if(!strcmp(arg, "--nodisplay")) zbar_processor_set_visible(processor, 0); else if(!strcmp(arg, "--xml")) { if(xmllvl < 1) { xmllvl = 1; #ifdef _WIN32 fflush(stdout); _setmode(_fileno(stdout), _O_BINARY); #endif printf("%s", xml_head); } } else if(!strcmp(arg, "--noxml") || !strcmp(arg, "--raw")) { if(xmllvl > 0) { xmllvl = 0; printf("%s", xml_foot); fflush(stdout); #ifdef _WIN32 _setmode(_fileno(stdout), _O_TEXT); #endif } if(!strcmp(arg, "--raw")) { xmllvl = -1; #ifdef _WIN32 fflush(stdout); _setmode(_fileno(stdout), _O_BINARY); #endif } } else if(!strcmp(arg, "--set")) { if(parse_config(argv[++i], "--set")) return(1); } else if(!strncmp(arg, "--set=", 6)) { if(parse_config(arg + 6, "--set=")) return(1); } else if(!strcmp(arg, "--")) break; } for(i++; i < argc; i++) if(scan_image(argv[i])) return(exit_code); /* ignore quit during last image */ if(exit_code == 3) exit_code = 0; if(xmllvl > 0) { xmllvl = -1; printf("%s", xml_foot); fflush(stdout); } if(xmlbuf) free(xmlbuf); if(num_images && !quiet && xmllvl <= 0) { fprintf(stderr, "scanned %d barcode symbols from %d images", num_symbols, num_images); #ifdef HAVE_SYS_TIMES_H #ifdef HAVE_UNISTD_H long clk_tck = sysconf(_SC_CLK_TCK); struct tms tms; if(clk_tck > 0 && times(&tms) >= 0) { double secs = tms.tms_utime + tms.tms_stime; secs /= clk_tck; fprintf(stderr, " in %.2g seconds\n", secs); } #endif #endif fprintf(stderr, "\n"); if(notfound) fprintf(stderr, "%s", warning_not_found); } if(num_images && notfound && !exit_code) exit_code = 4; zbar_processor_destroy(processor); DestroyMagick(); return(exit_code); } zbar-0.23/zbarimg/zbarimg.rc0000664000175000017500000000166413471225716012752 00000000000000#include #include VS_VERSION_INFO VERSIONINFO FILEVERSION ZBAR_VERSION_MAJOR, ZBAR_VERSION_MINOR, ZBAR_VERSION_PATCH, 0 PRODUCTVERSION ZBAR_VERSION_MAJOR, ZBAR_VERSION_MINOR, ZBAR_VERSION_PATCH, 0 FILEOS VOS__WINDOWS32 FILETYPE VFT_APP { BLOCK "StringFileInfo" { BLOCK "040904E4" { VALUE "ProductName", "ZBar Bar Code Reader" VALUE "Company Name", "ZBar Bar Code Reader" VALUE "InternalName", "zbarimg" VALUE "OriginalFilename", "zbarimg.exe" VALUE "FileVersion", PACKAGE_VERSION VALUE "ProductVersion", PACKAGE_VERSION VALUE "FileDescription", "Scan bar codes from image files" VALUE "LegalCopyright", "Copyright 2007-2010 (c) Jeff Brown " } } BLOCK "VarFileInfo" { VALUE "Translation", 0x0409, 0x04e4 } } APP_ICON ICON "zbar.ico" zbar-0.23/test/0000775000175000017500000000000013471606255010367 500000000000000zbar-0.23/test/Makefile.am.inc0000664000175000017500000001274113471225716013117 00000000000000check_PROGRAMS += test/test_decode test_test_decode_SOURCES = test/test_decode.c test/pdf417_encode.h test_test_decode_CFLAGS = -Wno-unused $(AM_CFLAGS) test_test_decode_LDADD = zbar/libzbar.la $(AM_LDADD) TEST_IMAGE_SOURCES = test/test_images.c test/test_images.h check_PROGRAMS += test/test_convert test_test_convert_SOURCES = test/test_convert.c $(TEST_IMAGE_SOURCES) test_test_convert_LDADD = zbar/libzbar.la $(AM_LDADD) #check_PROGRAMS += test/test_window #test_test_window_SOURCES = test/test_window.c $(TEST_IMAGE_SOURCES) #test_test_window_CPPFLAGS = -I$(srcdir)/zbar $(AM_CPPFLAGS) #test_test_window_LDADD = zbar/libzbar.la $(AM_LDADD) if HAVE_VIDEO check_PROGRAMS += test/test_video test_test_video_SOURCES = test/test_video.c $(TEST_IMAGE_SOURCES) test_test_video_LDADD = zbar/libzbar.la $(AM_LDADD) endif check_PROGRAMS += test/test_proc test_test_proc_SOURCES = test/test_proc.c $(TEST_IMAGE_SOURCES) test_test_proc_LDADD = zbar/libzbar.la $(AM_LDADD) check_PROGRAMS += test/test_cpp test_test_cpp_SOURCES = test/test_cpp.cpp test_test_cpp_LDADD = zbar/libzbar.la $(AM_LDADD) check_PROGRAMS += test/test_cpp_img test_test_cpp_img_SOURCES = test/test_cpp_img.cpp $(TEST_IMAGE_SOURCES) test_test_cpp_img_LDADD = zbar/libzbar.la $(AM_LDADD) if HAVE_JPEG check_PROGRAMS += test/test_jpeg test_test_jpeg_SOURCES = test/test_jpeg.c test_test_jpeg_LDADD = zbar/libzbar.la $(AM_LDADD) endif if HAVE_MAGICK EXTRA_PROGRAMS += test/dbg_scan test_dbg_scan_SOURCES = test/dbg_scan.cpp test_dbg_scan_CPPFLAGS = $(MAGICK_CFLAGS) $(AM_CPPFLAGS) test_dbg_scan_LDADD = $(MAGICK_LIBS) -lMagick++ zbar/libzbar.la $(AM_LDADD) endif if HAVE_DBUS check_PROGRAMS += test/test_dbus test_test_dbus_SOURCES = test/test_dbus.c test_test_dbus_LDFLAGS = $(DBUS_LIBS) endif EXTRA_DIST += test/test_pygtk.py test/test_perl.pl test/test_gi.py test/test_python.py # automake bug in "monolithic mode"? CLEANFILES += test/.libs/test_decode test/.libs/test_proc \ test/.libs/test_convert test/.libs/test_window \ test/.libs/test_video test/.libs/dbg_scan test/.libs/test_gtk # Images that work out of the box without needing to enable # an specific symbology NORMAL_IMAGES = codabar.png code-128.png code-39.png code-93.png \ databar.png databar-exp.png ean-13.png ean-8.png i2-5.png \ qr-code.png sqcode1-generated.png sqcode1-scanned.png EXAMPLES = @abs_top_builddir@/examples ZBARIMG = @abs_top_builddir@/zbarimg/zbarimg --nodbus gen_checksum: all for i in $(NORMAL_IMAGES); do $(ZBARIMG) $(EXAMPLES)/$$i 2>/dev/null|sha1sum|sed "s,-,zbarimg $$i,"; done >$(EXAMPLES)/sha1sum $(ZBARIMG) -Sean2.enable $(EXAMPLES)/ean-2.png 2>/dev/null|sha1sum|sed "s,-,zbarimg -Sean2.enable ean-2.png," >>$(EXAMPLES)/sha1sum $(ZBARIMG) -Sean5.enable $(EXAMPLES)/ean-5.png 2>/dev/null|sha1sum|sed "s,-,zbarimg -Sean5.enable ean-5.png," >>$(EXAMPLES)/sha1sum $(ZBARIMG) -Sisbn10.enable $(EXAMPLES)/ean-13.png 2>/dev/null|sha1sum|sed "s,-,zbarimg -Sisbn10.enable ean-13.png," >>$(EXAMPLES)/sha1sum $(ZBARIMG) -Sisbn13.enable $(EXAMPLES)/ean-13.png 2>/dev/null|sha1sum|sed "s,-,zbarimg -Sisbn13.enable ean-13.png," >>$(EXAMPLES)/sha1sum $(ZBARIMG) -Supca.enable $(EXAMPLES)/code-upc-a.png 2>/dev/null|sha1sum|sed "s,-,zbarimg -Supca.enable code-upc-a.png," >>$(EXAMPLES)/sha1sum $(ZBARIMG) -Stest-inverted $(EXAMPLES)/qr-code-inverted.png 2>/dev/null|sha1sum|sed "s,-,zbarimg -Stest-inverted qr-code-inverted.png," >>$(EXAMPLES)/sha1sum test_progs: $(check_PROGRAMS) @$(MAKE) $(check_PROGRAMS) # Require X11 to work check-cpp: test/test_cpp_img @abs_top_builddir@/test/test_cpp_img check-decoder: test/test_decode @abs_top_builddir@/test/test_decode -q regress-decoder: test/test_decode @abs_top_builddir@/test/test_decode -q -n 100000 check-images-py: zbarimg/zbarimg @PYTHON@ @abs_top_srcdir@/test/barcodetest.py check-images: zbarimg/zbarimg @abs_top_builddir@/test/test_examples.sh check-convert: test/test_convert @abs_top_srcdir@/test/test_convert @if [ "`sha1sum /tmp/base.I420.zimg |cut -d' ' -f 1`" != \ "d697b0bb84617bef0f6413b3e5537ee38ba92312" ]; then \ echo "convert FAILED"; else echo "convert PASSED."; fi @rm /tmp/base.I420.zimg 2>/dev/null if HAVE_PYGTK2 check-pygtk: pygtk/zbarpygtk.la PYTHONPATH=@abs_top_srcdir@/pygtk/.libs/ \ @PYTHON@ @abs_top_srcdir@/test/test_pygtk.py else check-pygtk: endif if HAVE_PYTHON check-python: python/zbar.la PYTHONPATH=@abs_top_srcdir@/python/.libs/ \ @PYTHON@ @abs_top_srcdir@/test/test_python.py \ '@abs_top_srcdir@/examples/ean-13.png' '9789876543217' else check-python: endif check-gi: gtk/ZBar-1.0.typelib LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):@abs_top_srcdir@/gtk/.libs:@abs_top_srcdir@/zbar/.libs \ GI_TYPELIB_PATH=@abs_top_srcdir@/gtk/ \ @PYTHON@ @abs_top_srcdir@/test/test_gi.py # Require a camera device for it to work check-video: test/test_video @abs_top_srcdir@/test/test_video -q check-jpeg: test/test_jpeg @abs_top_srcdir@/test/test_jpeg -q if HAVE_DBUS # Require a working D-Bus - may fail with containers check-dbus: test/test_dbus @abs_top_builddir@/test/check_dbus.sh else check-dbus: endif if HAVE_JAVA_UNIT check-java: zbar/libzbar.la JAVA_HOME=${JAVA_HOME} $(MAKE) -C java check-java else check-java: endif regress: regress-decoder check-local: check-images-py check-decoder check-images check-java \ check-python regress other-tests: check-cpp check-convert check-video check-jpeg tests: check-local check-dbus other-tests .NOTPARALLEL: check-local regress tests PHONY += gen_checksum check-cpp check-decoder check-images check-dbus regress-decoder regress-images regress zbar-0.23/test/test_dbus.c0000664000175000017500000001350413471225716012451 00000000000000/*------------------------------------------------------------------------ * Copyright 2019 (c) Mauro Carvalho Chehab * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. *------------------------------------------------------------------------*/ #include #include #include #include #include #include #include #define ZBAR_INTERFACE "org.linuxtv.Zbar1.Code" #define ZBAR_SIGNAL_CODE "Code" #define ZBAR_SIGNAL_TYPE "Type" #define ZBAR_SIGNAL_DATA "Data" #define PROGRAM_NAME "test_dbus" static const char doc[] = "\nTest if ZBar is sending codes via D-Bus\n"; static const struct argp_option options[] = { {"count", 'c', "#codes", 0, "Stop after received #codes", 0}, {"time", 't', "#seconds", 0, "Stop after #seconds", 0}, {"help", '?', 0, 0, "Give this help list", -1}, {"usage", -3, 0, 0, "Give a short usage message", 0}, { 0 } }; static int max_msg = 0; static int timeout = 0; static error_t parse_opt(int k, char *optarg, struct argp_state *state) { switch (k) { case 'c': max_msg = strtoul(optarg, NULL, 0); break; case 't': timeout = strtoul(optarg, NULL, 0); break; case '?': argp_state_help(state, state->out_stream, ARGP_HELP_SHORT_USAGE | ARGP_HELP_LONG | ARGP_HELP_DOC); exit(0); case -3: argp_state_help(state, state->out_stream, ARGP_HELP_USAGE); exit(0); default: return ARGP_ERR_UNKNOWN; }; return 0; } static const struct argp argp = { .options = options, .parser = parse_opt, .doc = doc, }; int main(int argc, char *argv[]) { DBusMessage* msg; DBusMessageIter args, entry, dict, val; DBusConnection* conn; DBusError err; char *str, *property; int count = 0; if (argp_parse(&argp, argc, argv, ARGP_NO_HELP | ARGP_NO_EXIT, 0, 0)) { argp_help(&argp, stderr, ARGP_HELP_SHORT_USAGE, PROGRAM_NAME); return -1; } // initialise the error value dbus_error_init(&err); // connect to the DBUS system bus, and check for errors conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err); if (dbus_error_is_set(&err)) { fprintf(stderr, "Connection Error (%s)\n", err.message); dbus_error_free(&err); } if (!conn) { fprintf(stderr, "Connection Null\n"); return -1; } dbus_bus_add_match(conn, "type='signal',interface='" ZBAR_INTERFACE "'", &err); dbus_connection_flush(conn); if (dbus_error_is_set(&err)) { fprintf(stderr, "Match Error (%s)\n", err.message); exit(1); } if (timeout) alarm(timeout); /* loop listening for signals being emitted */ printf("Waiting for Zbar events\n"); while (true) { // non blocking read of the next available message dbus_connection_read_write(conn, 0); msg = dbus_connection_pop_message(conn); // loop again if we haven't read a message if (NULL == msg) { sleep(1); continue; } // check if the message is a signal from the correct interface and with the correct name if (dbus_message_is_signal(msg, ZBAR_INTERFACE, ZBAR_SIGNAL_CODE)) { // read the parameters if (!dbus_message_iter_init(msg, &args)) fprintf(stderr, "Message has no arguments!\n"); else if (DBUS_TYPE_ARRAY != dbus_message_iter_get_arg_type(&args)) fprintf(stderr, "Argument is not array!\n"); else { while (dbus_message_iter_get_arg_type(&args) != DBUS_TYPE_INVALID) { dbus_message_iter_recurse(&args, &entry); if (DBUS_TYPE_DICT_ENTRY != dbus_message_iter_get_arg_type(&entry)) { fprintf(stderr, "Element is not dict entry!\n"); } else { while (dbus_message_iter_get_arg_type(&entry) != DBUS_TYPE_INVALID) { dbus_message_iter_recurse(&entry, &dict); if (DBUS_TYPE_STRING != dbus_message_iter_get_arg_type(&dict)) { fprintf(stderr, "Dict Entry is not string!\n"); } else { dbus_message_iter_get_basic(&dict, &property); if (strcmp(property, ZBAR_SIGNAL_TYPE) == 0) { dbus_message_iter_next(&dict); dbus_message_iter_recurse(&dict, &val); dbus_message_iter_get_basic(&val, &str); printf("Type = %s\n", str); } else if (strcmp(property, ZBAR_SIGNAL_DATA) == 0) { dbus_message_iter_next(&dict); dbus_message_iter_recurse(&dict, &val); dbus_message_iter_get_basic(&val, &str); printf("Value = %s\n", str); } } dbus_message_iter_next(&entry); } /* If max_msg > 0, stops after receiving 'count' messages */ if (++count == max_msg) { dbus_message_unref(msg); return 0; } } dbus_message_iter_next(&args); } } } // free the message dbus_message_unref(msg); } return 0; } zbar-0.23/test/test_cpp.cpp0000664000175000017500000000300413471225716012630 00000000000000//------------------------------------------------------------------------ // Copyright 2007-2009 (c) Jeff Brown // // This file is part of the ZBar Bar Code Reader. // // The ZBar Bar Code Reader is free software; you can redistribute it // and/or modify it under the terms of the GNU Lesser Public License as // published by the Free Software Foundation; either version 2.1 of // the License, or (at your option) any later version. // // The ZBar Bar Code Reader 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 Lesser Public License for more details. // // You should have received a copy of the GNU Lesser Public License // along with the ZBar Bar Code Reader; if not, write to the Free // Software Foundation, Inc., 51 Franklin St, Fifth Floor, // Boston, MA 02110-1301 USA // // http://sourceforge.net/projects/zbar //------------------------------------------------------------------------ // NB do not put anything before this header // it's here to check that we didn't omit any dependencies #include int main (int argc, char **argv) { const char *video_dev = "/dev/video0"; if(argc > 1) video_dev = argv[1]; zbar::Processor proc = zbar::Processor(true, video_dev); proc.set_visible(); proc.set_active(); try { proc.user_wait(); } catch(zbar::ClosedError&) { } return(0); } zbar-0.23/test/test_decode.c0000664000175000017500000011230113471225716012732 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #include #include #include #include #include #include #include #include #include zbar_decoder_t *decoder; zbar_symbol_type_t expect_sym; char *expect_data = NULL; int rnd_size = 9; /* NB should be odd */ int wrong = 0, spurious = 0, missing = 0; #define zprintf(level, format, ...) do { \ if(verbosity >= (level)) { \ fprintf(stderr, format , ##__VA_ARGS__); \ } \ } while(0) #define PROGRAM_NAME "test_video" static const char doc[] = "\nGenerate barcodes and decode them with ZBar decoding logic\n"; static const struct argp_option options[] = { {"quiet", 'q', 0, 0, "Don't be verbose", 0}, {"verbose", 'v', 0, 0, "Increases verbosity level", 0}, {"random", 'r', 0, 0, "use a random seed", 0}, {"seed", 's', "seed", 0, "sets the random seed", 0}, {"number", 'n', "count", 0, "sets the number of interactions", 0}, {"help", '?', 0, 0, "Give this help list", -1}, {"usage", -3, 0, 0, "Give a short usage message", 0}, { 0 } }; unsigned seed = 0, rand_seed = 0; int verbosity = 1; int iter = 0, num_iter = 0; /* test iteration */ static error_t parse_opt(int k, char *optarg, struct argp_state *state) { switch (k) { case 'q': verbosity = 0; break; case 'v': verbosity++; break; case 'r': rand_seed = 1; break; case 's': seed = strtol(optarg, NULL, 0); break; case 'n': num_iter = strtol(optarg, NULL, 0); break; case '?': argp_state_help(state, state->out_stream, ARGP_HELP_SHORT_USAGE | ARGP_HELP_LONG | ARGP_HELP_DOC); exit(0); case -3: argp_state_help(state, state->out_stream, ARGP_HELP_USAGE); exit(0); default: return ARGP_ERR_UNKNOWN; }; return 0; } static const struct argp argp = { .options = options, .parser = parse_opt, .doc = doc, }; static inline void print_sep (int level) { zprintf(level, "----------------------------------------------------------\n"); } static void symbol_handler (zbar_decoder_t *decoder) { zbar_symbol_type_t sym = zbar_decoder_get_type(decoder); if(sym <= ZBAR_PARTIAL || sym == ZBAR_QRCODE) return; const char *data = zbar_decoder_get_data(decoder); if (sym != expect_sym) { zprintf(0, "[%d] SEED=%d: warning: expecting %s, got spurious %s\n", iter, seed, zbar_get_symbol_name(expect_sym), zbar_get_symbol_name(sym)); spurious++; return; } int pass = (sym == expect_sym) && !strcmp(data, expect_data) && zbar_decoder_get_data_length(decoder) == strlen(data); pass *= 3; zprintf(pass, "decode %s:%s\n", zbar_get_symbol_name(sym), data); if(!expect_sym) zprintf(0, "UNEXPECTED!\n"); else zprintf(pass, "expect %s:%s\n", zbar_get_symbol_name(expect_sym), expect_data); if(!pass) { zprintf(0, "[%d] SEED=%d: ERROR: expecting %s (%s), got %s (%s)\n", iter, seed, expect_data, zbar_get_symbol_name(expect_sym), data, zbar_get_symbol_name(sym)); wrong++; } expect_sym = ZBAR_NONE; free(expect_data); expect_data = NULL; } static void expect (zbar_symbol_type_t sym, const char *data) { if(expect_sym) { zprintf(0, "[%d] SEED=%d: missing decode: %s (%s)\n", iter, seed, zbar_get_symbol_name(expect_sym), expect_data); missing++; } expect_sym = sym; expect_data = (data) ? strdup(data) : NULL; } static void encode_junk (int n) { if(n > 1) zprintf(3, "encode random junk...\n"); int i; for(i = 0; i < n; i++) zbar_decode_width(decoder, 20. * (rand() / (RAND_MAX + 1.)) + 1); } #define FWD 1 #define REV 0 static void encode (uint64_t units, int fwd) { zprintf(3, " raw=%x%x%c\n", (unsigned)(units >> 32), (unsigned)(units & 0xffffffff), (fwd) ? '<' : '>'); if(!fwd) while(units && !(units >> 0x3c)) units <<= 4; while(units) { unsigned char w = (fwd) ? units & 0xf : units >> 0x3c; zbar_decode_width(decoder, w); if(fwd) units >>= 4; else units <<= 4; } } /*------------------------------------------------------------*/ /* Code 128 encoding */ typedef enum code128_char_e { FNC3 = 0x60, FNC2 = 0x61, SHIFT = 0x62, CODE_C = 0x63, CODE_B = 0x64, CODE_A = 0x65, FNC1 = 0x66, START_A = 0x67, START_B = 0x68, START_C = 0x69, STOP = 0x6a, } code128_char_t; static const unsigned int code128[107] = { 0x212222, 0x222122, 0x222221, 0x121223, /* 00 */ 0x121322, 0x131222, 0x122213, 0x122312, 0x132212, 0x221213, 0x221312, 0x231212, /* 08 */ 0x112232, 0x122132, 0x122231, 0x113222, 0x123122, 0x123221, 0x223211, 0x221132, /* 10 */ 0x221231, 0x213212, 0x223112, 0x312131, 0x311222, 0x321122, 0x321221, 0x312212, /* 18 */ 0x322112, 0x322211, 0x212123, 0x212321, 0x232121, 0x111323, 0x131123, 0x131321, /* 20 */ 0x112313, 0x132113, 0x132311, 0x211313, 0x231113, 0x231311, 0x112133, 0x112331, /* 28 */ 0x132131, 0x113123, 0x113321, 0x133121, 0x313121, 0x211331, 0x231131, 0x213113, /* 30 */ 0x213311, 0x213131, 0x311123, 0x311321, 0x331121, 0x312113, 0x312311, 0x332111, /* 38 */ 0x314111, 0x221411, 0x431111, 0x111224, 0x111422, 0x121124, 0x121421, 0x141122, /* 40 */ 0x141221, 0x112214, 0x112412, 0x122114, 0x122411, 0x142112, 0x142211, 0x241211, /* 48 */ 0x221114, 0x413111, 0x241112, 0x134111, 0x111242, 0x121142, 0x121241, 0x114212, /* 50 */ 0x124112, 0x124211, 0x411212, 0x421112, 0x421211, 0x212141, 0x214121, 0x412121, /* 58 */ 0x111143, 0x111341, 0x131141, 0x114113, 0x114311, 0x411113, 0x411311, 0x113141, /* 60 */ 0x114131, 0x311141, 0x411131, 0xa211412, 0xa211214, 0xa211232, /* START_A-START_C (67-69) */ 0x2331112a, /* STOP (6a) */ }; static void encode_code128b (char *data) { assert(zbar_decoder_get_color(decoder) == ZBAR_SPACE); print_sep(3); zprintf(2, "CODE-128(B): %s\n", data); zprintf(3, " encode START_B: %02x", START_B); encode(code128[START_B], 0); int i, chk = START_B; for(i = 0; data[i]; i++) { zprintf(3, " encode '%c': %02x", data[i], data[i] - 0x20); encode(code128[data[i] - 0x20], 0); chk += (i + 1) * (data[i] - 0x20); } chk %= 103; zprintf(3, " encode checksum: %02x", chk); encode(code128[chk], 0); zprintf(3, " encode STOP: %02x", STOP); encode(code128[STOP], 0); print_sep(3); } static void encode_code128c (char *data) { assert(zbar_decoder_get_color(decoder) == ZBAR_SPACE); print_sep(3); zprintf(2, "CODE-128(C): %s\n", data); zprintf(3, " encode START_C: %02x", START_C); encode(code128[START_C], 0); int i, chk = START_C; for(i = 0; data[i]; i += 2) { assert(data[i] >= '0'); assert(data[i + 1] >= '0'); unsigned char c = (data[i] - '0') * 10 + (data[i + 1] - '0'); zprintf(3, " encode '%c%c': %02d", data[i], data[i + 1], c); encode(code128[c], 0); chk += (i / 2 + 1) * c; } chk %= 103; zprintf(3, " encode checksum: %02x", chk); encode(code128[chk], 0); zprintf(3, " encode STOP: %02x", STOP); encode(code128[STOP], 0); print_sep(3); } /*------------------------------------------------------------*/ /* Code 93 encoding */ #define CODE93_START_STOP 0x2f static const unsigned int code93[47 + 1] = { 0x131112, 0x111213, 0x111312, 0x111411, /* 00 */ 0x121113, 0x121212, 0x121311, 0x111114, 0x131211, 0x141111, 0x211113, 0x211212, /* 08 */ 0x211311, 0x221112, 0x221211, 0x231111, 0x112113, 0x112212, 0x112311, 0x122112, /* 10 */ 0x132111, 0x111123, 0x111222, 0x111321, 0x121122, 0x131121, 0x212112, 0x212211, /* 18 */ 0x211122, 0x211221, 0x221121, 0x222111, 0x112122, 0x112221, 0x122121, 0x123111, /* 20 */ 0x121131, 0x311112, 0x311211, 0x321111, 0x112131, 0x113121, 0x211131, 0x121221, /* 28 */ 0x312111, 0x311121, 0x122211, 0x111141, /* START/STOP (2f) */ }; #define S1 0x2b00| #define S2 0x2c00| #define S3 0x2d00| #define S4 0x2e00| static const unsigned short code93_ext[0x80] = { S2'U', S1'A', S1'B', S1'C', S1'D', S1'E', S1'F', S1'G', S1'H', S1'I', S1'J', S1'K', S1'L', S1'M', S1'N', S1'O', S1'P', S1'Q', S1'R', S1'S', S1'T', S1'U', S1'V', S1'W', S1'X', S1'Y', S1'Z', S2'A', S2'B', S2'C', S2'D', S2'E', 0x26, S3'A', S3'B', S3'C', 0x27, 0x2a, S3'F', S3'G', S3'H', S3'I', S3'J', 0x29, S3'L', 0x24, 0x25, 0x28, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, S3'Z', S2'F', S2'G', S2'H', S2'I', S2'J', S2'V', 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, S2'K', S2'L', S2'M', S2'N', S2'O', S2'W', S4'A', S4'B', S4'C', S4'D', S4'E', S4'F', S4'G', S4'H', S4'I', S4'J', S4'K', S4'L', S4'M', S4'N', S4'O', S4'P', S4'Q', S4'R', S4'S', S4'T', S4'U', S4'V', S4'W', S4'X', S4'Y', S4'Z', S2'P', S2'Q', S2'R', S2'S', S2'T', }; #undef S1 #undef S2 #undef S3 #undef S4 static void encode_char93 (unsigned char c, int dir) { unsigned ext = code93_ext[c]; unsigned shift = ext >> 8; assert(shift < 0x30); c = ext & 0xff; if(shift) { assert(c < 0x80); c = code93_ext[c]; } assert(c < 0x30); if(shift) { encode(code93[(dir) ? shift : c], dir ^ 1); encode(code93[(dir) ? c : shift], dir ^ 1); } else encode(code93[c], dir ^ 1); } static void encode_code93 (char *data, int dir) { assert(zbar_decoder_get_color(decoder) == ZBAR_SPACE); print_sep(3); /* calculate checksums */ int i, j, chk_c = 0, chk_k = 0, n = 0; for(i = 0; data[i]; i++, n++) { unsigned c = data[i], ext; assert(c < 0x80); ext = code93_ext[c]; n += ext >> 13; } for(i = 0, j = 0; data[i]; i++, j++) { unsigned ext = code93_ext[(unsigned)data[i]]; unsigned shift = ext >> 8; unsigned c = ext & 0xff; if(shift) { chk_c += shift * (((n - 1 - j) % 20) + 1); chk_k += shift * (((n - j) % 15) + 1); j++; c = code93_ext[c]; } chk_c += c * (((n - 1 - j) % 20) + 1); chk_k += c * (((n - j) % 15) + 1); } chk_c %= 47; chk_k += chk_c; chk_k %= 47; zprintf(2, "CODE-93: %s (n=%x C=%02x K=%02x)\n", data, n, chk_c, chk_k); encode(0xa, 0); /* leading quiet */ zprintf(3, " encode %s:", (dir) ? "START" : "STOP"); if(!dir) encode(0x1, REV); encode(code93[CODE93_START_STOP], dir ^ 1); if(!dir) { zprintf(3, " encode checksum (K): %02x", chk_k); encode(code93[chk_k], REV ^ 1); zprintf(3, " encode checksum (C): %02x", chk_c); encode(code93[chk_c], REV ^ 1); } n = strlen(data); for(i = 0; i < n; i++) { unsigned char c = data[(dir) ? i : (n - i - 1)]; zprintf(3, " encode '%c':", c); encode_char93(c, dir); } if(dir) { zprintf(3, " encode checksum (C): %02x", chk_c); encode(code93[chk_c], FWD ^ 1); zprintf(3, " encode checksum (K): %02x", chk_k); encode(code93[chk_k], FWD ^ 1); } zprintf(3, " encode %s:", (dir) ? "STOP" : "START"); encode(code93[CODE93_START_STOP], dir ^ 1); if(dir) encode(0x1, FWD); encode(0xa, 0); /* trailing quiet */ print_sep(3); } /*------------------------------------------------------------*/ /* Code 39 encoding */ static const unsigned int code39[91-32] = { 0x0c4, 0x000, 0x000, 0x000, 0x0a8, 0x02a, 0x000, 0x000, /* 20 */ 0x000, 0x000, 0x094, 0x08a, 0x000, 0x085, 0x184, 0x0a2, /* 28 */ 0x034, 0x121, 0x061, 0x160, 0x031, 0x130, 0x070, 0x025, /* 30 */ 0x124, 0x064, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, /* 38 */ 0x000, 0x109, 0x049, 0x148, 0x019, 0x118, 0x058, 0x00d, /* 40 */ 0x10c, 0x04c, 0x01c, 0x103, 0x043, 0x142, 0x013, 0x112, /* 48 */ 0x052, 0x007, 0x106, 0x046, 0x016, 0x181, 0x0c1, 0x1c0, /* 50 */ 0x091, 0x190, 0x0d0, /* 58 */ }; /* FIXME configurable/randomized ratio, ics */ /* FIXME check digit option, ASCII escapes */ static void convert_code39 (char *data) { char *src, *dst; for(src = data, dst = data; *src; src++) { char c = *src; if(c >= 'a' && c <= 'z') *(dst++) = c - ('a' - 'A'); else if(c == ' ' || c == '$' || c == '%' || c == '+' || c == '-' || (c >= '.' && c <= '9') || (c >= 'A' && c <= 'Z')) *(dst++) = c; else /* skip (FIXME) */; } *dst = 0; } static void encode_char39 (unsigned char c, unsigned ics) { assert(0x20 <= c && c <= 0x5a); unsigned int raw = code39[c - 0x20]; if(!raw) return; /* skip (FIXME) */ uint64_t enc = 0; int j; for(j = 0; j < 9; j++) { enc = (enc << 4) | ((raw & 0x100) ? 2 : 1); raw <<= 1; } enc = (enc << 4) | ics; zprintf(3, " encode '%c': %02x%08x: ", c, (unsigned)(enc >> 32), (unsigned)(enc & 0xffffffff)); encode(enc, REV); } static void encode_code39 (char *data) { assert(zbar_decoder_get_color(decoder) == ZBAR_SPACE); print_sep(3); zprintf(2, "CODE-39: %s\n", data); encode(0xa, 0); /* leading quiet */ encode_char39('*', 1); int i; for(i = 0; data[i]; i++) if(data[i] != '*') /* skip (FIXME) */ encode_char39(data[i], 1); encode_char39('*', 0xa); /* w/trailing quiet */ print_sep(3); } #if 0 /*------------------------------------------------------------*/ /* PDF417 encoding */ /* hardcoded test message: "hello world" */ #define PDF417_ROWS 3 #define PDF417_COLS 3 static const unsigned pdf417_msg[PDF417_ROWS][PDF417_COLS] = { { 007, 817, 131 }, { 344, 802, 437 }, { 333, 739, 194 }, }; #define PDF417_START UINT64_C(0x81111113) #define PDF417_STOP UINT64_C(0x711311121) #include "pdf417_encode.h" static int calc_ind417 (int mod, int r, int cols) { mod = (mod + 3) % 3; int cw = 30 * (r / 3); if(!mod) return(cw + cols - 1); else if(mod == 1) return(cw + (PDF417_ROWS - 1) % 3); assert(mod == 2); return(cw + (PDF417_ROWS - 1) / 3); } static void encode_row417 (int r, const unsigned *cws, int cols, int dir) { int k = r % 3; zprintf(3, " [%d] encode %s:", r, (dir) ? "stop" : "start"); encode((dir) ? PDF417_STOP : PDF417_START, dir); int cw = calc_ind417(k + !dir, r, cols); zprintf(3, " [%d,%c] encode %03d(%d): ", r, (dir) ? 'R' : 'L', cw, k); encode(pdf417_encode[cw][k], dir); int c; for(c = 0; c < cols; c++) { cw = cws[c]; zprintf(3, " [%d,%d] encode %03d(%d): ", r, c, cw, k); encode(pdf417_encode[cw][k], dir); } cw = calc_ind417(k + dir, r, cols); zprintf(3, " [%d,%c] encode %03d(%d): ", r, (dir) ? 'L' : 'R', cw, k); encode(pdf417_encode[cw][k], dir); zprintf(3, " [%d] encode %s:", r, (dir) ? "start" : "stop"); encode((dir) ? PDF417_START : PDF417_STOP, dir); } static void encode_pdf417 (char *data) { assert(zbar_decoder_get_color(decoder) == ZBAR_SPACE); print_sep(3); zprintf(2, "PDF417: hello world\n"); encode(0xa, 0); int r; for(r = 0; r < PDF417_ROWS; r++) { encode_row417(r, pdf417_msg[r], PDF417_COLS, r & 1); encode(0xa, 0); } print_sep(3); } #endif /*------------------------------------------------------------*/ /* Codabar encoding */ static const unsigned int codabar[20] = { 0x03, 0x06, 0x09, 0x60, 0x12, 0x42, 0x21, 0x24, 0x30, 0x48, 0x0c, 0x18, 0x45, 0x51, 0x54, 0x15, 0x1a, 0x29, 0x0b, 0x0e, }; static const char codabar_char[0x14] = "0123456789-$:/.+ABCD"; /* FIXME configurable/randomized ratio, ics */ /* FIXME check digit option */ static char *convert_codabar (char *src) { unsigned len = strlen(src); char tmp[4] = { 0, }; if(len < 2) { unsigned delim = rand() >> 8; tmp[0] = delim & 3; if(len) tmp[1] = src[0]; tmp[len + 1] = (delim >> 2) & 3; len += 2; src = tmp; } char *result = malloc(len + 1); char *dst = result; *(dst++) = ((*(src++) - 1) & 0x3) + 'A'; for(len--; len > 1; len--) { char c = *(src++); if(c >= '0' && c <= '9') *(dst++) = c; else if(c == '-' || c == '$' || c == ':' || c == '/' || c == '.' || c == '+') *(dst++) = c; else *(dst++) = codabar_char[c % 0x10]; } *(dst++) = ((*(src++) - 1) & 0x3) + 'A'; *dst = 0; return(result); } static void encode_codachar (unsigned char c, unsigned ics, int dir) { unsigned int idx; if(c >= '0' && c <= '9') idx = c - '0'; else if(c >= 'A' && c <= 'D') idx = c - 'A' + 0x10; else switch(c) { case '-': idx = 0xa; break; case '$': idx = 0xb; break; case ':': idx = 0xc; break; case '/': idx = 0xd; break; case '.': idx = 0xe; break; case '+': idx = 0xf; break; default: assert(0); } assert(idx < 0x14); unsigned int raw = codabar[idx]; uint32_t enc = 0; int j; for(j = 0; j < 7; j++, raw <<= 1) enc = (enc << 4) | ((raw & 0x40) ? 3 : 1); zprintf(3, " encode '%c': %07x: ", c, enc); if(dir) enc = (enc << 4) | ics; else enc |= ics << 28; encode(enc, 1 - dir); } static void encode_codabar (char *data, int dir) { assert(zbar_decoder_get_color(decoder) == ZBAR_SPACE); print_sep(3); zprintf(2, "CODABAR: %s\n", data); encode(0xa, 0); /* leading quiet */ int i, n = strlen(data); for(i = 0; i < n; i++) { int j = (dir) ? i : n - i - 1; encode_codachar(data[j], (i < n - 1) ? 1 : 0xa, dir); } print_sep(3); } /*------------------------------------------------------------*/ /* Interleaved 2 of 5 encoding */ static const unsigned char i25[10] = { 0x06, 0x11, 0x09, 0x18, 0x05, 0x14, 0x0c, 0x03, 0x12, 0x0a, }; static void encode_i25 (char *data, int dir) { assert(zbar_decoder_get_color(decoder) == ZBAR_SPACE); print_sep(3); zprintf(2, "Interleaved 2 of 5: %s\n", data); zprintf(3, " encode start:"); encode((dir) ? 0xa1111 : 0xa112, 0); /* FIXME rev case data reversal */ int i; for(i = (strlen(data) & 1) ? -1 : 0; i < 0 || data[i]; i += 2) { /* encode 2 digits */ unsigned char c0 = (i < 0) ? 0 : data[i] - '0'; unsigned char c1 = data[i + 1] - '0'; zprintf(3, " encode '%d%d':", c0, c1); assert(c0 < 10); assert(c1 < 10); c0 = i25[c0]; c1 = i25[c1]; /* interleave */ uint64_t enc = 0; int j; for(j = 0; j < 5; j++) { enc <<= 8; enc |= (c0 & 1) ? 0x02 : 0x01; enc |= (c1 & 1) ? 0x20 : 0x10; c0 >>= 1; c1 >>= 1; } encode(enc, dir); } zprintf(3, " encode end:"); encode((dir) ? 0x211a : 0x1111a, 0); print_sep(3); } /*------------------------------------------------------------*/ /* DataBar encoding */ /* character encoder reference algorithm from ISO/IEC 24724:2009 */ struct rss_group { int T_odd, T_even, n_odd, w_max; }; static const struct rss_group databar_groups_outside[] = { { 161, 1, 12, 8 }, { 80, 10, 10, 6 }, { 31, 34, 8, 4 }, { 10, 70, 6, 3 }, { 1, 126, 4, 1 }, { 0, } }; static const struct rss_group databar_groups_inside[] = { { 4, 84, 5, 2 }, { 20, 35, 7, 4 }, { 48, 10, 9, 6 }, { 81, 1, 11, 8 }, { 0, } }; static const uint32_t databar_finders[9] = { 0x38211, 0x35511, 0x33711, 0x31911, 0x27411, 0x25611, 0x23811, 0x15711, 0x13911, }; int combins (int n, int r) { int i, j; int maxDenom, minDenom; int val; if(n-r > r) { minDenom = r; maxDenom = n-r; } else { minDenom = n-r; maxDenom = r; } val = 1; j = 1; for(i = n; i > maxDenom; i--) { val *= i; if(j <= minDenom) { val /= j; j++; } } for(; j <= minDenom; j++) val /= j; return(val); } void getRSSWidths (int val, int n, int elements, int maxWidth, int noNarrow, int *widths) { int narrowMask = 0; int bar; for(bar = 0; bar < elements - 1; bar++) { int elmWidth, subVal; for(elmWidth = 1, narrowMask |= (1<= elements-bar-1)) subVal -= combins(n-elmWidth-(elements-bar), elements-bar-2); if(elements-bar-1 > 1) { int mxwElement, lessVal = 0; for (mxwElement = n-elmWidth-(elements-bar-2); mxwElement > maxWidth; mxwElement--) lessVal += combins(n-elmWidth-mxwElement-1, elements-bar-3); subVal -= lessVal * (elements-1-bar); } else if (n-elmWidth > maxWidth) subVal--; val -= subVal; if(val < 0) break; } val += subVal; n -= elmWidth; widths[bar] = elmWidth; } widths[bar] = n; } static uint64_t encode_databar_char (unsigned val, const struct rss_group *grp, int nmodules, int nelems, int dir) { int G_sum = 0; while(1) { assert(grp->T_odd); int sum = G_sum + grp->T_odd * grp->T_even; if(val >= sum) G_sum = sum; else break; grp++; } zprintf(3, "char=%d", val); int V_grp = val - G_sum; int V_odd, V_even; if(!dir) { V_odd = V_grp / grp->T_even; V_even = V_grp % grp->T_even; } else { V_even = V_grp / grp->T_odd; V_odd = V_grp % grp->T_odd; } zprintf(3, " G_sum=%d T_odd=%d T_even=%d n_odd=%d w_max=%d V_grp=%d\n", G_sum, grp->T_odd, grp->T_even, grp->n_odd, grp->w_max, V_grp); int odd[16]; getRSSWidths(V_odd, grp->n_odd, nelems, grp->w_max, !dir, odd); zprintf(3, " V_odd=%d odd=%d%d%d%d", V_odd, odd[0], odd[1], odd[2], odd[3]); int even[16]; getRSSWidths(V_even, nmodules - grp->n_odd, nelems, 9 - grp->w_max, dir, even); zprintf(3, " V_even=%d even=%d%d%d%d", V_even, even[0], even[1], even[2], even[3]); uint64_t units = 0; int i; for(i = 0; i < nelems; i++) units = (units << 8) | (odd[i] << 4) | even[i]; zprintf(3, " raw=%"PRIx64"\n", units); return(units); } #define SWAP(a, b) do { \ uint32_t tmp = (a); \ (a) = (b); \ (b) = tmp; \ } while(0); static void encode_databar (char *data, int dir) { assert(zbar_decoder_get_color(decoder) == ZBAR_SPACE); print_sep(3); zprintf(2, "DataBar: %s\n", data); uint32_t v[4] = { 0, }; int i, j; for(i = 0; i < 14; i++) { for(j = 0; j < 4; j++) v[j] *= 10; assert(data[i]); v[0] += data[i] - '0'; v[1] += v[0] / 1597; v[0] %= 1597; v[2] += v[1] / 2841; v[1] %= 2841; v[3] += v[2] / 1597; v[2] %= 1597; /*printf(" [%d] %c (%d,%d,%d,%d)\n", i, data[i], v[0], v[1], v[2], v[3]);*/ } zprintf(3, "chars=(%d,%d,%d,%d)\n", v[3], v[2], v[1], v[0]); uint32_t c[4] = { encode_databar_char(v[3], databar_groups_outside, 16, 4, 0), encode_databar_char(v[2], databar_groups_inside, 15, 4, 1), encode_databar_char(v[1], databar_groups_outside, 16, 4, 0), encode_databar_char(v[0], databar_groups_inside, 15, 4, 1), }; int chk = 0, w = 1; for(i = 0; i < 4; i++, chk %= 79, w %= 79) for(j = 0; j < 8; j++, w *= 3) chk += ((c[i] >> (28 - j * 4)) & 0xf) * w; zprintf(3, "chk=%d\n", chk); if(chk >= 8) chk++; if(chk >= 72) chk++; int C_left = chk / 9; int C_right = chk % 9; if(dir == REV) { SWAP(C_left, C_right); SWAP(c[0], c[2]); SWAP(c[1], c[3]); SWAP(v[0], v[2]); SWAP(v[1], v[3]); } zprintf(3, " encode start guard:"); encode_junk(dir); encode(0x1, FWD); zprintf(3, "encode char[0]=%d", v[3]); encode(c[0], REV); zprintf(3, "encode left finder=%d", C_left); encode(databar_finders[C_left], REV); zprintf(3, "encode char[1]=%d", v[2]); encode(c[1], FWD); zprintf(3, "encode char[3]=%d", v[0]); encode(c[3], REV); zprintf(3, "encode right finder=%d", C_right); encode(databar_finders[C_right], FWD); zprintf(3, "encode char[2]=%d", v[1]); encode(c[2], FWD); zprintf(3, " encode end guard:"); encode(0x1, FWD); encode_junk(!dir); print_sep(3); } /*------------------------------------------------------------*/ /* EAN/UPC encoding */ static const unsigned int ean_digits[10] = { 0x1123, 0x1222, 0x2212, 0x1141, 0x2311, 0x1321, 0x4111, 0x2131, 0x3121, 0x2113, }; static const unsigned int ean_guard[] = { 0, 0, 0x11, /* [2] add-on delineator */ 0x1117, /* [3] normal guard bars */ 0x2117, /* [4] add-on guard bars */ 0x11111, /* [5] center guard bars */ 0x111111 /* [6] "special" guard bars */ }; static const unsigned char ean_parity_encode[] = { 0x3f, /* AAAAAA = 0 */ 0x34, /* AABABB = 1 */ 0x32, /* AABBAB = 2 */ 0x31, /* AABBBA = 3 */ 0x2c, /* ABAABB = 4 */ 0x26, /* ABBAAB = 5 */ 0x23, /* ABBBAA = 6 */ 0x2a, /* ABABAB = 7 */ 0x29, /* ABABBA = 8 */ 0x25, /* ABBABA = 9 */ }; static const unsigned char addon_parity_encode[] = { 0x07, /* BBAAA = 0 */ 0x0b, /* BABAA = 1 */ 0x0d, /* BAABA = 2 */ 0x0e, /* BAAAB = 3 */ 0x13, /* ABBAA = 4 */ 0x19, /* AABBA = 5 */ 0x1c, /* AAABB = 6 */ 0x15, /* ABABA = 7 */ 0x16, /* ABAAB = 8 */ 0x1a, /* AABAB = 9 */ }; static void calc_ean_parity (char *data, int n) { int i, chk = 0; for(i = 0; i < n; i++) { unsigned char c = data[i] - '0'; chk += ((i ^ n) & 1) ? c * 3 : c; } chk %= 10; if(chk) chk = 10 - chk; data[i++] = '0' + chk; data[i] = 0; } static void encode_ean13 (char *data) { int i; unsigned char par = ean_parity_encode[data[0] - '0']; assert(zbar_decoder_get_color(decoder) == ZBAR_SPACE); print_sep(3); zprintf(2, "EAN-13: %s (%02x)\n", data, par); zprintf(3, " encode start guard:"); encode(ean_guard[3], FWD); for(i = 1; i < 7; i++, par <<= 1) { zprintf(3, " encode %x%c:", (par >> 5) & 1, data[i]); encode(ean_digits[data[i] - '0'], (par >> 5) & 1); } zprintf(3, " encode center guard:"); encode(ean_guard[5], FWD); for(; i < 13; i++) { zprintf(3, " encode %x%c:", 0, data[i]); encode(ean_digits[data[i] - '0'], FWD); } zprintf(3, " encode end guard:"); encode(ean_guard[3], REV); print_sep(3); } static void encode_ean8 (char *data) { int i; assert(zbar_decoder_get_color(decoder) == ZBAR_SPACE); print_sep(3); zprintf(2, "EAN-8: %s\n", data); zprintf(3, " encode start guard:"); encode(ean_guard[3], FWD); for(i = 0; i < 4; i++) { zprintf(3, " encode %c:", data[i]); encode(ean_digits[data[i] - '0'], FWD); } zprintf(3, " encode center guard:"); encode(ean_guard[5], FWD); for(; i < 8; i++) { zprintf(3, " encode %c:", data[i]); encode(ean_digits[data[i] - '0'], FWD); } zprintf(3, " encode end guard:"); encode(ean_guard[3], REV); print_sep(3); } static void encode_addon (char *data, unsigned par, int n) { int i; assert(zbar_decoder_get_color(decoder) == ZBAR_SPACE); print_sep(3); zprintf(2, "EAN-%d: %s (par=%02x)\n", n, data, par); zprintf(3, " encode start guard:"); encode(ean_guard[4], FWD); for(i = 0; i < n; i++, par <<= 1) { zprintf(3, " encode %x%c:", (par >> (n - 1)) & 1, data[i]); encode(ean_digits[data[i] - '0'], (par >> (n - 1)) & 1); if(i < n - 1) { zprintf(3, " encode delineator:"); encode(ean_guard[2], FWD); } } zprintf(3, " encode trailing qz:"); encode(0x7, FWD); print_sep(3); } static void encode_ean5 (char *data) { unsigned chk = ((data[0] - '0' + data[2] - '0' + data[4] - '0') * 3 + (data[1] - '0' + data[3] - '0') * 9) % 10; encode_addon(data, addon_parity_encode[chk], 5); } static void encode_ean2 (char *data) { unsigned par = (~(10 * (data[0] - '0') + data[1] - '0')) & 3; encode_addon(data, par, 2); } /*------------------------------------------------------------*/ /* main test flow */ int test_databar_F_1 () { expect(ZBAR_DATABAR, "0124012345678905"); assert(zbar_decoder_get_color(decoder) == ZBAR_SPACE); encode(0x11, 0); encode(0x31111333, 0); encode(0x13911, 0); encode(0x31131231, 0); encode(0x11214222, 0); encode(0x11553, 0); encode(0x21231313, 0); encode(0x1, 0); encode_junk(rnd_size); return(0); } int test_databar_F_3 () { expect(ZBAR_DATABAR_EXP, "1012A"); assert(zbar_decoder_get_color(decoder) == ZBAR_SPACE); encode(0x11, 0); encode(0x11521151, 0); encode(0x18411, 0); encode(0x13171121, 0); encode(0x11521232, 0); encode(0x11481, 0); encode(0x23171111, 0); encode(0x1, 0); encode_junk(rnd_size); return(0); } int test_orange () { char data[32] = "0100845963000052"; expect(ZBAR_DATABAR, data); assert(zbar_decoder_get_color(decoder) == ZBAR_SPACE); encode(0x1, 0); encode(0x23212321, 0); // data[0] encode(0x31911, 0); // finder[?] = 3 encode(0x21121215, 1); // data[1] encode(0x41111133, 0); // data[3] encode(0x23811, 1); // finder[?] = 6 encode(0x11215141, 1); // data[2] encode(0x11, 0); encode_junk(rnd_size); expect(ZBAR_DATABAR, data); data[1] = '0'; encode_databar(data + 1, FWD); encode_junk(rnd_size); return(0); } int test_numeric (char *data) { char tmp[32] = "01"; strncpy(tmp + 2, data + 1, 13); tmp[15]='\0'; calc_ean_parity(tmp + 2, 13); expect(ZBAR_DATABAR, tmp); tmp[1] = data[0] & '1'; encode_databar(tmp + 1, (rand() >> 8) & 1); encode_junk(rnd_size); data[strlen(data) & ~1] = 0; expect(ZBAR_CODE128, data); encode_code128c(data); encode_junk(rnd_size); expect(ZBAR_I25, data); encode_i25(data, FWD); encode_junk(rnd_size); #if 0 /* FIXME encoding broken */ encode_i25(data, REV); encode_junk(rnd_size); #endif char *cdb = convert_codabar(data); expect(ZBAR_CODABAR, cdb); encode_codabar(cdb, FWD); encode_junk(rnd_size); expect(ZBAR_CODABAR, cdb); encode_codabar(cdb, REV); encode_junk(rnd_size); free(cdb); calc_ean_parity(data + 2, 12); expect(ZBAR_EAN13, data + 2); encode_ean13(data + 2); encode_junk(rnd_size); calc_ean_parity(data + 7, 7); expect(ZBAR_EAN8, data + 7); encode_ean8(data + 7); encode_junk(rnd_size); data[5] = 0; expect(ZBAR_EAN5, data); encode_ean5(data); encode_junk(rnd_size); data[2] = 0; expect(ZBAR_EAN2, data); encode_ean2(data); encode_junk(rnd_size); expect(ZBAR_NONE, NULL); return(0); } int test_alpha (char *data) { expect(ZBAR_CODE128, data); encode_code128b(data); encode_junk(rnd_size); expect(ZBAR_CODE93, data); encode_code93(data, FWD); encode_junk(rnd_size); expect(ZBAR_CODE93, data); encode_code93(data, REV); encode_junk(rnd_size); char *cdb = convert_codabar(data); expect(ZBAR_CODABAR, cdb); encode_codabar(cdb, FWD); encode_junk(rnd_size); expect(ZBAR_CODABAR, cdb); encode_codabar(cdb, REV); encode_junk(rnd_size); free(cdb); convert_code39(data); expect(ZBAR_CODE39, data); encode_code39(data); encode_junk(rnd_size); #if 0 /* FIXME decoder unfinished */ encode_pdf417(data); encode_junk(rnd_size); #endif expect(ZBAR_NONE, NULL); return(0); } int test1 () { print_sep(2); if(!seed) seed = 0xbabeface; zprintf(1, "[%d] SEED=%d\n", iter, seed); srand(seed); int i; char data[32]; for(i = 0; i < 14; i++) { data[i] = (rand() % 10) + '0'; } data[i] = 0; zprintf(1, "testing data: %s\n", data); test_numeric(data); for(i = 0; i < 10; i++) data[i] = (rand() % 0x5f) + 0x20; data[i] = 0; zprintf(1, "testing alpha: %s\n", data); test_alpha(data); return(0); } /* FIXME TBD: * - random module width (!= 1.0) * - simulate scan speed variance * - simulate dark "swelling" and light "blooming" * - inject parity errors */ float percent(int count, int iter) { if (iter <= 1) { if (count) return 100.0; else return 0.0; } return (count * 100.0) / iter; } int main (int argc, char *argv[]) { if (argp_parse(&argp, argc, argv, ARGP_NO_HELP | ARGP_NO_EXIT, 0, 0)) { argp_help(&argp, stderr, ARGP_HELP_SHORT_USAGE, PROGRAM_NAME); return -1; } if (rand_seed) { seed = time(NULL); srand(seed); seed = (rand() << 8) ^ rand(); zprintf(0, "Random SEED=%d\n", seed); } decoder = zbar_decoder_create(); /* allow empty CODE39 symbologies */ zbar_decoder_set_config(decoder, ZBAR_CODE39, ZBAR_CFG_MIN_LEN, 0); /* enable addons */ zbar_decoder_set_config(decoder, ZBAR_EAN2, ZBAR_CFG_ENABLE, 1); zbar_decoder_set_config(decoder, ZBAR_EAN5, ZBAR_CFG_ENABLE, 1); zbar_decoder_set_handler(decoder, symbol_handler); encode_junk(rnd_size + 1); if (num_iter) { for (iter == 0; iter < num_iter; iter++) { test1(); seed = (rand() << 8) ^ rand(); } } else { test_databar_F_1(); test_databar_F_3(); test_orange(); test1(); } zbar_decoder_destroy(decoder); if (!wrong && percent(spurious, num_iter) <= 0.01 && percent(missing, num_iter) <= 0.01) { if (spurious || missing) printf("decoder PASSED with %d spurious (%02.4f%%) and %d missing(%02.4f%%).\n", spurious, percent(spurious, num_iter), missing, percent(missing, num_iter)); else printf("decoder PASSED.\n"); } else { printf("decoder FAILED with %d wrong decoding(%02.4f%%), %d spurious (%02.4f%%) and %d missing(%02.4f%%).\n", wrong, percent(wrong, num_iter), spurious, percent(spurious, num_iter), missing, percent(missing, num_iter)); return 1; } return(0); } zbar-0.23/test/test_video.c0000664000175000017500000001541513471225716012625 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #include #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDLIB_H # include #endif #include #include #include #include #include #include #include "test_images.h" #ifdef _WIN32 struct timespec { time_t tv_sec; long tv_nsec; }; #endif zbar_video_t *video; #define PROGRAM_NAME "test_video" static const char doc[] = "\nTest if ZBar is able to handle a video input (camera)\n"; static const struct argp_option options[] = { {"quiet", 'q', 0, 0, "Don't be verbose", 0}, {"dev", 'd', "devnode", 0, "open devnode for video in", 0}, {"format",'f', "fourcc", 0, "Stop after #seconds", 0}, {"help", '?', 0, 0, "Give this help list", -1}, {"usage", -3, 0, 0, "Give a short usage message", 0}, { 0 } }; static int quiet = 0; uint32_t vidfmt = fourcc('B','G','R','3'); char *dev = ""; static error_t parse_opt(int k, char *optarg, struct argp_state *state) { switch (k) { case 'q': quiet = 1; break; case 'f': { int len = strlen(optarg); if (len > 4) len = 4; memcpy((char*)&vidfmt, optarg, len); if (len < 4) memset(len + (char*)&vidfmt, 0, 4 - len); break; } case 'd': dev = optarg; break; case '?': argp_state_help(state, state->out_stream, ARGP_HELP_SHORT_USAGE | ARGP_HELP_LONG | ARGP_HELP_DOC); exit(0); case -3: argp_state_help(state, state->out_stream, ARGP_HELP_USAGE); exit(0); default: return ARGP_ERR_UNKNOWN; }; return 0; } static const struct argp argp = { .options = options, .parser = parse_opt, .doc = doc, }; int main (int argc, char *argv[]) { if (argp_parse(&argp, argc, argv, ARGP_NO_HELP | ARGP_NO_EXIT, 0, 0)) { argp_help(&argp, stderr, ARGP_HELP_SHORT_USAGE, PROGRAM_NAME); return -1; } if (!quiet) zbar_set_verbosity(31); else zbar_set_verbosity(0); video = zbar_video_create(); if(!video) { fprintf(stderr, "unable to allocate memory?!\n"); return(1); } zbar_video_request_size(video, 640, 480); if(zbar_video_open(video, dev)) { zbar_video_error_spew(video, 0); fprintf(stderr, "ERROR: unable to access your video device\n" "this program requires video capture support using" " v4l version 1 or 2 or VfW\n" " - is your video device located at \"%s\"?\n" " - is your video driver installed? (check dmesg)\n" " - make sure you have the latest drivers\n" " - do you have read/write permission to access it?\n" " - is another application is using it?\n" " - does the device support video capture?\n" " - does the device work with other programs?\n", dev); return(1); } if (!quiet) { fprintf(stderr, "opened video device: %s (fd=%d)\n", dev, zbar_video_get_fd(video)); fflush(stderr); } if(zbar_video_init(video, vidfmt)) { fprintf(stderr, "ERROR: failed to set format: %.4s(%08x)\n", (char*)&vidfmt, vidfmt); return(zbar_video_error_spew(video, 0)); } if(zbar_video_enable(video, 1)) { fprintf(stderr, "ERROR: starting video stream\n"); return(zbar_video_error_spew(video, 0)); } if (!quiet) { fprintf(stderr, "started video stream...\n"); fflush(stderr); } zbar_image_t *image = zbar_video_next_image(video); if(!image) { fprintf(stderr, "ERROR: unable to capture image\n"); return(zbar_video_error_spew(video, 0)); } uint32_t format = zbar_image_get_format(image); unsigned width = zbar_image_get_width(image); unsigned height = zbar_image_get_height(image); const uint8_t *data = zbar_image_get_data(image); if (!quiet) { fprintf(stderr, "captured image: %d x %d %.4s @%p\n", width, height, (char*)&format, data); fflush(stderr); } zbar_image_destroy(image); if (!quiet) { fprintf(stderr, "\nstreaming 100 frames...\n"); fflush(stderr); } struct timespec start, end; #if _POSIX_TIMERS > 0 clock_gettime(CLOCK_REALTIME, &start); #else struct timeval ustime; gettimeofday(&ustime, NULL); start.tv_nsec = ustime.tv_usec * 1000; start.tv_sec = ustime.tv_sec; #endif int i; for(i = 0; i < 100; i++) { zbar_image_t *image = zbar_video_next_image(video); if(!image) { fprintf(stderr, "ERROR: unable to capture image\n"); return(zbar_video_error_spew(video, 0)); } zbar_image_destroy(image); } #if _POSIX_TIMERS > 0 clock_gettime(CLOCK_REALTIME, &end); #else gettimeofday(&ustime, NULL); end.tv_nsec = ustime.tv_usec * 1000; end.tv_sec = ustime.tv_sec; #endif double ms = (end.tv_sec - start.tv_sec + (end.tv_nsec - start.tv_nsec) / 1000000000.); double fps = i / ms; if (!quiet) { fprintf(stderr, "\nprocessed %d images in %gs @%gfps\n", i, ms, fps); fflush(stderr); } if(zbar_video_enable(video, 0)) { fprintf(stderr, "ERROR: while stopping video stream\n"); return(zbar_video_error_spew(video, 0)); } if (!quiet) { fprintf(stderr, "\ncleaning up...\n"); fflush(stderr); } zbar_video_destroy(video); if(test_image_check_cleanup()) return(32); fprintf(stderr, "video PASSED.\n"); return(0); } zbar-0.23/test/check_dbus.sh.in0000664000175000017500000000103513471225716013340 00000000000000#!/bin/bash DIR="@abs_top_srcdir@" BDIR="@abs_top_builddir@" LOG="/tmp/zbar_dbus_test_$$.log" EXPECTED="7bfb83f7d54763ddb5841f0892e79071d4bb2c70" $BDIR/test/test_dbus -c1 -t5 >$LOG & PID=$! trap "rm -r $LOG" EXIT $BDIR/zbarimg/zbarimg $DIR/examples/code-128.png 2>/dev/null >/dev/null wait $PID if [ ! -s $LOG ]; then echo "FAILED: nothing received via D-Bus" exit -2 fi CK="`cat $LOG |sha1sum |cut -d" " -f 1`" if [ "x$CK" != "x$EXPECTED" ]; then echo "FAILED: $CK instead of $EXPECTED" exit -2 fi echo "D-Bus PASSED." zbar-0.23/test/test_images.h0000664000175000017500000000274413471225700012763 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2010 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _TEST_IMAGES_H_ #define _TEST_IMAGES_H_ #define fourcc zbar_fourcc #ifdef __cplusplus extern "C" { int test_image_check_cleanup(void); int test_image_bars(zbar::zbar_image_t*); int test_image_ean13(zbar::zbar_image_t*); } #else int test_image_check_cleanup(void); int test_image_bars(zbar_image_t*); int test_image_ean13(zbar_image_t*); #endif extern const char *test_image_ean13_data; #endif zbar-0.23/test/test_proc.c0000664000175000017500000001146013466560613012460 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDLIB_H # include #endif #include #include #include #include #include #include "test_images.h" zbar_processor_t *proc = NULL; int use_threads = 1, use_window = 1; int input_wait (int timeout) { if(timeout >= 0) fprintf(stderr, "waiting %d.%03ds for input...", timeout / 1000, timeout % 1000); else fprintf(stderr, "waiting indefinitely for input..."); fflush(stderr); int rc = zbar_processor_user_wait(proc, timeout); if(rc > 0) fprintf(stderr, "got input (%02x)\n", rc); else if(!rc) fprintf(stderr, "timed out\n"); else if(zbar_processor_get_error_code(proc) == ZBAR_ERR_CLOSED) use_window = rc = 0; fflush(stderr); return(rc); } int main (int argc, char **argv) { zbar_set_verbosity(127); char *video_dev = NULL; uint32_t fmt = 0; int i, j = 0; for(i = 1; i < argc; i++) { if(argv[i][0] == '-') { if(!strncmp(argv[i], "-thr", 4)) use_threads = 0; else if(!strncmp(argv[i], "-win", 4)) use_window = 0; else return(1); } else if(!j++) video_dev = argv[i]; else if(j++ == 1) { int n = strlen(argv[i]); if(n > 4) n = 4; memcpy((char*)&fmt, argv[i], n); } } if(!fmt) fmt = fourcc('B','G','R','3'); proc = zbar_processor_create(use_threads); assert(proc); fprintf(stderr, "created processor (%sthreaded)\n", (!use_threads) ? "un" : ""); fflush(stderr); if(zbar_processor_init(proc, NULL, 0)) return(2); fprintf(stderr, "initialized (video=disabled, window=disabled)\n"); fflush(stderr); zbar_image_t *img = zbar_image_create(); zbar_image_set_size(img, 640, 480); zbar_image_set_format(img, fmt); test_image_bars(img); if(zbar_process_image(proc, img) < 0) return(3); fprintf(stderr, "processed test image\n"); fflush(stderr); if(zbar_processor_init(proc, video_dev, use_window)) return(2); fprintf(stderr, "reinitialized (video=%s, window=%s)\n", (video_dev) ? video_dev : "disabled", (use_window) ? "enabled" : "disabled"); fflush(stderr); if(use_window) { if(zbar_processor_set_visible(proc, 1)) return(4); fprintf(stderr, "window visible\n"); fflush(stderr); } if(input_wait((use_window && !video_dev) ? -1 : 2000) < 0) return(5); if(zbar_process_image(proc, img) < 0) return(3); fprintf(stderr, "processed test image\n"); fflush(stderr); zbar_image_destroy(img); if(input_wait((use_window && !video_dev) ? -1 : 3333) < 0) return(5); if(video_dev) { if(zbar_processor_set_active(proc, 1)) return(3); fprintf(stderr, "video activated\n"); fflush(stderr); if(input_wait((use_window) ? -1 : 4000) < 0) return(5); if(zbar_processor_set_active(proc, 0)) return(3); fprintf(stderr, "video deactivated\n"); fflush(stderr); if(input_wait((use_window) ? -1 : 4000) < 0) return(5); /* FIXME test process_one() */ } if(zbar_process_image(proc, NULL)) return(3); fprintf(stderr, "flushed image\n"); fflush(stderr); if(input_wait((use_window && !video_dev) ? -1 : 2500) < 0) return(5); fprintf(stderr, "cleaning up...\n"); fflush(stderr); zbar_processor_destroy(proc); proc = NULL; if(test_image_check_cleanup()) return(32); return(0); } zbar-0.23/test/test_pygtk.py0000775000175000017500000001524013471225716013062 00000000000000#!/usr/bin/env python2 #------------------------------------------------------------------------ # Copyright 2008-2009 (c) Jeff Brown # # This file is part of the ZBar Bar Code Reader. # # The ZBar Bar Code Reader is free software; you can redistribute it # and/or modify it under the terms of the GNU Lesser Public License as # published by the Free Software Foundation; either version 2.1 of # the License, or (at your option) any later version. # # The ZBar Bar Code Reader 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 Lesser Public License for more details. # # You should have received a copy of the GNU Lesser Public License # along with the ZBar Bar Code Reader; if not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA # # http://sourceforge.net/projects/zbar #------------------------------------------------------------------------ import sys, os, stat import pygtk, gtk import zbarpygtk def decoded(zbar, data): """callback invoked when a barcode is decoded by the zbar widget. displays the decoded data in the text box """ buf = results.props.buffer end = buf.get_end_iter() buf.insert(end, data + "\n") results.scroll_to_iter(end, 0) def video_enabled(zbar, param): """callback invoked when the zbar widget enables or disables video streaming. updates the status button state to reflect the current video state """ enabled = zbar.get_video_enabled() if status_button.get_active() != enabled: status_button.set_active(enabled) def video_opened(zbar, param): """callback invoked when the zbar widget opens or closes a video device. also called when a device is closed due to error. updates the status button state to reflect the current video state """ opened = zbar.get_video_opened() status_button.set_sensitive(opened) set_status_label(opened, zbar.get_video_enabled()) def video_changed(widget): """callback invoked when a new video device is selected from the drop-down list. sets the new device for the zbar widget, which will eventually cause it to be opened and enabled """ dev = video_list.get_active_text() if dev[0] == '<': dev = '' zbar.set_video_device(dev) def status_button_toggled(button): """callback invoked when the status button changes state (interactively or programmatically). ensures the zbar widget video streaming state is consistent and updates the display of the button to represent the current state """ opened = zbar.get_video_opened() active = status_button.get_active() if opened and (active != zbar.get_video_enabled()): zbar.set_video_enabled(active) set_status_label(opened, active) if active: status_image.set_from_stock(gtk.STOCK_YES, gtk.ICON_SIZE_BUTTON) else: status_image.set_from_stock(gtk.STOCK_NO, gtk.ICON_SIZE_BUTTON) def open_button_clicked(button): """callback invoked when the 'Open' button is clicked. pops up an 'Open File' dialog which the user may use to select an image file. if the image is successfully opened, it is passed to the zbar widget which displays it and scans it for barcodes. results are returned using the same hook used to report video results """ dialog = gtk.FileChooserDialog("Open Image File", window, gtk.FILE_CHOOSER_ACTION_OPEN, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN, gtk.RESPONSE_ACCEPT)) global open_file if open_file: dialog.set_filename(open_file) try: if dialog.run() == gtk.RESPONSE_ACCEPT: open_file = dialog.get_filename() pixbuf = gtk.gdk.pixbuf_new_from_file(open_file) if pixbuf: zbar.scan_image(pixbuf) finally: dialog.destroy() def set_status_label(opened, enabled): """update status button label to reflect indicated state.""" if not opened: label = "closed" elif enabled: label = "enabled" else: label = "disabled" status_button.set_label(label) open_file = None video_device = None if len(sys.argv) > 1: video_device = sys.argv[1] # threads *must* be properly initialized to use zbarpygtk gtk.gdk.threads_init() gtk.gdk.threads_enter() window = gtk.Window() window.set_title("test_pygtk") window.set_border_width(8) window.connect("destroy", gtk.main_quit) zbar = zbarpygtk.Gtk() zbar.connect("decoded-text", decoded) # video device list combo box video_list = gtk.combo_box_new_text() video_list.connect("changed", video_changed) # enable/disable status button status_button = gtk.ToggleButton("closed") status_image = gtk.image_new_from_stock(gtk.STOCK_NO, gtk.ICON_SIZE_BUTTON) status_button.set_image(status_image) status_button.set_sensitive(False) # bind status button state and video state status_button.connect("toggled", status_button_toggled) zbar.connect("notify::video-enabled", video_enabled) zbar.connect("notify::video-opened", video_opened) # open image file button open_button = gtk.Button(stock=gtk.STOCK_OPEN) open_button.connect("clicked", open_button_clicked) # populate video devices in combo box video_list.append_text("") video_list.set_active(0) for (root, dirs, files) in os.walk("/dev"): for dev in files: path = os.path.join(root, dev) if not os.access(path, os.F_OK): continue info = os.stat(path) if stat.S_ISCHR(info.st_mode) and os.major(info.st_rdev) == 81: video_list.append_text(path) if path == video_device: video_list.set_active(len(video_list.get_model()) - 1) video_device = None if video_device is not None: video_list.append_text(video_device) video_list.set_active(len(video_list.get_model()) - 1) video_device = None # combine combo box and buttons horizontally hbox = gtk.HBox(spacing=8) hbox.pack_start(video_list) hbox.pack_start(status_button, expand=False) hbox.pack_start(open_button, expand=False) # text box for holding results results = gtk.TextView() results.set_size_request(320, 64) results.props.editable = results.props.cursor_visible = False results.set_left_margin(4) # combine inputs, scanner, and results vertically vbox = gtk.VBox(spacing=8) vbox.pack_start(hbox, expand=False) vbox.pack_start(zbar) vbox.pack_start(results, expand=False) window.add(vbox) window.set_geometry_hints(zbar, min_width=320, min_height=240) window.show_all() gtk.main() gtk.gdk.threads_leave() zbar-0.23/test/test_gi.py0000775000175000017500000001615413471225716012330 00000000000000#!/usr/bin/env python3 #------------------------------------------------------------------------ # Copyright 2008-2009 (c) Jeff Brown # # This file is part of the ZBar Bar Code Reader. # # The ZBar Bar Code Reader is free software; you can redistribute it # and/or modify it under the terms of the GNU Lesser Public License as # published by the Free Software Foundation; either version 2.1 of # the License, or (at your option) any later version. # # The ZBar Bar Code Reader 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 Lesser Public License for more details. # # You should have received a copy of the GNU Lesser Public License # along with the ZBar Bar Code Reader; if not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA # # http://sourceforge.net/projects/zbar #------------------------------------------------------------------------ import sys, os, stat import gi gi.require_version('ZBar', '1.0') try: from gi.repository import ZBar, Gtk, GdkPixbuf except ImportError: print("No ZBar integration") sys.exit() # To debug vars on a interactive python3: # >>> import gi # >>> gi.require_version('ZBar', '1.0') # >>> from gi.repository import ZBar # >>> zbar = ZBar.Gtk.new() # # >>> zbar. def decoded(zbar, data): """callback invoked when a barcode is decoded by the zbar widget. displays the decoded data in the text box """ buf = results.props.buffer end = buf.get_end_iter() buf.insert(end, data + "\n") results.scroll_to_iter(end, 0, 0, 0, 0) def video_enabled(zbar, param): """callback invoked when the zbar widget enables or disables video streaming. updates the status button state to reflect the current video state """ enabled = zbar.get_video_enabled() if status_button.get_active() != enabled: status_button.set_active(enabled) def video_opened(zbar, param): """callback invoked when the zbar widget opens or closes a video device. also called when a device is closed due to error. updates the status button state to reflect the current video state """ opened = zbar.get_video_opened() status_button.set_sensitive(opened) set_status_label(opened, zbar.get_video_enabled()) def video_changed(widget): """callback invoked when a new video device is selected from the drop-down list. sets the new device for the zbar widget, which will eventually cause it to be opened and enabled """ dev = video_list.get_active_text() if dev[0] == '<': dev = '' zbar.set_video_device(dev) def status_button_toggled(button): """callback invoked when the status button changes state (interactively or programmatically). ensures the zbar widget video streaming state is consistent and updates the display of the button to represent the current state """ opened = zbar.get_video_opened() active = status_button.get_active() if opened and (active != zbar.get_video_enabled()): zbar.set_video_enabled(active) set_status_label(opened, active) if active: status_image.set_from_icon_name("gtk-yes", Gtk.IconSize.BUTTON) else: status_image.set_from_icon_name("Gtk-no", Gtk.IconSize.BUTTON) def open_button_clicked(button): """callback invoked when the 'Open' button is clicked. pops up an 'Open File' dialog which the user may use to select an image file. if the image is successfully opened, it is passed to the zbar widget which displays it and scans it for barcodes. results are returned using the same hook used to report video results """ dialog = Gtk.FileChooserDialog(title = "Open Image File", parent = window, action = Gtk.FileChooserAction.OPEN) dialog.add_buttons("gtk-cancel", Gtk.ResponseType.CANCEL) dialog.add_buttons("gtk-open", Gtk.ResponseType.ACCEPT) global open_file if open_file: dialog.set_filename(open_file) try: if dialog.run() == Gtk.ResponseType.ACCEPT: open_file = dialog.get_filename() pixbuf = GdkPixbuf.Pixbuf.new_from_file(open_file) if pixbuf: zbar.scan_image(pixbuf) finally: dialog.destroy() def set_status_label(opened, enabled): """update status button label to reflect indicated state.""" if not opened: label = "closed" elif enabled: label = "enabled" else: label = "disabled" status_button.set_label(label) open_file = None video_device = None if len(sys.argv) > 1: video_device = sys.argv[1] window = Gtk.Window() window.set_title("test_pygtk") window.set_border_width(8) window.connect("destroy", Gtk.main_quit) zbar = ZBar.Gtk.new() print(zbar.get_video_device()) try: print(zbar.get_video_device()) except: print(ZBar.get_video_device(zbar)) zbar.connect("decoded-text", decoded) # video device list combo box video_list = Gtk.ComboBoxText() video_list.connect("changed", video_changed) # enable/disable status button status_button = Gtk.ToggleButton(name="closed") status_image = Gtk.Image.new_from_icon_name("gtk-no", Gtk.IconSize.BUTTON) status_button.set_image(status_image) status_button.set_sensitive(False) # bind status button state and video state status_button.connect("toggled", status_button_toggled) zbar.connect("notify::video-enabled", video_enabled) zbar.connect("notify::video-opened", video_opened) # open image file button open_button = Gtk.Button.new_with_mnemonic(label="Open") open_button.connect("clicked", open_button_clicked) # populate video devices in combo box video_list.append_text("") video_list.set_active(0) for (root, dirs, files) in os.walk("/dev"): for dev in files: path = os.path.join(root, dev) if not os.access(path, os.F_OK): continue info = os.stat(path) if stat.S_ISCHR(info.st_mode) and os.major(info.st_rdev) == 81: video_list.append_text(path) if path == video_device: video_list.set_active(len(video_list.get_model()) - 1) video_device = None if video_device is not None: video_list.append_text(video_device) video_list.set_active(len(video_list.get_model()) - 1) video_device = None # combine combo box and buttons horizontally hbox = Gtk.HBox(spacing=8) hbox.pack_start(video_list, True, True, 0) hbox.pack_start(status_button, False, True, 0) hbox.pack_start(open_button, False, True, 0) # text box for holding results results = Gtk.TextView() results.set_size_request(320, 64) results.props.editable = results.props.cursor_visible = False results.set_left_margin(4) # combine inputs, scanner, and results vertically vbox = Gtk.VBox(spacing=8) vbox.pack_start(hbox, False, True, 0) vbox.pack_start(zbar, True, True, 0) vbox.pack_start(results, False, True, 0) window.add(vbox) # FIXME: how to fill the geometry parameter? #geo = {"min_width": 320, "min_height": 240} #window.set_geometry_hints(geometry_widget=zbar, geometry=geo ) window.show_all() Gtk.main() zbar-0.23/test/pdf417_encode.h0000664000175000017500000014221613466560613013011 00000000000000/*------------------------------------------------------------------------ * Copyright 2008-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #ifndef _PDF417_ENCODE_H_ #define _PDF417_ENCODE_H_ unsigned long pdf417_encode[929][3] = { { 0x31111136, 0x51111125, 0x21111155, }, /* 0 */ { 0x41111144, 0x61111133, 0x31111163, }, /* 1 */ { 0x51111152, 0x41111216, 0x11111246, }, /* 2 */ { 0x31111235, 0x51111224, 0x21111254, }, /* 3 */ { 0x41111243, 0x61111232, 0x31111262, }, /* 4 */ { 0x51111251, 0x41111315, 0x11111345, }, /* 5 */ { 0x21111326, 0x51111323, 0x21111353, }, /* 6 */ { 0x31111334, 0x61111331, 0x31111361, }, /* 7 */ { 0x21111425, 0x41111414, 0x11111444, }, /* 8 */ { 0x11111516, 0x51111422, 0x21111452, }, /* 9 */ { 0x21111524, 0x41111513, 0x11111543, }, /* 10 */ { 0x11111615, 0x51111521, 0x61112114, }, /* 11 */ { 0x21112136, 0x41111612, 0x11112155, }, /* 12 */ { 0x31112144, 0x41112125, 0x21112163, }, /* 13 */ { 0x41112152, 0x51112133, 0x61112213, }, /* 14 */ { 0x21112235, 0x61112141, 0x11112254, }, /* 15 */ { 0x31112243, 0x31112216, 0x21112262, }, /* 16 */ { 0x41112251, 0x41112224, 0x61112312, }, /* 17 */ { 0x11112326, 0x51112232, 0x11112353, }, /* 18 */ { 0x21112334, 0x31112315, 0x21112361, }, /* 19 */ { 0x11112425, 0x41112323, 0x61112411, }, /* 20 */ { 0x11113136, 0x51112331, 0x11112452, }, /* 21 */ { 0x21113144, 0x31112414, 0x51113114, }, /* 22 */ { 0x31113152, 0x41112422, 0x61113122, }, /* 23 */ { 0x11113235, 0x31112513, 0x11113163, }, /* 24 */ { 0x21113243, 0x41112521, 0x51113213, }, /* 25 */ { 0x31113251, 0x31112612, 0x61113221, }, /* 26 */ { 0x11113334, 0x31113125, 0x11113262, }, /* 27 */ { 0x21113342, 0x41113133, 0x51113312, }, /* 28 */ { 0x11114144, 0x51113141, 0x11113361, }, /* 29 */ { 0x21114152, 0x21113216, 0x51113411, }, /* 30 */ { 0x11114243, 0x31113224, 0x41114114, }, /* 31 */ { 0x21114251, 0x41113232, 0x51114122, }, /* 32 */ { 0x11115152, 0x21113315, 0x41114213, }, /* 33 */ { 0x51116111, 0x31113323, 0x51114221, }, /* 34 */ { 0x31121135, 0x41113331, 0x41114312, }, /* 35 */ { 0x41121143, 0x21113414, 0x41114411, }, /* 36 */ { 0x51121151, 0x31113422, 0x31115114, }, /* 37 */ { 0x21121226, 0x21113513, 0x41115122, }, /* 38 */ { 0x31121234, 0x31113521, 0x31115213, }, /* 39 */ { 0x41121242, 0x21113612, 0x41115221, }, /* 40 */ { 0x21121325, 0x21114125, 0x31115312, }, /* 41 */ { 0x31121333, 0x31114133, 0x31115411, }, /* 42 */ { 0x11121416, 0x41114141, 0x21116114, }, /* 43 */ { 0x21121424, 0x11114216, 0x31116122, }, /* 44 */ { 0x31121432, 0x21114224, 0x21116213, }, /* 45 */ { 0x11121515, 0x31114232, 0x31116221, }, /* 46 */ { 0x21121523, 0x11114315, 0x21116312, }, /* 47 */ { 0x11121614, 0x21114323, 0x11121146, }, /* 48 */ { 0x21122135, 0x31114331, 0x21121154, }, /* 49 */ { 0x31122143, 0x11114414, 0x31121162, }, /* 50 */ { 0x41122151, 0x21114422, 0x11121245, }, /* 51 */ { 0x11122226, 0x11114513, 0x21121253, }, /* 52 */ { 0x21122234, 0x21114521, 0x31121261, }, /* 53 */ { 0x31122242, 0x11115125, 0x11121344, }, /* 54 */ { 0x11122325, 0x21115133, 0x21121352, }, /* 55 */ { 0x21122333, 0x31115141, 0x11121443, }, /* 56 */ { 0x31122341, 0x11115224, 0x21121451, }, /* 57 */ { 0x11122424, 0x21115232, 0x11121542, }, /* 58 */ { 0x21122432, 0x11115323, 0x61122113, }, /* 59 */ { 0x11123135, 0x21115331, 0x11122154, }, /* 60 */ { 0x21123143, 0x11115422, 0x21122162, }, /* 61 */ { 0x31123151, 0x11116133, 0x61122212, }, /* 62 */ { 0x11123234, 0x21116141, 0x11122253, }, /* 63 */ { 0x21123242, 0x11116232, 0x21122261, }, /* 64 */ { 0x11123333, 0x11116331, 0x61122311, }, /* 65 */ { 0x21123341, 0x41121116, 0x11122352, }, /* 66 */ { 0x11124143, 0x51121124, 0x11122451, }, /* 67 */ { 0x21124151, 0x61121132, 0x51123113, }, /* 68 */ { 0x11124242, 0x41121215, 0x61123121, }, /* 69 */ { 0x11124341, 0x51121223, 0x11123162, }, /* 70 */ { 0x21131126, 0x61121231, 0x51123212, }, /* 71 */ { 0x31131134, 0x41121314, 0x11123261, }, /* 72 */ { 0x41131142, 0x51121322, 0x51123311, }, /* 73 */ { 0x21131225, 0x41121413, 0x41124113, }, /* 74 */ { 0x31131233, 0x51121421, 0x51124121, }, /* 75 */ { 0x41131241, 0x41121512, 0x41124212, }, /* 76 */ { 0x11131316, 0x41121611, 0x41124311, }, /* 77 */ { 0x21131324, 0x31122116, 0x31125113, }, /* 78 */ { 0x31131332, 0x41122124, 0x41125121, }, /* 79 */ { 0x11131415, 0x51122132, 0x31125212, }, /* 80 */ { 0x21131423, 0x31122215, 0x31125311, }, /* 81 */ { 0x11131514, 0x41122223, 0x21126113, }, /* 82 */ { 0x11131613, 0x51122231, 0x31126121, }, /* 83 */ { 0x11132126, 0x31122314, 0x21126212, }, /* 84 */ { 0x21132134, 0x41122322, 0x21126311, }, /* 85 */ { 0x31132142, 0x31122413, 0x11131145, }, /* 86 */ { 0x11132225, 0x41122421, 0x21131153, }, /* 87 */ { 0x21132233, 0x31122512, 0x31131161, }, /* 88 */ { 0x31132241, 0x31122611, 0x11131244, }, /* 89 */ { 0x11132324, 0x21123116, 0x21131252, }, /* 90 */ { 0x21132332, 0x31123124, 0x11131343, }, /* 91 */ { 0x11132423, 0x41123132, 0x21131351, }, /* 92 */ { 0x11132522, 0x21123215, 0x11131442, }, /* 93 */ { 0x11133134, 0x31123223, 0x11131541, }, /* 94 */ { 0x21133142, 0x41123231, 0x61132112, }, /* 95 */ { 0x11133233, 0x21123314, 0x11132153, }, /* 96 */ { 0x21133241, 0x31123322, 0x21132161, }, /* 97 */ { 0x11133332, 0x21123413, 0x61132211, }, /* 98 */ { 0x11134142, 0x31123421, 0x11132252, }, /* 99 */ { 0x21141125, 0x21123512, 0x11132351, }, /* 100 */ { 0x31141133, 0x21123611, 0x51133112, }, /* 101 */ { 0x41141141, 0x11124116, 0x11133161, }, /* 102 */ { 0x11141216, 0x21124124, 0x51133211, }, /* 103 */ { 0x21141224, 0x31124132, 0x41134112, }, /* 104 */ { 0x31141232, 0x11124215, 0x41134211, }, /* 105 */ { 0x11141315, 0x21124223, 0x31135112, }, /* 106 */ { 0x21141323, 0x31124231, 0x31135211, }, /* 107 */ { 0x31141331, 0x11124314, 0x21136112, }, /* 108 */ { 0x11141414, 0x21124322, 0x21136211, }, /* 109 */ { 0x21141422, 0x11124413, 0x11141144, }, /* 110 */ { 0x11141513, 0x21124421, 0x21141152, }, /* 111 */ { 0x21141521, 0x11124512, 0x11141243, }, /* 112 */ { 0x11142125, 0x11125124, 0x21141251, }, /* 113 */ { 0x21142133, 0x21125132, 0x11141342, }, /* 114 */ { 0x31142141, 0x11125223, 0x11141441, }, /* 115 */ { 0x11142224, 0x21125231, 0x61142111, }, /* 116 */ { 0x21142232, 0x11125322, 0x11142152, }, /* 117 */ { 0x11142323, 0x11125421, 0x11142251, }, /* 118 */ { 0x21142331, 0x11126132, 0x51143111, }, /* 119 */ { 0x11142422, 0x11126231, 0x41144111, }, /* 120 */ { 0x11142521, 0x41131115, 0x31145111, }, /* 121 */ { 0x21143141, 0x51131123, 0x11151143, }, /* 122 */ { 0x11143331, 0x61131131, 0x21151151, }, /* 123 */ { 0x11151116, 0x41131214, 0x11151242, }, /* 124 */ { 0x21151124, 0x51131222, 0x11151341, }, /* 125 */ { 0x31151132, 0x41131313, 0x11152151, }, /* 126 */ { 0x11151215, 0x51131321, 0x11161142, }, /* 127 */ { 0x21151223, 0x41131412, 0x11161241, }, /* 128 */ { 0x31151231, 0x41131511, 0x12111146, }, /* 129 */ { 0x11151314, 0x31132115, 0x22111154, }, /* 130 */ { 0x21151322, 0x41132123, 0x32111162, }, /* 131 */ { 0x11151413, 0x51132131, 0x12111245, }, /* 132 */ { 0x21151421, 0x31132214, 0x22111253, }, /* 133 */ { 0x11151512, 0x41132222, 0x32111261, }, /* 134 */ { 0x11152124, 0x31132313, 0x12111344, }, /* 135 */ { 0x11152223, 0x41132321, 0x22111352, }, /* 136 */ { 0x11152322, 0x31132412, 0x12111443, }, /* 137 */ { 0x11161115, 0x31132511, 0x22111451, }, /* 138 */ { 0x31161131, 0x21133115, 0x12111542, }, /* 139 */ { 0x21161222, 0x31133123, 0x62112113, }, /* 140 */ { 0x21161321, 0x41133131, 0x12112154, }, /* 141 */ { 0x11161511, 0x21133214, 0x22112162, }, /* 142 */ { 0x32111135, 0x31133222, 0x62112212, }, /* 143 */ { 0x42111143, 0x21133313, 0x12112253, }, /* 144 */ { 0x52111151, 0x31133321, 0x22112261, }, /* 145 */ { 0x22111226, 0x21133412, 0x62112311, }, /* 146 */ { 0x32111234, 0x21133511, 0x12112352, }, /* 147 */ { 0x42111242, 0x11134115, 0x12112451, }, /* 148 */ { 0x22111325, 0x21134123, 0x52113113, }, /* 149 */ { 0x32111333, 0x31134131, 0x62113121, }, /* 150 */ { 0x42111341, 0x11134214, 0x12113162, }, /* 151 */ { 0x12111416, 0x21134222, 0x52113212, }, /* 152 */ { 0x22111424, 0x11134313, 0x12113261, }, /* 153 */ { 0x12111515, 0x21134321, 0x52113311, }, /* 154 */ { 0x22112135, 0x11134412, 0x42114113, }, /* 155 */ { 0x32112143, 0x11134511, 0x52114121, }, /* 156 */ { 0x42112151, 0x11135123, 0x42114212, }, /* 157 */ { 0x12112226, 0x21135131, 0x42114311, }, /* 158 */ { 0x22112234, 0x11135222, 0x32115113, }, /* 159 */ { 0x32112242, 0x11135321, 0x42115121, }, /* 160 */ { 0x12112325, 0x11136131, 0x32115212, }, /* 161 */ { 0x22112333, 0x41141114, 0x32115311, }, /* 162 */ { 0x12112424, 0x51141122, 0x22116113, }, /* 163 */ { 0x12112523, 0x41141213, 0x32116121, }, /* 164 */ { 0x12113135, 0x51141221, 0x22116212, }, /* 165 */ { 0x22113143, 0x41141312, 0x22116311, }, /* 166 */ { 0x32113151, 0x41141411, 0x21211145, }, /* 167 */ { 0x12113234, 0x31142114, 0x31211153, }, /* 168 */ { 0x22113242, 0x41142122, 0x41211161, }, /* 169 */ { 0x12113333, 0x31142213, 0x11211236, }, /* 170 */ { 0x12113432, 0x41142221, 0x21211244, }, /* 171 */ { 0x12114143, 0x31142312, 0x31211252, }, /* 172 */ { 0x22114151, 0x31142411, 0x11211335, }, /* 173 */ { 0x12114242, 0x21143114, 0x21211343, }, /* 174 */ { 0x12115151, 0x31143122, 0x31211351, }, /* 175 */ { 0x31211126, 0x21143213, 0x11211434, }, /* 176 */ { 0x41211134, 0x31143221, 0x21211442, }, /* 177 */ { 0x51211142, 0x21143312, 0x11211533, }, /* 178 */ { 0x31211225, 0x21143411, 0x21211541, }, /* 179 */ { 0x41211233, 0x11144114, 0x11211632, }, /* 180 */ { 0x51211241, 0x21144122, 0x12121145, }, /* 181 */ { 0x21211316, 0x11144213, 0x22121153, }, /* 182 */ { 0x31211324, 0x21144221, 0x32121161, }, /* 183 */ { 0x41211332, 0x11144312, 0x11212145, }, /* 184 */ { 0x21211415, 0x11144411, 0x12121244, }, /* 185 */ { 0x31211423, 0x11145122, 0x22121252, }, /* 186 */ { 0x41211431, 0x11145221, 0x11212244, }, /* 187 */ { 0x21211514, 0x41151113, 0x21212252, }, /* 188 */ { 0x31211522, 0x51151121, 0x22121351, }, /* 189 */ { 0x22121126, 0x41151212, 0x11212343, }, /* 190 */ { 0x32121134, 0x41151311, 0x12121442, }, /* 191 */ { 0x42121142, 0x31152113, 0x11212442, }, /* 192 */ { 0x21212126, 0x41152121, 0x12121541, }, /* 193 */ { 0x22121225, 0x31152212, 0x11212541, }, /* 194 */ { 0x32121233, 0x31152311, 0x62122112, }, /* 195 */ { 0x42121241, 0x21153113, 0x12122153, }, /* 196 */ { 0x21212225, 0x31153121, 0x22122161, }, /* 197 */ { 0x31212233, 0x21153212, 0x61213112, }, /* 198 */ { 0x41212241, 0x21153311, 0x62122211, }, /* 199 */ { 0x11212316, 0x11154113, 0x11213153, }, /* 200 */ { 0x12121415, 0x21154121, 0x12122252, }, /* 201 */ { 0x22121423, 0x11154212, 0x61213211, }, /* 202 */ { 0x32121431, 0x11154311, 0x11213252, }, /* 203 */ { 0x11212415, 0x41161112, 0x12122351, }, /* 204 */ { 0x21212423, 0x41161211, 0x11213351, }, /* 205 */ { 0x11212514, 0x31162112, 0x52123112, }, /* 206 */ { 0x12122126, 0x31162211, 0x12123161, }, /* 207 */ { 0x22122134, 0x21163112, 0x51214112, }, /* 208 */ { 0x32122142, 0x21163211, 0x52123211, }, /* 209 */ { 0x11213126, 0x42111116, 0x11214161, }, /* 210 */ { 0x12122225, 0x52111124, 0x51214211, }, /* 211 */ { 0x22122233, 0x62111132, 0x42124112, }, /* 212 */ { 0x32122241, 0x42111215, 0x41215112, }, /* 213 */ { 0x11213225, 0x52111223, 0x42124211, }, /* 214 */ { 0x21213233, 0x62111231, 0x41215211, }, /* 215 */ { 0x31213241, 0x42111314, 0x32125112, }, /* 216 */ { 0x11213324, 0x52111322, 0x31216112, }, /* 217 */ { 0x12122423, 0x42111413, 0x32125211, }, /* 218 */ { 0x11213423, 0x52111421, 0x31216211, }, /* 219 */ { 0x12123134, 0x42111512, 0x22126112, }, /* 220 */ { 0x22123142, 0x42111611, 0x22126211, }, /* 221 */ { 0x11214134, 0x32112116, 0x11221136, }, /* 222 */ { 0x12123233, 0x42112124, 0x21221144, }, /* 223 */ { 0x22123241, 0x52112132, 0x31221152, }, /* 224 */ { 0x11214233, 0x32112215, 0x11221235, }, /* 225 */ { 0x21214241, 0x42112223, 0x21221243, }, /* 226 */ { 0x11214332, 0x52112231, 0x31221251, }, /* 227 */ { 0x12124142, 0x32112314, 0x11221334, }, /* 228 */ { 0x11215142, 0x42112322, 0x21221342, }, /* 229 */ { 0x12124241, 0x32112413, 0x11221433, }, /* 230 */ { 0x11215241, 0x42112421, 0x21221441, }, /* 231 */ { 0x31221125, 0x32112512, 0x11221532, }, /* 232 */ { 0x41221133, 0x32112611, 0x11221631, }, /* 233 */ { 0x51221141, 0x22113116, 0x12131144, }, /* 234 */ { 0x21221216, 0x32113124, 0x22131152, }, /* 235 */ { 0x31221224, 0x42113132, 0x11222144, }, /* 236 */ { 0x41221232, 0x22113215, 0x12131243, }, /* 237 */ { 0x21221315, 0x32113223, 0x22131251, }, /* 238 */ { 0x31221323, 0x42113231, 0x11222243, }, /* 239 */ { 0x41221331, 0x22113314, 0x21222251, }, /* 240 */ { 0x21221414, 0x32113322, 0x11222342, }, /* 241 */ { 0x31221422, 0x22113413, 0x12131441, }, /* 242 */ { 0x21221513, 0x32113421, 0x11222441, }, /* 243 */ { 0x21221612, 0x22113512, 0x62132111, }, /* 244 */ { 0x22131125, 0x22113611, 0x12132152, }, /* 245 */ { 0x32131133, 0x12114116, 0x61223111, }, /* 246 */ { 0x42131141, 0x22114124, 0x11223152, }, /* 247 */ { 0x21222125, 0x32114132, 0x12132251, }, /* 248 */ { 0x22131224, 0x12114215, 0x11223251, }, /* 249 */ { 0x32131232, 0x22114223, 0x52133111, }, /* 250 */ { 0x11222216, 0x32114231, 0x51224111, }, /* 251 */ { 0x12131315, 0x12114314, 0x42134111, }, /* 252 */ { 0x31222232, 0x22114322, 0x41225111, }, /* 253 */ { 0x32131331, 0x12114413, 0x32135111, }, /* 254 */ { 0x11222315, 0x22114421, 0x31226111, }, /* 255 */ { 0x12131414, 0x12114512, 0x22136111, }, /* 256 */ { 0x22131422, 0x12115124, 0x11231135, }, /* 257 */ { 0x11222414, 0x22115132, 0x21231143, }, /* 258 */ { 0x21222422, 0x12115223, 0x31231151, }, /* 259 */ { 0x22131521, 0x22115231, 0x11231234, }, /* 260 */ { 0x12131612, 0x12115322, 0x21231242, }, /* 261 */ { 0x12132125, 0x12115421, 0x11231333, }, /* 262 */ { 0x22132133, 0x12116132, 0x21231341, }, /* 263 */ { 0x32132141, 0x12116231, 0x11231432, }, /* 264 */ { 0x11223125, 0x51211115, 0x11231531, }, /* 265 */ { 0x12132224, 0x61211123, 0x12141143, }, /* 266 */ { 0x22132232, 0x11211164, 0x22141151, }, /* 267 */ { 0x11223224, 0x51211214, 0x11232143, }, /* 268 */ { 0x21223232, 0x61211222, 0x12141242, }, /* 269 */ { 0x22132331, 0x11211263, 0x11232242, }, /* 270 */ { 0x11223323, 0x51211313, 0x12141341, }, /* 271 */ { 0x12132422, 0x61211321, 0x11232341, }, /* 272 */ { 0x12132521, 0x11211362, 0x12142151, }, /* 273 */ { 0x12133133, 0x51211412, 0x11233151, }, /* 274 */ { 0x22133141, 0x51211511, 0x11241134, }, /* 275 */ { 0x11224133, 0x42121115, 0x21241142, }, /* 276 */ { 0x12133232, 0x52121123, 0x11241233, }, /* 277 */ { 0x11224232, 0x62121131, 0x21241241, }, /* 278 */ { 0x12133331, 0x41212115, 0x11241332, }, /* 279 */ { 0x11224331, 0x42121214, 0x11241431, }, /* 280 */ { 0x11225141, 0x61212131, 0x12151142, }, /* 281 */ { 0x21231116, 0x41212214, 0x11242142, }, /* 282 */ { 0x31231124, 0x51212222, 0x12151241, }, /* 283 */ { 0x41231132, 0x52121321, 0x11242241, }, /* 284 */ { 0x21231215, 0x41212313, 0x11251133, }, /* 285 */ { 0x31231223, 0x42121412, 0x21251141, }, /* 286 */ { 0x41231231, 0x41212412, 0x11251232, }, /* 287 */ { 0x21231314, 0x42121511, 0x11251331, }, /* 288 */ { 0x31231322, 0x41212511, 0x12161141, }, /* 289 */ { 0x21231413, 0x32122115, 0x11252141, }, /* 290 */ { 0x31231421, 0x42122123, 0x11261132, }, /* 291 */ { 0x21231512, 0x52122131, 0x11261231, }, /* 292 */ { 0x21231611, 0x31213115, 0x13111145, }, /* 293 */ { 0x12141116, 0x32122214, 0x23111153, }, /* 294 */ { 0x22141124, 0x42122222, 0x33111161, }, /* 295 */ { 0x32141132, 0x31213214, 0x13111244, }, /* 296 */ { 0x11232116, 0x41213222, 0x23111252, }, /* 297 */ { 0x12141215, 0x42122321, 0x13111343, }, /* 298 */ { 0x22141223, 0x31213313, 0x23111351, }, /* 299 */ { 0x32141231, 0x32122412, 0x13111442, }, /* 300 */ { 0x11232215, 0x31213412, 0x13111541, }, /* 301 */ { 0x21232223, 0x32122511, 0x63112112, }, /* 302 */ { 0x31232231, 0x31213511, 0x13112153, }, /* 303 */ { 0x11232314, 0x22123115, 0x23112161, }, /* 304 */ { 0x12141413, 0x32123123, 0x63112211, }, /* 305 */ { 0x22141421, 0x42123131, 0x13112252, }, /* 306 */ { 0x11232413, 0x21214115, 0x13112351, }, /* 307 */ { 0x21232421, 0x22123214, 0x53113112, }, /* 308 */ { 0x11232512, 0x32123222, 0x13113161, }, /* 309 */ { 0x12142124, 0x21214214, 0x53113211, }, /* 310 */ { 0x22142132, 0x31214222, 0x43114112, }, /* 311 */ { 0x11233124, 0x32123321, 0x43114211, }, /* 312 */ { 0x12142223, 0x21214313, 0x33115112, }, /* 313 */ { 0x22142231, 0x22123412, 0x33115211, }, /* 314 */ { 0x11233223, 0x21214412, 0x23116112, }, /* 315 */ { 0x21233231, 0x22123511, 0x23116211, }, /* 316 */ { 0x11233322, 0x21214511, 0x12211136, }, /* 317 */ { 0x12142421, 0x12124115, 0x22211144, }, /* 318 */ { 0x11233421, 0x22124123, 0x32211152, }, /* 319 */ { 0x11234132, 0x32124131, 0x12211235, }, /* 320 */ { 0x11234231, 0x11215115, 0x22211243, }, /* 321 */ { 0x21241115, 0x12124214, 0x32211251, }, /* 322 */ { 0x31241123, 0x22124222, 0x12211334, }, /* 323 */ { 0x41241131, 0x11215214, 0x22211342, }, /* 324 */ { 0x21241214, 0x21215222, 0x12211433, }, /* 325 */ { 0x31241222, 0x22124321, 0x22211441, }, /* 326 */ { 0x21241313, 0x11215313, 0x12211532, }, /* 327 */ { 0x31241321, 0x12124412, 0x12211631, }, /* 328 */ { 0x21241412, 0x11215412, 0x13121144, }, /* 329 */ { 0x21241511, 0x12124511, 0x23121152, }, /* 330 */ { 0x12151115, 0x12125123, 0x12212144, }, /* 331 */ { 0x22151123, 0x22125131, 0x13121243, }, /* 332 */ { 0x32151131, 0x11216123, 0x23121251, }, /* 333 */ { 0x11242115, 0x12125222, 0x12212243, }, /* 334 */ { 0x12151214, 0x11216222, 0x22212251, }, /* 335 */ { 0x22151222, 0x12125321, 0x12212342, }, /* 336 */ { 0x11242214, 0x11216321, 0x13121441, }, /* 337 */ { 0x21242222, 0x12126131, 0x12212441, }, /* 338 */ { 0x22151321, 0x51221114, 0x63122111, }, /* 339 */ { 0x11242313, 0x61221122, 0x13122152, }, /* 340 */ { 0x12151412, 0x11221163, 0x62213111, }, /* 341 */ { 0x11242412, 0x51221213, 0x12213152, }, /* 342 */ { 0x12151511, 0x61221221, 0x13122251, }, /* 343 */ { 0x12152123, 0x11221262, 0x12213251, }, /* 344 */ { 0x11243123, 0x51221312, 0x53123111, }, /* 345 */ { 0x11243222, 0x11221361, 0x52214111, }, /* 346 */ { 0x11243321, 0x51221411, 0x43124111, }, /* 347 */ { 0x31251122, 0x42131114, 0x42215111, }, /* 348 */ { 0x31251221, 0x52131122, 0x33125111, }, /* 349 */ { 0x21251411, 0x41222114, 0x32216111, }, /* 350 */ { 0x22161122, 0x42131213, 0x23126111, }, /* 351 */ { 0x12161213, 0x52131221, 0x21311135, }, /* 352 */ { 0x11252213, 0x41222213, 0x31311143, }, /* 353 */ { 0x11252312, 0x51222221, 0x41311151, }, /* 354 */ { 0x11252411, 0x41222312, 0x11311226, }, /* 355 */ { 0x23111126, 0x42131411, 0x21311234, }, /* 356 */ { 0x33111134, 0x41222411, 0x31311242, }, /* 357 */ { 0x43111142, 0x32132114, 0x11311325, }, /* 358 */ { 0x23111225, 0x42132122, 0x21311333, }, /* 359 */ { 0x33111233, 0x31223114, 0x31311341, }, /* 360 */ { 0x13111316, 0x32132213, 0x11311424, }, /* 361 */ { 0x23111324, 0x42132221, 0x21311432, }, /* 362 */ { 0x33111332, 0x31223213, 0x11311523, }, /* 363 */ { 0x13111415, 0x41223221, 0x21311531, }, /* 364 */ { 0x23111423, 0x31223312, 0x11311622, }, /* 365 */ { 0x13111514, 0x32132411, 0x12221135, }, /* 366 */ { 0x13111613, 0x31223411, 0x22221143, }, /* 367 */ { 0x13112126, 0x22133114, 0x32221151, }, /* 368 */ { 0x23112134, 0x32133122, 0x11312135, }, /* 369 */ { 0x33112142, 0x21224114, 0x12221234, }, /* 370 */ { 0x13112225, 0x22133213, 0x22221242, }, /* 371 */ { 0x23112233, 0x32133221, 0x11312234, }, /* 372 */ { 0x33112241, 0x21224213, 0x21312242, }, /* 373 */ { 0x13112324, 0x31224221, 0x22221341, }, /* 374 */ { 0x23112332, 0x21224312, 0x11312333, }, /* 375 */ { 0x13112423, 0x22133411, 0x12221432, }, /* 376 */ { 0x13112522, 0x21224411, 0x11312432, }, /* 377 */ { 0x13113134, 0x12134114, 0x12221531, }, /* 378 */ { 0x23113142, 0x22134122, 0x11312531, }, /* 379 */ { 0x13113233, 0x11225114, 0x13131143, }, /* 380 */ { 0x23113241, 0x12134213, 0x23131151, }, /* 381 */ { 0x13113332, 0x22134221, 0x12222143, }, /* 382 */ { 0x13114142, 0x11225213, 0x13131242, }, /* 383 */ { 0x13114241, 0x21225221, 0x11313143, }, /* 384 */ { 0x32211125, 0x11225312, 0x12222242, }, /* 385 */ { 0x42211133, 0x12134411, 0x13131341, }, /* 386 */ { 0x52211141, 0x11225411, 0x11313242, }, /* 387 */ { 0x22211216, 0x12135122, 0x12222341, }, /* 388 */ { 0x32211224, 0x11226122, 0x11313341, }, /* 389 */ { 0x42211232, 0x12135221, 0x13132151, }, /* 390 */ { 0x22211315, 0x11226221, 0x12223151, }, /* 391 */ { 0x32211323, 0x51231113, 0x11314151, }, /* 392 */ { 0x42211331, 0x61231121, 0x11321126, }, /* 393 */ { 0x22211414, 0x11231162, 0x21321134, }, /* 394 */ { 0x32211422, 0x51231212, 0x31321142, }, /* 395 */ { 0x22211513, 0x11231261, 0x11321225, }, /* 396 */ { 0x32211521, 0x51231311, 0x21321233, }, /* 397 */ { 0x23121125, 0x42141113, 0x31321241, }, /* 398 */ { 0x33121133, 0x52141121, 0x11321324, }, /* 399 */ { 0x43121141, 0x41232113, 0x21321332, }, /* 400 */ { 0x22212125, 0x51232121, 0x11321423, }, /* 401 */ { 0x23121224, 0x41232212, 0x21321431, }, /* 402 */ { 0x33121232, 0x42141311, 0x11321522, }, /* 403 */ { 0x12212216, 0x41232311, 0x11321621, }, /* 404 */ { 0x13121315, 0x32142113, 0x12231134, }, /* 405 */ { 0x32212232, 0x42142121, 0x22231142, }, /* 406 */ { 0x33121331, 0x31233113, 0x11322134, }, /* 407 */ { 0x12212315, 0x32142212, 0x12231233, }, /* 408 */ { 0x22212323, 0x31233212, 0x22231241, }, /* 409 */ { 0x23121422, 0x32142311, 0x11322233, }, /* 410 */ { 0x12212414, 0x31233311, 0x21322241, }, /* 411 */ { 0x13121513, 0x22143113, 0x11322332, }, /* 412 */ { 0x12212513, 0x32143121, 0x12231431, }, /* 413 */ { 0x13122125, 0x21234113, 0x11322431, }, /* 414 */ { 0x23122133, 0x31234121, 0x13141142, }, /* 415 */ { 0x33122141, 0x21234212, 0x12232142, }, /* 416 */ { 0x12213125, 0x22143311, 0x13141241, }, /* 417 */ { 0x13122224, 0x21234311, 0x11323142, }, /* 418 */ { 0x32213141, 0x12144113, 0x12232241, }, /* 419 */ { 0x12213224, 0x22144121, 0x11323241, }, /* 420 */ { 0x22213232, 0x11235113, 0x11331125, }, /* 421 */ { 0x23122331, 0x12144212, 0x21331133, }, /* 422 */ { 0x12213323, 0x11235212, 0x31331141, }, /* 423 */ { 0x13122422, 0x12144311, 0x11331224, }, /* 424 */ { 0x12213422, 0x11235311, 0x21331232, }, /* 425 */ { 0x13123133, 0x12145121, 0x11331323, }, /* 426 */ { 0x23123141, 0x11236121, 0x21331331, }, /* 427 */ { 0x12214133, 0x51241112, 0x11331422, }, /* 428 */ { 0x13123232, 0x11241161, 0x11331521, }, /* 429 */ { 0x12214232, 0x51241211, 0x12241133, }, /* 430 */ { 0x13123331, 0x42151112, 0x22241141, }, /* 431 */ { 0x13124141, 0x41242112, 0x11332133, }, /* 432 */ { 0x12215141, 0x42151211, 0x12241232, }, /* 433 */ { 0x31311116, 0x41242211, 0x11332232, }, /* 434 */ { 0x41311124, 0x32152112, 0x12241331, }, /* 435 */ { 0x51311132, 0x31243112, 0x11332331, }, /* 436 */ { 0x31311215, 0x32152211, 0x13151141, }, /* 437 */ { 0x41311223, 0x31243211, 0x12242141, }, /* 438 */ { 0x51311231, 0x22153112, 0x11333141, }, /* 439 */ { 0x31311314, 0x21244112, 0x11341124, }, /* 440 */ { 0x41311322, 0x22153211, 0x21341132, }, /* 441 */ { 0x31311413, 0x21244211, 0x11341223, }, /* 442 */ { 0x41311421, 0x12154112, 0x21341231, }, /* 443 */ { 0x31311512, 0x11245112, 0x11341322, }, /* 444 */ { 0x22221116, 0x12154211, 0x11341421, }, /* 445 */ { 0x32221124, 0x11245211, 0x12251132, }, /* 446 */ { 0x42221132, 0x51251111, 0x11342132, }, /* 447 */ { 0x21312116, 0x42161111, 0x12251231, }, /* 448 */ { 0x22221215, 0x41252111, 0x11342231, }, /* 449 */ { 0x41312132, 0x32162111, 0x11351123, }, /* 450 */ { 0x42221231, 0x31253111, 0x21351131, }, /* 451 */ { 0x21312215, 0x22163111, 0x11351222, }, /* 452 */ { 0x31312223, 0x21254111, 0x11351321, }, /* 453 */ { 0x41312231, 0x43111115, 0x12261131, }, /* 454 */ { 0x21312314, 0x53111123, 0x11352131, }, /* 455 */ { 0x22221413, 0x63111131, 0x11361122, }, /* 456 */ { 0x32221421, 0x43111214, 0x11361221, }, /* 457 */ { 0x21312413, 0x53111222, 0x14111144, }, /* 458 */ { 0x31312421, 0x43111313, 0x24111152, }, /* 459 */ { 0x22221611, 0x53111321, 0x14111243, }, /* 460 */ { 0x13131116, 0x43111412, 0x24111251, }, /* 461 */ { 0x23131124, 0x43111511, 0x14111342, }, /* 462 */ { 0x33131132, 0x33112115, 0x14111441, }, /* 463 */ { 0x12222116, 0x43112123, 0x14112152, }, /* 464 */ { 0x13131215, 0x53112131, 0x14112251, }, /* 465 */ { 0x23131223, 0x33112214, 0x54113111, }, /* 466 */ { 0x33131231, 0x43112222, 0x44114111, }, /* 467 */ { 0x11313116, 0x33112313, 0x34115111, }, /* 468 */ { 0x12222215, 0x43112321, 0x24116111, }, /* 469 */ { 0x22222223, 0x33112412, 0x13211135, }, /* 470 */ { 0x32222231, 0x33112511, 0x23211143, }, /* 471 */ { 0x11313215, 0x23113115, 0x33211151, }, /* 472 */ { 0x21313223, 0x33113123, 0x13211234, }, /* 473 */ { 0x31313231, 0x43113131, 0x23211242, }, /* 474 */ { 0x23131421, 0x23113214, 0x13211333, }, /* 475 */ { 0x11313314, 0x33113222, 0x23211341, }, /* 476 */ { 0x12222413, 0x23113313, 0x13211432, }, /* 477 */ { 0x22222421, 0x33113321, 0x13211531, }, /* 478 */ { 0x11313413, 0x23113412, 0x14121143, }, /* 479 */ { 0x13131611, 0x23113511, 0x24121151, }, /* 480 */ { 0x13132124, 0x13114115, 0x13212143, }, /* 481 */ { 0x23132132, 0x23114123, 0x14121242, }, /* 482 */ { 0x12223124, 0x33114131, 0x13212242, }, /* 483 */ { 0x13132223, 0x13114214, 0x14121341, }, /* 484 */ { 0x23132231, 0x23114222, 0x13212341, }, /* 485 */ { 0x11314124, 0x13114313, 0x14122151, }, /* 486 */ { 0x12223223, 0x23114321, 0x13213151, }, /* 487 */ { 0x22223231, 0x13114412, 0x12311126, }, /* 488 */ { 0x11314223, 0x13114511, 0x22311134, }, /* 489 */ { 0x21314231, 0x13115123, 0x32311142, }, /* 490 */ { 0x13132421, 0x23115131, 0x12311225, }, /* 491 */ { 0x12223421, 0x13115222, 0x22311233, }, /* 492 */ { 0x13133132, 0x13115321, 0x32311241, }, /* 493 */ { 0x12224132, 0x13116131, 0x12311324, }, /* 494 */ { 0x13133231, 0x52211114, 0x22311332, }, /* 495 */ { 0x11315132, 0x62211122, 0x12311423, }, /* 496 */ { 0x12224231, 0x12211163, 0x22311431, }, /* 497 */ { 0x31321115, 0x52211213, 0x12311522, }, /* 498 */ { 0x41321123, 0x62211221, 0x12311621, }, /* 499 */ { 0x51321131, 0x12211262, 0x13221134, }, /* 500 */ { 0x31321214, 0x52211312, 0x23221142, }, /* 501 */ { 0x41321222, 0x12211361, 0x12312134, }, /* 502 */ { 0x31321313, 0x52211411, 0x13221233, }, /* 503 */ { 0x41321321, 0x43121114, 0x23221241, }, /* 504 */ { 0x31321412, 0x53121122, 0x12312233, }, /* 505 */ { 0x31321511, 0x42212114, 0x13221332, }, /* 506 */ { 0x22231115, 0x43121213, 0x12312332, }, /* 507 */ { 0x32231123, 0x53121221, 0x13221431, }, /* 508 */ { 0x42231131, 0x42212213, 0x12312431, }, /* 509 */ { 0x21322115, 0x52212221, 0x14131142, }, /* 510 */ { 0x22231214, 0x42212312, 0x13222142, }, /* 511 */ { 0x41322131, 0x43121411, 0x14131241, }, /* 512 */ { 0x21322214, 0x42212411, 0x12313142, }, /* 513 */ { 0x31322222, 0x33122114, 0x13222241, }, /* 514 */ { 0x32231321, 0x43122122, 0x12313241, }, /* 515 */ { 0x21322313, 0x32213114, 0x21411125, }, /* 516 */ { 0x22231412, 0x33122213, 0x31411133, }, /* 517 */ { 0x21322412, 0x43122221, 0x41411141, }, /* 518 */ { 0x22231511, 0x32213213, 0x11411216, }, /* 519 */ { 0x21322511, 0x42213221, 0x21411224, }, /* 520 */ { 0x13141115, 0x32213312, 0x31411232, }, /* 521 */ { 0x23141123, 0x33122411, 0x11411315, }, /* 522 */ { 0x33141131, 0x32213411, 0x21411323, }, /* 523 */ { 0x12232115, 0x23123114, 0x31411331, }, /* 524 */ { 0x13141214, 0x33123122, 0x11411414, }, /* 525 */ { 0x23141222, 0x22214114, 0x21411422, }, /* 526 */ { 0x11323115, 0x23123213, 0x11411513, }, /* 527 */ { 0x12232214, 0x33123221, 0x21411521, }, /* 528 */ { 0x22232222, 0x22214213, 0x11411612, }, /* 529 */ { 0x23141321, 0x32214221, 0x12321125, }, /* 530 */ { 0x11323214, 0x22214312, 0x22321133, }, /* 531 */ { 0x21323222, 0x23123411, 0x32321141, }, /* 532 */ { 0x13141412, 0x22214411, 0x11412125, }, /* 533 */ { 0x11323313, 0x13124114, 0x12321224, }, /* 534 */ { 0x12232412, 0x23124122, 0x22321232, }, /* 535 */ { 0x13141511, 0x12215114, 0x11412224, }, /* 536 */ { 0x12232511, 0x13124213, 0x21412232, }, /* 537 */ { 0x13142123, 0x23124221, 0x22321331, }, /* 538 */ { 0x23142131, 0x12215213, 0x11412323, }, /* 539 */ { 0x12233123, 0x22215221, 0x12321422, }, /* 540 */ { 0x13142222, 0x12215312, 0x11412422, }, /* 541 */ { 0x11324123, 0x13124411, 0x12321521, }, /* 542 */ { 0x12233222, 0x12215411, 0x11412521, }, /* 543 */ { 0x13142321, 0x13125122, 0x13231133, }, /* 544 */ { 0x11324222, 0x12216122, 0x23231141, }, /* 545 */ { 0x12233321, 0x13125221, 0x12322133, }, /* 546 */ { 0x13143131, 0x12216221, 0x13231232, }, /* 547 */ { 0x11325131, 0x61311113, 0x11413133, }, /* 548 */ { 0x31331114, 0x11311154, 0x12322232, }, /* 549 */ { 0x41331122, 0x21311162, 0x13231331, }, /* 550 */ { 0x31331213, 0x61311212, 0x11413232, }, /* 551 */ { 0x41331221, 0x11311253, 0x12322331, }, /* 552 */ { 0x31331312, 0x21311261, 0x11413331, }, /* 553 */ { 0x31331411, 0x61311311, 0x14141141, }, /* 554 */ { 0x22241114, 0x11311352, 0x13232141, }, /* 555 */ { 0x32241122, 0x11311451, 0x12323141, }, /* 556 */ { 0x21332114, 0x52221113, 0x11414141, }, /* 557 */ { 0x22241213, 0x62221121, 0x11421116, }, /* 558 */ { 0x32241221, 0x12221162, 0x21421124, }, /* 559 */ { 0x21332213, 0x51312113, 0x31421132, }, /* 560 */ { 0x31332221, 0x61312121, 0x11421215, }, /* 561 */ { 0x21332312, 0x11312162, 0x21421223, }, /* 562 */ { 0x22241411, 0x12221261, 0x31421231, }, /* 563 */ { 0x21332411, 0x51312212, 0x11421314, }, /* 564 */ { 0x13151114, 0x52221311, 0x21421322, }, /* 565 */ { 0x23151122, 0x11312261, 0x11421413, }, /* 566 */ { 0x12242114, 0x51312311, 0x21421421, }, /* 567 */ { 0x13151213, 0x43131113, 0x11421512, }, /* 568 */ { 0x23151221, 0x53131121, 0x11421611, }, /* 569 */ { 0x11333114, 0x42222113, 0x12331124, }, /* 570 */ { 0x12242213, 0x43131212, 0x22331132, }, /* 571 */ { 0x22242221, 0x41313113, 0x11422124, }, /* 572 */ { 0x11333213, 0x51313121, 0x12331223, }, /* 573 */ { 0x21333221, 0x43131311, 0x22331231, }, /* 574 */ { 0x13151411, 0x41313212, 0x11422223, }, /* 575 */ { 0x11333312, 0x42222311, 0x21422231, }, /* 576 */ { 0x12242411, 0x41313311, 0x11422322, }, /* 577 */ { 0x11333411, 0x33132113, 0x12331421, }, /* 578 */ { 0x12243122, 0x43132121, 0x11422421, }, /* 579 */ { 0x11334122, 0x32223113, 0x13241132, }, /* 580 */ { 0x11334221, 0x33132212, 0x12332132, }, /* 581 */ { 0x41341121, 0x31314113, 0x13241231, }, /* 582 */ { 0x31341311, 0x32223212, 0x11423132, }, /* 583 */ { 0x32251121, 0x33132311, 0x12332231, }, /* 584 */ { 0x22251212, 0x31314212, 0x11423231, }, /* 585 */ { 0x22251311, 0x32223311, 0x11431115, }, /* 586 */ { 0x13161113, 0x31314311, 0x21431123, }, /* 587 */ { 0x12252113, 0x23133113, 0x31431131, }, /* 588 */ { 0x11343113, 0x33133121, 0x11431214, }, /* 589 */ { 0x13161311, 0x22224113, 0x21431222, }, /* 590 */ { 0x12252311, 0x23133212, 0x11431313, }, /* 591 */ { 0x24111125, 0x21315113, 0x21431321, }, /* 592 */ { 0x14111216, 0x22224212, 0x11431412, }, /* 593 */ { 0x24111224, 0x23133311, 0x11431511, }, /* 594 */ { 0x14111315, 0x21315212, 0x12341123, }, /* 595 */ { 0x24111323, 0x22224311, 0x22341131, }, /* 596 */ { 0x34111331, 0x21315311, 0x11432123, }, /* 597 */ { 0x14111414, 0x13134113, 0x12341222, }, /* 598 */ { 0x24111422, 0x23134121, 0x11432222, }, /* 599 */ { 0x14111513, 0x12225113, 0x12341321, }, /* 600 */ { 0x24111521, 0x13134212, 0x11432321, }, /* 601 */ { 0x14112125, 0x11316113, 0x13251131, }, /* 602 */ { 0x24112133, 0x12225212, 0x12342131, }, /* 603 */ { 0x34112141, 0x13134311, 0x11433131, }, /* 604 */ { 0x14112224, 0x11316212, 0x11441114, }, /* 605 */ { 0x24112232, 0x12225311, 0x21441122, }, /* 606 */ { 0x14112323, 0x11316311, 0x11441213, }, /* 607 */ { 0x24112331, 0x13135121, 0x21441221, }, /* 608 */ { 0x14112422, 0x12226121, 0x11441312, }, /* 609 */ { 0x14112521, 0x61321112, 0x11441411, }, /* 610 */ { 0x14113133, 0x11321153, 0x12351122, }, /* 611 */ { 0x24113141, 0x21321161, 0x11442122, }, /* 612 */ { 0x14113232, 0x61321211, 0x12351221, }, /* 613 */ { 0x14113331, 0x11321252, 0x11442221, }, /* 614 */ { 0x14114141, 0x11321351, 0x11451113, }, /* 615 */ { 0x23211116, 0x52231112, 0x21451121, }, /* 616 */ { 0x33211124, 0x12231161, 0x11451212, }, /* 617 */ { 0x43211132, 0x51322112, 0x11451311, }, /* 618 */ { 0x23211215, 0x52231211, 0x12361121, }, /* 619 */ { 0x33211223, 0x11322161, 0x11452121, }, /* 620 */ { 0x23211314, 0x51322211, 0x15111143, }, /* 621 */ { 0x33211322, 0x43141112, 0x25111151, }, /* 622 */ { 0x23211413, 0x42232112, 0x15111242, }, /* 623 */ { 0x33211421, 0x43141211, 0x15111341, }, /* 624 */ { 0x23211512, 0x41323112, 0x15112151, }, /* 625 */ { 0x14121116, 0x42232211, 0x14211134, }, /* 626 */ { 0x24121124, 0x41323211, 0x24211142, }, /* 627 */ { 0x34121132, 0x33142112, 0x14211233, }, /* 628 */ { 0x13212116, 0x32233112, 0x24211241, }, /* 629 */ { 0x14121215, 0x33142211, 0x14211332, }, /* 630 */ { 0x33212132, 0x31324112, 0x14211431, }, /* 631 */ { 0x34121231, 0x32233211, 0x15121142, }, /* 632 */ { 0x13212215, 0x31324211, 0x14212142, }, /* 633 */ { 0x23212223, 0x23143112, 0x15121241, }, /* 634 */ { 0x33212231, 0x22234112, 0x14212241, }, /* 635 */ { 0x13212314, 0x23143211, 0x13311125, }, /* 636 */ { 0x14121413, 0x21325112, 0x23311133, }, /* 637 */ { 0x24121421, 0x22234211, 0x33311141, }, /* 638 */ { 0x13212413, 0x21325211, 0x13311224, }, /* 639 */ { 0x23212421, 0x13144112, 0x23311232, }, /* 640 */ { 0x14121611, 0x12235112, 0x13311323, }, /* 641 */ { 0x14122124, 0x13144211, 0x23311331, }, /* 642 */ { 0x24122132, 0x11326112, 0x13311422, }, /* 643 */ { 0x13213124, 0x12235211, 0x13311521, }, /* 644 */ { 0x14122223, 0x11326211, 0x14221133, }, /* 645 */ { 0x24122231, 0x61331111, 0x24221141, }, /* 646 */ { 0x13213223, 0x11331152, 0x13312133, }, /* 647 */ { 0x23213231, 0x11331251, 0x14221232, }, /* 648 */ { 0x13213322, 0x52241111, 0x13312232, }, /* 649 */ { 0x14122421, 0x51332111, 0x14221331, }, /* 650 */ { 0x14123132, 0x43151111, 0x13312331, }, /* 651 */ { 0x13214132, 0x42242111, 0x15131141, }, /* 652 */ { 0x14123231, 0x41333111, 0x14222141, }, /* 653 */ { 0x13214231, 0x33152111, 0x13313141, }, /* 654 */ { 0x32311115, 0x32243111, 0x12411116, }, /* 655 */ { 0x42311123, 0x31334111, 0x22411124, }, /* 656 */ { 0x52311131, 0x23153111, 0x32411132, }, /* 657 */ { 0x32311214, 0x22244111, 0x12411215, }, /* 658 */ { 0x42311222, 0x21335111, 0x22411223, }, /* 659 */ { 0x32311313, 0x13154111, 0x32411231, }, /* 660 */ { 0x42311321, 0x12245111, 0x12411314, }, /* 661 */ { 0x32311412, 0x11336111, 0x22411322, }, /* 662 */ { 0x32311511, 0x11341151, 0x12411413, }, /* 663 */ { 0x23221115, 0x44111114, 0x22411421, }, /* 664 */ { 0x33221123, 0x54111122, 0x12411512, }, /* 665 */ { 0x22312115, 0x44111213, 0x12411611, }, /* 666 */ { 0x23221214, 0x54111221, 0x13321124, }, /* 667 */ { 0x33221222, 0x44111312, 0x23321132, }, /* 668 */ { 0x22312214, 0x44111411, 0x12412124, }, /* 669 */ { 0x32312222, 0x34112114, 0x13321223, }, /* 670 */ { 0x33221321, 0x44112122, 0x23321231, }, /* 671 */ { 0x22312313, 0x34112213, 0x12412223, }, /* 672 */ { 0x23221412, 0x44112221, 0x22412231, }, /* 673 */ { 0x22312412, 0x34112312, 0x12412322, }, /* 674 */ { 0x23221511, 0x34112411, 0x13321421, }, /* 675 */ { 0x22312511, 0x24113114, 0x12412421, }, /* 676 */ { 0x14131115, 0x34113122, 0x14231132, }, /* 677 */ { 0x24131123, 0x24113213, 0x13322132, }, /* 678 */ { 0x13222115, 0x34113221, 0x14231231, }, /* 679 */ { 0x14131214, 0x24113312, 0x12413132, }, /* 680 */ { 0x33222131, 0x24113411, 0x13322231, }, /* 681 */ { 0x12313115, 0x14114114, 0x12413231, }, /* 682 */ { 0x13222214, 0x24114122, 0x21511115, }, /* 683 */ { 0x23222222, 0x14114213, 0x31511123, }, /* 684 */ { 0x24131321, 0x24114221, 0x41511131, }, /* 685 */ { 0x12313214, 0x14114312, 0x21511214, }, /* 686 */ { 0x22313222, 0x14114411, 0x31511222, }, /* 687 */ { 0x14131412, 0x14115122, 0x21511313, }, /* 688 */ { 0x12313313, 0x14115221, 0x31511321, }, /* 689 */ { 0x13222412, 0x53211113, 0x21511412, }, /* 690 */ { 0x14131511, 0x63211121, 0x21511511, }, /* 691 */ { 0x13222511, 0x13211162, 0x12421115, }, /* 692 */ { 0x14132123, 0x53211212, 0x22421123, }, /* 693 */ { 0x24132131, 0x13211261, 0x32421131, }, /* 694 */ { 0x13223123, 0x53211311, 0x11512115, }, /* 695 */ { 0x14132222, 0x44121113, 0x12421214, }, /* 696 */ { 0x12314123, 0x54121121, 0x22421222, }, /* 697 */ { 0x13223222, 0x43212113, 0x11512214, }, /* 698 */ { 0x14132321, 0x44121212, 0x21512222, }, /* 699 */ { 0x12314222, 0x43212212, 0x22421321, }, /* 700 */ { 0x13223321, 0x44121311, 0x11512313, }, /* 701 */ { 0x14133131, 0x43212311, 0x12421412, }, /* 702 */ { 0x13224131, 0x34122113, 0x11512412, }, /* 703 */ { 0x12315131, 0x44122121, 0x12421511, }, /* 704 */ { 0x41411114, 0x33213113, 0x11512511, }, /* 705 */ { 0x51411122, 0x34122212, 0x13331123, }, /* 706 */ { 0x41411213, 0x33213212, 0x23331131, }, /* 707 */ { 0x51411221, 0x34122311, 0x12422123, }, /* 708 */ { 0x41411312, 0x33213311, 0x13331222, }, /* 709 */ { 0x41411411, 0x24123113, 0x11513123, }, /* 710 */ { 0x32321114, 0x34123121, 0x12422222, }, /* 711 */ { 0x42321122, 0x23214113, 0x13331321, }, /* 712 */ { 0x31412114, 0x24123212, 0x11513222, }, /* 713 */ { 0x41412122, 0x23214212, 0x12422321, }, /* 714 */ { 0x42321221, 0x24123311, 0x11513321, }, /* 715 */ { 0x31412213, 0x23214311, 0x14241131, }, /* 716 */ { 0x41412221, 0x14124113, 0x13332131, }, /* 717 */ { 0x31412312, 0x24124121, 0x12423131, }, /* 718 */ { 0x32321411, 0x13215113, 0x11514131, }, /* 719 */ { 0x31412411, 0x14124212, 0x21521114, }, /* 720 */ { 0x23231114, 0x13215212, 0x31521122, }, /* 721 */ { 0x33231122, 0x14124311, 0x21521213, }, /* 722 */ { 0x22322114, 0x13215311, 0x31521221, }, /* 723 */ { 0x23231213, 0x14125121, 0x21521312, }, /* 724 */ { 0x33231221, 0x13216121, 0x21521411, }, /* 725 */ { 0x21413114, 0x62311112, 0x12431114, }, /* 726 */ { 0x22322213, 0x12311153, 0x22431122, }, /* 727 */ { 0x32322221, 0x22311161, 0x11522114, }, /* 728 */ { 0x21413213, 0x62311211, 0x12431213, }, /* 729 */ { 0x31413221, 0x12311252, 0x22431221, }, /* 730 */ { 0x23231411, 0x12311351, 0x11522213, }, /* 731 */ { 0x21413312, 0x53221112, 0x21522221, }, /* 732 */ { 0x22322411, 0x13221161, 0x11522312, }, /* 733 */ { 0x21413411, 0x52312112, 0x12431411, }, /* 734 */ { 0x14141114, 0x53221211, 0x11522411, }, /* 735 */ { 0x24141122, 0x12312161, 0x13341122, }, /* 736 */ { 0x13232114, 0x52312211, 0x12432122, }, /* 737 */ { 0x14141213, 0x44131112, 0x13341221, }, /* 738 */ { 0x24141221, 0x43222112, 0x11523122, }, /* 739 */ { 0x12323114, 0x44131211, 0x12432221, }, /* 740 */ { 0x13232213, 0x42313112, 0x11523221, }, /* 741 */ { 0x23232221, 0x43222211, 0x21531113, }, /* 742 */ { 0x11414114, 0x42313211, 0x31531121, }, /* 743 */ { 0x12323213, 0x34132112, 0x21531212, }, /* 744 */ { 0x22323221, 0x33223112, 0x21531311, }, /* 745 */ { 0x14141411, 0x34132211, 0x12441113, }, /* 746 */ { 0x11414213, 0x32314112, 0x22441121, }, /* 747 */ { 0x21414221, 0x33223211, 0x11532113, }, /* 748 */ { 0x13232411, 0x32314211, 0x12441212, }, /* 749 */ { 0x11414312, 0x24133112, 0x11532212, }, /* 750 */ { 0x14142122, 0x23224112, 0x12441311, }, /* 751 */ { 0x13233122, 0x24133211, 0x11532311, }, /* 752 */ { 0x14142221, 0x22315112, 0x13351121, }, /* 753 */ { 0x12324122, 0x23224211, 0x12442121, }, /* 754 */ { 0x13233221, 0x22315211, 0x11533121, }, /* 755 */ { 0x11415122, 0x14134112, 0x21541112, }, /* 756 */ { 0x12324221, 0x13225112, 0x21541211, }, /* 757 */ { 0x11415221, 0x14134211, 0x12451112, }, /* 758 */ { 0x41421113, 0x12316112, 0x11542112, }, /* 759 */ { 0x51421121, 0x13225211, 0x12451211, }, /* 760 */ { 0x41421212, 0x12316211, 0x11542211, }, /* 761 */ { 0x41421311, 0x11411144, 0x16111142, }, /* 762 */ { 0x32331113, 0x21411152, 0x16111241, }, /* 763 */ { 0x42331121, 0x11411243, 0x15211133, }, /* 764 */ { 0x31422113, 0x21411251, 0x25211141, }, /* 765 */ { 0x41422121, 0x11411342, 0x15211232, }, /* 766 */ { 0x31422212, 0x11411441, 0x15211331, }, /* 767 */ { 0x32331311, 0x62321111, 0x16121141, }, /* 768 */ { 0x31422311, 0x12321152, 0x15212141, }, /* 769 */ { 0x23241113, 0x61412111, 0x14311124, }, /* 770 */ { 0x33241121, 0x11412152, 0x24311132, }, /* 771 */ { 0x22332113, 0x12321251, 0x14311223, }, /* 772 */ { 0x23241212, 0x11412251, 0x24311231, }, /* 773 */ { 0x21423113, 0x53231111, 0x14311322, }, /* 774 */ { 0x22332212, 0x52322111, 0x14311421, }, /* 775 */ { 0x23241311, 0x51413111, 0x15221132, }, /* 776 */ { 0x21423212, 0x44141111, 0x14312132, }, /* 777 */ { 0x22332311, 0x43232111, 0x15221231, }, /* 778 */ { 0x21423311, 0x42323111, 0x14312231, }, /* 779 */ { 0x14151113, 0x41414111, 0x13411115, }, /* 780 */ { 0x24151121, 0x34142111, 0x23411123, }, /* 781 */ { 0x13242113, 0x33233111, 0x33411131, }, /* 782 */ { 0x23242121, 0x32324111, 0x13411214, }, /* 783 */ { 0x12333113, 0x31415111, 0x23411222, }, /* 784 */ { 0x13242212, 0x24143111, 0x13411313, }, /* 785 */ { 0x14151311, 0x23234111, 0x23411321, }, /* 786 */ { 0x11424113, 0x22325111, 0x13411412, }, /* 787 */ { 0x12333212, 0x21416111, 0x13411511, }, /* 788 */ { 0x13242311, 0x14144111, 0x14321123, }, /* 789 */ { 0x11424212, 0x13235111, 0x24321131, }, /* 790 */ { 0x12333311, 0x12326111, 0x13412123, }, /* 791 */ { 0x11424311, 0x11421143, 0x23412131, }, /* 792 */ { 0x13243121, 0x21421151, 0x13412222, }, /* 793 */ { 0x11425121, 0x11421242, 0x14321321, }, /* 794 */ { 0x41431211, 0x11421341, 0x13412321, }, /* 795 */ { 0x31432112, 0x12331151, 0x15231131, }, /* 796 */ { 0x31432211, 0x11422151, 0x14322131, }, /* 797 */ { 0x22342112, 0x11431142, 0x13413131, }, /* 798 */ { 0x21433112, 0x11431241, 0x22511114, }, /* 799 */ { 0x21433211, 0x11441141, 0x32511122, }, /* 800 */ { 0x13252112, 0x45111113, 0x22511213, }, /* 801 */ { 0x12343112, 0x45111212, 0x32511221, }, /* 802 */ { 0x11434112, 0x45111311, 0x22511312, }, /* 803 */ { 0x11434211, 0x35112113, 0x22511411, }, /* 804 */ { 0x15111116, 0x45112121, 0x13421114, }, /* 805 */ { 0x15111215, 0x35112212, 0x23421122, }, /* 806 */ { 0x25111223, 0x35112311, 0x12512114, }, /* 807 */ { 0x15111314, 0x25113113, 0x22512122, }, /* 808 */ { 0x15111413, 0x35113121, 0x23421221, }, /* 809 */ { 0x15111512, 0x25113212, 0x12512213, }, /* 810 */ { 0x15112124, 0x25113311, 0x13421312, }, /* 811 */ { 0x15112223, 0x15114113, 0x12512312, }, /* 812 */ { 0x15112322, 0x25114121, 0x13421411, }, /* 813 */ { 0x15112421, 0x15114212, 0x12512411, }, /* 814 */ { 0x15113132, 0x15114311, 0x14331122, }, /* 815 */ { 0x15113231, 0x15115121, 0x13422122, }, /* 816 */ { 0x24211115, 0x54211112, 0x14331221, }, /* 817 */ { 0x24211214, 0x14211161, 0x12513122, }, /* 818 */ { 0x34211222, 0x54211211, 0x13422221, }, /* 819 */ { 0x24211313, 0x45121112, 0x12513221, }, /* 820 */ { 0x34211321, 0x44212112, 0x31611113, }, /* 821 */ { 0x24211412, 0x45121211, 0x41611121, }, /* 822 */ { 0x24211511, 0x44212211, 0x31611212, }, /* 823 */ { 0x15121115, 0x35122112, 0x31611311, }, /* 824 */ { 0x25121123, 0x34213112, 0x22521113, }, /* 825 */ { 0x14212115, 0x35122211, 0x32521121, }, /* 826 */ { 0x24212123, 0x34213211, 0x21612113, }, /* 827 */ { 0x25121222, 0x25123112, 0x22521212, }, /* 828 */ { 0x14212214, 0x24214112, 0x21612212, }, /* 829 */ { 0x24212222, 0x25123211, 0x22521311, }, /* 830 */ { 0x14212313, 0x24214211, 0x21612311, }, /* 831 */ { 0x24212321, 0x15124112, 0x13431113, }, /* 832 */ { 0x14212412, 0x14215112, 0x23431121, }, /* 833 */ { 0x15121511, 0x15124211, 0x12522113, }, /* 834 */ { 0x14212511, 0x14215211, 0x13431212, }, /* 835 */ { 0x15122123, 0x63311111, 0x11613113, }, /* 836 */ { 0x25122131, 0x13311152, 0x12522212, }, /* 837 */ { 0x14213123, 0x13311251, 0x13431311, }, /* 838 */ { 0x24213131, 0x54221111, 0x11613212, }, /* 839 */ { 0x14213222, 0x53312111, 0x12522311, }, /* 840 */ { 0x15122321, 0x45131111, 0x11613311, }, /* 841 */ { 0x14213321, 0x44222111, 0x14341121, }, /* 842 */ { 0x15123131, 0x43313111, 0x13432121, }, /* 843 */ { 0x14214131, 0x35132111, 0x12523121, }, /* 844 */ { 0x33311114, 0x34223111, 0x11614121, }, /* 845 */ { 0x33311213, 0x33314111, 0x31621112, }, /* 846 */ { 0x33311312, 0x25133111, 0x31621211, }, /* 847 */ { 0x33311411, 0x24224111, 0x22531112, }, /* 848 */ { 0x24221114, 0x23315111, 0x21622112, }, /* 849 */ { 0x23312114, 0x15134111, 0x22531211, }, /* 850 */ { 0x33312122, 0x14225111, 0x21622211, }, /* 851 */ { 0x34221221, 0x13316111, 0x13441112, }, /* 852 */ { 0x23312213, 0x12411143, 0x12532112, }, /* 853 */ { 0x33312221, 0x22411151, 0x13441211, }, /* 854 */ { 0x23312312, 0x12411242, 0x11623112, }, /* 855 */ { 0x24221411, 0x12411341, 0x12532211, }, /* 856 */ { 0x23312411, 0x13321151, 0x11623211, }, /* 857 */ { 0x15131114, 0x12412151, 0x31631111, }, /* 858 */ { 0x14222114, 0x11511134, 0x22541111, }, /* 859 */ { 0x15131213, 0x21511142, 0x21632111, }, /* 860 */ { 0x25131221, 0x11511233, 0x13451111, }, /* 861 */ { 0x13313114, 0x21511241, 0x12542111, }, /* 862 */ { 0x14222213, 0x11511332, 0x11633111, }, /* 863 */ { 0x15131312, 0x11511431, 0x16211132, }, /* 864 */ { 0x13313213, 0x12421142, 0x16211231, }, /* 865 */ { 0x14222312, 0x11512142, 0x15311123, }, /* 866 */ { 0x15131411, 0x12421241, 0x25311131, }, /* 867 */ { 0x13313312, 0x11512241, 0x15311222, }, /* 868 */ { 0x14222411, 0x11521133, 0x15311321, }, /* 869 */ { 0x15132122, 0x21521141, 0x16221131, }, /* 870 */ { 0x14223122, 0x11521232, 0x15312131, }, /* 871 */ { 0x15132221, 0x11521331, 0x14411114, }, /* 872 */ { 0x13314122, 0x12431141, 0x24411122, }, /* 873 */ { 0x14223221, 0x11522141, 0x14411213, }, /* 874 */ { 0x13314221, 0x11531132, 0x24411221, }, /* 875 */ { 0x42411113, 0x11531231, 0x14411312, }, /* 876 */ { 0x42411212, 0x11541131, 0x14411411, }, /* 877 */ { 0x42411311, 0x36112112, 0x15321122, }, /* 878 */ { 0x33321113, 0x36112211, 0x14412122, }, /* 879 */ { 0x32412113, 0x26113112, 0x15321221, }, /* 880 */ { 0x42412121, 0x26113211, 0x14412221, }, /* 881 */ { 0x32412212, 0x16114112, 0x23511113, }, /* 882 */ { 0x33321311, 0x16114211, 0x33511121, }, /* 883 */ { 0x32412311, 0x45212111, 0x23511212, }, /* 884 */ { 0x24231113, 0x36122111, 0x23511311, }, /* 885 */ { 0x34231121, 0x35213111, 0x14421113, }, /* 886 */ { 0x23322113, 0x26123111, 0x24421121, }, /* 887 */ { 0x33322121, 0x25214111, 0x13512113, }, /* 888 */ { 0x22413113, 0x16124111, 0x23512121, }, /* 889 */ { 0x23322212, 0x15215111, 0x13512212, }, /* 890 */ { 0x24231311, 0x14311151, 0x14421311, }, /* 891 */ { 0x22413212, 0x13411142, 0x13512311, }, /* 892 */ { 0x23322311, 0x13411241, 0x15331121, }, /* 893 */ { 0x22413311, 0x12511133, 0x14422121, }, /* 894 */ { 0x15141113, 0x22511141, 0x13513121, }, /* 895 */ { 0x25141121, 0x12511232, 0x32611112, }, /* 896 */ { 0x14232113, 0x12511331, 0x32611211, }, /* 897 */ { 0x24232121, 0x13421141, 0x23521112, }, /* 898 */ { 0x13323113, 0x12512141, 0x22612112, }, /* 899 */ { 0x14232212, 0x11611124, 0x23521211, }, /* 900 */ { 0x15141311, 0x21611132, 0x22612211, }, /* 901 */ { 0x12414113, 0x11611223, 0x14431112, }, /* 902 */ { 0x13323212, 0x21611231, 0x13522112, }, /* 903 */ { 0x14232311, 0x11611322, 0x14431211, }, /* 904 */ { 0x12414212, 0x11611421, 0x12613112, }, /* 905 */ { 0x13323311, 0x12521132, 0x13522211, }, /* 906 */ { 0x15142121, 0x11612132, 0x12613211, }, /* 907 */ { 0x14233121, 0x12521231, 0x32621111, }, /* 908 */ { 0x13324121, 0x11612231, 0x23531111, }, /* 909 */ { 0x12415121, 0x11621123, 0x22622111, }, /* 910 */ { 0x51511112, 0x21621131, 0x14441111, }, /* 911 */ { 0x51511211, 0x11621222, 0x13532111, }, /* 912 */ { 0x42421112, 0x11621321, 0x12623111, }, /* 913 */ { 0x41512112, 0x12531131, 0x16311122, }, /* 914 */ { 0x42421211, 0x11622131, 0x16311221, }, /* 915 */ { 0x41512211, 0x11631122, 0x15411113, }, /* 916 */ { 0x33331112, 0x11631221, 0x25411121, }, /* 917 */ { 0x32422112, 0x14411141, 0x15411212, }, /* 918 */ { 0x33331211, 0x13511132, 0x15411311, }, /* 919 */ { 0x31513112, 0x13511231, 0x16321121, }, /* 920 */ { 0x32422211, 0x12611123, 0x15412121, }, /* 921 */ { 0x31513211, 0x22611131, 0x24511112, }, /* 922 */ { 0x24241112, 0x12611222, 0x24511211, }, /* 923 */ { 0x23332112, 0x12611321, 0x15421112, }, /* 924 */ { 0x24241211, 0x13521131, 0x14512112, }, /* 925 */ { 0x22423112, 0x12612131, 0x15421211, }, /* 926 */ { 0x23332211, 0x12621122, 0x14512211, }, /* 927 */ { 0x21514112, 0x12621221, 0x33611111, }, /* 928 */ }; #endif zbar-0.23/test/test_examples.sh.in0000664000175000017500000000326513471225716014132 00000000000000#!/bin/bash unset ERR DIR="@abs_top_srcdir@" ZBARIMG="@abs_top_builddir@/zbarimg/zbarimg --nodbus" test() { if [ "$2" != "" ]; then i="$DIR/examples/$2" j="$1 $2" else i="$DIR/examples/$1" j="$1" fi; if [ "$2" != "" ]; then CMD="$ZBARIMG $1" else CMD="$ZBARIMG" fi CK=`$CMD "$i" 2>/dev/null|sha1sum|cut -d" " -f1` ORG=`grep "zbarimg $j" "$DIR/examples/sha1sum"|cut -d " " -f1` if [ "$CK" != "$ORG" ]; then echo "FAILED: $i ($CK instead of $ORG)" echo -e "\tcmd: $CMD '$i'" echo -en "\tresults: " $CMD "$i" 2>/dev/null ERR=1 fi } if [ "@ENABLE_CODE128@" == "1" ]; then test code-128.png fi if [ "@ENABLE_CODE93@" == "1" ]; then test code-93.png fi if [ "@ENABLE_CODE39@" == "1" ]; then test code-39.png fi if [ "@ENABLE_CODABAR@" == "1" ]; then test codabar.png fi if [ "@ENABLE_DATABAR@" == "1" ]; then test databar.png test databar-exp.png fi if [ "@ENABLE_EAN@" == "1" ]; then test -Sean2.enable ean-2.png test -Sean5.enable ean-5.png test ean-8.png test ean-13.png test -Sisbn10.enable ean-13.png test -Sisbn13.enable ean-13.png test -Supca.enable code-upc-a.png fi if [ "@ENABLE_I25@" == "1" ]; then test i2-5.png fi if [ "@ENABLE_QRCODE@" == "1" ]; then test qr-code.png test -Stest-inverted qr-code-inverted.png fi if [ "@ENABLE_SQCODE@" == "1" ]; then test sqcode1-generated.png test sqcode1-scanned.png fi # The pdf417 code is incomplete: it doesn't output any results # #if [ "@ENABLE_PDF417@" == "1" ]; then # test code-pdf417.png #fi if [ "$ERR" == "" ]; then echo "zbarimg PASSED." else exit 1 fi zbar-0.23/test/test_jpeg.c0000664000175000017500000001521413471225716012441 00000000000000/*------------------------------------------------------------------------ * Copyright 2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #include #ifdef HAVE_INTTYPES_H # include #endif #include #include #include #include #include "test_images.h" unsigned char jpeg[405] = { 255, 216, 255, 224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 1, 0, 72, 0, 72, 0, 0, 255, 219, 0, 67, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 255, 219, 0, 67, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 255, 192, 0, 17, 8, 0, 8, 0, 8, 3, 1, 17, 0, 2, 17, 1, 3, 17, 1, 255, 196, 0, 20, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 255, 196, 0, 32, 16, 0, 1, 2, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 20, 22, 0, 8, 18, 19, 24, 6, 23, 36, 37, 39, 255, 196, 0, 20, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 255, 196, 0, 35, 17, 0, 2, 1, 1, 7, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 21, 19, 22, 0, 1, 7, 18, 23, 36, 38, 3, 4, 35, 37, 52, 255, 218, 0, 12, 3, 1, 0, 2, 17, 3, 17, 0, 63, 0, 118, 93, 56, 89, 200, 157, 68, 199, 111, 134, 71, 23, 12, 215, 215, 130, 197, 136, 103, 143, 117, 170, 97, 48, 42, 244, 202, 12, 216, 179, 211, 183, 29, 252, 24, 42, 160, 197, 45, 65, 146, 62, 181, 91, 48, 134, 52, 246, 76, 170, 151, 4, 42, 137, 198, 104, 56, 214, 96, 193, 7, 120, 197, 15, 154, 194, 128, 216, 207, 170, 114, 197, 220, 215, 36, 130, 123, 155, 219, 184, 172, 222, 150, 146, 23, 191, 47, 17, 204, 2, 197, 155, 246, 180, 206, 226, 223, 255, 217, }; unsigned char rgb[8*8*3] = { 255, 255, 255, 176, 238, 176, 94, 220, 94, 60, 213, 60, 60, 213, 60, 94, 220, 94, 176, 238, 176, 255, 255, 255, 176, 238, 176, 46, 210, 46, 10, 102, 10, 17, 204, 17, 17, 204, 17, 10, 102, 10, 46, 210, 46, 176, 238, 176, 94, 220, 94, 19, 204, 19, 9, 102, 9, 17, 204, 17, 17, 204, 17, 9, 102, 9, 19, 204, 19, 94, 220, 94, 60, 213, 60, 17, 204, 17, 9, 102, 9, 17, 204, 17, 17, 204, 17, 9, 102, 9, 17, 204, 17, 60, 213, 60, 60, 213, 60, 17, 204, 17, 17, 204, 17, 17, 204, 17, 17, 204, 17, 17, 204, 17, 17, 204, 17, 60, 213, 60, 94, 220, 94, 10, 102, 10, 17, 204, 17, 17, 204, 17, 17, 204, 17, 17, 204, 17, 10, 102, 10, 94, 220, 94, 176, 238, 176, 46, 210, 46, 10, 102, 10, 9, 102, 9, 9, 102, 9, 10, 102, 10, 46, 210, 46, 176, 238, 176, 255, 255, 255, 176, 238, 176, 94, 220, 94, 60, 213, 60, 60, 213, 60, 94, 220, 94, 176, 238, 176, 255, 255, 255, }; #define PROGRAM_NAME "test_video" static const char doc[] = "\nTest if ZBar is able to handle a video input (camera)\n"; static const struct argp_option options[] = { {"quiet", 'q', 0, 0, "Don't be verbose", 0}, {"help", '?', 0, 0, "Give this help list", -1}, {"usage", -3, 0, 0, "Give a short usage message", 0}, { 0 } }; static int quiet = 0; static error_t parse_opt(int k, char *optarg, struct argp_state *state) { switch (k) { case 'q': quiet = 1; break; case '?': argp_state_help(state, state->out_stream, ARGP_HELP_SHORT_USAGE | ARGP_HELP_LONG | ARGP_HELP_DOC); exit(0); case -3: argp_state_help(state, state->out_stream, ARGP_HELP_USAGE); exit(0); default: return ARGP_ERR_UNKNOWN; }; return 0; } static const struct argp argp = { .options = options, .parser = parse_opt, .doc = doc, }; int main (int argc, char **argv) { if (argp_parse(&argp, argc, argv, ARGP_NO_HELP | ARGP_NO_EXIT, 0, 0)) { argp_help(&argp, stderr, ARGP_HELP_SHORT_USAGE, PROGRAM_NAME); return -1; } if (!quiet) zbar_set_verbosity(32); else zbar_set_verbosity(0); zbar_processor_t *proc = zbar_processor_create(0); assert(proc); if(zbar_processor_init(proc, NULL, 1)) return(2); zbar_image_t *img = zbar_image_create(); zbar_image_set_size(img, 8, 8); zbar_image_set_format(img, fourcc('J','P','E','G')); zbar_image_set_data(img, jpeg, sizeof(jpeg), NULL); zbar_image_t *test = zbar_image_convert(img, fourcc('Y','8','0','0')); if(!test) return(2); if (!quiet) printf("converted: %d x %d (%lx) %08lx\n", zbar_image_get_width(test), zbar_image_get_height(test), zbar_image_get_data_length(test), zbar_image_get_format(test)); if(zbar_process_image(proc, test) < 0) return(3); if(zbar_processor_set_visible(proc, 1)) return(4); printf("jpeg PASSED.\n"); return(0); } zbar-0.23/test/test_cpp_img.cpp0000664000175000017500000001376213471225716013500 00000000000000//------------------------------------------------------------------------ // Copyright 2007-2009 (c) Jeff Brown // // This file is part of the ZBar Bar Code Reader. // // The ZBar Bar Code Reader is free software; you can redistribute it // and/or modify it under the terms of the GNU Lesser Public License as // published by the Free Software Foundation; either version 2.1 of // the License, or (at your option) any later version. // // The ZBar Bar Code Reader 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 Lesser Public License for more details. // // You should have received a copy of the GNU Lesser Public License // along with the ZBar Bar Code Reader; if not, write to the Free // Software Foundation, Inc., 51 Franklin St, Fifth Floor, // Boston, MA 02110-1301 USA // // http://sourceforge.net/projects/zbar //------------------------------------------------------------------------ // NB do not put anything before this header // it's here to check that we didn't omit any dependencies #include #include #include #include #include "test_images.h" bool debug = false; bool verbose = false; int errors = 0; zbar::zbar_symbol_type_t expect_type = zbar::ZBAR_NONE; std::string expect_data; template inline std::string to_string (const T& t) { std::stringstream ss; ss << t; return ss.str(); } static inline int error (const std::string &msg) { errors++; std::cerr << "ERROR: " << msg << std::endl; if(debug) abort(); return(-1); } static inline int check_loc (const zbar::Image &img, const zbar::Symbol &sym) { int n = 0; int w = img.get_width(); int h = img.get_height(); for(zbar::Symbol::PointIterator p(sym.point_begin()); p != sym.point_end(); ++p, n++) { zbar::Symbol::Point q(*p); if(q.x < 0 || q.x >= w || q.y < 0 || q.y >= h) error("location point out of range"); } return(!n); } static inline int check_symbol (const zbar::Image &img, const zbar::Symbol &sym) { zbar::zbar_symbol_type_t type(sym.get_type()); std::string data(sym.get_data()); bool pass = expect_type && type == expect_type && data == expect_data && sym.get_data_length() == expect_data.length() && sym.get_quality() > 4; if(pass) pass = !check_loc(img, sym); if(verbose || !pass) std::cerr << "decode Symbol: " << sym << std::endl; if(!expect_type) error("unexpected"); else if(!pass) error(std::string("expected: ") + zbar::zbar_get_symbol_name(expect_type) + " " + expect_data); expect_type = zbar::ZBAR_NONE; expect_data = ""; return(!pass); } static inline int check_image (const zbar::Image &img) { zbar::SymbolSet syms(img.get_symbols()); int setn = syms.get_size(), countn = 0; int rc = 0; for(zbar::SymbolIterator sym(syms.symbol_begin()); sym != syms.symbol_end(); ++sym, ++countn) rc |= check_symbol(img, *sym); if(countn != setn) rc |= error("SymbolSet size mismatch: exp=" + to_string(setn) + " act=" + to_string(countn)); return(rc); } static inline void expect (zbar::zbar_symbol_type_t type, std::string data) { if(expect_type) error(std::string("missing: ") + zbar_get_symbol_name(expect_type) + " " + expect_data); expect_type = type; expect_data = data; } class Handler : public zbar::Image::Handler { void image_callback(zbar::Image &img); }; void Handler::image_callback (zbar::Image &img) { bool unexpected = !expect_type; if(unexpected) error("unexpected image callback"); check_image(img); } static inline int test_processor () { // create processor w/no video and no window zbar::Processor proc(debug, NULL); Handler handler; proc.set_handler(handler); if(debug) { proc.set_visible(); proc.user_wait(); } // generate barcode test image zbar::Image rgb3(0, 0, "RGB3"); // test cast to C image if(test_image_ean13(rgb3)) error("failed to generate image"); // test decode expect(zbar::ZBAR_EAN13, test_image_ean13_data); proc.process_image(rgb3); if(debug) proc.user_wait(); expect(zbar::ZBAR_EAN13, test_image_ean13_data); check_image(rgb3); if(rgb3.get_format() != zbar_fourcc('R','G','B','3')) error("image format mismatch"); expect(zbar::ZBAR_NONE, ""); proc.set_config(zbar::ZBAR_EAN13, zbar::ZBAR_CFG_ENABLE, false); proc.process_image(rgb3); check_image(rgb3); if(debug) proc.user_wait(); proc.set_config("ean13.en"); expect(zbar::ZBAR_EAN13, test_image_ean13_data); proc << rgb3; expect(zbar::ZBAR_EAN13, test_image_ean13_data); check_image(rgb3); if(debug) proc.user_wait(); { zbar::Image grey(rgb3.convert(zbar_fourcc('G','R','E','Y'))); expect(zbar::ZBAR_EAN13, test_image_ean13_data); proc << grey; zbar::Image y800 = grey.convert("Y800"); expect(zbar::ZBAR_EAN13, test_image_ean13_data); proc << y800; } if(debug) // check image data retention proc.user_wait(); expect(zbar::ZBAR_NONE, ""); return(0); } int main (int argc, char **argv) { debug = (argc > 1 && std::string(argv[1]) == "-d"); verbose = (debug || (argc > 1 && std::string(argv[1]) == "-v")); if(test_processor()) { error("ERROR: Processor test FAILED"); return(2); } if(test_image_check_cleanup()) error("cleanup failed"); if(errors) { std::cout << "processor FAILED" << std::endl; return(2); } else { std::cout << "processor PASSED." << std::endl; return(0); } } zbar-0.23/test/test_images.c0000664000175000017500000003403013471225700012747 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #ifdef HAVE_INTTYPES_H # include #endif #include #include #include #include #include #include "test_images.h" typedef enum format_type_e { GRAY, YUVP, YVUP, YUYV, YVYU, UYVY, RGB888, BGR888, RGB565B = 0x0565, RGB565L = 0x1565, RGB555B = 0x0555, RGB555L = 0x1555, } format_type_t; typedef struct format_def_s { uint32_t format; format_type_t type; uint8_t bpp; uint8_t xdiv, ydiv; } format_def_t; typedef union packed_u { uint32_t u32[3]; uint16_t u16[6]; uint8_t u8[12]; } packed_t; /* bar colors */ static const uint8_t Cr[] = { 0x22, 0x92, 0x80, 0xf0, 0x10, 0x80, 0x6e, 0xde }; static const uint8_t Cb[] = { 0x36, 0x10, 0x80, 0x5a, 0xa6, 0x80, 0xf0, 0xca }; static const format_def_t formats[] = { { fourcc('G','R','E','Y'), GRAY, 8, 0,0 }, { fourcc('Y','8','0','0'), GRAY, 8, 0,0 }, { fourcc('Y','8',' ',' '), GRAY, 8, 0,0 }, { fourcc('Y','8', 0 , 0 ), GRAY, 8, 0,0 }, { fourcc('Y','U','V','9'), YUVP, 9, 4,4 }, { fourcc('Y','V','U','9'), YVUP, 9, 4,4 }, { fourcc('I','4','2','0'), YUVP, 12, 2,2 }, { fourcc('Y','U','1','2'), YUVP, 12, 2,2 }, { fourcc('Y','V','1','2'), YVUP, 12, 2,2 }, { fourcc('4','1','1','P'), YUVP, 12, 4,1 }, { fourcc('N','V','1','2'), YUVP, 12, 2,2 }, { fourcc('N','V','2','1'), YVUP, 12, 2,2 }, { fourcc('4','2','2','P'), YUVP, 16, 2,1 }, { fourcc('Y','U','Y','V'), YUYV, 16, 2,1 }, { fourcc('Y','U','Y','2'), YUYV, 16, 2,1 }, { fourcc('Y','V','Y','U'), YVYU, 16, 2,1 }, { fourcc('U','Y','V','Y'), UYVY, 16, 2,1 }, { fourcc('R','G','B','3'), RGB888, 24, }, { fourcc('B','G','R','3'), BGR888, 24, }, { fourcc( 3 , 0 , 0 , 0 ), RGB888, 32, }, { fourcc('R','G','B','4'), RGB888, 32, }, { fourcc('B','G','R','4'), BGR888, 32, }, { fourcc('R','G','B','P'), RGB565L, 16, }, { fourcc('R','G','B','O'), RGB555L, 16, }, { fourcc('R','G','B','R'), RGB565B, 16, }, { fourcc('R','G','B','Q'), RGB555B, 16, }, { 0 } }; static const char *encoded_widths = "9 111 212241113121211311141132 11111 311213121312121332111132 111 9"; const char *test_image_ean13_data = "6268964977804"; static int allocated_images = 0; int test_image_check_cleanup () { if(allocated_images) fprintf(stderr, "ERROR: %d image data buffers still allocated\n", allocated_images); /*else fprintf(stderr, "all image data buffers freed\n");*/ return(allocated_images); } static void test_cleanup_handler (zbar_image_t *img) { void *data = (void*)zbar_image_get_data(img); /*fprintf(stderr, "cleanup image data @%p\n", data);*/ free(data); allocated_images--; } static inline const format_def_t* lookup_format (zbar_image_t *img) { uint32_t ifmt = zbar_image_get_format(img); const format_def_t *fmt; for(fmt = formats; fmt->format; fmt++) if(fmt->format == ifmt) break; if(!fmt->format) { fprintf(stderr, "ERROR: no %.4s (%08"PRIx32") format\n", (char*)&ifmt, ifmt); return(NULL); } return(fmt); } static inline const format_def_t* alloc_data (zbar_image_t *img) { allocated_images++; const format_def_t *fmt = lookup_format(img); if(!fmt) return(NULL); unsigned w = zbar_image_get_width(img); unsigned h = zbar_image_get_height(img); unsigned long planelen = w * h; unsigned long datalen = planelen * fmt->bpp / 8; uint8_t *data = malloc(datalen); zbar_image_set_data(img, data, datalen, test_cleanup_handler); /*fprintf(stderr, "create %.4s(%08"PRIx32") image data %lx bytes @%p\n", (char*)&fmt->format, fmt->format, datalen, data);*/ return(fmt); } /* write intensity plane */ static inline uint8_t* fill_bars_y (uint8_t *p, unsigned w, unsigned h) { unsigned x, y, i; unsigned y0 = (h + 31) / 30; for(y = 0; y < y0; y++) for(x = 0; x < w; x++) *(p++) = 0xff; for(; y < h - y0; y++) for(x = 0, i = 0; x < w; i++) { assert(i < 8); unsigned x0 = (((i + 1) * w) + 7) >> 3; assert(x0 <= w); unsigned v = ((((i & 1) ? y : h - y) * 256) + h - 1) / h; for(; x < x0; x++) *(p++) = v; } for(; y < h; y++) for(x = 0; x < w; x++) *(p++) = 0xff; return(p); } /* write Cb (U) or Cr (V) plane */ static inline uint8_t* fill_bars_uv (uint8_t *p, unsigned w, unsigned h, const uint8_t *C) { unsigned x, y, i; unsigned y0 = (h + 31) / 30; for(y = 0; y < y0; y++) for(x = 0; x < w; x++) *(p++) = 0x80; for(; y < h - y0; y++) for(x = 0, i = 0; x < w; i++) { assert(i < 8); unsigned x0 = (((i + 1) * w) + 7) >> 3; assert(x0 <= w); for(; x < x0; x++) *(p++) = C[i]; } for(; y < h; y++) for(x = 0; x < w; x++) *(p++) = 0x80; return(p); } /* write packed CbCr plane */ static inline uint8_t* fill_bars_nv (uint8_t *p, unsigned w, unsigned h, format_type_t order) { unsigned x, y, i; unsigned y0 = (h + 31) / 30; for(y = 0; y < y0; y++) for(x = 0; x < w; x++) { *(p++) = 0x80; *(p++) = 0x80; } for(; y < h - y0; y++) for(x = 0, i = 0; x < w; i++) { assert(i < 8); unsigned x0 = (((i + 1) * w) + 7) >> 3; assert(x0 <= w); uint8_t u = (order == YUVP) ? Cb[i] : Cr[i]; uint8_t v = (order == YUVP) ? Cr[i] : Cb[i]; for(; x < x0; x++) { *(p++) = u; *(p++) = v; } } for(; y < h; y++) for(x = 0; x < w; x++) { *(p++) = 0x80; *(p++) = 0x80; } return(p); } /* write packed YCbCr plane */ static inline uint8_t* fill_bars_yuv (uint8_t *p, unsigned w, unsigned h, format_type_t order) { unsigned x, y, i; unsigned y0 = (h + 31) / 30; packed_t yuv; uint32_t *q = (uint32_t*)p; w /= 2; yuv.u8[0] = yuv.u8[2] = (order == UYVY) ? 0x80 : 0xff; yuv.u8[1] = yuv.u8[3] = (order == UYVY) ? 0xff : 0x80; for(y = 0; y < y0; y++) for(x = 0; x < w; x++) *(q++) = yuv.u32[0]; for(; y < h - y0; y++) for(x = 0, i = 0; x < w; i++) { assert(i < 8); unsigned x0 = (((i + 1) * w) + 7) >> 3; assert(x0 <= w); unsigned v = ((((i & 1) ? y : h - y) * 256) + h - 1) / h; if(order == UYVY) { yuv.u8[0] = Cb[i]; yuv.u8[2] = Cr[i]; yuv.u8[1] = yuv.u8[3] = v; } else { yuv.u8[0] = yuv.u8[2] = v; yuv.u8[1] = (order == YUYV) ? Cb[i] : Cr[i]; yuv.u8[3] = (order == YVYU) ? Cr[i] : Cb[i]; } for(; x < x0; x++) *(q++) = yuv.u32[0]; } yuv.u8[0] = yuv.u8[2] = (order == UYVY) ? 0x80 : 0xff; yuv.u8[1] = yuv.u8[3] = (order == UYVY) ? 0xff : 0x80; for(; y < h; y++) for(x = 0; x < w; x++) *(q++) = yuv.u32[0]; return((uint8_t*)q); } static inline uint8_t* fill_bars_rgb (uint8_t *p, unsigned w, unsigned h, format_type_t order, int bpp) { unsigned x, y, i; unsigned y0 = (h + 31) / 30; packed_t rgb; unsigned headlen = y0 * w * bpp / 8; memset(p, 0xff, headlen); uint32_t *q = (uint32_t*)(p + headlen); for(y = y0; y < h - y0; y++) for(x = 0, i = 0; x < w; i++) { assert(i < 8); /* FIXME clean this up... */ unsigned x0 = (((i + 1) * w) + 7) >> 3; assert(x0 <= w); unsigned yi = (i & 1) ? y : h - y; unsigned v1, v0; if(yi < h / 2 - 1) { v1 = ((yi * 0x180) + h - 1) / h + 0x40; v0 = 0x00; } else { v1 = 0xff; v0 = (((yi - (h / 2)) * 0x180) + h - 1) / h + 0x40; } uint8_t r = (i & 4) ? v1 : v0; uint8_t g = (i & 2) ? v1 : v0; uint8_t b = (i & 1) ? v1 : v0; if(bpp == 32) { if(order == RGB888) { rgb.u8[0] = 0xff; rgb.u8[1] = r; rgb.u8[2] = g; rgb.u8[3] = b; } else { rgb.u8[0] = b; rgb.u8[1] = g; rgb.u8[2] = r; rgb.u8[3] = 0xff; } for(; x < x0; x++) *(q++) = rgb.u32[0]; } else if(bpp == 24) { rgb.u8[0] = rgb.u8[3] = rgb.u8[6] = rgb.u8[9] = (order == RGB888) ? r : b; rgb.u8[1] = rgb.u8[4] = rgb.u8[7] = rgb.u8[10] = g; rgb.u8[2] = rgb.u8[5] = rgb.u8[8] = rgb.u8[11] = (order == RGB888) ? b : r; for(; x < x0; x += 4) { *(q++) = rgb.u32[0]; *(q++) = rgb.u32[1]; *(q++) = rgb.u32[2]; } } else { assert(bpp == 16); r = ((r + 7) / 8) & 0x1f; b = ((b + 7) / 8) & 0x1f; if((order & 0x0fff) == 0x0555) { g = ((g + 7) / 8) & 0x1f; rgb.u16[0] = b | (g << 5) | (r << 10); } else { g = ((g + 3) / 4) & 0x3f; rgb.u16[0] = b | (g << 5) | (r << 11); } if(order & 0x1000) rgb.u16[0] = (rgb.u16[0] >> 8) | (rgb.u16[0] << 8); rgb.u16[1] = rgb.u16[0]; for(; x < x0; x += 2) *(q++) = rgb.u32[0]; } } memset(q, 0xff, headlen); return(((uint8_t*)q) + headlen); } int test_image_bars (zbar_image_t *img) { const format_def_t *fmt = alloc_data(img); if(!fmt) return(-1); unsigned w = zbar_image_get_width(img); unsigned h = zbar_image_get_height(img); uint8_t *data = (void*)zbar_image_get_data(img); assert(data); uint8_t *p = data; switch(fmt->type) { case GRAY: case YUVP: /* planar YUV */ case YVUP: p = fill_bars_y(p, w, h); if(fmt->type != GRAY) { w = (w + fmt->xdiv - 1) / fmt->xdiv; h = (h + fmt->ydiv - 1) / fmt->ydiv; } else break; if(fmt->format == fourcc('N','V','1','2') || fmt->format == fourcc('N','V','2','1')) p = fill_bars_nv(p, w, h, fmt->type); else if(fmt->type == YUVP || fmt->type == YVUP) { p = fill_bars_uv(p, w, h, (fmt->type == YUVP) ? Cb : Cr); p = fill_bars_uv(p, w, h, (fmt->type == YUVP) ? Cr : Cb); } break; case YUYV: /* packed YUV */ case YVYU: case UYVY: p = fill_bars_yuv(p, w, h, fmt->type); break; default: /* RGB */ p = fill_bars_rgb(p, w, h, fmt->type, fmt->bpp); break; } assert(p == data + zbar_image_get_data_length(img)); return(0); } int test_image_ean13 (zbar_image_t *img) { unsigned w = 114, h = 85; zbar_image_set_size(img, w, h); const format_def_t *fmt = alloc_data(img); if(!fmt) return(-1); uint8_t *data = (void*)zbar_image_get_data(img); unsigned int datalen = zbar_image_get_data_length(img); assert(data && datalen); uint8_t *p = data; /* FIXME randomize? */ memset(data, 0x80, datalen); int nrep = 1, nskip = 0; switch(fmt->type) { case YUVP: /* planar YUV */ case YVUP: case GRAY: break; case UYVY: /* packed YUV */ p++; case YUYV: case YVYU: nskip = 1; break; default: /* RGB */ nrep = fmt->bpp / 8; } int y = 0, x, i; for(; y < 10 && y < h; y++) for(x = 0; x < w; x++) { for(i = 0; i < nrep; i++) *p++ = 0xff; p += nskip; } for(; y < h - 10; y++) { uint8_t color = 0xff; const char *c; for(x = 0, c = encoded_widths; *c; c++) { int dx; if(*c == ' ') continue; for(dx = *c - '0'; dx > 0; dx--) { for(i = 0; i < nrep; i++) *p++ = color; p += nskip; x++; } color = ~color; } assert(!color); for(; x < w; x++) { for(i = 0; i < nrep; i++) *p++ = 0xff; p += nskip; } assert(x == w); } for(; y < h; y++) for(x = 0; x < w; x++) { for(i = 0; i < nrep; i++) *p++ = 0xff; p += nskip; } if(fmt->type == UYVY) p--; assert(p == data + datalen); return(0); } zbar-0.23/test/test_convert.c0000664000175000017500000000337213471225716013176 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDLIB_H # include #endif #include #include #include #include #include "test_images.h" #if 0 static uint32_t formats[] = { }; #endif int main (int argc, char *argv[]) { zbar_set_verbosity(10); uint32_t srcfmt = fourcc('I','4','2','0'); if(argc > 1) srcfmt = *(uint32_t*)argv[1]; zbar_image_t *img = zbar_image_create(); zbar_image_set_size(img, 640, 480); zbar_image_set_format(img, srcfmt); if(test_image_bars(img)) return(2); if(zbar_image_write(img, "/tmp/base")) return(1); return(0); } zbar-0.23/test/test_python.py0000775000175000017500000000346013471225716013246 00000000000000#!/usr/bin/env python #------------------------------------------------------------------------ # Copyright 2019 (c) Mauro Carvalho Chehab # # This file is part of the ZBar Bar Code Reader. # # The ZBar Bar Code Reader is free software; you can redistribute it # and/or modify it under the terms of the GNU Lesser Public License as # published by the Free Software Foundation; either version 2.1 of # the License, or (at your option) any later version. # # The ZBar Bar Code Reader 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 Lesser Public License for more details. # #------------------------------------------------------------------------ from __future__ import print_function import zbar, sys try: from PIL import Image except: try: import Image except: print("No image library on python. Aborting test") sys.exit() if len(sys.argv) < 1 or len(sys.argv) > 3: print("Usage: %s []") sys.exit(-1) filename = sys.argv[1] org_image = Image.open(filename) image = org_image.convert(mode='L') width = image.size[0] height = image.size[1] raw_data = image.tobytes() scanner = zbar.ImageScanner() image = zbar.Image(width=width, height=height, format='Y800', data=raw_data) scanner.scan(image) if len(sys.argv) == 3: text = sys.argv[2] found = False for symbol in image: found = True if symbol.data == text: print("OK") else: print("Expecting %s, received %s" % (text, symbol.data)) if not found: print("Can't process file") else: for symbol in image: print("Decoded as %s" % symbol.data) zbar-0.23/test/dbg_scan.cpp0000664000175000017500000002114213466560613012554 00000000000000/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) Jeff Brown * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * The ZBar Bar Code Reader 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 Lesser Public License for more details. * * You should have received a copy of the GNU Lesser Public License * along with the ZBar Bar Code Reader; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA * * http://sourceforge.net/projects/zbar *------------------------------------------------------------------------*/ #include #include #include #include #include using namespace std; using namespace zbar; #ifndef ZBAR_FIXED # define ZBAR_FIXED 5 #endif #define ZBAR_FRAC (1 << ZBAR_FIXED) Decoder decoder; Scanner scanner; /* undocumented API for drawing cutesy debug graphics */ extern "C" void zbar_scanner_get_state(const zbar_scanner_t *scn, unsigned *x, unsigned *cur_edge, unsigned *last_edge, int *y0, int *y1, int *y2, int *y1_thresh); void scan_image (const char *filename) { scanner.reset(); // normally scanner would reset associated decoder, // but this debug program connects them manually // (to make intermediate state more readily available) // so decoder must also be reset manually decoder.reset(); Magick::Image image; image.read(filename); string file = image.baseFilename(); size_t baseidx = file.rfind('/'); if(baseidx != string::npos) file = file.substr(baseidx + 1, file.length() - baseidx - 1); ofstream svg((file + ".svg").c_str()); unsigned inwidth = image.columns(); unsigned width = inwidth + 3; unsigned height = image.rows(); unsigned midy = height / 2; cerr << "x+: " << midy << endl; image.crop(Magick::Geometry(inwidth, 1, 0, midy)); svg << "" << endl << "" << endl << "" << endl << "" << endl << "" << endl << "" << endl; // brute force unsigned raw[inwidth]; { // extract scan from image pixels image.modifyImage(); Magick::Pixels view(image); Magick::PixelPacket *pxp = view.get(0, 0, inwidth, 1); Magick::ColorYUV y; double max = 0; svg << "" << endl << "" << endl; } image.depth(8); image.write(file + ".png"); // process scan and capture calculated values unsigned cur_edge[width], last_edge[width]; int y0[width], y1[width], y2[width], y1_thr[width]; svg << "" << endl; for(unsigned i = 0; i < width; i++) { int edge; if(i < inwidth) edge = scanner.scan_y(raw[i]); else edge = scanner.flush(); unsigned x; zbar_scanner_get_state(scanner, &x, &cur_edge[i], &last_edge[i], &y0[i], &y1[i], &y2[i], &y1_thr[i]); if(edge) { unsigned w = scanner.get_width(); if(w) svg << "" << endl << "" << endl << w << "" << endl; zbar_symbol_type_t sym = decoder.decode_width(w); if(sym > ZBAR_PARTIAL) { svg << "" << decoder.get_data_string() << "" << endl; } } else if((!i) ? last_edge[i] : last_edge[i] == last_edge[i - 1]) last_edge[i] = 0; } svg << "" << endl << "" << endl << "" << endl << "" << endl << "" << endl << "" << endl << "" << endl; svg << "" << endl << "" << endl << "" << endl << "" << endl << "" << endl << "" << endl << "" << endl << "" << endl; svg << "" << endl; } int main (int argc, const char *argv[]) { if(argc < 2) { cerr << "ERROR: specify image file(s) to scan" << endl; return(1); } for(int i = 1; i < argc; i++) scan_image(argv[i]); return(0); } zbar-0.23/test/barcodetest.py0000775000175000017500000002775213471225716013177 00000000000000#!/usr/bin/env python from __future__ import print_function import sys, re, unittest as UT, xml.etree.ElementTree as ET from os import path, getcwd from errno import EISDIR, EINVAL, EACCES from subprocess import Popen, PIPE from traceback import format_exception try: from io import StringIO except: from StringIO import StringIO try: from urllib2 import urlopen, HTTPError from urlparse import urljoin, urlunparse except: from urllib.request import urlopen from urllib.error import HTTPError from urllib.parse import urljoin, urlunparse debug = False # program to run - None means we still need to search for it zbarimg = None # arguments to said program zbarimg_args = [ '-q', '--xml', '--nodbus' ] # namespace support try: register_namespace = ET.register_namespace except AttributeError: def register_namespace(prefix, uri): ET._namespace_map[uri] = prefix # barcode results BC = 'http://zbar.sourceforge.net/2008/barcode' register_namespace('bc', BC) # testcase extensions TS = 'http://zbar.sourceforge.net/2009/test-spec' register_namespace('test', TS) # printing support def fixtag(node): return str(node.tag).split('}', 1)[-1] def toxml(node): s = StringIO() ET.ElementTree(node).write(s) return s.getvalue() def hexdump(data): print(data) for i, c in enumerate(data): if i & 0x7 == 0: print('[%04x]' % i, end=' ') print(' %04x' % ord(c), end=' ') if i & 0x7 == 0x7: print() if len(c) & 0x7 != 0x7: print('\n') # search for a file in the distribution def distdir_search(subdir, base, suffixes=('',)): # start with current dir, # then try script invocation path rundir = path.dirname(sys.argv[0]) search = [ '', rundir ] # finally, attempt to follow VPATH if present try: import re with open('Makefile', 'r') as makefile: for line in makefile: if re.match(r'^VPATH\s*=', line): vpath = line.split('=', 1)[1].strip() if vpath and vpath != rundir: search.append(vpath) break except: pass # poke around for subdir subdirs = tuple((subdir, path.join('..', subdir), '..', '')) for prefix in search: for subdir in subdirs: for suffix in suffixes: file = path.realpath(path.join(prefix, subdir, base + suffix)) if path.isfile(file): return(file) return None def find_zbarimg(): """search for zbarimg program to run. """ global zbarimg # look in dist dir first zbarimg = distdir_search('zbarimg', 'zbarimg', ('', '.exe')) if not zbarimg: # fall back to PATH zbarimg = 'zbarimg' if debug: print('using zbarimg from PATH') elif debug: print('using:', zbarimg) def run_zbarimg(images): """invoke zbarimg for the specified files. return results as an ET.Element """ args = [ zbarimg ] args.extend(zbarimg_args) args.extend(images) if debug: print('running:', ' '.join(args)) # FIXME should be able to pipe (feed) parser straight from output child = Popen(args, stdout = PIPE, stderr = PIPE) (xml, err) = child.communicate() rc = child.returncode if debug: print('zbarimg returned', rc) # FIXME trim usage from error msg assert rc in (0, 4), \ 'zbarimg returned error status (%d)\n' % rc + err assert not err, err result = ET.XML(xml) assert result.tag == ET.QName(BC, 'barcodes') return result class TestCase(UT.TestCase): """single barcode source test. must have source attribute set to an ET.Element representation of a bc:source tag before test is run. """ def shortDescription(self): return self.source.get('href') def setUp(self): if not zbarimg: find_zbarimg() def runTest(self): expect = self.source assert expect is not None assert expect.tag == ET.QName(BC, 'source') actual = run_zbarimg((expect.get('href'),)) self.assertEqual(len(actual), 1) try: compare_sources(expect, actual[0]) except AssertionError: if expect.get(str(ET.QName(TS, 'exception'))) != 'TODO': raise # ignore class BuiltinTestCase(TestCase): def __init__(self, methodName='runTest'): TestCase.__init__(self, methodName) href = distdir_search('examples', 'ean-13.png') if not href: href = 'https://git.linuxtv.org/zbar.git/plain/examples/ean-13.png' self.source = src = ET.Element(ET.QName(BC, 'source'), href=href) sym = ET.SubElement(src, ET.QName(BC, 'symbol'), type='EAN-13', orientation='UP') data = ET.SubElement(sym, ET.QName(BC, 'data')) data.text = '9789876543217' def compare_maps(expect, actual, compare_func): errors = [] notes = [] for key, iact in actual.items(): iexp = expect.pop(key, None) if iexp is None: errors.append('bonus unexpected result:\n' + toxml(iact)) continue try: compare_func(iexp, iact) except: errors.append(''.join(format_exception(*sys.exc_info()))) if iexp.get(str(ET.QName(TS, 'exception'))) == 'TODO': notes.append('TODO unexpected result:\n' + toxml(iact)) for key, iexp in expect.items(): if iexp.get(str(ET.QName(TS, 'exception'))) == 'TODO': notes.append('TODO missing expected result:\n' + toxml(iexp)) else: errors.append('missing expected result:\n' + toxml(iexp)) if len(notes) == 1: print('(TODO)', end=' ', file=sys.stderr) elif notes: print('(%d TODO)' % len(notes), end=' ', file=sys.stderr) assert not errors, '\n'.join(errors) def compare_sources(expect, actual): assert actual.tag == ET.QName(BC, 'source') assert actual.get('href').endswith(expect.get('href')), \ 'source href mismatch: %s != %s' % (acthref, exphref) # FIXME process/trim test:* contents def map_source(src): if not len(src) or src[0].tag != ET.QName(BC, 'index'): # insert artificial hierarchy syms = src[:] del src[:] idx = ET.SubElement(src, ET.QName(BC, 'index'), num='0') idx[:] = syms exc = src.get(str(ET.QName(TS, 'exception'))) if exc is not None: idx.set(str(ET.QName(TS, 'exception')), exc) return { '0': idx } elif len(src): assert src[0].tag != ET.QName(BC, 'symbol'), \ 'invalid source element: ' + \ 'expecting "index" or "symbol", got "%s"' % fixtag(src[0]) srcmap = { } for idx in src: srcmap[idx.get('num')] = idx return srcmap compare_maps(map_source(expect), map_source(actual), compare_indices) def compare_indices(expect, actual): assert actual.tag == ET.QName(BC, 'index') assert actual.get('num') == expect.get('num') # FIXME process/trim test:* contents def map_index(idx): idxmap = { } for sym in idx: assert sym.tag == ET.QName(BC, 'symbol') typ = sym.get('type') assert typ is not None data = sym.find(str(ET.QName(BC, 'data'))).text idxmap[typ, data] = sym return idxmap try: compare_maps(map_index(expect), map_index(actual), compare_symbols) except AssertionError: if expect.get(str(ET.QName(TS, 'exception'))) != 'TODO': raise def compare_symbols(expect, actual): orient = expect.get('orientation') if orient: assert actual.get('orientation') == orient # override unittest.TestLoader to populate tests from xml description class TestLoader: suiteClass = UT.TestSuite def __init__(self): self.cwd = urlunparse(('file', '', getcwd() + '/', '', '', '')) if debug: print('cwd =', self.cwd) def loadTestsFromModule(self, module): return self.suiteClass([BuiltinTestCase()]) def loadTestsFromNames(self, names, module=None): suites = [ self.loadTestsFromName(name, module) for name in names ] return self.suiteClass(suites) def loadTestsFromURL(self, url=None, file=None): if debug: print('loading url:', url) target = None if not file: if not url: return self.suiteClass([BuiltinTestCase()]) content = None url = urljoin(self.cwd, url) # FIXME grok fragment try: if debug: print('trying:', url) file = urlopen(url) content = file.info().get('Content-Type') except HTTPError as e: # possible remote directory pass except IOError as e: if e.errno not in (EISDIR, EINVAL, EACCES): raise # could be local directory if (not file or content == 'text/html' or (isinstance(file, HTTPError) and file.code != 200)): # could be directory, try opening index try: tmp = urljoin(url + '/', 'index.xml') if debug: print('trying index:', tmp) file = urlopen(tmp) content = file.info().get('Content-Type') url = tmp except IOError: raise IOError('no test index found at: %s' % url) if debug: print('\tContent-Type:', content) if content not in ('application/xml', 'text/xml'): # assume url is image to test, try containing index # FIXME should be able to keep searching up try: target = url.rsplit('/', 1)[1] index = urljoin(url, 'index.xml') if debug: print('trying index:', index) file = urlopen(index) content = file.info().get('Content-Type') if debug: print('\tContent-Type:', content) assert content in ('application/xml', 'text/xml') url = index except IOError: raise IOError('no index found for: %s' % url) index = ET.ElementTree(file=file).getroot() assert index.tag == ET.QName(BC, 'barcodes') suite = self.suiteClass() for src in index: # FIXME trim any meta info href = src.get('href') if target and target != href: continue if src.tag == ET.QName(BC, 'source'): test = TestCase() # convert file URLs to filesystem paths href = urljoin(url, href) href = re.sub(r'^file://', '', href) src.set('href', href) test.source = src suite.addTest(test) elif src.tag == ET.QName(TS, 'index'): suite.addTest(self.loadTestsFromURL(urljoin(url, href))) else: raise AssertionError('malformed test index') # FIXME detail assert suite.countTestCases(), 'empty test index: %s' % url return suite def loadTestsFromName(self, name=None, module=None): return self.loadTestsFromURL(name) def unsupported(self, *args, **kwargs): raise TypeError("unsupported TestLoader API") # FAKE discover method needed for python3 to work def discover(self, start_dir, pattern, top_level_dir=None): return self.loadTestsFromURL() loadTestsFromTestCase = unsupported getTestCaseNames = unsupported if __name__ == '__main__': if '-d' in sys.argv: debug = True sys.argv.remove('-d') UT.main(module=None, testLoader=TestLoader()) zbar-0.23/test/test_perl.pl0000775000175000017500000000263613466560613012660 00000000000000#!/usr/bin/env perl #------------------------------------------------------------------------ # Copyright 2008-2009 (c) Jeff Brown # # This file is part of the ZBar Bar Code Reader. # # The ZBar Bar Code Reader is free software; you can redistribute it # and/or modify it under the terms of the GNU Lesser Public License as # published by the Free Software Foundation; either version 2.1 of # the License, or (at your option) any later version. # # The ZBar Bar Code Reader 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 Lesser Public License for more details. # # You should have received a copy of the GNU Lesser Public License # along with the ZBar Bar Code Reader; if not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA # # http://sourceforge.net/projects/zbar #------------------------------------------------------------------------ use 5.006; use warnings; use strict; use Barcode::ZBar; Barcode::ZBar::set_verbosity(15); my $proc = Barcode::ZBar::Processor->new(1); $proc->init($ARGV[0] || '/dev/video0'); $proc->set_visible(); $proc->user_wait(2); $proc->set_active(); $proc->user_wait(5); $proc->set_active(0); $proc->user_wait(2); $proc->process_one(); $proc->user_wait(1); zbar-0.23/README-windows.md0000664000175000017500000001021513471225716012275 00000000000000ZBAR BAR CODE READER ==================== ZBar Bar Code Reader is an open source software suite for reading bar codes from various sources, such as video streams, image files and raw intensity sensors. It supports EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 93, Code 39, Codabar, Interleaved 2 of 5 and QR Code. 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. For application developers, language bindings are included for C, C++, Python and Perl as well as GUI widgets for Qt, GTK and PyGTK. Check the ZBar home page for the latest release, mailing lists, etc. * License information can be found in 'COPYING'. This Windows distribution also includes pre-compiled binaries of several supporting libraries, for which the copyright, license and source code locations are as follows: * The GNU libiconv character set conversion library Copyright (C) 1999-2008 Free Software Foundation, Inc. This distribution includes GNU libiconv version 1.13.1, licensed under the LGPL version 2. The source code is available from * * The ImageMagick software imaging library Copyright 1999-2009 ImageMagick Studio LLC This distribution includes ImageMagick version 6.5.4-10, licensed under its own terms. The source code is available from * * The libxml2 XML C parser and toolkit Copyright (C) 1998-2003 Daniel Veillard. This distribution includes libxml2 version 2.7.3, provided under the MIT license. The source code is available from * * IJG JPEG library Copyright (C) 1991-2009, Thomas G. Lane, Guido Vollbeding. This distribution includes jpeg version 7, licensed under its own terms. The source code is available from * * libtiff, a library for reading and writing TIFF Copyright (c) 1988-1997 Sam Leffler Copyright (c) 1991-1997 Silicon Graphics, Inc. This distribution includes libtiff version 3.9.1, which is provided "as-is". The source code is available from * * libpng, the official PNG reference library Copyright (c) 1998-2009 Glenn Randers-Pehrson This distribution includes libpng version 1.2.40, licensed under its own terms. The source code is available from * * The zlib general purpose compression library Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler. This distribution includes zlib version 1.2.3, licensed under its own terms. The source code is available from * * The bzip2 compression library Copyright (C) 1996-2007 Julian Seward. This distribution includes bzip2 version 1.0.5, licensed under its own terms. The source code is available from * INSTALLING ========== ZBar for Windows is distributed with an installer, simply run the installer and follow the prompts to install the software. RUNNING ======= This version of the package includes *only command line programs*. (The graphical interface is scheduled for a future release) Invoke Start -> Programs -> ZBar Bar Code Reader -> Start ZBar Command Prompt to open a shell that has the zbarimg and zbarcam commands available (in the PATH). To start the webcam reader using the default camera, type: zbarcam To decode an image file, type eg: zbarimg -d examples\barcode.png For basic command instructions, type: zbarimg --help zbarcam --help Check the manual for more details. REPORTING BUGS ============== Bugs can be reported at the GitHub 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: *