[libsigrokdecode] 01/08: Import Upstream version 0.3.0
Zoltan Gyarmati
zgyarmati-guest at moszumanska.debian.org
Wed Mar 29 21:40:23 UTC 2017
This is an automated email from the git hooks/post-receive script.
zgyarmati-guest pushed a commit to branch master
in repository libsigrokdecode.
commit 47bb227b1e7db243dd61b2aab131eec797ac6596
Author: Zoltan Gyarmati <Zoltan Gyarmati mr.zoltan.gyarmati at gmail.com>
Date: Tue Feb 28 23:04:02 2017 +0100
Import Upstream version 0.3.0
---
AUTHORS | 7 +
COPYING | 674 ++
ChangeLog | 6553 +++++++++++++
Doxyfile | 2318 +++++
HACKING | 198 +
INSTALL | 370 +
Makefile.am | 96 +
Makefile.in | 1625 ++++
NEWS | 223 +
README | 104 +
aclocal.m4 | 1587 +++
autostuff/ar-lib | 270 +
autostuff/compile | 347 +
autostuff/config.guess | 1558 +++
autostuff/config.sub | 1791 ++++
autostuff/depcomp | 791 ++
autostuff/install-sh | 527 +
autostuff/libtool.m4 | 7997 ++++++++++++++++
autostuff/ltmain.sh | 9661 +++++++++++++++++++
autostuff/ltoptions.m4 | 384 +
autostuff/ltsugar.m4 | 123 +
autostuff/ltversion.m4 | 23 +
autostuff/lt~obsolete.m4 | 98 +
autostuff/missing | 215 +
autostuff/test-driver | 139 +
config.h.in | 67 +
configure | 16963 +++++++++++++++++++++++++++++++++
configure.ac | 203 +
contrib/sigrok-logo-notext.png | Bin 0 -> 8637 bytes
decoder.c | 752 ++
decoders/avr_isp/__init__.py | 27 +
decoders/avr_isp/parts.py | 43 +
decoders/avr_isp/pd.py | 211 +
decoders/can/__init__.py | 31 +
decoders/can/pd.py | 381 +
decoders/dcf77/__init__.py | 30 +
decoders/dcf77/pd.py | 317 +
decoders/ds1307/__init__.py | 27 +
decoders/ds1307/pd.py | 169 +
decoders/edid/__init__.py | 40 +
decoders/edid/pd.py | 468 +
decoders/edid/pnpids.txt | 2135 +++++
decoders/guess_bitrate/__init__.py | 38 +
decoders/guess_bitrate/pd.py | 85 +
decoders/i2c/__init__.py | 27 +
decoders/i2c/pd.py | 301 +
decoders/i2cdemux/__init__.py | 29 +
decoders/i2cdemux/pd.py | 78 +
decoders/i2cfilter/__init__.py | 38 +
decoders/i2cfilter/pd.py | 93 +
decoders/i2s/__init__.py | 31 +
decoders/i2s/pd.py | 186 +
decoders/ir_nec/__init__.py | 26 +
decoders/ir_nec/lists.py | 52 +
decoders/ir_nec/pd.py | 206 +
decoders/ir_rc5/__init__.py | 26 +
decoders/ir_rc5/lists.py | 95 +
decoders/ir_rc5/pd.py | 183 +
decoders/jtag/__init__.py | 32 +
decoders/jtag/pd.py | 220 +
decoders/jtag_stm32/__init__.py | 31 +
decoders/jtag_stm32/pd.py | 223 +
decoders/lm75/__init__.py | 27 +
decoders/lm75/pd.py | 186 +
decoders/lpc/__init__.py | 27 +
decoders/lpc/pd.py | 370 +
decoders/maxim_ds28ea00/__init__.py | 27 +
decoders/maxim_ds28ea00/pd.py | 93 +
decoders/midi/__init__.py | 30 +
decoders/midi/lists.py | 470 +
decoders/midi/pd.py | 211 +
decoders/mlx90614/__init__.py | 27 +
decoders/mlx90614/pd.py | 78 +
decoders/mx25lxx05d/__init__.py | 32 +
decoders/mx25lxx05d/pd.py | 375 +
decoders/mxc6225xu/__init__.py | 30 +
decoders/mxc6225xu/pd.py | 218 +
decoders/nunchuk/__init__.py | 32 +
decoders/nunchuk/pd.py | 207 +
decoders/onewire_link/__init__.py | 69 +
decoders/onewire_link/pd.py | 282 +
decoders/onewire_network/__init__.py | 58 +
decoders/onewire_network/pd.py | 182 +
decoders/pan1321/__init__.py | 27 +
decoders/pan1321/pd.py | 161 +
decoders/parallel/__init__.py | 36 +
decoders/parallel/pd.py | 192 +
decoders/rgb_led_spi/__init__.py | 27 +
decoders/rgb_led_spi/pd.py | 69 +
decoders/rtc8564/__init__.py | 27 +
decoders/rtc8564/pd.py | 257 +
decoders/sdcard_spi/__init__.py | 70 +
decoders/sdcard_spi/pd.py | 444 +
decoders/spi/__init__.py | 33 +
decoders/spi/pd.py | 286 +
decoders/tlc5620/__init__.py | 26 +
decoders/tlc5620/pd.py | 131 +
decoders/uart/__init__.py | 42 +
decoders/uart/pd.py | 368 +
decoders/usb_packet/__init__.py | 45 +
decoders/usb_packet/pd.py | 343 +
decoders/usb_signalling/__init__.py | 52 +
decoders/usb_signalling/pd.py | 242 +
decoders/xfp/__init__.py | 41 +
decoders/xfp/pd.py | 647 ++
decoders/z80/__init__.py | 35 +
decoders/z80/pd.py | 352 +
decoders/z80/tables.py | 1083 +++
error.c | 152 +
exception.c | 91 +
instance.c | 664 ++
libsigrokdecode-internal.h | 78 +
libsigrokdecode.h | 350 +
libsigrokdecode.pc.in | 15 +
log.c | 301 +
module_sigrokdecode.c | 88 +
session.c | 352 +
srd.c | 264 +
tests/check_core.c | 114 +
tests/check_decoder.c | 354 +
tests/check_inst.c | 173 +
tests/check_main.c | 46 +
tests/check_session.c | 260 +
tests/lib.h | 29 +
tests/runtc.c | 837 ++
tools/install-decoders | 112 +
type_decoder.c | 393 +
type_logic.c | 85 +
util.c | 200 +
version.c | 148 +
version.h | 70 +
version.h.in | 70 +
132 files changed, 74856 insertions(+)
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..28c1b20
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,7 @@
+-------------------------------------------------------------------------------
+AUTHORS
+-------------------------------------------------------------------------------
+
+Please check the source code files and/or git history and/or ChangeLog for
+a list of all authors and contributors.
+
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, 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
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If 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 convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU 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
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "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 PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state 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 program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ 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 <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..39955af
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,6553 @@
+commit 788b2c6183554d8d985c2ab59cd1d5d3575009dd
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue May 6 23:08:09 2014 +0200
+
+ Doxyfile: Set version to 0.3.0.
+
+commit 95e2b2f92b144e1b0edf29819a8585dbbc00f169
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue May 6 23:05:28 2014 +0200
+
+ configure.ac: Bump package version to 0.3.0.
+
+commit 60bc3a86d321ed10ec8dd1bb997b680a43cdd3ef
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue May 6 23:03:10 2014 +0200
+
+ configure.ac: Bump libtool/library version from 1:0:0 to 2:0:0.
+
+ The libtool current:revision:age numbers change from 1:0:0 to 2:0:0.
+
+ Details:
+ http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
+
+ This changes the library filename (e.g. on Linux) from
+ libsigrokdecode.so.1.0.0 to libsigrokdecode.so.2.0.0, the SONAME (+symlink)
+ becomes libsigrokdecode.so.2.
+
+commit 92682a9977259f32054e839aa4a76028fec9ecda
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue May 6 23:06:57 2014 +0200
+
+ Bump libsigrok (optional) dependency to 0.3.0.
+
+commit 91fe57918dc2c030ab5e68e861ecd2f4abe92f20
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue May 6 09:00:00 2014 +0200
+
+ NEWS: Add list of user-visible changes so far.
+
+commit e559d5da6717ff9e956ac7ad58fdb51ca774840d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Apr 15 18:30:28 2014 +0200
+
+ Makefile.am: Add HACKING to the tarball.
+
+commit 5c0c9cb3a78be20d98f81cff1405bbf2c927384e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun May 4 23:46:21 2014 +0200
+
+ Only load and use PDs of API version 2.
+
+ Decoders that implement any other PD API version are per definition not
+ compatible and cannot work with this library version.
+
+commit 5dec4b91cb72c49453134fb3ba5c9930895825f2
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun May 4 22:29:18 2014 +0200
+
+ README: Document python3-coverage requirement for tests.
+
+commit 1c0dbcc95b2e8e9a20279f0dab0eecd115be5484
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun May 4 22:17:03 2014 +0200
+
+ Fix 'make install' on OSes where 'python3' doesn't exist.
+
+ Sometimes the Python 3 executable is called just 'python3', sometimes
+ it is called 'python3.4' and so on. Handle all cases transparently for
+ the user.
+
+ Before:
+
+ $ make install
+ /usr/bin/env: python3: No such file or directory
+
+ After:
+
+ $ make install
+ python3.4 ./tools/install-decoders -i ./decoders -o [...]
+ Installing 36 protocol decoders:
+ [...]
+
+commit 0672779d5e3e128ef3f7ec932772ff6d65fcbc50
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun May 4 21:59:57 2014 +0200
+
+ HACKING: Update to current conventions.
+
+ (mostly copied from libsigrok, which normally has the same conventions)
+
+commit 23a29d24b01a68acb11be55abfcbe8d3fb0cdeb2
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun May 4 21:00:24 2014 +0200
+
+ Mark some variables more consistently as SRD_PRIV.
+
+commit aa6506b86e43d332f839ac1d6e0361ef36e9de75
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun May 4 20:56:32 2014 +0200
+
+ log.c: Avoid using the same name for a variable and enum.
+
+commit c57d10136f77a9011c1179d584dca68fecb12b09
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun May 4 20:25:17 2014 +0200
+
+ Update a few Doxygen @since tags.
+
+commit af9527d1776668699a4c1244a419902af47f8493
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun May 4 19:54:02 2014 +0200
+
+ libsigrokdecode.h: Give type names to all enumerations.
+
+ This matches the libsigrok conventions, and will be required (or
+ at least nice to have) for libsigrokdecode language bindings later.
+
+commit 64b354d6823a0b19333ee65e073e5d8169a44027
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun May 4 00:08:15 2014 +0200
+
+ tools/install-decoders: Minor consistency fix.
+
+commit f6527cc4f7625eb5283eee5392312ad5df70e0f3
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat May 3 23:56:50 2014 +0200
+
+ Move srd_check_init() to decoder.c and make it static.
+
+ The function srd_check_init() is only used in decoder.c.
+
+commit 2060510aaafcc7eb27fac071334b4f8aa1f3cab2
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat May 3 23:52:54 2014 +0200
+
+ Make 'pd_list' static, it's only used in one file.
+
+commit 17475b09ef9504f91a28b0873b53cec329513077
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat May 3 23:45:55 2014 +0200
+
+ Make the srd_Decoder type private.
+
+ It's not public API and is not used (nor should it be used) by any frontends.
+
+commit e9c1a90c311a65e5b1576a63078d854771a9c83b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat May 3 23:41:04 2014 +0200
+
+ srd.c: Fix typo to avoid Doxygen output for srd_check_init().
+
+commit fb8e307d0dc7e53d051e1c9fe18ebd56f1b13ab3
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat May 3 23:40:54 2014 +0200
+
+ Doxygen: Don't parse anything in tests/ or doxy/.
+
+ None of that is API-relevant.
+
+commit 5f079f4e914171fb3a627e0a63c4f4cb589e4115
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat May 3 23:17:02 2014 +0200
+
+ doxygen: Updated Doxyfile to doxygen 1.8.6.
+
+commit 2372b1998ae5d252433d7a7a07744ba2ea81b96e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat May 3 22:45:50 2014 +0200
+
+ Don't define names ending with _t (POSIX reserved).
+
+ Avoid defining any names ending in _t, those are generally reserved
+ for POSIX usage. For details see:
+
+ http://pubs.opengroup.org/onlinepubs/007904975/functions/xsh_chap02_02.html
+ http://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html
+
+commit 5cdc02d4a6947966135aada5f3dcaccfd3e94413
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat May 3 22:36:55 2014 +0200
+
+ edid: s/annotation type/annotation class/.
+
+commit e94fdd576d250652891f3ca5be61e2eb80b152cc
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat May 3 22:35:32 2014 +0200
+
+ tests/check_session.c: Use UINT64_MAX.
+
+commit dea61db0817432886e830b4916c375a88256ba07
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Apr 24 14:12:49 2014 +0200
+
+ Detect Python 3.4 if not installed as "python3".
+
+commit f714f8f836b7cd20f9a5a41dc21bcc8584c87c3b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Apr 15 08:44:51 2014 +0200
+
+ instance.c: s/probe/channel/.
+
+commit bf69977d12886794ac597083403859ac99ab38ac
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Apr 15 08:43:22 2014 +0200
+
+ All PDs: More consistent OUTPUT_PYTHON format docs.
+
+commit ce71bf0e29e9c3890eb74725ceb963ff35a29639
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Apr 14 23:50:45 2014 +0200
+
+ sdcard_spi: Avoid duplicate keys in a Python dict.
+
+ This fixes bug #191.
+
+commit 12851357e784b893e24880efc6cd22a0cbcc64ce
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Apr 14 22:14:39 2014 +0200
+
+ All PDs: Bump api_version to 2.
+
+ Older libsigrokdecode versions are no longer able to use the current
+ versions of the PDs (various changes in syntax etc).
+
+commit c761524941fcb2237ceb65082e504e5e48e62a05
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Apr 14 23:09:43 2014 +0200
+
+ All PDs: Drop some unneeded comments.
+
+commit 803cf705914644e5d6bc63e262004be1da8bea9d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 5 18:25:22 2014 +0100
+
+ nunchuk: Fix PD to become usable in GUIs.
+
+ - Provide proper annotation classes and annotation rows.
+ - Emit bit-exact annotations for some registers.
+ - Output short and long annotations (for use when zooming).
+ - Various minor fixes.
+
+ This fixes bug #344.
+
+commit 170d0e246f6b51900856bf1f89089162cd7ca2c2
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Apr 15 00:46:45 2014 +0200
+
+ debug: Log unitsize when configuring channel map.
+
+commit 3195dc80c72c62a0f07816882f3b2a169986cf66
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Apr 13 21:59:02 2014 +0200
+
+ .gitignore: Add test-suite.log.
+
+commit 6a15597a7b3f901b566b7bfc8c484a14e0fb6a11
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Apr 13 19:57:43 2014 +0200
+
+ Rename 'probe' to 'channel' everywhere.
+
+ Variables of type 'struct srd_channel *' are consistently named 'pdch' to
+ make them easily distinguishable from libsigrok's 'struct sr_channel *'
+ variables that are consistently named 'ch'.
+
+commit 486858f7208207fb12a281640c5f6e9be4e4626f
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Apr 13 19:56:09 2014 +0200
+
+ z80: Fix incorrect license field.
+
+commit 20e950feb2fea1c6c106ced44e1fef3cf6d882ef
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Apr 9 21:06:27 2014 +0200
+
+ Switch to a non-recursive automake setup.
+
+ (fewer files, less clutter)
+
+commit a0a9afd940fe8f447665b369328f270f5ba10cb9
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Apr 9 21:02:16 2014 +0200
+
+ README: Update build dependencies list.
+
+commit a5077804d65c3b699a9dbce76ac77d6a7db81133
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Apr 5 13:00:59 2014 +0200
+
+ configure.ac: Clearly mark required and optional libs.
+
+ Also, drop printing of the detected Python CPPFLAGS/LDFLAGS, not really
+ needed since it's available in 'make V=1' output as well (and we don't print
+ it for other libs either).
+
+commit 1ced2b013412336a9d9ac77aded7078b4eef3780
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Mar 20 16:42:18 2014 +0100
+
+ Bump minimum Python version to 3.2
+
+ We use some functions specific to 3.1, but every distribution appears
+ to be at 3.2.x already anyway.
+
+commit 2160cddd3b39903b3102976e1a8d324a15412c58
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Mar 20 17:02:56 2014 +0100
+
+ pdtest: Add support for code coverage.
+
+commit 7023cb9faa3d212b2ba6a0c2f59f93ced0afa547
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Mar 18 12:13:38 2014 +0100
+
+ runtc: Add list of missed lines to coverage output.
+
+commit fa62a8f9841955980a5a46e9aaedb62839e098dc
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Mar 18 20:39:09 2014 +0100
+
+ usb_packet: Fix an incorrect index.
+
+commit 7a23306705864b1cc96bbbee57d47e6f87f7767b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Mar 18 20:21:48 2014 +0100
+
+ usb_packet: Provide better short/long annotations.
+
+commit 85c03d6009c4939786925d9c9f8880f34f1b7eb7
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Mar 18 20:15:03 2014 +0100
+
+ usb_signalling: Make each symbol an annotation class.
+
+commit b413721ccb254e99cf8b8991bb1adf2fb26b53a6
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Mar 18 20:04:10 2014 +0100
+
+ usb_signalling: Provide better short/long annotations.
+
+commit 5bc679c6b0367558b7ce94cfa6cd45b483ad98c9
+Author: Bert Vermeulen <bert at biot.com>
+Date: Mon Mar 17 11:24:32 2014 +0100
+
+ Add support for code coverage of used decoder modules.
+
+commit c35fcb590e8c464b528b6949b9aafb1ced52c4dd
+Author: Bert Vermeulen <bert at biot.com>
+Date: Fri Mar 14 01:01:03 2014 +0100
+
+ Bring various test output files up to date.
+
+commit ea1fc7b1a9d857c7ad147c1b81c6e4b3aa1cd3b6
+Author: Bert Vermeulen <bert at biot.com>
+Date: Fri Mar 14 01:00:25 2014 +0100
+
+ pdtest: Small fix.
+
+commit b0918d40e285e7782f4e86356c41648dc748e477
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Mar 12 00:51:06 2014 +0100
+
+ Various PDs: Minor option related fixes.
+
+commit 4e4f8527de0927f2eb1d98e90b58e018ba28d341
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Mar 12 00:22:31 2014 +0100
+
+ Various PDs: Drop currently unsupported probes in stacked PDs.
+
+ At the moment we don't yet support PDs which take both input from
+ another PD (which they're stacked on top of) and from one or more
+ logic inputs/pins.
+
+ This will be supported later on, and at that time we'll bring back
+ these changes.
+
+commit 3a851e5c7ba119cea6e8604a3f3e7ac27c80f536
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Mar 12 00:17:46 2014 +0100
+
+ can: Make sample_point a float option.
+
+ This allows users to set values like 70.5% or such.
+
+commit 65f6eb77a33e6e7185376b1d9b8f3f0c62273d27
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Mar 11 23:27:31 2014 +0100
+
+ Fix enumeration of option values.
+
+commit 24a3d8d0b9b1c0d543e408261aa85e31032b90d8
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date: Tue Mar 11 22:58:24 2014 +0100
+
+ Fixed g_variant_get_double copy-paste error
+
+commit bee57ee84753471970f9b65b34e71c54a0558768
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Mar 10 15:44:24 2014 +0100
+
+ ir_nec: Update to recent PD API changes.
+
+commit 12fecc8ffc48a92ce1678aa9b4988f85bebe21a9
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Mar 7 21:49:12 2014 +0100
+
+ ir_nec: Add support for higher-level remote control annotations.
+
+commit 5bb61a25d31c4c32f5109c38d7fd31c9e0d2c441
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Mar 7 20:17:00 2014 +0100
+
+ ir_nec: Addresses and commands are transmitted LSB-first.
+
+commit 70835fd4d2dcf2c67e2448b73f0b7008ddf9fe29
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Mar 7 19:30:09 2014 +0100
+
+ ir_nec: Add support for more fields.
+
+ Also show the AGC field(s) and pauses, the stop bit, and the individual
+ address / address# and command / command# fields.
+
+commit 73fc79e094855b616fb6d6e392a87338ffe37a6b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Mar 7 17:24:21 2014 +0100
+
+ ir_nec: Drop some unneeded options.
+
+ The timing of the protocol is not really configurable, valid data in
+ this protocol must always adhere to the same timing parameters, making them
+ configurable should not be needed.
+
+ Also: Only check for the "interesting" edges and simplify the code a bit.
+
+commit 00962e763e610d8535dd9df1ac97377b3fb727a7
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Mar 7 14:55:54 2014 +0100
+
+ Rename 'ir_nec6122' PD to 'ir_nec', minor fixes and simplifications.
+
+ This IR protocol is commonly referred to as "the NEC protocol", and can be
+ generated by various means (not only via the NEC µPD6121/µPD6122 ICs).
+
+ Drop some unneeded variables and fix/simplify the code a bit.
+
+commit 5e6fa9cc6c1ac53de29350722f86e7524cc53442
+Author: Gump Yang <gump.yang at gmail.com>
+Date: Fri Mar 7 14:53:50 2014 +0100
+
+ Add NEC IR protocol decoder.
+
+commit da9bcbd9f45b0153465c55ec726a0d76f6d7f01e
+Author: Bert Vermeulen <bert at biot.com>
+Date: Mon Mar 10 12:23:38 2014 +0100
+
+ Probes, optional probes and annotations now take a tuple.
+
+ Annotation entries also consist of a tuple, not a list.
+
+commit d1e2129c7b01a760d48bcc8e7fc12956a62698c1
+Author: Bert Vermeulen <bert at biot.com>
+Date: Mon Mar 10 10:35:41 2014 +0100
+
+ ir_rc5: Change PD options to be a tuple of dictionaries.
+
+commit 780770f1295b7fdeb4481eb42623bad5da1e19a7
+Author: Bert Vermeulen <bert at biot.com>
+Date: Mon Mar 10 00:43:27 2014 +0100
+
+ Remove unused probes and options
+
+commit 84c1c0b52820af2418186ac3ecf93a5c6373a22e
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Mar 9 23:48:27 2014 +0100
+
+ Change PD options to be a tuple of dictionaries.
+
+ Each option consists of a dictionary with the following keys:
+
+ id The option id, which is passed in when setting a value.
+ desc A description of the option, suitable for display.
+ def The default value for this option.
+ values (optional) If present, a tuple containing values the option
+ may take. They must be of the same type as the default.
+
+ Valid types for the options are UTF-8-encoded strings, integers, and
+ floating point values.
+
+commit cfe46204d1c91f02d0e2c6679a2d15ff92bb90c8
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date: Tue Mar 4 18:40:24 2014 +0000
+
+ onewire_link: Replaced us with µs
+
+commit cbbccbf4faeffcd2607266fa396d801981ffcaa4
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Mar 5 23:44:54 2014 +0100
+
+ ir_rc5: Fix incorrect bit length of RC-5 packets.
+
+ All RC-5 packets are 14 bits long.
+
+commit 16211e24f7a34590f02e9f8a327b1eb3647c7c62
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Mar 5 23:44:14 2014 +0100
+
+ ir_rc5: Don't throw exception upon invalid edge distances.
+
+ Instead, reset the state machine and continue with the rest of the data.
+
+commit 92d992d2e50a1996fa2f436f5217b5a9fb3b7e62
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Mar 5 23:34:50 2014 +0100
+
+ ir_rc5: Only determine edge type once.
+
+commit 914f0b99d1f07c351742eaa5c8e397d601996846
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Feb 6 19:49:06 2014 +0100
+
+ Add initial RC-5 IR protocol decoder.
+
+commit 697967f246f368de3a1778b3bead87ac7a50bfdd
+Author: Daniel Elstner <daniel.kitta at gmail.com>
+Date: Sun Mar 2 11:10:40 2014 +0100
+
+ z80: Use methods directly as state values.
+
+commit 3831aa891c7a9822a376023419a1fea1a698463c
+Author: Daniel Elstner <daniel.kitta at gmail.com>
+Date: Fri Feb 28 21:10:53 2014 +0100
+
+ z80: Display not-taken conditional calls correctly.
+
+commit 739f9313539c559949748d918e59865496ad8f6e
+Author: Daniel Elstner <daniel.kitta at gmail.com>
+Date: Fri Feb 28 21:03:23 2014 +0100
+
+ z80: Fix display of read/modify/write instructions.
+
+commit e029ab1f6ff7fc8e06a4869417a875136318515f
+Author: Daniel Elstner <daniel.kitta at gmail.com>
+Date: Fri Feb 28 19:48:33 2014 +0100
+
+ z80: Shorten annotation ID 'warning' to 'warn'.
+
+commit 8830db5df55241e1ea775a70671ecb11235cf3c1
+Author: Daniel Elstner <daniel.kitta at gmail.com>
+Date: Thu Feb 27 22:07:58 2014 +0100
+
+ z80: Output jump offsets relative to instruction start.
+
+ Most assemblers recognize the symbol $ for the address of the
+ current instruction. Make use of this to output relative jump
+ instructions using the $[+-]offset syntax, with offset being
+ the displacement minus the instruction length.
+
+commit aef3c1095e966212fd9a9b02cb08a0ff50e13a7b
+Author: Daniel Elstner <daniel.kitta at gmail.com>
+Date: Thu Feb 27 21:31:10 2014 +0100
+
+ z80: Format hex numbers with leading zero if necessary.
+
+ Assembler syntax requires that all numbers start with a decimal
+ digit. Introduce a custom 'H' format for prefixing a leading 0
+ to hexadecimal numbers that would otherwise start with a letter.
+
+commit 31737ae022b6356eea8da9792e966b3e1d10f1c8
+Author: Daniel Elstner <daniel.kitta at gmail.com>
+Date: Mon Feb 24 00:03:20 2014 +0100
+
+ z80: Use list comprehensions for bus probes.
+
+commit 26abbf3762e19d89ab578905aaba24e8764d1696
+Author: Daniel Elstner <daniel.kitta at gmail.com>
+Date: Tue Feb 18 22:03:45 2014 +0100
+
+ z80: New decoder for disassembling Z80 CPU instructions.
+
+commit 9eec72cb2bf132600db3330f49dace3bdf74080a
+Author: Daniel Elstner <daniel.kitta at gmail.com>
+Date: Thu Feb 20 06:24:23 2014 +0100
+
+ Make the data unit size configurable
+
+commit 4aedd5b887ef7e34bc00c0ef76dc91ea2c443583
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 12 22:55:37 2014 +0100
+
+ uart: Emit per-bit annotations and OUTPUT_PYTHON data.
+
+commit 5e5002be5bb69ed47317cf70053bf5da2598044d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 19 19:13:51 2014 +0100
+
+ xfp: Drop unused "import os".
+
+commit 246654246821fcde172c97399e6e8175708e60b5
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 19 19:12:56 2014 +0100
+
+ jtag: Use list comprehensions.
+
+commit 3c8031b3f543f82a4a357b4987e0ae6273facfcf
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 19 19:00:36 2014 +0100
+
+ sdcard_spi: Use list comprehensions.
+
+commit ae33d639670cd4ca6bfe683c4284dd55377e5f21
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 19 18:58:09 2014 +0100
+
+ rtc8564: Use list comprehensions.
+
+commit e85b0440b9b50b8eac7f1b04d0108cbb77bcdb02
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Feb 23 18:30:01 2014 +0100
+
+ rgb_led_spi: Shorten name/description (drop "mode").
+
+ In the 'sdcard_spi' PD/case the SD spec specifically differentiates between
+ a so-called "SPI mode" and "SD mode" (both being well-defined terms from
+ the spec), thus the "SPI mode" in the name and description of that PD.
+
+ For 'rgb_led_spi' however there's no such distinction for "modes"
+ really, so shorten the name/description to just 'RGB LED (SPI)'.
+
+commit 7c09dbb2adb240e013d373da8dccb56efd22380e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 19 15:17:52 2014 +0100
+
+ spi: Fix some start/end samplenumbers for PYTHON output.
+
+ This fixes the data/annotations of stacked PDs.
+
+commit 8e8096e8289d8c5a5adf75109e481fe734e629f8
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 19 15:11:24 2014 +0100
+
+ spi: Fix a bug when only supplying MOSI (but not MISO).
+
+commit ae036d3403ad9e301d41a68869ded51a54127bfe
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 19 15:09:22 2014 +0100
+
+ rgb_led: Rename PD to rgb_led_spi.
+
+ There are a number of other RGB LED protocols (simple or more advanced
+ ones, and various ones not based on SPI), so use a more distinguishable
+ name for this PD.
+
+commit 83d792a4c201c081070f2fdf638e485c5b8a52a0
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 19 15:08:34 2014 +0100
+
+ rgb_led: Fix annotation end sample numbers.
+
+commit 8967e839a3df6aa8766f57e521c81edd3a12be4d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 19 15:07:39 2014 +0100
+
+ rgb_led: Minor cosmetics, whitespace.
+
+commit 2c1732728b130a71105cd9deaf36c9213ef44a82
+Author: Matt Ranostay <mranostay at gmail.com>
+Date: Mon Feb 17 22:08:41 2014 -0800
+
+ Initial RGB LED decoder
+
+ Signed-off-by: Matt Ranostay <mranostay at gmail.com>
+
+commit eafe8f08a1cb46e411dcd358f0d748f7d1aa47aa
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Feb 9 19:26:59 2014 +0100
+
+ usb_packet: s/NACK/NAK/.
+
+ The USB spec spells this as "NAK".
+
+commit a87d7847818a2b6389d9a8cbc9ba690ed8b49317
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 5 17:31:36 2014 +0100
+
+ usb_packet: Use annotation classes and annotation rows.
+
+commit c82620fc0b10c9541b8a92bd3ea3dd4bdf982390
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 5 00:44:52 2014 +0100
+
+ sdcard_spi: Adapt for MSB-first bits from spi PD.
+
+commit d78e0beb6594de5dfd2a17d72f532a42f85ca55c
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 5 00:44:27 2014 +0100
+
+ spi: Use/store bits in MSB-first order.
+
+ This makes things a bit easier/clearer for most stacked PDs.
+
+commit bb08f4b3608b7ed4c932ed2041b1f41a5c9a7fed
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Feb 4 22:47:43 2014 +0100
+
+ spi: Fix warnings about CS# being de-asserted.
+
+commit bff3a0a0031a32e19c1170e5a387197d879944ff
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Feb 4 17:07:08 2014 +0100
+
+ rtc8564: Improve short annotations.
+
+commit 09d09aceed72c7ca28023862c9049372dfef8d1d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Feb 3 22:33:37 2014 +0100
+
+ rtc8564: Provide per-bit annotations.
+
+commit de038c4710b3ed11bd7a745ae86ecaf0a63a300d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Feb 3 21:53:46 2014 +0100
+
+ i2c: Emit per-bit annotations/packets and define annotation rows.
+
+commit 9ed420384f97966e20e9c25ca6e99d7c903caf1b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Feb 3 22:51:56 2014 +0100
+
+ mx25lxx05d: Define annotation rows.
+
+commit 9389f2c1b9b74e00d1369e846d4417bf644275d0
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Feb 3 22:43:01 2014 +0100
+
+ mx25lxx05d: Use proper annotation classes.
+
+commit 38ab4ed09ad08d12eb34b0e24765790b34d90cc7
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Feb 3 16:31:08 2014 +0100
+
+ avr_isp: Fix 'Device' annotation sample numbers + row.
+
+commit 3b0013416fcfb17e8bc6cfd6850e79971f239fe0
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Feb 3 16:17:22 2014 +0100
+
+ avr_isp: Define annotation rows.
+
+commit ad30cb466b4f0c0ff448af7a34aee96f40c9c472
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Feb 3 16:12:12 2014 +0100
+
+ avr_isp: Use proper annotation classes.
+
+commit d780f0071d3052931a953bb2dbbe6c7f20e1e638
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Feb 3 12:17:23 2014 +0100
+
+ sdcard_spi: Merge command ID/name and description into same annotation.
+
+commit 0b5fc0742d89d72ceed0aef14a61e16d7dfa9099
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Feb 3 09:35:30 2014 +0100
+
+ sdcard_spi: Improved command handling / display.
+
+commit 21e7a67e9a9d70aca44577d7556c1008e872d14c
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Feb 3 02:01:05 2014 +0100
+
+ sdcard_spi: Fix handling of some warning annotations.
+
+commit 041885bd28ac983501e9de2a247f3f5bb31a0c1f
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Feb 3 01:39:40 2014 +0100
+
+ sdcard_spi: Fix incorrect R1 reply annotation endsample.
+
+commit 49176fecb4ab0c7a2474d50ff98a6f105c2a638f
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Feb 3 01:25:16 2014 +0100
+
+ sdcard_spi: Fix incorrect 'Command index' value access.
+
+commit a74855de187198624fefd2c12ef8355e5a869f80
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Feb 3 01:24:47 2014 +0100
+
+ sdcard_spi: Use bit-exact annotations in handle_response_r1().
+
+commit d4ad1cb483c6aa4fa2333676d9d8538b2bb32d92
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Feb 2 20:05:30 2014 +0100
+
+ sdcard_spi: Use bit-exact annotations in handle_command_token().
+
+commit 9ed115003c754ed2af523af98d22123cee6e99d3
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Feb 2 21:10:23 2014 +0100
+
+ spi: Throw an error if neither MISO nor MOSI was supplied.
+
+commit 808c6e7496410ea473c1a625530fd15f779b542e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Feb 2 21:03:47 2014 +0100
+
+ spi: Fix incorrect dataword endsample numbers.
+
+commit bbc100f764f523dbc63daed84be5011432685e9a
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Feb 2 16:40:30 2014 +0100
+
+ spi: Refactoring and cleanups.
+
+commit d482a2d39a9677a8c1ea91b945a2496b44caf642
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Feb 2 15:54:15 2014 +0100
+
+ spi: Factor out reset_decoder_state().
+
+commit cddd11bc7911af991fcd7f9a4232c700fded9c17
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Feb 2 15:27:10 2014 +0100
+
+ spi: Output per-bit annotations and OUTPUT_PYTHON data.
+
+ This can be used by higher-level PDs to decode per-bit items (not just
+ based on whole datawords).
+
+commit 86f685145345cabef1373a1242016b769ff199b4
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Feb 2 14:24:29 2014 +0100
+
+ sdcard_spi: Define annotation rows.
+
+ This fixes parts of bug #309.
+
+commit 361c1e76a85bb14dce7b9f3e97deb9fe09416a7b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Feb 2 02:35:59 2014 +0100
+
+ sdcard_spi: Use proper annotation classes.
+
+ This fixes parts of bug #309.
+
+commit 1b3109bc83e7d540d30f5c805382339d7a9dc891
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Feb 2 02:14:37 2014 +0100
+
+ sdcard_spi: Initial fixing round for correct samplenumbers.
+
+ This fixes parts of bug #309.
+
+commit 64134a4c84459474a1f1d767314f9a9ecf928539
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Feb 2 01:07:20 2014 +0100
+
+ rtc8564: Handle century bit.
+
+commit 6e256b1c2c19ba37b79e75b01a4ce67462ba0e1f
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Feb 2 00:55:48 2014 +0100
+
+ rtc8564: Provide short/long annotations.
+
+commit 3d1901418abc422d949dfd20c633af5c881620d7
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Feb 2 00:40:23 2014 +0100
+
+ rtc8564: Handle register 0x06 (weekday).
+
+commit 3161ab5a3569f88e6e9fadfd9d8e54f53620f104
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Feb 2 00:20:57 2014 +0100
+
+ rtc8564: Define annotation rows.
+
+commit a4289441eda34163f7e38f44367c4e888eb81eb1
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Feb 1 23:47:03 2014 +0100
+
+ rtc8564: Use proper annotation classes.
+
+commit 58e7e508ded52194ed06a23a48f169779f4c7708
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Feb 1 23:38:25 2014 +0100
+
+ lpc: Define annotation rows.
+
+commit 847e488b37fe5c85c4d1aa4930ced34c24ca5b03
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Feb 1 23:14:46 2014 +0100
+
+ Add a few missing probe-names.
+
+commit 4e3b276aac6d42722fe8a90e8c4ea74bf59fdb37
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Feb 1 18:20:45 2014 +0100
+
+ uart: Better annotation row handling of parity errors.
+
+commit e2ff870ec47cc01a24d037c75d16ebaccdf1ff69
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Feb 1 18:11:40 2014 +0100
+
+ guess_bitrate: start() doesn't take a metadata argument anymore.
+
+commit b92233847c6a77dfb66ac2eaef3c2ef4ff57640c
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Feb 1 16:03:22 2014 +0100
+
+ Fix more warnings exposed by -Wmissing-prototypes.
+
+commit 066d659423912025b5b680c5bf74fca11aa72398
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Feb 1 15:41:36 2014 +0100
+
+ usb_signalling: Define annotation rows.
+
+commit 49e8a4d6fe1ac4f5f9100cce5e01ea59305adeb4
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Feb 1 15:40:27 2014 +0100
+
+ spi: Improve probe names/descriptions a bit.
+
+commit 8e11415b6bc83e6a114223a3ece588097b0e50d9
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Feb 1 15:25:53 2014 +0100
+
+ onewire_link: Define annotation rows.
+
+commit bb5ebde6dce29b53a814efe3a1b1c350196674d9
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Feb 1 14:58:23 2014 +0100
+
+ dcf77: Fix incorrect startsample for "month" field.
+
+commit 011ed1a3b28553b9932b5acbc74c6f19ab4c1eed
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Feb 1 14:46:52 2014 +0100
+
+ avr_isp: Fix a bug resulting in incorrect start samples.
+
+commit 9f6df6fe1aa837d0506b1b9bef6ee75c951a8da2
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Jan 31 14:56:17 2014 +0100
+
+ dcf77: Define annotation rows.
+
+commit 06b52ebb5fe7c09890dee02aa653578c2faf5a65
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Jan 31 14:56:14 2014 +0100
+
+ spi: Define annotation rows.
+
+commit 2ce20a91c05f32d6b99fda089736f980cb05aeff
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 30 22:26:39 2014 +0100
+
+ uart: Define annotation rows.
+
+ Also, provide all the required annotation classes for this to work
+ properly.
+
+commit 1ce468178f581b6270e1f2862ab585e8a38aa056
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Jan 31 16:59:22 2014 +0100
+
+ Add support for annotation rows.
+
+ An annotation row is a list of annotation classes that should all be
+ displayed in the same "row" in GUIs.
+
+ For example, the UART decoder would have at least two rows (for decoded
+ RX and TX data/startbits/stopbits/paritybits), the SPI decoder would have
+ at least two rows (for decoded MISO and MOSI data), and so on.
+
+ Each annotation row has a short ID string (mostly for use in
+ command-line frontends), a description string (mostly for use by GUIs),
+ and a tuple/list of annotation class IDs belonging to this row.
+
+ If no annotation rows are provided by the decoder, frontends can
+ consider this as the "trivial" case of all annotation classes being
+ displayed on the same (only) row.
+
+commit 3dd546c15fc973b3495f0d2557333e9ef31ca7dd
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Jan 31 00:45:56 2014 +0100
+
+ uart: Allow either RX or TX to be optional.
+
+commit 9bf7f71c8e29328bda5689d79b412cc0dde9fbe9
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Jan 31 00:13:32 2014 +0100
+
+ srd_inst_probe_set_all: Error out upon missing required probes.
+
+commit c515eed7ef7a04a42b5b34abd308e08d6942835e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 30 22:37:29 2014 +0100
+
+ s/out_proto/out_python/.
+
+ The output type is now called OUTPUT_PYTHON, adapt all PDs to that.
+
+commit 4467372a2e39bb72648eebbb96934147681110c2
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 30 19:33:13 2014 +0100
+
+ Fix warnings exposed by -Wmissing-prototypes.
+
+commit cb73763da5d004b3f780f4395ccf19a398da60a2
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 30 19:28:49 2014 +0100
+
+ configure.ac: Add -Wmissing-prototypes.
+
+commit 4dc2a249c9691da9981c849270267a3dc1096700
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 30 19:19:23 2014 +0100
+
+ configure.ac: Only check for things we actually use.
+
+ Drop checks where we don't use the result (yet). We might bring back
+ some of those once we start actually using the result in the code.
+
+commit 714f22fe69a79f517fb3b47567b390233987d246
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 30 19:17:40 2014 +0100
+
+ mx25lxx05d: Add probe test case.
+
+commit 9eace5fb7ce1c9cc736fd7a133dc413536004dee
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 30 17:54:16 2014 +0100
+
+ uart: Add trekstor_ebr30_a test case.
+
+commit e0a0123d2f7f1039fe52f24591dff262b4f8935c
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 30 15:26:06 2014 +0100
+
+ uart: Better fix for ASCII output.
+
+ This is a temporary thing, later there'll be some facility to let
+ frontends handle any annotations marked as "this is a number" (as opposed
+ to "this is a string") in a generic manner and display them in any
+ supported (by that frontend) format, e.g. ascii, hex, oct, decimal,
+ binary, big-endian vs. little-endian, and so on.
+
+ This is a fix related to #201.
+
+commit 251d5c4f25ef1fae437c67b953221606a9109b77
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jan 29 18:34:10 2014 +0100
+
+ spi: Add mx25l1605d_probe test case.
+
+commit e693716544080a057f0299f402d5d84a38c7e1f7
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jan 29 18:25:08 2014 +0100
+
+ spi: Add atmega32_00 test case.
+
+commit bcd14870c22d59f76566b0038d5884064ca7441e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jan 29 00:31:14 2014 +0100
+
+ spi: Rename 'sck' to the more common 'clk'.
+
+commit 12549f1161748215072541ed9a9c8625da041131
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Jan 27 14:38:47 2014 +0100
+
+ spi: Allow MISO or MOSI to be optional.
+
+ This fixes bug #175.
+
+commit 8b9179378172206e4053b2773a5ba1f8a076a1c9
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Jan 27 15:50:15 2014 +0100
+
+ tests/pdtest: Fix -R (takes an argument).
+
+commit c141101084198a7baecaae08509d8d2a03300c5c
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 25 09:55:19 2014 +0100
+
+ spi: Drop temporary hack for combined MISO/MOSI out.
+
+commit 4fd46107d35d7ed471e7ca0f4ad9823d1d88cc1b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Jan 27 15:09:08 2014 +0100
+
+ Fix out-of-tree build.
+
+ This fixes 'make install' and 'make dist' for out-of-tree builds.
+
+commit 2de277b88e7e7ff49c5a2933da36cb28d3f79481
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jan 22 23:06:01 2014 +0100
+
+ tests/runtc.c: Minor whitespace fixes.
+
+commit 00bebae3f43a6c0c577d31c7c0b58faeb002478b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jan 22 23:03:02 2014 +0100
+
+ tests/pdtest: Add missing license header.
+
+commit cd8eb52870200196b12d6950eead62d46864cd00
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jan 22 23:01:52 2014 +0100
+
+ tests/pdtest: Fix shebang line.
+
+commit 9f2f42c064e8a7100cee13460a7a3638f468f56a
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jan 22 22:56:08 2014 +0100
+
+ All PDs: Consistent naming/case for annotation shortnames/IDs.
+
+commit ef36224880135a05d2fbde8f048ea3fe3f425df9
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jan 22 22:47:18 2014 +0100
+
+ All PDs: Drop unneeded comments.
+
+ The single comment re-stating the PD's name / description / purpose in
+ each pd.py file is not really needed, that info is available in the
+ Decoder class' attributes already.
+
+commit 4c3b1846c9c307c1c35f86d259ddb968ed92718d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jan 22 22:43:21 2014 +0100
+
+ All PDs: Improve/fix descriptions.
+
+commit 37e4c724efa64dd6061f7bb83f126b81da949771
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Jan 20 21:52:15 2014 +0100
+
+ transitioncounter: Drop PD (obsolete).
+
+ This decoder was just a simple test case for early libsigrokdecode
+ development and testing, it is neither useful nor properly working
+ currently, so drop it.
+
+commit 0bb7bcf316b528acbe0ef82f4c1e310e756074bc
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Jan 20 17:43:01 2014 +0100
+
+ uart: Add binaryout/dump support, drop obsolete 'uart_dump' PD.
+
+ The functionality of the preliminary 'uart_dump' PD is now available
+ in the proper 'uart' PD, via the OUTPUT_BINARY mechanism that frontends
+ can use to dump decoded data (in various formats) to a file, or pipe it
+ into other applications, and so on.
+
+ Old sigrok-cli example usage:
+
+ $ sigrok-cli -i foo.sr -P uart:rx=0:tx=1,uart_dump:filename=bootlog.txt
+
+ New sigrok-cli example usage:
+
+ $ sigrok-cli -i foo.sr -P uart:rx=0:tx=1 -B uart=rxtx > bootlog.txt
+
+ New sigrok-cli example usage (piping into other applications):
+
+ $ sigrok-cli -i foo.sr -P uart:rx=0:tx=1 -B uart=rxtx | grep "whatever"
+
+commit e54f222c4edf55a379e5b3ad892cf671ace83e48
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 18 19:15:41 2014 +0100
+
+ i2s: Add WAV dump support, drop obsolete 'i2s_dump' PD.
+
+ The functionality of the preliminary 'i2s_dump' PD is now available
+ in the proper 'i2s' PD, via the OUTPUT_BINARY mechanism that frontends
+ can use to dump decoded data (in various formats) to a file, or pipe it
+ into other applications, and so on.
+
+ Old sigrok-cli example usage:
+
+ $ sigrok-cli -i 2ch-16bit-16khz.sr \
+ -P i2s:sck=0:ws=1:sd=2,i2s_dump:filename=foo.wav
+ $ aplay foo.wav
+
+ New sigrok-cli example usage:
+
+ $ sigrok-cli -i 2ch-16bit-16khz.sr \
+ -P i2s:sck=0:ws=1:sd=2 -B i2s=wav > foo.wav
+ $ aplay foo.wav
+
+ New sigrok-cli example usage (piping into other applications):
+
+ $ sigrok-cli -i 2ch-16bit-16khz.sr \
+ -P i2s:sck=0:ws=1:sd=2 -B i2s=wav | aplay -
+
+commit e8ce01860673214bae97a6b793a7f55e13128dba
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Jan 17 17:56:26 2014 +0100
+
+ configure.ac: Drop obsolete MinGW Python3 workaround.
+
+ We just use dummy/fake python3.pc files on Windows so that the usual
+ pkg-config mechanism works there as well.
+
+commit 91c78794d872dcac55f93ecbae1e28cec1ca6bf6
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Jan 17 17:56:08 2014 +0100
+
+ configure.ac: Check for all known Python3 pkg-config names.
+
+ Even when using pkg-config not all distro/platform specific issues are
+ transparent, unfortunately. On some systems the pkg-config file is
+ named "python3.pc" on others it's versioned, e.g. "python-3.2.pc".
+
+ See also: http://sigrok.org/wiki/Libsigrokdecode/Python
+
+ This should fix the build on e.g. FreeBSD, NetBSD, Mac OS X (some
+ versions), and possibly various Linux distros, e.g. Gentoo.
+
+ Also, drop manual AC_MSG_ERROR() and let PKG_CHECK_MODULES() output a
+ more verbose and standardized error message if Python 3 is not found.
+
+commit 8eafa2613d2541e934a04874cd35cbc944c3168b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Jan 13 23:26:36 2014 +0100
+
+ parallel: Make CLK probe optional.
+
+ When no CLK probe is supplied to this PD, handle any transition on
+ any of the supplied data probes as if there had been a CLK transition.
+
+ (based on a suggestion/patch by "bmx" from the #sigrok channel, thanks!)
+
+commit 6af04d5a36a47b11dcf10bb629105600aa5a66eb
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Jan 3 17:41:24 2014 +0100
+
+ Link against libm to avoid Python related linking errors.
+
+ The python3-config script reported "-lm" as linker option previously,
+ but we switched to using pkg-config (among other things for
+ cross-compile support) which doesn't report "-lm" though (this is a
+ common behaviour across multiple distros and OSes).
+
+commit 7d54fe300d9e3375f731abcd16d637e470ef3976
+Author: Marcus Comstedt <marcus at mc.pp.se>
+Date: Thu Jan 2 12:43:34 2014 +0100
+
+ configure.ac: Use pkg-config to check for python
+
+ Using python-config does not work when cross-compiling, since it
+ can only be run on the host system.
+
+commit 0c0368d0fc4ba737716326b87e99d70397134d38
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Dec 28 23:17:18 2013 +0100
+
+ jtag: Use proper annotation classes, fix GUI usage.
+
+ This closes bug #156.
+
+commit 6b32f92828b18f510a5da1f729c3694bbe9b1f42
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Oct 13 15:39:44 2013 +0200
+
+ jtag: Refactor and simplify some code.
+
+commit 001974848a862a7eeab7efc81cc0b21aec56464d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Dec 28 15:15:06 2013 +0100
+
+ Do some more I2C to I²C changes.
+
+commit ea48f54366eec05c4675c29387e741ddeeb9d2f5
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Dec 28 15:11:55 2013 +0100
+
+ i2s: Fix typo.
+
+commit 31f1a29687604b8da5a4a3c46a72f82fc783947b
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date: Sat Dec 28 09:17:02 2013 +0100
+
+ mxc6225xu: Replace I2C with I²C
+
+commit 1db7e477b3a63a837e478dc12f7a8026dcca4ef1
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date: Sat Dec 28 09:16:13 2013 +0100
+
+ lm75: Replace I2C with I²C
+
+commit f9c2aa723f5a5c0b7baca2dd5c8f9da92900fce6
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date: Sat Dec 28 09:03:48 2013 +0100
+
+ i2s_dump: Replace I2S with I²S
+
+commit 270a59d81fd0d18e6dc8930829d61e0bf64f0e8d
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date: Sat Dec 28 09:02:34 2013 +0100
+
+ i2s: Replace I2S with I²S
+
+commit bbe6d87fa91938bafc81c19cb1ef868d1c29bb2b
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date: Sat Dec 28 09:01:02 2013 +0100
+
+ i2cfiler: Replaced I2C with I²C
+
+commit 25ac80b22a198833caa515875ab61a1e15adca18
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date: Sat Dec 28 01:37:18 2013 +0100
+
+ i2cdemux: Replaced I2C with I²C
+
+commit ab4aa33c4bd3f72707c718bb0448722a5c2c9912
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date: Sat Dec 28 01:21:26 2013 +0100
+
+ i2c: Replaced I2C with I²C
+
+commit 919ace16e7100fccd51fda16c6d40fc3ad9915e2
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Dec 22 23:07:23 2013 +0100
+
+ runtc: Fix conditional build on non-Linux systems.
+
+commit 83411834eec29f08443908b7d2a427e7fb130573
+Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
+Date: Wed Dec 18 16:12:34 2013 +0100
+
+ Don't install runtc.
+
+ Don't install runtc. Not meant for generic usage.
+
+ Signed-off-by: Arkadiusz Miśkiewicz <arekm at maven.pl>
+
+commit 97578cb1dfb0dcadf748b55dc4bcfa3ea2202c19
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Dec 18 12:04:26 2013 +0100
+
+ runtc: Output binary as ASCII timestamp/class/hex bytes instead.
+
+ This allows for verifying timestamps and classes as well.
+
+commit baeaa75dedad94558e40a888c2a56ecea2cdb702
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Dec 15 15:55:35 2013 +0100
+
+ runtc: Make sure to compile against this library
+
+ It might compile against a previously-installed one unless the linker
+ finds it in the top directory first.
+
+commit 0b2a10a37f61cc70260376d8b7c2c01ca63deaf7
+Author: Bert Vermeulen <bert at biot.com>
+Date: Fri Dec 13 18:13:08 2013 +0100
+
+ i2c: Add Python tests.
+
+commit b7e15e0e2c1fef3a938c84d79022098f8482920a
+Author: Bert Vermeulen <bert at biot.com>
+Date: Fri Dec 13 18:11:52 2013 +0100
+
+ pdtest/runtc: Add support for Python output types.
+
+commit 3d14e7c9ac0155c0438b46dee267e3e16a6b8e3a
+Author: Bert Vermeulen <bert at biot.com>
+Date: Fri Dec 13 17:57:01 2013 +0100
+
+ Send SRD_OUTPUT_PYTHON to registered callbacks as well.
+
+ There's really only one use case for this: the testing framework. This
+ allows it to check what gets sent up the stack as well.
+
+commit c8233c78da6acb23b74afe271c30355442fdaa5c
+Author: Bert Vermeulen <bert at biot.com>
+Date: Fri Dec 13 11:52:38 2013 +0100
+
+ Prune dead code.
+
+commit be6733ca41275b59a5e240ff104f2a16ad3828d3
+Author: Bert Vermeulen <bert at biot.com>
+Date: Fri Dec 13 11:51:41 2013 +0100
+
+ i2c: Avoid obsolete method.
+
+commit 5ece2a0623d22421300ea6844de569ae87a07d5e
+Author: Bert Vermeulen <bert at biot.com>
+Date: Fri Dec 13 11:29:59 2013 +0100
+
+ No need to mess with method reference counts.
+
+commit e6449805fc8d56d0d8ff4003d123437e799b242f
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Dec 12 13:30:36 2013 +0100
+
+ i2c: Add binary tests.
+
+commit d7d693b51692aa7aae90f3ca8caf5a8e9c581ed9
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Dec 12 13:29:37 2013 +0100
+
+ pdtest/runtc: Add support for binary output types.
+
+commit 98457aa731ec0e7fe5a1be9f83181354253dc566
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Dec 12 13:28:21 2013 +0100
+
+ pdtest: Add -f option to automatically fix failing tests.
+
+commit 6b85745afe65ebd2722921bf23e91fa4573f4302
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Dec 12 01:29:26 2013 +0100
+
+ runtc: Add support for binary output.
+
+commit 5cb2cb0209d043b5b3293002ebf305efd59e05b9
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Dec 12 00:57:04 2013 +0100
+
+ Use new binary class definition format.
+
+commit 1f2275dd284326fb3ccda6b2bf17a495d5c2de75
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Dec 12 00:56:12 2013 +0100
+
+ Binary classes are now defined as (name, description).
+
+commit 62a2b15ce3fe6af6867c30cfc9c14c01d201a898
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Dec 11 23:41:02 2013 +0100
+
+ Easier access to sequences of strings, not just lists.
+
+commit 932606db3cdb14518dac55c67f4ecc8471fb6a33
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Dec 11 21:53:17 2013 +0100
+
+ runtc: Return errorcode according to testcase result.
+
+commit caa4b2cc0cdb34570e0fe8e5a6dad05a2988cc89
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Dec 11 21:52:33 2013 +0100
+
+ pdtest: Use -dd to turn on SR/SRD debugging.
+
+commit 554a49f9df0ee8c57d7fae64515cf57d622b0511
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Dec 11 18:36:42 2013 +0100
+
+ check: Make sure to test this set of decoders, not the installed ones.
+
+commit ea81b49a3ca4fff4994693d30045d51b86181e32
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Dec 11 18:31:56 2013 +0100
+
+ Load decoders from all search paths, not just the default.
+
+ srd_decoder_load_all() was really only getting a list of decoders
+ from the default (installation) path, so could not find uninstalled
+ decoders, or those in a custom added search path.
+
+ This broke development of new PDs when using the SIGROKDECODE_DIR
+ environment variable, and broke many of the unit tests in the tests/
+ directory -- those actually tested against the already-installed
+ decoders, not the ones about to be installed.
+
+commit 820bf44828745e7d0a7bb0974164acd899c3c113
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Dec 11 16:30:25 2013 +0100
+
+ Clear decoder list after unloading, not just at exit.
+
+commit b74823812d4106bfafc4a7fef1d4a141dac58519
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Dec 11 12:50:38 2013 +0100
+
+ runtc: Make sure to test this set of decoders, not the installed ones.
+
+commit 2c53ea9310728f451a7c69c49d376b727ff08ff3
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Dec 11 12:49:30 2013 +0100
+
+ pdtest: Don't bother with diff if any error at all occurred.
+
+commit c87dce4c93822df764cc380213e9a69eced7e6e9
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Dec 11 12:48:50 2013 +0100
+
+ pdtest: Add option for custom sigrok-dumps repository path.
+
+commit de556baee957a019ac5c16caf1305f5441adf30c
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Dec 11 12:39:50 2013 +0100
+
+ pdtest: Always sanity-check all testcases.
+
+commit f8c88ebc5b33052de0b88690577af4611aa3709a
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Dec 11 01:21:22 2013 +0100
+
+ Clean up runtc build.
+
+ This only compiles libsigrok into the one target that needs it, instead
+ of slopping it all over the place.
+
+commit fbd226c3f70f20fdf3cbfd43a671bf2bcc5d23e6
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Dec 10 17:17:38 2013 +0100
+
+ Add protocol decoder testing framework.
+
+ This adds a tool in the tests directory, called pdtest. It uses the
+ "test/" directory in every PD directory, if present, to run the
+ PD against dumps found in the sigrok-dumps repository, and compares
+ the output against ".output" files in the "test/" directory. The file
+ "test/test.conf" is used to configure which tests to run.
+
+ A separate tool (tests/runtc.c) is used to run the actual decoding and
+ report output.
+
+ To get an overview of the options, run tests/pdtest without any options.
+
+commit 4d2c7619ec72728dd01999f20ef1004e018d18a4
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Dec 10 02:38:44 2013 +0100
+
+ API clarification.
+
+commit 7efd37c004833a4f1758bc99623850d89722636d
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Dec 10 01:05:59 2013 +0100
+
+ Fix 'dist' make target.
+
+commit a6b52878af14944b52ed202478f038b1abcb0d07
+Author: Bert Vermeulen <bert at biot.com>
+Date: Mon Dec 9 11:44:27 2013 +0100
+
+ Avoid GError warning when unloading decoders.
+
+commit a90eeee1f0af5213f8e88788d0d2d715fad1d4c6
+Author: Bert Vermeulen <bert at biot.com>
+Date: Mon Dec 9 01:40:23 2013 +0100
+
+ Support DESTDIR on install targets.
+
+ Fixes bug 215.
+
+commit b098b820b2942ed6e98546ed897ca81bdedee25c
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Dec 4 11:05:00 2013 +0100
+
+ parallel: start(): Drop obsoleted metadata parameter.
+
+ This fixes bug #202.
+
+commit 8705ddc81b001d7f79ed94e9aa34b792cfdd4481
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Dec 3 14:46:23 2013 +0100
+
+ uart: Display non-ASCII characters properly.
+
+ We use the [XX] notation for non-printable characters, which is what
+ various other logic analyzer software packages do too, e.g. the
+ CWAV USBee Suite.
+
+ This fixes bug #201.
+
+commit 169f42726fcd44ca9a98c914b835ae6ff31295c3
+Author: Bert Vermeulen <bert at biot.com>
+Date: Fri Nov 29 13:59:51 2013 +0100
+
+ Python 3.2 and portability fixes.
+
+commit 3f5bd4ed85954564b0b6d9819328dbef04d1d3d5
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Nov 27 17:50:23 2013 +0100
+
+ Clean up autoconf leftover configuration.
+
+commit 9cb607f576448b29a65c9f8e955193146d6848c0
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Nov 27 16:52:56 2013 +0100
+
+ edid: Make sure to install the vendor list.
+
+commit 03d6d746b742fb21ca22086ba6b72943a845ecc9
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Nov 27 16:47:04 2013 +0100
+
+ Automate protocol decoder installation.
+
+ This automatically figures out the files to install for each protocol
+ decoder, without involving autotools.
+
+ All python files (filenames ending in .py) are always installed. If a
+ protocol decoder requires installation of a non-python file, a small
+ file called 'config' can be created in that protocol decoder's
+ directory, with the following content:
+
+ # comments are ok
+ extra-install vendorlist.txt commands.txt
+
+commit 37b94c205e4c1c43e77e29993108f23066cbce05
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Nov 26 16:05:54 2013 +0100
+
+ Remove 64-probe limit.
+
+ Fixes bug 120.
+
+commit d95f2888014f54fc650dc575c270cc2891580f4f
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Nov 19 21:14:03 2013 +0100
+
+ Add a missing #include.
+
+ This causes compiler errors in some setups otherwise, e.g.:
+
+ CC libsigrokdecode_la-session.lo
+ session.c: In function 'srd_session_metadata_set':
+ session.c:195:46: error: expected ')' before 'PRIu64'
+ srd_dbg("Setting session %d samplerate to %"PRIu64".",
+ ^
+ session.c: In function 'srd_session_send':
+ session.c:242:15: error: expected ')' before 'PRIu64'
+ "number %" PRIu64 ", %" PRIu64 " bytes at 0x%p",
+ ^
+
+commit e630b755f6a3573b6bca87cd280048468204216f
+Author: Bert Vermeulen <bert at biot.com>
+Date: Mon Nov 18 10:57:34 2013 +0100
+
+ Turn off excessive logging
+
+commit eaad935fbaa3c301aded9c64dfe514cc4ca40968
+Author: Bert Vermeulen <bert at biot.com>
+Date: Mon Nov 18 10:55:02 2013 +0100
+
+ Remove unreasonable test
+
+commit 092f1437d385585ebf12c6a060e753ba812d1700
+Author: Bert Vermeulen <bert at biot.com>
+Date: Mon Nov 18 10:49:04 2013 +0100
+
+ Fix inverted condition on doc check
+
+commit aac68131f8ab9aa6dc1f1392a4f9a131a1c54d36
+Author: Bert Vermeulen <bert at biot.com>
+Date: Mon Nov 18 10:44:28 2013 +0100
+
+ Don't try to load an already-loaded module
+
+ Python silently uses the existing module anyway, but the library
+ was counting it as an extra module. This was exposed by a test
+ case in the test suite.
+
+commit 22c9bc2a4e958fccf498f4480965ec03884bc058
+Author: Bert Vermeulen <bert at biot.com>
+Date: Mon Nov 18 09:41:14 2013 +0100
+
+ Don't decrease borrowed reference to probe definition dict
+
+ This fixes bug 177.
+
+commit a8c765481ed4eff56701724f11564a02c8660c03
+Author: Bert Vermeulen <bert at biot.com>
+Date: Mon Nov 18 01:33:54 2013 +0100
+
+ Fix inverted condition on decoder check
+
+commit e195c025c303e361d0cc5a207f9c9443fb8deced
+Author: Bert Vermeulen <bert at biot.com>
+Date: Mon Nov 18 01:21:16 2013 +0100
+
+ Check library initialization before handling decoders
+
+commit 909fbf4181ab401a371265567505ffa1403f73d6
+Author: Bert Vermeulen <bert at biot.com>
+Date: Mon Nov 18 01:14:02 2013 +0100
+
+ Clean up prototypes
+
+commit ca27aa8f9d91d68bfd55fb17fea181a1ba6054a4
+Author: Bert Vermeulen <bert at biot.com>
+Date: Mon Nov 18 00:03:53 2013 +0100
+
+ Better error checking on session metadata
+
+commit a3a2a26d2a93d1fe7a3bb2e8eb732509c8c905e6
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sat Nov 16 23:03:19 2013 +0100
+
+ Only instance-related functionality remains, rename source file
+
+commit 190b71cfebc1dd000d3203c7300a10afd96c1201
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sat Nov 16 22:58:28 2013 +0100
+
+ Move initialization/shutdown into srd.c
+
+commit fe9d91a88a8896ef04d12682720943b237c0a295
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sat Nov 16 23:14:50 2013 +0100
+
+ Move session-specific functionality into session.c
+
+commit 2aa72348627817f068b6e1862727025a7cb5b662
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sat Nov 16 15:33:16 2013 +0100
+
+ Minor cleanup
+
+commit 2b628af1e5f816b96683a5a140642a97fe0ef8e1
+Author: Bert Vermeulen <bert at biot.com>
+Date: Fri Nov 15 23:37:47 2013 +0100
+
+ Move versioning info out to separate header
+
+commit a929afa618be52072786b51f1b9ea7be03edcd49
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Nov 10 12:45:58 2013 +0100
+
+ Use OUTPUT_BINARY with four classes.
+
+commit d75d8a7c40011cdc15be8330b5efbdf812c4fe27
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Nov 10 12:42:11 2013 +0100
+
+ Implement OUTPUT_BINARY
+
+ This requires the PD to have a tuple in its class called 'binary',
+ which contains a list of strings describing the different binary
+ classes it can output. For the SPI decoder this might be 'MOSI' and
+ 'MISO', for example.
+
+ The data is submitted to the frontend as struct srd_proto_data_binary,
+ which contains the class that data belongs to.
+
+commit 0169f19c53e195df2f96c4df731ad3214c59e20a
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Nov 14 21:56:21 2013 +0100
+
+ Drop obsolete report() method.
+
+commit 0309c15a6990f57fbbb27d6a77957b1282163f06
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Nov 14 21:55:09 2013 +0100
+
+ Drop outdated report: this should be handled by a frontend.
+
+commit be465111b552c7c2a2262ac49758a30a8bf1b1d5
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Nov 14 17:25:53 2013 +0100
+
+ Use the new Decoder.register() API
+
+commit 8a3c879201df27615f30b7c6b3a4072526c0e378
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Nov 14 14:55:09 2013 +0100
+
+ Emit meta bitrate
+
+commit 8d2a96368a130d8c7d1b7877536cfcf48305f609
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Nov 14 00:36:16 2013 +0100
+
+ Emit meta bitrate
+
+commit 19ac1568f74920bd44e43671059cf9e1780e5aca
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Nov 14 00:32:03 2013 +0100
+
+ Prune dead code
+
+commit 7ee0c40b4ac605c68a8ec2008ef4ab61a1872475
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Nov 14 00:19:28 2013 +0100
+
+ Implement OUTPUT_META
+
+ This replaces the Decoder.add() method with Decoder.register().
+ The first argument is still output type, but all arguments are now
+ optional:
+
+ Decoder.register(output_type,
+ id='someid',
+ meta=(object-type, 'Name', 'Description'))
+
+ 'id' defaults to the protocol decoder instance id, and only needs changing
+ if a decoder chain needs to fork.
+ 'object-type' refers to a Python object, such as int or str.
+
+ After registering, the PD submits data as usual with Decoder.put(), with
+ the only argument a value of the registered object-type.
+
+commit 0b9224604aa166775a6693efba215a33ce594b70
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Nov 7 22:38:47 2013 +0100
+
+ Split annotation-specific output to another struct
+
+ struct srd_proto_data was supposed to be independent of the output
+ type, but a field specific to annotations snuck in there.
+
+commit 4f75f1c1dfdec362514884ac4335c080b48b3d78
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Nov 7 15:02:10 2013 +0100
+
+ Minor code cleanup
+
+commit f2a5df42ea41e6c4370d4efa1a27ab942ba1ddff
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Nov 5 11:21:33 2013 +0100
+
+ Rename inter-PD output type to SRD_OUTPUT_PYTHON
+
+ This better reflects what it is: a python object generated and
+ processed by python code.
+
+commit 98e0b79b9fd2abf076054abc5f25c184b436cb87
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Oct 31 12:25:58 2013 +0100
+
+ unittests: Update to recent API changes.
+
+ srd_session_config_set() is now called srd_session_metadata_set(), and
+ SRD_CONF_NUM_PROBES and SRD_CONF_UNITSIZE are dropped.
+
+commit 8915b34659332288aab38780d8f10d75c4c83e7f
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Oct 30 22:35:41 2013 +0100
+
+ The start() method no longer takes a metadata parameter
+
+commit f372d597739a30e0106aebc8225c1edebf6d93e3
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Oct 30 22:25:45 2013 +0100
+
+ Receive samplerate via metadata(), not start()
+
+commit ed41649709abc02362df526cbd725775000e8199
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Oct 30 16:30:05 2013 +0100
+
+ Pass metadata to PDs only at runtime, not at decoder start
+
+ The SRD_CONF_NUM_PROBES metadata key was removed. It wasn't actually
+ used for anything, since this is trivially available via the configured
+ (or default) probe list.
+
+ The SRD_CONF_UNITSIZE key was removed. The unit size is instead derived
+ from the probe list: the number of probes packed into the least amount
+ of space possible defines the unit size.
+
+ PD changes:
+ * The start() method no longer takes a 'metadata' parameter.
+ * Metadata now comes in only via the metadata() method, which takes
+ a key and value. The only key defined so far is SRD_CONF_SAMPLERATE,
+ which is exported into the module namespace.
+
+ API changes:
+ * srd_session_send() now takes an end_samplenum parameter, and had its
+ options rearranged.
+ * srd_session_config_set() is now srd_session_metadata_set(). This keeps
+ "config" options for a future feature to allow PDs or frontends to
+ configure each other's options on the fly, up and down the stack.
+
+commit 69075817a626982179e5739bf0eee5e47b8a5f9e
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Oct 30 15:22:10 2013 +0100
+
+ Documentation and coding style fixes
+
+commit 56c93143f54601280a119b64b1eea8dc4b591dcb
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Oct 23 19:59:50 2013 +0200
+
+ Add a 'guess_bitrate' protocol decoder.
+
+ This PD tries to guess / detect / estimate a bitrate of e.g. some
+ UART communication snippet or other protocols.
+
+commit 3af0e3455d4263f79920afaf6aed44286ad37ba0
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Oct 23 19:23:40 2013 +0200
+
+ controller.c: Add checks for srd_inst_option_set().
+
+ This also fixes some unit tests that were previously failing.
+
+commit 368b406efb2f4527d11b10dda8011f352288023e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Oct 23 19:21:45 2013 +0200
+
+ testsuite: Add some decoder instance related tests.
+
+commit a3b4f1684a8f5c4a3bb65de89c36108bf8565197
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Oct 21 22:59:25 2013 +0200
+
+ parallel: Limit number of probes to 8 for now.
+
+ This will be increased again at some later point.
+
+commit 74bb0af5daeef0d9abcf382b238e84376b1e006b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Oct 20 23:09:46 2013 +0200
+
+ session: Add some more parameter checks, minor other fixes.
+
+ Some of these also fix unit tests that were previously failing.
+
+commit 269b442df38c1cfe825fd397612f8f79aea5541d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Oct 18 19:39:30 2013 +0200
+
+ testsuite: Add a few session related unit tests.
+
+commit 25e1418afe855a77be29bca4350dc49220dd3143
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Oct 19 21:36:49 2013 +0200
+
+ Add initial sync parallel bus decoder.
+
+commit 8a01468302ed915f6efd6933836c27e60a019100
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Oct 17 23:52:15 2013 +0200
+
+ Report invalid module name on decoder load
+
+commit 9b9ff99983bba5f06093002e6cafd5bfd632b65d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Oct 17 22:44:29 2013 +0200
+
+ testsuite: Add a few more unit tests.
+
+commit 94bc9a839da836c802e77a6d7254945086a3be77
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Oct 17 22:42:34 2013 +0200
+
+ Minor cosmetics, typos, Doxygen updates/fixes.
+
+commit 119d62586036f4436de8e11824e388c3f0a882c4
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Oct 17 16:27:54 2013 +0200
+
+ Avoid clobbering class variables when setting instance options
+
+commit 308d9958c9b4ca8f7126d7e8c81be3b93749a2b1
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Oct 17 16:26:58 2013 +0200
+
+ Don't release borrowed reference
+
+commit bf525bd23ab8be68b6369c8f950aeeeacc677eb2
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Oct 17 02:05:09 2013 +0200
+
+ .gitignore: Add some missing entries.
+
+commit 3ad11099f8d45c215d3b44e5588832b7679b887d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Oct 17 01:48:08 2013 +0200
+
+ testsuite: Add some basic tests for loading PDs.
+
+commit 7529cdaad9e9a52c93ed4d21c2fcccaf3313592c
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Oct 16 19:37:44 2013 +0200
+
+ Add a testsuite for libsigrokdecode.
+
+ This uses the Check unit testing framework, just like libsigrok.
+ For now, only a few very basic unit tests are included.
+
+ Invocation:
+
+ make check
+
+commit 7fc7bde666b3c1234e3d9612caa0388381881059
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Oct 16 11:10:27 2013 +0200
+
+ Properly return error on exception in srd_inst_option_set()
+
+commit 32cfb920625182c03eb4a4564ffdfa9d2b08f15c
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Sep 12 23:54:43 2013 +0200
+
+ Move all decoder instances and callbacks into a session struct
+
+ The struct srd_session also holds configuration parameters formerly
+ passed to srd_session_start().
+
+ The new call srd_session_new() takes a pointer where a newly allocated
+ pointer to struct srd_session will be stored. This pointer must be
+ passed as the first argument to all functions that require it.
+
+ The SRD_CONF_NUM_PROBES, SRD_CONF_UNITSIZE and SRD_CONF_SAMPLERATE
+ keys must be configured with srd_config_set() before srd_session_start()
+ is called.
+
+ A new call srd_session_destroy() is also available. This cleans up all
+ resources the session holds. This is also called from srd_exit() for
+ all sessions.
+
+commit 1f2e00d140ac41a3a61888f67fc6f96c4369bea3
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Sep 11 12:35:17 2013 +0200
+
+ Code cleanup
+
+commit 6fd278bac7d10e967e708171e2b3aa8b3382a2ff
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Oct 13 18:32:52 2013 +0200
+
+ i2s_dump: Fix bug in the WAV output format generation.
+
+commit f54ffe555c7be3cc674833953fd5d8aba1a88e17
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Oct 13 17:30:32 2013 +0200
+
+ Add new i2s_dump protocol decoder.
+
+ This stacks of top of the 'i2s' decoder and outputs the audio data to
+ file (or stdout) in various formats. Currently only WAV is supported.
+
+ This is work in progress, it has various hard-coded assumptions.
+
+commit 7fb4935edde881272fabdeda83f554bcf150689f
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Oct 9 19:10:29 2013 +0200
+
+ tlc5620: Output short/long annotations.
+
+ This fixes (the remaining parts of) bug #168.
+
+commit 5f4de613af7b95dd37c6df69efb1214c741fdd05
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Oct 9 18:59:30 2013 +0200
+
+ tlc5620: Use annotation types.
+
+ This fixes parts of bug #168.
+
+commit 63374ad88faa566e3fffbca0e31c501e68ec372b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Oct 9 22:20:18 2013 +0200
+
+ lpc: Initial start-/end-sample support.
+
+ This fixes (parts of) bug #163.
+
+commit f7aa0719c59029f5340ac30d11efd5679ca07475
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Oct 9 20:02:39 2013 +0200
+
+ lpc: Use annotation types.
+
+ This fixes (parts of) bug #163.
+
+commit 6554fbc9e135916909ea3cdb6b4d35e73b7daa07
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Oct 9 19:48:17 2013 +0200
+
+ lpc: Make the RESET# pin optional.
+
+commit 59d3200cb1f7c64aabffcf3e69e66626d2fd83b7
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Oct 9 19:24:48 2013 +0200
+
+ lpc: Fix handling of optional probes.
+
+commit edc6c8fd1ff5c603163e6b1e3d0f6cee3de8aa55
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Oct 9 19:21:39 2013 +0200
+
+ lpc: Add annotation helper method.
+
+ This fixes (parts of) bug #163.
+
+commit 9059125f3997a7ce77ef5081da5e8bc8160e6769
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Oct 10 22:44:02 2013 +0200
+
+ usb_signalling: Drop packet handling.
+
+ The usb_signalling PD should not care about packets, only symbols and bits.
+ The new (fixed) usb_packet PD constructs packets out of individual bits now.
+
+commit 0eb16a7bab83bf219004b768cb58d90a6c52e0d7
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Oct 4 11:35:56 2013 +0200
+
+ usb_packet: Major rewrite, e.g. to prepare for GUI usage.
+
+ Restructure the PD into a state machine, output individual packet
+ components as separate annotations, define a protocol output format and
+ implement it (so that other PDs can stack on top of this one), and fix
+ various other isses in the PD.
+
+commit a015bd4926d95a5cbb25843c02eca967097f4e7e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Oct 2 19:29:54 2013 +0200
+
+ Rename usb_protocol to usb_packet.
+
+ There will be further PDs that are stacked on top of usb_packet.
+
+commit a56b8fe1439410e88a4fa3888820f693f6f37aba
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Oct 2 19:13:44 2013 +0200
+
+ usb_signalling: Document protocol output format.
+
+ Also, add missing output for some packet types.
+
+commit 4e980c20fbb456ca339529762ea7173900521a3c
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Oct 9 00:34:41 2013 +0200
+
+ onewire_link: Provide short/long annotations.
+
+commit 015dc33a9fe13c529bd84fcfdca39d3fa2f7c293
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Oct 9 00:30:35 2013 +0200
+
+ onewire_link: Fix typos.
+
+commit 6f50757335d1936558779fd8fe8100a8257e7a71
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Oct 9 00:23:49 2013 +0200
+
+ onewire_link: Split "reset" and "presence" annotations.
+
+ This needs a few more fixes later, but it's a start.
+
+commit 01520fa9a6e0fe3eb17dd107a408e6b7e726850a
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Oct 8 23:20:15 2013 +0200
+
+ onewire_link: Default the 'overdrive' option to 'no'.
+
+commit 497f196ddfa2d0e2e7925d6d8b3dea3548cf1b52
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Oct 8 23:06:39 2013 +0200
+
+ onewire_link: Use defaults for the PD options.
+
+ This also simplifies the PD code a bit.
+
+commit 5484838563328e7d0533e6bdf5405829d24e7ca0
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Oct 8 17:56:01 2013 +0200
+
+ onewire_link: Drop PD info not useful for the user.
+
+commit 938aa7fb36fc0f172dda3b2bc5c15b226a458295
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Oct 8 17:49:55 2013 +0200
+
+ onewire_link: Use annotation types.
+
+ This fixes bug #147.
+
+commit ddeb9b32167075938aa96af0f71acfa190a9c3e1
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Oct 8 17:46:59 2013 +0200
+
+ onewire_link: Add/use annotation helpers.
+
+commit 750a808a37cca1b05e27ff10088c2780627295d4
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Oct 8 00:41:28 2013 +0200
+
+ i2s: Add shorter and longer annotations for GUI use.
+
+ This fixes (the remaining parts of) bug #162.
+
+commit 4adb11a93d77de94d3114624dce5464c2d25cd61
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Oct 8 00:26:54 2013 +0200
+
+ i2s: Define/use common proto out format.
+
+commit 2b2b7c300e6771ac6aa2982ced109ef3f02f3636
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Oct 7 16:34:51 2013 +0200
+
+ i2s: Add helper methods for annotation/proto output.
+
+commit 29fc362596c87eaa3dc684d1d23047772ad27354
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Oct 7 16:32:11 2013 +0200
+
+ i2s: Use annotation types.
+
+ This fixes parts of bug #162.
+
+commit 17f5df4f9eb701d6e8203d2953a7c48d3dd55537
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jul 18 21:31:47 2013 +0200
+
+ Add initial MIDI protocol decoder.
+
+ This supports a certain number of MIDI messages already, but not yet all
+ of them. More will be added later.
+
+commit ab96960eded15c227208e49007a0b3f65c046aa3
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Sep 29 20:22:51 2013 +0200
+
+ usb_signalling: Fix packet annotation.
+
+commit fdd5ee5e2ca54c287aecf8c31a3249d5f69fdd66
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Sep 29 20:19:21 2013 +0200
+
+ usb_signalling: Fix EOP handling and annotation.
+
+commit edad813467a4a248edaa1c91377d532b2e7f8786
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Sep 29 20:05:13 2013 +0200
+
+ usb_signalling: Properly use different annotation types.
+
+commit d1970f14488ad23f595994779831cd8897c39300
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Sep 29 00:18:24 2013 +0200
+
+ usb_signalling: Fix decode of individual bits.
+
+ After a Start of Packet (SOP) has been detected, "sample" the individual
+ USB symbolѕ/bits in the middle of the respective bittime (depending on
+ whether full-speed or low-speed signalling is used).
+
+ This fixes various incorrectly decoded cases (bug #158).
+
+commit 7dc75721f38ce781db1b8d512d626024acf35b59
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Sep 20 16:28:33 2013 +0200
+
+ usb_signalling: Simplify symbols handling a bit.
+
+commit 5bb55598a1868113513f737b2714bcd6e48aa9b3
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Sep 20 16:22:33 2013 +0200
+
+ usb_signalling: Refactor/simplify bitrate/bitwidth handling.
+
+commit 7d4b5fac7abd39749900a2990f8d0b1b81edd20d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Sep 15 20:46:56 2013 +0200
+
+ usb_signalling: Fix start/end sample numbers.
+
+ This makes the decoder suitable for GUI usage.
+
+ This fixes bug #155.
+
+commit 69ada057e0a8ed086d89d976b1c78e22bea26a77
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Sep 15 20:07:03 2013 +0200
+
+ dcf77: Fix date parity check.
+
+ The parity check for certain DCF77 fields/bits was incorrect. It has to be
+ an even parity over bits 36-58. This is fixed now.
+
+ This fixes bug #157.
+
+commit 99f5e74a415f94e1de50475bb26c82fe2dc7c893
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Sep 15 18:12:45 2013 +0200
+
+ dcf77: Provide short and long annotations.
+
+commit 3e9b87f7817506371149b0dba5848c2519285c1a
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Sep 15 16:50:15 2013 +0200
+
+ dcf77: Fix multi-bit DCF77 field annotations.
+
+commit aa4cf4c629018a486dea560d639215c7beec2289
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Sep 15 16:39:59 2013 +0200
+
+ dcf77: Consistency renames.
+
+commit 54f1b2b7a7933d87151a8af5cab53bcd1e75fe4c
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Sep 15 16:33:32 2013 +0200
+
+ dcf77: Drop PON pin handling.
+
+ The PON pin is specific to the Pollin "DCF1 module", but has nothing to
+ do with DCF77 itself. Thus, drop it from this PD. It can be part of
+ another stacked PD if needed.
+
+ This fixes bug #153.
+
+commit 8a18c4e7629ca748c3975116255a0374cfb0a9e7
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Sep 15 16:31:00 2013 +0200
+
+ dcf77: Use proper annotations for DCF77 components.
+
+commit e3163b299981d708fcbd418c1c6dab8c4a0af559
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Sep 14 23:20:48 2013 +0200
+
+ dcf77: Fix bug in handling of DCF77 bit 0.
+
+commit 09bca51125c4f7916b9f35e49e4f83895abf01ed
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Sep 14 23:17:10 2013 +0200
+
+ dcf77: Fix start-/end-sample numbers.
+
+ This fixes bug #154.
+
+commit a250a66dddc795295d7758f09d40463ddaf62eb8
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Sep 14 20:28:40 2013 +0200
+
+ i2c: Drop unneeded 'addressing' option.
+
+ This (unimplemented so far) option is not needed at all, since the
+ decoder will be able to detect 7/10 bit slave addresses automatically,
+ the user doesn't have to specify slave address sizes.
+
+commit 9e95e4d85337965285d4814eb0c44837910b66f8
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Sep 14 20:10:01 2013 +0200
+
+ i2c: Drop obsolete TODOs.
+
+commit f1428c4cbd60be07322cc3129eaed716a269648b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Sep 14 19:07:20 2013 +0200
+
+ i2c: Move OUTPUT_PROTO docs to pd.py.
+
+commit 871b19d2c747c4baf2fcc3fbed6ca51e435a0e4a
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Sep 14 19:06:05 2013 +0200
+
+ i2c: Moved extensive protocol docs to the wiki.
+
+commit d94ff143ef7725388299ef9bd3be7ebc60e0dd2e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Sep 13 19:08:34 2013 +0200
+
+ i2c: Various fixes to make the PD suitable for GUIs.
+
+ The output format of the slave address is now a PD option. It can be
+ "shifted" or "unshifted", i.e. bit 0 (which contains a read/write
+ marker) is either shifted out or not, i.e., the slave address is
+ displayed as 8bit or 7bit number (or 11bit/10bit number for 10bit slave
+ addresses).
+
+ Data bytes (not address bytes) are always shown as 8bit values, of course.
+
+ Add annotation types for the individual I2C components such as
+ start conditions, stop conditions, ACK/NACK, address read/writes,
+ data read/writes and so on.
+
+ This fixes bug #151.
+
+commit 0702e0cf5a0577122c4008007151b6c3d798b0fb
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Sep 12 21:22:09 2013 +0200
+
+ spi: Add some documentation, move OUTPUT_PROTO docs.
+
+ Add a short help text for the PD and move the OUTPUT_PROTO docs to pd.py
+ since they're not meant for the user too see.
+
+commit efa641735217e5425f93e69cbaddf70d75c7e9e4
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Sep 12 21:19:55 2013 +0200
+
+ spi: Make CS# optional and use it if supplied.
+
+ The CS# pin is now optional, it can either be supplied to the PD or not.
+
+ If it _is_ supplied, reset the PD state every time it changes. This has
+ the effect that "incomplete" SPI frames and those where CS# is not
+ asserted are ignored and not decoded.
+
+ This fixes bug #152.
+
+commit 191ec8c5b7b6bb6b348a2c43b851923181fd68d8
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Sep 12 21:14:06 2013 +0200
+
+ spi: Refactor code, use a state machine.
+
+commit 29f8bb7b787ff8bc2a2e55d3de0b53452e73c6af
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Sep 12 21:05:22 2013 +0200
+
+ spi: Provide multiple annotation types.
+
+ For now SPI gets the following annotation types:
+
+ - MISO/MOSI SPI data
+ - MISO SPI data
+ - MOSI SPI data
+
+ (i.e. you can see either MISO, or MOSI, or both; the latter is most
+ useful for CLI usage)
+
+ Also, show the hex values as e.g. F5 (upper-case letters, no "0x" prefix).
+
+commit ec0afe27db7f6e2abdd2a712ca4bbc5c01debe67
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Sep 12 20:57:04 2013 +0200
+
+ spi: Fix start-/end-sample numbers.
+
+ This now makes the SPI decoder suitable for use in GUIs.
+
+ This fixes bug #150.
+
+commit 3eda7779a7db58d76f0512940da7f6d7e4339731
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Sep 12 20:45:02 2013 +0200
+
+ spi: Make data format a PD option, add annotation types.
+
+ The data format can be specified via the PD's "format" option now, it is
+ no longer an annotation type.
+
+ Also, add and use two annotation types: "Data" and "Warnings".
+
+commit 74c9bb3caa945409b3e8a68920f910e8363732fb
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Sep 12 16:36:25 2013 +0200
+
+ can: Use proper annotation types for the CAN fields.
+
+ This allows GUIs to show different fields in different colors.
+
+commit 6d6b32d6ca3610c07513137ee72e908e87e1c97b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Sep 12 09:40:40 2013 +0200
+
+ uart: Output data in separate RX and TX annotation types.
+
+ There is one annotation type for the RX side of the communication/data
+ output now, and another one for the TX side.
+
+ This allows GUIs to show them in two different traces, and/or show them in
+ the same trace but with different colors.
+
+ This also has the additional benefit that it is clear which databyte
+ belongs to which direction. Previously the annotations had to look like
+ "RX: 5F" or "TX: 11001011", but the "RX: " and "TX: " prefixes are now
+ no longer required, making the GUI traces (and CLI output too) much more
+ readable.
+
+commit 1f224555348ff440bdbd7014f66ac5ce44eb4d27
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Sep 12 09:32:28 2013 +0200
+
+ uart: Use same length for data output in all cases.
+
+ Until now you could get e.g. "d" or "df" as hex output from the UART PD.
+
+ This will now be a common-length "0D" and "DF". When all data byte
+ annotations are of the same lengths the readability in GUI traces is a lot
+ better. Also, hardcode hex characters to be upper-case (for now).
+
+ The same applies to oct ("021" instead of "21") and bin output
+ ("00001001" instead of "1001").
+
+commit 3a1803b09807eafba04c5e9fb0110d1c0d9f0eaf
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Sep 12 09:17:12 2013 +0200
+
+ uart: Put annotations into proper annotation types.
+
+ There are now extra annotation types for data, start/stop/parity bits and
+ for warnings (e.g. "invalid parity" or "frame error" or such).
+
+ This allows users to select which of the annotation types they want to
+ see (they can select one/multiple/all annotations as needed), and also
+ allows them to use different visual representation for the different
+ annotation types in GUIs (e.g. different colors for the blobs, different
+ fonts, rectangle/round/elliptic blobs, and so on; how the annotation
+ blobs are displayed is entirely up to the GUI and its configuration by
+ the user).
+
+commit 4cace3b8485ffd04ed5c07ee81be812c7284c37b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Sep 12 09:07:53 2013 +0200
+
+ uart: Move OUTPUT_PROTO format description to pd.py.
+
+ This is information that a user (when viewing PD info in a GUI/CLI)
+ should not see (and doesn't care to see), it is meant for developers only.
+
+ Thus, make it a comment in pd.py instead.
+
+commit 3091f4e048d5baab17863b49f34f7a5b5149d709
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Sep 12 09:01:52 2013 +0200
+
+ uart: Drop extensive protocol info (moved to wiki).
+
+ Move the full details of the protocol to the wiki, the docs in the PD
+ itself should only be a short description and/or a collection of notes
+ that could be useful for a user in a GUI (or CLI) to decide which
+ PD to select, which options to set how, what PDs to stack where, and so on.
+
+ The full protocol description (including photos, examples, ...) is here:
+
+ http://sigrok.org/wiki/Protocol_decoder:Uart
+
+commit 3006c663c9c2be8f476a0085d1d59319501b6303
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Sep 12 08:31:59 2013 +0200
+
+ uart: Make data format selection a PD option.
+
+ Until now we (ab)used annotation types for outputting the same data
+ (numbers) in different formats (hex, ascii, binary, and so on).
+
+ Turn this into a proper PD option, since annotation types should rather be
+ used for different _types_ of annotations (e.g. "CRC", "Stop bit",
+ "Preamble", "Sequence counter", "Warnings", and similar things), not
+ different _formats_ for the same annotation type.
+
+ Old sigrok-cli invocation for hex output:
+
+ sigrok-cli ... -P uart:rx=0:tx=1 -A uart=hex
+
+ New:
+
+ sigrok-cli ... -P uart:rx=0:tx=1:format=hex
+
+ In GUIs there is now a new "Data format" option where the user can
+ select the output format for UART data (default is 'ascii').
+
+commit 9f18eb6c7baad207a15c6efcfedf751838b8000e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Sep 12 08:20:03 2013 +0200
+
+ uart: Use T for stop bit, P for parity bit.
+
+ The short(est) annotations for "Stop bit" and "Parity bit" have both
+ been "P" until now, which is confusing for users (on certain zoom levels
+ in GUIs). Use "T" for stop bits now instead.
+
+commit 9300bc22bad033204d369884b0f548b1e2a9bc59
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Sep 11 19:53:31 2013 +0200
+
+ uart: Don't prefix databyte output numbers.
+
+ Previously the output was 0x41 or 0o101 or 0b1000001, now it is 41 or
+ 101 or 1000001. We drop these prefixes, since they decrease the readability
+ of the PD output (especially when displayed in GUIs) and are not needed
+ anyway since the user knowingly selected the number format before running
+ the respective PD.
+
+commit 83be7b8384e0dc20b84de831e5922fb9c6d0762d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Sep 11 19:20:15 2013 +0200
+
+ uart: Fix corner-case that can occur with LA triggers.
+
+ Assume that the initial pin state is 1/high for the RX and TX lines.
+
+ This fixes the decode when an LA triggers on e.g. TX=low (the first
+ sample would be low in that case, so the falling edge for the start bit
+ would be missed by the decoder).
+
+commit 15ac66048e7dcd9c6a0ddbfc5cab2e56f95b3f56
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Sep 11 19:15:51 2013 +0200
+
+ uart: Fix start-/end-sample numbers.
+
+ This now makes the UART decoder suitable for use in GUIs.
+
+ This fixes bug #148.
+
+commit 534ae91250fed49eb22ad7400e8b6c520aadc461
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Sep 10 09:33:11 2013 +0200
+
+ can: Use annotation abbreviations.
+
+ Supply long, middle, and short versions for most annotations, so that
+ GUIs can show nicely readable and useful annotations on various zoom
+ levels.
+
+commit 4b1813b4bc93a0b456f884c8de9f71df4bde6a39
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Sep 9 21:48:42 2013 +0200
+
+ can: Fix annotation start/end samples.
+
+ With this change pretty much all CAN annotations that are currently
+ output should have the correct values, including single-bit and
+ multi-bit fields, standard and extended CAN frames, and so on.
+
+ This fixes #146.
+
+commit e20f455cbc52684d177a42153fa9be931077a338
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Sep 9 19:38:38 2013 +0200
+
+ can: Prepare for fixing annotation start/end samples.
+
+commit 95097f3108033f69c19a315a7d042383b7295628
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Sep 8 15:16:11 2013 +0200
+
+ i2c: Fix corner-case that can occur with LA triggers.
+
+ Until now the I2C PD was basically ignoring the very first sample, and
+ using that as the initial 'oldscl'/'oldsda' value.
+
+ However, if your logic analyzers trigger on, say, SDA=low that will
+ result in a file where the first sample is really important since it
+ is the one which the PD will need to know that there's a falling edge
+ on SDA.
+
+ Thus, assume both SCL and SDA are high/1 when the PD starts. This is
+ a good assumption since both pins have pullups on them in practice
+ and are thus high/1 when the bus is idle.
+
+ Later on we might want to have config options to let the PD assume
+ other states of SDA/SCL initially.
+
+commit b055603b3ff59be1497b96a1a22da262b8753d75
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date: Tue Sep 3 16:36:44 2013 +0100
+
+ i2s: Fixed annotation sample numbers
+
+commit 84f33bc71163b4a233f51cf64912a5a8f65d7565
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Aug 15 17:12:33 2013 +0200
+
+ pan1321: Improve commands documentation.
+
+commit b1f2d25f16636caa9d6a8d0715c772040b3dc68c
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Aug 9 20:17:03 2013 +0200
+
+ pan1321: Initial JSDA support.
+
+commit 2d3f496e293b85a1f702355bf7fd275ae2f31455
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Aug 9 19:19:00 2013 +0200
+
+ pan1321: Add support for JAAC.
+
+commit 72a6cad40c4df6e5e45216cd5f77d1b195168359
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Aug 9 19:13:20 2013 +0200
+
+ pan1321: Properly check for \r\n, not just \n.
+
+commit db9ebbc2143f4b744b273ed0d5bbfd4b02aa8db9
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Aug 9 19:11:08 2013 +0200
+
+ pan1321: Code simplifications.
+
+commit 6bbd2a8afb1daa76bc14866c2c1a345b1cea5e44
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Aug 4 14:24:40 2013 +0200
+
+ pan1321: Add warnings for invalid protocol usage.
+
+commit 5b2b0b0d88b19301e744e0a84df3bad91c5e28d5
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Aug 4 14:15:33 2013 +0200
+
+ pan1321: Support JSEC and JPRO.
+
+commit 2994587f98f205bb8847554bd28483532b277f2c
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Sep 1 18:20:36 2013 +0200
+
+ Use frontend-registered callback with correct parameters
+
+commit 845f0d4031780220451037e87885e1ff79670976
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sat Aug 31 11:18:49 2013 +0200
+
+ xfp: Decoder for XFP I2C structures
+
+commit 5ab72981db9f1573d52db87d218f024fec6c8723
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sat Aug 31 11:17:02 2013 +0200
+
+ Ignore __pycache__ entries
+
+commit 1cb844734958781fea47b7884db6e56d8a83c000
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Aug 13 21:30:04 2013 +0200
+
+ lpc: Bugfix: Sample data at rising clock edges.
+
+commit cded73ba6a9a2095d06e92912a7e6f6ccb22307e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Aug 13 21:06:03 2013 +0200
+
+ lpc: Various fixes to make the PD actually work.
+
+commit b88e336b86493ee3d893f563d1d847d901f8ce07
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu May 23 11:24:25 2013 +0200
+
+ Fix double free
+
+commit ca3fc3c0c042ecf509f8218e417655c04c9b9831
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed May 8 22:25:37 2013 +0200
+
+ Fix double free
+
+commit 3abc83b996547a69bad906ec748f30874aae4796
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed May 8 16:46:07 2013 +0200
+
+ Doxyfile: Set version to "unreleased development snapshot".
+
+commit e592ac8917d17665119b3647b5eae27fa387d6de
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun May 5 17:20:13 2013 +0200
+
+ Fix various memory leaks
+
+commit 47dfa77d472795e6b5ad2ec3f3588a9619aec70f
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri May 3 23:51:35 2013 +0200
+
+ Use enums for error codes and loglevels as in libsigrok.
+
+commit cdf156ba36def94a86453b017054470ee9ae7608
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri May 3 23:28:10 2013 +0200
+
+ Add srd_strerror() and srd_strerror_name().
+
+commit 30b770d5375522bd014502b9348aff3ee36e830d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri May 3 23:09:53 2013 +0200
+
+ libsigrokdecode-internal.h: Cosmetics.
+
+commit 3d0530ef2115b56d3750c3557a0d45bd3831b7c6
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri May 3 21:37:54 2013 +0200
+
+ NEWS: Minor updates.
+
+commit 4cc0d9fe8d4f0b8d7d92aab6d5d63bf143fbe264
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri May 3 21:21:30 2013 +0200
+
+ Doxygen: Various fixes.
+
+commit c1f86f02a149f46609273e1bd5b42696d544727a
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri May 3 14:49:21 2013 +0200
+
+ Main header is <libsigrokdecode/libsigrokdecode.h> now.
+
+ This matches the convention used in libsigrok. Potential other headers
+ might end up in libsigrokdecode/, but only libsigrokdecode.h is meant
+ to be #included by frontends directly.
+
+commit 8c664ca2d7b4faffa7b3dbeb3b9e491976c24eee
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri May 3 14:45:49 2013 +0200
+
+ Doxygen: Add @since markers to API functions.
+
+ Also, document the functions in version.c.
+
+commit f11e9498c83d4b27ffc1029f6dbd7ef871953aca
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri May 3 14:31:11 2013 +0200
+
+ HACKING: Document the @since Doxygen tag.
+
+commit 0a7ae201ca82293fe3bb413cdddf7bcf9b0f42da
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri May 3 14:22:01 2013 +0200
+
+ Doxyfile: Set version number to 0.2.0.
+
+commit 10b3851672d9047941079bca052751855f5ea5fa
+Author: Bert Vermeulen <bert at biot.com>
+Date: Fri May 3 11:20:06 2013 +0200
+
+ Update package version to new 0.2.0 release
+
+commit 50bd5d259677faf87bb3408e111d0e833d7ba9b4
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Apr 23 22:27:20 2013 +0200
+
+ GPL headers: Use correct project name.
+
+commit cab2b4eb7fc8ba1cbe3f48a662bd636facf965ab
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Apr 15 12:21:04 2013 +0200
+
+ configure.ac: Show $build, $host, and lib versions.
+
+commit 307fcf90e9e537e97c4621bb3ba8f276a0f5d548
+Author: Peter Stuge <peter at stuge.se>
+Date: Sat Apr 6 15:01:25 2013 +0200
+
+ configure.ac: Look for python-config-3.x besides python3.x-config.
+
+commit 3e1a99c0f8c5e9ace4748ff818146a70b9549092
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Mar 20 00:03:03 2013 +0100
+
+ README: Add "Copyright and license" section.
+
+commit 2f395bff8f096ef738140913e2d01ff0a8c07002
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Mar 19 01:47:53 2013 +0100
+
+ use GVariant for passing decoder options and probes
+
+ Decoder options are now exposed in struct srd_decoder, via a GSList
+ of the new struct srd_decoder_option. The 'def' field represents
+ the default value as set in the decoder, converted to GVariant. This
+ allows a library user to determine the type as well as default value.
+
+commit 0ff2d191726ef2e5a30ce697c7c93e4b0b1605f3
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Mar 19 01:01:25 2013 +0100
+
+ code cleanup
+
+commit 47198f313a3c3e6431f5896fae3fb556f38746ed
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Mar 17 13:21:35 2013 +0100
+
+ configure.ac: Drop std-options, unneeded.
+
+ The automake 'std-options' option checks whether all installed tools
+ and scripts have a --help and --version CLI option. This check is not
+ needed for libsigrokdecode though, since it doesn't install any tools.
+
+commit d5a4209da3f3dc35bb3f262818a46c19b524c711
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Mar 17 12:53:49 2013 +0100
+
+ README: Refer to INSTALL and new Building wiki page.
+
+commit 8b97d010eff4f87732c9a82e3f8c9e624295f4ff
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Mar 12 15:12:09 2013 +0100
+
+ ds1307: Fix date/day-of-week printing.
+
+commit 3bf689988fc1e8db9cb3997039b06f683c413fc1
+Author: Matt Ranostay <mranostay at gmail.com>
+Date: Mon Mar 11 08:03:20 2013 +0000
+
+ Add Dallas DS1307 RTC protocol decoder
+
+ Dallas DS1307 RTC protocol decoder that works stacked
+ with the I2C PD. Based on the rtc8564 protocol decoder.
+
+ Signed-off-by: Matt Ranostay <mranostay at gmail.com>
+
+commit 4895418c6800ecb128ed36af2a1bc46916c9be85
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Feb 9 22:25:15 2013 +0100
+
+ Doxygen: Initial groups and topic short descriptions.
+
+commit 54fdeeefffe31d32dddaf0f3d6a99dc7b3bc2448
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Feb 9 22:10:57 2013 +0100
+
+ Doxygen: Add @file items for the relevant files.
+
+ These short descriptions are shown in the "Files" section of the
+ Doxygen output.
+
+commit 57790bc8c558ccf2e57b3d973c043088232628c7
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Feb 9 21:44:11 2013 +0100
+
+ Doxygen: Mark private functions/variables properly.
+
+commit 31e615a50b34f67bdf5562ad887415b2ec8796c8
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Feb 9 21:43:46 2013 +0100
+
+ Doxygen: Document how to mark private stuff.
+
+commit d7dae84b94b597458f1dce0c126e31d5697234e6
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Feb 9 21:32:31 2013 +0100
+
+ Doxygen: Add intro section and some docs.
+
+commit 5d24bb216924e92c25202fc7f48dd0bcc5b88655
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Feb 9 21:07:53 2013 +0100
+
+ Add contrib/sigrok-logo-notext.png.
+
+ This is used in the generated Doxygen HTML output.
+
+commit c1507ca92d4161f7895993988f70f6549a9f7f7a
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Feb 9 21:03:08 2013 +0100
+
+ Doxyfile: Update to match the libsigrok file/settings.
+
+ This uses a template generated by Doyxgen 1.8.1.2 (like libsigrok
+ currently does) and adapts it to libsigrokdecode needs.
+
+commit cf3a952add0bc2b7d6631c65e4ad667dc9ac8d65
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Feb 2 12:19:22 2013 +0100
+
+ .gitignore: Add INSTALL (copied by automake).
+
+commit 38ff5046e8344940601f2b9eb5d8dbfbef975c30
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Feb 2 12:18:29 2013 +0100
+
+ Bring back temporarily reverted changes.
+
+commit de5a05f120d6d7f1e20265e9e264ac859c9c5020
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jan 30 01:16:35 2013 +0100
+
+ can: Temporary quickfix for a bug.
+
+commit d71834acaacc7fd8af6e7293231ecd7cd2743ccf
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Jan 21 00:59:59 2013 +0100
+
+ Update package version to new 0.1.1 release.
+
+commit 2b7c61d605a79206779d2ebb4336b9765f54881c
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Jan 21 00:50:14 2013 +0100
+
+ Update libtool version numbers for libsigrokdecode.
+
+ The last release of libsigrokdecode (package version number 0.1.0) had the
+ initial libtool version numbers (current:revision:age) of 0:0:0.
+
+ The upcoming release (0.1.1) is API-compatible with 0.1.0 and can be used
+ as drop-in replacement. Programs linked against 0.1.0 do not need to
+ be recompiled or relinked.
+
+ As per the libtool guidelines this release only increments the
+ libtool "revision" number. The new libtool version numbers
+ (current:revision:age) are thus 0:1:0.
+
+ See here for details:
+ http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
+
+commit a860b7cccbed7b52feeb6b37c81d5984ce37baa8
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Jan 21 00:39:53 2013 +0100
+
+ NEWS: Various updates.
+
+commit 1c9ac10f4b2c6e83184fe29bd32e090fcac211e7
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Jan 20 21:46:42 2013 +0100
+
+ Minor autotools improvements.
+
+ - Don't use "foreign" option for automake. Without this automake will
+ perform some additional sanity checks e.g. on missing files. It will also
+ now add the usual INSTALL file which documents the configure options etc.
+
+ - Add AUTHORS file.
+
+ - Add 'check-news' automake option, which will abort 'make dist' if
+ the NEWS file doesn't list the current (to be released) package
+ version at the top (i.e., if we forget to update NEWS).
+
+commit 322c6b2fb36aaa38967ca797acef0ebb1f3090e6
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Jan 20 21:26:45 2013 +0100
+
+ Temporarily revert API changes in preparation of release.
+
+ The upcoming libsigrokdecode release should not contain any API changes
+ so it is compatible with existing released frontends (sigrok-cli 0.3.1).
+
+commit 6d333fd65c41f7bf6470d0b6ada88efee4777f59
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 19 21:23:25 2013 +0100
+
+ configure.ac: Drop AC_PROG_CXX.
+
+ We don't need a C++ compiler for libsigrokdecode, so don't check for one.
+
+ This would cause a build failure on all systems where there is a C compiler
+ but no C++ compiler installed.
+
+commit 7560e16c17b9616e2ab6ae39a65c550b061889fd
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 19 16:38:46 2013 +0100
+
+ Lower glib-2.0 requirement to 2.24.0.
+
+ We don't use any of the recent glib features in libsigrokdecode, it
+ compiles fine with 2.24.x.
+
+commit 96732f09031ba9434ff7542e5b88834ab16db611
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Jan 7 23:11:22 2013 +0100
+
+ Makefile.am: Fix typo in 'ChangeLog' target.
+
+commit d523eae6e0617e6ad5055738ea4864deacae4313
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Jan 7 22:30:17 2013 +0100
+
+ Cosmetics, fix typos.
+
+commit 90a31a01c5afe1a51dbe6b5e90a88e54adfe7d1c
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Jan 7 22:25:33 2013 +0100
+
+ NEWS: Add list of user-visible changes so far.
+
+commit 9e1437a045ef0c7df7e847be148fac6b4c0bbb4b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Jan 1 19:11:13 2013 +0100
+
+ Small cosmetic/consistency fixes in the PDs.
+
+commit 42515b0f25613499167b66c1d8a659526fb46b8d
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Jan 1 13:04:16 2013 +0100
+
+ constify srd_decoder_list() output
+
+commit c78eeef14ff4c23d021adf7c439ea173a651db7e
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Jan 1 01:09:46 2013 +0100
+
+ srd_inst_new() options can be NULL
+
+commit 2218c267081268865fc90ee607c4c6ced541bfed
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Dec 28 17:16:19 2012 +0100
+
+ Fix compiler warning.
+
+commit 4bd77045bbad0aa6bdb8172d396a8cea7225c07e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Dec 28 17:12:19 2012 +0100
+
+ configure.ac: Add missing -fvisibility=hidden to CFLAGS.
+
+commit 6ff4cd08a0e6d29dd7587173defb8bf17c0d9b62
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Dec 28 17:03:20 2012 +0100
+
+ configure.ac: Fix CFLAGS settings.
+
+ Don't override/overwrite CFLAGS in configure.ac, but rather amend it
+ with (currently) "-Wall -Wextra".
+
+ This properly allows users/packagers to do things like:
+
+ ./configure (this will default to using "-g -O2" additionally)
+
+ CFLAGS="-g -O2" ./configure (same as above)
+
+ CFLAGS="" ./configure (no additional flags)
+
+ CFLAGS="-g -O0" ./configure (disable optimization, e.g. for valgrind use)
+
+ etc. etc.
+
+commit 702fa251997d8e6ac4f71837e1e89d3d537df42a
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Nov 28 19:06:17 2012 +0100
+
+ Add intial CAN protocol decoder.
+
+commit 2b7e4c8b89d60394c186e73f55411d565d13abf6
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Dec 12 19:45:52 2012 +0100
+
+ configure.ac: Also check for python3.3-config.
+
+commit f2e114dedd0456eee1858b1fc9d129b70b1d627a
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Nov 21 22:56:01 2012 +0100
+
+ mlx90614: "Kelvin", not "degrees Kelvin".
+
+commit 0eeeb544e1ea3cef9669f98e7c0b19b8f73a9236
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Nov 21 22:51:31 2012 +0100
+
+ Fix bugs in "Invalid state" printing/exceptions.
+
+commit 24c74fd30fb161837c5f8b01baf3c0fe2dfa4ed5
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Nov 21 22:43:02 2012 +0100
+
+ All PDs: Name the files pd.py consistently.
+
+ The Python module name is determined by the directory name (e.g. dcf77),
+ the *.py file names in that directory don't matter and can be kept
+ consistent.
+
+commit 23f999aa996e54cd73cb54d5e254d1445d65847d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Nov 21 22:29:43 2012 +0100
+
+ configure.ac/Makefile.am: Alphabetical order.
+
+commit 17db40087cb0b4ed76ee26cbc69458f598630fc6
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Nov 21 22:27:13 2012 +0100
+
+ tlc5620: Refactoring, add initial LOAD support.
+
+commit 92d1aba34bbe661b388e874fda0a41f477d3e30d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Nov 20 16:32:02 2012 +0100
+
+ Initial TI TLC5620 (8-bit quad DAC) protocol decoder.
+
+commit 1859c4804d04b58ba15a316eb16035c6bbb611fe
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Oct 16 14:44:15 2012 +0200
+
+ Re-add HACKING file after repo split.
+
+commit 55e5c4e10d5d3f18d7f42ea6415782461ff55123
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Oct 13 15:49:09 2012 +0200
+
+ Small update for the pkg-config files and Windows.
+
+ On Windows, cmake-using projects seem to have problems with the
+ "-I/c/Python32/include" syntax we have in the libsigrokdecode .pc file.
+
+ However, "-Ic:/Python32/include" works fine. So we just add both to
+ support everything.
+
+commit e0af499b4f5840190807636e536e1fb4956f71a9
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Oct 11 00:38:38 2012 +0200
+
+ README: Update repo URL.
+
+commit 6fe6b38cbc3075ebfe4527d07367f8a37c40418d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Oct 11 00:34:27 2012 +0200
+
+ .gitignore: Add missing entries.
+
+commit d3b034e68fe544f823d66ead4c1561a33c9f135d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Oct 10 23:37:19 2012 +0200
+
+ README: Add status, update URL, small fixes.
+
+commit b08272363131621c7571a02ac752e727e0ed54df
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Aug 31 11:34:46 2012 +0200
+
+ srd: uart: Fix regression.
+
+ Thanks Iztok Jeras <iztok.jeras at gmail.com> for the report.
+
+commit 47ec18f56d174fbfc6cba9ff76c80518aa90cc46
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Jul 31 23:48:13 2012 +0200
+
+ Add initial SD card (SPI mode) decoder.
+
+ This is work in progress, but it already works partially, and can be used
+ for actual decodes of some commands.
+
+ This PD stacks on top of the SPI protocol decoder.
+
+commit f84d82c0aba0d249c085efa9532761941d0792b2
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jul 28 18:14:21 2012 +0200
+
+ srd: lm75: s/degrees Kelvin/Kelvin/.
+
+ The temperature unit is nowadays called just "Kelvin", not
+ "degrees Kelvin" (even though this was not always the case).
+
+commit 1fd698dcf076c62e53e089be50572efae6b68f15
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jul 28 17:39:38 2012 +0200
+
+ srd: avr_isp: Improve Chip Erase handling.
+
+commit 77adad943111ab064f01838033dc9c94152f46c7
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jul 28 10:51:32 2012 +0200
+
+ srd: avr_isp: Factor out part numbers/names to part.py.
+
+commit 3bd76451f01dface8df58828a2bbc242d3391db9
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jul 26 18:55:02 2012 +0200
+
+ srd: Initial decoder for AVR ISP protocol.
+
+commit 1fe967f266313f26f76f5b94800aad64dfdb3f5b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jul 21 21:58:20 2012 +0200
+
+ srd: onewire_link: Annotations shouldn't be ALLCAPS.
+
+ While states in the PD should be ALLCAPS per guidelines (for
+ consistency), the annotations that a PD outputs (and are shown in a
+ console via sigrok-cli or in a GUI) should be "normal" human-readable
+ text/formatting usually, i.e. not ALLCAPS.
+
+commit 500560a16ed5ea35def72714d1e38a92dd74f5be
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jul 21 21:31:04 2012 +0200
+
+ srd: maxim_ds28ea00: Factor out putx(), small fixes.
+
+commit c07cbb92b129bef7a279169e1d7312811ee5e83f
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jul 21 21:21:51 2012 +0200
+
+ srd: maxim_ds28ea00: Cosmetics, cleanups.
+
+commit 0afa64aefc96649c74770dbcbbcfb5934d99fe18
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jul 21 21:04:20 2012 +0200
+
+ srd: maxim_ds28ea00: Fix to only handle DS28EA00.
+
+commit 19dd61efcc1fe07c6a66f48f74b7926607f3a541
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jul 21 20:37:41 2012 +0200
+
+ srd: Rename onewire_transport to maxim_ds28ea00.
+
+ It doesn't make sense to have one "generic" onewire_transport PD, as
+ this layer is very much device-specific and such a generic PD would
+ have to contain an accumulation of all possible features and commands
+ and handling code of all existing (now and in the future) 1-Wire
+ devices, which is neither possible nor useful nor elegant.
+
+ There are (for example) 1-Wire thermometers, RTCs, EEPROMs,
+ special-purpose security chips with passwords/keys, battery monitoring
+ chips, and many many others. They all have a different set of features,
+ commands and command codes, RAM areas/sizes/partitioning/contents,
+ protocols, and so on.
+
+ Thus, the layering for 1-Wire PD stacks should look like this:
+
+ onewire_link -> onewire_network -> <specificdevice>
+
+ Examples:
+
+ onewire_link -> onewire_network -> maxim_ds28ea00 (special thermometer)
+ onewire_link -> onewire_network -> maxim_ds2431 (1kbit EEPROM)
+ onewire_link -> onewire_network -> maxim_ds2417 (RTC)
+ onewire_link -> onewire_network -> maxim_ds2762 (battery monitor)
+ onewire_link -> onewire_network -> maxim_ds1961s (SHA-1 eCash iButton)
+ and so on...
+
+ So, renaming onewire_transport to maxim_ds28ea00. The non-DS28EA00
+ specific code will be dropped and/or moved to other PDs on top of
+ onewire_network later.
+
+commit 5d7c5bcca4f770280cd4b58a8ea383fe97cf4a32
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jul 21 20:36:07 2012 +0200
+
+ srd: onewire_network: Fix typo, command is 0x69.
+
+ The 'Overdrive match ROM' command is 0x69, not 0x6d. Verified in various
+ datasheets and the original 1-Wire/iButton spec.
+
+commit 3f302d519e813af30a796a16f84e688550827ae0
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jul 21 19:16:16 2012 +0200
+
+ srd: onewire_link/network: Fix annotations, small cleanups.
+
+ The annotation types are 'Text' and 'Warnings', not 'Link' etc. as the
+ annotations of the onewire_link PD (for example) are already clearly
+ from the link layer. The annotation types should be different things/formats
+ of a specific PD's annotation output instead (like "Celsius" / "Kelvin"
+ for some temperature sensor, for example).
+
+commit 48b5974694d0a587f3d7bc9c58a2cc5bf917f644
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jul 19 21:40:40 2012 +0200
+
+ srd: onewire_link/network: Reduce nesting level.
+
+ Also, some additional cleanups.
+
+commit 6188e4e41ef0d9468a1b9f9bad5637ca862d73df
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jul 19 21:26:50 2012 +0200
+
+ srd: onewire_network: Cosmetics, simplifications, doc fixes.
+
+commit e7720d6c73eb981e57753c9028fa3e9019676c50
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jul 18 22:16:19 2012 +0200
+
+ srd: onewire_link: Cosmetics, simplifications, doc fixes.
+
+commit 4dfff747ed380c8cda9410b5a7d3d97c59a64a9a
+Author: Iztok Jeras <iztok.jeras at gmail.com>
+Date: Tue Jul 17 21:50:08 2012 +0200
+
+ onewire: fixed an issue caused by renaming a transport layer command
+
+commit 758d2ea98ad32adca6d1b76b982ec101ad363ac7
+Author: Iztok Jeras <iztok.jeras at gmail.com>
+Date: Tue Jul 17 21:42:53 2012 +0200
+
+ onewire: added new transport layer commands
+
+commit 4633e258a4885a455a82c32548f7bb4d4b293e2e
+Author: Iztok Jeras <iztok.jeras at gmail.com>
+Date: Tue Jul 17 19:33:44 2012 +0200
+
+ onewire: updated documentation
+
+commit a81787f62362e7ab8471c4c01baa6a806d624d58
+Author: Iztok Jeras <iztok.jeras at gmail.com>
+Date: Sun Jul 15 17:46:20 2012 +0200
+
+ onewire: added transport layer decoder, it does not do much for now
+
+commit 671cc3009b967bd105757d0a0c267a68f18c58b9
+Author: Iztok Jeras <iztok.jeras at gmail.com>
+Date: Fri Jul 13 23:55:44 2012 +0200
+
+ onewire: updates to link layer timing
+
+commit e540618c9d8d04ebb2e639ad1e650d689c89a818
+Author: Iztok Jeras <iztok.jeras at gmail.com>
+Date: Fri Jul 13 22:59:12 2012 +0200
+
+ onewire: combined reset and presence detect events, avoid unneeded overdrive exit message
+
+commit 99f5f3b5ac31347795582872a5d92f3d9430c21d
+Author: Iztok Jeras <iztok.jeras at gmail.com>
+Date: Tue Jul 10 23:14:35 2012 +0200
+
+ onewire: the split of the protocol into layers works now
+
+commit 9cfb16e8532e34b40edf1d980c7438afb31668e0
+Author: Iztok Jeras <iztok.jeras at gmail.com>
+Date: Tue Jul 10 22:06:58 2012 +0200
+
+ onewire: placing protocol layers into separate directories
+
+commit d37961b0c723abba3d70c9ef1a94f78bf4245f7d
+Author: Iztok Jeras <iztok.jeras at gmail.com>
+Date: Mon Jul 9 23:29:34 2012 +0200
+
+ onewire: preparations for protocol separation between link and network layers
+
+commit bcf36fc8681c2184b81601449c5fde25251e45cb
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jul 11 22:27:07 2012 +0200
+
+ srd: Drop 'usb' PD, replaced by two others.
+
+ The new 'usb_signalling' and the 'usb_protocol' PD which stacks on top
+ of it, replace the old 'usb' decoder.
+
+commit 2fcd7c22852436c3226de9007e88cb305cce1b00
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jul 11 22:19:31 2012 +0200
+
+ srd: Performance improvements for various PDs.
+
+ Ignore/skip identical samples in most (low-level) PDs, as we're usually
+ (but not necessarily always) only interested in pin changes.
+
+ This yields a significant performance improvement for the PDs.
+
+ The mechanism was already used in the 'i2s', 'jtag', and 'lpc' PDs, but not
+ yet in all supported low-level decoders. The following PDs now also use
+ this mechanism: 'dcf77', 'i2c', 'spi', 'uart', and 'usb_signalling'.
+
+ Thanks Lars-Peter Clausen <lars at metafoo.de> for bringing this to our
+ attention.
+
+commit b5d3ea69628d49ab5b26e064559f7a237b46c086
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jul 4 22:03:34 2012 +0200
+
+ srd: lm75: Output min/max/avg temperature in report().
+
+ This is just a preparation for later, the report() is not hooked up
+ anywhere, yet.
+
+commit 86aac5f0a866f7a5bf5280ea44a291549554d661
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jul 4 19:52:29 2012 +0200
+
+ srd: lm75: Warn about temperature reg. being read-only.
+
+commit 5b30440e7eea86e4d7e5ebc40aa738faf4899970
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jul 4 19:35:59 2012 +0200
+
+ srd: lm75: Generic handling of register reads/writes.
+
+commit ffcfb70e83f3f001bf4751b5920db96d40b23c4f
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jul 4 01:58:46 2012 +0200
+
+ srd: onewire: Fix copyright line, and PD name/description.
+
+commit f4d0363dc492cebc3bc37adfbffaff6fafd55ff4
+Author: Iztok Jeras <iztok.jeras at gmail.com>
+Date: Mon Jul 2 23:54:52 2012 +0200
+
+ some white space changes, changed handling of normal/overdrive timing, annotations now show duration
+
+commit a2b13347895840f5e79238f504e0b6e322c133a1
+Author: Iztok Jeras <iztok.jeras at gmail.com>
+Date: Sun Jul 1 18:35:43 2012 +0200
+
+ added some ducumentation, shortened the ROM command decoder code
+
+commit c08aea7e835a60f86e65c3b05bc8edff763c87a9
+Author: Iztok Jeras <iztok.jeras at gmail.com>
+Date: Sat Jun 30 22:09:47 2012 +0200
+
+ added some untested overdrive functionality, added some comments, modified timing values in annotations
+
+commit 41e5c645a828eec6d1df30cc1e5840027cf787b2
+Author: Iztok Jeras <iztok.jeras at gmail.com>
+Date: Thu Jun 28 23:07:16 2012 +0200
+
+ commented out most of the TRANSPORT layer code, added some code for an improved timing calculation
+
+commit 13329e2d81e17bd3aa1b48a5197f892f825abd2d
+Author: Iztok Jeras <iztok.jeras at gmail.com>
+Date: Tue Jun 26 00:42:03 2012 +0200
+
+ decoder onewire: added conditional network commands, some fixex to the transport layer
+
+commit af5ec813b0bc118e28c04d6b61e110a2117002a8
+Author: Iztok Jeras <iztok.jeras at gmail.com>
+Date: Mon Jun 25 22:03:37 2012 +0200
+
+ decoder onewire: separated transport layer code from network layer
+
+commit 0bd62eb1ffc0b1611f88c2cbf8e59b4be183113b
+Author: Iztok Jeras <iztok.jeras at gmail.com>
+Date: Mon Jun 25 21:27:02 2012 +0200
+
+ decoder onewire: some annotation cleanup
+
+commit de2f532821bab1bef235ee65b38b0f4427bb9d5c
+Author: Iztok Jeras <iztok.jeras at gmail.com>
+Date: Sat Jun 23 22:06:47 2012 +0200
+
+ onewire decoder: removed some debug code, preparations for the next protocol layer
+
+commit d2b6e141c5c6707897b19cfd7ccf4f3ffd21d501
+Author: Iztok Jeras <iztok.jeras at gmail.com>
+Date: Sat Jun 23 21:29:03 2012 +0200
+
+ onewire decoder: added search support
+
+commit cf0f9df0a3a37f996a89d33098086cbaa3c27a5d
+Author: Iztok Jeras <iztok.jeras at gmail.com>
+Date: Sat Jun 23 18:06:09 2012 +0200
+
+ onewire decoder: added some byte related code
+
+commit af6237856ef92e64f7eb0f7d150ee1e3785026cc
+Author: Iztok Jeras <iztok.jeras at gmail.com>
+Date: Sat Jun 2 20:06:45 2012 +0200
+
+ some fixex to the link layer, not final
+
+commit 0631e33dc11b621914af0e76a1864567557ebdc4
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jul 4 01:19:35 2012 +0200
+
+ unfinished update to onewire protocol decoder
+
+commit 48eee789a15ebd4c26d469a29dd79e7971f031fe
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jun 28 21:43:12 2012 +0200
+
+ srd: i2cfilter: Output actual I2C packets.
+
+ Change this PD from an I2C->databytes converter/filter to an actual
+ pure I2C filter in the sense that both input and output is a valid I2C
+ protocol stream.
+
+ Also, change the EDID decoder accordingly, to use the new i2cfilter
+ output.
+
+commit 44f7ba18ee64fc89d0f69619076ff28a8bc6b31a
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jun 27 20:02:25 2012 +0200
+
+ srd: Add National LM75 protocol decoder.
+
+ This shall support the original National LM75 I2C-based temperature sensor,
+ as well as various compatible devices of other vendors, such as the
+ Fairchild FM75, Dallas DS75, and so on.
+
+ Currently only 9bit resolution is supported, and not all commands are
+ decoded, yet. The register contents and temperatures are decoded
+ correctly though, and can be output in both Celsius and Kelvin.
+
+commit 387b6e3bb4340e20c978a8c47037d0bea9cca3c0
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sat Jun 23 01:17:36 2012 +0200
+
+ sr/srd/cli: require glib version >= 2.28
+
+ Needed for g_get_monotonic_time(). Thanks to Tomaž Šolc.
+
+commit 2dc6d41c64a8235308e61b4f9b509c7fecb2b502
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Jun 19 17:29:18 2012 +0200
+
+ srd: Split USB decoder in two PDs (which stack).
+
+ The 'usb_signalling' decoder just decodes symbols from D+/D- levels,
+ handles bit stuffing and outputs the symbols and (potential) packets.
+
+ The 'usb_protocol' decoder takes that output and tried to parse USB
+ packets from it (SOF, SETUP, IN, OUT, DATA0, and so on).
+ This is the base decoder on top of which various others will stack
+ later on.
+
+ The two new PDs are work in progress, so we still keep the old 'usb' PD
+ around for a little while, until the two new ones are fully working and
+ well-tested.
+
+commit 3cf771a5179d94a156bef1aa95d7e05411dc82e2
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Jun 15 15:21:06 2012 +0200
+
+ srd: usb: Add long description of the PIDs.
+
+ Also, add missing ones which are mentioned in the USB spec. However, not
+ all may be relevant for LS/FS signalling. But they're still useful to
+ have in the table, so we can output warnings like
+
+ "Warning: HS PID encountered, but device is FS???"
+
+commit c2937021535a0ef11f2905e47447da3b589c65e3
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jun 14 22:46:52 2012 +0200
+
+ srd: usb: Preliminary USB low-speed support.
+
+ Some of the differences of USB low-speed (compared to full-speed) are:
+
+ - 1.5Mb/s datarate, not 12MBit/s.
+ - The J and K states are swapped/inverted.
+
+ Note: This is work in progress, further changes may still be needed.
+
+ Add a 'signalling' option, which allows the user to select whether the
+ PD should decode using the low-speed or full-speed signalling protocol.
+ If unspecified, the default is full-speed.
+
+commit 274e98d684d342ec307cce05ed878c21c3161ef4
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jun 14 02:06:36 2012 +0200
+
+ srd: uart_dump: Small simplification.
+
+commit c1c1d34feecda97ab42fb7c3b9f7cb8a6fed190e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jun 14 02:02:42 2012 +0200
+
+ srd: uart_dump: Fix file output (flush).
+
+ We need to flush the file output buffer(s), lacking a stop() call in
+ PDs at the moment, which could do the flush (or file close()) only once
+ at the end of the PD "session".
+
+commit a0153e903ba04cf9e6eb8c8a501508f4606efa6b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jun 14 01:14:10 2012 +0200
+
+ srd: Add experimental uart_dump decoder.
+
+ This PD stacks on top of the UART protocol decoder, and ouputs the
+ decoded UART data in the "canonical" format, one byte after the other
+ without any metadata (start bits, stop bits, parity bits, errors) and
+ without any sample-numbers and such. This is basically what you would
+ see in a terminal program, such as minicom.
+
+ Per default it outputs to stdout, but using the 'filename' option
+ and/or the 'filename_rx'/'filename_tx' options it can also output to
+ files.
+
+ Using the 'tx' and 'rx' options you can also select whether both, or
+ only one of the data direction's data should be output.
+
+ Example:
+
+ sigrok-cli -i foo.sr \
+ -a uart:rx=0:tx=1,uart_dump:rx=no:tx=yes:filename=foo.txt \
+ -s uart,uart_dump
+
+ This PD is just an experiment for now, it's possible that it will be
+ replaced / reimplemented via a different sigrok facility later on.
+
+commit e1f5df5bd1d4847f1ebfade8d71161f8a5ede862
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jun 13 19:34:11 2012 +0200
+
+ srd: pan1321: Add 'Text' (short) annotation format.
+
+ Rename the old 'Text' format to 'Text (verbose)'.
+
+commit f9b0356bb8e5eeeb406c8be998f0746548a1e2dd
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jun 13 19:26:02 2012 +0200
+
+ srd: pan1321: Output correct start/end sample values.
+
+commit 140149cb9803789402328b01a378d43d59c5d8a7
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jun 13 19:09:05 2012 +0200
+
+ srd: Fix non-working PAN1321 decoder.
+
+commit 71077f34ffbd7d4015886a229edb2f2f827cb442
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Jun 12 20:38:08 2012 +0200
+
+ srd: Cosmetics.
+
+commit 74244cdae2309d444034fc7647171afab9dddf75
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jun 9 18:34:24 2012 +0200
+
+ srd: jtag: Document current (WIP) protocol output format.
+
+commit b189c8b1d918b975300d77dd0569665cce5d5843
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jun 9 17:57:30 2012 +0200
+
+ srd: usb: Fix bugs in the USB decoder.
+
+ The samplenum/scount handling was broken recently (mea culpa), and the
+ DP/DM probes were swapped.
+
+commit fcd8c14d65034400bdd70aff28bda185f84d9196
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Jun 8 21:39:09 2012 +0200
+
+ srd: dcf77: Initial PON handling.
+
+commit abbc128575797da7b56b08940174229ce8fa8a9b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Jun 8 21:06:59 2012 +0200
+
+ srd: dcf77: Bugfix, PD was broken.
+
+commit 173c919ca0788371935ae5aa6fee1f692087337d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Jun 8 19:44:44 2012 +0200
+
+ srd: mx25lxx05d: 'Verbose decode' & 'Warnings' annotations.
+
+commit b54936a95bb42d6763dd392267c5808677f1c4d0
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Jun 8 16:14:31 2012 +0200
+
+ srd: mx25lxx05d: Add empty handlers for TODO cmds.
+
+commit 781ef9450d82a9c7381aef17fb4974a1e49ec2d2
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Jun 8 16:07:02 2012 +0200
+
+ srd: mx25lxx05d: Further fixes/simplifications.
+
+ Also handle (not yet implemented) special-case command names such as
+ 'RDP/RES' and 'FAST/READ' correctly.
+
+commit 4772a846dca34cedcfe99ffc09b4c24710e44b2c
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Jun 8 14:58:47 2012 +0200
+
+ srd: mx25lxx05d: Simplify/generify cmd handling.
+
+commit 69ff19c84c5a6836702803cac4d1aa27e083d716
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu May 31 01:15:55 2012 +0200
+
+ srd: mlx90614: Small bugfix.
+
+commit 365eeed279c3a2089dde413cdbb2a19a7726edb3
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu May 31 01:03:54 2012 +0200
+
+ srd: nunchuk: Enable PD now, it works fine.
+
+commit b7ddc77bab6a47595940c0b4a169b0fa1727be9e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon May 28 14:57:51 2012 +0200
+
+ srd: nunchuk: Support for the Nunchuk init sequence.
+
+commit d628cdb521159d600cb19a3cd04eec28e07d9220
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon May 28 14:17:55 2012 +0200
+
+ srd: nunchuk: Add verbose summary annotation.
+
+commit 11860e5a81b1bf5e02b0a4f698b41cac5ede7a3e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun May 27 16:22:59 2012 +0200
+
+ srd: nunchuk: Only output summary annotation if possible.
+
+commit 739f1b7310b5b6926dfd8e9991bcb2fe057eca5d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun May 27 16:15:06 2012 +0200
+
+ srd: nunchuk: Fix most annotation samplenumbers.
+
+ Also, add a self.putx() helper method, as most annotations we have right
+ now are exactly one I2C packet long (there will also be others later, though).
+
+commit 5ea8b024da82871d4054356f8a645c8d61bbcd47
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun May 27 16:05:34 2012 +0200
+
+ srd: Wii Nunchuk: Complete rewrite, PD works now.
+
+ The Nintendo Wii Nunchuk protocol decoder, while it was in the repo for
+ a while, didn't really work yet (among other things, due to lack of
+ dumps for testing the code).
+
+ This is fixed now, the rewritten decoder works fine with most dump
+ files in the sigrok-dumps repo. A few minor issues remain to be
+ added/fixed, though.
+
+commit b7a7e6f5f4aa08ca340bbc316ac391b3a0d423ab
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed May 30 01:04:48 2012 +0200
+
+ srd: Cosmetics.
+
+commit bf20c75821129600da8ccd3ff5fe33d8f31812b4
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed May 30 01:04:29 2012 +0200
+
+ srd: Disable 'onewire' PD for now, until it's working.
+
+commit a07128cc4b6c4cbdcc0c46263abe76d0e08e0882
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue May 29 20:30:15 2012 +0200
+
+ sr/srd/cli/gtk: ChangeLog -> MAINTAINERCLEANFILES.
+
+ If the (generated) ChangeLog file is marked for DISTCLEANFILES, it'll be
+ removed whenever "make distclean" is called (and is then gone forever if
+ you use the tarballs, for example).
+
+commit 1227e5854dcf4f6b5cd2f9792f66ea994c3a7bad
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed May 23 01:12:11 2012 +0200
+
+ srd: onewire: Fix incorrect format for annotation output.
+
+ Should be a list containing:
+
+ - Annotation format number (e.g. 0, or ANN_DEC, etc).
+
+ - A list of strings (the annotation). If more than one string is
+ supplied, the other ones should be short versions of the string.
+ Example: [ANN_DEC, ["Foobarbaz", "Foo", "F"]]
+
+ This is optional, and mostly useful for GUIs.
+
+commit 080243a8224c8453c4993ad22f5bdc63e1dba2de
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed May 23 01:09:49 2012 +0200
+
+ srd: onewire: Fix %d and %s mismatch.
+
+commit 4a583ba42431fa2031a6bf39b249e4902973833d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed May 23 01:01:03 2012 +0200
+
+ srd: onewire: Get optional 'pwr' probe value, too.
+
+commit 0b8ea2bffbc907048c9a5ed5b563abc29f936f5a
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed May 23 00:59:50 2012 +0200
+
+ srd: onewire: Drop UART leftover comments.
+
+commit 4fe36ec3f9bf5729de3e73a6edcb38e78652c961
+Author: Iztok Jeras <iztok.jeras at gmail.com>
+Date: Tue May 22 22:27:25 2012 +0200
+
+ removed some code copied from UART decoder, fixed some Python syntax issues
+
+commit 39a0219a1ec59f1d49ef96c4f99121a071e6dfb8
+Author: Iztok Jeras <iztok.jeras at gmail.com>
+Date: Wed May 16 22:01:32 2012 +0200
+
+ unfinished update to onewire protocol decoder
+
+commit 51990c45a1cdcf023f3bbe75a5003c87f8ac902b
+Author: Iztok Jeras <iztok.jeras at gmail.com>
+Date: Tue May 15 23:15:26 2012 +0200
+
+ commiting new unfinished 1-wire decoder
+
+commit cd287c56af4e005e36faa26a88f6ef6dcbb2c902
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri May 18 21:42:29 2012 +0200
+
+ srd: MX25Lxx05D: Fix inverted SRWD bit handling.
+
+commit 7cfbf663d2acd5c1d289e1eb6f4aafbf76dc169d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri May 18 19:58:58 2012 +0200
+
+ srd: MX25Lxx05D: Decode status register bits.
+
+commit 87e574b787fc96a34fe7ea2fd20a4de06cde8c08
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri May 18 15:28:52 2012 +0200
+
+ srd: MX25Lxx05D: Fix SE command.
+
+commit 5ebb76fecc4ed07dd68a38dc55f3ba4ff34e7d70
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri May 18 15:05:03 2012 +0200
+
+ srd: MX25Lxx05D: Implement READ command.
+
+commit e4022299ba10e4ce4133da48932da695af4b9c99
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed May 16 23:06:21 2012 +0200
+
+ srd: MX25Lxx05D: Implement RDSR and PP commands.
+
+ Also, some small fixes and additional debug code/output.
+
+commit 3e3c03309ee21d839f85e981d361ca77b08d5ba0
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed May 16 22:48:47 2012 +0200
+
+ srd: spi: Document output protocol, send CS# changes.
+
+ As per guidelines in HACKING, the protocol "commands"/items should be ALLCAPS,
+ thus change 'data' to 'DATA'. Also, fix MX25Lxx05D protocol decoder
+ accordingly, currently the only one we have which stacks on top of SPI.
+
+ Add a new 'CS-CHANGE' output protocol item, which is sent upon every
+ change of the CS# pin value (either 0->1, or vice versa). This is needed
+ by various higher-level PDs.
+
+commit bdd820e3c0c2681b171fc7cc0198244f40a64b34
+Author: Pekka Nikander <pekka.nikander at senseg.com>
+Date: Fri May 11 19:23:21 2012 +0300
+
+ sr/srd/cli: Fix compiling with Homebrew.
+
+ Add ACLOCAL_DIR setting and AM_PROG_AR macro for compiling with Homebrew
+ under Mac OS X.
+
+ Applies essentially the same change to
+ {libsigrok,libsigrokdecode,sigrok-cli}/{autogen.sh,configure.ac}
+
+ It may be that the same fix is needed for the other autogen.sh and/or
+ configure.ac files, but that hasn't been tested and therefore not in
+ this commit.
+
+commit 1cc590f73673ce209ae41d6aa42ffa9a60649415
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu May 10 09:38:54 2012 +0200
+
+ srd: JTAG: Enavble and get/use optional probes.
+
+commit dd93276bf6b7537b65cab270f66666bf23fbc585
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu May 10 09:34:13 2012 +0200
+
+ srd: Support for one or more optional probes.
+
+ In the protocol decoder you always get all required probes, then _all_
+ optional probes in the list of probes in the decode() call.
+
+ Example:
+
+ (r1, r2, r3, o1, o2, o3, o4) = pins
+
+ In this case r1-r3 are required probes, o1-o4 are optional probes.
+ However, the value of valid/used/specified probes will be 0 or 1,
+ whereas the value of probes that were not specified/assigned by the user
+ will be (at the moment) 42.
+
+ The PD can check for a valid probe like this:
+
+ if p in (0, 1):
+ ...
+
+ Or check for an invalid probe:
+
+ if (p > 1):
+ ...
+
+ The value of 42 could change to be -1 or None later.
+
+commit 29590b14fc508a0b951ea0b87e98f7741808bab0
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed May 9 01:06:01 2012 +0200
+
+ srd: Fix a few Doxygen errors.
+
+commit a465436e627578f69c403de75a89522dfd883217
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed May 9 00:35:30 2012 +0200
+
+ srd: Add usable one-liner descriptions for all PDs.
+
+commit ee3e279c7558b388410d16cbce9db6c80e9c0c67
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue May 8 23:53:48 2012 +0200
+
+ srd: Remove TODOs from annotation format names.
+
+ Also, fix minor consistency issues, cosmetics, typos.
+
+commit d274e1bfc2cd0795c62ce304fa01320af16ca396
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat May 5 19:51:30 2012 +0200
+
+ srd: JTAG/SMT32: Some more improvements.
+
+ Add APB-AP register offsets/names, refactor and fix some code, handle
+ in/out APACC/DPACC better.
+
+commit 32fd715cb7918dd13af14dcfd0a10e909cfac306
+Author: Thomas Jarosch <thomas.jarosch at intra2net.com>
+Date: Fri May 4 10:18:22 2012 +0200
+
+ Fix bracket placing
+
+ Make it consistent with the rest of the code
+
+ Signed-off-by: Thomas Jarosch <thomas.jarosch at intra2net.com>
+
+commit c840e704fae9345c2a572a7efe4af8d5150c1a2d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu May 3 21:22:03 2012 +0200
+
+ srd: JTAG/STM32: Factor out dpacc_data_in/out.
+
+ Also, add a few code comments.
+
+commit 457acc283457b248a0e669022a7d48103885bb03
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu May 3 19:19:01 2012 +0200
+
+ srd: JTAG/STM32: Decode IDCODE[31:0] parts.
+
+commit 8189738ed4ab7947a7b4a867bcde100cd84f44a7
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu May 3 01:39:30 2012 +0200
+
+ srd: JTAG: Also show the bitstrings in hex (for now).
+
+commit e9656a0c6b99528656df8d18cd84643eb9491d63
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu May 3 01:39:16 2012 +0200
+
+ srd: JTAG/STM32: Various improvements, fixes.
+
+ Add APACC register handling, fix DPACC handling (esp. 'A' register size),
+ ouput a warning upon reserved DAPABORT bits being non-zero, implement
+ preliminary state machine, add various TODOs.
+
+ This is still work in progress, not yet finished or working properly.
+
+commit 66a8517ecfea370741c5789d664c9a965b5c0bc2
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Apr 28 19:24:57 2012 +0200
+
+ srd: Add initial JTAG/STM32 protocol decoder.
+
+ (not yet finished)
+
+ This protocol decoder can decode ST STM32 specific JTAG accesses, knows
+ about the STM32-specific registers and bits.
+
+commit 6e7a0087c5b3db987f5798d821f9e98848b650a6
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Apr 29 00:46:02 2012 +0200
+
+ srd: JTAG: Add some more docs.
+
+commit 6d990fe1dbf441eb9f090898e7c3a57889b26aef
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Apr 29 00:35:52 2012 +0200
+
+ srd: JTAG: The TRST# (and SRST#) signals are optional.
+
+ Don't handle them for now, will do this later.
+
+commit e5edf39f10053515fb044314adf83820ad118c57
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Apr 28 19:24:14 2012 +0200
+
+ srd: jtag: Various bugfixes.
+
+ Most importantly, both TDI and TDO are sampled at the rising TCK edge,
+ and only upon transitions from SHIFT-DR to SHIFT-DR and SHIFT-IR to SHIFT-IR
+ are we to save the TDI/TDO values (if I understood this correcly).
+
+ Also, start out in RUN-TEST/IDLE state for now. This is useful if you
+ have JTAG dumps which start "in the middle" somewhere, not in the
+ TEST-LOGIC-RESET state. For full dumps, the JTAG software usually issues
+ five TMS=1 cycles to force the JTAG state machine into TEST-LOGIC-RESET
+ anyway, so this works fine too.
+
+commit 557a143d8018ac5b25b0cdde99415433e3663f62
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Apr 26 22:51:26 2012 +0200
+
+ srd: Add initial JTAG protocol decoder.
+
+ This is unfinished, needs some more work.
+
+commit 2002229d8ae50531d27eb9396803b6f4666d9335
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Apr 25 18:44:50 2012 +0200
+
+ srd: lpc: Minor additions/fixes.
+
+commit 17160de7e6022a2c05311d76e1082502bdf3a8a5
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Apr 21 19:58:47 2012 +0200
+
+ srd: MXC6225XU: Bugfixes, add missing bits/registers.
+
+commit d997c01abaa3e6b9b9de10976f3564a2b9f993a8
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Apr 19 20:18:10 2012 +0200
+
+ srd: Initial MEMSIC MXC6225XU protocol decoder.
+
+ Not quite finished yet, but relatively close.
+
+commit 271acd3bde96474c7ed5f822d470f555af8e7d93
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Apr 17 23:28:12 2012 +0200
+
+ Initial LPC protocol decoder implementation.
+
+ This is unfinished and not tested, and probably not really working, yet.
+
+commit 6b249180f1f15eb1d10c617f76b35d1535c0d4f7
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Apr 17 00:12:56 2012 +0200
+
+ srd: Initial 0.1.0 release.
+
+commit a4cb05f748a1104faba456217a762befc4faf2f3
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Apr 16 23:16:00 2012 +0200
+
+ sr/srd: SR_API/SRD_API/etc. is a no-op on MinGW.
+
+ This avoids warnings on a MinGW build. The feature depends on ELF files,
+ but MinGW/Windows uses PE files.
+
+commit 53a07a6d287ecdd3a9831dd3778676edf6ee8a9e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Apr 16 23:10:26 2012 +0200
+
+ srd: Quickfix for MinGW build issue.
+
+commit 0c081c63de28e694eeaeee613e7bfa17bee81bc7
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Apr 15 20:58:08 2012 +0200
+
+ srd: Add functions to query srd version(s).
+
+commit 63b1026d367275c7171da7dc7d5ac675a420f485
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Apr 7 18:14:39 2012 +0200
+
+ sr/srd: Use/fix SR(D)_MAX_NUM_PROBES.
+
+commit 387c7bc65c4e87d704d4f59e78218effbfadcc95
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date: Fri Apr 6 22:29:31 2012 +0100
+
+ srd/i2s: Added links to documentation
+
+commit 780a5beeaf36e7af20f4f37c0f13473f3f9bb1d3
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date: Fri Apr 6 22:01:30 2012 +0100
+
+ srd/i2s: Added sample-rate and bit-depth to report
+
+commit abbbd2ba56a70b9978c4f31a4988102364807997
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date: Fri Apr 6 20:11:01 2012 +0100
+
+ srd/i2s: Print a warning on receiving a malformed word
+
+commit 2ab416c214e248be8ece49bab2cabf2b28954cca
+Author: Joel Holdsworth <joel at airwebreathe.org.uk>
+Date: Fri Apr 6 20:01:02 2012 +0100
+
+ srd/i2s: Initial implementation
+
+commit 5626f8b4101330194c5b70a59ee3579087b7f7a5
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Mar 31 17:06:03 2012 +0200
+
+ srd: Disable 'nunchuk' PD for now, it's unfinished.
+
+commit 4180cba9a51acd32f69f0f8628bb746ea3e12be6
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Mar 31 17:04:50 2012 +0200
+
+ srd: Decoders: Fix/simplify samplenum usage.
+
+commit 394b74dca66d540cae154dfeb3bea4253db4304d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Mar 31 12:09:37 2012 +0200
+
+ sr/srd: Fix 'make distcheck'.
+
+commit 4b442477602ef5938c4826925e21f38c8f1e13a9
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Mar 31 12:05:20 2012 +0200
+
+ sr/srd: Add ChangeLog to ignore list, it's generated.
+
+commit ab13922ca9fa2fc03e2a355166af5732f8e8a009
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Mar 31 11:38:38 2012 +0200
+
+ srd: Generate ChangeLog from git upon 'make dist'.
+
+commit dc17bafa2f645366d4c1f2bb1be4e787def80026
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Mar 31 11:37:19 2012 +0200
+
+ srd: Add NEWS file.
+
+commit 14b42dad483c98b3dbf7b389e60b9cede1cd122f
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Mar 31 11:31:14 2012 +0200
+
+ srd: SRD_PACKAGE_VERSION_* for consistency.
+
+ No need to use the LIBSIGROKDECODE_ prefix here when we use SRD_ everywhere
+ else. Also, better distinction between package version and lib version.
+
+commit aafeeaea1731a1e0c8322527ccb0e4cdcc5ffb01
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Mar 25 15:08:16 2012 +0200
+
+ srd: Some more (optional) consistency renames.
+
+commit b33b8aa56ec27edf57cd7dc3d735370f60bfe13d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Mar 25 14:49:11 2012 +0200
+
+ srd/cli/qt: Some more API consistency renames.
+
+commit 122e9a90a54e034b93f554938896983d293edec1
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Mar 25 09:39:44 2012 +0200
+
+ srd: PDs: Kill obsolete 'longdesc' entries.
+
+commit 0736708e58a10e1903c47d72fee5343cccb1ce95
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Mar 24 22:05:59 2012 +0100
+
+ srd: Add .gitignore file.
+
+commit 03a66522d5aef7b49fbf63e4da475c4ab8b1fe2e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Mar 24 19:41:40 2012 +0100
+
+ srd: sigrokdecode.h: Add version macros.
+
+commit 8f01b6bcc58e25c92a263f99283748d29421cacb
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Mar 24 17:52:48 2012 +0100
+
+ srd: Rename sigrokdecode.h to sigrokdecode.h.in.
+
+commit 363252b482d189c9cca596b146f5fb6ead6e3412
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Mar 24 09:37:55 2012 +0100
+
+ srd: List 'report()' in all PDs for consistency.
+
+commit 6c36501de9d0b91a203d4943b16d0a63e1c98d9e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Mar 21 22:38:08 2012 +0100
+
+ srd: Drop unused inputformats/outputformats entries.
+
+commit 0575fc98b5787d4f207064d3a69f5d3cf6922fc2
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Mar 21 22:33:51 2012 +0100
+
+ sr/srd: Remove API warnings from READMEs.
+
+ We'll have a libsigrok and a libsigrokdecode release soon. After that,
+ any API changes must be properly documented and reflected in the
+ SO version (and package version) numbers of the libs.
+
+commit 9c661c498eaa200304a770c469ec180a2a6c0485
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Mar 21 19:40:07 2012 +0100
+
+ srd: Drop ebr30a_i2c_demux in favor of i2cdemux.
+
+ The i2cdemux protocol decoder is the more generic version of the
+ obsolete ebr30a_i2c_demux decoder, and should be able (now or later) to do
+ everything that ebr30a_i2c_demux can do.
+
+commit 5a2c4dc462310a8a031abda7e6cbb0532873ec55
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Mar 21 19:28:43 2012 +0100
+
+ sr/srd: Small fixes, constifications, doc updates.
+
+commit abf77a8df245c31a8beb80be094972c4d188adab
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Mar 21 18:40:25 2012 +0100
+
+ sr/cli/gtk/qt: Fix package version numbers / docs.
+
+ The next (and first) libsigrok release will be called 0.1.0.
+
+ The next (and first) libsigrokdecode release will be called 0.1.0.
+
+ The next sigrok-cli release will be called 0.3.0 (as we already had a 0.1
+ and 0.2 release of sigrok-cli; those did not yet use the libs, though).
+
+ sigrok-gtk and sigrok-qt didn't have any releases yet, so their version
+ numbers are set to 0.1.0.
+
+ Also, consistently use three numbers/digits for our version numbers.
+
+commit 96c52595ac5cdf7594a639af7ef682411917f52a
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Mar 20 18:02:45 2012 +0100
+
+ srd: srd_exit(): Set pd_list to NULL after freeing.
+
+ This will ensure that any subsequent checks for pd_list == NULL work
+ properly.
+
+commit 29dad0ac4acd7174cee00556f6104594497fe970
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Mar 20 17:58:25 2012 +0100
+
+ srd/cli/qt: s/srd_session_feed/srd_session_send/.
+
+commit 8ad6e500312084cd4ae43c7bda476cc7370cda20
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Mar 16 15:25:53 2012 +0100
+
+ srd/cli/qt:s/decoders/decoder/ for consistency.
+
+commit abeeed8b6da45e1854bc151a8175836b5ca38e34
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Mar 16 15:12:54 2012 +0100
+
+ srd: Constify lots more parameters.
+
+commit 361fdcaafec8ddd37f0d381204e4c2a22c56b238
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Mar 15 22:00:24 2012 +0100
+
+ srd: Cosmetics, fix/add Doxygen comments.
+
+commit ed2306a6f29bc4d85f5f248c83fff252b22c60a5
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Mar 18 14:16:50 2012 +0100
+
+ srd: Fix typos.
+
+commit a759e1a143122dd73f9051a3d48c4846839c340e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Mar 14 22:12:08 2012 +0100
+
+ srd: Drop unused ARRAY_SIZE/ARRAY_AND_SIZE for now.
+
+commit f9d87f641e55cd643037d81d7221ddc169cdae6b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Mar 4 10:55:30 2012 +0100
+
+ srd: I2C: Update PD protocol docs.
+
+commit 1541976fcac03a780b5d27046f5f8884973c08ae
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Mar 4 10:40:58 2012 +0100
+
+ srd: PDs: More cosmetics.
+
+commit 2b7160383cc189f721600c04be17a980e216dfd6
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Mar 4 10:13:29 2012 +0100
+
+ srd: PDs: Use strings for states, too.
+
+commit 09059016e02db5d83b4862a3adcf8ddf101f6991
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Mar 3 14:39:14 2012 +0100
+
+ srd: PDs: Consistency/cosmetic fixes.
+
+commit 0082d592076fdc3fe06a760d432a48163ee0bd97
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Mar 3 14:13:21 2012 +0100
+
+ sr/srd: s/handler/callback/.
+
+ We should consistently use the same name for the same thing.
+
+commit 41a5d9624022856f4ef357c1fdce041a9774a99c
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 29 22:32:34 2012 +0100
+
+ sr: Name all callback data 'cb_data'.
+
+commit 4c1d067068fdb9e5f723b3548bddb64e0b06fc36
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 29 21:56:24 2012 +0100
+
+ sr/srd: Consistency fixes for callbacks.
+
+ - Callback function pointer typedefs end with _t.
+
+ - Variables holding callback functions are named 'cb' everywhere.
+
+commit 1b75abfdd3e00ef590c9d1905863f6f2cb5a8632
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Feb 28 14:33:45 2012 +0100
+
+ srd: I2C: change format to have ACK/NACK bits as separate events
+
+commit 5154cadf4a143f6157a54aa4d2097dffe78c0f29
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Feb 28 02:01:41 2012 +0100
+
+ srd: fix SIGROKDECODE_DIR env variable brokenness
+
+commit 708b3b84ea6b9ba3a60d5aa2a0ad56613ad8bbfd
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Feb 28 01:16:29 2012 +0100
+
+ srd: properly return status code
+
+commit e4f822680083b65e34b9c8b091025f66ea6efde6
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Feb 28 00:42:45 2012 +0100
+
+ srd: PDs: Whitespace and cosmetics.
+
+commit 9d122fd5d66aa178547ec4222ab5f526f8a14cf7
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Feb 14 03:43:28 2012 +0100
+
+ srd: rename public API functions to srd_thing_action format
+
+commit 9b37109da365335c1b6da14f073513c7855872d8
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Feb 14 03:28:53 2012 +0100
+
+ srd: don't load all protocol decoders unless we really need to.
+
+commit 582c8473ffd456dfb0796974ef2c0b1b78de38a8
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Feb 12 14:55:20 2012 +0100
+
+ srd: last public/private fix, and docs for all publis functions.
+
+commit 12243c22bf01506ac3b220bfe38384db9903756c
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Feb 12 14:18:32 2012 +0100
+
+ srd: finish up public/private API
+
+commit ee4ed2279e3d3d4b2911aa2a1ed4effcbd1bbe60
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Feb 12 13:47:07 2012 +0100
+
+ srd: no public API functions use python-specific arguments now
+
+commit 65e1c7d091956e42aa4d97d7b639e10076e6f8ff
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Feb 12 04:07:22 2012 +0100
+
+ srd: extra module path can now optionally be passed to srd_init()
+
+ Also environment variable SIGROKDECODE_DIR, if present, is prepended
+ to the module path.
+
+commit e09023b9dc8f1d6783a3bf6b05402a88060a795f
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Feb 11 22:09:18 2012 +0100
+
+ Rename 'void *' callback parameters to 'user_data'.
+
+ This is better, both for consistency reasons, and also because 'data' is
+ a bit too generic and might be confusing, especially since we have other
+ 'data' fields in the code in various places.
+
+commit ae53d0a5971121e03a07c469e39ff3cfa34a2111
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Feb 11 22:38:17 2012 +0100
+
+ srd: Every callback should have a 'void *' parameter.
+
+ This is required in various situations and for various lib users,
+ especially so GUIs which might want to pass specific info via this
+ mechanism.
+
+commit 56bf4c20afc2785f8cdf75e386159e23fa2c1acf
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Feb 11 20:06:46 2012 +0100
+
+ Use g_try_malloc/g_free/g_strdup consistently.
+
+ Avoid plain malloc()/free() in sr/srd, especially in the API calls.
+ Also avoid g_malloc*() in favor of g_try_malloc*().
+
+ Use g_strdup() instead of strdup() so that we can use g_free()
+ consistently everywhere.
+
+ Exceptions: Stuff that is allocated via other libs (not using glib),
+ should also be properly free'd using the respective free-ing function
+ (instead of g_free()). Examples: Stuff allocated by libusb, libftdi, etc.
+
+ Also, use sr_err() instead of sr_warn() for actual errors. sr_warn() is
+ meant for non-fatal/uncritical warnings.
+
+commit a8b72b05cad9fd63e52079acb395a6694ed5f6b6
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sat Feb 11 18:06:56 2012 +0100
+
+ srd: rename all instance to inst
+
+commit 7b56d7a5d272879bc2b48f751935fda86347c438
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Feb 11 00:43:26 2012 +0100
+
+ srd: Update README.
+
+commit 511e2123038c0df994ecadb1454d0869dc256698
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Feb 10 09:29:38 2012 +0100
+
+ srd: s/python/Python/.
+
+commit a61ece2022f9e765d65dcd0ed22dba7e71e138a2
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Feb 10 00:06:58 2012 +0100
+
+ srd: Add/improve g_malloc() error messages.
+
+commit a33a0e3bd59214cc4ddb021389f5c2ad91134587
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Feb 9 19:17:54 2012 +0100
+
+ srd: Move private symbols to sigrokdecode-internal.h.
+
+commit 55c3c5f4b9d38b85fae2c39a8a6150b4c50b1bdb
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Feb 9 19:11:53 2012 +0100
+
+ srd: Add/use SRD_API/SRD_PRIV macros.
+
+ This is not yet finished, more things should be made private.
+
+commit c9bfccc6347e05e6faba6f27fe0e50a7d55f531c
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 8 22:39:30 2012 +0100
+
+ srd: Cosmetics, whitespace, coding-style fixes.
+
+commit 41106a07486f46de5dac2fd55233691172d4fe59
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 8 19:52:43 2012 +0100
+
+ srd: More consistent log related function names.
+
+ Also, fix typos, constify some parameters, add more Doxygen comments.
+
+commit 3b5839d56023d6105ea58766313f26c15f6d0877
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Feb 4 10:41:30 2012 +0100
+
+ Project-wide consistent naming for #include guards.
+
+ Document the naming scheme in HACKING.
+
+commit 63d62a5c6aa3c66b6b3c0662155752ccb123ee23
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Feb 5 12:54:44 2012 +0100
+
+ autogen.sh: aclocal support for Windows XP/Vista/7.
+
+commit bb590e071c0f6554695334b5da804c75267541fb
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Feb 2 09:28:56 2012 +0100
+
+ srd: Add explicit srd_pd_output_callback_t typedef.
+
+commit 7f7ea759ebdc854beb0468b410f7d2382f291a4f
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 1 23:14:29 2012 +0100
+
+ srd: Properly use append() for appending to lists.
+
+ This is not only the canonical way to do it, it's also quite a bit faster
+ and less memory-intensive than using '+='.
+
+commit 156509ca42f0df2380c9f205f9aad337e1a07802
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 1 22:23:03 2012 +0100
+
+ srd: Move all protocol docs to __init__.py files.
+
+commit 94bbdb9a4146ec5eaa56411706dc92de3a92f2d8
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 1 21:57:43 2012 +0100
+
+ srd: spi: Use strings for most options.
+
+commit a7fc4c342689ab3b42cd8e662612e12aee8a2bf3
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 1 19:47:50 2012 +0100
+
+ srd: uart: Use strings for most PD options.
+
+commit 8e828d2a29154fb9cae8c9c38d27c60f820dd584
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 1 19:24:21 2012 +0100
+
+ srd: uart: Move protocol docs to __init__.py.
+
+commit 1ccef4616d2c6d6fcdfee6a72d051387625678ca
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 1 19:07:11 2012 +0100
+
+ srd: uart: Add missing initialization.
+
+commit b9e44d1e0964f5c6c99ec52b68a5a6e0bc1ac633
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 1 18:59:18 2012 +0100
+
+ srd: uart: Use strings for packet types.
+
+ While this has a (small) performance penalty compared to using integers,
+ it has the advantage of not requiring the use of magic numbers which
+ need to be declared in both the UART decoder and all decoders which
+ stack on top of UART.
+
+commit b77614bc977475102062ac5d1c8fe8e55349315a
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Feb 1 00:13:42 2012 +0100
+
+ srd: rename extra_probes to optional_probes in all PDs
+
+commit dcdf48838748df02bc3028c4a26ea6d4506ee542
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Feb 1 00:07:55 2012 +0100
+
+ srd: rename extra_probes to optional_probes
+
+commit fa12a21e3c779df4e33dcfe394e2ded3f96028ce
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Jan 31 23:48:10 2012 +0100
+
+ srd: free all decoder instances when unloading decoders
+
+commit dbeaab27a4537863a5d7a8180af2de57ba55f1d4
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Jan 31 22:35:22 2012 +0100
+
+ srd: avoid POSIX_SOURCE warning
+
+commit d3c8af667a6f2677c3ecc52b5249f24d9d0b356c
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Jan 31 18:07:59 2012 +0100
+
+ srd: remove obsolete DDC-only I2C filter
+
+commit 61c2bd366eba64b50009c604c382c547f6cfdd88
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Jan 31 18:05:11 2012 +0100
+
+ srd: add generic I2C filter PD
+
+commit 12b5e28ecccaaff12a4339867b5bbcd533b1e1fc
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Jan 30 20:17:15 2012 +0100
+
+ srd: Add missing <inttypes.h> #include (for PRIu64).
+
+commit 2a706c20b73ea466a16c7f5ae6a8b0d44e470053
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Jan 31 00:48:07 2012 +0100
+
+ edid: properly deal with leading I2C crud + small fixes
+
+commit 6fff00eee1dd62477cd2708df480b985ef416a67
+Author: Bert Vermeulen <bert at biot.com>
+Date: Mon Jan 30 01:23:35 2012 +0100
+
+ srd: removed stray malloc()
+
+commit ad022d94ef9a32428fe44710e7eff311991fd9e6
+Author: Bert Vermeulen <bert at biot.com>
+Date: Mon Jan 30 01:22:27 2012 +0100
+
+ srd: clear objects after final decref, so it doesn't happen twice
+
+commit 1063646c74946527c6e8d23790f6fd8501f5665c
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Jan 29 20:13:43 2012 +0100
+
+ edid: move PD docstring to __init__.py
+
+ also minor code cleanups
+
+commit 91b2e171b0e84764f078414cd9445a0133bd653f
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Jan 29 18:43:45 2012 +0100
+
+ srd: add EDID 1.3 decoder
+
+commit 70ccb1ce0cf0ae5e125c651a2ed7947ae0e58b19
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Jan 29 18:42:10 2012 +0100
+
+ ddc: add protocol output
+
+commit 066ecdabd251d503649850f09ff2bf161fc3364b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 28 21:26:56 2012 +0100
+
+ Update/enforce/document our build requirements.
+
+commit 6f858319a4dd20b243e5584ab7a60e54f5a50471
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 28 21:26:26 2012 +0100
+
+ srd: Drop unneeded check, g_free() handles NULL fine.
+
+commit fd4aa8aaed83f9f0041647b913e48ef95c1aab55
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 28 19:08:13 2012 +0100
+
+ srd: PDs: Cleanups, simplifications, small fixes.
+
+commit afff6b1a0be19c4f0976309cae571a0c3e41c157
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Jan 27 18:47:27 2012 +0100
+
+ srd: mlx90614: Show more exact temperature.
+
+commit 1c2b0d0b82a48bd323b46440f17b049090cabc79
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Jan 27 18:38:16 2012 +0100
+
+ srd: Use PRIu64 for uint64_t values.
+
+ Using %d seems to silently work on Linux, but leads to a segfault on
+ Windows/MinGW.
+
+commit ce46beed20cef3262cdf8a921fdf7632f0356227
+Author: Bert Vermeulen <bert at biot.com>
+Date: Fri Jan 27 08:21:58 2012 +0100
+
+ srd: add more debugging around probe mapping
+
+commit 568112ce6de82135b0bfd7b5319ffdd611e6b030
+Author: Bert Vermeulen <bert at biot.com>
+Date: Fri Jan 27 01:14:01 2012 +0100
+
+ srd: use format string where one is expected
+
+commit bc1385a6d999c0011050b1cbd275879a928f4252
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 26 23:48:11 2012 +0100
+
+ srd: Melexis MLX90614 Infrared Thermometer decoder.
+
+commit 7a1712c4fd07f64222079acd5ec3fa3348a5cb15
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 26 01:15:10 2012 +0100
+
+ srd: Remove manual log domain ("srd: ") prefixes.
+
+commit 3a8b2e789262545fe409f95f69319b80e66aac13
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jan 25 11:00:04 2012 +0100
+
+ srd: log: Support for setting a log domain (prefix).
+
+commit ac941bf91b1a4f75ed793ca1547a1bd75bac0a1a
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jan 25 22:25:25 2012 +0100
+
+ srd: UART: s/parity/parity_type/.
+
+commit decde15ecb51b3326b31019af61e0a729b9c61d0
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jan 25 22:11:38 2012 +0100
+
+ srd: All PDs: Various fixes, cosmetics.
+
+ - List all API methods and metadata variables in all PDs to make things
+ easier and more consistent for new PD writers.
+
+ - Fix probe assignment in a few PDs.
+
+ - Raise exceptions upon invalid states of the PD state machines (bug).
+
+commit 385508e9b12d87519f9144a67e7682b46a592200
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jan 25 19:02:11 2012 +0100
+
+ srd: mx25lxx05d: Cleanups, add optional probes.
+
+commit 66e4c27c13b2e7ba857c9c9bd9a33a8b3a5cb0fa
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jan 25 02:52:27 2012 +0100
+
+ srd: Support for registering a custom log handler.
+
+commit ed5f826a3fe1186f9a2249ca897b836111145116
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jan 25 01:49:32 2012 +0100
+
+ srd: Add Epson RTC-8564 JE/NB protocol decoder.
+
+commit 2072ae0c89fec6b06cc579a6c584e67e2a59f7ec
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Jan 25 01:49:35 2012 +0100
+
+ srd: properly recurse into PD instances when looking for one.
+
+ This fixes the confusion between parallel and linear stacks.
+
+commit 58572aed02d81e2cc75749c2c4b516538b5ca9b9
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Jan 24 03:51:02 2012 +0100
+
+ sr: better error reporting
+
+commit b3b2cae8e36ca939f1a8535e95431ceefa8a1cb8
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Jan 24 02:02:03 2012 +0100
+
+ srd: change struct srd_pd_output to have a path to the DI, not the decoder.
+
+commit 9d9fcb375d7702082146bf917a5d19cc83480eae
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Jan 23 19:58:06 2012 +0100
+
+ srd: Prepend (not append) PD dirs to sys.path.
+
+commit be873260307fb879200ace642c15164c39234007
+Author: Bert Vermeulen <bert at biot.com>
+Date: Mon Jan 23 19:34:23 2012 +0100
+
+ srd: deal with invalid probe specifications better
+
+commit 0146063014a7dba729ce2378e30ea9d501ac0ae8
+Author: Bert Vermeulen <bert at biot.com>
+Date: Mon Jan 23 05:03:25 2012 +0100
+
+ srd: i2cdemux: add missing Makefile.am
+
+commit 2086c68463fef416fd9a48dac5e1aa7fa593308d
+Author: Bert Vermeulen <bert at biot.com>
+Date: Mon Jan 23 04:51:33 2012 +0100
+
+ srd: use new exception system everywhere
+
+commit ec871a279893cfe0ab378eddc0a9f9bcccc44925
+Author: Bert Vermeulen <bert at biot.com>
+Date: Mon Jan 23 02:20:51 2012 +0100
+
+ srd: add python exception catcher, which routes to srd_err() and srd_dbg()
+
+commit 4fadb1282f5e9aa41abcb67e7d90cdc4a9b2628d
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Jan 22 03:29:22 2012 +0100
+
+ srd: minor code cleanup
+
+commit d567790b9c0ab30b18aceb92e6714e631200e9b9
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Jan 22 14:28:48 2012 +0100
+
+ srd: Add generic i2cdemux protocol decoder.
+
+commit d906d3f978233458fc73b56fb232352affd1b433
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Jan 22 02:51:49 2012 +0100
+
+ srd: make all debugging and error reporting uniform
+
+commit 86d6a21e9913d38cc1ae2ebd279ed2ce61fb548f
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Jan 22 00:53:24 2012 +0100
+
+ srd: use more appropriate calls for integer constants
+
+commit 19a90bab1b8d88c173ce29f8243747740d280164
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sat Jan 21 19:45:04 2012 +0100
+
+ srd: better check for PDs with no defined probes
+
+commit 4244f8252706c5715a5598c51914f4f8d20c5e84
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sat Jan 21 15:04:47 2012 +0100
+
+ srd: fix probe mapping
+
+commit f38ec2855ce41154bc1035dd7f1ab9a21f411f0d
+Author: Bert Vermeulen <bert at biot.com>
+Date: Fri Jan 20 22:25:42 2012 +0100
+
+ srd: support for mapping probes
+
+commit 11ea8ae1b2279566125978766735a26252dff412
+Author: Bert Vermeulen <bert at biot.com>
+Date: Fri Jan 20 22:23:27 2012 +0100
+
+ srd: decoder class structure check belongs in module loader
+
+commit d42fc6ee118ff673cef1c4ffbce0c7f603519f63
+Author: Bert Vermeulen <bert at biot.com>
+Date: Fri Jan 20 22:08:22 2012 +0100
+
+ add py_dictitem_as_str(), more checking in py_attr_as_str()
+
+commit 4a04ece49f00ba2be5c16a55547b1a8d7e9519f9
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Jan 20 01:16:47 2012 +0100
+
+ srd: UART: Update to new options API.
+
+commit 8a7ce2a3f77bae0a4a6aa08751bdd9a963168192
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Jan 20 00:40:47 2012 +0100
+
+ srd: SPI: Convert to new options API.
+
+commit eb2bbd668758f00afccda9a04690e84b56cc99b1
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Jan 19 17:12:02 2012 +0100
+
+ srd: fix decoder loading, and back to using glib dirent wrappers
+
+commit 1d552cd37d050b346adccdcd61e1ee695d5a6d52
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Jan 19 15:05:38 2012 +0100
+
+ srd: don't check directory structure a PD is in, but what it implements.
+
+ Also added extra check to require start() and decode() methods in the
+ PD's Decoder class.
+
+commit 21481b6609641fb3076290dad915a3a6259ce05a
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Jan 19 09:59:00 2012 +0100
+
+ srd: simplified error checking, in preparation for more of it
+
+commit 130ef08ad86df267f14901a895ffd5ee46696c72
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Jan 19 00:00:02 2012 +0100
+
+ accept only supported types in decoder class default option values
+
+commit 639c56898e88aae99a7b91a5c6d2b7870956d648
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 19 00:21:00 2012 +0100
+
+ srd: Windows/MinGW Python path format fixes.
+
+ On Windows/MinGW, Python's sys.path needs entries of the form
+ 'C:\\foo\\bar' instead of '/foo/bar'.
+
+commit e431d9cc4afa5e695efea61fb769f20d86f0bbe0
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Jan 18 22:59:14 2012 +0100
+
+ srd: always set default options, regardless of overrides
+
+commit 79c4f9b987329587fd388d49015921ab4f9553bd
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Jan 17 03:39:28 2012 +0100
+
+ I2C: no need to copy default option values over from the class
+ definition anymore: it happens automagically.
+
+commit 0bdadba205a6d7688a2bb8d98ab342abe22acd6e
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Jan 17 03:37:34 2012 +0100
+
+ SRD: support setting per-PD options
+
+ All decoder class options are automatically copied to a newly created
+ instance with their default value, which can be overridden with the
+ GHashTable passed to srd_instance_new().
+
+ Currently, only strings and integers are supported as option value
+ types. The type is set by the default value in the decoder class, and
+ enforced when overriding them. Integers can be specified in any
+ format python allows: 10, 0x0a and so on.
+
+commit 7b14cee1e2b43738a13108180dee73a08cbde87b
+Author: Bert Vermeulen <bert at biot.com>
+Date: Mon Jan 16 05:01:05 2012 +0100
+
+ srd: don't decref an object we don't own
+
+commit c49750787d045582dc08419b1312770a57fb845f
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Jan 15 23:21:22 2012 +0100
+
+ I2C: properly use sample numbers in proto/annotation output
+
+commit 86528298fa2abfe825d6763b806095972e8bd8f4
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Jan 15 23:20:39 2012 +0100
+
+ srd: PDs now get a logic feed with sample numbers, not time/duration
+
+commit a2c2afd9357fab233a4f09531618faa81d54d4d9
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Jan 15 20:41:46 2012 +0100
+
+ srd: Add 'api_version = 1' to all PDs.
+
+commit 64c29e28e0efa184319f7831b3eca18c7f73f7d0
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Jan 15 15:36:01 2012 +0100
+
+ srd: Each PD now has its own subdirectory.
+
+commit d0a0ed032e0120140a28e93ac42753786bf0087b
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Jan 15 14:44:40 2012 +0100
+
+ move sigrokdecode.Decoder type to its own source file
+
+commit 56270764cd4dd3d255979a283092765057a0d3de
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Jan 15 13:16:48 2012 +0100
+
+ srd: Decoders: Remove author/email fields.
+
+ We decided it's too much hassle to deal with this in GUIs (multiple
+ fields, multiple name and email addresses and copyright years etc. etc)
+ with too little gain. The authors/emails etc. are already in the .py file's
+ license header and in git anyway.
+
+commit 9e587cc9d4db0da9bdfffbc023d848dd59df74b4
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Jan 15 12:50:07 2012 +0100
+
+ srd: Bring back small stuff lost in the merge.
+
+ Also, use ''' for docstrings to be consistent with the rest.
+
+commit 876f83fd3396ce581e700741e58414c2f4f6277e
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Jan 15 04:31:23 2012 +0100
+
+ srd: rename srd_usb to what it thinks it's called
+
+commit 9e681b1b7f7c1d6d4d56ad476647e21fd6f835c6
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Jan 15 04:31:23 2012 +0100
+
+ srd: rename srd_usb to what it thinks it's called
+
+commit e7edca072b38affaa80dec93d21ba19a1fbd257e
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Jan 15 04:24:15 2012 +0100
+
+ srd: handle missing module docstrings better
+
+commit 87998e973f16206be1391f87ccae7c2756baf353
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Jan 15 04:02:21 2012 +0100
+
+ CLI: when invoked with only -a <pd>, the PD's documentation is shown.
+
+commit 451680f192b97d652fb02186f5201efa0d668a2a
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Jan 15 03:58:27 2012 +0100
+
+ srd: clean up module loading/unloading, and the decoder struct
+
+ PDs are now checked for a proper Decoder object, with at least the
+ required attributes.
+
+ The author, long_desc and func attributes in the decoder object are gone.
+
+commit f8e458577f72a5b13fa83b6cd3675a7eefc83072
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Jan 15 03:43:01 2012 +0100
+
+ move srd_Decoder to sigrokdecode.h, and rename it in line with srd_logic
+
+commit 8892c76856f22acf6eafc66c6a5f86ab7cb8bddb
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Jan 15 02:17:10 2012 +0100
+
+ srd: Add ebr30a_i2c_demux PD (I2C in, 3 x I2C out).
+
+commit ba24aaf7608bc5f26705b2747a2f7c05c52a7820
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Jan 15 02:01:37 2012 +0100
+
+ srd: I2C: Small fixup.
+
+commit 5dd1c937a764a1517a8e12d10af6c3fcb9c8b3c9
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Jan 15 01:22:19 2012 +0100
+
+ srd: pan1321: Support replies from device.
+
+commit d9c0d0a34a606bd1c96b468cbce4f0f8397e291d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 14 23:17:40 2012 +0100
+
+ srd: pan1321: Update to new UART format.
+
+commit 97cca21f9423164b0ef3fe52c529f1920cc669a0
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 14 22:51:07 2012 +0100
+
+ srd: UART: Handle both RX and TX pins.
+
+ Also, experiment with readability improvements a bit.
+
+commit 526e580446dd45c3cb6811dd69a31eaff54e908e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 14 21:44:01 2012 +0100
+
+ srd: Separate author/email fields for now.
+
+ This will be needed in GUIs to easily handle/display the values without
+ the need for additional parsing.
+
+commit 3d3da57d7e7a7414e012e86dde32530e01b4dc45
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 14 21:41:41 2012 +0100
+
+ Improve 'longname' PD strings, use in 'sigrok-cli -V'.
+
+commit a2d2aff27099449deb1a791b3adc05ee610861e6
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 14 21:34:06 2012 +0100
+
+ srd: I2C: No need for underscores in string cmds.
+
+commit ea90233eb2e76cca10adf3ed3c016c5b6cb993e1
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 14 20:48:55 2012 +0100
+
+ srd: Consistent PD option defaults handling.
+
+commit acba48696ef9dd516d2cdf90f89e099deb7e1a73
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 14 18:40:43 2012 +0100
+
+ srd: SPI: Add support for different CS# polarity.
+
+commit 01329e88ee576eb511528e691ddee23998d2de21
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 14 18:34:07 2012 +0100
+
+ srd: SPI: Output warning annotation if CS# de-asserted.
+
+commit c94c8c918152004e7bed50a50dcf7be233674b9d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 14 18:27:54 2012 +0100
+
+ srd: SPI: Support sampling on rising/falling CLK edge.
+
+commit cc2047464a6b01474721557f32acafd9f1f00cb9
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 14 18:09:11 2012 +0100
+
+ srd: SPI: Add support for arbitrary word sizes.
+
+commit 1ea831e97a3c65b820c049220480def1636cb0b5
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 14 18:08:00 2012 +0100
+
+ srd: SPI: Add support for bit order option.
+
+commit 0db89774dee57db500f270985f73f3bb2dcdbb42
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 14 18:02:33 2012 +0100
+
+ srd: SPI: Set default PD options.
+
+commit 0c3089c1c49e51e588dd264abafb05efdd44d0c8
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 14 16:19:46 2012 +0100
+
+ srd: SPI: Fix typo.
+
+commit 238b4080f5de6e12f36d66c93e0fa8afb9688233
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 14 16:18:29 2012 +0100
+
+ srd: SPI: Sketch of the PD options (unused).
+
+commit 9b4d8a5753db586648abfe7897c29ad5d5bc77a5
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 14 15:57:27 2012 +0100
+
+ srd: mx25lxx05d: Update to new API, make it work.
+
+ This works (partially) with output from the 'spi' protocol decoder.
+
+commit d6bace96eda41684bdd4136a009bb261d36e8fd2
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 14 15:56:44 2012 +0100
+
+ srd: SPI: Handle both directions, output proto data.
+
+commit 4e570fa925c5e879b34dfc6a1817bb4fad7b3385
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 14 15:25:28 2012 +0100
+
+ srd: SPI: probes[]: Add missing MISO and CS lines.
+
+commit de9cee24cf52e42e51434ed542d4506c1fc0901b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 14 15:21:03 2012 +0100
+
+ srd: SPI: s/sdata/mosi/.
+
+commit 4917bb31c6a1e3e77418ac446650a6d9aa3e528b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 14 15:18:41 2012 +0100
+
+ srd: SPI: s/rxdata/mosidata/.
+
+commit a10bfc48b04de832a62a474b34b23f8f24662e9a
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 14 15:17:33 2012 +0100
+
+ srd: SPI: s/rxcount/bitcount/.
+
+commit b1bb5eed4ad056f760bec83e784699dabbd72a18
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 14 02:22:46 2012 +0100
+
+ srd: Fix/update SPI protocol decoder.
+
+commit dbbee4bf6c71d7b3403e465a9dd481962fe7c77b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 14 01:48:20 2012 +0100
+
+ srd: Fix transitioncounter protocol decoder.
+
+commit bbe99ad5311855f2c1e12195ba8632ca8524b654
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 14 01:32:47 2012 +0100
+
+ srd: USB: Move pids dict to global level.
+
+commit 0690a587c96796a4ff1aca2813d45e24a4314504
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 14 01:29:52 2012 +0100
+
+ srd: USB: Update decoder to new API, small fixes.
+
+commit 2b0915c197388c3c40f18875b375b5ca8c9d9387
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Jan 13 18:49:09 2012 +0100
+
+ srd: Add initial DCF77 protocol decoder.
+
+ Works quite well already, but not all details of the protocol are
+ implemented, yet.
+
+commit c0d7b38e465d0f2f704c15f439e625f18122e3a3
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 12 23:20:41 2012 +0100
+
+ srd: nunchuk: Partial update to new stacking API.
+
+ This is unfinished and untested, and probably does not work at all, yet.
+
+commit 2b9837d9fc5f9b4eca52327527e18db4bfb730ff
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 12 22:49:41 2012 +0100
+
+ srd: decoders: Rename obsolete timeoffset/duration.
+
+commit 9a12a6e7af3d7091d8e35dd1c731402cb80a01b0
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 12 22:16:26 2012 +0100
+
+ srd: decoders: Metadata consistency fixes/updates.
+
+commit 957da0732562da1011adb6da95614d67143a607c
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 12 22:07:50 2012 +0100
+
+ srd: i2c: Drop unneeded %s usage.
+
+commit bf1c3f4db0ffbc05f29f81541c551c691ccd2ba7
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 12 21:57:51 2012 +0100
+
+ srd: i2c: Use short-form if-else Python idiom.
+
+commit eb7082c98efad727d88e3ebeadcd496fa948475b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 12 21:43:19 2012 +0100
+
+ srd: Decoders: Cosmetics and whitespace fixes.
+
+ - Remove superfluous whitespace.
+
+ - Add URLs and more info.
+
+ - Consistently use ' instead of " for Python strings.
+
+commit 56202222ed83ff030239bb23be8296574674c4f7
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jan 11 00:52:54 2012 +0100
+
+ srd: Drop duplicate SRD_ prefix from ANN/PROTO.
+
+ Using srd.SRD_OUTPUT_ANN is unneeded, srd.OUTPUT_ANN is better/shorter.
+
+commit d0e93c76e381eff58ca23949301f781b24ba4a8b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Jan 10 22:12:46 2012 +0100
+
+ srd: Drop useless out_ann/out_proto init.
+
+ If those variables are used before start() was called, that's a bug anyway.
+
+commit 677d597b072c0a1d2df81c5c193cd3678aef8d03
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Jan 10 21:10:23 2012 +0100
+
+ srd: Use 'import sigrokdecode as srd' for brevity.
+
+commit e97b6ef569f73e387b2597dfa144c01838c0e27c
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Jan 10 21:05:09 2012 +0100
+
+ srd: annotation -> annotations.
+
+ In the PDs (Python code), the 'annotation' variable/attribute is a list
+ of annotation formats. Use the plural 'annotations' as we do for other
+ lists such as 'inputs', 'outputs', 'probes', 'options', and so on.
+
+commit 94d43b37bd34263f5ed9f7135aac5fe7413c7f07
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Jan 10 20:44:22 2012 +0100
+
+ srd: Finish consistency rename to ANN/PROTO.
+
+commit 6b741b128c9838d2c417e56a6e8b5d377467a3ff
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Jan 10 20:43:52 2012 +0100
+
+ srd: Fix typo in Makefile.am.
+
+commit 42a85ed0aed14216232ae48af1b5b709ec31f800
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Jan 10 20:00:25 2012 +0100
+
+ srd: Minor doxygen cosmetics.
+
+commit 5cc2d7bbc075ef6048bd5cd4e36533e874efb6a7
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Jan 10 02:37:44 2012 +0100
+
+ srd: Add Panasonic PAN1321 decoder (on top of UART).
+
+ This is just a first prototype implementation, it's not finished at all.
+
+commit 7cf79452a87317fe79895302e86ef016b1173ac8
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Jan 10 02:16:53 2012 +0100
+
+ srd: self.add: Use sigrokdecode.SRD_OUTPUT_*.
+
+commit c9b24fc3d2f8c84338f07239edc1d4850164ae0c
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Jan 10 02:11:50 2012 +0100
+
+ srd: output_{protocol,annotation} -> out_{proto,ann}.
+
+commit 2fd89a85c4a1131ca259d794a43b26b8bd84b6a0
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Jan 10 02:06:31 2012 +0100
+
+ srd: s/output_new/add/ for all decoders.
+
+commit 7ce7775cb5a4e97264df62f43315d32504602072
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Jan 10 00:25:16 2012 +0100
+
+ Stacked protocol decoders implementation.
+
+ The DDC decoder takes input from the I2C PD.
+
+commit b231546d63396fd6cac381b12b99caf07687e7e3
+Author: Bert Vermeulen <bert at biot.com>
+Date: Mon Jan 9 00:13:03 2012 +0100
+
+ code cleanup
+
+commit f9a3947a7a8d884de6c55693b216f89b1d27d979
+Author: Bert Vermeulen <bert at biot.com>
+Date: Mon Jan 9 00:12:19 2012 +0100
+
+ srd: change output_new() API call to add()
+
+commit 84b81f1df5a51285e55d808fdfb7968cd70711e9
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Jan 8 20:01:53 2012 +0100
+
+ i2c: fix address handling
+
+commit 983cb0f5b49167328864d0878148a7407becd1c0
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Jan 8 03:20:12 2012 +0100
+
+ pass PD output to the calling frontend, simple annotation viewer in CLI.
+
+commit 61132abd40fb2a69beb1873fa079f1a93a4d6534
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 7 22:06:28 2012 +0100
+
+ srd: UART: Define an output format and document it.
+
+ This is a first attempt, might not be finished or finalized.
+
+commit 5cc4b6a07ccd2fc907650319c7fd6fbd160b6b85
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 7 21:06:16 2012 +0100
+
+ srd: UART: Add more aliases, report invalid bits.
+
+commit 1bb57ab8b3f108aff2cf83cd7dba3744050ec195
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 7 18:57:47 2012 +0100
+
+ srd: UART: Update to new PD annotation API.
+
+commit a565c12819a428b92ea4808114698c5997105e3e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 7 18:42:53 2012 +0100
+
+ srd: UART: Drop 'quick_hack' stuff.
+
+commit 47bd8ddead2ae35b209839255740e3f81ce4b8bc
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 7 17:14:08 2012 +0100
+
+ srd: Add SRD_ERR_BUG.
+
+commit a9f9cab363a8a816f056fdf87b034491b61daea5
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 7 14:15:10 2012 +0100
+
+ More .gitignore files cleanup.
+
+commit 3e2a9de2adfc73a640fa352fdc1ebc804fc98a69
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sat Jan 7 04:18:16 2012 +0100
+
+ expose SRD_OUTPUT_* as symbols in the sigrokdecode module.
+
+commit 0ee4dd54ce134158cd2068866ddc7d32c692d457
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sat Jan 7 03:59:16 2012 +0100
+
+ Decoder.output_new() now takes an extra protocol_id argument.
+
+commit f9afa08467a7a11317f0e40145091a5945a54eda
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sat Jan 7 03:42:26 2012 +0100
+
+ check before calling PyObject_GetAttrString(): this throws an exception.
+
+commit 159699490ea4bf2495e99dcd5fb18b240d7499df
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sat Jan 7 02:50:14 2012 +0100
+
+ convert data coming in from a PD to C structs
+
+ This is in preparation for passing annotation data back to the calling
+ frontend, and python data up to the next protocol in the stack.
+
+commit 721501bf4267db27bd6b848c8a0d4b5016b1f1c0
+Author: Renato Caldas <rmsc at fe.up.pt>
+Date: Fri Jan 6 11:07:37 2012 +0000
+
+ Added "autostuff" to the .gitignore.
+
+commit c66baa8cbe1d5f0b6d6c4fb8cbe8ca05fcdf7763
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 5 21:07:23 2012 +0100
+
+ srd: We use 0/1 instead of False/True at the moment.
+
+commit 958f394e13a2f34f3451e10ec0a85743d6cde70a
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 5 20:58:52 2012 +0100
+
+ srd: Update mx25lxx05d.py to new API.
+
+commit 1f24514c0e276d2844657925e4e423be5297cd2a
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 5 20:56:59 2012 +0100
+
+ srd: Update nunchuk decoder to new API.
+
+commit f9b3b245bce5c8bf6fa63005dcc823904bba0ca8
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 5 20:50:37 2012 +0100
+
+ srd: Update transitioncounter to the new API.
+
+commit ea42f53ece1b82434ba6f5f43e23560b81c102bc
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 5 20:26:54 2012 +0100
+
+ srd: Update USB decoder to the new API.
+
+commit 6b5b91d27aba833af9804bdf9b755790931d2800
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 5 19:00:27 2012 +0100
+
+ srd: Update the SPI decoder to the new API.
+
+commit 29ed0f4c0632530cc6a3dcd723a007927e48701b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 5 16:27:15 2012 +0100
+
+ srd: Convert UART decoder to new API.
+
+commit b67eb0bd213b5259ae4a6f002022e5cab8b149b7
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 5 16:01:25 2012 +0100
+
+ srd: Small Python detection fixes.
+
+commit 631b080a4122fa9a059b9ea51333497c22ffb1f9
+Author: Renato Caldas <rmsc at fe.up.pt>
+Date: Thu Jan 5 14:27:13 2012 +0000
+
+ configure.ac: fixed python3-config detection.
+
+commit bc5f5a434e148db1843be7b02b95a35d21237702
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Jan 5 03:31:36 2012 +0100
+
+ new srd_logic type implementation for PDs to iterate over.
+
+commit 81eb8e80eaf8ddc74f37afd43aae87d9abb9d6af
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jan 4 15:26:41 2012 +0100
+
+ A few more fixes for configure.ac files.
+
+ Add missing checks and quotes, remove superfluous checks, etc.
+
+commit d32ed3bc6ffb2695a597ce09b38a6485023ab6d3
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jan 4 02:50:26 2012 +0100
+
+ sr/srd: Add Doxyfile to the tarball.
+
+commit aa56f7ad4f6238fd994b37bf61ba0efa052c14d5
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jan 4 02:41:33 2012 +0100
+
+ srd: Show config summary, libs, and Python info.
+
+commit a101c52f7651995196a77cb94da65a02583bb1f1
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jan 4 00:44:02 2012 +0100
+
+ srd: configure.ac: Fix version number magic.
+
+commit 087d133da974eff5c74322a0c08b5f91d97c3462
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Jan 3 21:55:48 2012 +0100
+
+ Put most autotools files into autostuff/.
+
+ This yields a slightly more "tidy" top-level directory.
+
+commit 71071bcfd36bed13b110931a6cc8189a1493dd2a
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Jan 3 20:26:29 2012 +0100
+
+ srd: Remove decode() docstrings.
+
+ This info is in the decoder's metadata, where the frontends can get it
+ from programmatically anyway.
+
+commit 066e65a3a60ef5836d9e75b8dffeb55a152efe4d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Jan 3 20:08:18 2012 +0100
+
+ srd: Put files into .../share/libsigrokdecode.
+
+commit 73191416cc24884ffab5f21cc3405c7757884fba
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Jan 3 19:56:01 2012 +0100
+
+ sr/srd: Fix left-over #includes.
+
+ The libs themselves should use #include "sigrok.h" etc., while the
+ frontends must use #include <sigrok.h> and so on.
+
+commit fb53ee5e242be7781b0d34a7d006c630095bcb72
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Jan 3 19:36:30 2012 +0100
+
+ srd: *.py: Remove one incorrect ord() call.
+
+ While 'data' is of type 'bytes', 'data[0]' for example is of type 'int',
+ thus the ord() there is neither needed nor correct anymore (yields an error).
+
+commit f6555179b242357f9c75b1f6178537de2001cd98
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Jan 3 19:30:17 2012 +0100
+
+ srd: Quick hack to make nunchuk.py work again.
+
+commit f90fe506f8480047a3ba23a2bc99066fa2d208f0
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Jan 3 19:17:01 2012 +0100
+
+ srd: Quick hack to make mx25lxx05d.py work again.
+
+ In Python 3 there's no xrange() anymore, only range().
+
+commit 862f6f270752e93fdd172a0e3d460349890ef191
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Jan 3 19:13:48 2012 +0100
+
+ srd: Quick hack to make transitioncounter.py work again.
+
+commit b327337fcc92b9e6e8703ded4caa61cb8734534a
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Jan 3 18:33:43 2012 +0100
+
+ srd: Quick hack to make the USB decoder work again.
+
+commit ffe880e79ccd98de803706e0a02c0df2574e29ee
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Jan 3 18:32:08 2012 +0100
+
+ srd: Quick hack to make the SPI decoder work again.
+
+ Since Python 3 there are some explicit int() casts needed.
+
+commit 2642062273901c87e7eee597c96cab6a606ec104
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Jan 3 17:47:55 2012 +0100
+
+ srd: Quick hack to make the UART decoder work again.
+
+commit 084f0f94deedb52ced0c96590a621339973eb7a7
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Jan 2 14:23:15 2012 +0100
+
+ srd: configure.ac: Add comment.
+
+commit 804404fc6d9393e4169c64f47c5adefaefb61480
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Dec 30 22:38:25 2011 +0100
+
+ Split README, add appropriate ones per-project.
+
+commit 2891e1bc35f9e3dd1faaa60484d5ddd774f80028
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Dec 30 10:50:00 2011 +0100
+
+ sr/srd: Remove/fix non-applicable autotools stuff.
+
+commit a190e97997d091a6a1ff53d4f50ce6eae26ab9ae
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Dec 30 10:42:39 2011 +0100
+
+ sr/srd: Move some files to their resp. dirs.
+
+commit 81fc8c6bdea80ea4abf6ed636f88bf5e93b26420
+Author: Kristoffer Sjöberg <ksjoberg at q1.se>
+Date: Wed Dec 28 15:14:31 2011 +0100
+
+ Fix utf8 encoding error by changing the Python parameter to a bytes() object (python3 regression).
+
+commit 8b4bbd2a0bcfdc2e186b345de087f23b9c904080
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Dec 28 13:40:23 2011 +0100
+
+ better python memory management
+
+commit 5f802ec6473029e89d2db9cbd71cf0ce86a1b653
+Author: Bert Vermeulen <bert at biot.com>
+Date: Tue Dec 27 22:15:53 2011 +0100
+
+ python 3 port
+
+commit 1aef2f93a29f01168c04fd0478b29af290d8756b
+Author: Bert Vermeulen <bert at biot.com>
+Date: Thu Dec 15 03:31:31 2011 +0100
+
+ make time/duration work, at least when loading from a session file
+
+ PD decode() call now takes 3 arguments: timeoffset, duration, data
+ as per the current API specification.
+
+commit e508088229e96423854ba6db63084c9bb18eeb34
+Author: Bert Vermeulen <bert at biot.com>
+Date: Wed Dec 7 09:56:49 2011 +0100
+
+ new dynamic output stream registration code, not finished.
+
+commit a62186e44c606a8d4cb45b3d8c3cc9fa6a5038ea
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Dec 21 19:09:46 2011 +0100
+
+ srd: SRD_ERR_ARGS -> SRD_ERR_ARG.
+
+ This is done to be consistent with libsigrok's SR_ERR_ARG (nicer that way).
+
+commit 43c0a640533331c45ed1b46725524773085de99e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Dec 21 18:57:04 2011 +0100
+
+ srd: Add logging framework.
+
+ This includes the (private) functions srd_err() and friends, the
+ (public) SRD_LOG_ERR macros and friends, and the (public) API functions
+ srd_set_loglevel() and srd_get_loglevel().
+
+commit 1b1c914fe5c1b88db6e0b8e49bee896428d483cb
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Dec 17 17:29:10 2011 +0100
+
+ srd: Add MX25Lxx05D SPI chip decoder.
+
+ Work in progress, not yet fully functional.
+
+commit bffd9bc09c76aa2189f89e76fd4a0aa314418193
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Dec 10 16:57:16 2011 +0100
+
+ srd: nunchuk: Make states global.
+
+commit e9de9c90da6bd8c6a2314fb68f37cefc0a480926
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Dec 10 16:54:47 2011 +0100
+
+ srd: decoders: Don't use problematic and/or construct.
+
+commit 5b6b4f7759cf726bbfc00bd30b2e02cdea33cc6d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Dec 7 19:45:40 2011 +0100
+
+ srd: UART: Simplify a code snippet.
+
+commit 6efe1e1106bd648705f6f704ed2f267c86035dac
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Dec 7 19:43:24 2011 +0100
+
+ srd: UART: Add some protocol documentation.
+
+commit f44d2db2a027857bdfbfc18e40b9900cad1b0e1d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Dec 7 02:03:25 2011 +0100
+
+ srd: Add initial UART decoder.
+
+ Works with any baudrate, number of bits, parity types, number of stop
+ bits and so on, in theory. Not all options are fully implemented or
+ tested though. Various TODOs remain.
+
+commit 6547acfda9913a8856e2c875dc3f340570d80583
+Author: Gareth McMullin <gareth at blacksphere.co.nz>
+Date: Mon Dec 5 20:31:32 2011 +1300
+
+ srd: Initialise struct members by name. Minor other fixes.
+
+ Restored some prototypes in sigrokdecode.h.
+ Abort sigrok-cli on error while decoding (includes KeyboardInterrupt).
+ Fixed passing metadata to Decoder.start() method.
+
+commit 09b0acbb8dd292794e7fc797352cda47c27a1355
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Dec 4 23:36:52 2011 +0100
+
+ srd: Bring back the 'id' field and use it.
+
+commit 1c8ac5bf07e0ded582234c9ef50ba10f042bae52
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Dec 4 20:59:56 2011 +0100
+
+ srd: Update decoders to changed API.
+
+commit b2c19614a6c4eaa0170971d1261a1bb25212e277
+Author: Bert Vermeulen <bert at biot.com>
+Date: Sun Dec 4 10:33:02 2011 +0100
+
+ refactored PD framework, now using new sigrok.Decoder object
+
+ This uses the new python unified type/class object API to construct
+ an object for PDs to subclass. The sigrok.Decoder class has a method
+ put() which is implemented as a C function, and receives the PD's
+ object instance as its first parameter.
+
+commit 2b7d0e2bf5147025e9d76d14e266b9905503b957
+Author: Gareth McMullin <gareth at blacksphere.co.nz>
+Date: Fri Dec 2 06:44:42 2011 +1300
+
+ srd: Changed nunchuk and transitioncounter to new registraion api.
+
+commit 67e847fd2185aa5677954dceacf3c279d7a68af1
+Author: Gareth McMullin <gareth at blacksphere.co.nz>
+Date: Thu Dec 1 23:09:40 2011 +1300
+
+ srd: PDs now explicitly register with sigrok module.
+
+commit 400f9ae7ff16bb611d758d75ff4931b667561b11
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Dec 1 11:04:35 2011 +0100
+
+ srd: i2c.py: States are global, not per-instance.
+
+commit 9611dc5f8b88f0dc43fbb00a91d1222ee720d2b6
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Nov 30 23:14:19 2011 +0100
+
+ srd: srd_usb.py: Cosmetics, white-space fixes.
+
+commit 16ba97cf2252bc9543f70a0cf3e7d4b2ec6e7ee1
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Nov 30 00:19:16 2011 +0100
+
+ srd: nunchuk.py: Add some more URLs.
+
+commit 03325c23133175d4d1ea86b361c92b8cb12b1b36
+Author: Gareth McMullin <gareth at blacksphere.co.nz>
+Date: Tue Nov 29 23:50:32 2011 +1300
+
+ srd: Added USB full-speed decoder.
+
+commit 012cfd0d620a42165e964c9443bbcde1e4d24b6d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Nov 28 21:46:55 2011 +0100
+
+ srd: nunchuk.py: Convert to new decoder API.
+
+ This is not really finished, or tested, or working. It's also a decoder
+ which stacks on top of the I2C decoder, and the infrastructure for
+ stacking decoders is not yet usable.
+
+commit 60b928b2c9d3fa31f42c25613f2f07bc9e44fff5
+Author: Gareth McMullin <gareth at blacksphere.co.nz>
+Date: Mon Nov 28 22:54:18 2011 +1300
+
+ srd: Moved instance list to libsigrokdecode.
+
+ Functions changed to srd_session_start() to initialise the session,
+ and srd_session_feed() to feed sample data to the decoders.
+
+commit 73e542a4611411411a6df4843d62576e25ddeb7c
+Author: Gareth McMullin <gareth at blacksphere.co.nz>
+Date: Mon Nov 28 21:52:35 2011 +1300
+
+ srd: Pass samplerate to decoder in metadata.
+
+commit 4e338c00bda2e81210bf7569f29b77999a1d2bfb
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Nov 27 22:27:36 2011 +0100
+
+ decoders: Drop psyco stuff, seems obsolete.
+
+ The psyco module seems to be mostly unmaintained at this point, it does
+ not support Python 2.7 or higher at all, it only supports x86, it doesn't
+ support 64 bit systems at all, etc. etc.
+
+ We should try to find other ways to optimize our decoders for speed.
+
+commit e100d51ec0909db8f93c837ea1fd92a08461b781
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Nov 27 22:17:54 2011 +0100
+
+ srd: Python: Consistently use single quotes for strings.
+
+commit c4262fd6b2f8ef540b8cc93ac61956d89062d2be
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Nov 27 22:12:37 2011 +0100
+
+ srd: i2c.py: Docstrings should use """.
+
+ This is the most commonly used and recommended method for docstrings.
+
+commit 5dd9af5bdc48c0b90512b2782bad893f76ee4a0b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Nov 27 21:51:39 2011 +0100
+
+ srd: i2c.py: Mark Repeated Start condition as 'Sr'.
+
+commit 7b86f0bc7a0009e928e4bcc250c3e0cc12dda7ac
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Nov 27 20:17:49 2011 +0100
+
+ srd: i2c.py: Rework I2C decoder.
+
+ This should be working OK for most use-cases now, though there certainly
+ are a few TODOs left. The output format is just a quick hack and will
+ change.
+
+commit 3643fc3fe053bf531b4a7618d02c3d92c29f924b
+Author: Gareth McMullin <gareth at blacksphere.co.nz>
+Date: Sun Nov 27 19:17:13 2011 +1300
+
+ srd: Pass metadata to decoders only on SR_DF_HEADER.
+
+ Before this was passed to the decoder's constuctor, but the parameters
+ may not all be known at construction. Decoders now have a method start()
+ which is called at the start of the capture, and metadata is passed as
+ an arg to this function.
+
+commit f39d2404acb54461f61b676ab164d42e9e76e3fa
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Nov 24 09:35:26 2011 +0100
+
+ srd: i2c.py: Convert to new API (unfinished).
+
+ This decoder is probably not fully converted yet, and doesn't really
+ successfully decode I2C, yet. It's work in progress.
+
+commit 4be5b85eed190fd0a57b0c23ae706ec37ed1dfe5
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Nov 24 01:24:46 2011 +0100
+
+ srd: Comment out debug line for now.
+
+commit b41ae47fa350bc0b6c81f0411cc12b9741a7e4e0
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Nov 23 23:08:39 2011 +0100
+
+ transitioncounter.py: Convert to new API.
+
+ This is still work-in-progress, but at least it runs and outputs stuff now.
+
+commit 81370309fbf8453b19c8ddfa09ed65064fd72c6e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Nov 23 23:05:01 2011 +0100
+
+ nunchuk.py: Fix indentation (syntax error).
+
+commit ad2dc0de10ac5c2c6c3aacff0b2835cd4dc22578
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Nov 23 16:15:55 2011 +0100
+
+ Decoders: Use 4 spaces for indentation as per PEP-8.
+
+commit 0d1cf0f842116f852ada53c25a2579437622859e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Nov 23 09:17:48 2011 +0100
+
+ srd: decode.c: Improve error handling a bit.
+
+commit 261d65327fa3a70b06d7e5b05c03c44cbb3b7eac
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Nov 23 09:09:30 2011 +0100
+
+ srd: decode.c: Add/fix comments and coding-style.
+
+commit c75080f0d84de5f2aa73472ad4d6cf32aaeba88e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Nov 23 08:56:44 2011 +0100
+
+ srd: Doxygen comments for srd_init() and srd_exit().
+
+commit f97f531c2d31b729afbf1c97a0d017526bf8e52a
+Author: Gareth McMullin <gareth at blacksphere.co.nz>
+Date: Sun Nov 20 18:39:50 2011 +1300
+
+ libsigrokdecode: Allow frontend to configure decoder probes.
+
+commit 74911b4c1f6d184dac878d94992d480af0564734
+Author: Gareth McMullin <gareth at blacksphere.co.nz>
+Date: Sun Nov 20 16:30:38 2011 +1300
+
+ libsigrokdecode: Allow multiple PD instances.
+
+ There is currently no way to configure options or probes, so they'll
+ always be the same, but it's a start.
+
+commit 6eb875784c96db52e962f40df24035c31c5be738
+Author: Gareth McMullin <gareth at blacksphere.co.nz>
+Date: Sun Nov 20 13:07:44 2011 +1300
+
+ libsigrokdecode: Move decoder metadata into Decoder object.
+
+commit 052f32eee3b5e2f850f529c003bc90ef0bb88cc9
+Author: Gareth McMullin <gareth at blacksphere.co.nz>
+Date: Tue Nov 15 18:47:15 2011 +1300
+
+ Simplified code for calling Python decode method.
+
+commit 3b24e3781a0374ce2d66f1d3de59a5a5d10d657a
+Author: Kristoffer Sjöberg <ksjoberg at q1.se>
+Date: Mon Nov 14 10:07:29 2011 +0100
+
+ Add support for OO based PDs.
+
+commit 9d29ffadbe10efe400b1ced74636b8ee203f1e48
+Author: Kristoffer Sjöberg <ksjoberg at q1.se>
+Date: Sun Nov 13 03:11:40 2011 +0100
+
+ Pass multiple samples to the protocol decoder and adapt transitioncounter.py to work with this.
+
+commit 71a133c83c0df02d8c016ec8c192f070ad8a37fd
+Author: Kristoffer Sjöberg <ksjoberg at q1.se>
+Date: Sun Nov 13 00:27:58 2011 +0100
+
+ Update transitioncounter.py to the streaming PD API.
+
+commit 922763abc279fc5d4e0ed93ed6c6bebbf68d7baf
+Author: Kristoffer Sjöberg <ksjoberg at q1.se>
+Date: Sat Nov 12 23:42:52 2011 +0100
+
+ Partial implementation of the streaming PD API.
+
+commit 7c3d8112204315d717b85bc4c71ecbf3ccf54f51
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Nov 19 18:10:32 2011 +0100
+
+ libsigrokdecode.pc.in: Add missing @CPPFLAGS_PYTHON at .
+
+commit 13f95f7392e87e4b1846266ecee68d75dd3c3453
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Nov 17 22:42:30 2011 +0100
+
+ libsigrokdecode.pc: Add glib + Python.
+
+commit f7b07643a758affd60c8ff0f6b1661faf9e5d5f7
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Apr 3 23:18:46 2011 +0200
+
+ Revert temporary changes for 0.2 release.
+
+commit a5ec180ff8b7d91d4b96b4e7469424622dfe9234
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Apr 3 22:38:35 2011 +0200
+
+ Disable some stuff which should not be in 0.2.
+
+ Disable decoders, disable lib building.
+
+commit e36d7343ffed4be56b0bbc278aee26671c9990a5
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Apr 3 19:48:09 2011 +0200
+
+ Decoders: s/dist_pkgdata_SCRIPTS/dist_pkgdata_DATA/.
+
+ The .py decoder files are not technically scripts and should not be
+ executable and can not be invoked on the command line
+ (via ./foo.py --help or similar).
+
+commit a0d4825744bd5bc2cd18a51e8339faf11b9d87c4
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Feb 22 23:12:41 2011 +0100
+
+ Make some more items 'static'.
+
+commit 775dda7af58ad9a6bb45ef05634bed59497bb305
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 9 00:01:02 2011 +0100
+
+ sigrokdecode.h: More doxygen-friendly comments.
+
+commit f430ac36e41823b96552ae0dccd4a7970ecf5782
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Feb 8 23:46:29 2011 +0100
+
+ Doxygen config files: Initial configuration.
+
+commit 58d1fb8f967468abdbf58cd85e967c6d94043295
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Feb 8 23:00:49 2011 +0100
+
+ Add doxygen config files for both libs.
+
+commit 75a282e54f566cb6bc9b684dd1bf63d7e36a68b3
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Feb 6 17:36:32 2011 +0100
+
+ struct srd_decoder: Add more string fields.
+
+ Get the following string fields from the .py decoders' register()
+ function and store them in the respective 'struct srd_decoder':
+
+ - longname
+ - longdesc
+ - author
+ - email
+ - license
+
+commit 4ed59136f8033c2cb745302bfd42d359c541e64b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Feb 6 17:29:44 2011 +0100
+
+ Python decoders: Add more metadata.
+
+ Make the list of metadata info match the spec in the wiki more closely.
+
+commit 959933226cb93b87d3c07c01c8af63840200671e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Feb 4 20:11:17 2011 +0100
+
+ Revert FIRMWARE_DIR / DECODERS_DIR method for now.
+
+ There were several issues with the other method, revert for now.
+
+commit 17830fe1a2445c109761a5f50aa9f6d665157cd0
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Feb 2 10:25:52 2011 +0100
+
+ Fix build when no libusb-LA is compiled.
+
+ Until now the build would break if the user doesn't enable at least one
+ of the libusb1.0-based LAs. I.e., you could not compile only OLS, or
+ only the demo driver.
+
+commit 7ea73e33f50211a1b3df6556f6fcfcbab6c36735
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Jan 30 19:22:13 2011 +0100
+
+ Consistently use _exit prefix for functions.
+
+commit d752b12b7d6f5795e82aa43b395247a82be54670
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 29 15:41:39 2011 +0100
+
+ Change SIGROKDECODE_ prefix to SRD_.
+
+ Do the same for sigrokdecode_ -> srd_ in struct names and function names.
+
+commit f9b54a6ca92f1d1532237db0439fc772789f3718
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Jan 28 00:56:46 2011 +0100
+
+ Properly free all memory upon sigrokdecode_shutdown().
+
+commit 53bec0cfaef9ce8c646deee7d9ba6340137713a1
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Jan 28 00:11:00 2011 +0100
+
+ libsigrokdecode: Always load all decoders upon init.
+
+ Let sigrokdecode_init() always load all decoders it can find in the
+ decoders directory, i.e., the user doesn't need to manually load decoders.
+ Instead he can just look up the list via sigrokdecode_list_decoders()
+ after sigrokdecode_init() has run.
+
+ This is not a problem, as sigrokdecode_init() is only run once per
+ sigrok-cli or sigrok-gui invocation, and even with many decoders this
+ should not take too long.
+
+ The list of decoders within libsigrokdecode is no longer a string, but
+ rather a list of 'struct sigrokdecode_decoder *' pointers.
+
+ Add sigrokdecode_get_decoder_by_id() API function which returns the
+ decoder with the specified ID (file name without ".py" suffix, for now),
+ or NULL if it cannot be found.
+
+ sigrokdecode_load_decoder() is now a private function and not exported
+ via the lib, i.e. not available to users of libsigrokdecode.
+
+commit 76672e26c961d3161b7e67e47d46d0264c9f5c04
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 27 23:17:47 2011 +0100
+
+ Fix some compiler warnings.
+
+commit c7bb5dff3a5259ce7e59db7932580173462b00a1
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 27 23:12:34 2011 +0100
+
+ decode.c: Simplify the import code.
+
+ Use PyImport_ImportModule() instead of PyImport_Import(), so we don't
+ have to temporarily create a py_name object.
+
+commit f7313eeaf3b64fafa792a225a2b70c745e8d5cc6
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 27 23:02:39 2011 +0100
+
+ Some more simplifications in decode.c.
+
+commit 2557ad9d2de490cab14ae0b3a197de2b1c7f9f21
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 27 22:53:29 2011 +0100
+
+ Use Py_XINCREF/Py_XDECREF, not Py_INCREF/Py_DECREF.
+
+ They're defined like this in Python.h:
+
+ /* Macros to use in case the object pointer may be NULL: */
+ #define Py_XINCREF(op) if ((op) == NULL) ; else Py_INCREF(op)
+ #define Py_XDECREF(op) if ((op) == NULL) ; else Py_DECREF(op)
+
+ I.e., the performance penalty we take by using Py_XINCREF/Py_XDECREF is
+ pretty much non-existant.
+
+commit 036e6f672169c63fb304f3842667e3a09879b512
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 27 22:50:57 2011 +0100
+
+ decode.c: Simplify sigrokdecode_run_decoder().
+
+commit 4fa17efc0be6542055476bd7764fc04391bc652d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 27 22:13:08 2011 +0100
+
+ Bugfix: Add missing Py_INCREF()s.
+
+ This should fix an error/segfault when running a decoder on bigger
+ datasets.
+
+commit 6b08da24ec79989565e5417cf111a243073cd2fd
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 27 21:07:40 2011 +0100
+
+ decode.c: Better documentation.
+
+ Mark all Python/C API functions returning a new reference with "NEWREF",
+ and those that steal references with "STEAL".
+
+commit 3a9a7e38cc74b4da07b03fafbc6674a20510d79e
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 27 20:57:09 2011 +0100
+
+ decode.c: Fix typos.
+
+commit f800adc478591cff0a462ae51af105eebfb7a9f4
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 27 20:56:39 2011 +0100
+
+ Bugfix: PyTuple_SetItem() "steals" a reference.
+
+commit d842aebec31fd21fe0803cb9504ded698f6c1457
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Jan 24 00:24:27 2011 +0100
+
+ configure.ac: Fix firmware/decoders dir variables.
+
+ FIRMWARE_DIR and DECODERS_DIR as defined in config.h need some magic applied
+ to resolve the $prefix/$data variable to an absolute path.
+
+commit 7492a27a7873120d28e4cabf3abad28204ff8844
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Jan 23 19:53:50 2011 +0100
+
+ Introduce proper libtool versioning for the libs.
+
+commit 253f9603f8d022b2a948be0f2f572f5281f1b4e6
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 20 23:00:59 2011 +0100
+
+ lib headers: Add 'extern "C"' for C++ usage.
+
+commit 81c9bc4448af804376f86cb3373ced99414071a9
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Jan 20 00:39:59 2011 +0100
+
+ Re-enable stuff we temporarily disabled for 0.1.
+
+commit 17891ce2b00e2bea78f66c56a141ae8512a838df
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jan 19 22:32:00 2011 +0100
+
+ Disable decoders and session CLI options for 0.1.
+
+commit 0a746957146a36a5450a9918acb511eae95e9a04
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Jan 19 19:20:44 2011 +0100
+
+ Don't install libs and headers in the 0.1 release.
+
+ The library APIs are not yet usable or finalized, so don't expose the
+ libs for now. Instead, only install sigrok-cli, the manpages, and
+ the decoders.
+
+commit 104260684195431f4023acad96ba37787a14a6ab
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 15 04:26:07 2011 +0100
+
+ libsigrokdecode fix to handle unusual dirnames.
+
+ Windows paths such as c:\... and/or those with spaces in them were
+ problematic.
+
+commit 0895f56aa091fabc4761862f43020b53396ed9d5
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 15 03:30:26 2011 +0100
+
+ Only load decoders from $(datadir)/sigrok/decoders.
+
+ Drop convenience locations which were supposed to allow running
+ ./cli/sigrok-cli in the build directory. That will not really work fine
+ due to some other reasons. We only support running sigrok-cli after an
+ installation (into /usr/local or /opt or $HOME/sigrokinst or whatever).
+
+commit 5b05904dc5dd1182fdf381b66fbc4a7ad97e37aa
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 15 03:07:00 2011 +0100
+
+ Don't print .py suffix in protocol decoder names.
+
+commit 276b55eb6e4308cfaf6b18b457f514b2f9409cc5
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 15 03:00:15 2011 +0100
+
+ Bugfix: Use only .py decoders, ignore .pyc files.
+
+commit 871d21e2555c345350ec951f1639b4a75dbd4fea
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 15 02:37:51 2011 +0100
+
+ Don't expose libsigrokdecode's interal GSList.
+
+ Instead, add a libsigrokdecode_list_decoders() API call which gives you
+ the list of known protocol decoders.
+
+commit f301bde35eda4b33218d947243da33ef11d52d47
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 15 02:32:03 2011 +0100
+
+ Install decoders into a decoders/ subdir.
+
+ Use $(datadir)/sigrok/decoders as subdirectory for the protocol decoders
+ (instead of installing them in the top-level $(datadir)/sigrok), just
+ as we do for $(datadir)/sigrok/firmware.
+
+commit 7c24d086f1c81fd23fd93e5702c6f46a36f3d3f6
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 15 01:44:41 2011 +0100
+
+ CLI: Support for running protocol decoders.
+
+ Add a new -A | --list-protocol-decoders option to show the list of
+ protocol decoders we could find.
+
+ Add -a | --protocol-decoders to specify a list of decoders that shall
+ be applied to the datastream. Currently only works for one decoder.
+
+ Define DECODERS_DIR, which is the directory where the decoders will be
+ installed upon 'make install', and where libsigrokdecode_init() will
+ search for them.
+
+ Thanks Olivier Fauchon <olivier at aixmarseille.com> for the initial patch,
+ merged in slightly different form.
+
+commit 9c93add5aeca95c568afab7fe249c0586d8dec6b
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Jan 10 23:27:15 2011 +0100
+
+ Rename the scripts/ directory to decoders/.
+
+commit e6c7a826d9617bafb24ac05e05cd8e1e7ad1f9cc
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Jan 8 17:00:18 2011 +0100
+
+ Fix compile for Python >= 3.0.
+
+ Python docs tells us more about string functions:
+ "These functions have been renamed to PyBytes_* in Python 3.x. Unless
+ otherwise noted, the PyBytes functions available in 3.x are aliased to
+ their PyString_* equivalents to help porting."
+ (http://docs.python.org/c-api/string.html)
+
+ Use #defines to map the new names and fix the compile for Python >= 3.0.
+
+ Thanks Olivier Fauchon <olivier at aixmarseille.com> for the patch.
+
+commit 70e44845f0138666d78fc2a13acc4e37fc63c4f9
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri May 14 12:50:01 2010 +0200
+
+ libsigrokdecode: Use SIGROKDECODE_OK.
+
+commit 0862329b41482ce690e868a99db75e8830bf9877
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue May 11 21:55:35 2010 +0200
+
+ pkg-config: Add libsigrokdecode.pc.
+
+commit 32e4aea0f87b0d3d4f8e37516edddc19f6f36889
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue May 11 17:16:38 2010 +0200
+
+ Use CLEANFILES instead of extra target.
+
+commit e7eac430fcd764fa72e3b2d06d00718fbdff0a11
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun May 9 21:07:03 2010 +0200
+
+ scripts: Add clean-local target for *.pyc.
+
+commit 9a67ccfdbed90fdb47232708b143ffbf403b2e80
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue May 4 23:19:31 2010 +0200
+
+ I2C: Convert output to more usable format.
+
+commit 15167916e6e9d88b2b421c3ce2a80f7b29f25ce0
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Apr 27 23:18:05 2010 +0200
+
+ i2c.py: Fix typo resulting in a nonworking script.
+
+commit cd0fc8c53f8f2d61375da310b924825f0bddc549
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Apr 27 23:13:45 2010 +0200
+
+ Add Python decoder for the Wii Nunchuk.
+
+ Untested, unfinished.
+
+commit 23fb2e12078a679b737aa3ec128b8af3a7923692
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Apr 24 16:52:55 2010 +0200
+
+ I2C decoder format draft (unfinished).
+
+commit a156f09eac00be0f6d8beaeadef77b03077ab7b1
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Apr 24 01:33:52 2010 +0200
+
+ Various small decoder script fixes.
+
+commit 87f03ae9f2bf5df0e671881b679b25feccbe2fde
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Apr 24 01:12:09 2010 +0200
+
+ dist_pkgdata_SCRIPTS: Add i2c.py.
+
+commit 5c55017c401002c18b1d43dad61200df17ab3321
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sat Apr 24 01:04:20 2010 +0200
+
+ Various Python decoder infrastructure improvements.
+
+ - Introduce 'struct sigrokdecode_decoder'.
+
+ - Decoders are now handled via two C functions:
+ - sigrokdecode_load_decoder(): Fills a 'struct sigrokdecode_decoder'.
+ - sigrokdecode_run_decoder(): Runs a decoder function.
+
+ - There are now two decoder API functions a script needs to implement:
+ - register(): Returns a Python dict with certain metadata.
+ - decode(): Runs the actual decoder code.
+
+ - libsigrokdecode: Add and use some more #defines for errors:
+ - SIGROKDECODE_ERR_ARGS
+ - SIGROKDECODE_ERR_PYTHON
+
+ - Various other smaller Python decode script infrastructure issues.
+
+commit 31b82285e5ca1fbd6a33eaaaa95bf83862b69eb1
+Author: unknown <Uwe at .(none)>
+Date: Fri Apr 23 18:49:17 2010 +0200
+
+ sigrokdecode.h: Add struct sigrokdecode_decoder_info.
+
+commit 23a13b21b38211c73cbe0418a88060f0586cc065
+Author: unknown <Uwe at .(none)>
+Date: Fri Apr 23 18:47:43 2010 +0200
+
+ Rename sigrokdecode_register_i2c() to register().
+
+commit 6fe63193b0ff900335b791aba8099ab44f7b0c8a
+Author: unknown <Uwe at .(none)>
+Date: Fri Apr 23 18:46:36 2010 +0200
+
+ transitioncounter: Add register() function.
+
+commit 2b45dd716c3f27a62d163de7ec12f6c225ef4e39
+Author: unknown <Uwe at .(none)>
+Date: Fri Apr 23 18:06:22 2010 +0200
+
+ sigrokdecode_run_decoder(): Pass in the module name.
+
+commit 33e72c5440ab5973bcb99b5c133e0cdcf15636e8
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Wed Apr 21 20:31:10 2010 +0200
+
+ Python: Use "enums" as states, not strings.
+
+ Also, fix a typo.
+
+commit 930bd9d961b9a13259ffb4997be9fa6ebcdb9da9
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Apr 18 03:15:06 2010 +0200
+
+ Python: Bugfixes (True/False != 1/0).
+
+commit a5fdab452f682e50cc05d6f392f750473fd93e78
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Apr 18 02:02:35 2010 +0200
+
+ Python: Use range instead of xrange.
+
+ For small numbers range seems to be faster, and xramge is being removed
+ anyway in Python 3 AFAIK.
+
+commit 2454527da4eeb27683f64ffdc3311d4ac00b3a04
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Apr 18 01:58:45 2010 +0200
+
+ sigrokdecode_init: Add more Python search paths.
+
+commit c11d3c15af2e3ebd04af9326a5f95f9b212f6a8d
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Apr 18 01:54:49 2010 +0200
+
+ transitioncounter.py: Simplify and optimize a bit.
+
+commit 3cf4ed56626bf1b775d38e3b582bae2c607d44b2
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Thu Apr 15 20:07:16 2010 +0200
+
+ libsigrok: Coding style fixes.
+
+commit 887d6cfa6a924254a9a96a3cc704e6189a53b944
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Mon Apr 12 19:42:35 2010 +0200
+
+ Use psyco (if available) to improve performance.
+
+commit 0588ed702725edbb5ed37ceb63fced93a5e68251
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Apr 11 21:44:12 2010 +0200
+
+ First attempt at an I2C decoder (untested).
+
+commit d0f3d67746c89ee19f4c7a8d6f8858afd54347de
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Sun Apr 11 03:58:05 2010 +0200
+
+ Implement a simple transition counter script.
+
+commit 910e5fd8a73ac006bd5fa341b3f3cf3d9318b4f0
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Apr 9 22:18:46 2010 +0200
+
+ Fix all warnings and re-enable -Wextra.
+
+commit 3a72d2b31f43788996777b11bff672c0c0e76798
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Apr 6 02:11:01 2010 +0200
+
+ More paths to the libsigrokdecode Python scripts.
+
+commit 3aca097f7fa3bd75693954806d64281239cad2fd
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Apr 6 02:06:55 2010 +0200
+
+ Fix incorrect path to the Python decoder scripts.
+
+commit a4898be72e8018462f02e117376625454974cd99
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Tue Apr 6 01:29:32 2010 +0200
+
+ libsigrokdecode: Add initial return code list.
+
+commit 1c6fa20f549c0565ce4fae6ddf7d5eb60db2ddea
+Author: Uwe Hermann <uwe at hermann-uwe.de>
+Date: Fri Apr 2 20:18:27 2010 +0200
+
+ Start of code base layout restructuring.
diff --git a/Doxyfile b/Doxyfile
new file mode 100644
index 0000000..c86834c
--- /dev/null
+++ b/Doxyfile
@@ -0,0 +1,2318 @@
+# Doxyfile 1.8.6
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
+# The format is:
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all text
+# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
+# for the list of possible encodings.
+# The default value is: UTF-8.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
+
+PROJECT_NAME = "libsigrokdecode"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
+
+PROJECT_NUMBER = "0.3.0"
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF = "sigrok protocol decoding library"
+
+# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
+# the documentation. The maximum height of the logo should not exceed 55 pixels
+# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
+# to the output directory.
+
+PROJECT_LOGO = contrib/sigrok-logo-notext.png
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
+
+OUTPUT_DIRECTORY = doxy
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
+# directories (in 2 levels) under the output directory of each output format and
+# will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system.
+# The default value is: NO.
+
+CREATE_SUBDIRS = YES
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
+# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
+# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
+# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
+# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
+# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
+# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
+# Ukrainian and Vietnamese.
+# The default value is: English.
+
+OUTPUT_LANGUAGE = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+# The default value is: YES.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
+
+ABBREVIATE_BRIEF =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# doxygen will generate a detailed section even if there is only a brief
+# description.
+# The default value is: NO.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+# The default value is: NO.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
+
+FULL_PATH_NAMES = YES
+
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
+
+STRIP_FROM_PATH =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
+
+SHORT_NAMES = YES
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
+
+JAVADOC_AUTOBRIEF = YES
+
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
+
+INHERIT_DOCS = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
+# new page for each member. If set to NO, the documentation of a member will be
+# part of the file/class/namespace that contains it.
+# The default value is: NO.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
+
+TAB_SIZE = 8
+
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:\n"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". You can put \n's in the value part of an alias to insert
+# newlines.
+
+ALIASES =
+
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding "class=itcl::class"
+# will allow you to use the command class in the itcl::class meaning.
+
+TCL_SUBST =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_FOR_C = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
+
+OPTIMIZE_FOR_FORTRAN = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_VHDL = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
+# (default is Fortran), use: inc=Fortran f=C.
+#
+# Note For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen.
+
+EXTENSION_MAPPING =
+
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT = YES
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by by putting a % sign in front of the word
+# or globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
+
+BUILTIN_STL_SUPPORT = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+# The default value is: NO.
+
+CPP_CLI_SUPPORT = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
+
+SIP_SUPPORT = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
+
+IDL_PROPERTY_SUPPORT = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+# The default value is: NO.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
+
+SUBGROUPING = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
+
+TYPEDEF_HIDES_STRUCT = NO
+
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
+
+EXTRACT_ALL = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
+
+EXTRACT_STATIC = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
+
+EXTRACT_LOCAL_CLASSES = NO
+
+# This flag is only useful for Objective-C code. When set to YES local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO only methods in the interface are
+# included.
+# The default value is: NO.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO these classes will be included in the various overviews. This option has
+# no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# (class|struct|union) declarations. If set to NO these declarations will be
+# included in the documentation.
+# The default value is: NO.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+# names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+# The default value is: system dependent.
+
+CASE_SENSE_NAMES = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES the
+# scope will be hidden.
+# The default value is: NO.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
+
+FORCE_LOCAL_INCLUDES = NO
+
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO the members will appear in declaration order.
+# The default value is: YES.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
+# The default value is: NO.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
+
+SORT_GROUP_NAMES = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
+
+SORT_BY_SCOPE_NAME = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING = NO
+
+# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
+# todo list. This list is created by putting \todo commands in the
+# documentation.
+# The default value is: YES.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
+# test list. This list is created by putting \test commands in the
+# documentation.
+# The default value is: YES.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if <section_label> ... \endif and \cond <section_label>
+# ... \endcond blocks.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES the list
+# will mention the files that were used to generate the documentation.
+# The default value is: YES.
+
+SHOW_USED_FILES = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
+
+SHOW_FILES = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
+
+SHOW_NAMESPACES = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
+
+FILE_VERSION_FILTER =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
+
+LAYOUT_FILE =
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. Do not use file names with spaces, bibtex cannot handle them. See
+# also \cite for info how to create references.
+
+CITE_BIB_FILES =
+
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
+
+WARNINGS = YES
+
+# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some parameters
+# in a documented function, or documenting parameters that don't exist or using
+# markup commands wrongly.
+# The default value is: YES.
+
+WARN_IF_DOC_ERROR = YES
+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO doxygen will only warn about wrong or incomplete parameter
+# documentation, but not about the absence of documentation.
+# The default value is: NO.
+
+WARN_NO_PARAMDOC = YES
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# The default value is: $file:$line: $text.
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr).
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces.
+# Note: If this tag is empty the current directory is searched.
+
+INPUT = .
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
+# possible encodings.
+# The default value is: UTF-8.
+
+INPUT_ENCODING = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank the
+# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
+# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
+# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
+# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
+# *.qsf, *.as and *.js.
+
+FILE_PATTERNS =
+
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
+
+RECURSIVE = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
+
+EXCLUDE = config.h libsigrokdecode-internal.h exception.c \
+ module_sigrokdecode.c type_decoder.c type_logic.c \
+ util.c
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+# The default value is: NO.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
+
+# Ignore the following files and directories (see also EXCLUDE above):
+# - config.h: Non-public stuff, the file doesn't get installed.
+# - libsigrokdecode-internal.h: Non-public stuff, the file isn't installed.
+# - decoders/*: The decoders themselves don't contain public API.
+# - exception.c: No public API stuff in there currently.
+# - module_sigrokdecode.c: No public API stuff in there currently.
+# - type_decoder.c: No public API stuff in there currently.
+# - tyoe_logic.c: No public API stuff in there currently.
+# - util.c: No public API stuff in there currently.
+# - tests/*: Unit tests, no public API stuff in there.
+# - doxy/*: Potentially already generated docs, should not be scanned.
+#
+EXCLUDE_PATTERNS = */decoders/* */tests/* */doxy/*
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
+
+EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command:
+#
+# <filter> <input-file>
+#
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER ) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
+
+FILTER_SOURCE_FILES = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS =
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
+
+SOURCE_BROWSER = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
+
+STRIP_CODE_COMMENTS = NO
+
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# function all documented functions referencing it will be listed.
+# The default value is: NO.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
+
+REFERENCES_RELATION = YES
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see http://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
+
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
+
+ALPHABETICAL_INDEX = YES
+
+# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+# which the alphabetical index list will be split.
+# Minimum value: 1, maximum value: 20, default value: 5.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all classes will
+# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
+# can be used to specify a prefix (or a list of prefixes) that should be ignored
+# while generating the index headers.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
+# The default value is: YES.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_OUTPUT = html-api
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_STYLESHEET =
+
+# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user-
+# defined cascading style sheet that is included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefor more robust against future updates.
+# Doxygen will copy the style sheet file to the output directory. For an example
+# see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET =
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_FILES =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the stylesheet and background images according to
+# this color. Hue is specified as an angle on a colorwheel, see
+# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use grayscales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_TIMESTAMP = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_SECTIONS = YES
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see: http://developer.apple.com/tools/xcode/), introduced with
+# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
+# Makefile in the HTML output directory. Running make will produce the docset in
+# that directory and running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_DOCSET = NO
+
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDNAME = "Doxygen generated docs"
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_BUNDLE_ID = org.doxygen.Project
+
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# Windows.
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_HTMLHELP = NO
+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
+# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_FILE =
+
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler ( hhc.exe). If non-empty
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+HHC_LOCATION =
+
+# The GENERATE_CHI flag controls if a separate .chi index file is generated (
+# YES) or that it should be included in the master .chm file ( NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+GENERATE_CHI = NO
+
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_INDEX_ENCODING =
+
+# The BINARY_TOC flag controls whether a binary table of contents is generated (
+# YES) or a normal table of contents ( NO) in the .chm file.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+TOC_EXPAND = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_QHP = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QCH_FILE =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_NAMESPACE = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_VIRTUAL_FOLDER = doc
+
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_NAME =
+
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_ATTRS =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_SECT_FILTER_ATTRS =
+
+# The QHG_LOCATION tag can be used to specify the location of Qt's
+# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
+# generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHG_LOCATION =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_ECLIPSEHELP = NO
+
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
+
+ECLIPSE_DOC_ID = org.doxygen.Project
+
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+DISABLE_INDEX = NO
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine-tune the look of the index. As an example, the default style
+# sheet generated by doxygen has an example that shows how to put an image at
+# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
+# the same information as the tab index, you could consider setting
+# DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_TREEVIEW = NO
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+ENUM_VALUES_PER_LINE = 1
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+TREEVIEW_WIDTH = 250
+
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+EXT_LINKS_IN_WINDOW = NO
+
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_FONTSIZE = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are not
+# supported properly for IE 6.0, but are supported on all modern browsers.
+#
+# Note that when changing this option you need to delete any form_*.png files in
+# the HTML output directory before the changes have effect.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_TRANSPARENT = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# http://www.mathjax.org) which uses client side Javascript for the rendering
+# instead of using prerendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+USE_MATHJAX = NO
+
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. See the MathJax site (see:
+# http://docs.mathjax.org/en/latest/output.html) for more details.
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility), NativeMML (i.e. MathML) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS =
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use <access key> + S
+# (what the <access key> is depends on the OS and browser, but it is typically
+# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
+# key> to jump into the search results window, the results can be navigated
+# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
+# to select a filter and <Enter> or <escape> to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SEARCHENGINE = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using Javascript. There
+# are two flavours of web server based searching depending on the
+# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for
+# searching and an index file used by the script. When EXTERNAL_SEARCH is
+# enabled the indexing and searching needs to be provided by external tools. See
+# the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SERVER_BASED_SEARCH = NO
+
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
+# Searching" for details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHENGINE_URL =
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHDATA_FILE = searchdata.xml
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID =
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTRA_SEARCH_MAPPINGS =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
+# The default value is: YES.
+
+GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked.
+#
+# Note that when enabling USE_PDFLATEX this option is only used for generating
+# bitmaps for formulas in the HTML output, but not in the Makefile that is
+# written to the output directory.
+# The default file is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PAPER_TYPE = a4
+
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. To get the times font for
+# instance you can specify
+# EXTRA_PACKAGES=times
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
+# generated LaTeX document. The header should contain everything until the first
+# chapter. If it is left blank doxygen will generate a standard header. See
+# section "Doxygen usage" for information on how to let doxygen write the
+# default header to a separate file.
+#
+# Note: Only use a user-defined header if you know what you are doing! The
+# following commands have a special meaning inside the header: $title,
+# $datetime, $date, $doxygenversion, $projectname, $projectnumber. Doxygen will
+# replace them by respectively the title of the page, the current date and time,
+# only the current date, the version number of doxygen, the project name (see
+# PROJECT_NAME), or the project number (see PROJECT_NUMBER).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HEADER =
+
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
+# generated LaTeX document. The footer should contain everything after the last
+# chapter. If it is left blank doxygen will generate a standard footer.
+#
+# Note: Only use a user-defined footer if you know what you are doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_FOOTER =
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PDF_HYPERLINKS = YES
+
+# If the LATEX_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
+# the PDF file directly from the LaTeX files. Set this option to YES to get a
+# higher quality PDF documentation.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+USE_PDFLATEX = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
+# command to the generated LaTeX files. This will instruct LaTeX to keep running
+# if errors occur, instead of asking the user for help. This option is also used
+# when generating formulas in HTML.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BATCHMODE = NO
+
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HIDE_INDICES = NO
+
+# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
+# code with syntax highlighting in the LaTeX output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_SOURCE_CODE = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. See
+# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BIB_STYLE = plain
+
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's config
+# file, i.e. a series of assignments. You only have to provide replacements,
+# missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's config file. A template extensions file can be generated
+# using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_EXTENSION = .3
+
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_OUTPUT = xml
+
+# The XML_SCHEMA tag can be used to specify a XML schema, which can be used by a
+# validating XML parser to check the syntax of the XML files.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_SCHEMA =
+
+# The XML_DTD tag can be used to specify a XML DTD, which can be used by a
+# validating XML parser to check the syntax of the XML files.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_DTD =
+
+# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
+
+GENERATE_DOCBOOK = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT = docbook
+
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen
+# Definitions (see http://autogen.sf.net) file that captures the structure of
+# the code including all documentation. Note that this feature is still
+# experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
+# overwrite each other's variables.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all
+# C-preprocessor directives found in the sources and include files.
+# The default value is: YES.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names
+# in the source code. If set to NO only conditional compilation will be
+# performed. Macro expansion can be done in a controlled way by setting
+# EXPAND_ONLY_PREDEF to YES.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+MACRO_EXPANSION = YES
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+# the macro expansion is limited to the macros specified with the PREDEFINED and
+# EXPAND_AS_DEFINED tags.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_ONLY_PREDEF = YES
+
+# If the SEARCH_INCLUDES tag is set to YES the includes files in the
+# INCLUDE_PATH will be searched if a #include is found.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by the
+# preprocessor.
+# This tag requires that the tag SEARCH_INCLUDES is set to YES.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be
+# used.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that are
+# defined before the preprocessor is started (similar to the -D option of e.g.
+# gcc). The argument of the tag is a list of macros of the form: name or
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+# is assumed. To prevent a macro definition from being undefined via #undef or
+# recursively expanded use the := operator instead of the = operator.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+# This gets rid of the SRD_API function prefix in the Doxygen output.
+PREDEFINED = SRD_API=
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+# tag can be used to specify a list of macro names that should be expanded. The
+# macro definition that is found in the sources will be used. Use the PREDEFINED
+# tag if you want to use a different macro definition that overrules the
+# definition found in the source code.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+# remove all refrences to function-like macros that are alone on a line, have an
+# all uppercase name, and do not end with a semicolon. Such function macros are
+# typically used for boiler-plate code, and will confuse the parser if not
+# removed.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tag files. For each tag
+# file the location of the external documentation should be added. The format of
+# a tag file without this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the
+# section "Linking to external documentation" for more information about the use
+# of tag files.
+# Note: Each tag file must have an unique name (where the name does NOT include
+# the path). If a tag file is not located in the directory in which doxygen is
+# run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+# tag file that is based on the input files it reads. See section "Linking to
+# external documentation" for more information about the usage of tag files.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES all external class will be listed in the
+# class index. If set to NO only the inherited external classes will be listed.
+# The default value is: NO.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in
+# the modules index. If set to NO, only the current project's groups will be
+# listed.
+# The default value is: YES.
+
+EXTERNAL_GROUPS = YES
+
+# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in
+# the related pages index. If set to NO, only the current project's pages will
+# be listed.
+# The default value is: YES.
+
+EXTERNAL_PAGES = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of 'which perl').
+# The default file (with absolute path) is: /usr/bin/perl.
+
+PERL_PATH = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram
+# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
+# NO turns the diagrams off. Note that this option also works with HAVE_DOT
+# disabled, but it is recommended to install and use dot, since it yields more
+# powerful graphs.
+# The default value is: YES.
+
+CLASS_DIAGRAMS = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see:
+# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH =
+
+# You can include diagrams made with dia in doxygen documentation. Doxygen will
+# then run dia to produce the diagram and insert it in the documentation. The
+# DIA_PATH tag allows you to specify the directory where the dia binary resides.
+# If left empty dia is assumed to be found in the default search path.
+
+DIA_PATH =
+
+# If set to YES, the inheritance and collaboration graphs will hide inheritance
+# and usage relations if the target is undocumented or is not a class.
+# The default value is: YES.
+
+HIDE_UNDOC_RELATIONS = NO
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz (see:
+# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# Bell Labs. The other options in this section have no effect if this option is
+# set to NO
+# The default value is: NO.
+
+HAVE_DOT = YES
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+# to run in parallel. When set to 0 doxygen will base this on the number of
+# processors available in the system. You can set it explicitly to a value
+# larger than 0 to get control over the balance between CPU load and processing
+# speed.
+# Minimum value: 0, maximum value: 32, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NUM_THREADS = 0
+
+# When you want a differently looking font n the dot files that doxygen
+# generates you can specify the font name using DOT_FONTNAME. You need to make
+# sure dot is able to find the font, which can be done by putting it in a
+# standard location or by setting the DOTFONTPATH environment variable or by
+# setting DOT_FONTPATH to the directory containing the font.
+# The default value is: Helvetica.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTNAME = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
+# dot graphs.
+# Minimum value: 4, maximum value: 24, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTSIZE = 10
+
+# By default doxygen will tell dot to use the default font as specified with
+# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
+# the path where dot can find it using this tag.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTPATH =
+
+# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
+# each documented class showing the direct and indirect inheritance relations.
+# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+# graph for each documented class showing the direct and indirect implementation
+# dependencies (inheritance, containment, and class references variables) of the
+# class with other documented classes.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+COLLABORATION_GRAPH = YES
+
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+# groups, showing the direct groups dependencies.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GROUP_GRAPHS = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LOOK = NO
+
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+# class node. If there are many fields or methods and many nodes the graph may
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+# number of items for each type to make the size more manageable. Set this to 0
+# for no limit. Note that the threshold may be exceeded by 50% before the limit
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+# but if the number exceeds 15, the total amount of fields shown is limited to
+# 10.
+# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LIMIT_NUM_FIELDS = 10
+
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+# collaboration graphs will show the relations between templates and their
+# instances.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+TEMPLATE_RELATIONS = NO
+
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+# YES then doxygen will generate a graph for each documented file showing the
+# direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDE_GRAPH = YES
+
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+# set to YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALL_GRAPH = YES
+
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALLER_GRAPH = YES
+
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+# hierarchy of all classes instead of a textual one.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GRAPHICAL_HIERARCHY = YES
+
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+# dependencies a directory has on other directories in a graphical way. The
+# dependency relations are determined by the #include relations between the
+# files in the directories.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DIRECTORY_GRAPH = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot.
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+# to make the SVG files visible in IE 9+ (other browsers do not have this
+# requirement).
+# Possible values are: png, jpg, gif and svg.
+# The default value is: png.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_IMAGE_FORMAT = png
+
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+#
+# Note that this requires a modern browser other than Internet Explorer. Tested
+# and working are Firefox, Chrome, Safari, and Opera.
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+# the SVG files visible. Older versions of IE do not have SVG support.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INTERACTIVE_SVG = NO
+
+# The DOT_PATH tag can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the \dotfile
+# command).
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOTFILE_DIRS =
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
+
+MSCFILE_DIRS =
+
+# The DIAFILE_DIRS tag can be used to specify one or more directories that
+# contain dia files that are included in the documentation (see the \diafile
+# command).
+
+DIAFILE_DIRS =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+# that will be shown in the graph. If the number of nodes in a graph becomes
+# larger than this value, doxygen will truncate the graph, which is visualized
+# by representing a node as a red box. Note that doxygen if the number of direct
+# children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# Minimum value: 0, maximum value: 10000, default value: 50.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_GRAPH_MAX_NODES = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+# generated by dot. A depth value of 3 means that only nodes reachable from the
+# root by following a path via at most 3 edges will be shown. Nodes that lay
+# further from the root node will be omitted. Note that setting this option to 1
+# or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+# Minimum value: 0, maximum value: 1000, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not seem
+# to support this out of the box.
+#
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_TRANSPARENT = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support
+# this, this feature is disabled by default.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_MULTI_TARGETS = YES
+
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+# explaining the meaning of the various boxes and arrows in the dot generated
+# graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot
+# files that are used to generate the various graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_CLEANUP = YES
diff --git a/HACKING b/HACKING
new file mode 100644
index 0000000..a9a6a03
--- /dev/null
+++ b/HACKING
@@ -0,0 +1,198 @@
+-------------------------------------------------------------------------------
+HACKING
+-------------------------------------------------------------------------------
+
+Coding style
+------------
+
+This project is programmed using the Linux kernel coding style, see
+http://lxr.linux.no/linux/Documentation/CodingStyle for details.
+
+Please use the same style for any code contributions, thanks!
+
+The Python decoders should follow the usual Python conventions and use
+Python idioms as far as it makes sense. The coding style should mostly follow
+the Python PEP-8, which includes the convention of 4 spaces for indentation.
+See http://www.python.org/dev/peps/pep-0008/ for details.
+
+
+Contributions
+-------------
+
+ - Patches should be sent to the development mailinglist at
+ sigrok-devel at lists.sourceforge.net (please subscribe to the list first).
+
+ https://lists.sourceforge.net/lists/listinfo/sigrok-devel
+
+ - Alternatively, you can also clone the git repository and let us know
+ from where to pull/review your changes. You can use gitorious.org,
+ github.com, or any other public git hosting site.
+
+
+Random notes
+------------
+
+ - Don't do variable declarations in compound statements, only at the
+ beginning of a function.
+
+ - Generally avoid assigning values to variables at declaration time,
+ especially so for complex and/or run-time dependent values.
+
+ - Consistently use g_try_malloc() / g_try_malloc0(). Do not use standard
+ malloc()/calloc() if it can be avoided (sometimes other libs such
+ as libftdi can return malloc()'d memory, for example).
+
+ - Always properly match allocations with the proper *free() functions. If
+ glib's g_try_malloc()/g_try_malloc0() was used, use g_free() to free the
+ memory. Otherwise use standard free(). Never use the wrong function!
+
+ - Never use g_malloc() or g_malloc0(). These functions do not return NULL
+ if not enough memory is available but rather lead to an exit() or segfault
+ instead. This behaviour is not acceptable for libraries.
+ Use g_try_malloc()/g_try_malloc0() instead and check the return value.
+
+ - You should never print any messages (neither to stdout nor stderr nor
+ elsewhere) "manually" via e.g. printf() or g_log() or similar functions.
+ Only srd_err()/srd_warn()/srd_info()/srd_dbg()/srd_spew() should be used.
+
+ - Use glib's gboolean / TRUE / FALSE for boolean types consistently.
+ Do not use <stdbool.h> and its true / false, and do not invent private
+ definitions for this either.
+
+ - Consistently use the same naming convention for #include guards in headers:
+ <PROJECTNAME>_<PATH_TO_FILE>_<FILE>
+ This ensures that all #include guards are always unique and consistent.
+ Example: LIBSIGROKDECODE_LIBSIGROKDECODE_INTERNAL_H
+
+ - Consistently use the same naming convention for API functions:
+ <libprefix>_<groupname>_<action>().
+
+ Examples:
+ srd_log_loglevel_set(), srd_log_loglevel_get(), srd_log_handler_set(),
+ srd_log_handler_set_default(), and so on.
+
+ Getter/setter function names should usually end with "_get" or "_set".
+ Functions creating new "objects" should end with "_new".
+ Functions destroying "objects" should end with "_destroy".
+ Functions adding or removing items (e.g. from lists) should end with
+ either "_add" or "_remove".
+ Functions operating on all items from a list (not on only one of them),
+ should end with "_all", e.g. "_remove_all", "_get_all", and so on.
+ Use "_remove_all" in favor of "_clear" for consistency.
+
+ - All enums should generally use an explicit start number of 10000.
+ If there are multiple "categories" in the enum entries, each category
+ should be 10000 entries apart from the next one. The start of categories
+ are thus 10000, 20000, 30000, and so on.
+
+ Adding items to an enum MUST always append to a "category", never add
+ items in the middle of a category. The order of items MUST NOT be changed.
+ Any of the above would break the ABI.
+
+ The enum item 0 is special and is used as terminator in some lists, thus
+ enums should not use this for "valid" entries (and start at 10000 instead).
+
+
+Doxygen
+-------
+
+ - In Doxygen comments, put an empty line between the block of @param lines
+ and the final @return line. The @param lines themselves (if there is more
+ than one) are not separated by empty lines.
+
+ - Mark private functions (SRD_PRIV) with /** @private */, so that Doxygen
+ doesn't include them in the output. Functions that are "static" anyway
+ don't need to be marked like this.
+
+ - Mark private variables/#defines with /** @cond PRIVATE */ and
+ /** @endcond */, so that Doxygen doesn't include them in the output.
+ Variables that are "static" don't need to be marked like this.
+
+ - Mark all public API functions (SRD_API) with a @since tag which indicates
+ in which release the respective function was added (e.g. "@since 0.1.0").
+
+ If the function has existed before, but its API changed later, the @since
+ tag should mention only the release when the API last changed.
+
+ Example: The srd_foo() call was added in 0.1.0, but the API changed in
+ the later 0.2.0 release. The docs should read "@since 0.2.0" in that case.
+
+ Non-public functions (static ones, and those marked SRD_PRIV) don't need
+ to have @since markers.
+
+ The @since tag should be the last one, i.e. it should come after @param,
+ @return, @see, and so on.
+
+
+Protocol decoder guidelines
+---------------------------
+
+ - The 'desc' metadata field for a protocol decoder, which contains a
+ short, one-line description of the protocol/bus, should be at most 55
+ characters long, and end with a full stop. This short description can be
+ displayed on the command-line using "sigrok-cli -V -l 3", or in various
+ different places in GUIs.
+
+ - Longer, multi-line descriptions should be placed in the protocol
+ decoder's __init__.py file as docstring. It can be viewed (for a specific
+ protocol decoder, e.g., UART) via "sigrok-cli -a uart", or in various
+ other places in GUIs.
+
+ - Generally use strings for states (of the PD state machine), not integers.
+ This avoids having to keep a list of state definitions at the top of file.
+ The performance overhead for this is negligible in practice.
+
+ Recommended:
+ self.state = 'IDLE'
+ self.state = 'GET STOP BIT'
+ Not recommended:
+ self.state = IDLE
+ self.state = GET_STOP_BIT
+ (where IDLE = 0 and GET_STOP_BIT = 1, for example)
+
+ - Generally use strings for commands/IDs in generated protocol packets.
+ This avoids having to know magic numbers of the PD in higher-level PDs.
+ The performance overhead for this is negligible in practice.
+
+ Recommended:
+ self.put(x, y, p, ['STOPBIT', 0, 0])
+ self.put(x, y, p, ['ADDRESS READ', 0x51])
+ Not recommended:
+ self.put(x, y, p, [STOPBIT, 0, 0])
+ self.put(x, y, p, [ADDRESS_READ, 0x51])
+ (with STOPBIT = 3 and ADDRESS_READ = 7, for example)
+
+ - Use ALL-CAPS names for PD states and protocol packet commands/ID.
+ Words should be separated by spaces (not underscores or the like).
+
+ Recommended:
+ 'FIND ADDRESS', 'GET TEMPERATURE', 'START'
+ Not recommended:
+ 'FIND_ADDRESS', 'Get Temperature', 'start'
+
+
+Testsuite
+---------
+
+You can run the libsigrokdecode testsuite using:
+
+ $ make check
+
+
+Protocol decoder test framework
+-------------------------------
+
+You can run the protocol decoder tests using (e.g.):
+
+ $ ./tests/pdtest -r -a -v
+
+
+Release engineering
+-------------------
+
+See
+
+ http://sigrok.org/wiki/Developers/Release_process
+
+for a list of items that need to be done when releasing a new tarball.
+
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..2099840
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,370 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
+Inc.
+
+ Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved. This file is offered as-is,
+without warranty of any kind.
+
+Basic Installation
+==================
+
+ Briefly, the shell command `./configure && make && make install'
+should configure, build, and install this package. The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package. Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below. The lack of an optional feature in a given package is not
+necessarily a bug. More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
+
+ 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, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+ 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 you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+ The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system.
+
+ Running `configure' might take a while. 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, generally using the just-built uninstalled binaries.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation. When installing into a prefix owned by root, it is
+ recommended that the package be configured and built as a regular
+ user, and only the `make install' phase executed with root
+ privileges.
+
+ 5. Optionally, type `make installcheck' to repeat any self-tests, but
+ this time using the binaries in their final installed location.
+ This target does not install anything. Running this target as a
+ regular user, particularly if the prior `make install' required
+ root privileges, verifies that the installation completed
+ correctly.
+
+ 6. 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.
+
+ 7. Often, you can also type `make uninstall' to remove the installed
+ files again. In practice, not all packages have tested that
+ uninstallation works correctly, even though it is required by the
+ GNU Coding Standards.
+
+ 8. Some packages, particularly those that use Automake, provide `make
+ distcheck', which can by used by developers to test that all other
+ targets like `make install' and `make uninstall' work correctly.
+ This target is generally not run by end users.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+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 can use 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 `..'. This
+is known as a "VPATH" build.
+
+ With a non-GNU `make', it is safer 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.
+
+ On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor. Like
+this:
+
+ ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CPP="gcc -E" CXXCPP="g++ -E"
+
+ This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+ By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc. You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' 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. In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+ The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+ The first method involves providing an override variable for each
+affected directory. For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'. Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated. The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+ The second method involves providing the `DESTDIR' variable. For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names. The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters. On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
+
+ 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'.
+
+ 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.
+
+ Some packages offer the ability to configure how verbose the
+execution of `make' will be. For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
+Particular systems
+==================
+
+ On HP-UX, the default C compiler is not ANSI C compatible. If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+ ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+ HP-UX `make' updates targets which have the same time stamps as
+their prerequisites, which makes it generally unusable when shipped
+generated files such as `configure' are involved. Use GNU `make'
+instead.
+
+ On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file. The option `-nodtk' can be used as
+a workaround. If GNU CC is not installed, it is therefore recommended
+to try
+
+ ./configure CC="cc"
+
+and if that doesn't work, try
+
+ ./configure CC="cc -nodtk"
+
+ On Solaris, don't put `/usr/ucb' early in your `PATH'. This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+ On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'. It is recommended to use the following options:
+
+ ./configure --prefix=/boot/common
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS
+ KERNEL-OS
+
+ 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 machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+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.
+
+Defining Variables
+==================
+
+ Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf limitation. Until the limitation is lifted, you can use
+this workaround:
+
+ CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+ Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+ Print a summary of the options unique to this package's
+ `configure', and exit. The `short' variant lists options used
+ only in the top level, while the `recursive' variant lists options
+ also present in any nested packages.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--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.
+
+`--prefix=DIR'
+ Use DIR as the installation prefix. *note Installation Names::
+ for more details, including other options available for fine-tuning
+ the installation locations.
+
+`--no-create'
+`-n'
+ Run the configure checks, but stop before creating any output
+ files.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..5c88cc4
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,96 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2010 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+ACLOCAL_AMFLAGS = -I autostuff
+
+lib_LTLIBRARIES = libsigrokdecode.la
+
+libsigrokdecode_la_SOURCES = \
+ srd.c \
+ session.c \
+ decoder.c \
+ instance.c \
+ log.c \
+ util.c \
+ exception.c \
+ module_sigrokdecode.c \
+ type_decoder.c \
+ type_logic.c \
+ error.c \
+ version.c
+
+libsigrokdecode_la_CPPFLAGS = $(CPPFLAGS_PYTHON) \
+ -DDECODERS_DIR='"$(DECODERS_DIR)"'
+libsigrokdecode_la_LDFLAGS = $(SRD_LIB_LDFLAGS) $(LDFLAGS_PYTHON)
+
+library_includedir = $(includedir)/libsigrokdecode
+library_include_HEADERS = libsigrokdecode.h version.h
+noinst_HEADERS = libsigrokdecode-internal.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libsigrokdecode.pc
+
+EXTRA_DIST = Doxyfile HACKING contrib/sigrok-logo-notext.png
+
+if HAVE_CHECK
+TESTS = tests/check_main
+check_PROGRAMS = ${TESTS}
+tests_check_main_SOURCES = \
+ libsigrokdecode.h \
+ tests/lib.h \
+ tests/check_main.c \
+ tests/check_core.c \
+ tests/check_decoder.c \
+ tests/check_inst.c \
+ tests/check_session.c
+tests_check_main_CFLAGS = @check_CFLAGS@
+tests_check_main_LDADD = $(top_builddir)/libsigrokdecode.la @check_LIBS@
+tests_check_main_CPPFLAGS = $(CPPFLAGS_PYTHON) \
+ -DDECODERS_DIR='"$(abs_top_builddir)/decoders"'
+endif
+
+if BUILD_RUNTC
+noinst_PROGRAMS = tests/runtc
+tests_runtc_SOURCES = tests/runtc.c
+tests_runtc_CPPFLAGS = $(CPPFLAGS_PYTHON) $(LIBSIGROK_CFLAGS) \
+ -DDECODERS_DIR='"$(abs_top_builddir)/decoders"'
+tests_runtc_LDFLAGS = -L$(top_builddir) $(LIBSIGROK_LIBS) $(LDFLAGS_PYTHON) -lsigrokdecode
+endif
+
+MAINTAINERCLEANFILES = ChangeLog
+
+.PHONY: ChangeLog
+ChangeLog:
+ git --git-dir $(top_srcdir)/.git log > ChangeLog || touch ChangeLog
+
+dist-hook: ChangeLog
+ $(MKDIR_P) $(distdir)/tools
+ cp ${top_srcdir}/tools/install-decoders $(distdir)/tools
+ $(MKDIR_P) $(distdir)/decoders
+ ${top_srcdir}/tools/install-decoders -i ${top_srcdir}/decoders \
+ -o $(distdir)/decoders
+
+install-decoders:
+ $(MKDIR_P) $(DESTDIR)$(DECODERS_DIR)
+ $(PYTHON3) ${top_srcdir}/tools/install-decoders \
+ -i ${top_srcdir}/decoders -o $(DESTDIR)$(DECODERS_DIR)
+
+install-data-hook: install-decoders
+
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..a32e9dd
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,1625 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 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.
+
+ at SET_MAKE@
+
+
+
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+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@
+ at HAVE_CHECK_TRUE@TESTS = tests/check_main$(EXEEXT)
+ at HAVE_CHECK_TRUE@check_PROGRAMS = $(am__EXEEXT_1)
+ at BUILD_RUNTC_TRUE@noinst_PROGRAMS = tests/runtc$(EXEEXT)
+subdir = .
+DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
+ $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/configure $(am__configure_deps) \
+ $(srcdir)/config.h.in $(srcdir)/version.h.in \
+ $(srcdir)/libsigrokdecode.pc.in \
+ $(top_srcdir)/autostuff/depcomp $(library_include_HEADERS) \
+ $(noinst_HEADERS) $(top_srcdir)/autostuff/test-driver COPYING \
+ autostuff/ar-lib autostuff/compile autostuff/config.guess \
+ autostuff/config.sub autostuff/depcomp autostuff/install-sh \
+ autostuff/missing autostuff/ltmain.sh \
+ $(top_srcdir)/autostuff/ar-lib $(top_srcdir)/autostuff/compile \
+ $(top_srcdir)/autostuff/config.guess \
+ $(top_srcdir)/autostuff/config.sub \
+ $(top_srcdir)/autostuff/install-sh \
+ $(top_srcdir)/autostuff/ltmain.sh \
+ $(top_srcdir)/autostuff/missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/autostuff/libtool.m4 \
+ $(top_srcdir)/autostuff/ltoptions.m4 \
+ $(top_srcdir)/autostuff/ltsugar.m4 \
+ $(top_srcdir)/autostuff/ltversion.m4 \
+ $(top_srcdir)/autostuff/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = version.h libsigrokdecode.pc
+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)$(pkgconfigdir)" \
+ "$(DESTDIR)$(library_includedir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libsigrokdecode_la_LIBADD =
+am_libsigrokdecode_la_OBJECTS = libsigrokdecode_la-srd.lo \
+ libsigrokdecode_la-session.lo libsigrokdecode_la-decoder.lo \
+ libsigrokdecode_la-instance.lo libsigrokdecode_la-log.lo \
+ libsigrokdecode_la-util.lo libsigrokdecode_la-exception.lo \
+ libsigrokdecode_la-module_sigrokdecode.lo \
+ libsigrokdecode_la-type_decoder.lo \
+ libsigrokdecode_la-type_logic.lo libsigrokdecode_la-error.lo \
+ libsigrokdecode_la-version.lo
+libsigrokdecode_la_OBJECTS = $(am_libsigrokdecode_la_OBJECTS)
+AM_V_lt = $(am__v_lt_ at AM_V@)
+am__v_lt_ = $(am__v_lt_ at AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+libsigrokdecode_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(libsigrokdecode_la_LDFLAGS) \
+ $(LDFLAGS) -o $@
+ at HAVE_CHECK_TRUE@am__EXEEXT_1 = tests/check_main$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+am__tests_check_main_SOURCES_DIST = libsigrokdecode.h tests/lib.h \
+ tests/check_main.c tests/check_core.c tests/check_decoder.c \
+ tests/check_inst.c tests/check_session.c
+am__dirstamp = $(am__leading_dot)dirstamp
+ at HAVE_CHECK_TRUE@am_tests_check_main_OBJECTS = \
+ at HAVE_CHECK_TRUE@ tests/tests_check_main-check_main.$(OBJEXT) \
+ at HAVE_CHECK_TRUE@ tests/tests_check_main-check_core.$(OBJEXT) \
+ at HAVE_CHECK_TRUE@ tests/tests_check_main-check_decoder.$(OBJEXT) \
+ at HAVE_CHECK_TRUE@ tests/tests_check_main-check_inst.$(OBJEXT) \
+ at HAVE_CHECK_TRUE@ tests/tests_check_main-check_session.$(OBJEXT)
+tests_check_main_OBJECTS = $(am_tests_check_main_OBJECTS)
+ at HAVE_CHECK_TRUE@tests_check_main_DEPENDENCIES = \
+ at HAVE_CHECK_TRUE@ $(top_builddir)/libsigrokdecode.la
+tests_check_main_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(tests_check_main_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+ -o $@
+am__tests_runtc_SOURCES_DIST = tests/runtc.c
+ at BUILD_RUNTC_TRUE@am_tests_runtc_OBJECTS = \
+ at BUILD_RUNTC_TRUE@ tests/tests_runtc-runtc.$(OBJEXT)
+tests_runtc_OBJECTS = $(am_tests_runtc_OBJECTS)
+tests_runtc_LDADD = $(LDADD)
+tests_runtc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(tests_runtc_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I. at am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/autostuff/depcomp
+am__depfiles_maybe = depfiles
+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_ at AM_V@)
+am__v_CC_ = $(am__v_CC_ at 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_ at AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_ at AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(libsigrokdecode_la_SOURCES) $(tests_check_main_SOURCES) \
+ $(tests_runtc_SOURCES)
+DIST_SOURCES = $(libsigrokdecode_la_SOURCES) \
+ $(am__tests_check_main_SOURCES_DIST) \
+ $(am__tests_runtc_SOURCES_DIST)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+DATA = $(pkgconfig_DATA)
+HEADERS = $(library_include_HEADERS) $(noinst_HEADERS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
+ $(LISP)config.h.in
+# 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
+AM_RECURSIVE_TARGETS = cscope check recheck
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red='[0;31m'; \
+ grn='[0;32m'; \
+ lgn='[1;32m'; \
+ blu='[1;34m'; \
+ mgn='[0;35m'; \
+ brg='[1m'; \
+ std='[m'; \
+ fi; \
+}
+am__recheck_rx = ^[ ]*:recheck:[ ]*
+am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
+am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+ recheck = 1; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ { \
+ if ((getline line2 < ($$0 ".log")) < 0) \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+ { \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+ { \
+ break; \
+ } \
+ }; \
+ if (recheck) \
+ print $$0; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+ print "fatal: making $@: " msg | "cat >&2"; \
+ exit 1; \
+} \
+function rst_section(header) \
+{ \
+ print header; \
+ len = length(header); \
+ for (i = 1; i <= len; i = i + 1) \
+ printf "="; \
+ printf "\n\n"; \
+} \
+{ \
+ copy_in_global_log = 1; \
+ global_test_result = "RUN"; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".trs"); \
+ if (line ~ /$(am__global_test_result_rx)/) \
+ { \
+ sub("$(am__global_test_result_rx)", "", line); \
+ sub("[ ]*$$", "", line); \
+ global_test_result = line; \
+ } \
+ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+ copy_in_global_log = 0; \
+ }; \
+ if (copy_in_global_log) \
+ { \
+ rst_section(global_test_result ": " $$0); \
+ while ((rc = (getline line < ($$0 ".log"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".log"); \
+ print line; \
+ }; \
+ printf "\n"; \
+ }; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors "$$am__enable_hard_errors" \
+ --expect-failure "$$am__expect_failure"
+# To be inserted before the command running the test. Creates the
+# directory for the log if needed. Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log. Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup); \
+$(am__vpath_adj_setup) $(am__vpath_adj) \
+$(am__tty_colors); \
+srcdir=$(srcdir); export srcdir; \
+case "$@" in \
+ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
+ *) am__odir=.;; \
+esac; \
+test "x$$am__odir" = x"." || test -d "$$am__odir" \
+ || $(MKDIR_P) "$$am__odir" || exit $$?; \
+if test -f "./$$f"; then dir=./; \
+elif test -f "$$f"; then dir=; \
+else dir="$(srcdir)/"; fi; \
+tst=$$dir$$f; log='$@'; \
+if test -n '$(DISABLE_HARD_ERRORS)'; then \
+ am__enable_hard_errors=no; \
+else \
+ am__enable_hard_errors=yes; \
+fi; \
+case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
+ am__expect_failure=yes;; \
+ *) \
+ am__expect_failure=no;; \
+esac; \
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed). The result is saved in the shell variable
+# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+ bases='$(TEST_LOGS)'; \
+ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+ bases=`echo $$bases`
+RECHECK_LOGS = $(TEST_LOGS)
+TEST_SUITE_LOG = test-suite.log
+TEST_EXTENSIONS = @EXEEXT@ .test
+LOG_DRIVER = $(SHELL) $(top_srcdir)/autostuff/test-driver
+LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT at .log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/autostuff/test-driver
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+ $(TEST_LOG_FLAGS)
+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)
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+DIST_TARGETS = 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@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AM_LIBTOOLFLAGS = @AM_LIBTOOLFLAGS@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_PYTHON = @CPPFLAGS_PYTHON@
+CYGPATH_W = @CYGPATH_W@
+DECODERS_DIR = @DECODERS_DIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@
+GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
+GLIB_LIBS = @GLIB_LIBS@
+GLIB_MKENUMS = @GLIB_MKENUMS@
+GOBJECT_QUERY = @GOBJECT_QUERY@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_PYTHON = @LDFLAGS_PYTHON@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBSIGROK_CFLAGS = @LIBSIGROK_CFLAGS@
+LIBSIGROK_LIBS = @LIBSIGROK_LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEFLAGS = @MAKEFLAGS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+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@
+PYTHON3 = @PYTHON3@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SRD_LIB_LDFLAGS = @SRD_LIB_LDFLAGS@
+SRD_LIB_VERSION = @SRD_LIB_VERSION@
+SRD_LIB_VERSION_AGE = @SRD_LIB_VERSION_AGE@
+SRD_LIB_VERSION_CURRENT = @SRD_LIB_VERSION_CURRENT@
+SRD_LIB_VERSION_REVISION = @SRD_LIB_VERSION_REVISION@
+SRD_PACKAGE_VERSION = @SRD_PACKAGE_VERSION@
+SRD_PACKAGE_VERSION_MAJOR = @SRD_PACKAGE_VERSION_MAJOR@
+SRD_PACKAGE_VERSION_MICRO = @SRD_PACKAGE_VERSION_MICRO@
+SRD_PACKAGE_VERSION_MINOR = @SRD_PACKAGE_VERSION_MINOR@
+STRIP = @STRIP@
+VERSION = @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_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@
+check_CFLAGS = @check_CFLAGS@
+check_LIBS = @check_LIBS@
+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@
+libsigrok_CFLAGS = @libsigrok_CFLAGS@
+libsigrok_LIBS = @libsigrok_LIBS@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+python32_CFLAGS = @python32_CFLAGS@
+python32_LIBS = @python32_LIBS@
+python33_CFLAGS = @python33_CFLAGS@
+python33_LIBS = @python33_LIBS@
+python34_CFLAGS = @python34_CFLAGS@
+python34_LIBS = @python34_LIBS@
+python3_CFLAGS = @python3_CFLAGS@
+python3_LIBS = @python3_LIBS@
+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 autostuff
+lib_LTLIBRARIES = libsigrokdecode.la
+libsigrokdecode_la_SOURCES = \
+ srd.c \
+ session.c \
+ decoder.c \
+ instance.c \
+ log.c \
+ util.c \
+ exception.c \
+ module_sigrokdecode.c \
+ type_decoder.c \
+ type_logic.c \
+ error.c \
+ version.c
+
+libsigrokdecode_la_CPPFLAGS = $(CPPFLAGS_PYTHON) \
+ -DDECODERS_DIR='"$(DECODERS_DIR)"'
+
+libsigrokdecode_la_LDFLAGS = $(SRD_LIB_LDFLAGS) $(LDFLAGS_PYTHON)
+library_includedir = $(includedir)/libsigrokdecode
+library_include_HEADERS = libsigrokdecode.h version.h
+noinst_HEADERS = libsigrokdecode-internal.h
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libsigrokdecode.pc
+EXTRA_DIST = Doxyfile HACKING contrib/sigrok-logo-notext.png
+ at HAVE_CHECK_TRUE@tests_check_main_SOURCES = \
+ at HAVE_CHECK_TRUE@ libsigrokdecode.h \
+ at HAVE_CHECK_TRUE@ tests/lib.h \
+ at HAVE_CHECK_TRUE@ tests/check_main.c \
+ at HAVE_CHECK_TRUE@ tests/check_core.c \
+ at HAVE_CHECK_TRUE@ tests/check_decoder.c \
+ at HAVE_CHECK_TRUE@ tests/check_inst.c \
+ at HAVE_CHECK_TRUE@ tests/check_session.c
+
+ at HAVE_CHECK_TRUE@tests_check_main_CFLAGS = @check_CFLAGS@
+ at HAVE_CHECK_TRUE@tests_check_main_LDADD = $(top_builddir)/libsigrokdecode.la @check_LIBS@
+ at HAVE_CHECK_TRUE@tests_check_main_CPPFLAGS = $(CPPFLAGS_PYTHON) \
+ at HAVE_CHECK_TRUE@ -DDECODERS_DIR='"$(abs_top_builddir)/decoders"'
+
+ at BUILD_RUNTC_TRUE@tests_runtc_SOURCES = tests/runtc.c
+ at BUILD_RUNTC_TRUE@tests_runtc_CPPFLAGS = $(CPPFLAGS_PYTHON) $(LIBSIGROK_CFLAGS) \
+ at BUILD_RUNTC_TRUE@ -DDECODERS_DIR='"$(abs_top_builddir)/decoders"'
+
+ at BUILD_RUNTC_TRUE@tests_runtc_LDFLAGS = -L$(top_builddir) $(LIBSIGROK_LIBS) $(LDFLAGS_PYTHON) -lsigrokdecode
+MAINTAINERCLEANFILES = ChangeLog
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
+am--refresh: Makefile
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Makefile
+.PRECIOUS: 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__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(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):
+
+config.h: stamp-h1
+ @test -f $@ || rm -f stamp-h1
+ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.h.in: $(am__configure_deps)
+ ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+ rm -f stamp-h1
+ touch $@
+
+distclean-hdr:
+ -rm -f config.h stamp-h1
+version.h: $(top_builddir)/config.status $(srcdir)/version.h.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+libsigrokdecode.pc: $(top_builddir)/config.status $(srcdir)/libsigrokdecode.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+
+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}; \
+ }
+
+libsigrokdecode.la: $(libsigrokdecode_la_OBJECTS) $(libsigrokdecode_la_DEPENDENCIES) $(EXTRA_libsigrokdecode_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libsigrokdecode_la_LINK) -rpath $(libdir) $(libsigrokdecode_la_OBJECTS) $(libsigrokdecode_la_LIBADD) $(LIBS)
+
+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
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_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
+tests/$(am__dirstamp):
+ @$(MKDIR_P) tests
+ @: > tests/$(am__dirstamp)
+tests/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) tests/$(DEPDIR)
+ @: > tests/$(DEPDIR)/$(am__dirstamp)
+tests/tests_check_main-check_main.$(OBJEXT): tests/$(am__dirstamp) \
+ tests/$(DEPDIR)/$(am__dirstamp)
+tests/tests_check_main-check_core.$(OBJEXT): tests/$(am__dirstamp) \
+ tests/$(DEPDIR)/$(am__dirstamp)
+tests/tests_check_main-check_decoder.$(OBJEXT): tests/$(am__dirstamp) \
+ tests/$(DEPDIR)/$(am__dirstamp)
+tests/tests_check_main-check_inst.$(OBJEXT): tests/$(am__dirstamp) \
+ tests/$(DEPDIR)/$(am__dirstamp)
+tests/tests_check_main-check_session.$(OBJEXT): tests/$(am__dirstamp) \
+ tests/$(DEPDIR)/$(am__dirstamp)
+
+tests/check_main$(EXEEXT): $(tests_check_main_OBJECTS) $(tests_check_main_DEPENDENCIES) $(EXTRA_tests_check_main_DEPENDENCIES) tests/$(am__dirstamp)
+ @rm -f tests/check_main$(EXEEXT)
+ $(AM_V_CCLD)$(tests_check_main_LINK) $(tests_check_main_OBJECTS) $(tests_check_main_LDADD) $(LIBS)
+tests/tests_runtc-runtc.$(OBJEXT): tests/$(am__dirstamp) \
+ tests/$(DEPDIR)/$(am__dirstamp)
+
+tests/runtc$(EXEEXT): $(tests_runtc_OBJECTS) $(tests_runtc_DEPENDENCIES) $(EXTRA_tests_runtc_DEPENDENCIES) tests/$(am__dirstamp)
+ @rm -f tests/runtc$(EXEEXT)
+ $(AM_V_CCLD)$(tests_runtc_LINK) $(tests_runtc_OBJECTS) $(tests_runtc_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+ -rm -f tests/*.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libsigrokdecode_la-decoder.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libsigrokdecode_la-error.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libsigrokdecode_la-exception.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libsigrokdecode_la-instance.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libsigrokdecode_la-log.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libsigrokdecode_la-module_sigrokdecode.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libsigrokdecode_la-session.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libsigrokdecode_la-srd.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libsigrokdecode_la-type_decoder.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libsigrokdecode_la-type_logic.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libsigrokdecode_la-util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libsigrokdecode_la-version.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/tests_check_main-check_core.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/tests_check_main-check_decoder.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/tests_check_main-check_inst.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/tests_check_main-check_main.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/tests_check_main-check_session.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at tests/$(DEPDIR)/tests_runtc-runtc.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+ at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+ at am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+ at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+ at am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+ at am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+ at am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+libsigrokdecode_la-srd.lo: srd.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsigrokdecode_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsigrokdecode_la-srd.lo -MD -MP -MF $(DEPDIR)/libsigrokdecode_la-srd.Tpo -c -o libsigrokdecode_la-srd.lo `test -f 'srd.c' || echo '$(srcdir)/'`srd.c
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsigrokdecode_la-srd.Tpo $(DEPDIR)/libsigrokdecode_la-srd.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='srd.c' object='libsigrokdecode_la-srd.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsigrokdecode_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsigrokdecode_la-srd.lo `test -f 'srd.c' || echo '$(srcdir)/'`srd.c
+
+libsigrokdecode_la-session.lo: session.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsigrokdecode_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsigrokdecode_la-session.lo -MD -MP -MF $(DEPDIR)/libsigrokdecode_la-session.Tpo -c -o libsigrokdecode_la-session.lo `test -f 'session.c' || echo '$(srcdir)/'`session.c
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsigrokdecode_la-session.Tpo $(DEPDIR)/libsigrokdecode_la-session.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='session.c' object='libsigrokdecode_la-session.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsigrokdecode_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsigrokdecode_la-session.lo `test -f 'session.c' || echo '$(srcdir)/'`session.c
+
+libsigrokdecode_la-decoder.lo: decoder.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsigrokdecode_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsigrokdecode_la-decoder.lo -MD -MP -MF $(DEPDIR)/libsigrokdecode_la-decoder.Tpo -c -o libsigrokdecode_la-decoder.lo `test -f 'decoder.c' || echo '$(srcdir)/'`decoder.c
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsigrokdecode_la-decoder.Tpo $(DEPDIR)/libsigrokdecode_la-decoder.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='decoder.c' object='libsigrokdecode_la-decoder.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsigrokdecode_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsigrokdecode_la-decoder.lo `test -f 'decoder.c' || echo '$(srcdir)/'`decoder.c
+
+libsigrokdecode_la-instance.lo: instance.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsigrokdecode_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsigrokdecode_la-instance.lo -MD -MP -MF $(DEPDIR)/libsigrokdecode_la-instance.Tpo -c -o libsigrokdecode_la-instance.lo `test -f 'instance.c' || echo '$(srcdir)/'`instance.c
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsigrokdecode_la-instance.Tpo $(DEPDIR)/libsigrokdecode_la-instance.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='instance.c' object='libsigrokdecode_la-instance.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsigrokdecode_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsigrokdecode_la-instance.lo `test -f 'instance.c' || echo '$(srcdir)/'`instance.c
+
+libsigrokdecode_la-log.lo: log.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsigrokdecode_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsigrokdecode_la-log.lo -MD -MP -MF $(DEPDIR)/libsigrokdecode_la-log.Tpo -c -o libsigrokdecode_la-log.lo `test -f 'log.c' || echo '$(srcdir)/'`log.c
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsigrokdecode_la-log.Tpo $(DEPDIR)/libsigrokdecode_la-log.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='log.c' object='libsigrokdecode_la-log.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsigrokdecode_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsigrokdecode_la-log.lo `test -f 'log.c' || echo '$(srcdir)/'`log.c
+
+libsigrokdecode_la-util.lo: util.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsigrokdecode_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsigrokdecode_la-util.lo -MD -MP -MF $(DEPDIR)/libsigrokdecode_la-util.Tpo -c -o libsigrokdecode_la-util.lo `test -f 'util.c' || echo '$(srcdir)/'`util.c
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsigrokdecode_la-util.Tpo $(DEPDIR)/libsigrokdecode_la-util.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util.c' object='libsigrokdecode_la-util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsigrokdecode_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsigrokdecode_la-util.lo `test -f 'util.c' || echo '$(srcdir)/'`util.c
+
+libsigrokdecode_la-exception.lo: exception.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsigrokdecode_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsigrokdecode_la-exception.lo -MD -MP -MF $(DEPDIR)/libsigrokdecode_la-exception.Tpo -c -o libsigrokdecode_la-exception.lo `test -f 'exception.c' || echo '$(srcdir)/'`exception.c
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsigrokdecode_la-exception.Tpo $(DEPDIR)/libsigrokdecode_la-exception.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='exception.c' object='libsigrokdecode_la-exception.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsigrokdecode_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsigrokdecode_la-exception.lo `test -f 'exception.c' || echo '$(srcdir)/'`exception.c
+
+libsigrokdecode_la-module_sigrokdecode.lo: module_sigrokdecode.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsigrokdecode_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsigrokdecode_la-module_sigrokdecode.lo -MD -MP -MF $(DEPDIR)/libsigrokdecode_la-module_sigrokdecode.Tpo -c -o libsigrokdecode_la-module_sigrokdecode.lo `test -f 'module_sigrokdecode.c' || echo '$(srcdir)/'`module_sigrokdecode.c
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsigrokdecode_la-module_sigrokdecode.Tpo $(DEPDIR)/libsigrokdecode_la-module_sigrokdecode.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='module_sigrokdecode.c' object='libsigrokdecode_la-module_sigrokdecode.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsigrokdecode_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsigrokdecode_la-module_sigrokdecode.lo `test -f 'module_sigrokdecode.c' || echo '$(srcdir)/'`module_sigrokdecode.c
+
+libsigrokdecode_la-type_decoder.lo: type_decoder.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsigrokdecode_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsigrokdecode_la-type_decoder.lo -MD -MP -MF $(DEPDIR)/libsigrokdecode_la-type_decoder.Tpo -c -o libsigrokdecode_la-type_decoder.lo `test -f 'type_decoder.c' || echo '$(srcdir)/'`type_decoder.c
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsigrokdecode_la-type_decoder.Tpo $(DEPDIR)/libsigrokdecode_la-type_decoder.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='type_decoder.c' object='libsigrokdecode_la-type_decoder.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsigrokdecode_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsigrokdecode_la-type_decoder.lo `test -f 'type_decoder.c' || echo '$(srcdir)/'`type_decoder.c
+
+libsigrokdecode_la-type_logic.lo: type_logic.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsigrokdecode_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsigrokdecode_la-type_logic.lo -MD -MP -MF $(DEPDIR)/libsigrokdecode_la-type_logic.Tpo -c -o libsigrokdecode_la-type_logic.lo `test -f 'type_logic.c' || echo '$(srcdir)/'`type_logic.c
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsigrokdecode_la-type_logic.Tpo $(DEPDIR)/libsigrokdecode_la-type_logic.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='type_logic.c' object='libsigrokdecode_la-type_logic.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsigrokdecode_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsigrokdecode_la-type_logic.lo `test -f 'type_logic.c' || echo '$(srcdir)/'`type_logic.c
+
+libsigrokdecode_la-error.lo: error.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsigrokdecode_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsigrokdecode_la-error.lo -MD -MP -MF $(DEPDIR)/libsigrokdecode_la-error.Tpo -c -o libsigrokdecode_la-error.lo `test -f 'error.c' || echo '$(srcdir)/'`error.c
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsigrokdecode_la-error.Tpo $(DEPDIR)/libsigrokdecode_la-error.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='error.c' object='libsigrokdecode_la-error.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsigrokdecode_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsigrokdecode_la-error.lo `test -f 'error.c' || echo '$(srcdir)/'`error.c
+
+libsigrokdecode_la-version.lo: version.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsigrokdecode_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsigrokdecode_la-version.lo -MD -MP -MF $(DEPDIR)/libsigrokdecode_la-version.Tpo -c -o libsigrokdecode_la-version.lo `test -f 'version.c' || echo '$(srcdir)/'`version.c
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libsigrokdecode_la-version.Tpo $(DEPDIR)/libsigrokdecode_la-version.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='version.c' object='libsigrokdecode_la-version.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsigrokdecode_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsigrokdecode_la-version.lo `test -f 'version.c' || echo '$(srcdir)/'`version.c
+
+tests/tests_check_main-check_main.o: tests/check_main.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_main_CPPFLAGS) $(CPPFLAGS) $(tests_check_main_CFLAGS) $(CFLAGS) -MT tests/tests_check_main-check_main.o -MD -MP -MF tests/$(DEPDIR)/tests_check_main-check_main.Tpo -c -o tests/tests_check_main-check_main.o `test -f 'tests/check_main.c' || echo '$(srcdir)/'`tests/check_main.c
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_check_main-check_main.Tpo tests/$(DEPDIR)/tests_check_main-check_main.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check_main.c' object='tests/tests_check_main-check_main.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_main_CPPFLAGS) $(CPPFLAGS) $(tests_check_main_CFLAGS) $(CFLAGS) -c -o tests/tests_check_main-check_main.o `test -f 'tests/check_main.c' || echo '$(srcdir)/'`tests/check_main.c
+
+tests/tests_check_main-check_main.obj: tests/check_main.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_main_CPPFLAGS) $(CPPFLAGS) $(tests_check_main_CFLAGS) $(CFLAGS) -MT tests/tests_check_main-check_main.obj -MD -MP -MF tests/$(DEPDIR)/tests_check_main-check_main.Tpo -c -o tests/tests_check_main-check_main.obj `if test -f 'tests/check_main.c'; then $(CYGPATH_W) 'tests/check_main.c'; else $(CYGPATH_W) '$(srcdir)/tests/check_main.c'; fi`
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_check_main-check_main.Tpo tests/$(DEPDIR)/tests_check_main-check_main.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check_main.c' object='tests/tests_check_main-check_main.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_main_CPPFLAGS) $(CPPFLAGS) $(tests_check_main_CFLAGS) $(CFLAGS) -c -o tests/tests_check_main-check_main.obj `if test -f 'tests/check_main.c'; then $(CYGPATH_W) 'tests/check_main.c'; else $(CYGPATH_W) '$(srcdir)/tests/check_main.c'; fi`
+
+tests/tests_check_main-check_core.o: tests/check_core.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_main_CPPFLAGS) $(CPPFLAGS) $(tests_check_main_CFLAGS) $(CFLAGS) -MT tests/tests_check_main-check_core.o -MD -MP -MF tests/$(DEPDIR)/tests_check_main-check_core.Tpo -c -o tests/tests_check_main-check_core.o `test -f 'tests/check_core.c' || echo '$(srcdir)/'`tests/check_core.c
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_check_main-check_core.Tpo tests/$(DEPDIR)/tests_check_main-check_core.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check_core.c' object='tests/tests_check_main-check_core.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_main_CPPFLAGS) $(CPPFLAGS) $(tests_check_main_CFLAGS) $(CFLAGS) -c -o tests/tests_check_main-check_core.o `test -f 'tests/check_core.c' || echo '$(srcdir)/'`tests/check_core.c
+
+tests/tests_check_main-check_core.obj: tests/check_core.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_main_CPPFLAGS) $(CPPFLAGS) $(tests_check_main_CFLAGS) $(CFLAGS) -MT tests/tests_check_main-check_core.obj -MD -MP -MF tests/$(DEPDIR)/tests_check_main-check_core.Tpo -c -o tests/tests_check_main-check_core.obj `if test -f 'tests/check_core.c'; then $(CYGPATH_W) 'tests/check_core.c'; else $(CYGPATH_W) '$(srcdir)/tests/check_core.c'; fi`
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_check_main-check_core.Tpo tests/$(DEPDIR)/tests_check_main-check_core.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check_core.c' object='tests/tests_check_main-check_core.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_main_CPPFLAGS) $(CPPFLAGS) $(tests_check_main_CFLAGS) $(CFLAGS) -c -o tests/tests_check_main-check_core.obj `if test -f 'tests/check_core.c'; then $(CYGPATH_W) 'tests/check_core.c'; else $(CYGPATH_W) '$(srcdir)/tests/check_core.c'; fi`
+
+tests/tests_check_main-check_decoder.o: tests/check_decoder.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_main_CPPFLAGS) $(CPPFLAGS) $(tests_check_main_CFLAGS) $(CFLAGS) -MT tests/tests_check_main-check_decoder.o -MD -MP -MF tests/$(DEPDIR)/tests_check_main-check_decoder.Tpo -c -o tests/tests_check_main-check_decoder.o `test -f 'tests/check_decoder.c' || echo '$(srcdir)/'`tests/check_decoder.c
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_check_main-check_decoder.Tpo tests/$(DEPDIR)/tests_check_main-check_decoder.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check_decoder.c' object='tests/tests_check_main-check_decoder.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_main_CPPFLAGS) $(CPPFLAGS) $(tests_check_main_CFLAGS) $(CFLAGS) -c -o tests/tests_check_main-check_decoder.o `test -f 'tests/check_decoder.c' || echo '$(srcdir)/'`tests/check_decoder.c
+
+tests/tests_check_main-check_decoder.obj: tests/check_decoder.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_main_CPPFLAGS) $(CPPFLAGS) $(tests_check_main_CFLAGS) $(CFLAGS) -MT tests/tests_check_main-check_decoder.obj -MD -MP -MF tests/$(DEPDIR)/tests_check_main-check_decoder.Tpo -c -o tests/tests_check_main-check_decoder.obj `if test -f 'tests/check_decoder.c'; then $(CYGPATH_W) 'tests/check_decoder.c'; else $(CYGPATH_W) '$(srcdir)/tests/check_decoder.c'; fi`
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_check_main-check_decoder.Tpo tests/$(DEPDIR)/tests_check_main-check_decoder.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check_decoder.c' object='tests/tests_check_main-check_decoder.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_main_CPPFLAGS) $(CPPFLAGS) $(tests_check_main_CFLAGS) $(CFLAGS) -c -o tests/tests_check_main-check_decoder.obj `if test -f 'tests/check_decoder.c'; then $(CYGPATH_W) 'tests/check_decoder.c'; else $(CYGPATH_W) '$(srcdir)/tests/check_decoder.c'; fi`
+
+tests/tests_check_main-check_inst.o: tests/check_inst.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_main_CPPFLAGS) $(CPPFLAGS) $(tests_check_main_CFLAGS) $(CFLAGS) -MT tests/tests_check_main-check_inst.o -MD -MP -MF tests/$(DEPDIR)/tests_check_main-check_inst.Tpo -c -o tests/tests_check_main-check_inst.o `test -f 'tests/check_inst.c' || echo '$(srcdir)/'`tests/check_inst.c
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_check_main-check_inst.Tpo tests/$(DEPDIR)/tests_check_main-check_inst.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check_inst.c' object='tests/tests_check_main-check_inst.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_main_CPPFLAGS) $(CPPFLAGS) $(tests_check_main_CFLAGS) $(CFLAGS) -c -o tests/tests_check_main-check_inst.o `test -f 'tests/check_inst.c' || echo '$(srcdir)/'`tests/check_inst.c
+
+tests/tests_check_main-check_inst.obj: tests/check_inst.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_main_CPPFLAGS) $(CPPFLAGS) $(tests_check_main_CFLAGS) $(CFLAGS) -MT tests/tests_check_main-check_inst.obj -MD -MP -MF tests/$(DEPDIR)/tests_check_main-check_inst.Tpo -c -o tests/tests_check_main-check_inst.obj `if test -f 'tests/check_inst.c'; then $(CYGPATH_W) 'tests/check_inst.c'; else $(CYGPATH_W) '$(srcdir)/tests/check_inst.c'; fi`
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_check_main-check_inst.Tpo tests/$(DEPDIR)/tests_check_main-check_inst.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check_inst.c' object='tests/tests_check_main-check_inst.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_main_CPPFLAGS) $(CPPFLAGS) $(tests_check_main_CFLAGS) $(CFLAGS) -c -o tests/tests_check_main-check_inst.obj `if test -f 'tests/check_inst.c'; then $(CYGPATH_W) 'tests/check_inst.c'; else $(CYGPATH_W) '$(srcdir)/tests/check_inst.c'; fi`
+
+tests/tests_check_main-check_session.o: tests/check_session.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_main_CPPFLAGS) $(CPPFLAGS) $(tests_check_main_CFLAGS) $(CFLAGS) -MT tests/tests_check_main-check_session.o -MD -MP -MF tests/$(DEPDIR)/tests_check_main-check_session.Tpo -c -o tests/tests_check_main-check_session.o `test -f 'tests/check_session.c' || echo '$(srcdir)/'`tests/check_session.c
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_check_main-check_session.Tpo tests/$(DEPDIR)/tests_check_main-check_session.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check_session.c' object='tests/tests_check_main-check_session.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_main_CPPFLAGS) $(CPPFLAGS) $(tests_check_main_CFLAGS) $(CFLAGS) -c -o tests/tests_check_main-check_session.o `test -f 'tests/check_session.c' || echo '$(srcdir)/'`tests/check_session.c
+
+tests/tests_check_main-check_session.obj: tests/check_session.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_main_CPPFLAGS) $(CPPFLAGS) $(tests_check_main_CFLAGS) $(CFLAGS) -MT tests/tests_check_main-check_session.obj -MD -MP -MF tests/$(DEPDIR)/tests_check_main-check_session.Tpo -c -o tests/tests_check_main-check_session.obj `if test -f 'tests/check_session.c'; then $(CYGPATH_W) 'tests/check_session.c'; else $(CYGPATH_W) '$(srcdir)/tests/check_session.c'; fi`
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_check_main-check_session.Tpo tests/$(DEPDIR)/tests_check_main-check_session.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/check_session.c' object='tests/tests_check_main-check_session.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_check_main_CPPFLAGS) $(CPPFLAGS) $(tests_check_main_CFLAGS) $(CFLAGS) -c -o tests/tests_check_main-check_session.obj `if test -f 'tests/check_session.c'; then $(CYGPATH_W) 'tests/check_session.c'; else $(CYGPATH_W) '$(srcdir)/tests/check_session.c'; fi`
+
+tests/tests_runtc-runtc.o: tests/runtc.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_runtc_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/tests_runtc-runtc.o -MD -MP -MF tests/$(DEPDIR)/tests_runtc-runtc.Tpo -c -o tests/tests_runtc-runtc.o `test -f 'tests/runtc.c' || echo '$(srcdir)/'`tests/runtc.c
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_runtc-runtc.Tpo tests/$(DEPDIR)/tests_runtc-runtc.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/runtc.c' object='tests/tests_runtc-runtc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_runtc_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/tests_runtc-runtc.o `test -f 'tests/runtc.c' || echo '$(srcdir)/'`tests/runtc.c
+
+tests/tests_runtc-runtc.obj: tests/runtc.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_runtc_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/tests_runtc-runtc.obj -MD -MP -MF tests/$(DEPDIR)/tests_runtc-runtc.Tpo -c -o tests/tests_runtc-runtc.obj `if test -f 'tests/runtc.c'; then $(CYGPATH_W) 'tests/runtc.c'; else $(CYGPATH_W) '$(srcdir)/tests/runtc.c'; fi`
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_runtc-runtc.Tpo tests/$(DEPDIR)/tests_runtc-runtc.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/runtc.c' object='tests/tests_runtc-runtc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_runtc_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/tests_runtc-runtc.obj `if test -f 'tests/runtc.c'; then $(CYGPATH_W) 'tests/runtc.c'; else $(CYGPATH_W) '$(srcdir)/tests/runtc.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+ -rm -rf tests/.libs tests/_libs
+
+distclean-libtool:
+ -rm -f libtool config.lt
+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-library_includeHEADERS: $(library_include_HEADERS)
+ @$(NORMAL_INSTALL)
+ @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(library_includedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(library_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)$(library_includedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(library_includedir)" || exit $$?; \
+ done
+
+uninstall-library_includeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(library_includedir)'; $(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"
+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-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
+ -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+ rm -f $< $@
+ $(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+ @:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+ @$(am__set_TESTS_bases); \
+ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+ redo_bases=`for i in $$bases; do \
+ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+ done`; \
+ if test -n "$$redo_bases"; then \
+ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+ if $(am__make_dryrun); then :; else \
+ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+ fi; \
+ fi; \
+ if test -n "$$am__remaking_logs"; then \
+ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+ "recursion detected" >&2; \
+ else \
+ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+ fi; \
+ if $(am__make_dryrun); then :; else \
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1; \
+ fi
+ @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+ ws='[ ]'; \
+ results=`for b in $$bases; do echo $$b.trs; done`; \
+ test -n "$$results" || results=/dev/null; \
+ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
+ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
+ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
+ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
+ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+ if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+ success=true; \
+ else \
+ success=false; \
+ fi; \
+ br='==================='; br=$$br$$br$$br$$br; \
+ result_count () \
+ { \
+ if test x"$$1" = x"--maybe-color"; then \
+ maybe_colorize=yes; \
+ elif test x"$$1" = x"--no-color"; then \
+ maybe_colorize=no; \
+ else \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+ fi; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
+ else \
+ color_start= color_end=; \
+ fi; \
+ echo "$${color_start}# $$desc $$count$${color_end}"; \
+ }; \
+ create_testsuite_report () \
+ { \
+ result_count $$1 "TOTAL:" $$all "$$brg"; \
+ result_count $$1 "PASS: " $$pass "$$grn"; \
+ result_count $$1 "SKIP: " $$skip "$$blu"; \
+ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+ result_count $$1 "FAIL: " $$fail "$$red"; \
+ result_count $$1 "XPASS:" $$xpass "$$red"; \
+ result_count $$1 "ERROR:" $$error "$$mgn"; \
+ }; \
+ { \
+ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
+ $(am__rst_title); \
+ create_testsuite_report --no-color; \
+ echo; \
+ echo ".. contents:: :depth: 2"; \
+ echo; \
+ for b in $$bases; do echo $$b; done \
+ | $(am__create_global_log); \
+ } >$(TEST_SUITE_LOG).tmp || exit 1; \
+ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
+ if $$success; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
+ fi; \
+ echo "$${col}$$br$${std}"; \
+ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
+ echo "$${col}$$br$${std}"; \
+ create_testsuite_report --maybe-color; \
+ echo "$$col$$br$$std"; \
+ if $$success; then :; else \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
+ if test -n "$(PACKAGE_BUGREPORT)"; then \
+ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+ fi; \
+ echo "$$col$$br$$std"; \
+ fi; \
+ $$success || exit 1
+
+check-TESTS:
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+ exit $$?;
+recheck: all $(check_PROGRAMS)
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ bases=`for i in $$bases; do echo $$i; done \
+ | $(am__list_recheck_tests)` || exit 1; \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ log_list=`echo $$log_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+ am__force_recheck=am--force-recheck \
+ TEST_LOGS="$$log_list"; \
+ exit $$?
+tests/check_main.log: tests/check_main$(EXEEXT)
+ @p='tests/check_main$(EXEEXT)'; \
+ b='tests/check_main'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+.test.log:
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+ at am__EXEEXT_TRUE@.test$(EXEEXT).log:
+ at am__EXEEXT_TRUE@ @p='$<'; \
+ at am__EXEEXT_TRUE@ $(am__set_b); \
+ at am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+ at am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
+ at am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+ at am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
+
+distdir: $(DISTFILES)
+ @case `sed 15q $(srcdir)/NEWS` in \
+ *"$(VERSION)"*) : ;; \
+ *) \
+ echo "NEWS not updated; not releasing" 1>&2; \
+ exit 1;; \
+ esac
+ $(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
+ $(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) | GZIP=$(GZIP_ENV) gzip -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 shar distribution archives 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 distribution archives compressed with" \
+ "legacy program 'compress' is deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -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*) \
+ GZIP=$(GZIP_ENV) gzip -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*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir)
+ chmod u+w $(distdir)
+ mkdir $(distdir)/_build $(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 \
+ && ../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-TESTS
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) $(HEADERS) \
+ config.h
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(library_includedir)"; 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:
+ -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+ -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+ -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+
+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 tests/$(DEPDIR)/$(am__dirstamp)
+ -rm -f tests/$(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."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \
+ clean-libtool clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf ./$(DEPDIR) tests/$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-hdr distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-library_includeHEADERS install-pkgconfigDATA
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-data-hook
+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 $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -rf ./$(DEPDIR) tests/$(DEPDIR)
+ -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 \
+ uninstall-library_includeHEADERS uninstall-pkgconfigDATA
+
+.MAKE: all check-am install-am install-data-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-TESTS \
+ check-am clean clean-checkPROGRAMS clean-cscope clean-generic \
+ clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS 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 info info-am install install-am \
+ install-data install-data-am install-data-hook install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am \
+ install-libLTLIBRARIES install-library_includeHEADERS \
+ install-man install-pdf install-pdf-am install-pkgconfigDATA \
+ 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 \
+ recheck tags tags-am uninstall uninstall-am \
+ uninstall-libLTLIBRARIES uninstall-library_includeHEADERS \
+ uninstall-pkgconfigDATA
+
+
+.PHONY: ChangeLog
+ChangeLog:
+ git --git-dir $(top_srcdir)/.git log > ChangeLog || touch ChangeLog
+
+dist-hook: ChangeLog
+ $(MKDIR_P) $(distdir)/tools
+ cp ${top_srcdir}/tools/install-decoders $(distdir)/tools
+ $(MKDIR_P) $(distdir)/decoders
+ ${top_srcdir}/tools/install-decoders -i ${top_srcdir}/decoders \
+ -o $(distdir)/decoders
+
+install-decoders:
+ $(MKDIR_P) $(DESTDIR)$(DECODERS_DIR)
+ $(PYTHON3) ${top_srcdir}/tools/install-decoders \
+ -i ${top_srcdir}/decoders -o $(DESTDIR)$(DECODERS_DIR)
+
+install-data-hook: install-decoders
+
+# 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:
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..bd21b02
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,223 @@
+0.3.0 (2014-05-06)
+------------------
+
+Note: This release DOES change the libsigrokdecode public C API. This
+means it is NOT backwards-compatible and frontends will need updates.
+
+ * New supported protocol decoders:
+ - guess_bitrate Guess the bitrate/baudrate of a signal
+ - ir_nec NEC infrared remote control protocol
+ - ir_rc5 RC-5 infrared remote control protocol
+ - midi Musical Instrument Digital Interface
+ - parallel Parallel synchronous bus decoder
+ - rgb_led_spi RGB LED string decoder (SPI)
+ - xfp 10 Gigabit Small Form Factor Pluggable Module
+ - z80 Zilog Z80 microprocessor disassembly
+ * Add support for annotation rows, i.e. groups of annotation classes that
+ are supposed to be displayed on the same GUI "row" together.
+ * Add support for the new OUTPUT_BINARY feature, which allows PDs to output
+ decoded data in various file formats (for loading and further processing
+ in other tools, or for direct live piping into other tools).
+ * Add support for the OUTPUT_META output type. This is used by PDs for
+ reporting various data points to the frontends, allowing them to perform
+ various post-processing and statistics tasks on them (e.g. simple counts,
+ average/mean values, min/max values, and so on).
+ * The OUTPUT_PROTO output type is now called OUTPUT_PYTHON.
+ * All protocol decoders:
+ - Bump the 'api_version' field of all decoders to 2. They are no longer
+ compatible (and cannot be used with) older libsigrokdecode versions.
+ - Updates to emit proper annotation classes, annotation sample numbers,
+ and annotation rows for GUI usage (bugs #146, #148, #150, #151, #154,
+ #155, #162, #147, #163, #168, #156, #309, and #344).
+ - Longer and shorter annotations are now supplied for GUI usage (frontends
+ can for example always show the longest annotation per zoom-level).
+ - Extensive protocol information has been moved from the PDs to the wiki.
+ Example: http://sigrok.org/wiki/Protocol_decoder:Uart
+ - Use correct I²C / I²S names in user-visible texts (not I2C/I2S).
+ * dcf77:
+ - Fix a bug in the handling of DCF77 bit 0.
+ - Drop handling of the 'PON' pin, this is not DCF77 related (bug #153).
+ - Fix the data parity check (bug #157).
+ * i2c:
+ - Fix corner case that can yield issues when using triggers on LAs.
+ - Drop unneeded 'addressing' option.
+ - Output bit-exact annotations and data for use by stacked PDs.
+ * i2s:
+ - Add OUTPUT_BINARY support for dumping the decoded data in WAV format.
+ * lpc:
+ - Various fixes to make the PD work better (or at all).
+ - Fix the handling of optional channels.
+ - Make the RESET# pin optional.
+ * onewire_link:
+ - Split 'reset' and 'presence' annotations.
+ * pan1321:
+ - Support the JSEC, JPRO, JAAC, and JSDA commands.
+ - Various internal fixes and improvements.
+ * parallel:
+ - Fix internal use of the obsolete 'metadata' parameter (bug #202).
+ * rtc8564:
+ - Properly handle register 0x06 (weekday) and the 'century' bit.
+ * sdcard_spi:
+ - Emit bit-exact annotations for the register fields that need them.
+ - Fix a Python issue with duplicate keys in a dict (bug #191).
+ * spi:
+ - Either MISO or MOSI can be optional now, but not both (bug #175).
+ - The CS# pin is optional now. If the pin is supplied, it is honored
+ (decoding only happens when the pin is asserted). Otherwise decoding will
+ use every CLK edge, regardless of CS# state or CS# existance (bug #152).
+ - Rename the 'SCK' pin to the more common 'CLK'.
+ - Output bit-exact annotations and data for use by stacked PDs.
+ - Fix a bug occuring when only MOSI (but not MISO) was supplied.
+ * transitioncounter:
+ - Drop the obsolete 'transitioncounter' dummy protocol decoder.
+ * uart:
+ - Fix corner case that can yield issues when using triggers on LAs.
+ - Use 'T' for stop bits and 'P' for parity bits (shortest annotations).
+ - Add a data format selection option.
+ - Annotations for RX and TX are now emitted in different annotation rows.
+ - Either the RX or TX signal can be optional now (but not both).
+ - Fix incorrectly displayed characters (bug #201).
+ - Add support for OUTPUT_BINARY output for RX, TX, or both.
+ - Output bit-exact annotations and data for use by stacked PDs.
+ * uart_dump:
+ - Drop the obsolete 'uart_dump' decoder (the feature is now included
+ in the 'uart' protocol decoder itself via OUTPUT_BINARY).
+ * usb_packet:
+ - The 'usb_protocol' decoder has been renamed to 'usb_packet'.
+ - Various bugfixes and decoding improvements.
+ * usb_signalling:
+ - Fix decoding of individual bits, sample in the middle of bits (bug #158).
+ * libsigrokdecode API changes overview:
+ - Add srd_session_new(), srd_session_destroy(), and a session context.
+ - Add srd_session_metadata_set().
+ - The name 'probe' has been renamed to 'channel' everywhere.
+ - The lib no longer defineѕ names with _t suffix (POSIX reserved).
+ - Drop the obsolete SRD_MAX_NUM_PROBES.
+ - Add the SRD_CONF_SAMPLERATE config key.
+ - Please see the Doxygen API documentation for further details.
+ * Protocol decoder API:
+ - Metadata is passed to PDs at runtime now (not at decoder start).
+ PDs now have a new optional metadata() method to receive it.
+ - Output types are now registered via Decoder.register(), not Decoder.add().
+ - The report() method is now obsolete. This kind of information will be
+ passed to the frontends via the OUTPUT_META output type, allowing the
+ frontends to perform various post-processing and statistics tasks.
+ - PDs can now define BINARY_OUTPUT types via the 'binary' tuple.
+ - PDs can now define annotation rows via the 'annotation_rows' tuple.
+ - PD options are now a tuple of dicts. Each option is a dict containing
+ the keys 'id', 'desc', 'def', and 'values'. Valid option types are
+ UTF-8 strings, integers, and floats (bugs #254, #306, #317, #165).
+ - Channels, optional channels, and annotations are now tuples (not lists).
+ - Only load PDs of API version 2, all other versions are incompatible.
+ * srd_inst_channel_set_all(): Report an error if not all channels required
+ by the respective protocol decoder have been supplied.
+ * Remove some internal limitations to max. 64 channels (bug #120).
+ * Add a unit test suite framework for libsigrokdecode ('make check').
+ * Add a protocol decoder test-suite framework for developers (tests/pdtest).
+ * Various bugfixes:
+ - srd_inst_option_set(): Properly return an error on exceptions.
+ - srd_inst_option_set(): Fix setting of instance options, caused by class
+ variable clobbering or releasing borrowed references (bugs #170, #174).
+ - srd_decoder_load(): Error out upon invalid module names (bug #176).
+ - srd_decoder_load(): Don't try to load an already loaded PD twice.
+ - srd_decoder_load_all(): Avoid issues without prior srd_init() (bug #178).
+ - srd_decoder_doc_get(): Fix an issue in the unit test suite (bug #179).
+ - srd_pd_output_callback_add(): Honor cb_data value (bug #143).
+ - Fix issues with PDs not getting the samplerate (bugs #97, #132, #166).
+ - Don't incorrectly decrease a borrowed reference (bug #177).
+ - Fix various memory leaks and segfault conditions.
+ * Build system:
+ - Use pkg-config (not python3-config) to check for Python libs.
+ This enables (better) libsigrokdecode cross-compile support.
+ - PDs no longer have an extra Makefile.am, and 'make install' now
+ happens via a Python script.
+ - configure: Clearly mark required and optional libs.
+ - Fix an issue with DESTDIR support (bug #215).
+ - Add the HACKING file to the tarball.
+ * Updated or new build-time and runtime requirements:
+ - Python >= 3.2 (required)
+ - check >= 0.9.4 (optional, only needed for the libsigrokdecode testsuite)
+ - libsigrok >= 0.3.0 (optional, only needed for the developer PD testsuite)
+ - python3-coverage (optional, only needed for the developer PD testsuite)
+ * New 'make install'-time requirement:
+ - Python >= 3.2 (required)
+
+0.2.0 (2013-05-04)
+------------------
+
+Note: This release DOES change the libsigrokdecode public C API. This
+means it is NOT backwards-compatible and frontends will need updates.
+
+ * New supported protocol decoders:
+ - Dallas DS1307 RTC
+ * Library: Decoders now expose their options via the GSList *options field
+ in struct srd_decoder.
+ * API related changes:
+ - Various API documentation fixes.
+ - srd_decoder_list() now returns 'const GSList *' instead of 'GSList *'.
+ - Added new srd_strerror() and srd_strerror_name() API calls.
+ * Added support for optional probes for PDs.
+
+0.1.1 (2013-01-27)
+------------------
+
+Note: This release does NOT change the libsigrokdecode public C API. This
+means existing libsigrokdecode frontends should not require any changes.
+However, individual PDs and their output changed, which may require
+some adaptations on the user's side in some cases.
+
+ * New supported protocol decoders:
+ - avr_isp AVR In-System Programming
+ - can Controller Area Network
+ - jtag Joint Test Action Group (IEEE 1149.1)
+ - jtag_stm32 Joint Test Action Group / ST STM32
+ - lm75 National LM75
+ - lpc Low-Pin-Count
+ - maxim_ds28ea00 Maxim DS28EA00 1-Wire digital thermometer
+ - onewire_link 1-Wire serial communication bus (link layer)
+ - onewire_network 1-Wire serial communication bus (network layer)
+ - sdcard_spi Secure Digital card (SPI mode)
+ - tlc5620 Texas Instruments TLC5620
+ - uart_dump UART dump
+ * i2cfilter: Now outputs 'i2c' packets instead of just data bytes, so
+ other PDs can stack on top of it. It filters by I2C slave address.
+ * edid: Now takes 'i2c' packets as input.
+ * pan1321:
+ - Various bugfixes to make the PD actually work.
+ - Now features 'Text (short)' and 'Text (verbose)' outputs.
+ * usb:
+ - The PD is split into 'usb_signalling' and 'usb_protocol' (stacked on top).
+ - Various bugfixes to make the PD work (better).
+ - The DP/DM probes were swapped, this is now fixed.
+ - Preliminary support for USB low-speed (in addition to full-speed).
+ * mlx90614: Minor bugfixes.
+ * dcf77:
+ - Major bugfix, this PD was not working correctly at all.
+ - Handle PON signal.
+ * nunchuk: Complete rewrite, works (better) now.
+ * spi: Update docs, send CS# change packets, change output API slightly.
+ If you have a PD which stacks on top of SPI, it'll need to be adapted.
+ The PDs that ship with libsigrokdecode are updated already.
+ * mx25lxx05d:
+ - Implement support for the READ, RDSR, and PP commands.
+ - Decode status register bits.
+ - Fix SE command handling.
+ - Fix inverted SRWD bit handling.
+ * Various smaller style and consistency changes in code and PD descriptions.
+ * Fix the build with Homebrew on Mac OS X.
+ * Performance improvements in some PDs.
+ * Documentation: Update website and git URLs.
+ * pkg-config file: Small fix to improve behaviour on Windows with cmake.
+ * All PD implementation files are now named 'pd.py' consistently.
+ * configure script:
+ - Also check for python3.3-config in addition to python-config and others.
+ - Add missing -fvisibility=hidden to default CFLAGS.
+ - Fix CFLAGS handling (configure.ac amends CFLAGS, doesn't overwrite now).
+ * The minimum required glib version is 2.24.0 now.
+ * We now ship a standard INSTALL file which documents the 'configure' options.
+
+0.1.0 (2012-04-17)
+------------------
+
+ * Initial release.
+
diff --git a/README b/README
new file mode 100644
index 0000000..fa30ef0
--- /dev/null
+++ b/README
@@ -0,0 +1,104 @@
+-------------------------------------------------------------------------------
+README
+-------------------------------------------------------------------------------
+
+The sigrok project aims at creating a portable, cross-platform,
+Free/Libre/Open-Source signal analysis software suite that supports various
+device types (such as logic analyzers, oscilloscopes, multimeters, and more).
+
+libsigrokdecode is a shared library written in C which provides the basic
+API for running sigrok protocol decoders. The protocol decoders themselves
+are written in Python.
+
+
+Status
+------
+
+libsigrokdecode is in a usable state and has had official tarball releases.
+
+While the API can change from release to release, this will always be
+properly documented and reflected in the package version number and
+in the shared library / libtool / .so-file version numbers.
+
+However, there are _NO_ guarantees at all for stable APIs in git snapshots!
+Distro packagers should only use released tarballs (no git snapshots).
+
+
+Requirements
+------------
+
+ - git
+ - gcc (>= 4.0)
+ - make
+ - autoconf >= 2.63
+ - automake >= 1.11
+ - libtool
+ - pkg-config >= 0.22
+ - libglib >= 2.24.0
+ - Python >= 3.2
+ - check >= 0.9.4 (optional, only needed to run unit tests)
+ - libsigrok >= 0.3.0 (optional, only needed for the developer PD tests)
+ - python3-coverage (optional, only needed for the developer PD tests)
+
+
+Building and installing
+-----------------------
+
+In order to get the libsigrokdecode source code and build it, run:
+
+ $ git clone git://sigrok.org/libsigrokdecode
+ $ cd libsigrokdecode
+ $ ./autogen.sh
+ $ ./configure
+ $ make
+
+For installing libsigrokdecode:
+
+ $ make install
+
+See INSTALL or the following wiki page for more (OS-specific) instructions:
+
+ http://sigrok.org/wiki/Building
+
+
+Copyright and license
+---------------------
+
+libsigrokdecode is licensed under the terms of the GNU General Public License
+(GPL), version 3 or later.
+
+The protocol decoders (PDs) included in libsigrokdecode are an integral part
+of the shared library (they are not merely external "plugins", they are not
+external programs that libsigrokdecode calls via fork/exec, they cannot
+function standalone without libsigrokdecode at all, the PDs and the rest of
+the libsigrokdecode codebase share data structures and make function calls
+to each other). Thus, since the PDs are part of the library, they are also
+licensed under the terms of the GPLv3+.
+
+While some individual source code files are licensed under the GPLv2+, and
+some files are licensed under the GPLv3+, this doesn't change the fact that
+the library as a whole is licensed under the terms of the GPLv3+.
+
+Please see the individual source files for the full list of copyright holders.
+
+
+Mailing lists
+-------------
+
+There are two mailing lists for sigrok/libsigrokdecode:
+
+ https://lists.sourceforge.net/lists/listinfo/sigrok-devel
+ https://lists.sourceforge.net/lists/listinfo/sigrok-commits
+
+
+IRC
+---
+
+You can find the sigrok developers in the #sigrok IRC channel on Freenode.
+
+
+Website
+-------
+
+ http://sigrok.org/wiki/Libsigrokdecode
+
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..9a85aac
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,1587 @@
+# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 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'.])])
+
+# Configure paths for GLIB
+# Owen Taylor 1997-2001
+
+dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
+dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
+dnl gthread, or gio is specified in MODULES, pass to pkg-config
+dnl
+AC_DEFUN([AM_PATH_GLIB_2_0],
+[dnl
+dnl Get the cflags and libraries from pkg-config
+dnl
+AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
+ , enable_glibtest=yes)
+
+ pkg_config_args=glib-2.0
+ for module in . $4
+ do
+ case "$module" in
+ gmodule)
+ pkg_config_args="$pkg_config_args gmodule-2.0"
+ ;;
+ gmodule-no-export)
+ pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
+ ;;
+ gobject)
+ pkg_config_args="$pkg_config_args gobject-2.0"
+ ;;
+ gthread)
+ pkg_config_args="$pkg_config_args gthread-2.0"
+ ;;
+ gio*)
+ pkg_config_args="$pkg_config_args $module-2.0"
+ ;;
+ esac
+ done
+
+ PKG_PROG_PKG_CONFIG([0.16])
+
+ no_glib=""
+
+ if test "x$PKG_CONFIG" = x ; then
+ no_glib=yes
+ PKG_CONFIG=no
+ fi
+
+ min_glib_version=ifelse([$1], ,2.0.0,$1)
+ AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
+
+ if test x$PKG_CONFIG != xno ; then
+ ## don't try to run the test against uninstalled libtool libs
+ if $PKG_CONFIG --uninstalled $pkg_config_args; then
+ echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
+ enable_glibtest=no
+ fi
+
+ if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
+ :
+ else
+ no_glib=yes
+ fi
+ fi
+
+ if test x"$no_glib" = x ; then
+ GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
+ GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
+ GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
+ GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
+
+ GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
+ GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
+ glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ if test "x$enable_glibtest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GLIB_CFLAGS"
+ LIBS="$GLIB_LIBS $LIBS"
+dnl
+dnl Now check if the installed GLIB is sufficiently new. (Also sanity
+dnl checks the results of pkg-config to some extent)
+dnl
+ rm -f conf.glibtest
+ AC_TRY_RUN([
+#include <glib.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+ unsigned int major, minor, micro;
+
+ fclose (fopen ("conf.glibtest", "w"));
+
+ if (sscanf("$min_glib_version", "%u.%u.%u", &major, &minor, µ) != 3) {
+ printf("%s, bad version string\n", "$min_glib_version");
+ exit(1);
+ }
+
+ if ((glib_major_version != $glib_config_major_version) ||
+ (glib_minor_version != $glib_config_minor_version) ||
+ (glib_micro_version != $glib_config_micro_version))
+ {
+ printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
+ $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
+ glib_major_version, glib_minor_version, glib_micro_version);
+ printf ("*** was found! If pkg-config was correct, then it is best\n");
+ printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
+ printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
+ printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
+ printf("*** required on your system.\n");
+ printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
+ printf("*** to point to the correct configuration files\n");
+ }
+ else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
+ (glib_minor_version != GLIB_MINOR_VERSION) ||
+ (glib_micro_version != GLIB_MICRO_VERSION))
+ {
+ printf("*** GLIB header files (version %d.%d.%d) do not match\n",
+ GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
+ printf("*** library (version %d.%d.%d)\n",
+ glib_major_version, glib_minor_version, glib_micro_version);
+ }
+ else
+ {
+ if ((glib_major_version > major) ||
+ ((glib_major_version == major) && (glib_minor_version > minor)) ||
+ ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
+ {
+ return 0;
+ }
+ else
+ {
+ printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n",
+ glib_major_version, glib_minor_version, glib_micro_version);
+ printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n",
+ major, minor, micro);
+ printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
+ printf("***\n");
+ printf("*** If you have already installed a sufficiently new version, this error\n");
+ printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
+ printf("*** being found. The easiest way to fix this is to remove the old version\n");
+ printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
+ printf("*** correct copy of pkg-config. (In this case, you will have to\n");
+ printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
+ printf("*** so that the correct libraries are found at run-time))\n");
+ }
+ }
+ return 1;
+}
+],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ if test "x$no_glib" = x ; then
+ AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
+ ifelse([$2], , :, [$2])
+ else
+ AC_MSG_RESULT(no)
+ if test "$PKG_CONFIG" = "no" ; then
+ echo "*** A new enough version of pkg-config was not found."
+ echo "*** See http://www.freedesktop.org/software/pkgconfig/"
+ else
+ if test -f conf.glibtest ; then
+ :
+ else
+ echo "*** Could not run GLIB test program, checking why..."
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GLIB_CFLAGS"
+ LIBS="$LIBS $GLIB_LIBS"
+ AC_TRY_LINK([
+#include <glib.h>
+#include <stdio.h>
+], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
+ [ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding GLIB or finding the wrong"
+ echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
+ [ echo "*** The test program failed to compile or link. See the file config.log for the"
+ echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ GLIB_CFLAGS=""
+ GLIB_LIBS=""
+ GLIB_GENMARSHAL=""
+ GOBJECT_QUERY=""
+ GLIB_MKENUMS=""
+ GLIB_COMPILE_RESOURCES=""
+ ifelse([$3], , :, [$3])
+ fi
+ AC_SUBST(GLIB_CFLAGS)
+ AC_SUBST(GLIB_LIBS)
+ AC_SUBST(GLIB_GENMARSHAL)
+ AC_SUBST(GOBJECT_QUERY)
+ AC_SUBST(GLIB_MKENUMS)
+ AC_SUBST(GLIB_COMPILE_RESOURCES)
+ rm -f conf.glibtest
+])
+
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+# serial 1 (pkg-config-0.24)
+#
+# Copyright © 2004 Scott James Remnant <scott at netsplit.com>.
+#
+# 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 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+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
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists. Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+# only at the first occurence in configure.ac, so if the first place
+# it's called might be skipped (such as if it is within an "if", you
+# 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])
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+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
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+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
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# 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 <http://pkg-config.freedesktop.org/>.])[]dnl
+ ])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ $3
+fi[]dnl
+])# PKG_CHECK_MODULES
+
+# Copyright (C) 2002-2013 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.14'
+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.14.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.14.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# Copyright (C) 2011-2013 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_AR([ACT-IF-FAIL])
+# -------------------------
+# Try to determine the archiver interface, and trigger the ar-lib wrapper
+# if it is needed. If the detection of archiver interface fails, run
+# ACT-IF-FAIL (default is to abort configure with a proper error message).
+AC_DEFUN([AM_PROG_AR],
+[AC_BEFORE([$0], [LT_INIT])dnl
+AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([ar-lib])dnl
+AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
+: ${AR=ar}
+
+AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
+ [AC_LANG_PUSH([C])
+ am_cv_ar_interface=ar
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
+ [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
+ AC_TRY_EVAL([am_ar_try])
+ if test "$ac_status" -eq 0; then
+ am_cv_ar_interface=ar
+ else
+ am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
+ AC_TRY_EVAL([am_ar_try])
+ if test "$ac_status" -eq 0; then
+ am_cv_ar_interface=lib
+ else
+ am_cv_ar_interface=unknown
+ fi
+ fi
+ rm -f conftest.lib libconftest.a
+ ])
+ AC_LANG_POP([C])])
+
+case $am_cv_ar_interface in
+ar)
+ ;;
+lib)
+ # Microsoft lib, so override with the ar-lib wrapper script.
+ # FIXME: It is wrong to rewrite AR.
+ # 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__AR in this case,
+ # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
+ # similar.
+ AR="$am_aux_dir/ar-lib $AR"
+ ;;
+unknown)
+ m4_default([$1],
+ [AC_MSG_ERROR([could not determine $AR interface])])
+ ;;
+esac
+AC_SUBST([AR])dnl
+])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001-2013 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],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997-2013 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-2013 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-2013 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.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named 'Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running 'make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "$am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])# _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. FIXME. This creates each '.P' file that we will
+# 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" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 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:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+# We need awk for the "check" target. 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: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake at 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: <http://www.gnu.org/software/coreutils/>.
+
+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 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-2013 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}" != 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-2013 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-2013 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 to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997-2013 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-2013 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-2013 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) 2001-2013 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-2013 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-2013 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-2013 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-2013 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-2013 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 <conftest.tar])
+ AM_RUN_LOG([cat conftest.dir/file])
+ grep GrepMe conftest.dir/file >/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([autostuff/libtool.m4])
+m4_include([autostuff/ltoptions.m4])
+m4_include([autostuff/ltsugar.m4])
+m4_include([autostuff/ltversion.m4])
+m4_include([autostuff/lt~obsolete.m4])
diff --git a/autostuff/ar-lib b/autostuff/ar-lib
new file mode 100755
index 0000000..fe2301e
--- /dev/null
+++ b/autostuff/ar-lib
@@ -0,0 +1,270 @@
+#! /bin/sh
+# Wrapper for Microsoft lib.exe
+
+me=ar-lib
+scriptversion=2012-03-01.08; # UTC
+
+# Copyright (C) 2010-2013 Free Software Foundation, Inc.
+# Written by Peter Rosin <peda at lysator.liu.se>.
+#
+# 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 <http://www.gnu.org/licenses/>.
+
+# 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 <bug-automake at gnu.org> or send patches to
+# <automake-patches at gnu.org>.
+
+
+# func_error message
+func_error ()
+{
+ echo "$me: $1" 1>&2
+ exit 1
+}
+
+file_conv=
+
+# func_file_conv build_file
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts.
+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 in
+ 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_at_file at_file operation archive
+# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
+# for each of them.
+# When interpreting the content of the @FILE, do NOT use func_file_conv,
+# since the user would need to supply preconverted file names to
+# binutils ar, at least for MinGW.
+func_at_file ()
+{
+ operation=$2
+ archive=$3
+ at_file_contents=`cat "$1"`
+ eval set x "$at_file_contents"
+ shift
+
+ for member
+ do
+ $AR -NOLOGO $operation:"$member" "$archive" || exit $?
+ done
+}
+
+case $1 in
+ '')
+ func_error "no command. Try '$0 --help' for more information."
+ ;;
+ -h | --h*)
+ cat <<EOF
+Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
+
+Members may be specified in a file named with @FILE.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "$me, version $scriptversion"
+ exit $?
+ ;;
+esac
+
+if test $# -lt 3; then
+ func_error "you must specify a program, an action and an archive"
+fi
+
+AR=$1
+shift
+while :
+do
+ if test $# -lt 2; then
+ func_error "you must specify a program, an action and an archive"
+ fi
+ case $1 in
+ -lib | -LIB \
+ | -ltcg | -LTCG \
+ | -machine* | -MACHINE* \
+ | -subsystem* | -SUBSYSTEM* \
+ | -verbose | -VERBOSE \
+ | -wx* | -WX* )
+ AR="$AR $1"
+ shift
+ ;;
+ *)
+ action=$1
+ shift
+ break
+ ;;
+ esac
+done
+orig_archive=$1
+shift
+func_file_conv "$orig_archive"
+archive=$file
+
+# strip leading dash in $action
+action=${action#-}
+
+delete=
+extract=
+list=
+quick=
+replace=
+index=
+create=
+
+while test -n "$action"
+do
+ case $action in
+ d*) delete=yes ;;
+ x*) extract=yes ;;
+ t*) list=yes ;;
+ q*) quick=yes ;;
+ r*) replace=yes ;;
+ s*) index=yes ;;
+ S*) ;; # the index is always updated implicitly
+ c*) create=yes ;;
+ u*) ;; # TODO: don't ignore the update modifier
+ v*) ;; # TODO: don't ignore the verbose modifier
+ *)
+ func_error "unknown action specified"
+ ;;
+ esac
+ action=${action#?}
+done
+
+case $delete$extract$list$quick$replace,$index in
+ yes,* | ,yes)
+ ;;
+ yesyes*)
+ func_error "more than one action specified"
+ ;;
+ *)
+ func_error "no action specified"
+ ;;
+esac
+
+if test -n "$delete"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ for member
+ do
+ case $1 in
+ @*)
+ func_at_file "${1#@}" -REMOVE "$archive"
+ ;;
+ *)
+ func_file_conv "$1"
+ $AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
+ ;;
+ esac
+ done
+
+elif test -n "$extract"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ if test $# -gt 0; then
+ for member
+ do
+ case $1 in
+ @*)
+ func_at_file "${1#@}" -EXTRACT "$archive"
+ ;;
+ *)
+ func_file_conv "$1"
+ $AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
+ ;;
+ esac
+ done
+ else
+ $AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
+ do
+ $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
+ done
+ fi
+
+elif test -n "$quick$replace"; then
+ if test ! -f "$orig_archive"; then
+ if test -z "$create"; then
+ echo "$me: creating $orig_archive"
+ fi
+ orig_archive=
+ else
+ orig_archive=$archive
+ fi
+
+ for member
+ do
+ case $1 in
+ @*)
+ func_file_conv "${1#@}"
+ set x "$@" "@$file"
+ ;;
+ *)
+ func_file_conv "$1"
+ set x "$@" "$file"
+ ;;
+ esac
+ shift
+ shift
+ done
+
+ if test -n "$orig_archive"; then
+ $AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
+ else
+ $AR -NOLOGO -OUT:"$archive" "$@" || exit $?
+ fi
+
+elif test -n "$list"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ $AR -NOLOGO -LIST "$archive" || exit $?
+fi
diff --git a/autostuff/compile b/autostuff/compile
new file mode 100755
index 0000000..531136b
--- /dev/null
+++ b/autostuff/compile
@@ -0,0 +1,347 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand '-c -o'.
+
+scriptversion=2012-10-14.11; # UTC
+
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey at cygnus.com>.
+#
+# 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 <http://www.gnu.org/licenses/>.
+
+# 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 <bug-automake at gnu.org> or send patches to
+# <automake-patches at gnu.org>.
+
+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 <bug-automake at gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "compile $scriptversion"
+ exit $?
+ ;;
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.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 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/autostuff/config.guess b/autostuff/config.guess
new file mode 100755
index 0000000..b79252d
--- /dev/null
+++ b/autostuff/config.guess
@@ -0,0 +1,1558 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright 1992-2013 Free Software Foundation, Inc.
+
+timestamp='2013-06-10'
+
+# 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 <http://www.gnu.org/licenses/>.
+#
+# 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.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches with a ChangeLog entry to config-patches at gnu.org.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -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 <config-patches at gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2013 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
+
+trap 'exit 1' 1 2 15
+
+# 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.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { 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) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; 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 ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi at noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; 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
+
+ eval $set_cc_for_build
+ cat <<-EOF > $dummy.c
+ #include <features.h>
+ #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'`
+ ;;
+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=`(/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 ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $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
+ # 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/[-_].*/\./'`
+ ;;
+ 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}"
+ 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 ;;
+ *: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 ;;
+ 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 ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ 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 at 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.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ 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)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* 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
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ 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/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ 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:BSD:*)
+ 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
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ 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
+ eval $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:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ 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 ;;
+ *:FreeBSD:*:*)
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case ${UNAME_PROCESSOR} in
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ 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 ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-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 '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-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:*:*)
+ eval $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 ;;
+ 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 ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $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; }
+ ;;
+ or1k:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ or32: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 ;;
+ 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}-unknown-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.*:* | i*86:SYSTEM_V: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' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/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 configury 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 <Richard.M.Bartel at ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes at openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf at swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green at stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green at 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 ;;
+ 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
+ eval $set_cc_for_build
+ if test "$UNAME_PROCESSOR" = unknown ; then
+ UNAME_PROCESSOR=powerpc
+ fi
+ 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
+ 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 ;;
+ *: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.
+ 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 ;;
+esac
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches at gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+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`
+/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 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/autostuff/config.sub b/autostuff/config.sub
new file mode 100755
index 0000000..9633db7
--- /dev/null
+++ b/autostuff/config.sub
@@ -0,0 +1,1791 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright 1992-2013 Free Software Foundation, Inc.
+
+timestamp='2013-08-10'
+
+# 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 <http://www.gnu.org/licenses/>.
+#
+# 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 with a ChangeLog entry to config-patches at gnu.org.
+#
+# 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:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# 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
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -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 <config-patches at gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2013 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
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+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* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ android-linux)
+ os=-linux-android
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -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*)
+ os=
+ basic_machine=$1
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*178)
+ os=-lynxos178
+ ;;
+ -lynx*5)
+ os=-lynxos5
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | aarch64 | aarch64_be \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arceb \
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+ | avr | avr32 \
+ | be32 | be64 \
+ | bfin \
+ | c4x | c8051 | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | epiphany \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | le32 | le64 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nios | nios2 | nios2eb | nios2el \
+ | ns16k | ns32k \
+ | open8 \
+ | or1k | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pyramid \
+ | rl78 | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu \
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | we32k \
+ | x86 | xc16x | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ strongarm | thumb | xscale)
+ basic_machine=arm-unknown
+ ;;
+ xgate)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ xscaleeb)
+ basic_machine=armeb-unknown
+ ;;
+
+ xscaleel)
+ basic_machine=armel-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | aarch64-* | aarch64_be-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | be32-* | be64-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | c8051-* | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | hexagon-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | le32-* | le64-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | microblaze-* | microblazeel-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipsr5900-* | mipsr5900el-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nds32-* | nds32le-* | nds32be-* \
+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | open8-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pyramid-* \
+ | rl78-* | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | tahoe-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile*-* \
+ | tron-* \
+ | ubicom32-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ 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
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ 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 | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16 | cr16-*)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ 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
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ microblaze*)
+ basic_machine=microblaze-xilinx
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+ ;;
+ mingw32)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ 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-unknown
+ 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
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ 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
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc | ppcbe) basic_machine=powerpc-unknown
+ ;;
+ ppc-* | ppcbe-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ 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
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ strongarm-* | thumb-*)
+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ 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
+ ;;
+ tile*)
+ basic_machine=$basic_machine-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ 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
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ xscale-* | xscalee[bl]-*)
+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# 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)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/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
+ ;;
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First 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* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* | -plan9* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -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
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -nacl*)
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ 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 $basic_machine 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
+ ;;
+ 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
+ ;;
+ or1k-*)
+ 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
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-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
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-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
+ ;;
+ *)
+ 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.
+vendor=unknown
+case $basic_machine 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
+ ;;
+ -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
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/autostuff/depcomp b/autostuff/depcomp
new file mode 100755
index 0000000..4ebd5b3
--- /dev/null
+++ b/autostuff/depcomp
@@ -0,0 +1,791 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2013-05-30.07; # UTC
+
+# Copyright (C) 1999-2013 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 <http://www.gnu.org/licenses/>.
+
+# 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 <oliva at dcc.unicamp.br>.
+
+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 <bug-automake at gnu.org>.
+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 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/autostuff/install-sh b/autostuff/install-sh
new file mode 100755
index 0000000..377bb86
--- /dev/null
+++ b/autostuff/install-sh
@@ -0,0 +1,527 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2011-11-20.07; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# 'make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" "" $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+ test "$posix_glob" != "?" || {
+ if (set -f) 2>/dev/null; then
+ posix_glob=
+ else
+ posix_glob=:
+ fi
+ }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve the last data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -s $stripprog installed files.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
+
+ -C) copy_on_change=true;;
+
+ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
+
+ -o) chowncmd="$chownprog $2"
+ shift;;
+
+ -s) stripcmd=$stripprog;;
+
+ -t) dst_arg=$2
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
+
+ -T) no_target_directory=true;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+ shift
+done
+
+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
+ 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; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dst=$dstdir/`basename "$src"`
+ dstdir_status=0
+ else
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ 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.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/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.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 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
+
+ eval "$initialize_posix_glob"
+
+ oIFS=$IFS
+ IFS=/
+ $posix_glob set -f
+ set fnord $dstdir
+ shift
+ $posix_glob 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=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_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` &&
+
+ eval "$initialize_posix_glob" &&
+ $posix_glob set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ $posix_glob 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 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/autostuff/libtool.m4 b/autostuff/libtool.m4
new file mode 100644
index 0000000..d7c043f
--- /dev/null
+++ b/autostuff/libtool.m4
@@ -0,0 +1,7997 @@
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008, 2009, 2010, 2011 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) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# 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 GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+])
+
+# serial 57 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.58])dnl We use AC_INCLUDES_DEFAULT
+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_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+m4_defun([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+ case $cc_temp in
+ compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+ distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+])
+
+
+# _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
+
+_LT_CONFIG_LIBTOOL_INIT([
+# See if we are running on zsh, and set the options which 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 "X${COLLECT_NAMES+set}" != Xset; 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:
+#
+# <var>='`$ECHO "$<var>" | $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\\"\\\`\\\\\\""
+ ;;
+ *)
+ 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\\"\\\`\\\\\\""
+ ;;
+ *)
+ 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 $lt_write_fail = 0 && 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 <bug-libtool at gnu.org>."
+
+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 "$silent" = yes &&
+ 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 which 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
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $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.
+#
+_LT_COPYING
+_LT_LIBTOOL_TAGS
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+_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 "X${COLLECT_NAMES+set}" != Xset; 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)
+
+ _LT_PROG_REPLACE_SHELLFNS
+
+ 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'
+ TIMESTAMP='$TIMESTAMP'
+ 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 $_lt_result -eq 0; 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 $_lt_result -eq 0 && $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 "$lt_cv_apple_cc_single_mod" = "yes"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; 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 "$lt_cv_ld_force_load" = "no"; 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 "$lt_cv_ld_force_load" = "yes"; 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*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; 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 "$lt_cv_apple_cc_single_mod" != "yes"; 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 "${lt_cv_aix_libpath+set}" = 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 which will find a shell with a builtin
+# printf (which 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],
+[ --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 "$GCC" = yes; 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 in which 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 "x$enable_libtool_lock" != xno && 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 which ABI we are using.
+ 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 which ABI we are using.
+ echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ if test "$lt_cv_prog_gnu_ld" = yes; 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*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ 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-*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*)
+ 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-*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*)
+ 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 x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+*-*solaris*)
+ # Find out which ABI we are using.
+ 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*)
+ 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 "$ac_status" -eq 0; then
+ # Ensure the archiver fails upon bogus file names.
+ rm -f conftest.$ac_objext libconftest.a
+ AC_TRY_EVAL([lt_ar_try])
+ if test "$ac_status" -ne 0; then
+ lt_cv_ar_at_file=@
+ fi
+ fi
+ rm -f conftest.* libconftest.a
+ ])
+ ])
+
+if test "x$lt_cv_ar_at_file" = xno; 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
+ 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"
+ # 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 x"[$]$2" = xyes; 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 x"[$]$2" = xyes; 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;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # 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 $i != 17 # 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 "$cross_compiling" = yes; 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 <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#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 -fvisbility=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 "x$enable_dlopen" != xyes; 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
+ ])
+ ;;
+
+ *)
+ 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 "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && 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 "x$lt_cv_dlopen_self" = xyes; 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 "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; 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 "$hard_links" = no; 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 in which 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 "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
+ # 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 "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+ test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; 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 "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
+ test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; 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_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
+AC_MSG_CHECKING([dynamic linker characteristics])
+m4_if([$1],
+ [], [
+if test "$GCC" = yes; 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`
+ 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"
+ else
+ 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 "$host_cpu" = ia64; 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
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.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}'
+ else
+ # 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'
+ fi
+ 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%'\''`; test $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} $libname${shared_ext}'
+ 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=yes
+ 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 "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ 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 "$lt_cv_prog_gnu_ld" = yes; 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
+ ;;
+
+# 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
+
+ # Append ld.so.conf contents 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="/lib /usr/lib $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'
+ ;;
+
+netbsdelf*-gnu)
+ version_type=linux
+ 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='NetBSD ld.elf_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*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ 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
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[[89]] | openbsd2.[[89]].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+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 "$with_gnu_ld" = yes; 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=freebsd-elf
+ 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 "$with_gnu_ld" = yes; 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 "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+_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], [2],
+ [Run-time system search path for libraries])
+])# _LT_SYS_DYNAMIC_LINKER
+
+
+# _LT_PATH_TOOL_PREFIX(TOOL)
+# --------------------------
+# find a file program which 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 at 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 which 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 "$withval" = no || with_gnu_ld=yes],
+ [with_gnu_ld=no])dnl
+
+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(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 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_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` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+# -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+ lt_cv_ld_reload_flag,
+ [lt_cv_ld_reload_flag='-r'])
+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 "$GCC" != yes; then
+ reload_cmds=false
+ fi
+ ;;
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_TAGDECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _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
+# which 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.
+ # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+ if ( test "$lt_cv_nm_interface" = "BSD nm" && 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* | netbsdelf*-gnu)
+ 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*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; 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
+ ;;
+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
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ 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 "$lt_cv_path_NM" != "no"; 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 /dev/null 2>&1 | sed '1q'` in
+ *COFF*)
+ DUMPBIN="$DUMPBIN -symbols"
+ ;;
+ *)
+ 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 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 "x$lt_cv_path_mainfest_tool" != xyes; then
+ MANIFEST_TOOL=:
+fi
+_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
+])# _LT_PATH_MANIFEST_TOOL
+
+
+# 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 "$GCC" = yes; 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 "$host_cpu" = ia64; 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
+
+# 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 -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$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 -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/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
+ # and D for any global 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};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print 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 con't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT@&t at _DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data. */
+# define LT@&t at _DLSYM_CONST
+#else
+# define LT@&t at _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 at _DLSYM_CONST struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$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 "$pipe_works" = yes; 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_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_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 "$GXX" = yes; 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 "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ 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'])
+ ;;
+ 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 "$host_cpu" = ia64; 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 "$host_cpu" != ia64; 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* | netbsdelf*-gnu)
+ ;;
+ *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 "$GCC" = yes; 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 "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ 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'])
+ ;;
+
+ 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 "$host_cpu" = ia64; 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
+ ;;
+
+ 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'])
+ ;;
+
+ 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'
+ ;;
+ 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 which 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 at 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 at 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 AIX nm, but means don't demangle with GNU nm
+ # Also, AIX nm treats weak defined symbols like other global defined
+ # symbols, whereas GNU nm marks them as "W".
+ 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) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | 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
+ ;;
+ linux* | k*bsd*-gnu | gnu*)
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ ;;
+ *)
+ _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 "$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
+ ;;
+ linux* | k*bsd*-gnu | gnu*)
+ _LT_TAGVAR(link_all_deplibs, $1)=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 "$with_gnu_ld" = yes; 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 "$lt_use_gnu_ld_interface" = yes; 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 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 "$host_cpu" != ia64; 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 <jrb3 at best.com> 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 (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; 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
+ ;;
+
+ 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 "$host_os" = linux-dietlibc; 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 "$tmp_diet" = no
+ 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' ;;
+ 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 "x$supports_anon_versioning" = xyes; 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
+ 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 "x$supports_anon_versioning" = xyes; 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* | netbsdelf*-gnu)
+ 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 can not
+*** 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 "$_LT_TAGVAR(ld_shlibs, $1)" = no; 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 "$GCC" = yes && 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 "$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
+ 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 AIX nm, but means don't demangle with GNU nm
+ # Also, AIX nm treats weak defined symbols like other global
+ # defined symbols, whereas GNU nm marks them as "W".
+ 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) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | 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
+ # 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
+
+ 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,'
+
+ if test "$GCC" = yes; 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 "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; 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 "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ 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_use_runtimelinking" = yes; 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 "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; 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 "$with_gnu_ld" = yes; 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
+ # This is similar to how AIX traditionally builds its shared libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ 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~linknames='
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+ else
+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $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 "$GCC" = yes; 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 $output_objdir/$soname = $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 $output_objdir/$soname = $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 "$GCC" = yes && test "$with_gnu_ld" = no; 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 "$with_gnu_ld" = no; 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 "$GCC" = yes && test "$with_gnu_ld" = no; 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 "$with_gnu_ld" = no; 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 "$GCC" = yes; 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 "$lt_cv_irix_exported_symbol" = yes; 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
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ 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*)
+ 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__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; 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
+ case $host_os in
+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ ;;
+ *)
+ _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'
+ ;;
+ esac
+ 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
+ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; 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 "$GCC" = yes; 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 "$GCC" = yes; 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 "$GCC" = yes; 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 "x$host_vendor" = xsequent; 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 "$GCC" = yes; 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 can NOT 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 "$GCC" = yes; 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 x$host_vendor = xsni; 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 "$_LT_TAGVAR(ld_shlibs, $1)" = no && 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 "$enable_shared" = yes && test "$GCC" = yes; 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 which 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 "$can_build_shared" = "no" && 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 "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ 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 "$enable_shared" = yes || 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 "X$CXX" != "Xno" &&
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+ (test "X$CXX" != "Xg++"))) ; 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 "$_lt_caught_CXX_error" != yes; 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 "$GXX" = yes; 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 "$GXX" = yes; 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 "$with_gnu_ld" = yes; 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 "$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
+ 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
+ # need to do runtime linking.
+ 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
+ ;;
+ 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,'
+
+ if test "$GXX" = yes; 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 "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; 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 "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ 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_use_runtimelinking" = yes; 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 "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; 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 "$with_gnu_ld" = yes; 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
+ # This is similar to how AIX traditionally builds its shared
+ # libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3 at best.com> 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~linknames='
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+ else
+ $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $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 (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; 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)
+ ;;
+
+ 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 $output_objdir/$soname = $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 "$GXX" = yes; 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 $output_objdir/$soname = $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 $with_gnu_ld = no; 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 "$GXX" = yes; then
+ if test $with_gnu_ld = no; 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 "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; 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 "x$supports_anon_versioning" = xyes; 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
+ ;;
+
+ openbsd2*)
+ # C++ shared libraries are fairly broken
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ openbsd*)
+ 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__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; 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 "$GXX" = yes && test "$with_gnu_ld" = no; 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 "$GXX" = yes && test "$with_gnu_ld" = no; 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 $LDFLAGS $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 -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 $LDFLAGS $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 -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 can NOT 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 "$_LT_TAGVAR(ld_shlibs, $1)" = no && 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 "$_lt_caught_CXX_error" != yes
+
+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 ${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
+])# _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 $p = "-L" ||
+ test $p = "-R"; 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 "$pre_test_object_deps_done" = no; 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 "$pre_test_object_deps_done" = no; 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)=
+ ;;
+
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ # Adding this requires a known-good setup of shared libraries for
+ # Sun compiler versions before 5.6, else PIC objects from an old
+ # archive will be linked into the output, leading to subtle bugs.
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+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 "X$F77" = "Xno"; 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 "$_lt_disable_F77" != yes; 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 "$can_build_shared" = "no" && 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 "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ 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 "$enable_shared" = yes || 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 "$_lt_disable_F77" != yes
+
+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 "X$FC" = "Xno"; 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 "$_lt_disable_FC" != yes; 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 "$can_build_shared" = "no" && 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 "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ 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 "$enable_shared" = yes || 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 "$_lt_disable_FC" != yes
+
+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 "x${GCJFLAGS+set}" = xset || 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 $lt_ac_count -gt 10 && 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],
+[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,b/c, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+AC_MSG_RESULT([$xsi_shell])
+_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
+
+AC_MSG_CHECKING([whether the shell understands "+="])
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+AC_MSG_RESULT([$lt_shell_append])
+_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
+
+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_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
+# ------------------------------------------------------
+# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
+# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
+m4_defun([_LT_PROG_FUNCTION_REPLACE],
+[dnl {
+sed -e '/^$1 ()$/,/^} # $1 /c\
+$1 ()\
+{\
+m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
+} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+])
+
+
+# _LT_PROG_REPLACE_SHELLFNS
+# -------------------------
+# Replace existing portable implementations of several shell functions with
+# equivalent extended shell implementations where those features are available..
+m4_defun([_LT_PROG_REPLACE_SHELLFNS],
+[if test x"$xsi_shell" = xyes; then
+ _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac])
+
+ _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
+ func_basename_result="${1##*/}"])
+
+ _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+ func_basename_result="${1##*/}"])
+
+ _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}])
+
+ _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
+ func_split_long_opt_name=${1%%=*}
+ func_split_long_opt_arg=${1#*=}])
+
+ _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
+ func_split_short_opt_arg=${1#??}
+ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
+
+ _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac])
+
+ _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
+
+ _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
+
+ _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
+fi
+
+if test x"$lt_shell_append" = xyes; then
+ _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
+
+ _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
+ func_quote_for_eval "${2}"
+dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
+ eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
+
+ # Save a `func_append' function call where possible by direct use of '+='
+ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+else
+ # Save a `func_append' function call even when '+=' is not available
+ sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+ AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
+fi
+])
+
+# _LT_PATH_CONVERSION_FUNCTIONS
+# -----------------------------
+# Determine which 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
diff --git a/autostuff/ltmain.sh b/autostuff/ltmain.sh
new file mode 100644
index 0000000..bb5fa02
--- /dev/null
+++ b/autostuff/ltmain.sh
@@ -0,0 +1,9661 @@
+
+# libtool (GNU libtool) 2.4.2
+# Written by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007, 2008, 2009, 2010, 2011 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 GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Usage: $progname [OPTION]... [MODE-ARG]...
+#
+# Provide generalized library-building support services.
+#
+# --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
+# --preserve-dup-deps don't remove duplicate dependency libraries
+# --quiet, --silent don't print informational messages
+# --no-quiet, --no-silent
+# print informational messages (default)
+# --no-warn don't display warning messages
+# --tag=TAG use configuration variables from tag TAG
+# -v, --verbose print more informational messages than default
+# --no-verbose don't print the extra informational messages
+# --version print version information
+# -h, --help, --help-all print short, long, or detailed 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)
+# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.7
+# automake: $automake_version
+# autoconf: $autoconf_version
+#
+# Report bugs to <bug-libtool at gnu.org>.
+# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
+# General help using GNU software: <http://www.gnu.org/gethelp/>.
+
+PROGRAM=libtool
+PACKAGE=libtool
+VERSION="2.4.2 Debian-2.4.2-1.7"
+TIMESTAMP=""
+package_revision=1.3337
+
+# 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
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+}
+
+# NLS nuisances: We save the old values to restore during execute mode.
+lt_user_locale=
+lt_safe_locale=
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test \"\${$lt_var+set}\" = set; then
+ save_$lt_var=\$$lt_var
+ $lt_var=C
+ export $lt_var
+ lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
+ lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+ fi"
+done
+LC_ALL=C
+LANGUAGE=C
+export LANGUAGE LC_ALL
+
+$lt_unset CDPATH
+
+
+# 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"
+
+
+
+: ${CP="cp -f"}
+test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+: ${Xsed="$SED -e 1s/^X//"}
+
+# Global variables:
+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.
+
+exit_status=$EXIT_SUCCESS
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" $lt_nl"
+
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+} # func_dirname may be replaced by extended shell implementation
+
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "${1}" | $SED "$basename"`
+} # func_basename may be replaced by extended shell implementation
+
+
+# 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"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+ func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
+} # func_dirname_and_basename may be replaced by extended shell implementation
+
+
+# func_stripname 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).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ 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 may be replaced by extended shell implementation
+
+
+# These SED scripts presuppose an absolute path with a trailing slash.
+pathcar='s,^/\([^/]*\).*$,\1,'
+pathcdr='s,^/[^/]*,,'
+removedotparts=':dotsl
+ s@/\./@/@g
+ t dotsl
+ s,/\.$,/,'
+collapseslashes='s@/\{1,\}@/@g'
+finalslash='s,/*$,/,'
+
+# 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.
+# value returned in "$func_normal_abspath_result"
+func_normal_abspath ()
+{
+ # 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 "$removedotparts" -e "$collapseslashes" -e "$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 "$pathcar"`
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$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_normal_abspath_result=$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_relative_path SRCDIR DSTDIR
+# generates a relative path from SRCDIR to DSTDIR, with a trailing
+# slash if non-empty, suitable for immediately appending a filename
+# without needing to append a separator.
+# value returned in "$func_relative_path_result"
+func_relative_path ()
+{
+ 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 "x$func_relative_path_tlibdir" = x ; 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 "x$func_stripname_result" != x ; then
+ func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
+ fi
+
+ # Normalisation. If bindir is libdir, return empty string,
+ # else relative path ending with a slash; either way, target
+ # file name can be directly appended.
+ if test ! -z "$func_relative_path_result"; then
+ func_stripname './' '' "$func_relative_path_result/"
+ func_relative_path_result=$func_stripname_result
+ fi
+}
+
+# The name of this program:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+
+# Make sure we have an absolute path for reexecution:
+case $progpath in
+ [\\/]*|[A-Za-z]:\\*) ;;
+ *[\\/]*)
+ progdir=$func_dirname_result
+ progdir=`cd "$progdir" && pwd`
+ progpath="$progdir/$progname"
+ ;;
+ *)
+ save_IFS="$IFS"
+ IFS=${PATH_SEPARATOR-:}
+ for progdir in $PATH; do
+ IFS="$save_IFS"
+ test -x "$progdir/$progname" && break
+ done
+ IFS="$save_IFS"
+ test -n "$progdir" || progdir=`pwd`
+ progpath="$progdir/$progname"
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+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
+# which contains forward slashes, into one that contains
+# (escaped) backslashes. A very naive implementation.
+lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
+# in input to 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 '$'.
+bs='\\'
+bs2='\\\\'
+bs4='\\\\\\\\'
+dollar='\$'
+sed_double_backslash="\
+ s/$bs4/&\\
+/g
+ s/^$bs2$dollar/$bs&/
+ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
+ s/\n//g"
+
+# Standard options:
+opt_dry_run=false
+opt_help=false
+opt_quiet=false
+opt_verbose=false
+opt_warning=:
+
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
+{
+ $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+ $opt_verbose && 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_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO "$*"
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+ $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+ $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
+
+ # bash bug again:
+ :
+}
+
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+ func_error ${1+"$@"}
+ exit $EXIT_FAILURE
+}
+
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+ func_error ${1+"$@"}
+ func_fatal_error "$help"
+}
+help="Try \`$progname --help' for more information." ## default
+
+
+# func_grep expression filename
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+ $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_mkdir_p directory-path
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+ my_directory_path="$1"
+ my_dir_list=
+
+ if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
+ # Protect directory names starting with `-'
+ case $my_directory_path in
+ -*) my_directory_path="./$my_directory_path" ;;
+ esac
+
+ # While some portion of DIR does not yet exist...
+ while test ! -d "$my_directory_path"; do
+ # ...make a list in topmost first order. Use a colon delimited
+ # list incase some portion of path contains whitespace.
+ my_dir_list="$my_directory_path:$my_dir_list"
+
+ # If the last portion added has no slash in it, the list is done
+ case $my_directory_path in */*) ;; *) break ;; esac
+
+ # ...otherwise throw away the child directory and loop
+ my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
+ done
+ my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
+
+ save_mkdir_p_IFS="$IFS"; IFS=':'
+ for my_dir in $my_dir_list; do
+ IFS="$save_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 "$my_dir" 2>/dev/null || :
+ done
+ IFS="$save_mkdir_p_IFS"
+
+ # Bail out if we (or some other process) failed to create a directory.
+ test -d "$my_directory_path" || \
+ func_fatal_error "Failed to create \`$1'"
+ fi
+}
+
+
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible. If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+ my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+ if test "$opt_dry_run" = ":"; then
+ # Return a directory name, but don't create it in dry-run mode
+ my_tmpdir="${my_template}-$$"
+ else
+
+ # If mktemp works, use that first and foremost
+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$my_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+ save_mktempdir_umask=`umask`
+ umask 0077
+ $MKDIR "$my_tmpdir"
+ umask $save_mktempdir_umask
+ fi
+
+ # If we're not in dry-run mode, bomb out on failure
+ test -d "$my_tmpdir" || \
+ func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
+ fi
+
+ $ECHO "$my_tmpdir"
+}
+
+
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
+# is double-quoted, suitable for a subsequent eval, whereas
+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
+# which are still active within double quotes backslashified.
+func_quote_for_eval ()
+{
+ case $1 in
+ *[\\\`\"\$]*)
+ func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
+ *)
+ func_quote_for_eval_unquoted_result="$1" ;;
+ esac
+
+ case $func_quote_for_eval_unquoted_result in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and and variable
+ # expansion for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
+ ;;
+ *)
+ func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
+ esac
+}
+
+
+# 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 ()
+{
+ case $1 in
+ *[\\\`\"]*)
+ my_arg=`$ECHO "$1" | $SED \
+ -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
+ *)
+ my_arg="$1" ;;
+ esac
+
+ case $my_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.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ my_arg="\"$my_arg\""
+ ;;
+ esac
+
+ func_quote_for_expand_result="$my_arg"
+}
+
+
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent 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 ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$my_cmd"
+ my_status=$?
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+
+# func_show_eval_locale cmd [fail_exp]
+# Unless opt_silent 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 ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$lt_user_locale
+ $my_cmd"
+ my_status=$?
+ eval "$lt_safe_locale"
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ 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 ()
+{
+ case $1 in
+ [0-9]* | *[!a-zA-Z0-9_]*)
+ func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
+ ;;
+ * )
+ func_tr_sh_result=$1
+ ;;
+ esac
+}
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+ $opt_debug
+
+ $SED -n '/(C)/!b go
+ :more
+ /\./!{
+ N
+ s/\n# / /
+ b more
+ }
+ :go
+ /^# '$PROGRAM' (GNU /,/# warranty; / {
+ s/^# //
+ s/^# *$//
+ s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
+ p
+ }' < "$progpath"
+ exit $?
+}
+
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+ $opt_debug
+
+ $SED -n '/^# Usage:/,/^# *.*--help/ {
+ s/^# //
+ s/^# *$//
+ s/\$progname/'$progname'/
+ p
+ }' < "$progpath"
+ echo
+ $ECHO "run \`$progname --help | more' for full usage"
+ exit $?
+}
+
+# func_help [NOEXIT]
+# Echo long help message to standard output and exit,
+# unless 'noexit' is passed as argument.
+func_help ()
+{
+ $opt_debug
+
+ $SED -n '/^# Usage:/,/# Report bugs to/ {
+ :print
+ s/^# //
+ s/^# *$//
+ s*\$progname*'$progname'*
+ s*\$host*'"$host"'*
+ s*\$SHELL*'"$SHELL"'*
+ s*\$LTCC*'"$LTCC"'*
+ s*\$LTCFLAGS*'"$LTCFLAGS"'*
+ s*\$LD*'"$LD"'*
+ s/\$with_gnu_ld/'"$with_gnu_ld"'/
+ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
+ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
+ p
+ d
+ }
+ /^# .* home page:/b print
+ /^# General help using/b print
+ ' < "$progpath"
+ ret=$?
+ if test -z "$1"; then
+ exit $ret
+ fi
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+ $opt_debug
+
+ func_error "missing argument for $1."
+ exit_cmd=exit
+}
+
+
+# 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.
+func_split_short_opt ()
+{
+ my_sed_short_opt='1s/^\(..\).*$/\1/;q'
+ my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
+
+ func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
+ func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
+} # func_split_short_opt may be replaced by extended shell implementation
+
+
+# func_split_long_opt longopt
+# Set func_split_long_opt_name and func_split_long_opt_arg shell
+# variables after splitting LONGOPT at the `=' sign.
+func_split_long_opt ()
+{
+ my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
+ my_sed_long_arg='1s/^--[^=]*=//'
+
+ func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
+ func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
+} # func_split_long_opt may be replaced by extended shell implementation
+
+exit_cmd=:
+
+
+
+
+
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
+
+# Global variables.
+nonopt=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+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=
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "${1}=\$${1}\${2}"
+} # func_append may be replaced by extended shell implementation
+
+# func_append_quoted var value
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+func_append_quoted ()
+{
+ func_quote_for_eval "${2}"
+ eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
+} # func_append_quoted may be replaced by extended shell implementation
+
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=`expr "${@}"`
+} # func_arith may be replaced by extended shell implementation
+
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
+} # func_len may be replaced by extended shell implementation
+
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
+} # func_lo2o may be replaced by extended shell implementation
+
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
+} # func_xform may be replaced by extended shell implementation
+
+
+# func_fatal_configuration arg...
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+ func_error ${1+"$@"}
+ func_error "See the $PACKAGE documentation for more information."
+ func_fatal_error "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 "$build_libtool_libs" = yes; then
+ echo "enable shared libraries"
+ else
+ echo "disable shared libraries"
+ fi
+ if test "$build_old_libs" = yes; 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
+}
+
+
+# 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
+
+
+
+# Option defaults:
+opt_debug=:
+opt_dry_run=false
+opt_config=false
+opt_preserve_dup_deps=false
+opt_features=false
+opt_finish=false
+opt_help=false
+opt_help_all=false
+opt_silent=:
+opt_warning=:
+opt_verbose=:
+opt_silent=false
+opt_verbose=false
+
+
+# Parse options once, thoroughly. This comes as soon as possible in the
+# script to make things like `--version' happen as quickly as we can.
+{
+ # this just eases exit handling
+ while test $# -gt 0; do
+ opt="$1"
+ shift
+ case $opt in
+ --debug|-x) opt_debug='set -x'
+ func_echo "enabling shell trace mode"
+ $opt_debug
+ ;;
+ --dry-run|--dryrun|-n)
+ opt_dry_run=:
+ ;;
+ --config)
+ opt_config=:
+func_config
+ ;;
+ --dlopen|-dlopen)
+ optarg="$1"
+ opt_dlopen="${opt_dlopen+$opt_dlopen
+}$optarg"
+ shift
+ ;;
+ --preserve-dup-deps)
+ opt_preserve_dup_deps=:
+ ;;
+ --features)
+ opt_features=:
+func_features
+ ;;
+ --finish)
+ opt_finish=:
+set dummy --mode finish ${1+"$@"}; shift
+ ;;
+ --help)
+ opt_help=:
+ ;;
+ --help-all)
+ opt_help_all=:
+opt_help=': help-all'
+ ;;
+ --mode)
+ test $# = 0 && func_missing_arg $opt && break
+ optarg="$1"
+ opt_mode="$optarg"
+case $optarg in
+ # Valid mode arguments:
+ clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+ # Catch anything else as an error
+ *) func_error "invalid argument for $opt"
+ exit_cmd=exit
+ break
+ ;;
+esac
+ shift
+ ;;
+ --no-silent|--no-quiet)
+ opt_silent=false
+func_append preserve_args " $opt"
+ ;;
+ --no-warning|--no-warn)
+ opt_warning=false
+func_append preserve_args " $opt"
+ ;;
+ --no-verbose)
+ opt_verbose=false
+func_append preserve_args " $opt"
+ ;;
+ --silent|--quiet)
+ opt_silent=:
+func_append preserve_args " $opt"
+ opt_verbose=false
+ ;;
+ --verbose|-v)
+ opt_verbose=:
+func_append preserve_args " $opt"
+opt_silent=false
+ ;;
+ --tag)
+ test $# = 0 && func_missing_arg $opt && break
+ optarg="$1"
+ opt_tag="$optarg"
+func_append preserve_args " $opt $optarg"
+func_enable_tag "$optarg"
+ shift
+ ;;
+
+ -\?|-h) func_usage ;;
+ --help) func_help ;;
+ --version) func_version ;;
+
+ # Separate optargs to long options:
+ --*=*)
+ func_split_long_opt "$opt"
+ set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ # Separate non-argument short options:
+ -\?*|-h*|-n*|-v*)
+ func_split_short_opt "$opt"
+ set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ --) break ;;
+ -*) func_fatal_help "unrecognized option \`$opt'" ;;
+ *) set dummy "$opt" ${1+"$@"}; shift; break ;;
+ esac
+ done
+
+ # Validate options:
+
+ # save first non-option argument
+ if test "$#" -gt 0; then
+ nonopt="$opt"
+ shift
+ fi
+
+ # preserve --debug
+ test "$opt_debug" = : || func_append preserve_args " --debug"
+
+ case $host in
+ *cygwin* | *mingw* | *pw32* | *cegcc*)
+ # 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
+
+ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+ func_fatal_configuration "not configured to build any kind of library"
+ fi
+
+ # Darwin sucks
+ eval std_shrext=\"$shrext_cmds\"
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$opt_dlopen" && test "$opt_mode" != execute; 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."
+ }
+
+
+ # Bail if the options were screwed
+ $exit_cmd $EXIT_FAILURE
+}
+
+
+
+
+## ----------- ##
+## Main. ##
+## ----------- ##
+
+# 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 \
+ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# 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 "$lalib_p" = yes
+}
+
+# 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 ()
+{
+ func_lalib_p "$1"
+}
+
+# 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 ()
+{
+ $opt_debug
+ save_ifs=$IFS; IFS='~'
+ for cmd in $1; do
+ IFS=$save_ifs
+ eval cmd=\"$cmd\"
+ 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 ()
+{
+ $opt_debug
+ 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 ()
+{
+ $opt_debug
+ 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 "$build_libtool_libs" = yes; then
+ write_lobj=\'${2}\'
+ else
+ write_lobj=none
+ fi
+
+ if test "$build_old_libs" = yes; then
+ write_oldobj=\'${3}\'
+ else
+ write_oldobj=none
+ fi
+
+ $opt_dry_run || {
+ cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+ $MV "${write_libobj}T" "${write_libobj}"
+ }
+}
+
+
+##################################################
+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
+##################################################
+
+# func_convert_core_file_wine_to_w32 ARG
+# Helper function used by file name 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.
+#
+# ARG is the $build file name to be converted to w32 format.
+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
+# be empty on error (or when ARG is empty)
+func_convert_core_file_wine_to_w32 ()
+{
+ $opt_debug
+ func_convert_core_file_wine_to_w32_result="$1"
+ if test -n "$1"; then
+ # Unfortunately, winepath does not exit with a non-zero error code, so we
+ # are forced to check the contents of stdout. On the other hand, if the
+ # command is not found, the shell will set an exit code of 127 and print
+ # *an error message* to stdout. So we must check for both error code of
+ # zero AND non-empty stdout, which explains the odd construction:
+ func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/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 "$lt_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 ()
+{
+ $opt_debug
+ # 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 ()
+{
+ $opt_debug
+ 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 ()
+{
+ $opt_debug
+ # awkward: cmd appends spaces to result
+ func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
+ $SED -e 's/[ ]*$//' -e "$lt_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 ()
+{
+ $opt_debug
+ 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 ()
+{
+ $opt_debug
+ 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 ()
+{
+ $opt_debug
+ 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 ()
+{
+ $opt_debug
+ $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 ()
+{
+ $opt_debug
+ 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 ()
+{
+ $opt_debug
+ 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 ()
+{
+ $opt_debug
+ 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 ()
+{
+ $opt_debug
+ 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 ()
+{
+ $opt_debug
+ 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 ()
+{
+ $opt_debug
+ 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 ()
+{
+ $opt_debug
+ 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 ()
+{
+ $opt_debug
+ 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 ()
+{
+ $opt_debug
+ 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 ()
+{
+ $opt_debug
+ 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 ()
+{
+ $opt_debug
+ 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 ()
+{
+ $opt_debug
+ 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 ()
+{
+ $opt_debug
+ 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_mode_compile arg...
+func_mode_compile ()
+{
+ $opt_debug
+ # 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 "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not 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 "$build_old_libs" = yes; 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 "$pic_mode" = no && test "$deplibs_check_method" != pass_all; 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 "$compiler_c_o" = no; 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 "$need_locks" = yes; 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 "$need_locks" = warn; 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 "$build_libtool_libs" = yes; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
+ if test "$pic_mode" != no; 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 "$need_locks" = warn &&
+ 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 "$suppress_opt" = yes; then
+ suppress_output=' >/dev/null 2>&1'
+ fi
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test "$build_old_libs" = yes; then
+ if test "$pic_mode" != yes; then
+ # Don't build PIC code
+ command="$base_compile $qsrcfile$pie_flag"
+ else
+ command="$base_compile $qsrcfile $pic_flag"
+ fi
+ if test "$compiler_c_o" = yes; 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 "$need_locks" = warn &&
+ 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 "$need_locks" != no; then
+ removelist=$lockfile
+ $RM "$lockfile"
+ fi
+ }
+
+ exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+ test "$opt_mode" = compile && 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
+ -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 ()
+{
+ $opt_debug
+ # 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 test "X$opt_dry_run" = Xfalse; then
+ 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"
+ else
+ # 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
+ fi
+}
+
+test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+ $opt_debug
+ 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_silent && 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 "$opt_mode" = finish && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+ $opt_debug
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+ # 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=no
+ 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=yes ;;
+ -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$prev" = x-m && 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=yes
+ if test "$isdir" = yes; 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
+ ;;
+ 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 "$build_old_libs" = yes; 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=yes
+ 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'` ### testsuite: skip nested quoting test
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ func_warning "\`$lib' has not been installed in \`$libdir'"
+ finalize=no
+ fi
+ done
+
+ relink_command=
+ func_source "$wrapper"
+
+ outputname=
+ if test "$fast_install" = no && test -n "$relink_command"; then
+ $opt_dry_run || {
+ if test "$finalize" = yes; 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_silent || {
+ 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 "$opt_mode" = install && 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 ()
+{
+ $opt_debug
+ my_outputname="$1"
+ my_originator="$2"
+ my_pic_p="${3-no}"
+ my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+ my_dlsyms=
+
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; 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$TIMESTAMP) $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 con'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
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test "$dlself" = yes; 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 <import library>.
+ $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 >/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
+
+ 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[];
+LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{\
+ { \"$my_originator\", (void *) 0 },"
+
+ 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" ;;
+ *)
+ if test "X$my_pic_p" != Xno; then
+ pic_flag_for_symtable=" $pic_flag"
+ fi
+ ;;
+ 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"'
+
+ # 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_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 ()
+{
+ $opt_debug
+ 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
+ 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
+ }
+ }'`
+ 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 ()
+{
+ $opt_debug
+ 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 ()
+{
+ $opt_debug
+ 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 which possess that section. Heuristic: eliminate
+ # all those which 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_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 ()
+{
+ $opt_debug
+ 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 ()
+{
+ $opt_debug
+ 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_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 ()
+{
+ $opt_debug
+ 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 ()
+{
+ $opt_debug
+ f_ex_an_ar_dir="$1"; shift
+ f_ex_an_ar_oldlib="$1"
+ if test "$lock_old_archive_extraction" = yes; 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 "$lock_old_archive_extraction" = yes; 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 ()
+{
+ $opt_debug
+ 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`
+ darwin_base_archive=`basename "$darwin_archive"`
+ 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 "$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 in which 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$TIMESTAMP) $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/ which is used only on
+# windows platforms, and (c) all begin with the string "--lt-"
+# (application programs are unlikely to have options which 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$TIMESTAMP) $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 "$fast_install" = yes; 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 "$shlibpath_overrides_runpath" = yes && 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 <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+ Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+
+ The $output program cannot be directly executed until all the libtool
+ libraries that it depends on are installed.
+
+ This wrapper executable should never be moved out of the build directory.
+ If it is, it will not operate correctly.
+*/
+EOF
+ cat <<"EOF"
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE 1
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+# include <io.h>
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+/* 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 platforms) ... */
+#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
+# ifndef _INTPTR_T_DEFINED
+# define _INTPTR_T_DEFINED
+# define intptr_t int
+# endif
+#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 ((void *) 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 <<EOF
+volatile const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ func_to_host_path "$temp_rpath"
+ cat <<EOF
+const char * LIB_PATH_VALUE = "$func_to_host_path_result";
+EOF
+ else
+ cat <<"EOF"
+const char * LIB_PATH_VALUE = "";
+EOF
+ fi
+
+ if test -n "$dllsearchpath"; then
+ func_to_host_path "$dllsearchpath:"
+ cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE = "$func_to_host_path_result";
+EOF
+ else
+ cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE = "";
+EOF
+ fi
+
+ if test "$fast_install" = yes; then
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+ else
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+ fi
+
+
+ cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX "--lt-"
+
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
+static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
+
+int
+main (int argc, char *argv[])
+{
+ char **newargz;
+ int newargc;
+ char *tmp_pathspec;
+ char *actual_cwrapper_path;
+ char *actual_cwrapper_name;
+ char *target_name;
+ char *lt_argv_zero;
+ intptr_t rval = 127;
+
+ int i;
+
+ program_name = (char *) xstrdup (base_name (argv[0]));
+ newargz = XMALLOC (char *, argc + 1);
+
+ /* very simple arg parsing; don't want to rely on getopt
+ * also, copy all non cwrapper options to newargz, except
+ * argz[0], which is handled differently
+ */
+ newargc=0;
+ for (i = 1; i < argc; i++)
+ {
+ if (strcmp (argv[i], dumpscript_opt) == 0)
+ {
+EOF
+ case "$host" in
+ *mingw* | *cygwin* )
+ # make stdout use "unix" line endings
+ echo " setmode(1,_O_BINARY);"
+ ;;
+ esac
+
+ cat <<"EOF"
+ lt_dump_script (stdout);
+ return 0;
+ }
+ if (strcmp (argv[i], debug_opt) == 0)
+ {
+ lt_debug = 1;
+ continue;
+ }
+ if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
+ {
+ /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+ namespace, but it is not one of the ones we know about and
+ have already dealt with, above (inluding dump-script), then
+ report an error. Otherwise, targets might begin to believe
+ they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+ namespace. The first time any user complains about this, we'll
+ need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+ or a configure.ac-settable value.
+ */
+ lt_fatal (__FILE__, __LINE__,
+ "unrecognized %s option: '%s'",
+ ltwrapper_option_prefix, argv[i]);
+ }
+ /* otherwise ... */
+ newargz[++newargc] = xstrdup (argv[i]);
+ }
+ newargz[++newargc] = NULL;
+
+EOF
+ cat <<EOF
+ /* The GNU banner must be the first non-error debug message */
+ lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
+EOF
+ cat <<"EOF"
+ lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
+
+ tmp_pathspec = find_executable (argv[0]);
+ if (tmp_pathspec == NULL)
+ lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (before symlink chase) at: %s\n",
+ tmp_pathspec);
+
+ actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (after symlink chase) at: %s\n",
+ actual_cwrapper_path);
+ XFREE (tmp_pathspec);
+
+ actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
+ strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+ /* wrapper name transforms */
+ strendzap (actual_cwrapper_name, ".exe");
+ tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+ XFREE (actual_cwrapper_name);
+ actual_cwrapper_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ /* target_name transforms -- use actual target program name; might have lt- prefix */
+ target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+ strendzap (target_name, ".exe");
+ tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+ XFREE (target_name);
+ target_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) libtool target name: %s\n",
+ target_name);
+EOF
+
+ cat <<EOF
+ newargz[0] =
+ XMALLOC (char, (strlen (actual_cwrapper_path) +
+ strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+ strcpy (newargz[0], actual_cwrapper_path);
+ strcat (newargz[0], "$objdir");
+ strcat (newargz[0], "/");
+EOF
+
+ cat <<"EOF"
+ /* stop here, and copy so we don't have to do this twice */
+ tmp_pathspec = xstrdup (newargz[0]);
+
+ /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+ strcat (newargz[0], actual_cwrapper_name);
+
+ /* DO want the lt- prefix here if it exists, so use target_name */
+ lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+ XFREE (tmp_pathspec);
+ tmp_pathspec = NULL;
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ {
+ char* p;
+ while ((p = strchr (newargz[0], '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ }
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+ XFREE (target_name);
+ XFREE (actual_cwrapper_path);
+ XFREE (actual_cwrapper_name);
+
+ lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+ lt_setenv ("DUALCASE", "1"); /* for MSK sh */
+ /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
+ be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
+ because on Windows, both *_VARNAMEs are PATH but uninstalled
+ libraries must come first. */
+ lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+ lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+
+ lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
+ nonnull (lt_argv_zero));
+ for (i = 0; i < newargc; i++)
+ {
+ lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
+ i, nonnull (newargz[i]));
+ }
+
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ /* execv doesn't actually work on mingw as expected on unix */
+ newargz = prepare_spawn (newargz);
+ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+ if (rval == -1)
+ {
+ /* failed to start process */
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) failed to launch target \"%s\": %s\n",
+ lt_argv_zero, nonnull (strerror (errno)));
+ return 127;
+ }
+ return rval;
+EOF
+ ;;
+ *)
+ cat <<"EOF"
+ execv (lt_argv_zero, newargz);
+ return rval; /* =127, but avoids unused variable warning */
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+ void *p = (void *) malloc (num);
+ if (!p)
+ lt_fatal (__FILE__, __LINE__, "memory exhausted");
+
+ return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+ string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+ const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ /* Skip over the disk name in MSDOS pathnames. */
+ if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+ name += 2;
+#endif
+
+ for (base = name; *name; name++)
+ if (IS_DIR_SEPARATOR (*name))
+ base = name + 1;
+ return base;
+}
+
+int
+check_executable (const char *path)
+{
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 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];
+ int 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 = 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 (strcmp (str, pat) == 0)
+ *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
+ int 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)
+ {
+ int orig_value_len = strlen (orig_value);
+ int 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 #' */
+ int len = strlen (new_value);
+ while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+ {
+ new_value[len-1] = '\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 ()
+{
+ $opt_debug
+ case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
+ *import*) : ;;
+ *) false ;;
+ esac
+}
+
+# func_mode_link arg...
+func_mode_link ()
+{
+ $opt_debug
+ 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
+ # which 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 which 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=
+ non_pic_objects=
+ precious_files_regex=
+ prefer_static_libs=no
+ preload=no
+ 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 "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ break
+ ;;
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
+ if test "$build_libtool_libs" = yes && 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)
+ if test "$preload" = no; then
+ # Add the symbol object into the linking commands.
+ func_append compile_command " @SYMFILE@"
+ func_append finalize_command " @SYMFILE@"
+ preload=yes
+ fi
+ case $arg in
+ *.la | *.lo) ;; # We handle these cases below.
+ force)
+ if test "$dlself" = no; then
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ self)
+ if test "$prev" = dlprefiles; then
+ dlself=yes
+ elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+ dlself=yes
+ else
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ if test "$prev" = dlfiles; 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
+ ;;
+ 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 "$pic_object" = none &&
+ test "$non_pic_object" = none; 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 "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; 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 "$prev" = dlprefiles; 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 "$non_pic_object" != none; 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 "$pic_object" = none ; 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
+ ;;
+ 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 "$prev" = rpath; 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$arg" = "X-export-symbols"; 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$arg" = "X-lc" || test "X$arg" = "X-lm"; 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$arg" = "X-lc" && continue
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ test "X$arg" = "X-lc" && 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$arg" = "X-lc" && continue
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ test "X$arg" = "X-lc" && continue
+ ;;
+ esac
+ elif test "X$arg" = "X-lc_r"; then
+ case $host in
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
+ fi
+ func_append deplibs " $arg"
+ 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
+ ;;
+
+ -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
+ # @file GCC response files
+ # -tp=* Portland pgcc target processor selection
+ # --sysroot=* for sysroot support
+ # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+ -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*|-flto*|-fwhopr*|-fuse-linker-plugin)
+ 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
+ ;;
+
+ # 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 "$pic_object" = none &&
+ test "$non_pic_object" = none; 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 "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; 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 "$prev" = dlprefiles; 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 "$non_pic_object" != none; 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 "$pic_object" = none ; 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 "$prev" = dlfiles; then
+ # This library was specified with -dlopen.
+ func_append dlfiles " $func_resolve_sysroot_result"
+ prev=
+ elif test "$prev" = dlprefiles; 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 "$export_dynamic" = yes && 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\"
+
+ 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 "$linkmode" = lib; 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=no
+ 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 "$linkmode,$pass" = "lib,link"; 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 "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan"; then
+ libs="$deplibs"
+ deplibs=
+ fi
+ if test "$linkmode" = prog; then
+ case $pass in
+ dlopen) libs="$dlfiles" ;;
+ dlpreopen) libs="$dlprefiles" ;;
+ link)
+ libs="$deplibs %DEPLIBS%"
+ test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
+ ;;
+ esac
+ fi
+ if test "$linkmode,$pass" = "lib,dlpreopen"; 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 "$pass" = dlopen; then
+ # Collect dlpreopened libraries
+ save_deplibs="$deplibs"
+ deplibs=
+ fi
+
+ for deplib in $libs; do
+ lib=
+ found=no
+ case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ func_append compiler_flags " $deplib"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) func_append new_inherited_linker_flags " $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -l*)
+ if test "$linkmode" != lib && test "$linkmode" != prog; then
+ func_warning "\`-l' is ignored for archives/objects"
+ continue
+ fi
+ func_stripname '-l' '' "$deplib"
+ name=$func_stripname_result
+ if test "$linkmode" = lib; 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 "$search_ext" = ".la"; then
+ found=yes
+ else
+ found=no
+ fi
+ break 2
+ fi
+ done
+ done
+ if test "$found" != yes; then
+ # deplib doesn't seem to be a libtool library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ else # 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 "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; 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=no
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+ lib=$ladir/$old_library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ fi
+ ;;
+ *) ;;
+ esac
+ fi
+ fi
+ ;; # -l
+ *.ltframework)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ if test "$linkmode" = lib ; 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 "$pass" = conv && 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 "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ if test "$pass" = scan; 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 "$pass" = link; 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 "$pass" = conv; 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=no
+ 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=yes
+ fi
+ ;;
+ pass_all)
+ valid_a_lib=yes
+ ;;
+ esac
+ if test "$valid_a_lib" != yes; then
+ 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."
+ else
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the"
+ $ECHO "*** static library $deplib is not portable!"
+ deplibs="$deplib $deplibs"
+ fi
+ ;;
+ esac
+ continue
+ ;;
+ prog)
+ if test "$pass" != link; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ continue
+ ;;
+ esac # linkmode
+ ;; # *.$libext
+ *.lo | *.$objext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ elif test "$linkmode" = prog; then
+ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; 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=yes
+ continue
+ ;;
+ esac # case $deplib
+
+ if test "$found" = yes || test -f "$lib"; then :
+ else
+ func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
+ fi
+
+ # 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 "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan" ||
+ { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+ test -n "$dlopen" && func_append dlfiles " $dlopen"
+ test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
+ fi
+
+ if test "$pass" = conv; 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"
+ 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
+ elif test "$linkmode" != prog && test "$linkmode" != lib; then
+ func_fatal_error "\`$lib' is not a convenience library"
+ fi
+ continue
+ fi # $pass = conv
+
+
+ # Get the name of the library we link against.
+ linklib=
+ if test -n "$old_library" &&
+ { test "$prefer_static_libs" = yes ||
+ test "$prefer_static_libs,$installed" = "built,no"; }; 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 "$pass" = dlopen; then
+ if test -z "$libdir"; then
+ func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
+ fi
+ if test -z "$dlname" ||
+ test "$dlopen_support" != yes ||
+ test "$build_libtool_libs" = no; 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 "X$installed" = Xyes; 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 "X$hardcode_automatic" = Xyes && 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 "$pass" = dlpreopen; then
+ if test -z "$libdir" && test "$linkmode" = prog; 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 "$linkmode" = lib; then
+ deplibs="$dir/$old_library $deplibs"
+ elif test "$linkmode,$pass" = "prog,link"; 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 "$linkmode" = prog && test "$pass" != link; then
+ func_append newlib_search_path " $ladir"
+ deplibs="$lib $deplibs"
+
+ linkalldeplibs=no
+ if test "$link_all_deplibs" != no || test -z "$library_names" ||
+ test "$build_libtool_libs" = no; then
+ linkalldeplibs=yes
+ 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 test "$linkalldeplibs" = yes; 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 "$linkmode,$pass" = "prog,link"; then
+ if test -n "$library_names" &&
+ { { test "$prefer_static_libs" = no ||
+ test "$prefer_static_libs,$installed" = "built,yes"; } ||
+ 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 test "$alldeplibs" = yes &&
+ { test "$deplibs_check_method" = pass_all ||
+ { test "$build_libtool_libs" = yes &&
+ 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 "$use_static_libs" = built && test "$installed" = yes; then
+ use_static_libs=no
+ fi
+ if test -n "$library_names" &&
+ { test "$use_static_libs" = no || test -z "$old_library"; }; then
+ case $host in
+ *cygwin* | *mingw* | *cegcc*)
+ # No point in relinking DLLs because paths are not encoded
+ func_append notinst_deplibs " $lib"
+ need_relink=no
+ ;;
+ *)
+ if test "$installed" = no; 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 "$shouldnotlink" = yes && test "$pass" = link; then
+ echo
+ if test "$linkmode" = prog; 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 "$linkmode" = lib &&
+ test "$hardcode_into_libs" = yes; 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*)
+ 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 "$linkmode" = prog || test "$opt_mode" != relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ lib_linked=yes
+ case $hardcode_action in
+ immediate | unsupported)
+ if test "$hardcode_direct" = no; 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 can not
+ # 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 "$hardcode_minus_L" = no; then
+ case $host in
+ *-*-sunos*) add_shlibpath="$dir" ;;
+ esac
+ add_dir="-L$dir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = no; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ relink)
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$dir/$linklib"
+ elif test "$hardcode_minus_L" = yes; 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 "$hardcode_shlibpath_var" = yes; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ *) lib_linked=no ;;
+ esac
+
+ if test "$lib_linked" != yes; 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 "$linkmode" = prog; 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 "$hardcode_direct" != yes &&
+ test "$hardcode_minus_L" != yes &&
+ test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) func_append finalize_shlibpath "$libdir:" ;;
+ esac
+ fi
+ fi
+ fi
+
+ if test "$linkmode" = prog || test "$opt_mode" = relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$libdir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) func_append finalize_shlibpath "$libdir:" ;;
+ esac
+ add="-l$name"
+ elif test "$hardcode_automatic" = yes; 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 "$linkmode" = prog; 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 "$linkmode" = prog; 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 "$hardcode_direct" != unsupported; 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 "$build_libtool_libs" = yes; then
+ # Not a shared library
+ if test "$deplibs_check_method" != pass_all; 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 can not 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 "$module" = yes; 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 "$build_old_libs" = no; 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 "$linkmode" = lib; then
+ if test -n "$dependency_libs" &&
+ { test "$hardcode_into_libs" != yes ||
+ test "$build_old_libs" = yes ||
+ test "$link_static" = yes; }; 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 "$link_static" = no && 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 "$link_all_deplibs" != no; 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 "$pass" = link; then
+ if test "$linkmode" = "prog"; 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 "$pass" = dlpreopen; then
+ # Link the dlpreopened libraries before other libraries
+ for deplib in $save_deplibs; do
+ deplibs="$deplib $deplibs"
+ done
+ fi
+ if test "$pass" != dlopen; then
+ if test "$pass" != conv; then
+ # 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=
+ fi
+
+ if test "$linkmode,$pass" != "prog,link"; then
+ vars="deplibs"
+ else
+ vars="compile_deplibs finalize_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
+ # 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 "$linkmode" = prog; then
+ dlfiles="$newdlfiles"
+ fi
+ if test "$linkmode" = prog || test "$linkmode" = lib; then
+ dlprefiles="$newdlprefiles"
+ fi
+
+ case $linkmode in
+ oldlib)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; 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 "$module" = no && \
+ func_fatal_help "libtool library \`$output' must begin with \`lib'"
+
+ if test "$need_lib_prefix" != no; 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 "$deplibs_check_method" != pass_all; 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 "$dlself" != no && \
+ func_warning "\`-dlopen self' is ignored for libtool libraries"
+
+ set dummy $rpath
+ shift
+ test "$#" -gt 1 && \
+ func_warning "ignoring multiple \`-rpath's for a libtool library"
+
+ install_libdir="$1"
+
+ oldlibs=
+ if test -z "$rpath"; then
+ if test "$build_libtool_libs" = yes; 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
+ # which has an extra 1 added just for fun
+ #
+ case $version_type in
+ # correct linux to gnu/linux during the next big refactor
+ darwin|linux|osf|windows|none)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_revision"
+ ;;
+ freebsd-aout|freebsd-elf|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
+ ;;
+ *)
+ func_fatal_configuration "$modename: unknown library version type \`$version_type'"
+ ;;
+ 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"
+ ;;
+
+ freebsd-aout)
+ major=".$current"
+ versuffix=".$current.$revision";
+ ;;
+
+ freebsd-elf)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ irix | nonstopux)
+ if test "X$lt_irix_increment" = "Xno"; 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 "$loop" -ne 0; 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 "$loop" -ne 0; 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"
+ ;;
+
+ sunos)
+ major=".$current"
+ versuffix=".$current.$revision"
+ ;;
+
+ windows)
+ # Use '-' rather than '.', since we only want one
+ # extension on DOS 8.3 filesystems.
+ 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 "$need_version" = no; then
+ versuffix=
+ else
+ versuffix=".0.0"
+ fi
+ fi
+
+ # Remove version info from name if versioning should be avoided
+ if test "$avoid_version" = yes && test "$need_version" = no; then
+ major=
+ versuffix=
+ verstring=""
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test "$allow_undefined" = yes; then
+ if test "$allow_undefined_flag" = unsupported; then
+ func_warning "undefined symbols not allowed in $host shared libraries"
+ build_libtool_libs=no
+ build_old_libs=yes
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag="$no_undefined_flag"
+ fi
+
+ fi
+
+ func_generate_dlsyms "$libname" "$libname" "yes"
+ func_append libobjs " $symfileobj"
+ test "X$libobjs" = "X " && libobjs=
+
+ if test "$opt_mode" != relink; 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 "X$precious_files_regex" != "X"; 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 "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; 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 "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; 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 "$build_libtool_libs" = yes; 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 "$build_libtool_need_lc" = "yes"; 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 <<EOF
+ int main() { return 0; }
+EOF
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ func_append newdeplibs " $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ func_append newdeplibs " $i"
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ 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 I believe you do not have"
+ echo "*** because a test_compile did reveal that the linker did not use it for"
+ echo "*** its dynamic dependency list that programs get resolved with at runtime."
+ fi
+ fi
+ ;;
+ *)
+ func_append newdeplibs " $i"
+ ;;
+ esac
+ done
+ else
+ # Error occurred in the first compile. Let's try to salvage
+ # the situation: Compile a separate program for each library.
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+ ldd_output=`ldd conftest`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ func_append newdeplibs " $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ func_append newdeplibs " $i"
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ 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 a test_compile did reveal that the linker did not use this one"
+ echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+ fi
+ fi
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
+ echo "*** make it link in! You will probably need to install it or some"
+ echo "*** library that it depends on before this library will be fully"
+ echo "*** functional. Installing it before continuing would be even better."
+ fi
+ ;;
+ *)
+ func_append newdeplibs " $i"
+ ;;
+ esac
+ done
+ fi
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method; shift
+ file_magic_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 "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; 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\""`
+ if test -n "$file_magic_glob"; then
+ libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
+ else
+ libnameglob=$libname
+ fi
+ test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ if test "$want_nocaseglob" = yes; then
+ shopt -s nocaseglob
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/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 "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; 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 "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; 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 "X$deplibs_check_method" = "Xnone"; 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 "$droppeddeps" = yes; then
+ if test "$module" = yes; 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 "$build_old_libs" = no; 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 "$allow_undefined" = no; 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 "$build_old_libs" = no; 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 "$build_libtool_libs" = yes; then
+ # Remove ${wl} instances when linking with ld.
+ # FIXME: should test the right _cmds variable.
+ case $archive_cmds in
+ *\$LD\ *) wl= ;;
+ esac
+ if test "$hardcode_into_libs" = yes; then
+ # Hardcode the library paths
+ hardcode_libdirs=
+ dep_rpath=
+ rpath="$finalize_rpath"
+ test "$opt_mode" != relink && 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 "$opt_mode" != relink && 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
+ if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+ # 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
+ fi
+ ;;
+ esac
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ if test "$always_export_symbols" = yes || 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 "$try_normal_branch" = yes \
+ && { 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 "X$skipped_export" != "X:"; 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 "X$skipped_export" != "X:" && 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 "$compiler_needs_object" = yes &&
+ 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 "$thread_safe" = yes && 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 "$opt_mode" = relink; 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 "$module" = yes && 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 "X$skipped_export" != "X:" &&
+ 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 "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; 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 "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+ output=${output_objdir}/${output_la}.lnk
+ func_verbose "creating linker input file list: $output"
+ : > $output
+ set x $save_libobjs
+ shift
+ firstobj=
+ if test "$compiler_needs_object" = yes; 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 "X$objlist" = X ||
+ 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 "$k" -eq 1 ; 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
+
+ if ${skipped_export-false}; then
+ 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
+ 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_silent || {
+ 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 "$opt_mode" = relink; 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
+
+ if ${skipped_export-false}; then
+ 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
+ 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 "$module" = yes && 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="$save_ifs"
+ eval cmd=\"$cmd\"
+ $opt_silent || {
+ 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 "$opt_mode" = relink; 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 "$opt_mode" = relink; 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 "$module" = yes || test "$export_dynamic" = yes; then
+ # On all known operating systems, these are identical.
+ dlname="$soname"
+ fi
+ fi
+ ;;
+
+ obj)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; 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=
+ # reload_cmds runs $LD directly, so let us get rid of
+ # -Wl from whole_archive_flag_spec and hope we can get by with
+ # turning comma into space..
+ wl=
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+ reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
+ 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 "$build_libtool_libs" != yes && 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" ### testsuite: skip nested quoting test
+
+ 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
+
+ if test "$build_libtool_libs" != yes; then
+ 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
+ fi
+
+ if test -n "$pic_flag" || test "$pic_mode" != default; 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"
+
+ test "$preload" = yes \
+ && test "$dlopen_support" = unknown \
+ && test "$dlopen_self" = unknown \
+ && test "$dlopen_self_static" = unknown && \
+ 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 "$tagname" = CXX ; 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 "$build_old_libs" = yes; 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@" "no"
+
+ # template prelinking step
+ if test -n "$prelink_cmds"; then
+ func_execute_cmds "$prelink_cmds" 'exit $?'
+ fi
+
+ wrappers_required=yes
+ case $host in
+ *cegcc* | *mingw32ce*)
+ # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
+ wrappers_required=no
+ ;;
+ *cygwin* | *mingw* )
+ if test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ *)
+ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ esac
+ if test "$wrappers_required" = no; then
+ # 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
+ fi
+
+ 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 "$no_install" = yes; 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
+
+ if test "$hardcode_action" = relink; then
+ # 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"
+ else
+ if test "$fast_install" != no; then
+ link_command="$finalize_var$compile_command$finalize_rpath"
+ if test "$fast_install" = yes; then
+ relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
+ else
+ # fast_install is set to needless
+ relink_command=
+ fi
+ else
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+ fi
+ fi
+
+ # 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
+
+ if test "$build_libtool_libs" = convenience; then
+ oldobjs="$libobjs_save $symfileobj"
+ addlibs="$convenience"
+ build_libtool_libs=no
+ else
+ if test "$build_libtool_libs" = module; then
+ oldobjs="$libobjs_save"
+ build_libtool_libs=no
+ else
+ oldobjs="$old_deplibs $non_pic_objects"
+ if test "$preload" = yes && test -f "$symfileobj"; then
+ func_append oldobjs " $symfileobj"
+ fi
+ fi
+ addlibs="$old_convenience"
+ fi
+
+ 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 "$build_libtool_libs" = yes; 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 "X$oldobjs" = "X" ; 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 "$build_old_libs" = yes && 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 "$hardcode_automatic" = yes ; then
+ relink_command=
+ fi
+
+ # Only create the output if not a dry run.
+ $opt_dry_run || {
+ for installed in no yes; do
+ if test "$installed" = yes; 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 "x$bindir" != x ;
+ 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$TIMESTAMP) $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 can not 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 "$installed" = no && test "$need_relink" = yes; 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
+}
+
+{ test "$opt_mode" = link || test "$opt_mode" = relink; } &&
+ func_mode_link ${1+"$@"}
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+ $opt_debug
+ RM="$nonopt"
+ files=
+ rmforce=
+ 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=yes ;;
+ -*) 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 "X$dir" = X.; then
+ odir="$objdir"
+ else
+ odir="$dir/$objdir"
+ fi
+ func_basename "$file"
+ name="$func_basename_result"
+ test "$opt_mode" = uninstall && odir="$dir"
+
+ # Remember odir for removal later, being careful to avoid duplicates
+ if test "$opt_mode" = clean; 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 test "$rmforce" = yes; 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" 'test "$rmforce" = yes || exit_status=1'
+ fi
+
+ if test -n "$old_library"; then
+ # Do each command in the old_postuninstall commands.
+ func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || 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 "$pic_object" != none; 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 "$non_pic_object" != none; then
+ func_append rmfiles " $dir/$non_pic_object"
+ fi
+ fi
+ ;;
+
+ *)
+ if test "$opt_mode" = clean ; 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 "$fast_install" = yes && 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
+}
+
+{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
+ func_mode_uninstall ${1+"$@"}
+
+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
+# in which 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:
+# vi:sw=2
+
diff --git a/autostuff/ltoptions.m4 b/autostuff/ltoptions.m4
new file mode 100644
index 0000000..5d9acd8
--- /dev/null
+++ b/autostuff/ltoptions.m4
@@ -0,0 +1,384 @@
+# Helper functions for option handling. -*- Autoconf -*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008, 2009 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 7 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_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_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=default])
+
+test -z "$pic_mode" && 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])])
diff --git a/autostuff/ltsugar.m4 b/autostuff/ltsugar.m4
new file mode 100644
index 0000000..9000a05
--- /dev/null
+++ b/autostuff/ltsugar.m4
@@ -0,0 +1,123 @@
+# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008 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
+])
diff --git a/autostuff/ltversion.m4 b/autostuff/ltversion.m4
new file mode 100644
index 0000000..07a8602
--- /dev/null
+++ b/autostuff/ltversion.m4
@@ -0,0 +1,23 @@
+# ltversion.m4 -- version numbers -*- Autoconf -*-
+#
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# @configure_input@
+
+# serial 3337 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.4.2])
+m4_define([LT_PACKAGE_REVISION], [1.3337])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.4.2'
+macro_revision='1.3337'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
diff --git a/autostuff/lt~obsolete.m4 b/autostuff/lt~obsolete.m4
new file mode 100644
index 0000000..c573da9
--- /dev/null
+++ b/autostuff/lt~obsolete.m4
@@ -0,0 +1,98 @@
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2009 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])])
diff --git a/autostuff/missing b/autostuff/missing
new file mode 100755
index 0000000..db98974
--- /dev/null
+++ b/autostuff/missing
@@ -0,0 +1,215 @@
+#! /bin/sh
+# Common wrapper for a few potentially missing GNU programs.
+
+scriptversion=2013-10-28.13; # UTC
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard at iro.umontreal.ca>, 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 <http://www.gnu.org/licenses/>.
+
+# 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 <bug-automake at gnu.org>."
+ 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=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://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 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/autostuff/test-driver b/autostuff/test-driver
new file mode 100755
index 0000000..d306056
--- /dev/null
+++ b/autostuff/test-driver
@@ -0,0 +1,139 @@
+#! /bin/sh
+# test-driver - basic testsuite driver script.
+
+scriptversion=2013-07-13.22; # UTC
+
+# Copyright (C) 2011-2013 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 <http://www.gnu.org/licenses/>.
+
+# 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 <bug-automake at gnu.org> or send patches to
+# <automake-patches at gnu.org>.
+
+# Make unconditional expansion of undefined variables an error. This
+# helps a lot in preventing typo-related bugs.
+set -u
+
+usage_error ()
+{
+ echo "$0: $*" >&2
+ print_usage >&2
+ exit 2
+}
+
+print_usage ()
+{
+ cat <<END
+Usage:
+ test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
+ [--expect-failure={yes|no}] [--color-tests={yes|no}]
+ [--enable-hard-errors={yes|no}] [--]
+ TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
+The '--test-name', '--log-file' and '--trs-file' options are mandatory.
+END
+}
+
+test_name= # Used for reporting.
+log_file= # Where to save the output of the test script.
+trs_file= # Where to save the metadata of the test run.
+expect_failure=no
+color_tests=no
+enable_hard_errors=yes
+while test $# -gt 0; do
+ case $1 in
+ --help) print_usage; exit $?;;
+ --version) echo "test-driver $scriptversion"; exit $?;;
+ --test-name) test_name=$2; shift;;
+ --log-file) log_file=$2; shift;;
+ --trs-file) trs_file=$2; shift;;
+ --color-tests) color_tests=$2; shift;;
+ --expect-failure) expect_failure=$2; shift;;
+ --enable-hard-errors) enable_hard_errors=$2; shift;;
+ --) shift; break;;
+ -*) usage_error "invalid option: '$1'";;
+ *) break;;
+ esac
+ shift
+done
+
+missing_opts=
+test x"$test_name" = x && missing_opts="$missing_opts --test-name"
+test x"$log_file" = x && missing_opts="$missing_opts --log-file"
+test x"$trs_file" = x && missing_opts="$missing_opts --trs-file"
+if test x"$missing_opts" != x; then
+ usage_error "the following mandatory options are missing:$missing_opts"
+fi
+
+if test $# -eq 0; then
+ usage_error "missing argument"
+fi
+
+if test $color_tests = yes; then
+ # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
+ red='[0;31m' # Red.
+ grn='[0;32m' # Green.
+ lgn='[1;32m' # Light green.
+ blu='[1;34m' # Blue.
+ mgn='[0;35m' # Magenta.
+ std='[m' # No color.
+else
+ red= grn= lgn= blu= mgn= std=
+fi
+
+do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
+trap "st=129; $do_exit" 1
+trap "st=130; $do_exit" 2
+trap "st=141; $do_exit" 13
+trap "st=143; $do_exit" 15
+
+# Test script is run here.
+"$@" >$log_file 2>&1
+estatus=$?
+if test $enable_hard_errors = no && test $estatus -eq 99; then
+ estatus=1
+fi
+
+case $estatus:$expect_failure in
+ 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
+ 0:*) col=$grn res=PASS recheck=no gcopy=no;;
+ 77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
+ 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
+ *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
+ *:*) col=$red res=FAIL recheck=yes gcopy=yes;;
+esac
+
+# Report outcome to console.
+echo "${col}${res}${std}: $test_name"
+
+# Register the test result, and other relevant metadata.
+echo ":test-result: $res" > $trs_file
+echo ":global-test-result: $res" >> $trs_file
+echo ":recheck: $recheck" >> $trs_file
+echo ":copy-in-global-log: $gcopy" >> $trs_file
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/config.h.in b/config.h.in
new file mode 100644
index 0000000..207fa28
--- /dev/null
+++ b/config.h.in
@@ -0,0 +1,67 @@
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+#ifndef SRD_CONFIG_H
+#define SRD_CONFIG_H /* To stop multiple inclusions. */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
+
+/* 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
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
+
+#endif /* SRD_CONFIG_H */
diff --git a/configure b/configure
new file mode 100755
index 0000000..5216848
--- /dev/null
+++ b/configure
@@ -0,0 +1,16963 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.69 for libsigrokdecode 0.3.0.
+#
+# Report bugs to <sigrok-devel at lists.sourceforge.net>.
+#
+#
+# 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 at gnu.org and
+$0: sigrok-devel at lists.sourceforge.net about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script 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 </dev/null
+exec 6>&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='libsigrokdecode'
+PACKAGE_TARNAME='libsigrokdecode'
+PACKAGE_VERSION='0.3.0'
+PACKAGE_STRING='libsigrokdecode 0.3.0'
+PACKAGE_BUGREPORT='sigrok-devel at lists.sourceforge.net'
+PACKAGE_URL='http://www.sigrok.org'
+
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+BUILD_RUNTC_FALSE
+BUILD_RUNTC_TRUE
+SRD_PACKAGE_VERSION
+SRD_PACKAGE_VERSION_MICRO
+SRD_PACKAGE_VERSION_MINOR
+SRD_PACKAGE_VERSION_MAJOR
+AM_LIBTOOLFLAGS
+MAKEFLAGS
+DECODERS_DIR
+LIBSIGROK_LIBS
+LIBSIGROK_CFLAGS
+libsigrok_LIBS
+libsigrok_CFLAGS
+HAVE_CHECK_FALSE
+HAVE_CHECK_TRUE
+check_LIBS
+check_CFLAGS
+PYTHON3
+LDFLAGS_PYTHON
+CPPFLAGS_PYTHON
+python32_LIBS
+python32_CFLAGS
+python33_LIBS
+python33_CFLAGS
+python34_LIBS
+python34_CFLAGS
+python3_LIBS
+python3_CFLAGS
+GLIB_COMPILE_RESOURCES
+GLIB_MKENUMS
+GOBJECT_QUERY
+GLIB_GENMARSHAL
+GLIB_LIBS
+GLIB_CFLAGS
+SRD_LIB_LDFLAGS
+SRD_LIB_VERSION
+SRD_LIB_VERSION_AGE
+SRD_LIB_VERSION_REVISION
+SRD_LIB_VERSION_CURRENT
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
+PKG_CONFIG
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+MANIFEST_TOOL
+RANLIB
+DLLTOOL
+OBJDUMP
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+EGREP
+GREP
+SED
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+LIBTOOL
+LN_S
+CPP
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+ac_ct_AR
+AR
+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'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_silent_rules
+enable_dependency_tracking
+enable_shared
+enable_static
+with_pic
+enable_fast_install
+with_gnu_ld
+with_sysroot
+enable_libtool_lock
+enable_glibtest
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR
+python3_CFLAGS
+python3_LIBS
+python34_CFLAGS
+python34_LIBS
+python33_CFLAGS
+python33_LIBS
+python32_CFLAGS
+python32_LIBS
+check_CFLAGS
+check_LIBS
+libsigrok_CFLAGS
+libsigrok_LIBS'
+
+
+# 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 libsigrokdecode 0.3.0 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/libsigrokdecode]
+ --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
+
+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 libsigrokdecode 0.3.0:";;
+ 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-dependency-tracking
+ do not reject slow dependency extractors
+ --disable-dependency-tracking
+ speeds up one-time build
+ --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]
+ --disable-libtool-lock avoid locking (might break parallel builds)
+ --disable-glibtest do not try to compile and run a test GLIB program
+
+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-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).
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+ CPP 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
+ python3_CFLAGS
+ C compiler flags for python3, overriding pkg-config
+ python3_LIBS
+ linker flags for python3, overriding pkg-config
+ python34_CFLAGS
+ C compiler flags for python34, overriding pkg-config
+ python34_LIBS
+ linker flags for python34, overriding pkg-config
+ python33_CFLAGS
+ C compiler flags for python33, overriding pkg-config
+ python33_LIBS
+ linker flags for python33, overriding pkg-config
+ python32_CFLAGS
+ C compiler flags for python32, overriding pkg-config
+ python32_LIBS
+ linker flags for python32, overriding pkg-config
+ check_CFLAGS
+ C compiler flags for check, overriding pkg-config
+ check_LIBS linker flags for check, overriding pkg-config
+ libsigrok_CFLAGS
+ C compiler flags for libsigrok, overriding pkg-config
+ libsigrok_LIBS
+ linker flags for libsigrok, overriding pkg-config
+
+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 <sigrok-devel at lists.sourceforge.net>.
+libsigrokdecode home page: <http://www.sigrok.org>.
+_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
+libsigrokdecode configure 0.3.0
+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_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_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_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 <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#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_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 sigrok-devel at lists.sourceforge.net ##
+## ------------------------------------------------- ##"
+ ) | 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
+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 libsigrokdecode $as_me 0.3.0, 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
+
+# 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_config_headers="$ac_config_headers config.h"
+
+
+ac_aux_dir=
+for ac_dir in autostuff "$srcdir"/autostuff; 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 autostuff \"$srcdir\"/autostuff" "$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.
+
+
+
+# We require at least automake 1.11 (needed for 'silent rules').
+am__api_version='1.14'
+
+# 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}" != 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='libsigrokdecode'
+ VERSION='0.3.0'
+
+
+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:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
+# We need awk for the "check" target. 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: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake at 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: <http://www.gnu.org/software/coreutils/>.
+
+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
+
+# 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='\'
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# 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 <stdio.h>
+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 <stdarg.h>
+#include <stdio.h>
+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
+
+
+
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in ar lib "link -lib"
+ 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 lib "link -lib"
+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}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
+$as_echo_n "checking the archiver ($AR) interface... " >&6; }
+if ${am_cv_ar_interface+:} 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
+
+ am_cv_ar_interface=ar
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int some_variable = 0;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
+ (eval $am_ar_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test "$ac_status" -eq 0; then
+ am_cv_ar_interface=ar
+ else
+ am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
+ (eval $am_ar_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test "$ac_status" -eq 0; then
+ am_cv_ar_interface=lib
+ else
+ am_cv_ar_interface=unknown
+ fi
+ fi
+ rm -f conftest.lib libconftest.a
+
+fi
+rm -f core conftest.err conftest.$ac_objext 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: $am_cv_ar_interface" >&5
+$as_echo "$am_cv_ar_interface" >&6; }
+
+case $am_cv_ar_interface in
+ar)
+ ;;
+lib)
+ # Microsoft lib, so override with the ar-lib wrapper script.
+ # FIXME: It is wrong to rewrite AR.
+ # 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__AR in this case,
+ # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
+ # similar.
+ AR="$am_aux_dir/ar-lib $AR"
+ ;;
+unknown)
+ as_fn_error $? "could not determine $AR interface" "$LINENO" 5
+ ;;
+esac
+
+
+
+
+
+# Enable more compiler warnings via -Wall and -Wextra. Add -fvisibility=hidden
+# and enforce use of SRD_API to explicitly mark all public API functions.
+CFLAGS="$CFLAGS -Wall -Wextra -Wmissing-prototypes -fvisibility=hidden"
+
+# Checks for programs.
+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 <stdarg.h>
+#include <stdio.h>
+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=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 <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> 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 <limits.h>
+#else
+# include <assert.h>
+#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 <ac_nonexistent.h>
+_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 <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> 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 <limits.h>
+#else
+# include <assert.h>
+#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 <ac_nonexistent.h>
+_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 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
+
+
+# Required for per-target flags or subdir-objects with C sources.
+
+
+# Initialize libtool.
+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.2'
+macro_revision='1.3337'
+
+
+
+
+
+
+
+
+
+
+
+
+
+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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $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 "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+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 ${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 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&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 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&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
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ 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 "$lt_cv_path_NM" != "no"; 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 /dev/null 2>&1 | sed '1q'` in
+ *COFF*)
+ DUMPBIN="$DUMPBIN -symbols"
+ ;;
+ *)
+ 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; }
+
+# 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;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # 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 $i != 17 # 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"}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
+$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,b/c, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
+$as_echo "$xsi_shell" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
+$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
+$as_echo "$lt_shell_append" >&6; }
+
+
+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 "$GCC" != yes; then
+ reload_cmds=false
+ fi
+ ;;
+ darwin*)
+ if test "$GCC" = yes; 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
+# which 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.
+ # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+ if ( test "$lt_cv_nm_interface" = "BSD nm" && 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* | netbsdelf*-gnu)
+ 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*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; 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
+ ;;
+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 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 "$ac_status" -eq 0; 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 "$ac_status" -ne 0; 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 "x$lt_cv_ar_at_file" = xno; 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
+ 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 "$host_cpu" = ia64; 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
+
+# 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 -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$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 -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/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
+ # and D for any global 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};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print 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 con'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* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$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 "$pipe_works" = yes; 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 "$GCC" = yes; 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; }
+
+
+
+
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then :
+ enableval=$enable_libtool_lock;
+fi
+
+test "x$enable_libtool_lock" != xno && 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 which ABI we are using.
+ 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 which ABI we are using.
+ 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 "$lt_cv_prog_gnu_ld" = yes; 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*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ 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-*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*)
+ 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-*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*)
+ 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 x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+*-*solaris*)
+ # Find out which ABI we are using.
+ 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*)
+ 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 "x$lt_cv_path_mainfest_tool" != xyes; 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 $_lt_result -eq 0; 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 $_lt_result -eq 0 && $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 "$lt_cv_apple_cc_single_mod" = "yes"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; 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 "$lt_cv_ld_force_load" = "no"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+
+
+{ $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 <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+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 <string.h>
+
+_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 <stdlib.h>
+
+_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 <ctype.h>
+#include <stdlib.h>
+#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=no
+
+
+ enable_win32_dll=no
+
+
+ # 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
+
+
+test -z "$pic_mode" && pic_mode=default
+
+
+
+
+
+
+
+ # 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
+
+
+
+
+
+
+
+
+
+
+
+# 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 "X${COLLECT_NAMES+set}" != Xset; 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
+
+for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+
+
+# 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 at 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 at 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 "$GCC" = yes; 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"
+ # 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 x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; 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 "$GCC" = yes; then
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_static='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ 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'
+ ;;
+
+ 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 "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ else
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ 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'
+ ;;
+
+ 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'
+ ;;
+ 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 which 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"
+ # 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 x"$lt_cv_prog_compiler_pic_works" = xyes; 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 x"$lt_cv_prog_compiler_static_works" = xyes; 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 "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; 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 "$hard_links" = no; 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 "$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
+ ;;
+ linux* | k*bsd*-gnu | gnu*)
+ link_all_deplibs=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 "$with_gnu_ld" = yes; 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 "$lt_use_gnu_ld_interface" = yes; 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 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 "$host_cpu" != ia64; 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 <jrb3 at best.com> 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 (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; 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
+ ;;
+
+ 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 "$host_os" = linux-dietlibc; 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 "$tmp_diet" = no
+ 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' ;;
+ 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 "x$supports_anon_versioning" = xyes; 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
+ 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 "x$supports_anon_versioning" = xyes; 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* | netbsdelf*-gnu)
+ 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 can not
+*** 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 "$ld_shlibs" = no; 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 "$GCC" = yes && 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 "$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
+ 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 AIX nm, but means don't demangle with GNU nm
+ # Also, AIX nm treats weak defined symbols like other global
+ # defined symbols, whereas GNU nm marks them as "W".
+ 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) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | 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
+ # 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
+
+ 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,'
+
+ if test "$GCC" = yes; 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 "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ link_all_deplibs=no
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; 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 "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ 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_use_runtimelinking" = yes; 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 "${lt_cv_aix_libpath+set}" = 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 "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; 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 "${lt_cv_aix_libpath+set}" = 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 "$with_gnu_ld" = yes; 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
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ 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~linknames='
+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+ else
+ sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $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 "$lt_cv_ld_force_load" = "yes"; 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*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; 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 "$GCC" = yes; 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 $output_objdir/$soname = $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 $output_objdir/$soname = $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 "$GCC" = yes && test "$with_gnu_ld" = no; 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 "$with_gnu_ld" = no; 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 "$GCC" = yes && test "$with_gnu_ld" = no; 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 x"$lt_cv_prog_compiler__b" = xyes; 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 "$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_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 "$GCC" = yes; 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 "$lt_cv_irix_exported_symbol" = yes; 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
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ 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*)
+ 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__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; 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
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ 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
+ allow_undefined_flag=unsupported
+ archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; 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 "$GCC" = yes; 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 "$GCC" = yes; 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 "$GCC" = yes; 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 "x$host_vendor" = xsequent; 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 "$GCC" = yes; 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 can NOT 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 "$GCC" = yes; 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 x$host_vendor = xsni; 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 "$ld_shlibs" = no && 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 "$enable_shared" = yes && test "$GCC" = yes; 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 "$GCC" = yes; 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`
+ 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"
+ else
+ 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 "$host_cpu" = ia64; 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
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.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}'
+ else
+ # 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'
+ fi
+ 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%'\''`; test $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} $libname${shared_ext}'
+ 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=yes
+ 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 "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ 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 "$lt_cv_prog_gnu_ld" = yes; 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
+ ;;
+
+# 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
+
+ # Append ld.so.conf contents 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="/lib /usr/lib $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'
+ ;;
+
+netbsdelf*-gnu)
+ version_type=linux
+ 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='NetBSD ld.elf_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*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ 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
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+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 "$with_gnu_ld" = yes; 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=freebsd-elf
+ 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 "$with_gnu_ld" = yes; 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 "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $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 "X$hardcode_automatic" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$hardcode_direct" != no &&
+ # 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 "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+ test "$hardcode_minus_L" != no; 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 "$hardcode_action" = relink ||
+ test "$inherit_rpath" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+
+
+
+
+
+ if test "x$enable_dlopen" != xyes; 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
+
+ ;;
+
+ *)
+ 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 "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && 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 "$cross_compiling" = yes; 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 <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#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 -fvisbility=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 "x$lt_cv_dlopen_self" = xyes; 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 "$cross_compiling" = yes; 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 <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#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 -fvisbility=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 which 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 "$can_build_shared" = "no" && 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 "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ 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 "$enable_shared" = yes || 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:
+
+
+
+# Initialize pkg-config.
+# We require at least 0.22, as "Requires.private" behaviour changed there.
+
+
+
+
+
+
+
+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.22
+ { $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
+
+# Library version for libsigrokdecode (NOT the same as the package version).
+# Carefully read the libtool docs before updating these numbers!
+# The algorithm for determining which number to change (and how) is nontrivial!
+# http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
+SRD_LIB_VERSION_CURRENT=2
+SRD_LIB_VERSION_REVISION=0
+SRD_LIB_VERSION_AGE=0
+SRD_LIB_VERSION="$SRD_LIB_VERSION_CURRENT:$SRD_LIB_VERSION_REVISION:$SRD_LIB_VERSION_AGE"
+SRD_LIB_LDFLAGS="-version-info $SRD_LIB_VERSION"
+
+
+
+
+
+
+# Assume we can build tests/runtc unless proven otherwise.
+build_runtc="yes"
+
+# Checks for libraries.
+
+# libglib-2.0 is always needed.
+# Note: glib-2.0 is part of the libsigrokdecode API
+# (hard pkg-config requirement).
+# Check whether --enable-glibtest was given.
+if test "${enable_glibtest+set}" = set; then :
+ enableval=$enable_glibtest;
+else
+ enable_glibtest=yes
+fi
+
+
+ pkg_config_args=glib-2.0
+ for module in .
+ do
+ case "$module" in
+ gmodule)
+ pkg_config_args="$pkg_config_args gmodule-2.0"
+ ;;
+ gmodule-no-export)
+ pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
+ ;;
+ gobject)
+ pkg_config_args="$pkg_config_args gobject-2.0"
+ ;;
+ gthread)
+ pkg_config_args="$pkg_config_args gthread-2.0"
+ ;;
+ gio*)
+ pkg_config_args="$pkg_config_args $module-2.0"
+ ;;
+ esac
+ done
+
+
+
+
+
+
+
+
+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.16
+ { $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
+
+ no_glib=""
+
+ if test "x$PKG_CONFIG" = x ; then
+ no_glib=yes
+ PKG_CONFIG=no
+ fi
+
+ min_glib_version=2.24.0
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB - version >= $min_glib_version" >&5
+$as_echo_n "checking for GLIB - version >= $min_glib_version... " >&6; }
+
+ if test x$PKG_CONFIG != xno ; then
+ ## don't try to run the test against uninstalled libtool libs
+ if $PKG_CONFIG --uninstalled $pkg_config_args; then
+ echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
+ enable_glibtest=no
+ fi
+
+ if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
+ :
+ else
+ no_glib=yes
+ fi
+ fi
+
+ if test x"$no_glib" = x ; then
+ GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
+ GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
+ GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
+ GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
+
+ GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
+ GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
+ glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
+ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
+ glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
+ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
+ glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
+ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
+ if test "x$enable_glibtest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GLIB_CFLAGS"
+ LIBS="$GLIB_LIBS $LIBS"
+ rm -f conf.glibtest
+ if test "$cross_compiling" = yes; then :
+ echo $ac_n "cross compiling; assumed OK... $ac_c"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <glib.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+ unsigned int major, minor, micro;
+
+ fclose (fopen ("conf.glibtest", "w"));
+
+ if (sscanf("$min_glib_version", "%u.%u.%u", &major, &minor, µ) != 3) {
+ printf("%s, bad version string\n", "$min_glib_version");
+ exit(1);
+ }
+
+ if ((glib_major_version != $glib_config_major_version) ||
+ (glib_minor_version != $glib_config_minor_version) ||
+ (glib_micro_version != $glib_config_micro_version))
+ {
+ printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
+ $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
+ glib_major_version, glib_minor_version, glib_micro_version);
+ printf ("*** was found! If pkg-config was correct, then it is best\n");
+ printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
+ printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
+ printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
+ printf("*** required on your system.\n");
+ printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
+ printf("*** to point to the correct configuration files\n");
+ }
+ else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
+ (glib_minor_version != GLIB_MINOR_VERSION) ||
+ (glib_micro_version != GLIB_MICRO_VERSION))
+ {
+ printf("*** GLIB header files (version %d.%d.%d) do not match\n",
+ GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
+ printf("*** library (version %d.%d.%d)\n",
+ glib_major_version, glib_minor_version, glib_micro_version);
+ }
+ else
+ {
+ if ((glib_major_version > major) ||
+ ((glib_major_version == major) && (glib_minor_version > minor)) ||
+ ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
+ {
+ return 0;
+ }
+ else
+ {
+ printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n",
+ glib_major_version, glib_minor_version, glib_micro_version);
+ printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n",
+ major, minor, micro);
+ printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
+ printf("***\n");
+ printf("*** If you have already installed a sufficiently new version, this error\n");
+ printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
+ printf("*** being found. The easiest way to fix this is to remove the old version\n");
+ printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
+ printf("*** correct copy of pkg-config. (In this case, you will have to\n");
+ printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
+ printf("*** so that the correct libraries are found at run-time))\n");
+ }
+ }
+ return 1;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ no_glib=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ if test "x$no_glib" = x ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&5
+$as_echo "yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&6; }
+ CFLAGS="$CFLAGS $GLIB_CFLAGS"; LIBS="$LIBS $GLIB_LIBS"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ if test "$PKG_CONFIG" = "no" ; then
+ echo "*** A new enough version of pkg-config was not found."
+ echo "*** See http://www.freedesktop.org/software/pkgconfig/"
+ else
+ if test -f conf.glibtest ; then
+ :
+ else
+ echo "*** Could not run GLIB test program, checking why..."
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GLIB_CFLAGS"
+ LIBS="$LIBS $GLIB_LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <glib.h>
+#include <stdio.h>
+
+int
+main ()
+{
+ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version));
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding GLIB or finding the wrong"
+ echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
+else
+ echo "*** The test program failed to compile or link. See the file config.log for the"
+ echo "*** exact error that occured. This usually means GLIB is incorrectly installed."
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ GLIB_CFLAGS=""
+ GLIB_LIBS=""
+ GLIB_GENMARSHAL=""
+ GOBJECT_QUERY=""
+ GLIB_MKENUMS=""
+ GLIB_COMPILE_RESOURCES=""
+ :
+ fi
+
+
+
+
+
+
+ rm -f conf.glibtest
+
+
+# Python 3 is always needed.
+# Note: We need to try a few different variants, since some systems have a
+# python3.pc file, others have a python-3.3.pc file, and so on.
+# See also: http://sigrok.org/wiki/Libsigrokdecode/Python
+CPPFLAGS_PYTHON=""
+LDFLAGS_PYTHON=""
+pyver="none"
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python3" >&5
+$as_echo_n "checking for python3... " >&6; }
+
+if test -n "$python3_CFLAGS"; then
+ pkg_cv_python3_CFLAGS="$python3_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python3 >= 3.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python3 >= 3.2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python3_CFLAGS=`$PKG_CONFIG --cflags "python3 >= 3.2" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$python3_LIBS"; then
+ pkg_cv_python3_LIBS="$python3_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python3 >= 3.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python3 >= 3.2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python3_LIBS=`$PKG_CONFIG --libs "python3 >= 3.2" 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
+ python3_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "python3 >= 3.2" 2>&1`
+ else
+ python3_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "python3 >= 3.2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$python3_PKG_ERRORS" >&5
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python34" >&5
+$as_echo_n "checking for python34... " >&6; }
+
+if test -n "$python34_CFLAGS"; then
+ pkg_cv_python34_CFLAGS="$python34_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.4 >= 3.4\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.4 >= 3.4") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python34_CFLAGS=`$PKG_CONFIG --cflags "python-3.4 >= 3.4" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$python34_LIBS"; then
+ pkg_cv_python34_LIBS="$python34_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.4 >= 3.4\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.4 >= 3.4") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python34_LIBS=`$PKG_CONFIG --libs "python-3.4 >= 3.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
+ python34_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "python-3.4 >= 3.4" 2>&1`
+ else
+ python34_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "python-3.4 >= 3.4" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$python34_PKG_ERRORS" >&5
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python33" >&5
+$as_echo_n "checking for python33... " >&6; }
+
+if test -n "$python33_CFLAGS"; then
+ pkg_cv_python33_CFLAGS="$python33_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.3 >= 3.3\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.3 >= 3.3") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python33_CFLAGS=`$PKG_CONFIG --cflags "python-3.3 >= 3.3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$python33_LIBS"; then
+ pkg_cv_python33_LIBS="$python33_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.3 >= 3.3\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.3 >= 3.3") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python33_LIBS=`$PKG_CONFIG --libs "python-3.3 >= 3.3" 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
+ python33_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "python-3.3 >= 3.3" 2>&1`
+ else
+ python33_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "python-3.3 >= 3.3" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$python33_PKG_ERRORS" >&5
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python32" >&5
+$as_echo_n "checking for python32... " >&6; }
+
+if test -n "$python32_CFLAGS"; then
+ pkg_cv_python32_CFLAGS="$python32_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.2 >= 3.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.2 >= 3.2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python32_CFLAGS=`$PKG_CONFIG --cflags "python-3.2 >= 3.2" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$python32_LIBS"; then
+ pkg_cv_python32_LIBS="$python32_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.2 >= 3.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.2 >= 3.2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python32_LIBS=`$PKG_CONFIG --libs "python-3.2 >= 3.2" 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
+ python32_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "python-3.2 >= 3.2" 2>&1`
+ else
+ python32_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "python-3.2 >= 3.2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$python32_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (python-3.2 >= 3.2) were not met:
+
+$python32_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 python32_CFLAGS
+and python32_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 python32_CFLAGS
+and python32_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ python32_CFLAGS=$pkg_cv_python32_CFLAGS
+ python32_LIBS=$pkg_cv_python32_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ pyver=`$PKG_CONFIG --modversion python-3.2`;
+ CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python32_CFLAGS";
+ LDFLAGS_PYTHON="$LDFLAGS_PYTHON $python32_LIBS"
+fi
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python32" >&5
+$as_echo_n "checking for python32... " >&6; }
+
+if test -n "$python32_CFLAGS"; then
+ pkg_cv_python32_CFLAGS="$python32_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.2 >= 3.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.2 >= 3.2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python32_CFLAGS=`$PKG_CONFIG --cflags "python-3.2 >= 3.2" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$python32_LIBS"; then
+ pkg_cv_python32_LIBS="$python32_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.2 >= 3.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.2 >= 3.2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python32_LIBS=`$PKG_CONFIG --libs "python-3.2 >= 3.2" 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
+ python32_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "python-3.2 >= 3.2" 2>&1`
+ else
+ python32_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "python-3.2 >= 3.2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$python32_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (python-3.2 >= 3.2) were not met:
+
+$python32_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 python32_CFLAGS
+and python32_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 python32_CFLAGS
+and python32_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ python32_CFLAGS=$pkg_cv_python32_CFLAGS
+ python32_LIBS=$pkg_cv_python32_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ pyver=`$PKG_CONFIG --modversion python-3.2`;
+ CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python32_CFLAGS";
+ LDFLAGS_PYTHON="$LDFLAGS_PYTHON $python32_LIBS"
+fi
+else
+ python33_CFLAGS=$pkg_cv_python33_CFLAGS
+ python33_LIBS=$pkg_cv_python33_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ pyver=`$PKG_CONFIG --modversion python-3.3`;
+ CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python33_CFLAGS";
+ LDFLAGS_PYTHON="$LDFLAGS_PYTHON $python33_LIBS"
+fi
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python33" >&5
+$as_echo_n "checking for python33... " >&6; }
+
+if test -n "$python33_CFLAGS"; then
+ pkg_cv_python33_CFLAGS="$python33_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.3 >= 3.3\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.3 >= 3.3") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python33_CFLAGS=`$PKG_CONFIG --cflags "python-3.3 >= 3.3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$python33_LIBS"; then
+ pkg_cv_python33_LIBS="$python33_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.3 >= 3.3\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.3 >= 3.3") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python33_LIBS=`$PKG_CONFIG --libs "python-3.3 >= 3.3" 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
+ python33_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "python-3.3 >= 3.3" 2>&1`
+ else
+ python33_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "python-3.3 >= 3.3" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$python33_PKG_ERRORS" >&5
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python32" >&5
+$as_echo_n "checking for python32... " >&6; }
+
+if test -n "$python32_CFLAGS"; then
+ pkg_cv_python32_CFLAGS="$python32_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.2 >= 3.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.2 >= 3.2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python32_CFLAGS=`$PKG_CONFIG --cflags "python-3.2 >= 3.2" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$python32_LIBS"; then
+ pkg_cv_python32_LIBS="$python32_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.2 >= 3.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.2 >= 3.2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python32_LIBS=`$PKG_CONFIG --libs "python-3.2 >= 3.2" 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
+ python32_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "python-3.2 >= 3.2" 2>&1`
+ else
+ python32_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "python-3.2 >= 3.2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$python32_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (python-3.2 >= 3.2) were not met:
+
+$python32_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 python32_CFLAGS
+and python32_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 python32_CFLAGS
+and python32_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ python32_CFLAGS=$pkg_cv_python32_CFLAGS
+ python32_LIBS=$pkg_cv_python32_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ pyver=`$PKG_CONFIG --modversion python-3.2`;
+ CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python32_CFLAGS";
+ LDFLAGS_PYTHON="$LDFLAGS_PYTHON $python32_LIBS"
+fi
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python32" >&5
+$as_echo_n "checking for python32... " >&6; }
+
+if test -n "$python32_CFLAGS"; then
+ pkg_cv_python32_CFLAGS="$python32_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.2 >= 3.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.2 >= 3.2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python32_CFLAGS=`$PKG_CONFIG --cflags "python-3.2 >= 3.2" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$python32_LIBS"; then
+ pkg_cv_python32_LIBS="$python32_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.2 >= 3.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.2 >= 3.2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python32_LIBS=`$PKG_CONFIG --libs "python-3.2 >= 3.2" 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
+ python32_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "python-3.2 >= 3.2" 2>&1`
+ else
+ python32_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "python-3.2 >= 3.2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$python32_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (python-3.2 >= 3.2) were not met:
+
+$python32_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 python32_CFLAGS
+and python32_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 python32_CFLAGS
+and python32_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ python32_CFLAGS=$pkg_cv_python32_CFLAGS
+ python32_LIBS=$pkg_cv_python32_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ pyver=`$PKG_CONFIG --modversion python-3.2`;
+ CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python32_CFLAGS";
+ LDFLAGS_PYTHON="$LDFLAGS_PYTHON $python32_LIBS"
+fi
+else
+ python33_CFLAGS=$pkg_cv_python33_CFLAGS
+ python33_LIBS=$pkg_cv_python33_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ pyver=`$PKG_CONFIG --modversion python-3.3`;
+ CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python33_CFLAGS";
+ LDFLAGS_PYTHON="$LDFLAGS_PYTHON $python33_LIBS"
+fi
+else
+ python34_CFLAGS=$pkg_cv_python34_CFLAGS
+ python34_LIBS=$pkg_cv_python34_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ pyver=`$PKG_CONFIG --modversion python-3.4`;
+ CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python34_CFLAGS";
+ LDFLAGS_PYTHON="$LDFLAGS_PYTHON $python34_LIBS"
+fi
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python34" >&5
+$as_echo_n "checking for python34... " >&6; }
+
+if test -n "$python34_CFLAGS"; then
+ pkg_cv_python34_CFLAGS="$python34_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.4 >= 3.4\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.4 >= 3.4") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python34_CFLAGS=`$PKG_CONFIG --cflags "python-3.4 >= 3.4" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$python34_LIBS"; then
+ pkg_cv_python34_LIBS="$python34_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.4 >= 3.4\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.4 >= 3.4") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python34_LIBS=`$PKG_CONFIG --libs "python-3.4 >= 3.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
+ python34_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "python-3.4 >= 3.4" 2>&1`
+ else
+ python34_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "python-3.4 >= 3.4" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$python34_PKG_ERRORS" >&5
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python33" >&5
+$as_echo_n "checking for python33... " >&6; }
+
+if test -n "$python33_CFLAGS"; then
+ pkg_cv_python33_CFLAGS="$python33_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.3 >= 3.3\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.3 >= 3.3") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python33_CFLAGS=`$PKG_CONFIG --cflags "python-3.3 >= 3.3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$python33_LIBS"; then
+ pkg_cv_python33_LIBS="$python33_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.3 >= 3.3\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.3 >= 3.3") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python33_LIBS=`$PKG_CONFIG --libs "python-3.3 >= 3.3" 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
+ python33_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "python-3.3 >= 3.3" 2>&1`
+ else
+ python33_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "python-3.3 >= 3.3" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$python33_PKG_ERRORS" >&5
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python32" >&5
+$as_echo_n "checking for python32... " >&6; }
+
+if test -n "$python32_CFLAGS"; then
+ pkg_cv_python32_CFLAGS="$python32_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.2 >= 3.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.2 >= 3.2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python32_CFLAGS=`$PKG_CONFIG --cflags "python-3.2 >= 3.2" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$python32_LIBS"; then
+ pkg_cv_python32_LIBS="$python32_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.2 >= 3.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.2 >= 3.2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python32_LIBS=`$PKG_CONFIG --libs "python-3.2 >= 3.2" 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
+ python32_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "python-3.2 >= 3.2" 2>&1`
+ else
+ python32_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "python-3.2 >= 3.2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$python32_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (python-3.2 >= 3.2) were not met:
+
+$python32_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 python32_CFLAGS
+and python32_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 python32_CFLAGS
+and python32_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ python32_CFLAGS=$pkg_cv_python32_CFLAGS
+ python32_LIBS=$pkg_cv_python32_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ pyver=`$PKG_CONFIG --modversion python-3.2`;
+ CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python32_CFLAGS";
+ LDFLAGS_PYTHON="$LDFLAGS_PYTHON $python32_LIBS"
+fi
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python32" >&5
+$as_echo_n "checking for python32... " >&6; }
+
+if test -n "$python32_CFLAGS"; then
+ pkg_cv_python32_CFLAGS="$python32_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.2 >= 3.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.2 >= 3.2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python32_CFLAGS=`$PKG_CONFIG --cflags "python-3.2 >= 3.2" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$python32_LIBS"; then
+ pkg_cv_python32_LIBS="$python32_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.2 >= 3.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.2 >= 3.2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python32_LIBS=`$PKG_CONFIG --libs "python-3.2 >= 3.2" 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
+ python32_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "python-3.2 >= 3.2" 2>&1`
+ else
+ python32_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "python-3.2 >= 3.2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$python32_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (python-3.2 >= 3.2) were not met:
+
+$python32_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 python32_CFLAGS
+and python32_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 python32_CFLAGS
+and python32_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ python32_CFLAGS=$pkg_cv_python32_CFLAGS
+ python32_LIBS=$pkg_cv_python32_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ pyver=`$PKG_CONFIG --modversion python-3.2`;
+ CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python32_CFLAGS";
+ LDFLAGS_PYTHON="$LDFLAGS_PYTHON $python32_LIBS"
+fi
+else
+ python33_CFLAGS=$pkg_cv_python33_CFLAGS
+ python33_LIBS=$pkg_cv_python33_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ pyver=`$PKG_CONFIG --modversion python-3.3`;
+ CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python33_CFLAGS";
+ LDFLAGS_PYTHON="$LDFLAGS_PYTHON $python33_LIBS"
+fi
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python33" >&5
+$as_echo_n "checking for python33... " >&6; }
+
+if test -n "$python33_CFLAGS"; then
+ pkg_cv_python33_CFLAGS="$python33_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.3 >= 3.3\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.3 >= 3.3") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python33_CFLAGS=`$PKG_CONFIG --cflags "python-3.3 >= 3.3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$python33_LIBS"; then
+ pkg_cv_python33_LIBS="$python33_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.3 >= 3.3\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.3 >= 3.3") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python33_LIBS=`$PKG_CONFIG --libs "python-3.3 >= 3.3" 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
+ python33_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "python-3.3 >= 3.3" 2>&1`
+ else
+ python33_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "python-3.3 >= 3.3" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$python33_PKG_ERRORS" >&5
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python32" >&5
+$as_echo_n "checking for python32... " >&6; }
+
+if test -n "$python32_CFLAGS"; then
+ pkg_cv_python32_CFLAGS="$python32_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.2 >= 3.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.2 >= 3.2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python32_CFLAGS=`$PKG_CONFIG --cflags "python-3.2 >= 3.2" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$python32_LIBS"; then
+ pkg_cv_python32_LIBS="$python32_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.2 >= 3.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.2 >= 3.2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python32_LIBS=`$PKG_CONFIG --libs "python-3.2 >= 3.2" 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
+ python32_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "python-3.2 >= 3.2" 2>&1`
+ else
+ python32_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "python-3.2 >= 3.2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$python32_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (python-3.2 >= 3.2) were not met:
+
+$python32_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 python32_CFLAGS
+and python32_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 python32_CFLAGS
+and python32_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ python32_CFLAGS=$pkg_cv_python32_CFLAGS
+ python32_LIBS=$pkg_cv_python32_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ pyver=`$PKG_CONFIG --modversion python-3.2`;
+ CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python32_CFLAGS";
+ LDFLAGS_PYTHON="$LDFLAGS_PYTHON $python32_LIBS"
+fi
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python32" >&5
+$as_echo_n "checking for python32... " >&6; }
+
+if test -n "$python32_CFLAGS"; then
+ pkg_cv_python32_CFLAGS="$python32_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.2 >= 3.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.2 >= 3.2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python32_CFLAGS=`$PKG_CONFIG --cflags "python-3.2 >= 3.2" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$python32_LIBS"; then
+ pkg_cv_python32_LIBS="$python32_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-3.2 >= 3.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "python-3.2 >= 3.2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_python32_LIBS=`$PKG_CONFIG --libs "python-3.2 >= 3.2" 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
+ python32_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "python-3.2 >= 3.2" 2>&1`
+ else
+ python32_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "python-3.2 >= 3.2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$python32_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (python-3.2 >= 3.2) were not met:
+
+$python32_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 python32_CFLAGS
+and python32_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 python32_CFLAGS
+and python32_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ python32_CFLAGS=$pkg_cv_python32_CFLAGS
+ python32_LIBS=$pkg_cv_python32_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ pyver=`$PKG_CONFIG --modversion python-3.2`;
+ CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python32_CFLAGS";
+ LDFLAGS_PYTHON="$LDFLAGS_PYTHON $python32_LIBS"
+fi
+else
+ python33_CFLAGS=$pkg_cv_python33_CFLAGS
+ python33_LIBS=$pkg_cv_python33_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ pyver=`$PKG_CONFIG --modversion python-3.3`;
+ CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python33_CFLAGS";
+ LDFLAGS_PYTHON="$LDFLAGS_PYTHON $python33_LIBS"
+fi
+else
+ python34_CFLAGS=$pkg_cv_python34_CFLAGS
+ python34_LIBS=$pkg_cv_python34_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ pyver=`$PKG_CONFIG --modversion python-3.4`;
+ CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python34_CFLAGS";
+ LDFLAGS_PYTHON="$LDFLAGS_PYTHON $python34_LIBS"
+fi
+else
+ python3_CFLAGS=$pkg_cv_python3_CFLAGS
+ python3_LIBS=$pkg_cv_python3_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ pyver=`$PKG_CONFIG --modversion python3`;
+ CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python3_CFLAGS";
+ LDFLAGS_PYTHON="$LDFLAGS_PYTHON $python3_LIBS"
+fi
+
+
+
+# We also need to find the name of the python3 executable (for 'make install').
+# Some OSes call this python3, some call it python3.2, etc. etc.
+for ac_prog in python3.4 python3.3 python3.2 python3
+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_PYTHON3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PYTHON3"; then
+ ac_cv_prog_PYTHON3="$PYTHON3" # 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_PYTHON3="$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
+PYTHON3=$ac_cv_prog_PYTHON3
+if test -n "$PYTHON3"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON3" >&5
+$as_echo "$PYTHON3" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$PYTHON3" && break
+done
+
+if test "x$PYTHON3" == "x"; then
+ as_fn_error $? "cannot find python3 executable." "$LINENO" 5
+fi
+
+# Link against libm, this is required (among other things) by Python.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pow" >&5
+$as_echo_n "checking for library containing pow... " >&6; }
+if ${ac_cv_search_pow+:} 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 pow ();
+int
+main ()
+{
+return pow ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' m; 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_pow=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_pow+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_pow+:} false; then :
+
+else
+ ac_cv_search_pow=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pow" >&5
+$as_echo "$ac_cv_search_pow" >&6; }
+ac_res=$ac_cv_search_pow
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+
+# The Check unit testing framework is optional. Disable if not found.
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for check" >&5
+$as_echo_n "checking for check... " >&6; }
+
+if test -n "$check_CFLAGS"; then
+ pkg_cv_check_CFLAGS="$check_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"check >= 0.9.4\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "check >= 0.9.4") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_check_CFLAGS=`$PKG_CONFIG --cflags "check >= 0.9.4" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$check_LIBS"; then
+ pkg_cv_check_LIBS="$check_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"check >= 0.9.4\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "check >= 0.9.4") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_check_LIBS=`$PKG_CONFIG --libs "check >= 0.9.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
+ check_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "check >= 0.9.4" 2>&1`
+ else
+ check_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "check >= 0.9.4" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$check_PKG_ERRORS" >&5
+
+ have_check="no"
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ have_check="no"
+else
+ check_CFLAGS=$pkg_cv_check_CFLAGS
+ check_LIBS=$pkg_cv_check_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_check="yes"; CFLAGS="$CFLAGS $check_CFLAGS";
+ LIBS="$LIBS $check_LIBS"
+fi
+ if test x"$have_check" = "xyes"; then
+ HAVE_CHECK_TRUE=
+ HAVE_CHECK_FALSE='#'
+else
+ HAVE_CHECK_TRUE='#'
+ HAVE_CHECK_FALSE=
+fi
+
+
+# libsigrok is optional (only used for the protocol decoder test framework).
+# Disable if not found.
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsigrok" >&5
+$as_echo_n "checking for libsigrok... " >&6; }
+
+if test -n "$libsigrok_CFLAGS"; then
+ pkg_cv_libsigrok_CFLAGS="$libsigrok_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsigrok >= 0.3.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libsigrok >= 0.3.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_libsigrok_CFLAGS=`$PKG_CONFIG --cflags "libsigrok >= 0.3.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$libsigrok_LIBS"; then
+ pkg_cv_libsigrok_LIBS="$libsigrok_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsigrok >= 0.3.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libsigrok >= 0.3.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_libsigrok_LIBS=`$PKG_CONFIG --libs "libsigrok >= 0.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
+ libsigrok_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsigrok >= 0.3.0" 2>&1`
+ else
+ libsigrok_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsigrok >= 0.3.0" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$libsigrok_PKG_ERRORS" >&5
+
+ build_runtc="no"
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ build_runtc="no"
+else
+ libsigrok_CFLAGS=$pkg_cv_libsigrok_CFLAGS
+ libsigrok_LIBS=$pkg_cv_libsigrok_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ LIBSIGROK_CFLAGS="$libsigrok_CFLAGS"; LIBSIGROK_LIBS="$libsigrok_LIBS"
+fi
+
+
+
+# Checks for header files.
+# These are already checked: inttypes.h stdint.h stdlib.h string.h unistd.h.
+ac_fn_c_check_header_mongrel "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_resource_h" = xyes; then :
+
+else
+ build_runtc="no"
+fi
+
+
+
+DECODERS_DIR="$datadir/libsigrokdecode/decoders"
+
+MAKEFLAGS='--no-print-directory'
+
+AM_LIBTOOLFLAGS='--silent'
+
+
+SRD_PACKAGE_VERSION_MAJOR=0
+SRD_PACKAGE_VERSION_MINOR=3
+SRD_PACKAGE_VERSION_MICRO=0
+SRD_PACKAGE_VERSION=0.3.0
+
+
+
+
+
+
+ if test x"$build_runtc" = "xyes"; then
+ BUILD_RUNTC_TRUE=
+ BUILD_RUNTC_FALSE='#'
+else
+ BUILD_RUNTC_TRUE='#'
+ BUILD_RUNTC_FALSE=
+fi
+
+
+ac_config_files="$ac_config_files Makefile version.h libsigrokdecode.pc"
+
+
+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 "${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 "${HAVE_CHECK_TRUE}" && test -z "${HAVE_CHECK_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_CHECK\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_RUNTC_TRUE}" && test -z "${BUILD_RUNTC_FALSE}"; then
+ as_fn_error $? "conditional \"BUILD_RUNTC\" 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 libsigrokdecode $as_me 0.3.0, 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 <sigrok-devel at lists.sourceforge.net>.
+libsigrokdecode home page: <http://www.sigrok.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+libsigrokdecode config.status 0.3.0
+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" ac_aux_dir="$ac_aux_dir"
+
+
+# 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"`'
+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"`'
+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"`'
+OBJDUMP='`$ECHO "$OBJDUMP" | $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"`'
+DLLTOOL='`$ECHO "$DLLTOOL" | $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_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"`'
+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
+lt_sysroot='`$ECHO "$lt_sysroot" | $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"`'
+sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $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"`'
+
+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 SHELL \
+ECHO \
+PATH_SEPARATOR \
+SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+OBJDUMP \
+deplibs_check_method \
+file_magic_cmd \
+file_magic_glob \
+want_nocaseglob \
+DLLTOOL \
+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_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+nm_file_list_spec \
+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; do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ 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 \
+sys_lib_dlsearch_path_spec; do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
+
+# See if we are running on zsh, and set the options which 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'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'
+
+
+
+
+_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
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "version.h") CONFIG_FILES="$CONFIG_FILES version.h" ;;
+ "libsigrokdecode.pc") CONFIG_FILES="$CONFIG_FILES libsigrokdecode.pc" ;;
+
+ *) 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 2>/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
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$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
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$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.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named 'Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running 'make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "$am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+ "libtool":C)
+
+ # See if we are running on zsh, and set the options which 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
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $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.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# 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 GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags=""
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# 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
+
+# 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
+
+# An object symbol dumper.
+OBJDUMP=$lt_OBJDUMP
+
+# 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
+
+# DLL creation program.
+DLLTOOL=$lt_DLLTOOL
+
+# 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 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
+
+# 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 in which our libraries should be installed.
+lt_sysroot=$lt_sysroot
+
+# 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
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# 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
+
+# ### END LIBTOOL CONFIG
+
+_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 "X${COLLECT_NAMES+set}" != Xset; 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)
+
+ if test x"$xsi_shell" = xyes; then
+ sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
+func_dirname ()\
+{\
+\ case ${1} in\
+\ */*) func_dirname_result="${1%/*}${2}" ;;\
+\ * ) func_dirname_result="${3}" ;;\
+\ esac\
+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_basename ()$/,/^} # func_basename /c\
+func_basename ()\
+{\
+\ func_basename_result="${1##*/}"\
+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
+func_dirname_and_basename ()\
+{\
+\ case ${1} in\
+\ */*) func_dirname_result="${1%/*}${2}" ;;\
+\ * ) func_dirname_result="${3}" ;;\
+\ esac\
+\ func_basename_result="${1##*/}"\
+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
+func_stripname ()\
+{\
+\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
+\ # positional parameters, so assign one to ordinary parameter first.\
+\ func_stripname_result=${3}\
+\ func_stripname_result=${func_stripname_result#"${1}"}\
+\ func_stripname_result=${func_stripname_result%"${2}"}\
+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
+func_split_long_opt ()\
+{\
+\ func_split_long_opt_name=${1%%=*}\
+\ func_split_long_opt_arg=${1#*=}\
+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
+func_split_short_opt ()\
+{\
+\ func_split_short_opt_arg=${1#??}\
+\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
+func_lo2o ()\
+{\
+\ case ${1} in\
+\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
+\ *) func_lo2o_result=${1} ;;\
+\ esac\
+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_xform ()$/,/^} # func_xform /c\
+func_xform ()\
+{\
+ func_xform_result=${1%.*}.lo\
+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_arith ()$/,/^} # func_arith /c\
+func_arith ()\
+{\
+ func_arith_result=$(( $* ))\
+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_len ()$/,/^} # func_len /c\
+func_len ()\
+{\
+ func_len_result=${#1}\
+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+fi
+
+if test x"$lt_shell_append" = xyes; then
+ sed -e '/^func_append ()$/,/^} # func_append /c\
+func_append ()\
+{\
+ eval "${1}+=\\${2}"\
+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
+func_append_quoted ()\
+{\
+\ func_quote_for_eval "${2}"\
+\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+ # Save a `func_append' function call where possible by direct use of '+='
+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+else
+ # Save a `func_append' function call even when '+=' is not available
+ sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+ && mv -f "$cfgfile.tmp" "$cfgfile" \
+ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+ test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
+fi
+
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
+ ;;
+
+ 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 "libsigrokdecode configuration summary:"
+echo
+echo " - Package version (major.minor.micro): $SRD_PACKAGE_VERSION"
+echo " - Library version (current:revision:age): $SRD_LIB_VERSION"
+echo " - Prefix: $prefix"
+echo " - Building on: $build"
+echo " - Building for: $host"
+echo
+echo "Detected libraries:"
+echo
+
+if test "x$pyver" = "xnone"; then
+ echo " - (REQUIRED) python >= 3.2: no"
+else
+ echo " - (REQUIRED) python >= 3.2: yes ($pyver)"
+fi
+
+# Note: This only works for libs with pkg-config integration.
+for lib in "glib-2.0 >= 2.24.0" "check >= 0.9.4" "libsigrok >= 0.3.0"; do
+ optional="OPTIONAL"
+ if test "x$lib" = "xglib-2.0 >= 2.24.0"; then optional="REQUIRED"; fi
+ if `$PKG_CONFIG --exists $lib`; then
+ ver=`$PKG_CONFIG --modversion $lib`
+ answer="yes ($ver)"
+ else
+ answer="no"
+ fi
+ echo " - ($optional) $lib: $answer"
+done
+
+echo
+echo "Enabled features:"
+echo
+echo " - (OPTIONAL) Library unit test framework support: $have_check"
+echo " - (OPTIONAL) Protocol decoder test framework support: $build_runtc"
+echo
+
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..1808751
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,203 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2010 Bert Vermeulen <bert at biot.com>
+##
+## 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 <http://www.gnu.org/licenses/>.
+##
+
+# We require at least autoconf 2.63 (AC_INIT format changed there).
+AC_PREREQ([2.63])
+
+# libsigrokdecode package version number (NOT the same as shared lib version!).
+m4_define([srd_package_version_major], [0])
+m4_define([srd_package_version_minor], [3])
+m4_define([srd_package_version_micro], [0])
+m4_define([srd_package_version], [srd_package_version_major.srd_package_version_minor.srd_package_version_micro])
+
+AC_INIT([libsigrokdecode], [srd_package_version],
+ [sigrok-devel at lists.sourceforge.net], [libsigrokdecode],
+ [http://www.sigrok.org])
+AC_CONFIG_HEADER([config.h])
+AC_CONFIG_MACRO_DIR([autostuff])
+AC_CONFIG_AUX_DIR([autostuff])
+
+# We require at least automake 1.11 (needed for 'silent rules').
+AM_INIT_AUTOMAKE([1.11 -Wall -Werror subdir-objects check-news color-tests])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
+
+AH_TOP([#ifndef SRD_CONFIG_H
+#define SRD_CONFIG_H /* To stop multiple inclusions. */])
+AH_BOTTOM([#endif /* SRD_CONFIG_H */])
+
+# Enable more compiler warnings via -Wall and -Wextra. Add -fvisibility=hidden
+# and enforce use of SRD_API to explicitly mark all public API functions.
+CFLAGS="$CFLAGS -Wall -Wextra -Wmissing-prototypes -fvisibility=hidden"
+
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_INSTALL
+AC_PROG_LN_S
+
+# Required for per-target flags or subdir-objects with C sources.
+AM_PROG_CC_C_O
+
+# Initialize libtool.
+LT_INIT
+
+# Initialize pkg-config.
+# We require at least 0.22, as "Requires.private" behaviour changed there.
+PKG_PROG_PKG_CONFIG([0.22])
+
+# Library version for libsigrokdecode (NOT the same as the package version).
+# Carefully read the libtool docs before updating these numbers!
+# The algorithm for determining which number to change (and how) is nontrivial!
+# http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
+SRD_LIB_VERSION_CURRENT=2
+SRD_LIB_VERSION_REVISION=0
+SRD_LIB_VERSION_AGE=0
+SRD_LIB_VERSION="$SRD_LIB_VERSION_CURRENT:$SRD_LIB_VERSION_REVISION:$SRD_LIB_VERSION_AGE"
+SRD_LIB_LDFLAGS="-version-info $SRD_LIB_VERSION"
+AC_SUBST(SRD_LIB_VERSION_CURRENT)
+AC_SUBST(SRD_LIB_VERSION_REVISION)
+AC_SUBST(SRD_LIB_VERSION_AGE)
+AC_SUBST(SRD_LIB_VERSION)
+AC_SUBST(SRD_LIB_LDFLAGS)
+
+# Assume we can build tests/runtc unless proven otherwise.
+build_runtc="yes"
+
+# Checks for libraries.
+
+# libglib-2.0 is always needed.
+# Note: glib-2.0 is part of the libsigrokdecode API
+# (hard pkg-config requirement).
+AM_PATH_GLIB_2_0([2.24.0],
+ [CFLAGS="$CFLAGS $GLIB_CFLAGS"; LIBS="$LIBS $GLIB_LIBS"])
+
+# Python 3 is always needed.
+# Note: We need to try a few different variants, since some systems have a
+# python3.pc file, others have a python-3.3.pc file, and so on.
+# See also: http://sigrok.org/wiki/Libsigrokdecode/Python
+CPPFLAGS_PYTHON=""
+LDFLAGS_PYTHON=""
+pyver="none"
+PKG_CHECK_MODULES([python3], [python3 >= 3.2],
+ [pyver=`$PKG_CONFIG --modversion python3`;
+ CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python3_CFLAGS";
+ LDFLAGS_PYTHON="$LDFLAGS_PYTHON $python3_LIBS"],
+[PKG_CHECK_MODULES([python34], [python-3.4 >= 3.4],
+ [pyver=`$PKG_CONFIG --modversion python-3.4`;
+ CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python34_CFLAGS";
+ LDFLAGS_PYTHON="$LDFLAGS_PYTHON $python34_LIBS"],
+[PKG_CHECK_MODULES([python33], [python-3.3 >= 3.3],
+ [pyver=`$PKG_CONFIG --modversion python-3.3`;
+ CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python33_CFLAGS";
+ LDFLAGS_PYTHON="$LDFLAGS_PYTHON $python33_LIBS"],
+[PKG_CHECK_MODULES([python32], [python-3.2 >= 3.2],
+ [pyver=`$PKG_CONFIG --modversion python-3.2`;
+ CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python32_CFLAGS";
+ LDFLAGS_PYTHON="$LDFLAGS_PYTHON $python32_LIBS"],
+)])])])
+AC_SUBST(CPPFLAGS_PYTHON)
+AC_SUBST(LDFLAGS_PYTHON)
+
+# We also need to find the name of the python3 executable (for 'make install').
+# Some OSes call this python3, some call it python3.2, etc. etc.
+AC_CHECK_PROGS([PYTHON3], [python3.4 python3.3 python3.2 python3])
+if test "x$PYTHON3" == "x"; then
+ AC_MSG_ERROR([cannot find python3 executable.])
+fi
+
+# Link against libm, this is required (among other things) by Python.
+AC_SEARCH_LIBS([pow], [m])
+
+# The Check unit testing framework is optional. Disable if not found.
+PKG_CHECK_MODULES([check], [check >= 0.9.4],
+ [have_check="yes"; CFLAGS="$CFLAGS $check_CFLAGS";
+ LIBS="$LIBS $check_LIBS"], [have_check="no"])
+AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")
+
+# libsigrok is optional (only used for the protocol decoder test framework).
+# Disable if not found.
+PKG_CHECK_MODULES([libsigrok], [libsigrok >= 0.3.0],
+ [LIBSIGROK_CFLAGS="$libsigrok_CFLAGS"; LIBSIGROK_LIBS="$libsigrok_LIBS"],
+ [build_runtc="no"])
+AC_SUBST([LIBSIGROK_CFLAGS])
+AC_SUBST([LIBSIGROK_LIBS])
+
+# Checks for header files.
+# These are already checked: inttypes.h stdint.h stdlib.h string.h unistd.h.
+AC_CHECK_HEADER([sys/resource.h], [], [build_runtc="no"])
+
+AC_SUBST(DECODERS_DIR, "$datadir/libsigrokdecode/decoders")
+AC_SUBST(MAKEFLAGS, '--no-print-directory')
+AC_SUBST(AM_LIBTOOLFLAGS, '--silent')
+
+SRD_PACKAGE_VERSION_MAJOR=srd_package_version_major
+SRD_PACKAGE_VERSION_MINOR=srd_package_version_minor
+SRD_PACKAGE_VERSION_MICRO=srd_package_version_micro
+SRD_PACKAGE_VERSION=srd_package_version
+
+AC_SUBST(SRD_PACKAGE_VERSION_MAJOR)
+AC_SUBST(SRD_PACKAGE_VERSION_MINOR)
+AC_SUBST(SRD_PACKAGE_VERSION_MICRO)
+AC_SUBST(SRD_PACKAGE_VERSION)
+
+AM_CONDITIONAL(BUILD_RUNTC, test x"$build_runtc" = "xyes")
+
+AC_CONFIG_FILES([Makefile version.h libsigrokdecode.pc])
+
+AC_OUTPUT
+
+echo
+echo "libsigrokdecode configuration summary:"
+echo
+echo " - Package version (major.minor.micro): $SRD_PACKAGE_VERSION"
+echo " - Library version (current:revision:age): $SRD_LIB_VERSION"
+echo " - Prefix: $prefix"
+echo " - Building on: $build"
+echo " - Building for: $host"
+echo
+echo "Detected libraries:"
+echo
+
+if test "x$pyver" = "xnone"; then
+ echo " - (REQUIRED) python >= 3.2: no"
+else
+ echo " - (REQUIRED) python >= 3.2: yes ($pyver)"
+fi
+
+# Note: This only works for libs with pkg-config integration.
+for lib in "glib-2.0 >= 2.24.0" "check >= 0.9.4" "libsigrok >= 0.3.0"; do
+ optional="OPTIONAL"
+ if test "x$lib" = "xglib-2.0 >= 2.24.0"; then optional="REQUIRED"; fi
+ if `$PKG_CONFIG --exists $lib`; then
+ ver=`$PKG_CONFIG --modversion $lib`
+ answer="yes ($ver)"
+ else
+ answer="no"
+ fi
+ echo " - ($optional) $lib: $answer"
+done
+
+echo
+echo "Enabled features:"
+echo
+echo " - (OPTIONAL) Library unit test framework support: $have_check"
+echo " - (OPTIONAL) Protocol decoder test framework support: $build_runtc"
+echo
+
diff --git a/contrib/sigrok-logo-notext.png b/contrib/sigrok-logo-notext.png
new file mode 100644
index 0000000..a3ca65f
Binary files /dev/null and b/contrib/sigrok-logo-notext.png differ
diff --git a/decoder.c b/decoder.c
new file mode 100644
index 0000000..71e9122
--- /dev/null
+++ b/decoder.c
@@ -0,0 +1,752 @@
+/*
+ * This file is part of the libsigrokdecode project.
+ *
+ * Copyright (C) 2010 Uwe Hermann <uwe at hermann-uwe.de>
+ * Copyright (C) 2012 Bert Vermeulen <bert at biot.com>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+#include "libsigrokdecode.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include "libsigrokdecode-internal.h"
+#include <glib.h>
+
+/**
+ * @file
+ *
+ * Listing, loading, unloading, and handling protocol decoders.
+ */
+
+/**
+ * @defgroup grp_decoder Protocol decoders
+ *
+ * Handling protocol decoders.
+ *
+ * @{
+ */
+
+/** @cond PRIVATE */
+
+/* The list of protocol decoders. */
+static GSList *pd_list = NULL;
+
+/* srd.c */
+extern SRD_PRIV GSList *searchpaths;
+
+/* session.c */
+extern SRD_PRIV GSList *sessions;
+extern SRD_PRIV int max_session_id;
+
+/* module_sigrokdecode.c */
+extern SRD_PRIV PyObject *mod_sigrokdecode;
+
+/** @endcond */
+
+static gboolean srd_check_init(void)
+{
+ if (max_session_id < 0) {
+ srd_err("Library is not initialized.");
+ return FALSE;
+ } else
+ return TRUE;
+}
+
+/**
+ * Returns the list of supported/loaded protocol decoders.
+ *
+ * This is a GSList containing the names of the decoders as strings.
+ *
+ * @return List of decoders, NULL if none are supported or loaded.
+ *
+ * @since 0.2.0
+ */
+SRD_API const GSList *srd_decoder_list(void)
+{
+ return pd_list;
+}
+
+/**
+ * Get the decoder with the specified ID.
+ *
+ * @param id The ID string of the decoder to return.
+ *
+ * @return The decoder with the specified ID, or NULL if not found.
+ *
+ * @since 0.1.0
+ */
+SRD_API struct srd_decoder *srd_decoder_get_by_id(const char *id)
+{
+ GSList *l;
+ struct srd_decoder *dec;
+
+ for (l = pd_list; l; l = l->next) {
+ dec = l->data;
+ if (!strcmp(dec->id, id))
+ return dec;
+ }
+
+ return NULL;
+}
+
+static int get_channels(const struct srd_decoder *d, const char *attr,
+ GSList **pdchl)
+{
+ PyObject *py_channellist, *py_entry;
+ struct srd_channel *pdch;
+ int ret, num_channels, i;
+
+ if (!PyObject_HasAttrString(d->py_dec, attr))
+ /* No channels of this type specified. */
+ return SRD_OK;
+
+ py_channellist = PyObject_GetAttrString(d->py_dec, attr);
+ if (!PyTuple_Check(py_channellist)) {
+ srd_err("Protocol decoder %s %s attribute is not a tuple.",
+ d->name, attr);
+ return SRD_ERR_PYTHON;
+ }
+
+ if ((num_channels = PyTuple_Size(py_channellist)) == 0)
+ /* Empty channellist. */
+ return SRD_OK;
+
+ ret = SRD_OK;
+ for (i = 0; i < num_channels; i++) {
+ py_entry = PyTuple_GetItem(py_channellist, i);
+ if (!PyDict_Check(py_entry)) {
+ srd_err("Protocol decoder %s %s attribute is not "
+ "a list with dict elements.", d->name, attr);
+ ret = SRD_ERR_PYTHON;
+ break;
+ }
+
+ if (!(pdch = g_try_malloc(sizeof(struct srd_channel)))) {
+ srd_err("Failed to g_malloc() struct srd_channel.");
+ ret = SRD_ERR_MALLOC;
+ break;
+ }
+
+ if ((py_dictitem_as_str(py_entry, "id", &pdch->id)) != SRD_OK) {
+ ret = SRD_ERR_PYTHON;
+ break;
+ }
+ if ((py_dictitem_as_str(py_entry, "name", &pdch->name)) != SRD_OK) {
+ ret = SRD_ERR_PYTHON;
+ break;
+ }
+ if ((py_dictitem_as_str(py_entry, "desc", &pdch->desc)) != SRD_OK) {
+ ret = SRD_ERR_PYTHON;
+ break;
+ }
+ pdch->order = i;
+
+ *pdchl = g_slist_append(*pdchl, pdch);
+ }
+
+ Py_DecRef(py_channellist);
+
+ return ret;
+}
+
+static int get_options(struct srd_decoder *d)
+{
+ PyObject *py_opts, *py_opt, *py_val, *py_default, *py_item;
+ Py_ssize_t opt, i;
+ struct srd_decoder_option *o;
+ GVariant *gvar;
+ gint64 lval;
+ double dval;
+ int overflow;
+ char *sval;
+
+ if (!PyObject_HasAttrString(d->py_dec, "options"))
+ /* No options, that's fine. */
+ return SRD_OK;
+
+ /* If present, options must be a tuple. */
+ py_opts = PyObject_GetAttrString(d->py_dec, "options");
+ if (!PyTuple_Check(py_opts)) {
+ srd_err("Protocol decoder %s: options attribute is not "
+ "a tuple.", d->id);
+ return SRD_ERR_PYTHON;
+ }
+
+ for (opt = 0; opt < PyTuple_Size(py_opts); opt++) {
+ py_opt = PyTuple_GetItem(py_opts, opt);
+ if (!PyDict_Check(py_opt)) {
+ srd_err("Protocol decoder %s options: each option "
+ "must consist of a dictionary.", d->name);
+ return SRD_ERR_PYTHON;
+ }
+ if (!(py_val = PyDict_GetItemString(py_opt, "id"))) {
+ srd_err("Protocol decoder %s option %d has no "
+ "id.", d->name);
+ return SRD_ERR_PYTHON;
+ }
+ o = g_malloc0(sizeof(struct srd_decoder_option));
+ py_str_as_str(py_val, &o->id);
+
+ if ((py_val = PyDict_GetItemString(py_opt, "desc")))
+ py_str_as_str(py_val, &o->desc);
+
+ if ((py_default = PyDict_GetItemString(py_opt, "default"))) {
+ if (PyUnicode_Check(py_default)) {
+ /* UTF-8 string */
+ py_str_as_str(py_default, &sval);
+ o->def = g_variant_new_string(sval);
+ g_free(sval);
+ } else if (PyLong_Check(py_default)) {
+ /* Long */
+ lval = PyLong_AsLongAndOverflow(py_default, &overflow);
+ if (overflow) {
+ /* Value is < LONG_MIN or > LONG_MAX */
+ PyErr_Clear();
+ srd_err("Protocol decoder %s option 'default' has "
+ "invalid default value.", d->name);
+ return SRD_ERR_PYTHON;
+ }
+ o->def = g_variant_new_int64(lval);
+ } else if (PyFloat_Check(py_default)) {
+ /* Float */
+ if ((dval = PyFloat_AsDouble(py_default)) == -1.0) {
+ PyErr_Clear();
+ srd_err("Protocol decoder %s option 'default' has "
+ "invalid default value.", d->name);
+ return SRD_ERR_PYTHON;
+ }
+ o->def = g_variant_new_double(dval);
+ } else {
+ srd_err("Protocol decoder %s option 'default' has "
+ "value of unsupported type '%s'.", d->name,
+ Py_TYPE(py_default)->tp_name);
+ return SRD_ERR_PYTHON;
+ }
+ g_variant_ref_sink(o->def);
+ }
+
+ if ((py_val = PyDict_GetItemString(py_opt, "values"))) {
+ /* A default is required if a list of values is
+ * given, since it's used to verify their type. */
+ if (!o->def) {
+ srd_err("No default for option '%s'", o->id);
+ return SRD_ERR_PYTHON;
+ }
+ if (!PyTuple_Check(py_val)) {
+ srd_err("Option '%s' values should be a tuple.", o->id);
+ return SRD_ERR_PYTHON;
+ }
+ for (i = 0; i < PyTuple_Size(py_val); i++) {
+ py_item = PyTuple_GetItem(py_val, i);
+ if (Py_TYPE(py_default) != Py_TYPE(py_item)) {
+ srd_err("All values for option '%s' must be "
+ "of the same type as the default.",
+ o->id);
+ return SRD_ERR_PYTHON;
+ }
+ if (PyUnicode_Check(py_item)) {
+ /* UTF-8 string */
+ py_str_as_str(py_item, &sval);
+ gvar = g_variant_new_string(sval);
+ g_variant_ref_sink(gvar);
+ g_free(sval);
+ o->values = g_slist_append(o->values, gvar);
+ } else if (PyLong_Check(py_item)) {
+ /* Long */
+ lval = PyLong_AsLongAndOverflow(py_item, &overflow);
+ if (overflow) {
+ /* Value is < LONG_MIN or > LONG_MAX */
+ PyErr_Clear();
+ srd_err("Protocol decoder %s option 'values' "
+ "has invalid value.", d->name);
+ return SRD_ERR_PYTHON;
+ }
+ gvar = g_variant_new_int64(lval);
+ g_variant_ref_sink(gvar);
+ o->values = g_slist_append(o->values, gvar);
+ } else if (PyFloat_Check(py_item)) {
+ /* Float */
+ if ((dval = PyFloat_AsDouble(py_item)) == -1.0) {
+ PyErr_Clear();
+ srd_err("Protocol decoder %s option 'default' has "
+ "invalid default value.", d->name);
+ return SRD_ERR_PYTHON;
+ }
+ gvar = g_variant_new_double(dval);
+ g_variant_ref_sink(gvar);
+ o->values = g_slist_append(o->values, gvar);
+ }
+ }
+ }
+ d->options = g_slist_append(d->options, o);
+ }
+
+ return SRD_OK;
+}
+
+/**
+ * Load a protocol decoder module into the embedded Python interpreter.
+ *
+ * @param module_name The module name to be loaded.
+ *
+ * @return SRD_OK upon success, a (negative) error code otherwise.
+ *
+ * @since 0.1.0
+ */
+SRD_API int srd_decoder_load(const char *module_name)
+{
+ PyObject *py_basedec, *py_method, *py_attr, *py_annlist, *py_ann;
+ PyObject *py_bin_classes, *py_bin_class, *py_ann_rows, *py_ann_row;
+ PyObject *py_ann_classes, *py_long;
+ struct srd_decoder *d;
+ int ret, i, j;
+ char **ann, **bin, *ann_row_id, *ann_row_desc;
+ struct srd_channel *pdch;
+ GSList *l, *ann_classes;
+ struct srd_decoder_annotation_row *ann_row;
+
+ if (!srd_check_init())
+ return SRD_ERR;
+
+ if (!module_name)
+ return SRD_ERR_ARG;
+
+ if (PyDict_GetItemString(PyImport_GetModuleDict(), module_name)) {
+ /* Module was already imported. */
+ return SRD_OK;
+ }
+
+ srd_dbg("Loading protocol decoder '%s'.", module_name);
+
+ py_basedec = py_method = py_attr = NULL;
+
+ if (!(d = g_try_malloc0(sizeof(struct srd_decoder)))) {
+ srd_dbg("Failed to g_malloc() struct srd_decoder.");
+ ret = SRD_ERR_MALLOC;
+ goto err_out;
+ }
+
+ ret = SRD_ERR_PYTHON;
+
+ /* Import the Python module. */
+ if (!(d->py_mod = PyImport_ImportModule(module_name))) {
+ srd_exception_catch("Import of '%s' failed.", module_name);
+ goto err_out;
+ }
+
+ /* Get the 'Decoder' class as Python object. */
+ if (!(d->py_dec = PyObject_GetAttrString(d->py_mod, "Decoder"))) {
+ /* This generated an AttributeError exception. */
+ PyErr_Clear();
+ srd_err("Decoder class not found in protocol decoder %s.",
+ module_name);
+ goto err_out;
+ }
+
+ if (!(py_basedec = PyObject_GetAttrString(mod_sigrokdecode, "Decoder"))) {
+ srd_dbg("sigrokdecode module not loaded.");
+ goto err_out;
+ }
+
+ if (!PyObject_IsSubclass(d->py_dec, py_basedec)) {
+ srd_err("Decoder class in protocol decoder module %s is not "
+ "a subclass of sigrokdecode.Decoder.", module_name);
+ goto err_out;
+ }
+ Py_CLEAR(py_basedec);
+
+ /*
+ * Check that thіs decoder has the correct PD API version.
+ * PDs of different API versions are incompatible and cannot work.
+ */
+ py_long = PyObject_GetAttrString(d->py_dec, "api_version");
+ if (PyLong_AsLong(py_long) != 2) {
+ srd_err("Only PDs of API version 2 are supported.");
+ goto err_out;
+ }
+ Py_CLEAR(py_long);
+
+ /* Check for a proper start() method. */
+ if (!PyObject_HasAttrString(d->py_dec, "start")) {
+ srd_err("Protocol decoder %s has no start() method Decoder "
+ "class.", module_name);
+ goto err_out;
+ }
+ py_method = PyObject_GetAttrString(d->py_dec, "start");
+ if (!PyFunction_Check(py_method)) {
+ srd_err("Protocol decoder %s Decoder class attribute 'start' "
+ "is not a method.", module_name);
+ goto err_out;
+ }
+ Py_CLEAR(py_method);
+
+ /* Check for a proper decode() method. */
+ if (!PyObject_HasAttrString(d->py_dec, "decode")) {
+ srd_err("Protocol decoder %s has no decode() method Decoder "
+ "class.", module_name);
+ goto err_out;
+ }
+ py_method = PyObject_GetAttrString(d->py_dec, "decode");
+ if (!PyFunction_Check(py_method)) {
+ srd_err("Protocol decoder %s Decoder class attribute 'decode' "
+ "is not a method.", module_name);
+ goto err_out;
+ }
+ Py_CLEAR(py_method);
+
+ /* Store required fields in newly allocated strings. */
+ if (py_attr_as_str(d->py_dec, "id", &(d->id)) != SRD_OK)
+ goto err_out;
+
+ if (py_attr_as_str(d->py_dec, "name", &(d->name)) != SRD_OK)
+ goto err_out;
+
+ if (py_attr_as_str(d->py_dec, "longname", &(d->longname)) != SRD_OK)
+ goto err_out;
+
+ if (py_attr_as_str(d->py_dec, "desc", &(d->desc)) != SRD_OK)
+ goto err_out;
+
+ if (py_attr_as_str(d->py_dec, "license", &(d->license)) != SRD_OK)
+ goto err_out;
+
+ /* All options and their default values. */
+ if (get_options(d) != SRD_OK)
+ goto err_out;
+
+ /* Check and import required channels. */
+ if (get_channels(d, "channels", &d->channels) != SRD_OK)
+ goto err_out;
+
+ /* Check and import optional channels. */
+ if (get_channels(d, "optional_channels", &d->opt_channels) != SRD_OK)
+ goto err_out;
+
+ /*
+ * Fix order numbers for the optional channels.
+ *
+ * Example:
+ * Required channels: r1, r2, r3. Optional: o1, o2, o3, o4.
+ * 'order' fields in the d->channels list = 0, 1, 2.
+ * 'order' fields in the d->opt_channels list = 3, 4, 5, 6.
+ */
+ for (l = d->opt_channels; l; l = l->next) {
+ pdch = l->data;
+ pdch->order += g_slist_length(d->channels);
+ }
+
+ /* Convert annotation class attribute to GSList of char **. */
+ d->annotations = NULL;
+ if (PyObject_HasAttrString(d->py_dec, "annotations")) {
+ py_annlist = PyObject_GetAttrString(d->py_dec, "annotations");
+ if (!PyTuple_Check(py_annlist)) {
+ srd_err("Protocol decoder %s annotations should "
+ "be a tuple.", module_name);
+ goto err_out;
+ }
+ for (i = 0; i < PyTuple_Size(py_annlist); i++) {
+ py_ann = PyTuple_GetItem(py_annlist, i);
+ if (!PyTuple_Check(py_ann) || PyTuple_Size(py_ann) != 2) {
+ srd_err("Protocol decoder %s annotation %d should "
+ "be a tuple with two elements.", module_name, i + 1);
+ goto err_out;
+ }
+
+ if (py_strseq_to_char(py_ann, &ann) != SRD_OK) {
+ goto err_out;
+ }
+ d->annotations = g_slist_append(d->annotations, ann);
+ }
+ }
+
+ /* Convert annotation_rows to GSList of 'struct srd_decoder_annotation_row'. */
+ d->annotation_rows = NULL;
+ if (PyObject_HasAttrString(d->py_dec, "annotation_rows")) {
+ py_ann_rows = PyObject_GetAttrString(d->py_dec, "annotation_rows");
+ if (!PyTuple_Check(py_ann_rows)) {
+ srd_err("Protocol decoder %s annotation row list "
+ "must be a tuple.", module_name);
+ goto err_out;
+ }
+ for (i = 0; i < PyTuple_Size(py_ann_rows); i++) {
+ py_ann_row = PyTuple_GetItem(py_ann_rows, i);
+ if (!PyTuple_Check(py_ann_row)) {
+ srd_err("Protocol decoder %s annotation rows "
+ "must be tuples.", module_name);
+ goto err_out;
+ }
+ if (PyTuple_Size(py_ann_row) != 3
+ || !PyUnicode_Check(PyTuple_GetItem(py_ann_row, 0))
+ || !PyUnicode_Check(PyTuple_GetItem(py_ann_row, 1))
+ || !PyTuple_Check(PyTuple_GetItem(py_ann_row, 2))) {
+ srd_err("Protocol decoder %s annotation rows "
+ "must contain tuples containing two "
+ "strings and a tuple.", module_name);
+ goto err_out;
+ }
+
+ if (py_str_as_str(PyTuple_GetItem(py_ann_row, 0), &ann_row_id) != SRD_OK)
+ goto err_out;
+
+ if (py_str_as_str(PyTuple_GetItem(py_ann_row, 1), &ann_row_desc) != SRD_OK)
+ goto err_out;
+
+ py_ann_classes = PyTuple_GetItem(py_ann_row, 2);
+ ann_classes = NULL;
+ for (j = 0; j < PyTuple_Size(py_ann_classes); j++) {
+ py_long = PyTuple_GetItem(py_ann_classes, j);
+ if (!PyLong_Check(py_long)) {
+ srd_err("Protocol decoder %s annotation row class "
+ "list must only contain numbers.", module_name);
+ goto err_out;
+ }
+ ann_classes = g_slist_append(ann_classes,
+ GINT_TO_POINTER(PyLong_AsLong(py_long)));
+ }
+
+ ann_row = g_malloc0(sizeof(struct srd_decoder_annotation_row));
+ ann_row->id = ann_row_id;
+ ann_row->desc = ann_row_desc;
+ ann_row->ann_classes = ann_classes;
+ d->annotation_rows = g_slist_append(d->annotation_rows, ann_row);
+ }
+ }
+
+ /* Convert binary class to GSList of char *. */
+ d->binary = NULL;
+ if (PyObject_HasAttrString(d->py_dec, "binary")) {
+ py_bin_classes = PyObject_GetAttrString(d->py_dec, "binary");
+ if (!PyTuple_Check(py_bin_classes)) {
+ srd_err("Protocol decoder %s binary classes should "
+ "be a tuple.", module_name);
+ goto err_out;
+ }
+ for (i = 0; i < PyTuple_Size(py_bin_classes); i++) {
+ py_bin_class = PyTuple_GetItem(py_bin_classes, i);
+ if (!PyTuple_Check(py_bin_class)) {
+ srd_err("Protocol decoder %s binary classes "
+ "should consist of tuples.", module_name);
+ goto err_out;
+ }
+ if (PyTuple_Size(py_bin_class) != 2
+ || !PyUnicode_Check(PyTuple_GetItem(py_bin_class, 0))
+ || !PyUnicode_Check(PyTuple_GetItem(py_bin_class, 1))) {
+ srd_err("Protocol decoder %s binary classes should "
+ "contain tuples with two strings.", module_name);
+ goto err_out;
+ }
+
+ if (py_strseq_to_char(py_bin_class, &bin) != SRD_OK) {
+ goto err_out;
+ }
+ d->binary = g_slist_append(d->binary, bin);
+ }
+ }
+
+ /* Append it to the list of supported/loaded decoders. */
+ pd_list = g_slist_append(pd_list, d);
+
+ ret = SRD_OK;
+
+err_out:
+ if (ret != SRD_OK) {
+ Py_XDECREF(py_method);
+ Py_XDECREF(py_basedec);
+ Py_XDECREF(d->py_dec);
+ Py_XDECREF(d->py_mod);
+ g_free(d);
+ }
+
+ return ret;
+}
+
+/**
+ * Return a protocol decoder's docstring.
+ *
+ * @param dec The loaded protocol decoder.
+ *
+ * @return A newly allocated buffer containing the protocol decoder's
+ * documentation. The caller is responsible for free'ing the buffer.
+ *
+ * @since 0.1.0
+ */
+SRD_API char *srd_decoder_doc_get(const struct srd_decoder *dec)
+{
+ PyObject *py_str;
+ char *doc;
+
+ if (!srd_check_init())
+ return NULL;
+
+ if (!dec)
+ return NULL;
+
+ if (!PyObject_HasAttrString(dec->py_mod, "__doc__"))
+ return NULL;
+
+ if (!(py_str = PyObject_GetAttrString(dec->py_mod, "__doc__"))) {
+ srd_exception_catch("");
+ return NULL;
+ }
+
+ doc = NULL;
+ if (py_str != Py_None)
+ py_str_as_str(py_str, &doc);
+ Py_DecRef(py_str);
+
+ return doc;
+}
+
+static void free_channels(GSList *channellist)
+{
+ GSList *l;
+ struct srd_channel *pdch;
+
+ if (channellist == NULL)
+ return;
+
+ for (l = channellist; l; l = l->next) {
+ pdch = l->data;
+ g_free(pdch->id);
+ g_free(pdch->name);
+ g_free(pdch->desc);
+ g_free(pdch);
+ }
+ g_slist_free(channellist);
+}
+
+/**
+ * Unload the specified protocol decoder.
+ *
+ * @param dec The struct srd_decoder to be unloaded.
+ *
+ * @return SRD_OK upon success, a (negative) error code otherwise.
+ *
+ * @since 0.1.0
+ */
+SRD_API int srd_decoder_unload(struct srd_decoder *dec)
+{
+ struct srd_decoder_option *o;
+ struct srd_session *sess;
+ GSList *l;
+
+ if (!srd_check_init())
+ return SRD_ERR;
+
+ if (!dec)
+ return SRD_ERR_ARG;
+
+ srd_dbg("Unloading protocol decoder '%s'.", dec->name);
+
+ /*
+ * Since any instances of this decoder need to be released as well,
+ * but they could be anywhere in the stack, just free the entire
+ * stack. A frontend reloading a decoder thus has to restart all
+ * instances, and rebuild the stack.
+ */
+ for (l = sessions; l; l = l->next) {
+ sess = l->data;
+ srd_inst_free_all(sess, NULL);
+ }
+
+ for (l = dec->options; l; l = l->next) {
+ o = l->data;
+ g_free(o->id);
+ g_free(o->desc);
+ g_variant_unref(o->def);
+ g_free(o);
+ }
+ g_slist_free(dec->options);
+
+ free_channels(dec->channels);
+ free_channels(dec->opt_channels);
+ g_free(dec->id);
+ g_free(dec->name);
+ g_free(dec->longname);
+ g_free(dec->desc);
+ g_free(dec->license);
+
+ /* The module's Decoder class. */
+ Py_XDECREF(dec->py_dec);
+ /* The module itself. */
+ Py_XDECREF(dec->py_mod);
+
+ g_free(dec);
+
+ return SRD_OK;
+}
+
+static void srd_decoder_load_all_path(char *path)
+{
+ GDir *dir;
+ const gchar *direntry;
+
+ if (!(dir = g_dir_open(path, 0, NULL)))
+ /* Not really fatal */
+ return;
+
+ /* This ignores errors returned by srd_decoder_load(). That
+ * function will have logged the cause, but in any case we
+ * want to continue anyway. */
+ while ((direntry = g_dir_read_name(dir)) != NULL) {
+ /* The directory name is the module name (e.g. "i2c"). */
+ srd_decoder_load(direntry);
+ }
+ g_dir_close(dir);
+
+}
+
+/**
+ * Load all installed protocol decoders.
+ *
+ * @return SRD_OK upon success, a (negative) error code otherwise.
+ *
+ * @since 0.1.0
+ */
+SRD_API int srd_decoder_load_all(void)
+{
+ GSList *l;
+
+ if (!srd_check_init())
+ return SRD_ERR;
+
+ for (l = searchpaths; l; l = l->next)
+ srd_decoder_load_all_path(l->data);
+
+ return SRD_OK;
+}
+
+/**
+ * Unload all loaded protocol decoders.
+ *
+ * @return SRD_OK upon success, a (negative) error code otherwise.
+ *
+ * @since 0.1.0
+ */
+SRD_API int srd_decoder_unload_all(void)
+{
+ GSList *l;
+ struct srd_decoder *dec;
+
+ for (l = pd_list; l; l = l->next) {
+ dec = l->data;
+ srd_decoder_unload(dec);
+ }
+ g_slist_free(pd_list);
+ pd_list = NULL;
+
+ return SRD_OK;
+}
+
+/** @} */
diff --git a/decoders/avr_isp/__init__.py b/decoders/avr_isp/__init__.py
new file mode 100644
index 0000000..4c4a900
--- /dev/null
+++ b/decoders/avr_isp/__init__.py
@@ -0,0 +1,27 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+This decoder stacks on top of the 'spi' PD and decodes the In-System
+Programming (ISP) protocol of some Atmel AVR 8-bit microcontrollers.
+'''
+
+from .pd import *
+
diff --git a/decoders/avr_isp/parts.py b/decoders/avr_isp/parts.py
new file mode 100644
index 0000000..b9747f8
--- /dev/null
+++ b/decoders/avr_isp/parts.py
@@ -0,0 +1,43 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+# Device code addresses:
+# 0x00: vendor code, 0x01: part family + flash size, 0x02: part number
+
+# Vendor code
+vendor_code = {
+ 0x1e: 'Atmel',
+ 0x00: 'Device locked',
+}
+
+# (Part family + flash size, part number)
+part = {
+ (0x90, 0x01): 'AT90S1200',
+ (0x91, 0x01): 'AT90S2313',
+ (0x92, 0x01): 'AT90S4414',
+ (0x92, 0x05): 'ATmega48', # 4kB flash
+ (0x93, 0x01): 'AT90S8515',
+ (0x93, 0x0a): 'ATmega88', # 8kB flash
+ (0x94, 0x06): 'ATmega168', # 16kB flash
+ (0xff, 0xff): 'Device code erased, or target missing',
+ (0x01, 0x02): 'Device locked',
+ # TODO: Lots more entries.
+}
+
diff --git a/decoders/avr_isp/pd.py b/decoders/avr_isp/pd.py
new file mode 100644
index 0000000..a6b9c80
--- /dev/null
+++ b/decoders/avr_isp/pd.py
@@ -0,0 +1,211 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012-2014 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+from .parts import *
+
+VENDOR_CODE_ATMEL = 0x1e
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'avr_isp'
+ name = 'AVR ISP'
+ longname = 'AVR In-System Programming'
+ desc = 'Protocol for in-system programming Atmel AVR MCUs.'
+ license = 'gplv2+'
+ inputs = ['spi']
+ outputs = ['avr_isp']
+ annotations = (
+ ('pe', 'Programming enable'),
+ ('rsb0', 'Read signature byte 0'),
+ ('rsb1', 'Read signature byte 1'),
+ ('rsb2', 'Read signature byte 2'),
+ ('ce', 'Chip erase'),
+ ('rfb', 'Read fuse bits'),
+ ('rhfb', 'Read high fuse bits'),
+ ('refb', 'Read extended fuse bits'),
+ ('warnings', 'Warnings'),
+ ('dev', 'Device'),
+ )
+ annotation_rows = (
+ ('bits', 'Bits', ()),
+ ('commands', 'Commands', tuple(range(7 + 1))),
+ ('warnings', 'Warnings', (8,)),
+ ('dev', 'Device', (9,)),
+ )
+
+ def __init__(self, **kwargs):
+ self.state = 'IDLE'
+ self.mosi_bytes, self.miso_bytes = [], []
+ self.cmd_ss, self.cmd_es = 0, 0
+ self.xx, self.yy, self.zz, self.mm = 0, 0, 0, 0
+ self.device_ss = None
+
+ def start(self):
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def putx(self, data):
+ self.put(self.cmd_ss, self.cmd_es, self.out_ann, data)
+
+ def handle_cmd_programming_enable(self, cmd, ret):
+ # Programming enable.
+ # Note: The chip doesn't send any ACK for 'Programming enable'.
+ self.putx([0, ['Programming enable']])
+
+ # Sanity check on reply.
+ if ret[1:4] != [0xac, 0x53, cmd[2]]:
+ self.putx([8, ['Warning: Unexpected bytes in reply!']])
+
+ def handle_cmd_read_signature_byte_0x00(self, cmd, ret):
+ # Signature byte 0x00: vendor code.
+ self.vendor_code = ret[3]
+ v = vendor_code[self.vendor_code]
+ self.putx([1, ['Vendor code: 0x%02x (%s)' % (ret[3], v)]])
+
+ # Store for later.
+ self.xx = cmd[1] # Same as ret[2].
+ self.yy = cmd[3]
+ self.zz = ret[0]
+
+ # Sanity check on reply.
+ if ret[1] != 0x30 or ret[2] != cmd[1]:
+ self.putx([8, ['Warning: Unexpected bytes in reply!']])
+
+ # Sanity check for the vendor code.
+ if self.vendor_code != VENDOR_CODE_ATMEL:
+ self.putx([8, ['Warning: Vendor code was not 0x1e (Atmel)!']])
+
+ def handle_cmd_read_signature_byte_0x01(self, cmd, ret):
+ # Signature byte 0x01: part family and memory size.
+ self.part_fam_flash_size = ret[3]
+ self.putx([2, ['Part family / memory size: 0x%02x' % ret[3]]])
+
+ # Store for later.
+ self.mm = cmd[3]
+ self.device_ss = self.cmd_ss
+
+ # Sanity check on reply.
+ if ret[1] != 0x30 or ret[2] != cmd[1] or ret[0] != self.yy:
+ self.putx([8, ['Warning: Unexpected bytes in reply!']])
+
+ def handle_cmd_read_signature_byte_0x02(self, cmd, ret):
+ # Signature byte 0x02: part number.
+ self.part_number = ret[3]
+ self.putx([3, ['Part number: 0x%02x' % ret[3]]])
+
+ p = part[(self.part_fam_flash_size, self.part_number)]
+ data = [9, ['Device: Atmel %s' % p]]
+ self.put(self.device_ss, self.cmd_es, self.out_ann, data)
+
+ # Sanity check on reply.
+ if ret[1] != 0x30 or ret[2] != self.xx or ret[0] != self.mm:
+ self.putx([8, ['Warning: Unexpected bytes in reply!']])
+
+ self.xx, self.yy, self.zz, self.mm = 0, 0, 0, 0
+
+ def handle_cmd_chip_erase(self, cmd, ret):
+ # Chip erase (erases both flash an EEPROM).
+ # Upon successful chip erase, the lock bits will also be erased.
+ # The only way to end a Chip Erase cycle is to release RESET#.
+ self.putx([4, ['Chip erase']])
+
+ # TODO: Check/handle RESET#.
+
+ # Sanity check on reply.
+ bit = (ret[2] & (1 << 7)) >> 7
+ if ret[1] != 0xac or bit != 1 or ret[3] != cmd[2]:
+ self.putx([8, ['Warning: Unexpected bytes in reply!']])
+
+ def handle_cmd_read_fuse_bits(self, cmd, ret):
+ # Read fuse bits.
+ self.putx([5, ['Read fuse bits: 0x%02x' % ret[3]]])
+
+ # TODO: Decode fuse bits.
+ # TODO: Sanity check on reply.
+
+ def handle_cmd_read_fuse_high_bits(self, cmd, ret):
+ # Read fuse high bits.
+ self.putx([6, ['Read fuse high bits: 0x%02x' % ret[3]]])
+
+ # TODO: Decode fuse bits.
+ # TODO: Sanity check on reply.
+
+ def handle_cmd_read_extended_fuse_bits(self, cmd, ret):
+ # Read extended fuse bits.
+ self.putx([7, ['Read extended fuse bits: 0x%02x' % ret[3]]])
+
+ # TODO: Decode fuse bits.
+ # TODO: Sanity check on reply.
+
+ def handle_command(self, cmd, ret):
+ if cmd[:2] == [0xac, 0x53]:
+ self.handle_cmd_programming_enable(cmd, ret)
+ elif cmd[0] == 0xac and (cmd[1] & (1 << 7)) == (1 << 7):
+ self.handle_cmd_chip_erase(cmd, ret)
+ elif cmd[:3] == [0x50, 0x00, 0x00]:
+ self.handle_cmd_read_fuse_bits(cmd, ret)
+ elif cmd[:3] == [0x58, 0x08, 0x00]:
+ self.handle_cmd_read_fuse_high_bits(cmd, ret)
+ elif cmd[:3] == [0x50, 0x08, 0x00]:
+ self.handle_cmd_read_extended_fuse_bits(cmd, ret)
+ elif cmd[0] == 0x30 and cmd[2] == 0x00:
+ self.handle_cmd_read_signature_byte_0x00(cmd, ret)
+ elif cmd[0] == 0x30 and cmd[2] == 0x01:
+ self.handle_cmd_read_signature_byte_0x01(cmd, ret)
+ elif cmd[0] == 0x30 and cmd[2] == 0x02:
+ self.handle_cmd_read_signature_byte_0x02(cmd, ret)
+ else:
+ c = '%02x %02x %02x %02x' % tuple(cmd)
+ r = '%02x %02x %02x %02x' % tuple(ret)
+ self.putx([0, ['Unknown command: %s (reply: %s)!' % (c, r)]])
+
+ def decode(self, ss, es, data):
+ ptype, mosi, miso = data
+
+ # For now, only use DATA and BITS packets.
+ if ptype not in ('DATA', 'BITS'):
+ return
+
+ # Store the individual bit values and ss/es numbers. The next packet
+ # is guaranteed to be a 'DATA' packet belonging to this 'BITS' one.
+ if ptype == 'BITS':
+ self.miso_bits, self.mosi_bits = miso, mosi
+ return
+
+ self.ss, self.es = ss, es
+
+ if len(self.mosi_bytes) == 0:
+ self.cmd_ss = ss
+
+ # Append new bytes.
+ self.mosi_bytes.append(mosi)
+ self.miso_bytes.append(miso)
+
+ # All commands consist of 4 bytes.
+ if len(self.mosi_bytes) < 4:
+ return
+
+ self.cmd_es = es
+
+ self.handle_command(self.mosi_bytes, self.miso_bytes)
+
+ self.mosi_bytes = []
+ self.miso_bytes = []
+
diff --git a/decoders/can/__init__.py b/decoders/can/__init__.py
new file mode 100644
index 0000000..38731c2
--- /dev/null
+++ b/decoders/can/__init__.py
@@ -0,0 +1,31 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+CAN (Controller Area Network) is a field bus protocol for distributed
+real-time control.
+
+This decoder assumes that a single CAN_RX line is sampled (e.g. on
+the digital output side of a CAN transceiver IC such as the Microchip
+MCP-2515DM-BM).
+'''
+
+from .pd import *
+
diff --git a/decoders/can/pd.py b/decoders/can/pd.py
new file mode 100644
index 0000000..bf38b7f
--- /dev/null
+++ b/decoders/can/pd.py
@@ -0,0 +1,381 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012-2013 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'can'
+ name = 'CAN'
+ longname = 'Controller Area Network'
+ desc = 'Field bus protocol for distributed realtime control.'
+ license = 'gplv2+'
+ inputs = ['logic']
+ outputs = ['can']
+ channels = (
+ {'id': 'can_rx', 'name': 'CAN RX', 'desc': 'CAN bus line'},
+ )
+ options = (
+ {'id': 'bitrate', 'desc': 'Bitrate (bits/s)', 'default': 1000000},
+ {'id': 'sample_point', 'desc': 'Sample point (%)', 'default': 70.0},
+ )
+ annotations = (
+ ('data', 'CAN payload data'),
+ ('sof', 'Start of frame'),
+ ('eof', 'End of frame'),
+ ('id', 'Identifier'),
+ ('ext-id', 'Extended identifier'),
+ ('full-id', 'Full identifier'),
+ ('ide', 'Identifier extension bit'),
+ ('reserved-bit', 'Reserved bit 0 and 1'),
+ ('rtr', 'Remote transmission request'),
+ ('srr', 'Substitute remote request'),
+ ('dlc', 'Data length count'),
+ ('crc-sequence', 'CRC sequence'),
+ ('crc-delimiter', 'CRC delimiter'),
+ ('ack-slot', 'ACK slot'),
+ ('ack-delimiter', 'ACK delimiter'),
+ ('stuff-bit', 'Stuff bit'),
+ ('warnings', 'Human-readable warnings'),
+ )
+
+ def __init__(self, **kwargs):
+ self.samplerate = None
+ self.reset_variables()
+
+ def start(self):
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def metadata(self, key, value):
+ if key == srd.SRD_CONF_SAMPLERATE:
+ self.samplerate = value
+ self.bit_width = float(self.samplerate) / float(self.options['bitrate'])
+ self.bitpos = (self.bit_width / 100.0) * self.options['sample_point']
+
+ # Generic helper for CAN bit annotations.
+ def putg(self, ss, es, data):
+ left, right = int(self.bitpos), int(self.bit_width - self.bitpos)
+ self.put(ss - left, es + right, self.out_ann, data)
+
+ # Single-CAN-bit annotation using the current samplenum.
+ def putx(self, data):
+ self.putg(self.samplenum, self.samplenum, data)
+
+ # Single-CAN-bit annotation using the samplenum of CAN bit 12.
+ def put12(self, data):
+ self.putg(self.ss_bit12, self.ss_bit12, data)
+
+ # Multi-CAN-bit annotation from self.ss_block to current samplenum.
+ def putb(self, data):
+ self.putg(self.ss_block, self.samplenum, data)
+
+ def reset_variables(self):
+ self.state = 'IDLE'
+ self.sof = self.frame_type = self.dlc = None
+ self.rawbits = [] # All bits, including stuff bits
+ self.bits = [] # Only actual CAN frame bits (no stuff bits)
+ self.curbit = 0 # Current bit of CAN frame (bit 0 == SOF)
+ self.last_databit = 999 # Positive value that bitnum+x will never match
+ self.ss_block = None
+ self.ss_bit12 = None
+ self.ss_databytebits = []
+
+ # Return True if we reached the desired bit position, False otherwise.
+ def reached_bit(self, bitnum):
+ bitpos = int(self.sof + (self.bit_width * bitnum) + self.bitpos)
+ if self.samplenum >= bitpos:
+ return True
+ return False
+
+ def is_stuff_bit(self):
+ # CAN uses NRZ encoding and bit stuffing.
+ # After 5 identical bits, a stuff bit of opposite value is added.
+ last_6_bits = self.rawbits[-6:]
+ if last_6_bits not in ([0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 0]):
+ return False
+
+ # Stuff bit. Keep it in self.rawbits, but drop it from self.bits.
+ self.putx([15, ['Stuff bit: %d' % self.rawbits[-1],
+ 'SB: %d' % self.rawbits[-1], 'SB']])
+ self.bits.pop() # Drop last bit.
+ return True
+
+ def is_valid_crc(self, crc_bits):
+ return True # TODO
+
+ def decode_error_frame(self, bits):
+ pass # TODO
+
+ def decode_overload_frame(self, bits):
+ pass # TODO
+
+ # Both standard and extended frames end with CRC, CRC delimiter, ACK,
+ # ACK delimiter, and EOF fields. Handle them in a common function.
+ # Returns True if the frame ended (EOF), False otherwise.
+ def decode_frame_end(self, can_rx, bitnum):
+
+ # Remember start of CRC sequence (see below).
+ if bitnum == (self.last_databit + 1):
+ self.ss_block = self.samplenum
+
+ # CRC sequence (15 bits)
+ elif bitnum == (self.last_databit + 15):
+ x = self.last_databit + 1
+ crc_bits = self.bits[x:x + 15 + 1]
+ self.crc = int(''.join(str(d) for d in crc_bits), 2)
+ self.putb([11, ['CRC sequence: 0x%04x' % self.crc,
+ 'CRC: 0x%04x' % self.crc, 'CRC']])
+ if not self.is_valid_crc(crc_bits):
+ self.putb([16, ['CRC is invalid']])
+
+ # CRC delimiter bit (recessive)
+ elif bitnum == (self.last_databit + 16):
+ self.putx([12, ['CRC delimiter: %d' % can_rx,
+ 'CRC d: %d' % can_rx, 'CRC d']])
+
+ # ACK slot bit (dominant: ACK, recessive: NACK)
+ elif bitnum == (self.last_databit + 17):
+ ack = 'ACK' if can_rx == 0 else 'NACK'
+ self.putx([13, ['ACK slot: %s' % ack, 'ACK s: %s' % ack, 'ACK s']])
+
+ # ACK delimiter bit (recessive)
+ elif bitnum == (self.last_databit + 18):
+ self.putx([14, ['ACK delimiter: %d' % can_rx,
+ 'ACK d: %d' % can_rx, 'ACK d']])
+
+ # Remember start of EOF (see below).
+ elif bitnum == (self.last_databit + 19):
+ self.ss_block = self.samplenum
+
+ # End of frame (EOF), 7 recessive bits
+ elif bitnum == (self.last_databit + 25):
+ self.putb([2, ['End of frame', 'EOF', 'E']])
+ self.reset_variables()
+ return True
+
+ return False
+
+ # Returns True if the frame ended (EOF), False otherwise.
+ def decode_standard_frame(self, can_rx, bitnum):
+
+ # Bit 14: RB0 (reserved bit)
+ # Has to be sent dominant, but receivers should accept recessive too.
+ if bitnum == 14:
+ self.putx([7, ['Reserved bit 0: %d' % can_rx,
+ 'RB0: %d' % can_rx, 'RB0']])
+
+ # Bit 12: Remote transmission request (RTR) bit
+ # Data frame: dominant, remote frame: recessive
+ # Remote frames do not contain a data field.
+ rtr = 'remote' if self.bits[12] == 1 else 'data'
+ self.put12([8, ['Remote transmission request: %s frame' % rtr,
+ 'RTR: %s frame' % rtr, 'RTR']])
+
+ # Remember start of DLC (see below).
+ elif bitnum == 15:
+ self.ss_block = self.samplenum
+
+ # Bits 15-18: Data length code (DLC), in number of bytes (0-8).
+ elif bitnum == 18:
+ self.dlc = int(''.join(str(d) for d in self.bits[15:18 + 1]), 2)
+ self.putb([10, ['Data length code: %d' % self.dlc,
+ 'DLC: %d' % self.dlc, 'DLC']])
+ self.last_databit = 18 + (self.dlc * 8)
+
+ # Remember all databyte bits, except the very last one.
+ elif bitnum in range(19, self.last_databit):
+ self.ss_databytebits.append(self.samplenum)
+
+ # Bits 19-X: Data field (0-8 bytes, depending on DLC)
+ # The bits within a data byte are transferred MSB-first.
+ elif bitnum == self.last_databit:
+ self.ss_databytebits.append(self.samplenum) # Last databyte bit.
+ for i in range(self.dlc):
+ x = 18 + (8 * i) + 1
+ b = int(''.join(str(d) for d in self.bits[x:x + 8]), 2)
+ ss = self.ss_databytebits[i * 8]
+ es = self.ss_databytebits[((i + 1) * 8) - 1]
+ self.putg(ss, es, [0, ['Data byte %d: 0x%02x' % (i, b),
+ 'DB %d: 0x%02x' % (i, b), 'DB']])
+ self.ss_databytebits = []
+
+ elif bitnum > self.last_databit:
+ return self.decode_frame_end(can_rx, bitnum)
+
+ return False
+
+ # Returns True if the frame ended (EOF), False otherwise.
+ def decode_extended_frame(self, can_rx, bitnum):
+
+ # Remember start of EID (see below).
+ if bitnum == 14:
+ self.ss_block = self.samplenum
+
+ # Bits 14-31: Extended identifier (EID[17..0])
+ elif bitnum == 31:
+ self.eid = int(''.join(str(d) for d in self.bits[14:]), 2)
+ s = '%d (0x%x)' % (self.eid, self.eid)
+ self.putb([4, ['Extended Identifier: %s' % s,
+ 'Extended ID: %s' % s, 'Extended ID', 'EID']])
+
+ self.fullid = self.id << 18 | self.eid
+ s = '%d (0x%x)' % (self.fullid, self.fullid)
+ self.putb([5, ['Full Identifier: %s' % s, 'Full ID: %s' % s,
+ 'Full ID', 'FID']])
+
+ # Bit 12: Substitute remote request (SRR) bit
+ self.put12([9, ['Substitute remote request: %d' % self.bits[12],
+ 'SRR: %d' % self.bits[12], 'SRR']])
+
+ # Bit 32: Remote transmission request (RTR) bit
+ # Data frame: dominant, remote frame: recessive
+ # Remote frames do not contain a data field.
+ if bitnum == 32:
+ rtr = 'remote' if can_rx == 1 else 'data'
+ self.putx([8, ['Remote transmission request: %s frame' % rtr,
+ 'RTR: %s frame' % rtr, 'RTR']])
+
+ # Bit 33: RB1 (reserved bit)
+ elif bitnum == 33:
+ self.putx([7, ['Reserved bit 1: %d' % can_rx,
+ 'RB1: %d' % can_rx, 'RB1']])
+
+ # Bit 34: RB0 (reserved bit)
+ elif bitnum == 34:
+ self.putx([7, ['Reserved bit 0: %d' % can_rx,
+ 'RB0: %d' % can_rx, 'RB0']])
+
+ # Remember start of DLC (see below).
+ elif bitnum == 35:
+ self.ss_block = self.samplenum
+
+ # Bits 35-38: Data length code (DLC), in number of bytes (0-8).
+ elif bitnum == 38:
+ self.dlc = int(''.join(str(d) for d in self.bits[35:38 + 1]), 2)
+ self.putb([10, ['Data length code: %d' % self.dlc,
+ 'DLC: %d' % self.dlc, 'DLC']])
+ self.last_databit = 38 + (self.dlc * 8)
+
+ # Remember all databyte bits, except the very last one.
+ elif bitnum in range(39, self.last_databit):
+ self.ss_databytebits.append(self.samplenum)
+
+ # Bits 39-X: Data field (0-8 bytes, depending on DLC)
+ # The bits within a data byte are transferred MSB-first.
+ elif bitnum == self.last_databit:
+ self.ss_databytebits.append(self.samplenum) # Last databyte bit.
+ for i in range(self.dlc):
+ x = 38 + (8 * i) + 1
+ b = int(''.join(str(d) for d in self.bits[x:x + 8]), 2)
+ ss = self.ss_databytebits[i * 8]
+ es = self.ss_databytebits[((i + 1) * 8) - 1]
+ self.putg(ss, es, [0, ['Data byte %d: 0x%02x' % (i, b),
+ 'DB %d: 0x%02x' % (i, b), 'DB']])
+ self.ss_databytebits = []
+
+ elif bitnum > self.last_databit:
+ return self.decode_frame_end(can_rx, bitnum)
+
+ return False
+
+ def handle_bit(self, can_rx):
+ self.rawbits.append(can_rx)
+ self.bits.append(can_rx)
+
+ # Get the index of the current CAN frame bit (without stuff bits).
+ bitnum = len(self.bits) - 1
+
+ # For debugging.
+ # self.putx([0, ['Bit %d (CAN bit %d): %d' % \
+ # (self.curbit, bitnum, can_rx)]])
+
+ # If this is a stuff bit, remove it from self.bits and ignore it.
+ if self.is_stuff_bit():
+ self.curbit += 1 # Increase self.curbit (bitnum is not affected).
+ return
+
+ # Bit 0: Start of frame (SOF) bit
+ if bitnum == 0:
+ if can_rx == 0:
+ self.putx([1, ['Start of frame', 'SOF', 'S']])
+ else:
+ self.putx([16, ['Start of frame (SOF) must be a dominant bit']])
+
+ # Remember start of ID (see below).
+ elif bitnum == 1:
+ self.ss_block = self.samplenum
+
+ # Bits 1-11: Identifier (ID[10..0])
+ # The bits ID[10..4] must NOT be all recessive.
+ elif bitnum == 11:
+ self.id = int(''.join(str(d) for d in self.bits[1:]), 2)
+ s = '%d (0x%x)' % (self.id, self.id),
+ self.putb([3, ['Identifier: %s' % s, 'ID: %s' % s, 'ID']])
+
+ # RTR or SRR bit, depending on frame type (gets handled later).
+ elif bitnum == 12:
+ # self.putx([0, ['RTR/SRR: %d' % can_rx]]) # Debug only.
+ self.ss_bit12 = self.samplenum
+
+ # Bit 13: Identifier extension (IDE) bit
+ # Standard frame: dominant, extended frame: recessive
+ elif bitnum == 13:
+ ide = self.frame_type = 'standard' if can_rx == 0 else 'extended'
+ self.putx([6, ['Identifier extension bit: %s frame' % ide,
+ 'IDE: %s frame' % ide, 'IDE']])
+
+ # Bits 14-X: Frame-type dependent, passed to the resp. handlers.
+ elif bitnum >= 14:
+ if self.frame_type == 'standard':
+ done = self.decode_standard_frame(can_rx, bitnum)
+ else:
+ done = self.decode_extended_frame(can_rx, bitnum)
+
+ # The handlers return True if a frame ended (EOF).
+ if done:
+ return
+
+ # After a frame there are 3 intermission bits (recessive).
+ # After these bits, the bus is considered free.
+
+ self.curbit += 1
+
+ def decode(self, ss, es, data):
+ if self.samplerate is None:
+ raise Exception("Cannot decode without samplerate.")
+ for (self.samplenum, pins) in data:
+
+ (can_rx,) = pins
+
+ # State machine.
+ if self.state == 'IDLE':
+ # Wait for a dominant state (logic 0) on the bus.
+ if can_rx == 1:
+ continue
+ self.sof = self.samplenum
+ self.state = 'GET BITS'
+ elif self.state == 'GET BITS':
+ # Wait until we're in the correct bit/sampling position.
+ if not self.reached_bit(self.curbit):
+ continue
+ self.handle_bit(can_rx)
+ else:
+ raise Exception("Invalid state: %s" % self.state)
+
diff --git a/decoders/dcf77/__init__.py b/decoders/dcf77/__init__.py
new file mode 100644
index 0000000..04805c2
--- /dev/null
+++ b/decoders/dcf77/__init__.py
@@ -0,0 +1,30 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+This PD decodes the DCF77 protocol (a European long-wave time signal that
+uses a 77.5kHz carrier frequency).
+
+Details:
+http://en.wikipedia.org/wiki/DCF77
+'''
+
+from .pd import *
+
diff --git a/decoders/dcf77/pd.py b/decoders/dcf77/pd.py
new file mode 100644
index 0000000..fc97a1d
--- /dev/null
+++ b/decoders/dcf77/pd.py
@@ -0,0 +1,317 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012-2014 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+import calendar
+
+# Return the specified BCD number (max. 8 bits) as integer.
+def bcd2int(b):
+ return (b & 0x0f) + ((b >> 4) * 10)
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'dcf77'
+ name = 'DCF77'
+ longname = 'DCF77 time protocol'
+ desc = 'European longwave time signal (77.5kHz carrier signal).'
+ license = 'gplv2+'
+ inputs = ['logic']
+ outputs = ['dcf77']
+ channels = (
+ {'id': 'data', 'name': 'DATA', 'desc': 'DATA line'},
+ )
+ annotations = (
+ ('start-of-minute', 'Start of minute'),
+ ('special-bits', 'Special bits (civil warnings, weather forecast)'),
+ ('call-bit', 'Call bit'),
+ ('summer-time', 'Summer time announcement'),
+ ('cest', 'CEST bit'),
+ ('cet', 'CET bit'),
+ ('leap-second', 'Leap second bit'),
+ ('start-of-time', 'Start of encoded time'),
+ ('minute', 'Minute'),
+ ('minute-parity', 'Minute parity bit'),
+ ('hour', 'Hour'),
+ ('hour-parity', 'Hour parity bit'),
+ ('day', 'Day of month'),
+ ('day-of-week', 'Day of week'),
+ ('month', 'Month'),
+ ('year', 'Year'),
+ ('date-parity', 'Date parity bit'),
+ ('raw-bits', 'Raw bits'),
+ ('unknown-bits', 'Unknown bits'),
+ ('warnings', 'Human-readable warnings'),
+ )
+ annotation_rows = (
+ ('bits', 'Bits', (17, 18)),
+ ('fields', 'Fields', tuple(range(0, 16 + 1))),
+ ('warnings', 'Warnings', (19,)),
+ )
+
+ def __init__(self, **kwargs):
+ self.samplerate = None
+ self.state = 'WAIT FOR RISING EDGE'
+ self.oldpins = None
+ self.oldval = None
+ self.samplenum = 0
+ self.ss_bit = self.ss_bit_old = self.es_bit = self.ss_block = 0
+ self.datebits = []
+ self.bitcount = 0 # Counter for the DCF77 bits (0..58)
+ self.dcf77_bitnumber_is_known = 0
+
+ def start(self):
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def metadata(self, key, value):
+ if key == srd.SRD_CONF_SAMPLERATE:
+ self.samplerate = value
+
+ def putx(self, data):
+ # Annotation for a single DCF77 bit.
+ self.put(self.ss_bit, self.es_bit, self.out_ann, data)
+
+ def putb(self, data):
+ # Annotation for a multi-bit DCF77 field.
+ self.put(self.ss_block, self.samplenum, self.out_ann, data)
+
+ # TODO: Which range to use? Only the 100ms/200ms or full second?
+ def handle_dcf77_bit(self, bit):
+ c = self.bitcount
+
+ # Create one annotation for each DCF77 bit (containing the 0/1 value).
+ # Use 'Unknown DCF77 bit x: val' if we're not sure yet which of the
+ # 0..58 bits it is (because we haven't seen a 'new minute' marker yet).
+ # Otherwise, use 'DCF77 bit x: val'.
+ s = 'B' if self.dcf77_bitnumber_is_known else 'Unknown b'
+ ann = 17 if self.dcf77_bitnumber_is_known else 18
+ self.putx([ann, ['%sit %d: %d' % (s, c, bit), '%d' % bit]])
+
+ # If we're not sure yet which of the 0..58 DCF77 bits we have, return.
+ # We don't want to decode bogus data.
+ if not self.dcf77_bitnumber_is_known:
+ return
+
+ # Collect bits 36-58, we'll need them for a parity check later.
+ if c in range(36, 58 + 1):
+ self.datebits.append(bit)
+
+ # Output specific "decoded" annotations for the respective DCF77 bits.
+ if c == 0:
+ # Start of minute: DCF bit 0.
+ if bit == 0:
+ self.putx([0, ['Start of minute (always 0)',
+ 'Start of minute', 'SoM']])
+ else:
+ self.putx([19, ['Start of minute != 0', 'SoM != 0']])
+ elif c in range(1, 14 + 1):
+ # Special bits (civil warnings, weather forecast): DCF77 bits 1-14.
+ if c == 1:
+ self.tmp = bit
+ self.ss_block = self.ss_bit
+ else:
+ self.tmp |= (bit << (c - 1))
+ if c == 14:
+ s = bin(self.tmp)[2:].zfill(14)
+ self.putb([1, ['Special bits: %s' % s, 'SB: %s' % s]])
+ elif c == 15:
+ s = '' if (bit == 1) else 'not '
+ self.putx([2, ['Call bit: %sset' % s, 'CB: %sset' % s]])
+ # TODO: Previously this bit indicated use of the backup antenna.
+ elif c == 16:
+ s = '' if (bit == 1) else 'not '
+ x = 'yes' if (bit == 1) else 'no'
+ self.putx([3, ['Summer time announcement: %sactive' % s,
+ 'Summer time: %sactive' % s,
+ 'Summer time: %s' % x, 'ST: %s' % x]])
+ elif c == 17:
+ s = '' if (bit == 1) else 'not '
+ x = 'yes' if (bit == 1) else 'no'
+ self.putx([4, ['CEST: %sin effect' % s, 'CEST: %s' % x]])
+ elif c == 18:
+ s = '' if (bit == 1) else 'not '
+ x = 'yes' if (bit == 1) else 'no'
+ self.putx([5, ['CET: %sin effect' % s, 'CET: %s' % x]])
+ elif c == 19:
+ s = '' if (bit == 1) else 'not '
+ x = 'yes' if (bit == 1) else 'no'
+ self.putx([6, ['Leap second announcement: %sactive' % s,
+ 'Leap second: %sactive' % s,
+ 'Leap second: %s' % x, 'LS: %s' % x]])
+ elif c == 20:
+ # Start of encoded time: DCF bit 20.
+ if bit == 1:
+ self.putx([7, ['Start of encoded time (always 1)',
+ 'Start of encoded time', 'SoeT']])
+ else:
+ self.putx([19, ['Start of encoded time != 1', 'SoeT != 1']])
+ elif c in range(21, 27 + 1):
+ # Minutes (0-59): DCF77 bits 21-27 (BCD format).
+ if c == 21:
+ self.tmp = bit
+ self.ss_block = self.ss_bit
+ else:
+ self.tmp |= (bit << (c - 21))
+ if c == 27:
+ m = bcd2int(self.tmp)
+ self.putb([8, ['Minutes: %d' % m, 'Min: %d' % m]])
+ elif c == 28:
+ # Even parity over minute bits (21-28): DCF77 bit 28.
+ self.tmp |= (bit << (c - 21))
+ parity = bin(self.tmp).count('1')
+ s = 'OK' if ((parity % 2) == 0) else 'INVALID!'
+ self.putx([9, ['Minute parity: %s' % s, 'Min parity: %s' % s]])
+ elif c in range(29, 34 + 1):
+ # Hours (0-23): DCF77 bits 29-34 (BCD format).
+ if c == 29:
+ self.tmp = bit
+ self.ss_block = self.ss_bit
+ else:
+ self.tmp |= (bit << (c - 29))
+ if c == 34:
+ self.putb([10, ['Hours: %d' % bcd2int(self.tmp)]])
+ elif c == 35:
+ # Even parity over hour bits (29-35): DCF77 bit 35.
+ self.tmp |= (bit << (c - 29))
+ parity = bin(self.tmp).count('1')
+ s = 'OK' if ((parity % 2) == 0) else 'INVALID!'
+ self.putx([11, ['Hour parity: %s' % s]])
+ elif c in range(36, 41 + 1):
+ # Day of month (1-31): DCF77 bits 36-41 (BCD format).
+ if c == 36:
+ self.tmp = bit
+ self.ss_block = self.ss_bit
+ else:
+ self.tmp |= (bit << (c - 36))
+ if c == 41:
+ self.putb([12, ['Day: %d' % bcd2int(self.tmp)]])
+ elif c in range(42, 44 + 1):
+ # Day of week (1-7): DCF77 bits 42-44 (BCD format).
+ # A value of 1 means Monday, 7 means Sunday.
+ if c == 42:
+ self.tmp = bit
+ self.ss_block = self.ss_bit
+ else:
+ self.tmp |= (bit << (c - 42))
+ if c == 44:
+ d = bcd2int(self.tmp)
+ dn = calendar.day_name[d - 1] # day_name[0] == Monday
+ self.putb([13, ['Day of week: %d (%s)' % (d, dn),
+ 'DoW: %d (%s)' % (d, dn)]])
+ elif c in range(45, 49 + 1):
+ # Month (1-12): DCF77 bits 45-49 (BCD format).
+ if c == 45:
+ self.tmp = bit
+ self.ss_block = self.ss_bit
+ else:
+ self.tmp |= (bit << (c - 45))
+ if c == 49:
+ m = bcd2int(self.tmp)
+ mn = calendar.month_name[m] # month_name[1] == January
+ self.putb([14, ['Month: %d (%s)' % (m, mn),
+ 'Mon: %d (%s)' % (m, mn)]])
+ elif c in range(50, 57 + 1):
+ # Year (0-99): DCF77 bits 50-57 (BCD format).
+ if c == 50:
+ self.tmp = bit
+ self.ss_block = self.ss_bit
+ else:
+ self.tmp |= (bit << (c - 50))
+ if c == 57:
+ self.putb([15, ['Year: %d' % bcd2int(self.tmp)]])
+ elif c == 58:
+ # Even parity over date bits (36-58): DCF77 bit 58.
+ parity = self.datebits.count(1)
+ s = 'OK' if ((parity % 2) == 0) else 'INVALID!'
+ self.putx([16, ['Date parity: %s' % s, 'DP: %s' %s]])
+ self.datebits = []
+ else:
+ raise Exception('Invalid DCF77 bit: %d' % c)
+
+ def decode(self, ss, es, data):
+ if self.samplerate is None:
+ raise Exception("Cannot decode without samplerate.")
+ for (self.samplenum, pins) in data:
+
+ # Ignore identical samples early on (for performance reasons).
+ if self.oldpins == pins:
+ continue
+ self.oldpins, (val,) = pins, pins
+
+ if self.state == 'WAIT FOR RISING EDGE':
+ # Wait until the next rising edge occurs.
+ if not (self.oldval == 0 and val == 1):
+ self.oldval = val
+ continue
+
+ # Save the sample number where the DCF77 bit begins.
+ self.ss_bit = self.samplenum
+
+ # Calculate the length (in ms) between two rising edges.
+ len_edges = self.ss_bit - self.ss_bit_old
+ len_edges_ms = int((len_edges / self.samplerate) * 1000)
+
+ # The time between two rising edges is usually around 1000ms.
+ # For DCF77 bit 59, there is no rising edge at all, i.e. the
+ # time between DCF77 bit 59 and DCF77 bit 0 (of the next
+ # minute) is around 2000ms. Thus, if we see an edge with a
+ # 2000ms distance to the last one, this edge marks the
+ # beginning of a new minute (and DCF77 bit 0 of that minute).
+ if len_edges_ms in range(1600, 2400 + 1):
+ self.bitcount = 0
+ self.ss_bit_old = self.ss_bit
+ self.dcf77_bitnumber_is_known = 1
+
+ self.ss_bit_old = self.ss_bit
+ self.state = 'GET BIT'
+
+ elif self.state == 'GET BIT':
+ # Wait until the next falling edge occurs.
+ if not (self.oldval == 1 and val == 0):
+ self.oldval = val
+ continue
+
+ # Save the sample number where the DCF77 bit ends.
+ self.es_bit = self.samplenum
+
+ # Calculate the length (in ms) of the current high period.
+ len_high = self.samplenum - self.ss_bit
+ len_high_ms = int((len_high / self.samplerate) * 1000)
+
+ # If the high signal was 100ms long, that encodes a 0 bit.
+ # If it was 200ms long, that encodes a 1 bit.
+ if len_high_ms in range(40, 160 + 1):
+ bit = 0
+ elif len_high_ms in range(161, 260 + 1):
+ bit = 1
+ else:
+ bit = -1 # TODO: Error?
+
+ # There's no bit 59, make sure none is decoded.
+ if bit in (0, 1) and self.bitcount in range(0, 58 + 1):
+ self.handle_dcf77_bit(bit)
+ self.bitcount += 1
+
+ self.state = 'WAIT FOR RISING EDGE'
+
+ else:
+ raise Exception('Invalid state: %s' % self.state)
+
+ self.oldval = val
+
diff --git a/decoders/ds1307/__init__.py b/decoders/ds1307/__init__.py
new file mode 100644
index 0000000..5bc28c3
--- /dev/null
+++ b/decoders/ds1307/__init__.py
@@ -0,0 +1,27 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2013 Matt Ranostay <mranostay at gmail.com>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+This decoder stacks on top of the 'i2c' PD and decodes the Dallas DS1307
+real-time clock (RTC) specific registers and commands.
+'''
+
+from .pd import *
+
diff --git a/decoders/ds1307/pd.py b/decoders/ds1307/pd.py
new file mode 100644
index 0000000..68943d4
--- /dev/null
+++ b/decoders/ds1307/pd.py
@@ -0,0 +1,169 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+## Copyright (C) 2013 Matt Ranostay <mranostay at gmail.com>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+
+days_of_week = [
+ 'Sunday',
+ 'Monday',
+ 'Tuesday',
+ 'Wednesday',
+ 'Thursday',
+ 'Friday',
+ 'Saturday',
+]
+
+# Return the specified BCD number (max. 8 bits) as integer.
+def bcd2int(b):
+ return (b & 0x0f) + ((b >> 4) * 10)
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'ds1307'
+ name = 'DS1307'
+ longname = 'Dallas DS1307'
+ desc = 'Realtime clock module protocol.'
+ license = 'gplv2+'
+ inputs = ['i2c']
+ outputs = ['ds1307']
+ annotations = (
+ ('text', 'Human-readable text'),
+ )
+
+ def __init__(self, **kwargs):
+ self.state = 'IDLE'
+ self.hours = -1
+ self.minutes = -1
+ self.seconds = -1
+ self.days = -1
+ self.date = -1
+ self.months = -1
+ self.years = -1
+
+ def start(self):
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def putx(self, data):
+ self.put(self.ss, self.es, self.out_ann, data)
+
+ def handle_reg_0x00(self, b): # Seconds
+ self.seconds = bcd2int(b & 0x7f)
+ self.putx([0, ['Seconds: %d' % self.seconds]])
+
+ def handle_reg_0x01(self, b): # Minutes
+ self.minutes = bcd2int(b & 0x7f)
+ self.putx([0, ['Minutes: %d' % self.minutes]])
+
+ def handle_reg_0x02(self, b): # Hours
+ self.hours = bcd2int(b & 0x3f)
+ self.putx([0, ['Hours: %d' % self.hours]])
+
+ def handle_reg_0x03(self, b): # Day of week
+ self.days = bcd2int(b & 0x7)
+ self.putx([0, ['Day of Week: %s' % days_of_week[self.days - 1]]])
+
+ def handle_reg_0x04(self, b): # Date
+ self.date = bcd2int(b & 0x3f)
+ self.putx([0, ['Days: %d' % self.date]])
+
+ def handle_reg_0x05(self, b): # Month
+ self.months = bcd2int(b & 0x1f)
+ self.putx([0, ['Months: %d' % self.months]])
+
+ def handle_reg_0x06(self, b): # Year
+ self.years = bcd2int(b & 0xff) + 2000;
+ self.putx([0, ['Years: %d' % self.years]])
+
+ def handle_reg_0x07(self, b): # Control Register
+ pass
+
+ def decode(self, ss, es, data):
+ cmd, databyte = data
+
+ # Store the start/end samples of this I²C packet.
+ self.ss, self.es = ss, es
+
+ # State machine.
+ if self.state == 'IDLE':
+ # Wait for an I²C START condition.
+ if cmd != 'START':
+ return
+ self.state = 'GET SLAVE ADDR'
+ self.block_start_sample = ss
+ elif self.state == 'GET SLAVE ADDR':
+ # Wait for an address write operation.
+ # TODO: We should only handle packets to the RTC slave (0x68).
+ if cmd != 'ADDRESS WRITE':
+ return
+ self.state = 'GET REG ADDR'
+ elif self.state == 'GET REG ADDR':
+ # Wait for a data write (master selects the slave register).
+ if cmd != 'DATA WRITE':
+ return
+ self.reg = databyte
+ self.state = 'WRITE RTC REGS'
+ elif self.state == 'WRITE RTC REGS':
+ # If we see a Repeated Start here, it's probably an RTC read.
+ if cmd == 'START REPEAT':
+ self.state = 'READ RTC REGS'
+ return
+ # Otherwise: Get data bytes until a STOP condition occurs.
+ if cmd == 'DATA WRITE':
+ handle_reg = getattr(self, 'handle_reg_0x%02x' % self.reg)
+ handle_reg(databyte)
+ self.reg += 1
+ # TODO: Check for NACK!
+ elif cmd == 'STOP':
+ # TODO: Handle read/write of only parts of these items.
+ d = '%s, %02d.%02d.%02d %02d:%02d:%02d' % (
+ days_of_week[self.days - 1], self.date, self.months,
+ self.years, self.hours, self.minutes, self.seconds)
+ self.put(self.block_start_sample, es, self.out_ann,
+ [0, ['Written date/time: %s' % d]])
+ self.state = 'IDLE'
+ else:
+ pass # TODO
+ elif self.state == 'READ RTC REGS':
+ # Wait for an address read operation.
+ # TODO: We should only handle packets to the RTC slave (0x68).
+ if cmd == 'ADDRESS READ':
+ self.state = 'READ RTC REGS2'
+ return
+ else:
+ pass # TODO
+ elif self.state == 'READ RTC REGS2':
+ if cmd == 'DATA READ':
+ handle_reg = getattr(self, 'handle_reg_0x%02x' % self.reg)
+ handle_reg(databyte)
+ self.reg += 1
+ # TODO: Check for NACK!
+ elif cmd == 'STOP':
+ d = '%s, %02d.%02d.%02d %02d:%02d:%02d' % (
+ days_of_week[self.days - 1], self.date, self.months,
+ self.years, self.hours, self.minutes, self.seconds)
+ self.put(self.block_start_sample, es, self.out_ann,
+ [0, ['Read date/time: %s' % d]])
+ self.state = 'IDLE'
+ else:
+ pass # TODO?
+ else:
+ raise Exception('Invalid state: %s' % self.state)
+
diff --git a/decoders/edid/__init__.py b/decoders/edid/__init__.py
new file mode 100644
index 0000000..8683006
--- /dev/null
+++ b/decoders/edid/__init__.py
@@ -0,0 +1,40 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Bert Vermeulen <bert at biot.com>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+EDID 1.3 structure decoder.
+
+The three-character vendor ID as specified in the EDID standard refers to
+a Plug and Play ID (PNPID). The list of PNPID assignments is done by Microsoft.
+More information is available on this page:
+
+ http://msdn.microsoft.com/en-us/windows/hardware/gg463195
+
+The 'pnpids.txt' file included with this protocol decoder is derived from
+the list of assignments downloadable from that page. It was retrieved in
+January 2012.
+
+More information on EDID is available here:
+
+ https://en.wikipedia.org/wiki/Extended_display_identification_data
+'''
+
+from .pd import *
+
diff --git a/decoders/edid/pd.py b/decoders/edid/pd.py
new file mode 100644
index 0000000..8af10ae
--- /dev/null
+++ b/decoders/edid/pd.py
@@ -0,0 +1,468 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Bert Vermeulen <bert at biot.com>
+##
+## 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 <http://www.gnu.org/licenses/>.
+##
+
+# TODO:
+# - EDID < 1.3
+# - add short annotations
+# - Signal level standard field in basic display parameters block
+# - Additional color point descriptors
+# - Additional standard timing descriptors
+# - Extensions
+
+import sigrokdecode as srd
+import os
+
+EDID_HEADER = [0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00]
+OFF_VENDOR = 8
+OFF_VERSION = 18
+OFF_BASIC = 20
+OFF_CHROM = 25
+OFF_EST_TIMING = 35
+OFF_STD_TIMING = 38
+OFF_DET_TIMING = 54
+OFF_NUM_EXT = 126
+OFF_CHECKSUM = 127
+
+# Pre-EDID established timing modes
+est_modes = [
+ '720x400 at 70Hz',
+ '720x400 at 88Hz',
+ '640x480 at 60Hz',
+ '640x480 at 67Hz',
+ '640x480 at 72Hz',
+ '640x480 at 75Hz',
+ '800x600 at 56Hz',
+ '800x600 at 60Hz',
+ '800x600 at 72Hz',
+ '800x600 at 75Hz',
+ '832x624 at 75Hz',
+ '1024x768 at 87Hz(i)',
+ '1024x768 at 60Hz',
+ '1024x768 at 70Hz',
+ '1024x768 at 75Hz',
+ '1280x1024 at 75Hz',
+ '1152x870 at 75Hz',
+]
+
+# X:Y display aspect ratios, as used in standard timing modes
+xy_ratio = [
+ (16, 10),
+ (4, 3),
+ (5, 4),
+ (16, 9),
+]
+
+# Annotation classes
+ANN_FIELDS = 0
+ANN_SECTIONS = 1
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'edid'
+ name = 'EDID'
+ longname = 'Extended Display Identification Data'
+ desc = 'Data structure describing display device capabilities.'
+ license = 'gplv3+'
+ inputs = ['i2c']
+ outputs = ['edid']
+ annotations = (
+ ('fields', 'EDID structure fields'),
+ ('sections', 'EDID structure sections'),
+ )
+
+ def __init__(self, **kwargs):
+ self.state = None
+ # Received data items, used as an index into samplenum/data
+ self.cnt = 0
+ # Start/end sample numbers per data item
+ self.sn = []
+ # Received data
+ self.cache = []
+
+ def start(self):
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def decode(self, ss, es, data):
+ cmd, data = data
+
+ # We only care about actual data bytes that are read (for now).
+ if cmd != 'DATA READ':
+ return
+
+ self.cnt += 1
+ self.sn.append([ss, es])
+ self.cache.append(data)
+ # debug
+# self.put(ss, es, self.out_ann, [0, ['%d: [%.2x]' % (self.cnt, data)]])
+
+ if self.state is None:
+ # Wait for the EDID header
+ if self.cnt >= OFF_VENDOR:
+ if self.cache[-8:] == EDID_HEADER:
+ # Throw away any garbage before the header
+ self.sn = self.sn[-8:]
+ self.cache = self.cache[-8:]
+ self.cnt = 8
+ self.state = 'edid'
+ self.put(ss, es, self.out_ann, [0, ['EDID header']])
+ elif self.state == 'edid':
+ if self.cnt == OFF_VERSION:
+ self.decode_vid(-10)
+ self.decode_pid(-8)
+ self.decode_serial(-6)
+ self.decode_mfrdate(-2)
+ elif self.cnt == OFF_BASIC:
+ version = 'EDID version: %d.%d' % (self.cache[-2], self.cache[-1])
+ self.put(ss, es, self.out_ann, [0, [version]])
+ elif self.cnt == OFF_CHROM:
+ self.decode_basicdisplay(-5)
+ elif self.cnt == OFF_EST_TIMING:
+ self.decode_chromaticity(-10)
+ elif self.cnt == OFF_STD_TIMING:
+ self.decode_est_timing(-3)
+ elif self.cnt == OFF_DET_TIMING:
+ self.decode_std_timing(-16)
+ elif self.cnt == OFF_NUM_EXT:
+ self.decode_descriptors(-72)
+ elif self.cnt == OFF_CHECKSUM:
+ self.put(ss, es, self.out_ann,
+ [0, ['Extensions present: %d' % self.cache[self.cnt-1]]])
+ elif self.cnt == OFF_CHECKSUM+1:
+ checksum = 0
+ for i in range(128):
+ checksum += self.cache[i]
+ if checksum % 256 == 0:
+ csstr = 'OK'
+ else:
+ csstr = 'WRONG!'
+ self.put(ss, es, self.out_ann, [0, ['Checksum: %d (%s)' % (
+ self.cache[self.cnt-1], csstr)]])
+ self.state = 'extensions'
+ elif self.state == 'extensions':
+ pass
+
+ def ann_field(self, start, end, annotation):
+ self.put(self.sn[start][0], self.sn[end][1],
+ self.out_ann, [ANN_FIELDS, [annotation]])
+
+ def lookup_pnpid(self, pnpid):
+ pnpid_file = os.path.join(os.path.dirname(__file__), 'pnpids.txt')
+ if os.path.exists(pnpid_file):
+ for line in open(pnpid_file).readlines():
+ if line.find(pnpid + ';') == 0:
+ return line[4:].strip()
+ return ''
+
+ def decode_vid(self, offset):
+ pnpid = chr(64 + ((self.cache[offset] & 0x7c) >> 2))
+ pnpid += chr(64 + (((self.cache[offset] & 0x03) << 3)
+ | ((self.cache[offset+1] & 0xe0) >> 5)))
+ pnpid += chr(64 + (self.cache[offset+1] & 0x1f))
+ vendor = self.lookup_pnpid(pnpid)
+ if vendor:
+ pnpid += ' (%s)' % vendor
+ self.ann_field(offset, offset+1, pnpid)
+
+ def decode_pid(self, offset):
+ pidstr = 'Product 0x%.2x%.2x' % (self.cache[offset+1], self.cache[offset])
+ self.ann_field(offset, offset+1, pidstr)
+
+ def decode_serial(self, offset):
+ serialnum = (self.cache[offset+3] << 24) \
+ + (self.cache[offset+2] << 16) \
+ + (self.cache[offset+1] << 8) \
+ + self.cache[offset]
+ serialstr = ''
+ is_alnum = True
+ for i in range(4):
+ if not chr(self.cache[offset+3-i]).isalnum():
+ is_alnum = False
+ break
+ serialstr += chr(self.cache[offset+3-i])
+ serial = serialstr if is_alnum else str(serialnum)
+ self.ann_field(offset, offset+3, 'Serial ' + serial)
+
+ def decode_mfrdate(self, offset):
+ datestr = ''
+ if self.cache[offset]:
+ datestr += 'week %d, ' % self.cache[offset]
+ datestr += str(1990 + self.cache[offset+1])
+ if datestr:
+ self.ann_field(offset, offset+1, 'Manufactured ' + datestr)
+
+ def decode_basicdisplay(self, offset):
+ # Video input definition
+ vid = self.cache[offset]
+ if vid & 0x80:
+ # Digital
+ self.ann_field(offset, offset, 'Video input: VESA DFP 1.')
+ else:
+ # Analog
+ sls = (vid & 60) >> 5
+ self.ann_field(offset, offset, 'Signal level standard: %.2x' % sls)
+ if vid & 0x10:
+ self.ann_field(offset, offset, 'Blank-to-black setup expected')
+ syncs = ''
+ if vid & 0x08:
+ syncs += 'separate syncs, '
+ if vid & 0x04:
+ syncs += 'composite syncs, '
+ if vid & 0x02:
+ syncs += 'sync on green, '
+ if vid & 0x01:
+ syncs += 'Vsync serration required, '
+ if syncs:
+ self.ann_field(offset, offset, 'Supported syncs: %s' % syncs[:-2])
+ # Max horizontal/vertical image size
+ if self.cache[offset+1] != 0 and self.cache[offset+2] != 0:
+ # Projectors have this set to 0
+ sizestr = '%dx%dcm' % (self.cache[offset+1], self.cache[offset+2])
+ self.ann_field(offset+1, offset+2, 'Physical size: ' + sizestr)
+ # Display transfer characteristic (gamma)
+ if self.cache[offset+3] != 0xff:
+ gamma = (self.cache[offset+3] + 100) / 100
+ self.ann_field(offset+3, offset+3, 'Gamma: %1.2f' % gamma)
+ # Feature support
+ fs = self.cache[offset+4]
+ dpms = ''
+ if fs & 0x80:
+ dpms += 'standby, '
+ if fs & 0x40:
+ dpms += 'suspend, '
+ if fs & 0x20:
+ dpms += 'active off, '
+ if dpms:
+ self.ann_field(offset+4, offset+4, 'DPMS support: %s' % dpms[:-2])
+ dt = (fs & 0x18) >> 3
+ dtstr = ''
+ if dt == 0:
+ dtstr = 'Monochrome'
+ elif dt == 1:
+ dtstr = 'RGB color'
+ elif dt == 2:
+ dtstr = 'non-RGB multicolor'
+ if dtstr:
+ self.ann_field(offset+4, offset+4, 'Display type: %s' % dtstr)
+ if fs & 0x04:
+ self.ann_field(offset+4, offset+4, 'Color space: standard sRGB')
+ # Save this for when we decode the first detailed timing descriptor
+ self.have_preferred_timing = (fs & 0x02) == 0x02
+ if fs & 0x01:
+ gft = ''
+ else:
+ gft = 'not '
+ self.ann_field(offset+4, offset+4,
+ 'Generalized timing formula: %ssupported' % gft)
+
+ def convert_color(self, value):
+ # Convert from 10-bit packet format to float
+ outval = 0.0
+ for i in range(10):
+ if value & 0x01:
+ outval += 2 ** -(10-i)
+ value >>= 1
+ return outval
+
+ def decode_chromaticity(self, offset):
+ redx = (self.cache[offset+2] << 2) + ((self.cache[offset] & 0xc0) >> 6)
+ redy = (self.cache[offset+3] << 2) + ((self.cache[offset] & 0x30) >> 4)
+ self.ann_field(offset, offset+9, 'Chromacity red: X %1.3f, Y %1.3f' % (
+ self.convert_color(redx), self.convert_color(redy)))
+
+ greenx = (self.cache[offset+4] << 2) + ((self.cache[offset] & 0x0c) >> 6)
+ greeny = (self.cache[offset+5] << 2) + ((self.cache[offset] & 0x03) >> 4)
+ self.ann_field(offset, offset+9, 'Chromacity green: X %1.3f, Y %1.3f' % (
+ self.convert_color(greenx), self.convert_color(greeny)))
+
+ bluex = (self.cache[offset+6] << 2) + ((self.cache[offset+1] & 0xc0) >> 6)
+ bluey = (self.cache[offset+7] << 2) + ((self.cache[offset+1] & 0x30) >> 4)
+ self.ann_field(offset, offset+9, 'Chromacity blue: X %1.3f, Y %1.3f' % (
+ self.convert_color(bluex), self.convert_color(bluey)))
+
+ whitex = (self.cache[offset+8] << 2) + ((self.cache[offset+1] & 0x0c) >> 6)
+ whitey = (self.cache[offset+9] << 2) + ((self.cache[offset+1] & 0x03) >> 4)
+ self.ann_field(offset, offset+9, 'Chromacity white: X %1.3f, Y %1.3f' % (
+ self.convert_color(whitex), self.convert_color(whitey)))
+
+ def decode_est_timing(self, offset):
+ # Pre-EDID modes
+ bitmap = (self.cache[offset] << 9) \
+ + (self.cache[offset+1] << 1) \
+ + ((self.cache[offset+2] & 0x80) >> 7)
+ modestr = ''
+ for i in range(17):
+ if bitmap & (1 << (16-i)):
+ modestr += est_modes[i] + ', '
+ if modestr:
+ self.ann_field(offset, offset+2,
+ 'Supported establised modes: %s' % modestr[:-2])
+
+ def decode_std_timing(self, offset):
+ modestr = ''
+ for i in range(0, 16, 2):
+ if self.cache[offset+i] == 0x01 and self.cache[offset+i+1] == 0x01:
+ # Unused field
+ continue
+ x = (self.cache[offset+i] + 31) * 8
+ ratio = (self.cache[offset+i+1] & 0xc0) >> 6
+ ratio_x, ratio_y = xy_ratio[ratio]
+ y = x / ratio_x * ratio_y
+ refresh = (self.cache[offset+i+1] & 0x3f) + 60
+ modestr += '%dx%d@%dHz, ' % (x, y, refresh)
+ if modestr:
+ self.ann_field(offset, offset+2,
+ 'Supported standard modes: %s' % modestr[:-2])
+
+ def decode_detailed_timing(self, offset):
+ if offset == -72 and self.have_preferred_timing:
+ # Only on first detailed timing descriptor
+ section = 'Preferred'
+ else:
+ section = 'Detailed'
+ section += ' timing descriptor'
+ self.put(self.sn[offset][0], self.sn[offset+18][1],
+ self.out_ann, [ANN_SECTIONS, [section]])
+
+ pixclock = float((self.cache[offset+1] << 8) + self.cache[offset]) / 100
+ self.ann_field(offset, offset+1, 'Pixel clock: %.2f MHz' % pixclock)
+
+ horiz_active = ((self.cache[offset+4] & 0xf0) << 4) + self.cache[offset+2]
+ self.ann_field(offset+2, offset+4, 'Horizontal active: %d' % horiz_active)
+
+ horiz_blank = ((self.cache[offset+4] & 0x0f) << 8) + self.cache[offset+3]
+ self.ann_field(offset+3, offset+4, 'Horizontal blanking: %d' % horiz_blank)
+
+ vert_active = ((self.cache[offset+7] & 0xf0) << 4) + self.cache[offset+5]
+ self.ann_field(offset+5, offset+7, 'Vertical active: %d' % vert_active)
+
+ vert_blank = ((self.cache[offset+7] & 0x0f) << 8) + self.cache[offset+6]
+ self.ann_field(offset+6, offset+7, 'Vertical blanking: %d' % vert_blank)
+
+ horiz_sync_off = ((self.cache[offset+11] & 0xc0) << 2) + self.cache[offset+8]
+ self.ann_field(offset+8, offset+11, 'Horizontal sync offset: %d' % horiz_sync_off)
+
+ horiz_sync_pw = ((self.cache[offset+11] & 0x30) << 4) + self.cache[offset+9]
+ self.ann_field(offset+9, offset+11, 'Horizontal sync pulse width: %d' % horiz_sync_pw)
+
+ vert_sync_off = ((self.cache[offset+11] & 0x0c) << 2) \
+ + ((self.cache[offset+10] & 0xf0) >> 4)
+ self.ann_field(offset+10, offset+11, 'Vertical sync offset: %d' % vert_sync_off)
+
+ vert_sync_pw = ((self.cache[offset+11] & 0x03) << 4) \
+ + (self.cache[offset+10] & 0x0f)
+ self.ann_field(offset+10, offset+11, 'Vertical sync pulse width: %d' % vert_sync_pw)
+
+ horiz_size = ((self.cache[offset+14] & 0xf0) << 4) + self.cache[offset+12]
+ vert_size = ((self.cache[offset+14] & 0x0f) << 8) + self.cache[offset+13]
+ self.ann_field(offset+12, offset+14, 'Physical size: %dx%dmm' % (horiz_size, vert_size))
+
+ horiz_border = self.cache[offset+15]
+ if horiz_border:
+ self.ann_field(offset+15, offset+15, 'Horizontal border: %d pixels' % horiz_border)
+ vert_border = self.cache[offset+16]
+ if vert_border:
+ self.ann_field(offset+16, offset+16, 'Vertical border: %d lines' % vert_border)
+
+ features = 'Flags: '
+ if self.cache[offset+17] & 0x80:
+ features += 'interlaced, '
+ stereo = (self.cache[offset+17] & 0x60) >> 5
+ if stereo:
+ if self.cache[offset+17] & 0x01:
+ features += '2-way interleaved stereo ('
+ features += ['right image on even lines',
+ 'left image on even lines',
+ 'side-by-side'][stereo-1]
+ features += '), '
+ else:
+ features += 'field sequential stereo ('
+ features += ['right image on sync=1', 'left image on sync=1',
+ '4-way interleaved'][stereo-1]
+ features += '), '
+ sync = (self.cache[offset+17] & 0x18) >> 3
+ sync2 = (self.cache[offset+17] & 0x06) >> 1
+ posneg = ['negative', 'positive']
+ features += 'sync type '
+ if sync == 0x00:
+ features += 'analog composite (serrate on RGB)'
+ elif sync == 0x01:
+ features += 'bipolar analog composite (serrate on RGB)'
+ elif sync == 0x02:
+ features += 'digital composite (serrate on composite polarity ' \
+ + (posneg[sync2 & 0x01]) + ')'
+ elif sync == 0x03:
+ features += 'digital separate ('
+ features += 'Vsync polarity ' + (posneg[(sync2 & 0x02) >> 1])
+ features += ', Hsync polarity ' + (posneg[sync2 & 0x01])
+ features += ')'
+ features += ', '
+ self.ann_field(offset+17, offset+17, features[:-2])
+
+ def decode_descriptor(self, offset):
+ tag = self.cache[offset+3]
+ if tag == 0xff:
+ # Monitor serial number
+ text = bytes(self.cache[offset+5:][:13]).decode(encoding='cp437', errors='replace')
+ self.ann_field(offset, offset+17, 'Serial number: %s' % text.strip())
+ elif tag == 0xfe:
+ # Text
+ text = bytes(self.cache[offset+5:][:13]).decode(encoding='cp437', errors='replace')
+ self.ann_field(offset, offset+17, 'Info: %s' % text.strip())
+ elif tag == 0xfc:
+ # Monitor name
+ text = bytes(self.cache[offset+5:][:13]).decode(encoding='cp437', errors='replace')
+ self.ann_field(offset, offset+17, 'Model name: %s' % text.strip())
+ elif tag == 0xfd:
+ # Monitor range limits
+ self.put(self.sn[offset][0], self.sn[offset+17][1], self.out_ann,
+ [ANN_SECTIONS, ['Monitor range limits']])
+ self.ann_field(offset+5, offset+5, 'Minimum vertical rate: %dHz' %
+ self.cache[offset+5])
+ self.ann_field(offset+6, offset+6, 'Maximum vertical rate: %dHz' %
+ self.cache[offset+6])
+ self.ann_field(offset+7, offset+7, 'Minimum horizontal rate: %dkHz' %
+ self.cache[offset+7])
+ self.ann_field(offset+8, offset+8, 'Maximum horizontal rate: %dkHz' %
+ self.cache[offset+8])
+ self.ann_field(offset+9, offset+9, 'Maximum pixel clock: %dMHz' %
+ (self.cache[offset+9] * 10))
+ if self.cache[offset+10] == 0x02:
+ # Secondary GTF curve supported
+ self.ann_field(offset+10, offset+17, 'Secondary timing formula supported')
+ elif tag == 0xfb:
+ # Additional color point data
+ self.put(self.sn[offset][0], self.sn[offset+17][1], self.out_ann,
+ [ANN_SECTIONS, ['Additional color point data']])
+ elif tag == 0xfa:
+ # Additional standard timing definitions
+ self.put(self.sn[offset][0], self.sn[offset+17][1], self.out_ann,
+ [ANN_SECTIONS, ['Additional standard timing definitions']])
+ else:
+ self.put(self.sn[offset][0], self.sn[offset+17][1], self.out_ann,
+ [ANN_SECTIONS, ['Unknown descriptor']])
+
+ def decode_descriptors(self, offset):
+ # 4 consecutive 18-byte descriptor blocks
+ for i in range(offset, 0, 18):
+ if self.cache[i] != 0 and self.cache[i+1] != 0:
+ self.decode_detailed_timing(i)
+ else:
+ if self.cache[i+2] == 0 or self.cache[i+4] == 0:
+ self.decode_descriptor(i)
+
diff --git a/decoders/edid/pnpids.txt b/decoders/edid/pnpids.txt
new file mode 100644
index 0000000..1ced20c
--- /dev/null
+++ b/decoders/edid/pnpids.txt
@@ -0,0 +1,2135 @@
+AAE;Anatek Electronics Inc.
+AAT;Ann Arbor Technologies
+ABA;ABBAHOME INC.
+ABC;AboCom System Inc
+ABD;Allen Bradley Company
+ABE;Alcatel Bell
+ABO;Alcatel Bell
+ABT;Anchor Bay Technologies, Inc.
+ABV;Advanced Research Technology
+ACA;Ariel Corporation
+ACB;Aculab Ltd
+ACC;Accton Technology Corporation
+ACD;AWETA BV
+ACE;Actek Engineering Pty Ltd
+ACG;A&R Cambridge Ltd
+ACH;Archtek Telecom Corporation
+ACI;Ancor Communications Inc
+ACK;Acksys
+ACL;Apricot Computers
+ACM;Acroloop Motion Control Systems Inc
+ACO;Allion Computer Inc.
+ACP;Aspen Tech Inc
+ACR;Acer Technologies
+ACS;Altos Computer Systems
+ACT;Applied Creative Technology
+ACU;Acculogic
+ACV;ActivCard S.A
+ADA;Addi-Data GmbH
+ADB;Aldebbaron
+ADC;Acnhor Datacomm
+ADD;Advanced Peripheral Devices Inc
+ADE;Arithmos, Inc.
+ADH;Aerodata Holdings Ltd
+ADI;ADI Systems Inc
+ADK;Adtek System Science Company Ltd
+ADL;ASTRA Security Products Ltd
+ADM;Ad Lib MultiMedia Inc
+ADN;Analog & Digital Devices Tel. Inc
+ADP;Adaptec Inc
+ADR;Nasa Ames Research Center
+ADS;Analog Devices Inc
+ADT;Adtek
+ADT;Aved Display Technologies
+ADV;Advanced Micro Devices Inc
+ADX;Adax Inc
+AEC;Antex Electronics Corporation
+AED;Advanced Electronic Designs, Inc.
+AEI;Actiontec Electric Inc
+AEJ;Alpha Electronics Company
+AEM;ASEM S.p.A.
+AEP;Aetas Peripheral International
+AET;Aethra Telecomunicazioni S.r.l.
+AFA;Alfa Inc
+AGC;Beijing Aerospace Golden Card Electronic Engineering Co.,Ltd.
+AGI;Artish Graphics Inc
+AGL;Argolis
+AGM;Advan Int'l Corporation
+AGT;Agilent Technologies
+AHC;Advantech Co., Ltd.
+AIC;Arnos Insturments & Computer Systems
+AIE;Altmann Industrieelektronik
+AII;Amptron International Inc.
+AIL;Altos India Ltd
+AIM;AIMS Lab Inc
+AIR;Advanced Integ. Research Inc
+AIS;Alien Internet Services
+AIW;Aiwa Company Ltd
+AIX;ALTINEX, INC.
+AJA;AJA Video Systems, Inc.
+AKB;Akebia Ltd
+AKE;AKAMI Electric Co.,Ltd
+AKI;AKIA Corporation
+AKL;AMiT Ltd
+AKM;Asahi Kasei Microsystems Company Ltd
+AKP;Atom Komplex Prylad
+AKY;Askey Computer Corporation
+ALA;Alacron Inc
+ALC;Altec Corporation
+ALD;In4S Inc
+ALG;Realtek Semiconductor Corp.
+ALH;AL Systems
+ALI;Acer Labs
+ALJ;Altec Lansing
+ALK;Acrolink Inc
+ALL;Alliance Semiconductor Corporation
+ALM;Acutec Ltd.
+ALN;Alana Technologies
+ALO;Algolith Inc.
+ALP;Alps Electric Company Ltd
+ALR;Advanced Logic
+ALS;Avance Logic Inc
+ALS;Texas Advanced optoelectronics Solutions, Inc
+ALT;Altra
+ALV;AlphaView LCD
+ALX;ALEXON Co.,Ltd.
+AMA;Asia Microelectronic Development Inc
+AMB;Ambient Technologies, Inc.
+AMC;Attachmate Corporation
+AMD;Amdek Corporation
+AMI;American Megatrends Inc
+AML;Anderson Multimedia Communications (HK) Limited
+AMN;Amimon LTD.
+AMP;AMP Inc
+AMT;AMT International Industry
+AMX;AMX LLC
+ANA;Anakron
+ANC;Ancot
+AND;Adtran Inc
+ANI;Anigma Inc
+ANK;Anko Electronic Company Ltd
+ANL;Analogix Semiconductor, Inc
+ANO;Anorad Corporation
+ANP;Andrew Network Production
+ANR;ANR Ltd
+ANS;Ansel Communication Company
+ANT;Ace CAD Enterprise Company Ltd
+ANX;Acer Netxus Inc
+AOA;AOpen Inc.
+AOE;Advanced Optics Electronics, Inc.
+AOL;America OnLine
+AOT;Alcatel
+APC;American Power Conversion
+APD;AppliAdata
+APG;Horner Electric Inc
+API;A Plus Info Corporation
+APL;Aplicom Oy
+APM;Applied Memory Tech
+APN;Appian Tech Inc
+APP;Apple Computer Inc
+APR;Aprilia s.p.a.
+APS;Autologic Inc
+APT;Audio Processing Technology Ltd
+APV;A+V Link
+APX;AP Designs Ltd
+ARC;Alta Research Corporation
+ARE;ICET S.p.A.
+ARG;Argus Electronics Co., LTD
+ARI;Argosy Research Inc
+ARK;Ark Logic Inc
+ARL;Arlotto Comnet Inc
+ARM;Arima
+ARO;Poso International B.V.
+ARS;Arescom Inc
+ART;Corion Industrial Corporation
+ASC;Ascom Strategic Technology Unit
+ASD;USC Information Sciences Institute
+ASE;AseV Display Labs
+ASI;Ahead Systems
+ASK;Ask A/S
+ASL;AccuScene Corporation Ltd
+ASM;ASEM S.p.A.
+ASN;Asante Tech Inc
+ASP;ASP Microelectronics Ltd
+AST;AST Research Inc
+ASU;Asuscom Network Inc
+ASX;AudioScience
+ASY;Rockwell Collins / Airshow Systems
+ATA;Allied Telesyn International (Asia) Pte Ltd
+ATC;Ably-Tech Corporation
+ATD;Alpha Telecom Inc
+ATE;Innovate Ltd
+ATH;Athena Informatica S.R.L.
+ATI;Allied Telesis KK
+ATK;Allied Telesyn Int'l
+ATL;Arcus Technology Ltd
+ATM;ATM Ltd
+ATN;Athena Smartcard Solutions Ltd.
+ATO;ASTRO DESIGN, INC.
+ATP;Alpha-Top Corporation
+ATT;AT&T
+ATV;Office Depot, Inc.
+ATX;Athenix Corporation
+AUI;Alps Electric Inc
+AUO;DO NOT USE - AUO
+AUR;Aureal Semiconductor
+AUT;Autotime Corporation
+AVA;Avaya Communication
+AVC;Auravision Corporation
+AVD;Avid Electronics Corporation
+AVE;Add Value Enterpises (Asia) Pte Ltd
+AVI;Nippon Avionics Co.,Ltd
+AVM;AVM GmbH
+AVN ;Advance Computer Corporation
+AVO;Avocent Corporation
+AVR;AVerMedia Information, Inc.
+AVT;Avtek (Electronics) Pty Ltd
+AVV;SBS Technologies (Canada), Inc. (was Avvida Systems, Inc.)
+AWC;Access Works Comm Inc
+AWL;Aironet Wireless Communications, Inc
+AWS;Wave Systems
+AXB;Adrienne Electronics Corporation
+AXC;AXIOMTEK CO., LTD.
+AXE;D-Link Systems Inc (used as 2nd pnpid)
+AXI;American Magnetics
+AXL;Axel
+AXP;American Express
+AXT;Axtend Technologies Inc
+AXX;Axxon Computer Corporation
+AXY;AXYZ Automation Services, Inc
+AYD;Aydin Displays
+AYR;Airlib, Inc
+AZM;AZ Middelheim - Radiotherapy
+AZT;Aztech Systems Ltd
+BAC;Biometric Access Corporation
+BAN;Banyan
+BBB;an-najah university
+BBH;B&Bh
+BBL;Brain Boxes Limited
+BCC;Beaver Computer Corporaton
+BCD;Dr. Seufert GmbH
+BCM;Broadcom
+BCQ;Deutsche Telekom Berkom GmbH
+BCS;Booria CAD/CAM systems
+BDO;Brahler ICS
+BDR;Blonder Tongue Labs, Inc.
+BDS;Barco Display Systems
+BEC;Elektro Beckhoff GmbH
+BEI;Beckworth Enterprises Inc
+BEK;Beko Elektronik A.S.
+BEL;Beltronic Industrieelektronik GmbH
+BEO;Baug & Olufsen
+BFE;B.F. Engineering Corporation
+BGB;Barco Graphics N.V
+BGT;Budzetron Inc
+BHZ;BitHeadz, Inc.
+BIC;Big Island Communications
+BII;Boeckeler Instruments Inc
+BIL;Billion Electric Company Ltd
+BIO;BioLink Technologies International, Inc.
+BIT;Bit 3 Computer
+BLI;Busicom
+BLN;BioLink Technologies
+BLP;Bloomberg L.P.
+BMI;Benson Medical Instruments Company
+BML;BIOMED Lab
+BMS;BIOMEDISYS
+BNE;Bull AB
+BNK;Banksia Tech Pty Ltd
+BNO;Bang & Olufsen
+BNS;Boulder Nonlinear Systems
+BOB;Rainy Orchard
+BOE;BOE
+BOI;NINGBO BOIGLE DIGITAL TECHNOLOGY CO.,LTD
+BOS;BOS
+BPD;Micro Solutions, Inc.
+BPU;Best Power
+BRA;Braemac Pty Ltd
+BRC;BARC
+BRG;Bridge Information Co., Ltd
+BRI;Boca Research Inc
+BRM;Braemar Inc
+BRO;BROTHER INDUSTRIES,LTD.
+BSE;Bose Corporation
+BSL;Biomedical Systems Laboratory
+BST;BodySound Technologies, Inc.
+BTC;Bit 3 Computer
+BTE;Brilliant Technology
+BTF;Bitfield Oy
+BTI;BusTech Inc
+BUF;Yasuhiko Shirai Melco Inc
+BUJ;ATI Tech Inc
+BUL;Bull
+BUR;Bernecker & Rainer Ind-Eletronik GmbH
+BUS;BusTek
+BUT;21ST CENTURY ENTERTAINMENT
+BWK;Bitworks Inc.
+BXE;Buxco Electronics
+BYD;byd:sign corporation
+CAA;Castles Automation Co., Ltd
+CAC;CA & F Elettronica
+CAG;CalComp
+CAI;Canon Inc.
+CAL;Acon
+CAM;Cambridge Audio
+CAN;Canopus Company Ltd
+CAN;Carrera Computer Inc
+CAN;CORNEA
+CAR;Cardinal Company Ltd
+CAS;CASIO COMPUTER CO.,LTD
+CAT;Consultancy in Advanced Technology
+CBI;ComputerBoards Inc
+CBR;Cebra Tech A/S
+CBT;Cabletime Ltd
+CBX;Cybex Computer Products Corporation
+CCC;C-Cube Microsystems
+CCI;Cache
+CCJ;CONTEC CO.,LTD.
+CCL;CCL/ITRI
+CCP;Capetronic USA Inc
+CDC;Core Dynamics Corporation
+CDD;Convergent Data Devices
+CDE;Colin.de
+CDG;Christie Digital Systems Inc
+CDI;Concept Development Inc
+CDK;Cray Communications
+CDN;Codenoll Technical Corporation
+CDP;CalComp
+CDS;Computer Diagnostic Systems
+CDT;IBM Corporation
+CDV;Convergent Design Inc.
+CEA;Consumer Electronics Association
+CEC;Chicony Electronics Company Ltd
+CED;Cambridge Electronic Design Ltd
+CEF;Cefar Digital Vision
+CEI;Crestron Electronics, Inc.
+CEM;MEC Electronics GmbH
+CEN;Centurion Technologies P/L
+CEP;C-DAC
+CER;Ceronix
+CET;TEC CORPORATION
+CFG;Atlantis
+CGA;Chunghwa Picture Tubes, LTD
+CGS;Chyron Corp
+CHA;Chase Research PLC
+CHC;Chic Technology Corp.
+CHD;ChangHong Electric Co.,Ltd
+CHE;Acer Inc
+CHG;Sichuan Changhong Electric CO, LTD.
+CHI;Chrontel Inc
+CHL;Chloride-R&D
+CHM;CHIC TECHNOLOGY CORP.
+CHO;Sichuang Changhong Corporation
+CHP;CH Products
+CHS;Agentur Chairos
+CHT;Chunghwa Picture Tubes,LTD.
+CHY;Cherry GmbH
+CIC;Comm. Intelligence Corporation
+CII;Cromack Industries Inc
+CIL;Citicom Infotech Private Limited
+CIN;Citron GmbH
+CIP;Ciprico Inc
+CIR;Cirrus Logic Inc
+CIS;Cisco Systems Inc
+CIT;Citifax Limited
+CKC;The Concept Keyboard Company Ltd
+CKJ;Carina System Co., Ltd.
+CLA;Clarion Company Ltd
+CLD;COMMAT L.t.d.
+CLE;Classe Audio
+CLG;CoreLogic
+CLI;Cirrus Logic Inc
+CLM;CrystaLake Multimedia
+CLO;Clone Computers
+CLT;automated computer control systems
+CLV;Clevo Company
+CLX;CardLogix
+CMC;CMC Ltd
+CMD;Colorado MicroDisplay, Inc.
+CMG;Chenming Mold Ind. Corp.
+CMI;C-Media Electronics
+CMM;Comtime GmbH
+CMN;Chimei Innolux Corporation
+CMO;Chi Mei Optoelectronics corp.
+CMR;Cambridge Research Systems Ltd
+CMS;CompuMaster Srl
+CMX;Comex Electronics AB
+CNB;American Power Conversion
+CNC;Alvedon Computers Ltd
+CNE;Cine-tal
+CNI;Connect Int'l A/S
+CNN;Canon Inc
+CNT;COINT Multimedia Systems
+COB;COBY Electronics Co., Ltd
+COD;CODAN Pty. Ltd.
+COI;Codec Inc.
+COL;Rockwell Collins, Inc.
+COM;Comtrol Corporation
+CON;Contec Company Ltd
+COO;coolux GmbH
+COR;Corollary Inc
+COS;CoStar Corporation
+COT;Core Technology Inc
+COW;Polycow Productions
+CPC;Ciprico Inc
+CPD;CompuAdd
+CPI;Computer Peripherals Inc
+CPL;Compal Electronics Inc
+CPQ;Compaq Computer Company
+CPT;cPATH
+CPX;Powermatic Data Systems
+CRC;CONRAC GmbH
+CRD;Cardinal Technical Inc
+CRE;Creative Labs Inc
+CRI;Crio Inc.
+CRL;Creative Logic
+CRN;Cornerstone Imaging
+CRO;Extraordinary Technologies PTY Limited
+CRQ;Cirque Corporation
+CRS;Crescendo Communication Inc
+CRV;Cerevo Inc.
+CRX;Cyrix Corporation
+CSB;Transtex SA
+CSC;Crystal Semiconductor
+CSD;Cresta Systems Inc
+CSE;Concept Solutions & Engineering
+CSI;Cabletron System Inc
+CSO;California Institute of Technology
+CSS;CSS Laboratories
+CST;CSTI Inc
+CTA;CoSystems Inc
+CTC;CTC Communication Development Company Ltd
+CTE;Chunghwa Telecom Co., Ltd.
+CTL;Creative Technology Ltd
+CTM;Computerm Corporation
+CTN;Computone Products
+CTP;Computer Technology Corporation
+CTS;Comtec Systems Co., Ltd.
+CTX;Creatix Polymedia GmbH
+CUB;Cubix Corporation
+CUK;Calibre UK Ltd
+CVA;Covia Inc.
+CVS;Clarity Visual Systems
+CWR;Connectware Inc
+CXT;Conexant Systems
+CYB;CyberVision
+CYC;Cylink Corporation
+CYD;Cyclades Corporation
+CYL;Cyberlabs
+CYT;Cytechinfo Inc
+CYV;Cyviz AS
+CYW;Cyberware
+CYX;Cyrix Corporation
+CZE;Carl Zeiss AG
+DAC;Digital Acoustics Corporation
+DAE;Digatron Industrie Elektronik GmbH
+DAI;DAIS SET Ltd.
+DAK;Daktronics
+DAL;Digital Audio Labs Inc
+DAN;Danelec Marine A/S
+DAS;DAVIS AS
+DAT;Datel Inc
+DAU;Daou Tech Inc
+DAV;Davicom Semiconductor Inc
+DAW;DA2 Technologies Inc
+DAX;Data Apex Ltd
+DBD;Diebold Inc.
+DBI;DigiBoard Inc
+DBK;Databook Inc
+DBL;Doble Engineering Company
+DBN;DB Networks Inc
+DCA;Digital Communications Association
+DCC;Dale Computer Corporation
+DCD;Datacast LLC
+DCE;dSPACE GmbH
+DCI;Concepts Inc
+DCL;Dynamic Controls Ltd
+DCM;DCM Data Products
+DCO;Dialogue Technology Corporation
+DCR;Decros Ltd
+DCS;Diamond Computer Systems Inc
+DCT;Dancall Telecom A/S
+DCV;Datatronics Technology Inc
+DDA;DA2 Technologies Corporation
+DDD;Danka Data Devices
+DDI;Data Display AG
+DDS;Barco, n.v.
+DDT;Datadesk Technologies Inc
+DEC;Digital Equipment Corporation
+DEI;Deico Electronics
+DEL;Dell Inc.
+DEN;Densitron Computers Ltd
+DEX;idex displays
+DFI;DFI
+DFK;SharkTec A/S
+DGA;Digiital Arts Inc
+DGC;Data General Corporation
+DGI;DIGI International
+DGK;DugoTech Co., LTD
+DGP;Digicorp European sales S.A.
+DGS;Diagsoft Inc
+DGT;The Dearborn Group
+DGT;Dearborn Group Technology
+DHP;DH Print
+DHQ;Quadram
+DHT;Projectavision Inc
+DIA;Diadem
+DIG;Digicom S.p.A.
+DII;Dataq Instruments Inc
+DIM;dPict Imaging, Inc.
+DIN;Daintelecom Co., Ltd
+DIS;Diseda S.A.
+DIT;Dragon Information Technology
+DJE;Capstone Visua lProduct Development
+DJP;Maygay Machines, Ltd
+DKY;Datakey Inc
+DLB;Dolby Laboratories Inc.
+DLC;Diamond Lane Comm. Corporation
+DLG;Digital-Logic GmbH
+DLK;D-Link Systems Inc
+DLL;Dell Inc
+DLT;Digitelec Informatique Park Cadera
+DMB;Digicom Systems Inc
+DMC;Dune Microsystems Corporation
+DMM;Dimond Multimedia Systems Inc
+DMP;D&M Holdings Inc, Professional Business Company
+DMS;DOME imaging systems
+DMT;Distributed Management Task Force, Inc. (DMTF)
+DMV;NDS Ltd
+DNA;DNA Enterprises, Inc.
+DNG;Apache Micro Peripherals Inc
+DNI;Deterministic Networks Inc.
+DNT;Dr. Neuhous Telekommunikation GmbH
+DNV;DiCon
+DOL;Dolman Technologies Group Inc
+DOM;Dome Imaging Systems
+DON;DENON, Ltd.
+DOT;Dotronic Mikroelektronik GmbH
+DPA;DigiTalk Pro AV
+DPC;Delta Electronics Inc
+DPI;DocuPoint
+DPL;Digital Projection Limited
+DPM;ADPM Synthesis sas
+DPS;Digital Processing Systems
+DPT;DPT
+DPX;DpiX, Inc.
+DQB;Datacube Inc
+DRB;Dr. Bott KG
+DRC;Data Ray Corp.
+DRD;DIGITAL REFLECTION INC.
+DRI;Data Race Inc
+DSD;DS Multimedia Pte Ltd
+DSI;Digitan Systems Inc
+DSM;DSM Digital Services GmbH
+DSP;Domain Technology Inc
+DTA;DELTATEC
+DTC;DTC Tech Corporation
+DTE;Dimension Technologies, Inc.
+DTI;Diversified Technology, Inc.
+DTK;Dynax Electronics (HK) Ltd
+DTL;e-Net Inc
+DTN;Datang Telephone Co
+DTO;Deutsche Thomson OHG
+DTT;Design & Test Technology, Inc.
+DTX;Data Translation
+DUA;Dosch & Amand GmbH & Company KG
+DUN;NCR Corporation
+DVD;Dictaphone Corporation
+DVL;Devolo AG
+DVS;Digital Video System
+DVT;Data Video
+DWE;Daewoo Electronics Company Ltd
+DXC;Digipronix Control Systems
+DXL;Dextera Labs Inc
+DXP;Data Expert Corporation
+DXS;Signet
+DYC;Dycam Inc
+DYM;Dymo-CoStar Corporation
+DYN;Askey Computer Corporation
+DYX;Dynax Electronics (HK) Ltd
+EAS;Evans and Sutherland Computer
+EBH;Data Price Informatica
+EBT;HUALONG TECHNOLOGY CO., LTD
+ECA;Electro Cam Corp.
+ECC;ESSential Comm. Corporation
+ECI;Enciris Technologies
+ECK;Eugene Chukhlomin Sole Proprietorship, d.b.a.
+ECL;Excel Company Ltd
+ECM;E-Cmos Tech Corporation
+ECO;Echo Speech Corporation
+ECP;Elecom Company Ltd
+ECS;Elitegroup Computer Systems Company Ltd
+ECT;Enciris Technologies
+EDC;e.Digital Corporation
+EDG;Electronic-Design GmbH
+EDI;Edimax Tech. Company Ltd
+EDM;EDMI
+EDT;Emerging Display Technologies Corp
+EEE;ET&T Technology Company Ltd
+EEH;EEH Datalink GmbH
+EEP;E.E.P.D. GmbH
+EES;EE Solutions, Inc.
+EGD;EIZO GmbH Display Technologies
+EGL;Eagle Technology
+EGN;Egenera, Inc.
+EGO;Ergo Electronics
+EHJ;Epson Research
+EHN;Enhansoft
+EIC;Eicon Technology Corporation
+EKA;MagTek Inc.
+EKC;Eastman Kodak Company
+EKS;EKSEN YAZILIM
+ELA;ELAD srl
+ELC;Electro Scientific Ind
+ELE;Elecom Company Ltd
+ELG;Elmeg GmbH Kommunikationstechnik
+ELI;Edsun Laboratories
+ELL;Electrosonic Ltd
+ELM;Elmic Systems Inc
+ELO;Elo TouchSystems Inc
+ELO;Tyco Electronics
+ELS;ELSA GmbH
+ELT;Element Labs, Inc.
+ELX;Elonex PLC
+EMB;Embedded computing inc ltd
+EMC;eMicro Corporation
+EME;EMiNE TECHNOLOGY COMPANY, LTD.
+EMG;EMG Consultants Inc
+EMI;Ex Machina Inc
+EMU;Emulex Corporation
+ENC;Eizo Nanao Corporation
+END;ENIDAN Technologies Ltd
+ENE;ENE Technology Inc.
+ENI;Efficient Networks
+ENS;Ensoniq Corporation
+ENT;Enterprise Comm. & Computing Inc
+EPC;Empac
+EPI;Envision Peripherals, Inc
+EPN;EPiCON Inc.
+EPS;KEPS
+EQP;Equipe Electronics Ltd.
+EQX;Equinox Systems Inc
+ERG;Ergo System
+ERI;Ericsson Mobile Communications AB
+ERN;Ericsson, Inc.
+ERP;Euraplan GmbH
+ERT;Escort Insturments Corporation
+ESA;Elbit Systems of America
+ESC;Eden Sistemas de Computacao S/A
+ESD;Ensemble Designs, Inc
+ESG;ELCON Systemtechnik GmbH
+ESI;Extended Systems, Inc.
+ESK;ES&S
+ESS;ESS Technology Inc
+EST;Embedded Solution Technology
+ESY;E-Systems Inc
+ETC;Everton Technology Company Ltd
+ETD;ELAN MICROELECTRONICS CORPORATION
+ETH;Etherboot Project
+ETI;Eclipse Tech Inc
+ETK;eTEK Labs Inc.
+ETL;Evertz Microsystems Ltd.
+ETS;Electronic Trade Solutions Ltd
+ETT;E-Tech Inc
+EUT;Ericsson Mobile Networks B.V.
+EVI;eviateg GmbH
+EVX;Everex
+EXA;Exabyte
+EXC;Excession Audio
+EXI;Exide Electronics
+EXN;RGB Systems, Inc. dba Extron Electronics
+EXP;Data Export Corporation
+EXT;Exatech Computadores & Servicos Ltda
+EXX;Exxact GmbH
+EXY;Exterity Ltd
+EZE;EzE Technologies
+EZP;Storm Technology
+FAR;Farallon Computing
+FBI;Interface Corporation
+FCB;Furukawa Electric Company Ltd
+FCG;First International Computer Ltd
+FCS;Focus Enhancements, Inc.
+FDC;Future Domain
+FDT;Fujitsu Display Technologies Corp.
+FEC;FURUNO ELECTRIC CO., LTD.
+FEL;Fellowes & Questec
+FEN;Fen Systems Ltd.
+FER;Ferranti Int'L
+FFI;Fairfield Industries
+FGD;Lisa Draexlmaier GmbH
+FGL;Fujitsu General Limited.
+FHL;FHLP
+FIC;Formosa Industrial Computing Inc
+FIL;Forefront Int'l Ltd
+FIN;Finecom Co., Ltd.
+FIR;Chaplet Systems Inc
+FIS;FLY-IT Simulators
+FIT;Feature Integration Technology Inc.
+FJC;Fujitsu Takamisawa Component Limited
+FJS;Fujitsu Spain
+FJT;F.J. Tieman BV
+FLE;ADTI Media, Inc
+FLI;Faroudja Laboratories
+FLY;Butterfly Communications
+FMA;Fast Multimedia AG
+FMC;Ford Microelectronics Inc
+FMI;Fujitsu Microelect Inc
+FMI;Fellowes, Inc.
+FML;Fujitsu Microelect Ltd
+FMZ;Formoza-Altair
+FNC;Fanuc LTD
+FNI;Funai Electric Co., Ltd.
+FOA;FOR-A Company Limited
+FOS;Foss Tecator
+FOX;HON HAI PRECISON IND.CO.,LTD.
+FPE;Fujitsu Peripherals Ltd
+FPS;Deltec Corporation
+FPX;Cirel Systemes
+FRC;Force Computers
+FRD;Freedom Scientific BLV
+FRE;Forvus Research Inc
+FRI;Fibernet Research Inc
+FRS;South Mountain Technologies, LTD
+FSC;Future Systems Consulting KK
+FSI;Fore Systems Inc
+FST;Modesto PC Inc
+FTC;Futuretouch Corporation
+FTE;Frontline Test Equipment Inc.
+FTG;FTG Data Systems
+FTI;FastPoint Technologies, Inc.
+FTN;Fountain Technologies Inc
+FTR;Mediasonic
+FUJ;Fujitsu Ltd
+FUN;sisel muhendislik
+FUS;Fujitsu Siemens Computers GmbH
+FVC;First Virtual Corporation
+FVX;C-C-C Group Plc
+FWA;Attero Tech, LLC
+FWR;Flat Connections Inc
+FXX;Fuji Xerox
+FZC;Founder Group Shenzhen Co.
+FZI;FZI Forschungszentrum Informatik
+GAG;Gage Applied Sciences Inc
+GAL;Galil Motion Control
+GAU;Gaudi Co., Ltd.
+GCC;GCC Technologies Inc
+GCI;Gateway Comm. Inc
+GCS;Grey Cell Systems Ltd
+GDC;General Datacom
+GDI;G. Diehl ISDN GmbH
+GDS;GDS
+GDT;Vortex Computersysteme GmbH
+GEF;GE Fanuc Embedded Systems
+GEH;GE Intelligent Platforms - Huntsville
+GEM;Gem Plus
+GEN;Genesys ATE Inc
+GEO;GEO Sense
+GES;GES Singapore Pte Ltd
+GET;Getac Technology Corporation
+GFM;GFMesstechnik GmbH
+GFN;Gefen Inc.
+GGL;Google Inc.
+GIC;General Inst. Corporation
+GIM;Guillemont International
+GIS;AT&T Global Info Solutions
+GJN;Grand Junction Networks
+GLE;AD electronics
+GLM;Genesys Logic
+GLS;Gadget Labs LLC
+GMK;GMK Electronic Design GmbH
+GML;General Information Systems
+GMM;GMM Research Inc
+GMN;GEMINI 2000 Ltd
+GMX;GMX Inc
+GND;Gennum Corporation
+GNN;GN Nettest Inc
+GNZ;Gunze Ltd
+GRA;Graphica Computer
+GRE;GOLD RAIN ENTERPRISES CORP.
+GRH;Granch Ltd
+GRV;Advanced Gravis
+GRY;Robert Gray Company
+GSB;NIPPONDENCHI CO,.LTD
+GSC;General Standards Corporation
+GSM;Goldstar Company Ltd
+GST;Graphic SystemTechnology
+GSY;Grossenbacher Systeme AG
+GTC;Graphtec Corporation
+GTI;Goldtouch
+GTK;G-Tech Corporation
+GTM;Garnet System Company Ltd
+GTS;Geotest Marvin Test Systems Inc
+GTT;General Touch Technology Co., Ltd.
+GUD;Guntermann & Drunck GmbH
+GUZ;Guzik Technical Enterprises
+GVC;GVC Corporation
+GVL;Global Village Communication
+GWI;GW Instruments
+GWY;Gateway 2000
+GZE;GUNZE Limited
+HAE;Haider electronics
+HAI;Haivision Systems Inc.
+HAL;Halberthal
+HAN;Hanchang System Corporation
+HAY;Hayes Microcomputer Products Inc
+HCA;DAT
+HCE;Hitachi Consumer Electronics Co., Ltd
+HCL;HCL America Inc
+HCM;HCL Peripherals
+HCP;Hitachi Computer Products Inc
+HCW;Hauppauge Computer Works Inc
+HDC;HardCom Elektronik & Datateknik
+HDI;HD-INFO d.o.o.
+HDV;Holografika kft.
+HEC;Hitachi Engineering Company Ltd
+HEC;Hisense Electric Co., Ltd.
+HEL;Hitachi Micro Systems Europe Ltd
+HER;Ascom Business Systems
+HET;HETEC Datensysteme GmbH
+HHC;HIRAKAWA HEWTECH CORP.
+HIB;Hibino Corporation
+HIC;Hitachi Information Technology Co., Ltd.
+HIK;Hikom Co., Ltd.
+HIL;Hilevel Technology
+HIT;Hitachi America Ltd
+HJI;Harris & Jeffries Inc
+HKA;HONKO MFG. CO., LTD.
+HKG;Josef Heim KG
+HMC;Hualon Microelectric Corporation
+HMK;hmk Daten-System-Technik BmbH
+HMX;HUMAX Co., Ltd.
+HNS;Hughes Network Systems
+HOB;HOB Electronic GmbH
+HOE;Hosiden Corporation
+HOL;Holoeye Photonics AG
+HPA;Zytor Communications
+HPC;Hewlett Packard Co.
+HPD;Hewlett Packard
+HPI;Headplay, Inc.
+HPK;HAMAMATSU PHOTONICS K.K.
+HPQ;HP
+HPR;H.P.R. Electronics GmbH
+HRC;Hercules
+HRE;Qingdao Haier Electronics Co., Ltd.
+HRL;Herolab GmbH
+HRS;Harris Semiconductor
+HRT;HERCULES
+HSC;Hagiwara Sys-Com Company Ltd
+HSD;HannStar Display Corp
+HSM;AT&T Microelectronics
+HSP;HannStar Display Corp
+HTC;Hitachi Ltd
+HTI;Hampshire Company, Inc.
+HTK;Holtek Microelectronics Inc
+HTX;Hitex Systementwicklung GmbH
+HUB;GAI-Tronics, A Hubbell Company
+HUM;IMP Electronics Ltd.
+HWA;Harris Canada Inc
+HWC;DBA Hans Wedemeyer
+HWD;Highwater Designs Ltd
+HWP;Hewlett Packard
+HXM;Hexium Ltd.
+HYC;Hypercope Gmbh Aachen
+HYD;Hydis Technologies.Co.,LTD
+HYO;HYC CO., LTD.
+HYP;Hyphen Ltd
+HYR;Hypertec Pty Ltd
+HYT;Heng Yu Technology (HK) Limited
+HYV;Hynix Semiconductor
+IAF;Institut f r angewandte Funksystemtechnik GmbH
+IAI;Integration Associates, Inc.
+IAT;IAT Germany GmbH
+IBC;Integrated Business Systems
+IBI;INBINE.CO.LTD
+IBM;IBM Brasil
+IBM;IBM France
+IBP;IBP Instruments GmbH
+IBR;IBR GmbH
+ICA;ICA Inc
+ICC;BICC Data Networks Ltd
+ICD;ICD Inc
+ICE;IC Ensemble
+ICI;Infotek Communication Inc
+ICM;Intracom SA
+ICN;Sanyo Icon
+ICO;Intel Corp
+ICS;Integrated Circuit Systems
+ICV;Inside Contactless
+ICX;ICCC A/S
+IDC;International Datacasting Corporation
+IDE;IDE Associates
+IDK;IDK Corporation
+IDO;IDEO Product Development
+IDP;Integrated Device Technology, Inc.
+IDS;Interdigital Sistemas de Informacao
+IDT;International Display Technology
+IDX;IDEXX Labs
+IEC;Interlace Engineering Corporation
+IEE;IEE
+IEI;Interlink Electronics
+IFS;In Focus Systems Inc
+IFT;Informtech
+IFX;Infineon Technologies AG
+IGC;Intergate Pty Ltd
+IGM;IGM Communi
+IHE;InHand Electronics
+IIC;ISIC Innoscan Industrial Computers A/S
+III;Intelligent Instrumentation
+IIN;IINFRA Co., Ltd
+IKS;Ikos Systems Inc
+ILC;Image Logic Corporation
+ILS;Innotech Corporation
+IMA;Imagraph
+IMC;IMC Networks
+IMD;ImasDe Canarias S.A.
+IME;Imagraph
+IMG;IMAGENICS Co., Ltd.
+IMI;International Microsystems Inc
+IMM;Immersion Corporation
+IMN;Impossible Production
+IMP;Impression Products Incorporated
+IMT;Inmax Technology Corporation
+INC;Home Row Inc
+IND;ILC
+INE;Inventec Electronics (M) Sdn. Bhd.
+INF;Inframetrics Inc
+ING;Integraph Corporation
+INI;Initio Corporation
+INK;Indtek Co., Ltd.
+INL;InnoLux Display Corporation
+INM;InnoMedia Inc
+INN;Innovent Systems, Inc.
+INO;Innolab Pte Ltd
+INP;Interphase Corporation
+INS;Ines GmbH
+INT;Interphase Corporation
+inu;Inovatec S.p.A.
+INV;Inviso, Inc.
+INZ;Best Buy
+IOA;CRE Technology Corporation
+IOD;I-O Data Device Inc
+IOM;Iomega
+ION;Inside Out Networks
+IOS;i-O Display System
+IOT;I/OTech Inc
+IPC;IPC Corporation
+IPD;Industrial Products Design, Inc.
+IPI;Intelligent Platform Management Interface (IPMI) forum (Intel, HP, NEC, Dell)
+IPM;IPM Industria Politecnica Meridionale SpA
+IPN;Performance Technologies
+IPR;Ithaca Peripherals
+IPS;IPS, Inc. (Intellectual Property Solutions, Inc.)
+IPT;International Power Technologies
+IPW;IPWireless, Inc
+IQT;IMAGEQUEST Co., Ltd
+IRD;IRdata
+ISA;Symbol Technologies
+ISC;Id3 Semiconductors
+ISG;Insignia Solutions Inc
+ISI;Interface Solutions
+ISL;Isolation Systems
+ISM;Image Stream Medical
+ISP;IntreSource Systems Pte Ltd
+ISR;INSIS Co., LTD.
+ISS;ISS Inc
+IST;Intersolve Technologies
+ISY;International Integrated Systems,Inc.(IISI)
+ITA;Itausa Export North America
+ITC;Intercom Inc
+ITD;Internet Technology Corporation
+ITE;Integrated Tech Express Inc
+ITK;ITK Telekommunikation AG
+ITL;Inter-Tel
+ITM;ITM inc.
+ITN;The NTI Group
+ITP;IT-PRO Consulting und Systemhaus GmbH
+ITR;Infotronic America, Inc.
+ITS;IDTECH
+ITT;I&T Telecom.
+ITX;integrated Technology Express Inc
+IUC;ICSL
+IVI;Intervoice Inc
+IVM;Liyama North America
+IWR;Icuiti Corporation
+IWX;Intelliworxx, Inc.
+IXD;Intertex Data AB
+JAC;Astec Inc
+JAE;Japan Aviation Electronics Industry, Limited
+JAS;Janz Automationssysteme AG
+JAT;Jaton Corporation
+JAZ;Carrera Computer Inc (used as second pnpid)
+JCE;Jace Tech Inc
+JDL;Japan Digital Laboratory Co.,Ltd.
+JEN;N-Vision
+JET;JET POWER TECHNOLOGY CO., LTD.
+JFX;Jones Futurex Inc
+JGD;University College
+JIC;Jaeik Information & Communication Co., Ltd.
+JMT;Micro Technical Company Ltd
+JPC;JPC Technology Limited
+JPW;Wallis Hamilton Industries
+JQE;CNet Technical Inc
+JSD;JS DigiTech, Inc
+JSI;Jupiter Systems, Inc.
+JSK;SANKEN ELECTRIC CO., LTD
+JTS;JS Motorsports
+JTY;jetway security micro,inc
+JUK;Janich & Klass Computertechnik GmbH
+JUP;Jupiter Systems
+JVC;JVC
+JWD;Video International Inc.
+JWL;Jewell Instruments, LLC
+JWS;JWSpencer & Co.
+JWY;Jetway Information Co., Ltd
+KAR;Karna
+KBI;Kidboard Inc
+KBL;Kobil Systems GmbH
+KCL;Keycorp Ltd
+KDE;KDE
+KDK;Kodiak Tech
+KDM;Korea Data Systems Co., Ltd.
+KDS;KDS USA
+KEC;Kyushu Electronics Systems Inc
+KEM;Kontron Embedded Modules GmbH
+KES;Kesa Corporation
+KEY;Key Tech Inc
+KFC;SCD Tech
+KFE ;Komatsu Forest
+KFX;Kofax Image Products
+KIS;KiSS Technology A/S
+KMC;Mitsumi Company Ltd
+KML;Kensington Microware Ltd
+KNC;Konica corporation
+KNX;Nutech Marketing PTL
+KOB;Kobil Systems GmbH
+KOD;Eastman Kodak Company
+KOE;KOLTER ELECTRONIC
+KOL;Kollmorgen Motion Technologies Group
+KOW;KOWA Company,LTD.
+KPC;King Phoenix Company
+KRL;Krell Industries Inc.
+KRM;Kroma Telecom
+KRY;Kroy LLC
+KSC;Kinetic Systems Corporation
+KSL;Karn Solutions Ltd.
+KSX;King Tester Corporation
+KTC;Kingston Tech Corporation
+KTD;Takahata Electronics Co.,Ltd.
+KTE;K-Tech
+KTG;Kayser-Threde GmbH
+KTI;Konica Technical Inc
+KTK;Key Tronic Corporation
+KTN;Katron Tech Inc
+KUR;Kurta Corporation
+KVA;Kvaser AB
+KWD;Kenwood Corporation
+KYC;Kyocera Corporation
+KYE;KYE Syst Corporation
+KYK;Samsung Electronics America Inc
+KZI;K-Zone International co. Ltd.
+KZN;K-Zone International
+LAB;ACT Labs Ltd
+LAC;LaCie
+LAF;Microline
+LAG;Laguna Systems
+LAN;Sodeman Lancom Inc
+LAS;LASAT Comm. A/S
+LAV;Lava Computer MFG Inc
+LBO;Lubosoft
+LCC;LCI
+LCD;Toshiba Matsushita Display Technology Co., Ltd
+LCE;La Commande Electronique
+LCI;Lite-On Communication Inc
+LCM;Latitude Comm.
+LCN;LEXICON
+LCS;Longshine Electronics Company
+LCT;Labcal Technologies
+LDT;LogiDataTech Electronic GmbH
+LEC;Lectron Company Ltd
+LED;Long Engineering Design Inc
+LEG;Legerity, Inc
+LEN;Lenovo Group Limited
+LEO;First International Computer Inc
+LEX;Lexical Ltd
+LGC;Logic Ltd
+LGI;Logitech Inc
+LGS;LG Semicom Company Ltd
+LGX;Lasergraphics, Inc.
+LHA;Lars Haagh ApS
+LHE;Lung Hwa Electronics Company Ltd
+LHT;Lighthouse Technologies Limited
+LIP;Linked IP GmbH
+LIT;Lithics Silicon Technology
+LJX;Datalogic Corporation
+LKM;Likom Technology Sdn. Bhd.
+LLL;L-3 Communications
+LMG;Lucent Technologies
+LMI;Lexmark Int'l Inc
+LMP;Leda Media Products
+LMT;Laser Master
+LND;Land Computer Company Ltd
+LNK;Link Tech Inc
+LNR;Linear Systems Ltd.
+LNT;LANETCO International
+LNV;Lenovo
+LOC;Locamation B.V.
+LOE;Loewe Opta GmbH
+LOG;Logicode Technology Inc
+LPE;El-PUSK Co., Ltd.
+LPI;Design Technology
+LPL;DO NOT USE - LPL
+LSC;LifeSize Communications
+LSI;Loughborough Sound Images
+LSJ;LSI Japan Company Ltd
+LSL;Logical Solutions
+LSY;LSI Systems Inc
+LTC;Labtec Inc
+LTI;Jongshine Tech Inc
+LTK;Lucidity Technology Company Ltd
+LTN;Litronic Inc
+LTS;LTS Scale LLC
+LTV;Leitch Technology International Inc.
+LTW;Lightware, Inc
+LUC;Lucent Technologies
+LUM;Lumagen, Inc.
+LUX;Luxxell Research Inc
+LWC;Labway Corporation
+LWR;Lightware Visual Engineering
+LWW;Lanier Worldwide
+LXN;Luxeon
+LXS;ELEA CardWare
+LZX;Lightwell Company Ltd
+MAC;MAC System Company Ltd
+MAD;Xedia Corporation
+MAE;Maestro Pty Ltd
+MAG;MAG InnoVision
+MAI;Mutoh America Inc
+MAL;Meridian Audio Ltd
+MAN;LGIC
+MAS;Mass Inc.
+MAT;Matsushita Electric Ind. Company Ltd
+MAX;Rogen Tech Distribution Inc
+MAY;Maynard Electronics
+MAZ;MAZeT GmbH
+MBC;MBC
+MBD;Microbus PLC
+MBM;Marshall Electronics
+MBV;Moreton Bay
+MCA;American Nuclear Systems Inc
+MCC;Micro Industries
+MCD;McDATA Corporation
+MCE;Metz-Werke GmbH & Co KG
+MCG;Motorola Computer Group
+MCI;Micronics Computers
+MCL;Motorola Communications Israel
+MCM;Metricom Inc
+MCN;Micron Electronics Inc
+MCO;Motion Computing Inc.
+MCP;Magni Systems Inc
+MCQ;Mat's Computers
+MCR;Marina Communicaitons
+MCS;Micro Computer Systems
+MCT;Microtec
+MDA;Media4 Inc
+MDC;Midori Electronics
+MDD;MODIS
+MDG;Madge Networks
+MDI;Micro Design Inc
+MDK;Mediatek Corporation
+MDO;Panasonic
+MDR;Medar Inc
+MDS;Micro Display Systems Inc
+MDT;Magus Data Tech
+MDV;MET Development Inc
+MDX;MicroDatec GmbH
+MDY;Microdyne Inc
+MEC;Mega System Technologies Inc
+MED;Messeltronik Dresden GmbH
+MEE;Mitsubishi Electric Engineering Co., Ltd.
+MEG;Abeam Tech Ltd
+MEI;Panasonic Industry Company
+MEL;Mitsubishi Electric Corporation
+MEN;MEN Mikroelectronik Nueruberg GmbH
+MEQ;Matelect Ltd.
+MET;Metheus Corporation
+MFG;MicroField Graphics Inc
+MFI;Micro Firmware
+MFR;MediaFire Corp.
+MGA;Mega System Technologies, Inc.
+MGC;Mentor Graphics Corporation
+MGE;Schneider Electric S.A.
+MGL;M-G Technology Ltd
+MGT;Megatech R & D Company
+MIC;Micom Communications Inc
+MID;miro Displays
+MII;Mitec Inc
+MIL;Marconi Instruments Ltd
+MIN;Minicom Digital Signage
+MIP;micronpc.com
+MIR;Miro Computer Prod.
+MIS;Modular Industrial Solutions Inc
+MIT;MCM Industrial Technology GmbH
+MJI;MARANTZ JAPAN, INC.
+MJS;MJS Designs
+MKC;Media Tek Inc.
+MKT;MICROTEK Inc.
+MKV;Trtheim Technology
+MLD;Deep Video Imaging Ltd
+MLG;Micrologica AG
+MLI;McIntosh Laboratory Inc.
+MLM;Millennium Engineering Inc
+MLN;Mark Levinson
+MLS;Milestone EPE
+MLX;Mylex Corporation
+MMA;Micromedia AG
+MMD;Micromed Biotecnologia Ltd
+MMF;Minnesota Mining and Manufacturing
+MMI;Multimax
+MMM;Electronic Measurements
+MMN;MiniMan Inc
+MMS;MMS Electronics
+MNC;Mini Micro Methods Ltd
+MNL;Monorail Inc
+MNP;Microcom
+MOD;Modular Technology
+MOM;Momentum Data Systems
+MOS;Moses Corporation
+MOT;Motorola UDS
+MPC;M-Pact Inc
+MPI;Mediatrix Peripherals Inc
+MPJ;Microlab
+MPL;Maple Research Inst. Company Ltd
+MPN;Mainpine Limited
+MPS;mps Software GmbH
+MPX;Micropix Technologies, Ltd.
+MQP;MultiQ Products AB
+MRA;Miranda Technologies Inc
+MRC;Marconi Simulation & Ty-Coch Way Training
+MRD;MicroDisplay Corporation
+MRK;Maruko & Company Ltd
+MRL;Miratel
+MRO;Medikro Oy
+MRT;Merging Technologies
+MSA;Micro Systemation AB
+MSC;Mouse Systems Corporation
+MSD;Datenerfassungs- und Informationssysteme
+MSF;M-Systems Flash Disk Pioneers
+MSG;MSI GmbH
+MSH;Microsoft
+MSI;Microstep
+MSK;Megasoft Inc
+MSL;MicroSlate Inc.
+MSM;Advanced Digital Systems
+MSP;Mistral Solutions [P] Ltd.
+MST;MS Telematica
+MSU;motorola
+MSV;Mosgi Corporation
+MSX;Micomsoft Co., Ltd.
+MSY;MicroTouch Systems Inc
+MTB;Media Technologies Ltd.
+MTC;Mars-Tech Corporation
+MTD;MindTech Display Co. Ltd
+MTE;MediaTec GmbH
+MTH;Micro-Tech Hearing Instruments
+MTI;MaxCom Technical Inc
+MTI;Motorola Inc.
+MTK;Microtek International Inc.
+MTL;Mitel Corporation
+MTN;Mtron Storage Technology Co., Ltd.
+MTR;Mitron computer Inc
+MTS;Multi-Tech Systems
+MTU;Mark of the Unicorn Inc
+MTX;Matrox
+MUD;Multi-Dimension Institute
+MUK;mainpine limited
+MVD;Microvitec PLC
+MVI;Media Vision Inc
+MVM;SOBO VISION
+MVS;Microvision
+MVX;COM 1
+MWI;Multiwave Innovation Pte Ltd
+MWR;mware
+MWY;Microway Inc
+MXD;MaxData Computer GmbH & Co.KG
+MXI;Macronix Inc
+MXL;Hitachi Maxell, Ltd.
+MXP;Maxpeed Corporation
+MXT;Maxtech Corporation
+MXV;MaxVision Corporation
+MYA;Monydata
+MYR;Myriad Solutions Ltd
+MYX;Micronyx Inc
+NAC;Ncast Corporation
+NAD;NAD Electronics
+NAK;Nakano Engineering Co.,Ltd.
+NAL;Network Alchemy
+NAT;NaturalPoint Inc.
+NAV;Navigation Corporation
+NAX;Naxos Tecnologia
+NBL;N*Able Technologies Inc
+NBS;National Key Lab. on ISN
+NBT;NingBo Bestwinning Technology CO., Ltd
+NCA;Nixdorf Company
+NCC;NCR Corporation
+NCE;Norcent Technology, Inc.
+NCI;NewCom Inc
+NCL;NetComm Ltd
+NCR;NCR Electronics
+NCS;Northgate Computer Systems
+NCT;NEC CustomTechnica, Ltd.
+NDC;National DataComm Corporaiton
+NDI;National Display Systems
+NDK;Naitoh Densei CO., LTD.
+NDL;Network Designers
+NDS;Nokia Data
+NEC;NEC Corporation
+NEO;NEO TELECOM CO.,LTD.
+NET;Mettler Toledo
+NEU;NEUROTEC - EMPRESA DE PESQUISA E DESENVOLVIMENTO EM BIOMEDICINA
+NEX;Nexgen Mediatech Inc.,
+NFC;BTC Korea Co., Ltd
+NFS;Number Five Software
+NGC;Network General
+NGS;A D S Exports
+NHT;Vinci Labs
+NIC;National Instruments Corporation
+NIS;Nissei Electric Company
+NIT;Network Info Technology
+NIX;Seanix Technology Inc
+NLC;Next Level Communications
+NMP;Nokia Mobile Phones
+NMS;Natural Micro System
+NMV;NEC-Mitsubishi Electric Visual Systems Corporation
+NMX;Neomagic
+NNC;NNC
+NOE;NordicEye AB
+NOI;North Invent A/S
+NOK;Nokia Display Products
+NOR;Norand Corporation
+NOT;Not Limited Inc
+NPI;Network Peripherals Inc
+NRL;U.S. Naval Research Lab
+NRT;Beijing Northern Radiantelecom Co.
+NRV;Taugagreining hf
+NSC;National Semiconductor Corporation
+NSI;NISSEI ELECTRIC CO.,LTD
+NSP;Nspire System Inc.
+NSS;Newport Systems Solutions
+NST;Network Security Technology Co
+NTC;NeoTech S.R.L
+NTI;New Tech Int'l Company
+NTL;National Transcomm. Ltd
+NTN;Nuvoton Technology Corporation
+NTR;N-trig Innovative Technologies, Inc.
+NTS;Nits Technology Inc.
+NTT;NTT Advanced Technology Corporation
+NTW;Networth Inc
+NTX;Netaccess Inc
+NUG;NU Technology, Inc.
+NUI;NU Inc.
+NVC;NetVision Corporation
+NVD;Nvidia
+NVI;NuVision US, Inc.
+NVL;Novell Inc
+NVT;Navatek Engineering Corporation
+NWC;NW Computer Engineering
+NWP;NovaWeb Technologies Inc
+NWS;Newisys, Inc.
+NXC;NextCom K.K.
+NXG;Nexgen
+NXP;NXP Semiconductors bv.
+NXQ;Nexiq Technologies, Inc.
+NXS;Technology Nexus Secure Open Systems AB
+NYC;nakayo telecommunications,inc.
+OAK;Oak Tech Inc
+OAS;Oasys Technology Company
+OBS;Optibase Technologies
+OCD;Macraigor Systems Inc
+OCN;Olfan
+OCS;Open Connect Solutions
+ODM;ODME Inc.
+ODR;Odrac
+OEC;ORION ELECTRIC CO.,LTD
+OEI;Optum Engineering Inc.
+OIC;Option Industrial Computers
+OIM;Option International
+OIN;Option International
+OKI;OKI Electric Industrial Company Ltd
+OLC;Olicom A/S
+OLD;Olidata S.p.A.
+OLI;Olivetti
+OLT;Olitec S.A.
+OLV;Olitec S.A.
+OLY;OLYMPUS CORPORATION
+OMC;OBJIX Multimedia Corporation
+OMN;Omnitel
+OMR;Omron Corporation
+ONE;Oneac Corporation
+ONK;ONKYO Corporation
+ONL;OnLive, Inc
+ONS;On Systems Inc
+ONW;OPEN Networks Ltd
+ONX;SOMELEC Z.I. Du Vert Galanta
+OOS;OSRAM
+OPC;Opcode Inc
+OPI;D.N.S. Corporation
+OPT;OPTi Inc
+OPV;Optivision Inc
+OQI;Oksori Company Ltd
+ORG;ORGA Kartensysteme GmbH
+ORI;OSR Open Systems Resources, Inc.
+ORN;ORION ELECTRIC CO., LTD.
+OSA;OSAKA Micro Computer, Inc.
+OSP;OPTI-UPS Corporation
+OSR;Oksori Company Ltd
+OTB;outsidetheboxstuff.com
+OTI;Orchid Technology
+OTM;Optoma Corporation
+OTT;OPTO22, Inc.
+OUK;OUK Company Ltd
+OWL;Mediacom Technologies Pte Ltd
+OXU;Oxus Research S.A.
+OYO;Shadow Systems
+OZO;Tribe Computer Works Inc
+PAC;Pacific Avionics Corporation
+PAD;Promotion and Display Technology Ltd.
+PAK;Many CNC System Co., Ltd.
+PAM;Peter Antesberger Messtechnik
+PAN;The Panda Project
+PAR;Parallan Comp Inc
+PBI;Pitney Bowes
+PBL;Packard Bell Electronics
+PBN;Packard Bell NEC
+PBV;Pitney Bowes
+PCA;Philips BU Add On Card
+PCB;OCTAL S.A.
+PCC;PowerCom Technology Company Ltd
+PCG;First Industrial Computer Inc
+PCI;Pioneer Computer Inc
+PCK;PCBANK21
+PCL;pentel.co.,ltd
+PCM;PCM Systems Corporation
+PCO;Performance Concepts Inc.,
+PCP;Procomp USA Inc
+PCS;TOSHIBA PERSONAL COMPUTER SYSTEM CORPRATION
+PCT;PC-Tel Inc
+PCW;Pacific CommWare Inc
+PCX;PC Xperten
+PDM;Psion Dacom Plc.
+PDN;AT&T Paradyne
+PDR;Pure Data Inc
+PDS;PD Systems International Ltd
+PDT;PDTS - Prozessdatentechnik und Systeme
+PDV;Prodrive B.V.
+PEC;POTRANS Electrical Corp.
+PEI;PEI Electronics Inc
+PEL;Primax Electric Ltd
+PEN;Interactive Computer Products Inc
+PEP;Peppercon AG
+PER;Perceptive Signal Technologies
+PET;Practical Electronic Tools
+PFT;Telia ProSoft AB
+PGM;Paradigm Advanced Research Centre
+PGP;propagamma kommunikation
+PGS;Princeton Graphic Systems
+PHC;Pijnenburg Beheer N.V.
+PHE;Philips Medical Systems Boeblingen GmbH
+PHI;DO NOT USE - PHI
+PHL;Philips Consumer Electronics Company
+PHO;Photonics Systems Inc.
+PHS;Philips Communication Systems
+PHY;Phylon Communications
+PIE;Pacific Image Electronics Company Ltd
+PIM;Prism, LLC
+PIO;Pioneer Electronic Corporation
+PIX;Pixie Tech Inc
+PJA;Projecta
+PJD;Projectiondesign AS
+PJT;Pan Jit International Inc.
+PKA;Acco UK ltd.
+PLC;Pro-Log Corporation
+PLF;Panasonic Avionics Corporation
+PLM;PROLINK Microsystems Corp.
+PLT;PT Hartono Istana Teknologi
+PLV;PLUS Vision Corp.
+PLX;Parallax Graphics
+PLY;Polycom Inc.
+PMC;PMC Consumer Electronics Ltd
+PMD;TDK USA Corporation
+PMM;Point Multimedia System
+PMT;Promate Electronic Co., Ltd.
+PMX;Photomatrix
+PNG;Microsoft
+PNG;P.I. Engineering Inc
+PNL;Panelview, Inc.
+PNP;Microsoft
+PNR;Planar Systems, Inc.
+PNS;PanaScope
+PNX;Phoenix Technologies, Ltd.
+POL;PolyComp (PTY) Ltd.
+PON;Perpetual Technologies, LLC
+POR;Portalis LC
+PPC;Phoenixtec Power Company Ltd
+PPD;MEPhI
+PPI;Practical Peripherals
+PPM;Clinton Electronics Corp.
+PPP;Purup Prepress AS
+PPR;PicPro
+PPX;Perceptive Pixel Inc.
+PQI;Pixel Qi
+PRA;PRO/AUTOMATION
+PRC;PerComm
+PRD;Praim S.R.L.
+PRF;Digital Electronics Corporation
+PRG;The Phoenix Research Group Inc
+PRI;Priva Hortimation BV
+PRM;Prometheus
+PRO;Proteon
+PRS;Leutron Vision
+PRX;Proxima Corporation
+PSA;Advanced Signal Processing Technologies
+PSC;Philips Semiconductors
+PSD;Peus-Systems GmbH
+PSE;Practical Solutions Pte., Ltd.
+PSI;PSI-Perceptive Solutions Inc
+PSL;Perle Systems Limited
+PSM;Prosum
+PST;Global Data SA
+PTC;PS Technology Corporation
+PTG;Cipher Systems Inc
+PTH;Pathlight Technology Inc
+PTI;Promise Technology Inc
+PTL;Pantel Inc
+PTS;Plain Tree Systems Inc
+PTW;DO NOT USE
+PVC;DO NOT USE
+PVG;Proview Global Co., Ltd
+PVI;Prime view international Co., Ltd
+PVM;Penta Studiotechnik GmbH
+PVN;Pixel Vision
+PVP;Klos Technologies, Inc.
+PXC;Phoenix Contact
+PXE;PIXELA CORPORATION
+PXL;The Moving Pixel Company
+PXM;Proxim Inc
+QCC;QuakeCom Company Ltd
+QCH;Metronics Inc
+QCI;Quanta Computer Inc
+QCK;Quick Corporation
+QCL;Quadrant Components Inc
+QCP;Qualcomm Inc
+QDI;Quantum Data Incorporated
+QDM;Quadram
+QDS;Quanta Display Inc.
+QFF;Padix Co., Inc.
+QFI;Quickflex, Inc
+QLC;Q-Logic
+QQQ;Chuomusen Co., Ltd.
+QSI;Quantum Solutions, Inc.
+QTD;Quantum 3D Inc
+QTH;Questech Ltd
+QTI;Quicknet Technologies Inc
+QTM;Quantum
+QTR;Qtronix Corporation
+QUA;Quatographic AG
+QUE;Questra Consulting
+QVU;Quartics
+RAC;Racore Computer Products Inc
+RAD;Radisys Corporation
+RAI;Rockwell Automation/Intecolor
+RAN;Rancho Tech Inc
+RAR;Raritan, Inc.
+RAS;RAScom Inc
+RAT;Rent-A-Tech
+RAY;Raylar Design, Inc.
+RCE;Parc d'Activite des Bellevues
+RCH;Reach Technology Inc
+RCI;RC International
+RCN;Radio Consult SRL
+RCO;Rockwell Collins
+RDI;Rainbow Displays, Inc.
+RDM;Tremon Enterprises Company Ltd
+RDS;Radius Inc
+REA;Real D
+REC;ReCom
+RED;Research Electronics Development Inc
+REF;Reflectivity, Inc.
+REL;Reliance Electric Ind Corporation
+REM;SCI Systems Inc.
+REN;Renesas Technology Corp.
+RES;ResMed Pty Ltd
+RGL;Robertson Geologging Ltd
+RHM;Rohm Company Ltd
+RIC;RICOH COMPANY, LTD.
+RII;Racal Interlan Inc
+RIO;Rios Systems Company Ltd
+RIT;Ritech Inc
+RIV;Rivulet Communications
+RJA;Roland Corporation
+RJS;Advanced Engineering
+RKC;Reakin Technolohy Corporation
+RLD;MEPCO
+RLN;RadioLAN Inc
+RMC;Raritan Computer, Inc
+RMP;Research Machines
+RMT;Roper Mobile
+RNB;Rainbow Technologies
+ROB;Robust Electronics GmbH
+ROH;Rohm Co., Ltd.
+ROK;Rockwell International
+ROP;Roper International Ltd
+RPI;RoomPro Technologies
+RPT;R.P.T.Intergroups
+RRI;Radicom Research Inc
+RSC;PhotoTelesis
+RSH;ADC-Centre
+RSI;Rampage Systems Inc
+RSN;Radiospire Networks, Inc.
+RSQ;R Squared
+RSS;Rockwell Semiconductor Systems
+RSX;Rapid Tech Corporation
+RTC;Relia Technologies
+RTI;Rancho Tech Inc
+RTK;DO NOT USE
+RTL;Realtek Semiconductor Company Ltd
+RTS;Raintree Systems
+RUN;RUNCO International
+RUP;Ups Manufactoring s.r.l.
+RVC;RSI Systems Inc
+RVI;Realvision Inc
+RVL;Reveal Computer Prod
+RWC;Red Wing Corporation
+RXT;Tectona SoftSolutions (P) Ltd.,
+SAA;Sanritz Automation Co.,Ltd.
+SAE;Saab Aerotech
+SAG;Sedlbauer
+SAI;Sage Inc
+SAK;Saitek Ltd
+SAM;Samsung Electric Company
+SAN;Sanyo Electric Co.,Ltd.
+SAS;Stores Automated Systems Inc
+SAT;Shuttle Tech
+SBC;Shanghai Bell Telephone Equip Mfg Co
+SBD;Softbed - Consulting & Development Ltd
+SBI;SMART Technologies Inc.
+SBS;SBS-or Industrial Computers GmbH
+SBT;Senseboard Technologies AB
+SCC;SORD Computer Corporation
+SCD;Sanyo Electric Company Ltd
+SCE;Sun Corporation
+SCH;Schlumberger Cards
+SCI;System Craft
+SCL;Sigmacom Co., Ltd.
+SCM;SCM Microsystems Inc
+SCN;Scanport, Inc.
+SCO;SORCUS Computer GmbH
+SCP;Scriptel Corporation
+SCR;Systran Corporation
+SCS;Nanomach Anstalt
+SCT;Smart Card Technology
+SDA;SAT (Societe Anonyme)
+SDD;Intrada-SDD Ltd
+SDE;Sherwood Digital Electronics Corporation
+SDF;SODIFF E&T CO., Ltd.
+SDH;Communications Specialies, Inc.
+SDI;Samtron Displays Inc
+SDK;SAIT-Devlonics
+SDR;SDR Systems
+SDS;SunRiver Data System
+SDT;Siemens AG
+SDX;SDX Business Systems Ltd
+SEA;Seanix Technology Inc.
+SEB;system elektronik GmbH
+SEC;Seiko Epson Corporation
+SEE;SeeColor Corporation
+SEG;DO NOT USE
+SEI;Seitz & Associates Inc
+SEL;Way2Call Communications
+SEM;Samsung Electronics Company Ltd
+SEN;Sencore
+SEO;SEOS Ltd
+SEP;SEP Eletronica Ltda.
+SER;Sony Ericsson Mobile Communications Inc.
+SES;Session Control LLC
+SET;SendTek Corporation
+SFM;TORNADO Company
+SFT;Mikroforum Ring 3
+SGC;Spectragraphics Corporation
+SGD;Sigma Designs, Inc.
+SGE;Kansai Electric Company Ltd
+SGI;Scan Group Ltd
+SGL;Super Gate Technology Company Ltd
+SGM;SAGEM
+SGO;Logos Design A/S
+SGT;Stargate Technology
+SGX;Silicon Graphics Inc
+SGZ;Systec Computer GmbH
+SHC;ShibaSoku Co., Ltd.
+SHG;Soft & Hardware development Goldammer GmbH
+SHI;Jiangsu Shinco Electronic Group Co., Ltd
+SHP;Sharp Corporation
+SHR;Digital Discovery
+SHT;Shin Ho Tech
+SIA;SIEMENS AG
+SIB;Sanyo Electric Company Ltd
+SIC;Sysmate Corporation
+SID;Seiko Instruments Information Devices Inc
+SIE;Siemens
+SIG;Sigma Designs Inc
+SII;Silicon Image, Inc.
+SIL;Silicon Laboratories, Inc
+SIM;S3 Inc
+SIN;Singular Technology Co., Ltd.
+SIR;Sirius Technologies Pty Ltd
+SIS;Silicon Integrated Systems Corporation
+SIT;Sitintel
+SIU;Seiko Instruments USA Inc
+SIX;Zuniq Data Corporation
+SJE;Sejin Electron Inc
+SKD;Schneider & Koch
+SKT;Samsung Electro-Mechanics Company Ltd
+SKY;SKYDATA S.P.A.
+SLA;Systeme Lauer GmbH&Co KG
+SLB;Shlumberger Ltd
+SLC;Syslogic Datentechnik AG
+SLF;StarLeaf
+SLH;Silicon Library Inc.
+SLI;Symbios Logic Inc
+SLK;Silitek Corporation
+SLM;Solomon Technology Corporation
+SLR;Schlumberger Technology Corporate
+SLS;Schnick-Schnack-Systems GmbH
+SLT;Salt Internatioinal Corp.
+SLX;Specialix
+SMA;SMART Modular Technologies
+SMB;Schlumberger
+SMC;Standard Microsystems Corporation
+SME;Sysmate Company
+SMI;SpaceLabs Medical Inc
+SMK;SMK CORPORATION
+SML;Sumitomo Metal Industries, Ltd.
+SMM;Shark Multimedia Inc
+SMO;STMicroelectronics
+SMP;Simple Computing
+SMR;B.& V. s.r.l.
+SMS;Silicom Multimedia Systems Inc
+SMT;Silcom Manufacturing Tech Inc
+SNC;Sentronic International Corp.
+SNI;Siemens Microdesign GmbH
+SNK;S&K Electronics
+SNO;SINOSUN TECHNOLOGY CO., LTD
+SNP;Siemens Nixdorf Info Systems
+SNS;Cirtech (UK) Ltd
+SNT;SuperNet Inc
+SNW;Snell & Wilcox
+SNX;Sonix Comm. Ltd
+SNY;Sony
+SOI;Silicon Optix Corporation
+SOL;Solitron Technologies Inc
+SON;Sony
+SOR;Sorcus Computer GmbH
+SOT;Sotec Company Ltd
+SOY;SOYO Group, Inc
+SPC;SpinCore Technologies, Inc
+SPE;SPEA Software AG
+SPH;G&W Instruments GmbH
+SPI;SPACE-I Co., Ltd.
+SPK;SpeakerCraft
+SPL;Smart Silicon Systems Pty Ltd
+SPN;Sapience Corporation
+SPR;pmns GmbH
+SPS;Synopsys Inc
+SPT;Sceptre Tech Inc
+SPU;SIM2 Multimedia S.P.A.
+SPX;Simplex Time Recorder Co.
+SQT;Sequent Computer Systems Inc
+SRC;Integrated Tech Express Inc
+SRD;Setred
+SRF;Surf Communication Solutions Ltd
+SRG;Intuitive Surgical, Inc.
+SRT;SeeReal Technologies GmbH
+SSC;Sierra Semiconductor Inc
+SSD;FlightSafety International
+SSE;Samsung Electronic Co.
+SSI;S-S Technology Inc
+SSJ;Sankyo Seiki Mfg.co., Ltd
+SSP;Spectrum Signal Proecessing Inc
+SSS;S3 Inc
+SST;SystemSoft Corporation
+STA;ST Electronics Systems Assembly Pte Ltd
+STB;STB Systems Inc
+STC;STAC Electronics
+STD;STD Computer Inc
+STE;SII Ido-Tsushin Inc
+STF;Starflight Electronics
+STG;StereoGraphics Corp.
+STH;Semtech Corporation
+STI;Smart Tech Inc
+STK;SANTAK CORP.
+STL;SigmaTel Inc
+STM;SGS Thomson Microelectronics
+STN;Samsung Electronics America
+STO;Stollmann E+V GmbH
+STP;StreamPlay Ltd
+STR;Starlight Networks Inc
+STS;SITECSYSTEM CO., LTD.
+STT;Star Paging Telecom Tech (Shenzhen) Co. Ltd.
+STW;Starwin Inc.
+STY;SDS Technologies
+SUB;Subspace Comm. Inc
+SUM;Summagraphics Corporation
+SUN;Sun Electronics Corporation
+SUP;Supra Corporation
+SUR;Surenam Computer Corporation
+SVA;SGEG
+SVC;Intellix Corp.
+SVD;SVD Computer
+SVI;Sun Microsystems
+SVS;SVSI
+SVT;SEVIT Co., Ltd.
+SWC;Software Café
+SWI;Sierra Wireless Inc.
+SWL;Sharedware Ltd
+SWS;Static
+SWT;Software Technologies Group,Inc.
+SXB;Syntax-Brillian
+SXD;Silex technology, Inc.
+SXL;SolutionInside
+SXT;SHARP TAKAYA ELECTRONIC INDUSTRY CO.,LTD.
+SYC;Sysmic
+SYE;SY Electronics Ltd
+SYK;Stryker Communications
+SYL;Sylvania Computer Products
+SYM;Symicron Computer Communications Ltd.
+SYN;Synaptics Inc
+SYP;SYPRO Co Ltd
+SYS;Sysgration Ltd
+SYT;Seyeon Tech Company Ltd
+SYV;SYVAX Inc
+SYX;Prime Systems, Inc.
+TAA;Tandberg
+TAB;Todos Data System AB
+TAG;Teles AG
+TAI;Toshiba America Info Systems Inc
+TAM;Tamura Seisakusyo Ltd
+TAS;Taskit Rechnertechnik GmbH
+TAT;Teleliaison Inc
+TAX;Taxan (Europe) Ltd
+TBB;Triple S Engineering Inc
+TBC;Turbo Communication, Inc
+TBS;Turtle Beach System
+TCC;Tandon Corporation
+TCD;Taicom Data Systems Co., Ltd.
+TCE;Century Corporation
+TCH;Interaction Systems, Inc
+TCI;Tulip Computers Int'l B.V.
+TCJ;TEAC America Inc
+TCL;Technical Concepts Ltd
+TCM;3Com Corporation
+TCN;Tecnetics (PTY) Ltd
+TCO;Thomas-Conrad Corporation
+TCR;Thomson Consumer Electronics
+TCS;Tatung Company of America Inc
+TCT;Telecom Technology Centre Co. Ltd.
+TCX;FREEMARS Heavy Industries
+TDC;Teradici
+TDD;Tandberg Data Display AS
+TDK;TDK USA Corporation
+TDM;Tandem Computer Europe Inc
+TDP;3D Perception
+TDS;Tri-Data Systems Inc
+TDT;TDT
+TDV;TDVision Systems, Inc.
+TDY;Tandy Electronics
+TEA;TEAC System Corporation
+TEC;Tecmar Inc
+TEK;Tektronix Inc
+TEL;Promotion and Display Technology Ltd.
+TER;TerraTec Electronic GmbH
+TGI;TriGem Computer Inc
+TGM;TriGem Computer,Inc.
+TGS;Torus Systems Ltd
+TGV;Grass Valley Germany GmbH
+THN;Thundercom Holdings Sdn. Bhd.
+TIC;Trigem KinfoComm
+TIP;TIPTEL AG
+TIV;OOO Technoinvest
+TIX;Tixi.Com GmbH
+TKC;Taiko Electric Works.LTD
+TKN;Teknor Microsystem Inc
+TKO;TouchKo, Inc.
+TKS;TimeKeeping Systems, Inc.
+TLA;Ferrari Electronic GmbH
+TLD;Telindus
+TLI;TOSHIBA TELI CORPORATION
+TLK;Telelink AG
+TLS;Teleste Educational OY
+TLT;Dai Telecom S.p.A.
+TLV;S3 Inc
+TLX;Telxon Corporation
+TMC;Techmedia Computer Systems Corporation
+TME;AT&T Microelectronics
+TMI;Texas Microsystem
+TMM;Time Management, Inc.
+TMR;Taicom International Inc
+TMS;Trident Microsystems Ltd
+TMT;T-Metrics Inc.
+TMX;Thermotrex Corporation
+TNC;TNC Industrial Company Ltd
+TNJ;DO NOT USE
+TNM;TECNIMAGEN SA
+TNY;Tennyson Tech Pty Ltd
+TOE;TOEI Electronics Co., Ltd.
+TOG;The OPEN Group
+TOP;Orion Communications Co., Ltd.
+TOS;Toshiba Corporation
+TOU;Touchstone Technology
+TPC;Touch Panel Systems Corporation
+TPE;Technology Power Enterprises Inc
+TPJ;(none)
+TPK;TOPRE CORPORATION
+TPR;Topro Technology Inc
+TPS;Teleprocessing Systeme GmbH
+TPT;Thruput Ltd
+TPV;Top Victory Electronics ( Fujian ) Company Ltd
+TPZ;Ypoaz Systems Inc
+TRA;TriTech Microelectronics International
+TRC;Trioc AB
+TRD;Trident Microsystem Inc
+TRE;Tremetrics
+TRI;Tricord Systems
+TRL;Royal Information
+TRM;Tekram Technology Company Ltd
+TRN;Datacommunicatie Tron B.V.
+TRS;Torus Systems Ltd
+TRU;Aashima Technology B.V.
+TRX;Trex Enterprises
+TSB;Toshiba America Info Systems Inc
+TSC;Sanyo Electric Company Ltd
+TSD;TechniSat Digital GmbH
+TSE;Tottori Sanyo Electric
+TSF;Racal-Airtech Software Forge Ltd
+TSG;The Software Group Ltd
+TSI;TeleVideo Systems
+TSL;Tottori SANYO Electric Co., Ltd.
+TSP;U.S. Navy
+TST;Transtream Inc
+TSV;TRANSVIDEO
+TSY;TouchSystems
+TTA;Topson Technology Co., Ltd.
+TTB;National Semiconductor Japan Ltd
+TTC;Telecommunications Techniques Corporation
+TTE;TTE, Inc.
+TTI;Trenton Terminals Inc
+TTK;Totoku Electric Company Ltd
+TTL;2-Tel B.V.
+TTS;TechnoTrend Systemtechnik GmbH
+TTY;TRIDELITY Display Solutions GmbH
+TUT;Tut Systems
+TVD;Tecnovision
+TVI;Truevision
+TVM;Taiwan Video & Monitor Corporation
+TVO;TV One Ltd
+TVR;TV Interactive Corporation
+TVS;TVS Electronics Limited
+TWA;Tidewater Association
+TWE;Kontron Electronik
+TWH;Twinhead International Corporation
+TWI;Easytel oy
+TWK;TOWITOKO electronics GmbH
+TWX;TEKWorx Limited
+TXL;Trixel Ltd
+TXN;Texas Insturments
+TXT;Textron Defense System
+TYN;Tyan Computer Corporation
+UAS;Ultima Associates Pte Ltd
+UBI;Ungermann-Bass Inc
+UBL;Ubinetics Ltd.
+UDN;Uniden Corporation
+UEC;Ultima Electronics Corporation
+UEG;Elitegroup Computer Systems Company Ltd
+UEI;Universal Electronics Inc
+UET;Universal Empowering Technologies
+UFG;UNIGRAF-USA
+UFO;UFO Systems Inc
+UHB;XOCECO
+UIC;Uniform Industrial Corporation
+UJR;Ueda Japan Radio Co., Ltd.
+ULT;Ultra Network Tech
+UMC;United Microelectr Corporation
+UMG;Umezawa Giken Co.,Ltd
+UMM;Universal Multimedia
+UNA;Unisys DSD
+UNB;Unisys Corporation
+UNC;Unisys Corporation
+UND;DO NOT USE - UND
+UNE;DO NOT USE - UNE
+UNF;DO NOT USE - UNF
+UNI;Unisys Corporation
+UNI;Uniform Industry Corp.
+UNM;Unisys Corporation
+UNO;Unisys Corporation
+UNP;Unitop
+UNS;Unisys Corporation
+UNT;Unisys Corporation
+UNY;Unicate
+UPP;UPPI
+UPS;Systems Enhancement
+URD;Video Computer S.p.A.
+USA;Utimaco Safeware AG
+USD;U.S. Digital Corporation
+USI;Universal Scientific Industrial Co., Ltd.
+USR;U.S. Robotics Inc
+UTD;Up to Date Tech
+UWC;Uniwill Computer Corp.
+VAL;Valence Computing Corporation
+VAR;Varian Australia Pty Ltd
+VBT;Valley Board Ltda
+VCC;Virtual Computer Corporation
+VCI;VistaCom Inc
+VCJ;Victor Company of Japan, Limited
+VCM;Vector Magnetics, LLC
+VCX;VCONEX
+VDA;Victor Data Systems
+VDC;VDC Display Systems
+VDM;Vadem
+VDO;Video & Display Oriented Corporation
+VDS;Vidisys GmbH & Company
+VDT;Viditec, Inc.
+VEC;Vector Informatik GmbH
+VEK;Vektrex
+VES;Vestel Elektronik Sanayi ve Ticaret A. S.
+VFI;VeriFone Inc
+VHI;Macrocad Development Inc.
+VIA;VIA Tech Inc
+VIB;Tatung UK Ltd
+VIC;Victron B.V.
+VID;Ingram Macrotron Germany
+VIK;Viking Connectors
+VIN;Vine Micros Ltd
+VIR;Visual Interface, Inc
+VIS;Visioneer
+VIT;Visitech AS
+VLB;ValleyBoard Ltda.
+VLT;VideoLan Technologies
+VMI;Vermont Microsystems
+VML;Vine Micros Limited
+VNC;Vinca Corporation
+VOB;MaxData Computer AG
+VPI;Video Products Inc
+VPR;Best Buy
+VQ@;Vision Quest
+VRC;Virtual Resources Corporation
+VSC;ViewSonic Corporation
+VSD;3M
+VSI;VideoServer
+VSN;Ingram Macrotron
+VSP;Vision Systems GmbH
+VSR;V-Star Electronics Inc.
+VTC;VTel Corporation
+VTG;Voice Technologies Group Inc
+VTI;VLSI Tech Inc
+VTK;Viewteck Co., Ltd.
+VTL;Vivid Technology Pte Ltd
+VTM;Miltope Corporation
+VTN;VIDEOTRON CORP.
+VTS;VTech Computers Ltd
+VTV;VATIV Technologies
+VUT;Vutrix (UK) Ltd
+VWB;Vweb Corp.
+WAC;Wacom Tech
+WAL;Wave Access
+WAN;DO NOT USE
+WAV;Wavephore
+WBN;MicroSoftWare
+WBS;WB Systemtechnik GmbH
+WCI;Wisecom Inc
+WCS;Woodwind Communications Systems Inc
+WDC;Western Digital
+WDE;Westinghouse Digital Electronics
+WEB;WebGear Inc
+WEC;Winbond Electronics Corporation
+WEL ; W-DEV
+WEY;WEY Design AG
+WHI;Whistle Communications
+WII;Innoware Inc
+WIL;WIPRO Information Technology Ltd
+WIN;Wintop Technology Inc
+WIP;Wipro Infotech
+WKH;Uni-Take Int'l Inc.
+WLD;Wildfire Communications Inc
+WML;Wolfson Microelectronics Ltd
+WMO;Westermo Teleindustri AB
+WMT;Winmate Communication Inc
+WNI;WillNet Inc.
+WNV;Winnov L.P.
+WNX;Wincor Nixdorf International GmbH
+WPA;Matsushita Communication Industrial Co., Ltd.
+WPI;Wearnes Peripherals International (Pte) Ltd
+WRC;WiNRADiO Communications
+WSC;CIS Technology Inc
+WSP;Wireless And Smart Products Inc.
+WST;Wistron Corporation
+WTC;ACC Microelectronics
+WTI;WorkStation Tech
+WTK;Wearnes Thakral Pte
+WTS;Restek Electric Company Ltd
+WVM;Wave Systems Corporation
+WWV;World Wide Video, Inc.
+WXT;Woxter Technology Co. Ltd
+WYS;Myse Technology
+WYT;Wooyoung Image & Information Co.,Ltd.
+XAC;XAC Automation Corp
+XAD;Alpha Data
+XDM;XDM Ltd.
+XER;DO NOT USE
+XFG;Jan Strapko - FOTO
+XFO;EXFO Electro Optical Engineering
+XIN;Xinex Networks Inc
+XIO;Xiotech Corporation
+XIR;Xirocm Inc
+XIT;Xitel Pty ltd
+XLX;Xilinx, Inc.
+XMM;C3PO S.L.
+XNT;XN Technologies, Inc.
+XOC;DO NOT USE
+XQU;SHANGHAI SVA-DAV ELECTRONICS CO., LTD
+XRC;Xircom Inc
+XRO;XORO ELECTRONICS (CHENGDU) LIMITED
+XSN;Xscreen AS
+XST;XS Technologies Inc
+XSY;XSYS
+XTD;Icuiti Corporation
+XTE;X2E GmbH
+XTL;Crystal Computer
+XTN;X-10 (USA) Inc
+XYC;Xycotec Computer GmbH
+YED;Y-E Data Inc
+YHQ;Yokogawa Electric Corporation
+YHW;Exacom SA
+YMH;Yamaha Corporation
+YOW;American Biometric Company
+ZAN;Zandar Technologies plc
+ZAX;Zefiro Acoustics
+ZAZ;Zazzle Technologies
+ZBR;Zebra Technologies International, LLC
+ZCT;ZeitControl cardsystems GmbH
+ZDS;Zenith Data Systems
+ZGT;Zenith Data Systems
+ZIC;ZTEIC DESIGN CO., LTD.
+ZMT;Zalman Tech Co., Ltd.
+ZMZ;Z Microsystems
+ZNI;Zetinet Inc
+ZNX;Znyx Adv. Systems
+ZOW;Zowie Intertainment, Inc
+ZRN;Zoran Corporation
+ZSE;Zenith Data Systems
+ZTC;ZyDAS Technology Corporation
+ZTE;ZTE Corporation
+ZTI;Zoom Telephonics Inc
+ZTM;ZT Group Int'l Inc.
+ZYD;Zydacron Inc
+ZYP;Zypcom Inc
+ZYT;Zytex Computers
+ZYX;Zyxel
+ZZZ;Boca Research Inc
diff --git a/decoders/guess_bitrate/__init__.py b/decoders/guess_bitrate/__init__.py
new file mode 100644
index 0000000..9c7e6a4
--- /dev/null
+++ b/decoders/guess_bitrate/__init__.py
@@ -0,0 +1,38 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2013 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+This protocol decoder tries to guess the bitrate / baudrate of the
+communication on the specified channel. Typically this will be used to
+guess / detect the baudrate used in a UART communication snippet, but it
+could also be used to guess bitrates of certain other protocols or buses.
+
+It should be noted that this is nothing more than a simple guess / heuristic,
+and that there are various cases in practice where the detection of the
+bitrate or baudrate will not necessarily have the expected result.
+
+The precision of the estimated bitrate / baudrate will also depend on the
+samplerate used to sample the respective channel. For good results it is
+recommended to use a logic analyzer samplerate that is much higher than
+the expected bitrate/baudrate that might be used on the channel.
+'''
+
+from .pd import *
+
diff --git a/decoders/guess_bitrate/pd.py b/decoders/guess_bitrate/pd.py
new file mode 100644
index 0000000..e86316f
--- /dev/null
+++ b/decoders/guess_bitrate/pd.py
@@ -0,0 +1,85 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2013 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'guess_bitrate'
+ name = 'Guess bitrate'
+ longname = 'Guess bitrate/baudrate'
+ desc = 'Guess the bitrate/baudrate of a UART (or other) protocol.'
+ license = 'gplv2+'
+ inputs = ['logic']
+ outputs = ['guess_bitrate']
+ channels = (
+ {'id': 'data', 'name': 'Data', 'desc': 'Data line'},
+ )
+ annotations = (
+ ('bitrate', 'Bitrate / baudrate'),
+ )
+
+ def putx(self, data):
+ self.put(self.ss_edge, self.samplenum, self.out_ann, data)
+
+ def __init__(self, **kwargs):
+ self.olddata = None
+ self.ss_edge = None
+ self.first_transition = True
+ self.bitwidth = None
+
+ def start(self):
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def metadata(self, key, value):
+ if key == srd.SRD_CONF_SAMPLERATE:
+ self.samplerate = value;
+
+ def decode(self, ss, es, data):
+ if self.samplerate is None:
+ raise Exception("Cannot decode without samplerate.")
+ for (self.samplenum, pins) in data:
+
+ data = pins[0]
+
+ # Wait for any transition on the data line.
+ if data == self.olddata:
+ continue
+
+ # Initialize first self.olddata with the first sample value.
+ if self.olddata == None:
+ self.olddata = data
+ continue
+
+ # Get the smallest distance between two transitions
+ # and use that to calculate the bitrate/baudrate.
+ if self.first_transition == True:
+ self.ss_edge = self.samplenum
+ self.first_transition = False
+ else:
+ b = self.samplenum - self.ss_edge
+ if self.bitwidth == None or b < self.bitwidth:
+ self.bitwidth = b
+ bitrate = int(float(self.samplerate) / float(b))
+ self.putx([0, ['%d' % bitrate]])
+ self.ss_edge = self.samplenum
+
+ self.olddata = data
+
diff --git a/decoders/i2c/__init__.py b/decoders/i2c/__init__.py
new file mode 100644
index 0000000..ba40245
--- /dev/null
+++ b/decoders/i2c/__init__.py
@@ -0,0 +1,27 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+I²C (Inter-Integrated Circuit) is a bidirectional, multi-master
+bus using two signals (SCL = serial clock line, SDA = serial data line).
+'''
+
+from .pd import *
+
diff --git a/decoders/i2c/pd.py b/decoders/i2c/pd.py
new file mode 100644
index 0000000..2d6e5c2
--- /dev/null
+++ b/decoders/i2c/pd.py
@@ -0,0 +1,301 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2010-2014 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+# TODO: Look into arbitration, collision detection, clock synchronisation, etc.
+# TODO: Implement support for 10bit slave addresses.
+# TODO: Implement support for inverting SDA/SCL levels (0->1 and 1->0).
+# TODO: Implement support for detecting various bus errors.
+
+import sigrokdecode as srd
+
+'''
+OUTPUT_PYTHON format:
+
+Packet:
+[<ptype>, <pdata>]
+
+<ptype>:
+ - 'START' (START condition)
+ - 'START REPEAT' (Repeated START condition)
+ - 'ADDRESS READ' (Slave address, read)
+ - 'ADDRESS WRITE' (Slave address, write)
+ - 'DATA READ' (Data, read)
+ - 'DATA WRITE' (Data, write)
+ - 'STOP' (STOP condition)
+ - 'ACK' (ACK bit)
+ - 'NACK' (NACK bit)
+ - 'BITS' (<pdata>: list of data/address bits and their ss/es numbers)
+
+<pdata> is the data or address byte associated with the 'ADDRESS*' and 'DATA*'
+command. Slave addresses do not include bit 0 (the READ/WRITE indication bit).
+For example, a slave address field could be 0x51 (instead of 0xa2).
+For 'START', 'START REPEAT', 'STOP', 'ACK', and 'NACK' <pdata> is None.
+'''
+
+# CMD: [annotation-type-index, long annotation, short annotation]
+proto = {
+ 'START': [0, 'Start', 'S'],
+ 'START REPEAT': [1, 'Start repeat', 'Sr'],
+ 'STOP': [2, 'Stop', 'P'],
+ 'ACK': [3, 'ACK', 'A'],
+ 'NACK': [4, 'NACK', 'N'],
+ 'BIT': [5, 'Bit', 'B'],
+ 'ADDRESS READ': [6, 'Address read', 'AR'],
+ 'ADDRESS WRITE': [7, 'Address write', 'AW'],
+ 'DATA READ': [8, 'Data read', 'DR'],
+ 'DATA WRITE': [9, 'Data write', 'DW'],
+}
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'i2c'
+ name = 'I²C'
+ longname = 'Inter-Integrated Circuit'
+ desc = 'Two-wire, multi-master, serial bus.'
+ license = 'gplv2+'
+ inputs = ['logic']
+ outputs = ['i2c']
+ channels = (
+ {'id': 'scl', 'name': 'SCL', 'desc': 'Serial clock line'},
+ {'id': 'sda', 'name': 'SDA', 'desc': 'Serial data line'},
+ )
+ options = (
+ {'id': 'address_format', 'desc': 'Displayed slave address format',
+ 'default': 'shifted', 'values': ('shifted', 'unshifted')},
+ )
+ annotations = (
+ ('start', 'Start condition'),
+ ('repeat-start', 'Repeat start condition'),
+ ('stop', 'Stop condition'),
+ ('ack', 'ACK'),
+ ('nack', 'NACK'),
+ ('bit', 'Data/address bit'),
+ ('address-read', 'Address read'),
+ ('address-write', 'Address write'),
+ ('data-read', 'Data read'),
+ ('data-write', 'Data write'),
+ ('warnings', 'Human-readable warnings'),
+ )
+ annotation_rows = (
+ ('bits', 'Bits', (5,)),
+ ('addr-data', 'Address/Data', (0, 1, 2, 3, 4, 6, 7, 8, 9)),
+ ('warnings', 'Warnings', (10,)),
+ )
+ binary = (
+ ('address-read', 'Address read'),
+ ('address-write', 'Address write'),
+ ('data-read', 'Data read'),
+ ('data-write', 'Data write'),
+ )
+
+ def __init__(self, **kwargs):
+ self.samplerate = None
+ self.ss = self.es = self.byte_ss = -1
+ self.samplenum = None
+ self.bitcount = 0
+ self.databyte = 0
+ self.wr = -1
+ self.is_repeat_start = 0
+ self.state = 'FIND START'
+ self.oldscl = self.oldsda = 1
+ self.oldpins = [1, 1]
+ self.pdu_start = None
+ self.pdu_bits = 0
+ self.bits = []
+
+ def metadata(self, key, value):
+ if key == srd.SRD_CONF_SAMPLERATE:
+ self.samplerate = value
+
+ def start(self):
+ self.out_python = self.register(srd.OUTPUT_PYTHON)
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+ self.out_binary = self.register(srd.OUTPUT_BINARY)
+ self.out_bitrate = self.register(srd.OUTPUT_META,
+ meta=(int, 'Bitrate', 'Bitrate from Start bit to Stop bit'))
+
+ def putx(self, data):
+ self.put(self.ss, self.es, self.out_ann, data)
+
+ def putp(self, data):
+ self.put(self.ss, self.es, self.out_python, data)
+
+ def putb(self, data):
+ self.put(self.ss, self.es, self.out_binary, data)
+
+ def is_start_condition(self, scl, sda):
+ # START condition (S): SDA = falling, SCL = high
+ if (self.oldsda == 1 and sda == 0) and scl == 1:
+ return True
+ return False
+
+ def is_data_bit(self, scl, sda):
+ # Data sampling of receiver: SCL = rising
+ if self.oldscl == 0 and scl == 1:
+ return True
+ return False
+
+ def is_stop_condition(self, scl, sda):
+ # STOP condition (P): SDA = rising, SCL = high
+ if (self.oldsda == 0 and sda == 1) and scl == 1:
+ return True
+ return False
+
+ def found_start(self, scl, sda):
+ self.ss, self.es = self.samplenum, self.samplenum
+ self.pdu_start = self.samplenum
+ self.pdu_bits = 0
+ cmd = 'START REPEAT' if (self.is_repeat_start == 1) else 'START'
+ self.putp([cmd, None])
+ self.putx([proto[cmd][0], proto[cmd][1:]])
+ self.state = 'FIND ADDRESS'
+ self.bitcount = self.databyte = 0
+ self.is_repeat_start = 1
+ self.wr = -1
+ self.bits = []
+
+ # Gather 8 bits of data plus the ACK/NACK bit.
+ def found_address_or_data(self, scl, sda):
+ # Address and data are transmitted MSB-first.
+ self.databyte <<= 1
+ self.databyte |= sda
+
+ # Remember the start of the first data/address bit.
+ if self.bitcount == 0:
+ self.byte_ss = self.samplenum
+
+ # Store individual bits and their start/end samplenumbers.
+ # In the list, index 0 represents the LSB (I²C transmits MSB-first).
+ self.bits.insert(0, [sda, self.samplenum, self.samplenum])
+ if self.bitcount > 0:
+ self.bits[1][2] = self.samplenum
+ if self.bitcount == 7:
+ self.bitwidth = self.bits[1][2] - self.bits[2][2]
+ self.bits[0][2] += self.bitwidth
+
+ # Return if we haven't collected all 8 + 1 bits, yet.
+ if self.bitcount < 7:
+ self.bitcount += 1
+ return
+
+ d = self.databyte
+ if self.state == 'FIND ADDRESS':
+ # The READ/WRITE bit is only in address bytes, not data bytes.
+ self.wr = 0 if (self.databyte & 1) else 1
+ if self.options['address_format'] == 'shifted':
+ d = d >> 1
+
+ bin_class = -1
+ if self.state == 'FIND ADDRESS' and self.wr == 1:
+ cmd = 'ADDRESS WRITE'
+ bin_class = 1
+ elif self.state == 'FIND ADDRESS' and self.wr == 0:
+ cmd = 'ADDRESS READ'
+ bin_class = 0
+ elif self.state == 'FIND DATA' and self.wr == 1:
+ cmd = 'DATA WRITE'
+ bin_class = 3
+ elif self.state == 'FIND DATA' and self.wr == 0:
+ cmd = 'DATA READ'
+ bin_class = 2
+
+ self.ss, self.es = self.byte_ss, self.samplenum + self.bitwidth
+
+ self.putp(['BITS', self.bits])
+ self.putp([cmd, d])
+
+ self.putb((bin_class, bytes([d])))
+
+ for bit in self.bits:
+ self.put(bit[1], bit[2], self.out_ann, [5, ['%d' % bit[0]]])
+
+ if cmd.startswith('ADDRESS'):
+ self.ss, self.es = self.samplenum, self.samplenum + self.bitwidth
+ w = ['Write', 'Wr', 'W'] if self.wr else ['Read', 'Rd', 'R']
+ self.putx([proto[cmd][0], w])
+ self.ss, self.es = self.byte_ss, self.samplenum
+
+ self.putx([proto[cmd][0], ['%s: %02X' % (proto[cmd][1], d),
+ '%s: %02X' % (proto[cmd][2], d), '%02X' % d]])
+
+ # Done with this packet.
+ self.bitcount = self.databyte = 0
+ self.bits = []
+ self.state = 'FIND ACK'
+
+ def get_ack(self, scl, sda):
+ self.ss, self.es = self.samplenum, self.samplenum + self.bitwidth
+ cmd = 'NACK' if (sda == 1) else 'ACK'
+ self.putp([cmd, None])
+ self.putx([proto[cmd][0], proto[cmd][1:]])
+ # There could be multiple data bytes in a row, so either find
+ # another data byte or a STOP condition next.
+ self.state = 'FIND DATA'
+
+ def found_stop(self, scl, sda):
+ # Meta bitrate
+ elapsed = 1 / float(self.samplerate) * (self.samplenum - self.pdu_start + 1)
+ bitrate = int(1 / elapsed * self.pdu_bits)
+ self.put(self.byte_ss, self.samplenum, self.out_bitrate, bitrate)
+
+ cmd = 'STOP'
+ self.ss, self.es = self.samplenum, self.samplenum
+ self.putp([cmd, None])
+ self.putx([proto[cmd][0], proto[cmd][1:]])
+ self.state = 'FIND START'
+ self.is_repeat_start = 0
+ self.wr = -1
+ self.bits = []
+
+ def decode(self, ss, es, data):
+ if self.samplerate is None:
+ raise Exception("Cannot decode without samplerate.")
+ for (self.samplenum, pins) in data:
+
+ # Ignore identical samples early on (for performance reasons).
+ if self.oldpins == pins:
+ continue
+ self.oldpins, (scl, sda) = pins, pins
+
+ self.pdu_bits += 1
+
+ # State machine.
+ if self.state == 'FIND START':
+ if self.is_start_condition(scl, sda):
+ self.found_start(scl, sda)
+ elif self.state == 'FIND ADDRESS':
+ if self.is_data_bit(scl, sda):
+ self.found_address_or_data(scl, sda)
+ elif self.state == 'FIND DATA':
+ if self.is_data_bit(scl, sda):
+ self.found_address_or_data(scl, sda)
+ elif self.is_start_condition(scl, sda):
+ self.found_start(scl, sda)
+ elif self.is_stop_condition(scl, sda):
+ self.found_stop(scl, sda)
+ elif self.state == 'FIND ACK':
+ if self.is_data_bit(scl, sda):
+ self.get_ack(scl, sda)
+ else:
+ raise Exception('Invalid state: %s' % self.state)
+
+ # Save current SDA/SCL values for the next round.
+ self.oldscl, self.oldsda = scl, sda
+
diff --git a/decoders/i2cdemux/__init__.py b/decoders/i2cdemux/__init__.py
new file mode 100644
index 0000000..c5202c5
--- /dev/null
+++ b/decoders/i2cdemux/__init__.py
@@ -0,0 +1,29 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+This is a generic I²C demultiplexing protocol decoder.
+
+It takes an I²C stream as input and outputs multiple I²C streams, each
+stream containing only I²C packets for one specific I²C slave.
+'''
+
+from .pd import *
+
diff --git a/decoders/i2cdemux/pd.py b/decoders/i2cdemux/pd.py
new file mode 100644
index 0000000..e5cf47a
--- /dev/null
+++ b/decoders/i2cdemux/pd.py
@@ -0,0 +1,78 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'i2cdemux'
+ name = 'I²C demux'
+ longname = 'I²C demultiplexer'
+ desc = 'Demux I²C packets into per-slave-address streams.'
+ license = 'gplv2+'
+ inputs = ['i2c']
+ outputs = [] # TODO: Only known at run-time.
+
+ def __init__(self, **kwargs):
+ self.packets = [] # Local cache of I²C packets
+ self.slaves = [] # List of known slave addresses
+ self.stream = -1 # Current output stream
+ self.streamcount = 0 # Number of created output streams
+
+ def start(self):
+ self.out_python = []
+
+ # Grab I²C packets into a local cache, until an I²C STOP condition
+ # packet comes along. At some point before that STOP condition, there
+ # will have been an ADDRESS READ or ADDRESS WRITE which contains the
+ # I²C address of the slave that the master wants to talk to.
+ # We use this slave address to figure out which output stream should
+ # get the whole chunk of packets (from START to STOP).
+ def decode(self, ss, es, data):
+
+ cmd, databyte = data
+
+ # Add the I²C packet to our local cache.
+ self.packets.append([ss, es, data])
+
+ if cmd in ('ADDRESS READ', 'ADDRESS WRITE'):
+ if databyte in self.slaves:
+ self.stream = self.slaves.index(databyte)
+ return
+
+ # We're never seen this slave, add a new stream.
+ self.slaves.append(databyte)
+ self.out_python.append(self.register(srd.OUTPUT_PYTHON,
+ proto_id='i2c-%s' % hex(databyte)))
+ self.stream = self.streamcount
+ self.streamcount += 1
+ elif cmd == 'STOP':
+ if self.stream == -1:
+ raise Exception('Invalid stream!') # FIXME?
+
+ # Send the whole chunk of I²C packets to the correct stream.
+ for p in self.packets:
+ self.put(p[0], p[1], self.out_python[self.stream], p[2])
+
+ self.packets = []
+ self.stream = -1
+ else:
+ pass # Do nothing, only add the I²C packet to our cache.
+
diff --git a/decoders/i2cfilter/__init__.py b/decoders/i2cfilter/__init__.py
new file mode 100644
index 0000000..6cbab8a
--- /dev/null
+++ b/decoders/i2cfilter/__init__.py
@@ -0,0 +1,38 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Bert Vermeulen <bert at biot.com>
+##
+## 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 <http://www.gnu.org/licenses/>.
+##
+
+'''
+This is a generic I²C filtering protocol decoder.
+
+It takes input from the I²C protocol decoder and removes all traffic
+except that from/to the specified slave address and/or direction.
+
+It then outputs the filtered data again as OUTPUT_PROTO of type/format 'i2c'
+(up the protocol decoder stack). No annotations are output.
+
+The I²C slave address to filter out should be passed in as an option
+'address', as an integer. A specific read or write operation can be selected
+with the 'direction' option, which should be 'read', 'write', or 'both'.
+
+Both of these are optional; if no options are specified the entire payload
+of the I²C session will be output.
+'''
+
+from .pd import *
+
diff --git a/decoders/i2cfilter/pd.py b/decoders/i2cfilter/pd.py
new file mode 100644
index 0000000..f1ac6a4
--- /dev/null
+++ b/decoders/i2cfilter/pd.py
@@ -0,0 +1,93 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Bert Vermeulen <bert at biot.com>
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 <http://www.gnu.org/licenses/>.
+##
+
+# TODO: Support for filtering out multiple slave/direction pairs?
+
+import sigrokdecode as srd
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'i2cfilter'
+ name = 'I²C filter'
+ longname = 'I²C filter'
+ desc = 'Filter out addresses/directions in an I²C stream.'
+ license = 'gplv3+'
+ inputs = ['i2c']
+ outputs = ['i2c']
+ options = (
+ {'id': 'address', 'desc': 'Address to filter out of the I²C stream',
+ 'default': 0},
+ {'id': 'direction', 'desc': 'Direction to filter', 'default': 'both',
+ 'values': ('read', 'write', 'both')}
+ )
+
+ def __init__(self, **kwargs):
+ self.state = None
+ self.curslave = -1
+ self.curdirection = None
+ self.packets = [] # Local cache of I²C packets
+
+ def start(self):
+ self.out_python = self.register(srd.OUTPUT_PYTHON, proto_id='i2c')
+ if self.options['address'] not in range(0, 127 + 1):
+ raise Exception('Invalid slave (must be 0..127).')
+ if self.options['direction'] not in ('both', 'read', 'write'):
+ raise Exception('Invalid direction (valid: read/write/both).')
+
+ # Grab I²C packets into a local cache, until an I²C STOP condition
+ # packet comes along. At some point before that STOP condition, there
+ # will have been an ADDRESS READ or ADDRESS WRITE which contains the
+ # I²C address of the slave that the master wants to talk to.
+ # If that slave shall be filtered, output the cache (all packets from
+ # START to STOP) as proto 'i2c', otherwise drop it.
+ def decode(self, ss, es, data):
+
+ cmd, databyte = data
+
+ # Add the I²C packet to our local cache.
+ self.packets.append([ss, es, data])
+
+ if cmd in ('ADDRESS READ', 'ADDRESS WRITE'):
+ self.curslave = databyte
+ self.curdirection = cmd[8:].lower()
+ elif cmd in ('STOP', 'START REPEAT'):
+ # If this chunk was not for the correct slave, drop it.
+ if self.options['address'] == 0:
+ pass
+ elif self.curslave != self.options['address']:
+ self.packets = []
+ return
+
+ # If this chunk was not in the right direction, drop it.
+ if self.options['direction'] == 'both':
+ pass
+ elif self.options['direction'] != self.curdirection:
+ self.packets = []
+ return
+
+ # TODO: START->STOP chunks with both read and write (Repeat START)
+ # Otherwise, send out the whole chunk of I²C packets.
+ for p in self.packets:
+ self.put(p[0], p[1], self.out_python, p[2])
+
+ self.packets = []
+ else:
+ pass # Do nothing, only add the I²C packet to our cache.
+
diff --git a/decoders/i2s/__init__.py b/decoders/i2s/__init__.py
new file mode 100644
index 0000000..b9c0ed7
--- /dev/null
+++ b/decoders/i2s/__init__.py
@@ -0,0 +1,31 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Joel Holdsworth <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+I²S (Integrated Interchip Sound) is a serial bus for connecting digital
+audio devices (usually on the same device/board).
+
+Details:
+http://www.nxp.com/acrobat_download/various/I2SBUS.pdf
+http://en.wikipedia.org/wiki/I2s
+'''
+
+from .pd import *
+
diff --git a/decoders/i2s/pd.py b/decoders/i2s/pd.py
new file mode 100644
index 0000000..989a5a5
--- /dev/null
+++ b/decoders/i2s/pd.py
@@ -0,0 +1,186 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Joel Holdsworth <joel at airwebreathe.org.uk>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+
+'''
+OUTPUT_PYTHON format:
+
+Packet:
+[<ptype>, <pdata>]
+
+<ptype>, <pdata>:
+ - 'DATA', [<channel>, <value>]
+
+<channel>: 'L' or 'R'
+<value>: integer
+'''
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'i2s'
+ name = 'I²S'
+ longname = 'Integrated Interchip Sound'
+ desc = 'Serial bus for connecting digital audio devices.'
+ license = 'gplv2+'
+ inputs = ['logic']
+ outputs = ['i2s']
+ channels = (
+ {'id': 'sck', 'name': 'SCK', 'desc': 'Bit clock line'},
+ {'id': 'ws', 'name': 'WS', 'desc': 'Word select line'},
+ {'id': 'sd', 'name': 'SD', 'desc': 'Serial data line'},
+ )
+ annotations = (
+ ('left', 'Left channel'),
+ ('right', 'Right channel'),
+ ('warnings', 'Warnings'),
+ )
+ binary = (
+ ('wav', 'WAV file'),
+ )
+
+ def __init__(self, **kwargs):
+ self.samplerate = None
+ self.oldsck = 1
+ self.oldws = 1
+ self.bitcount = 0
+ self.data = 0
+ self.samplesreceived = 0
+ self.first_sample = None
+ self.start_sample = None
+ self.wordlength = -1
+ self.wrote_wav_header = False
+
+ def start(self):
+ self.out_python = self.register(srd.OUTPUT_PYTHON)
+ self.out_bin = self.register(srd.OUTPUT_BINARY)
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def metadata(self, key, value):
+ if key == srd.SRD_CONF_SAMPLERATE:
+ self.samplerate = value
+
+ def putpb(self, data):
+ self.put(self.start_sample, self.samplenum, self.out_python, data)
+
+ def putbin(self, data):
+ self.put(self.start_sample, self.samplenum, self.out_bin, data)
+
+ def putb(self, data):
+ self.put(self.start_sample, self.samplenum, self.out_ann, data)
+
+ def report(self):
+
+ # Calculate the sample rate.
+ samplerate = '?'
+ if self.start_sample != None and \
+ self.first_sample != None and \
+ self.start_sample > self.first_sample:
+ samplerate = '%d' % (self.samplesreceived *
+ self.samplerate / (self.start_sample -
+ self.first_sample))
+
+ return 'I²S: %d %d-bit samples received at %sHz' % \
+ (self.samplesreceived, self.wordlength, samplerate)
+
+ def wav_header(self):
+ # Chunk descriptor
+ h = b'RIFF'
+ h += b'\x24\x80\x00\x00' # Chunk size (2084)
+ h += b'WAVE'
+ # Fmt subchunk
+ h += b'fmt '
+ h += b'\x10\x00\x00\x00' # Subchunk size (16 bytes)
+ h += b'\x01\x00' # Audio format (0x0001 == PCM)
+ h += b'\x02\x00' # Number of channels (2)
+ h += b'\x80\x3e\x00\x00' # Samplerate (16000)
+ h += b'\x00\x7d\x00\x00' # Byterate (32000)
+ h += b'\x04\x00' # Blockalign (4)
+ h += b'\x10\x00' # Bits per sample (16)
+ # Data subchunk
+ h += b'data'
+ h += b'\xff\xff\x00\x00' # Subchunk size (65535 bytes) TODO
+ return h
+
+ def wav_sample(self, sample):
+ # TODO: This currently assumes U32 samples, and converts to S16.
+ s = sample >> 16
+ if s >= 0x8000:
+ s -= 0x10000
+ lo, hi = s & 0xff, (s >> 8) & 0xff
+ return bytes([lo, hi])
+
+ def decode(self, ss, es, data):
+ if self.samplerate is None:
+ raise Exception("Cannot decode without samplerate.")
+ for self.samplenum, (sck, ws, sd) in data:
+
+ # Ignore sample if the bit clock hasn't changed.
+ if sck == self.oldsck:
+ continue
+
+ self.oldsck = sck
+ if sck == 0: # Ignore the falling clock edge.
+ continue
+
+ self.data = (self.data << 1) | sd
+ self.bitcount += 1
+
+ # This was not the LSB unless WS has flipped.
+ if ws == self.oldws:
+ continue
+
+ # Only submit the sample, if we received the beginning of it.
+ if self.start_sample != None:
+
+ if not self.wrote_wav_header:
+ self.put(0, 0, self.out_bin, (0, self.wav_header()))
+ self.wrote_wav_header = True
+
+ self.samplesreceived += 1
+
+ idx = 0 if self.oldws else 1
+ c1 = 'Left channel' if self.oldws else 'Right channel'
+ c2 = 'Left' if self.oldws else 'Right'
+ c3 = 'L' if self.oldws else 'R'
+ v = '%08x' % self.data
+ self.putpb(['DATA', [c3, self.data]])
+ self.putb([idx, ['%s: %s' % (c1, v), '%s: %s' % (c2, v),
+ '%s: %s' % (c3, v), c3]])
+ self.putbin((0, self.wav_sample(self.data)))
+
+ # Check that the data word was the correct length.
+ if self.wordlength != -1 and self.wordlength != self.bitcount:
+ self.putb([2, ['Received %d-bit word, expected %d-bit '
+ 'word' % (self.bitcount, self.wordlength)]])
+
+ self.wordlength = self.bitcount
+
+ # Reset decoder state.
+ self.data = 0
+ self.bitcount = 0
+ self.start_sample = self.samplenum
+
+ # Save the first sample position.
+ if self.first_sample == None:
+ self.first_sample = self.samplenum
+
+ self.oldws = ws
+
diff --git a/decoders/ir_nec/__init__.py b/decoders/ir_nec/__init__.py
new file mode 100644
index 0000000..84bf428
--- /dev/null
+++ b/decoders/ir_nec/__init__.py
@@ -0,0 +1,26 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2014 Gump Yang <gump.yang at gmail.com>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+NEC is a pulse-distance based infrared remote control protocol.
+'''
+
+from .pd import *
+
diff --git a/decoders/ir_nec/lists.py b/decoders/ir_nec/lists.py
new file mode 100644
index 0000000..c9dc595
--- /dev/null
+++ b/decoders/ir_nec/lists.py
@@ -0,0 +1,52 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2014 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+# Addresses/devices. Items that are not listed are reserved/unknown.
+address = {
+ 0x40: 'Matsui TV',
+}
+
+digits = {
+ 0: ['0', '0'],
+ 1: ['1', '1'],
+ 2: ['2', '2'],
+ 3: ['3', '3'],
+ 4: ['4', '4'],
+ 5: ['5', '5'],
+ 6: ['6', '6'],
+ 7: ['7', '7'],
+ 8: ['8', '8'],
+ 9: ['9', '9'],
+}
+
+# Commands. Items that are not listed are reserved/unknown.
+command = {
+ 0x40: dict(list(digits.items()) + list({
+ 11: ['-/--', '-/--'],
+ 16: ['Mute', 'M'],
+ 18: ['Standby', 'StBy'],
+ 26: ['Volume up', 'Vol+'],
+ 27: ['Program up', 'P+'],
+ 30: ['Volume down', 'Vol-'],
+ 31: ['Program down', 'P-'],
+ 68: ['AV', 'AV'],
+ }.items())),
+}
+
diff --git a/decoders/ir_nec/pd.py b/decoders/ir_nec/pd.py
new file mode 100644
index 0000000..94e232f
--- /dev/null
+++ b/decoders/ir_nec/pd.py
@@ -0,0 +1,206 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2014 Gump Yang <gump.yang at gmail.com>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+from .lists import *
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'ir_nec'
+ name = 'IR NEC'
+ longname = 'IR NEC'
+ desc = 'NEC infrared remote control protocol.'
+ license = 'gplv2+'
+ inputs = ['logic']
+ outputs = ['ir_nec']
+ channels = (
+ {'id': 'ir', 'name': 'IR', 'desc': 'Data line'},
+ )
+ options = (
+ {'id': 'polarity', 'desc': 'Polarity', 'default': 'active-low',
+ 'values': ('active-low', 'active-high')},
+ )
+ annotations = (
+ ('bit', 'Bit'),
+ ('agc-pulse', 'AGC pulse'),
+ ('longpause', 'Long pause'),
+ ('shortpause', 'Short pause'),
+ ('stop-bit', 'Stop bit'),
+ ('leader-code', 'Leader code'),
+ ('addr', 'Address'),
+ ('addr-inv', 'Address#'),
+ ('cmd', 'Command'),
+ ('cmd-inv', 'Command#'),
+ ('repeat-code', 'Repeat code'),
+ ('remote', 'Remote'),
+ ('warnings', 'Warnings'),
+ )
+ annotation_rows = (
+ ('bits', 'Bits', (0, 1, 2, 3, 4)),
+ ('fields', 'Fields', (5, 6, 7, 8, 9, 10)),
+ ('remote', 'Remote', (11,)),
+ ('warnings', 'Warnings', (12,)),
+ )
+
+ def putx(self, data):
+ self.put(self.ss_start, self.samplenum, self.out_ann, data)
+
+ def putb(self, data):
+ self.put(self.ss_bit, self.samplenum, self.out_ann, data)
+
+ def putd(self, data):
+ name = self.state.title()
+ d = {'ADDRESS': 6, 'ADDRESS#': 7, 'COMMAND': 8, 'COMMAND#': 9}
+ s = {'ADDRESS': ['ADDR', 'A'], 'ADDRESS#': ['ADDR#', 'A#'],
+ 'COMMAND': ['CMD', 'C'], 'COMMAND#': ['CMD#', 'C#']}
+ self.putx([d[self.state], ['%s: 0x%02X' % (name, data),
+ '%s: 0x%02X' % (s[self.state][0], data),
+ '%s: 0x%02X' % (s[self.state][1], data), s[self.state][1]]])
+
+ def putstop(self, ss):
+ self.put(ss, ss + self.stop, self.out_ann,
+ [4, ['Stop bit', 'Stop', 'St', 'S']])
+
+ def putpause(self, p):
+ self.put(self.ss_start, self.ss_other_edge, self.out_ann,
+ [1, ['AGC pulse', 'AGC', 'A']])
+ idx = 2 if p == 'Long' else 3
+ self.put(self.ss_other_edge, self.samplenum, self.out_ann,
+ [idx, [p + ' pause', '%s-pause' % p[0], '%sP' % p[0], 'P']])
+
+ def putremote(self):
+ dev = address.get(self.addr, 'Unknown device')
+ buttons = command.get(self.addr, None)
+ if buttons is None:
+ btn = ['Unknown', 'Unk']
+ else:
+ btn = buttons.get(self.cmd, ['Unknown', 'Unk'])
+ self.put(self.ss_remote, self.ss_bit + self.stop, self.out_ann,
+ [11, ['%s: %s' % (dev, btn[0]), '%s: %s' % (dev, btn[1]),
+ '%s' % btn[1]]])
+
+ def __init__(self, **kwargs):
+ self.state = 'IDLE'
+ self.ss_bit = self.ss_start = self.ss_other_edge = self.ss_remote = 0
+ self.data = self.count = self.active = self.old_ir = None
+ self.addr = self.cmd = None
+
+ def start(self):
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+ self.active = 0 if self.options['polarity'] == 'active-low' else 1
+ self.old_ir = 1 if self.active == 0 else 0
+
+ def metadata(self, key, value):
+ if key == srd.SRD_CONF_SAMPLERATE:
+ self.samplerate = value
+ self.margin = int(self.samplerate * 0.0001) - 1 # 0.1ms
+ self.lc = int(self.samplerate * 0.0135) - 1 # 13.5ms
+ self.rc = int(self.samplerate * 0.01125) - 1 # 11.25ms
+ self.dazero = int(self.samplerate * 0.001125) - 1 # 1.125ms
+ self.daone = int(self.samplerate * 0.00225) - 1 # 2.25ms
+ self.stop = int(self.samplerate * 0.000652) - 1 # 0.652ms
+
+ def handle_bit(self, tick):
+ ret = None
+ if tick in range(self.dazero - self.margin, self.dazero + self.margin):
+ ret = 0
+ elif tick in range(self.daone - self.margin, self.daone + self.margin):
+ ret = 1
+ if ret in (0, 1):
+ self.putb([0, ['%d' % ret]])
+ self.data |= (ret << self.count) # LSB-first
+ self.count = self.count + 1
+ self.ss_bit = self.samplenum
+
+ def data_ok(self):
+ ret, name = (self.data >> 8) & (self.data & 0xff), self.state.title()
+ if self.count == 8:
+ if self.state == 'ADDRESS':
+ self.addr = self.data
+ if self.state == 'COMMAND':
+ self.cmd = self.data
+ self.putd(self.data)
+ self.ss_start = self.samplenum
+ return True
+ if ret == 0:
+ self.putd(self.data >> 8)
+ else:
+ self.putx([12, ['%s error: 0x%04X' % (name, self.data)]])
+ self.data = self.count = 0
+ self.ss_bit = self.ss_start = self.samplenum
+ return ret == 0
+
+ def decode(self, ss, es, data):
+ if self.samplerate is None:
+ raise Exception("Cannot decode without samplerate.")
+ for (self.samplenum, pins) in data:
+ self.ir = pins[0]
+
+ # Wait for an "interesting" edge, but also record the other ones.
+ if self.old_ir == self.ir:
+ continue
+ if self.ir != self.active:
+ self.ss_other_edge = self.samplenum
+ self.old_ir = self.ir
+ continue
+
+ b = self.samplenum - self.ss_bit
+
+ # State machine.
+ if self.state == 'IDLE':
+ if b in range(self.lc - self.margin, self.lc + self.margin):
+ self.putpause('Long')
+ self.putx([5, ['Leader code', 'Leader', 'LC', 'L']])
+ self.ss_remote = self.ss_start
+ self.data = self.count = 0
+ self.state = 'ADDRESS'
+ elif b in range(self.rc - self.margin, self.rc + self.margin):
+ self.putpause('Short')
+ self.putstop(self.samplenum)
+ self.samplenum += self.stop
+ self.putx([10, ['Repeat code', 'Repeat', 'RC', 'R']])
+ self.data = self.count = 0
+ self.ss_bit = self.ss_start = self.samplenum
+ elif self.state == 'ADDRESS':
+ self.handle_bit(b)
+ if self.count == 8:
+ self.state = 'ADDRESS#' if self.data_ok() else 'IDLE'
+ elif self.state == 'ADDRESS#':
+ self.handle_bit(b)
+ if self.count == 16:
+ self.state = 'COMMAND' if self.data_ok() else 'IDLE'
+ elif self.state == 'COMMAND':
+ self.handle_bit(b)
+ if self.count == 8:
+ self.state = 'COMMAND#' if self.data_ok() else 'IDLE'
+ elif self.state == 'COMMAND#':
+ self.handle_bit(b)
+ if self.count == 16:
+ self.state = 'STOP' if self.data_ok() else 'IDLE'
+ elif self.state == 'STOP':
+ self.putstop(self.ss_bit)
+ self.putremote()
+ self.ss_bit = self.ss_start = self.samplenum
+ self.state = 'IDLE'
+ else:
+ raise Exception('Invalid state: %s' % self.state)
+
+ self.old_ir = self.ir
+
diff --git a/decoders/ir_rc5/__init__.py b/decoders/ir_rc5/__init__.py
new file mode 100644
index 0000000..085082f
--- /dev/null
+++ b/decoders/ir_rc5/__init__.py
@@ -0,0 +1,26 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2014 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+RC-5 is a biphase/manchester based infrared remote control protocol.
+'''
+
+from .pd import *
+
diff --git a/decoders/ir_rc5/lists.py b/decoders/ir_rc5/lists.py
new file mode 100644
index 0000000..8a81ef7
--- /dev/null
+++ b/decoders/ir_rc5/lists.py
@@ -0,0 +1,95 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2014 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+# Systems/addresses (0..31). Items that are not listed are reserved/unknown.
+system = {
+ 0: ['TV receiver 1', 'TV1'],
+ 1: ['TV receiver 2', 'TV2'],
+ 2: ['Teletext', 'Txt'],
+ 3: ['Extension to TV1 and TV2', 'Ext TV1/TV2'],
+ 4: ['LaserVision player', 'LV'],
+ 5: ['Video cassette recorder 1', 'VCR1'],
+ 6: ['Video cassette recorder 2', 'VCR2'],
+ 7: ['Experimental', 'Exp'],
+ 8: ['Satellite TV receiver 1', 'Sat1'],
+ 9: ['Extension to VCR1 and VCR2', 'Ext VCR1/VCR2'],
+ 10: ['Satellite TV receiver 2', 'Sat2'],
+ 12: ['Compact disc video player', 'CD-Video'],
+ 13: ['Camcorder', 'Cam'],
+ 14: ['Photo on compact disc player', 'CD-Photo'],
+ 16: ['Audio preamplifier 1', 'Preamp1'],
+ 17: ['Radio tuner', 'Tuner'],
+ 18: ['Analog cassette recoder 1', 'Rec1'],
+ 19: ['Audio preamplifier 2', 'Preamp2'],
+ 20: ['Compact disc player', 'CD'],
+ 21: ['Audio stack or record player', 'Combi'],
+ 22: ['Audio satellite', 'Sat'],
+ 23: ['Analog cassette recoder 2', 'Rec2'],
+ 26: ['Compact disc recorder', 'CD-R'],
+ 29: ['Lighting 1', 'Light1'],
+ 30: ['Lighting 2', 'Light2'],
+ 31: ['Telephone', 'Phone'],
+}
+
+digits = {
+ 0: ['0', '0'],
+ 1: ['1', '1'],
+ 2: ['2', '2'],
+ 3: ['3', '3'],
+ 4: ['4', '4'],
+ 5: ['5', '5'],
+ 6: ['6', '6'],
+ 7: ['7', '7'],
+ 8: ['8', '8'],
+ 9: ['9', '9'],
+}
+
+# Commands (0..63 for RC-5, and 0..127 for Extended RC-5).
+# Items that are not listed are reserved/unknown.
+command = {
+ 'TV': dict(list(digits.items()) + list({
+ 10: ['-/--', '-/--'],
+ 11: ['Channel/program', 'Ch/P'],
+ 12: ['Standby', 'StBy'],
+ 13: ['Mute', 'M'],
+ 14: ['Personal preferences', 'PP'],
+ 14: ['Display', 'Disp'],
+ 16: ['Volume up', 'Vol+'],
+ 17: ['Volume down', 'Vol-'],
+ 18: ['Brightness up', 'Br+'],
+ 19: ['Brightness down', 'Br-'],
+ 20: ['Saturation up', 'S+'],
+ 21: ['Saturation down', 'S-'],
+ 32: ['Program up', 'P+'],
+ 33: ['Program down', 'P-'],
+ }.items())),
+ 'VCR': dict(list(digits.items()) + list({
+ 10: ['-/--', '-/--'],
+ 12: ['Standby', 'StBy'],
+ 32: ['Program up', 'P+'],
+ 33: ['Program down', 'P-'],
+ 50: ['Fast rewind', 'FRW'],
+ 52: ['Fast forward', 'FFW'],
+ 53: ['Play', 'Pl'],
+ 54: ['Stop', 'St'],
+ 55: ['Recording', 'Rec'],
+ }.items())),
+}
+
diff --git a/decoders/ir_rc5/pd.py b/decoders/ir_rc5/pd.py
new file mode 100644
index 0000000..38b4793
--- /dev/null
+++ b/decoders/ir_rc5/pd.py
@@ -0,0 +1,183 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2014 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+from .lists import *
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'ir_rc5'
+ name = 'IR RC-5'
+ longname = 'IR RC-5'
+ desc = 'RC-5 infrared remote control protocol.'
+ license = 'gplv2+'
+ inputs = ['logic']
+ outputs = ['ir_rc5']
+ channels = (
+ {'id': 'ir', 'name': 'IR', 'desc': 'IR data line'},
+ )
+ options = (
+ {'id': 'polarity', 'desc': 'Polarity', 'default': 'active-low',
+ 'values': ('active-low', 'active-high')},
+ {'id': 'protocol', 'desc': 'Protocol type', 'default': 'standard',
+ 'values': ('standard', 'extended')},
+ )
+ annotations = (
+ ('bit', 'Bit'),
+ ('startbit1', 'Startbit 1'),
+ ('startbit2', 'Startbit 2'),
+ ('togglebit-0', 'Toggle bit 0'),
+ ('togglebit-1', 'Toggle bit 1'),
+ ('address', 'Address'),
+ ('command', 'Command'),
+ )
+ annotation_rows = (
+ ('bits', 'Bits', (0,)),
+ ('fields', 'Fields', (1, 2, 3, 4, 5, 6)),
+ )
+
+ def __init__(self, **kwargs):
+ self.samplerate = None
+ self.samplenum = None
+ self.edges, self.bits, self.bits_ss_es = [], [], []
+ self.state = 'IDLE'
+
+ def start(self):
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+ self.old_ir = 1 if self.options['polarity'] == 'active-low' else 0
+
+ def metadata(self, key, value):
+ if key == srd.SRD_CONF_SAMPLERATE:
+ self.samplerate = value
+ # One bit: 1.78ms (one half low, one half high).
+ self.halfbit = int((self.samplerate * 0.00178) / 2.0)
+
+ def putb(self, bit1, bit2, data):
+ ss, es = self.bits_ss_es[bit1][0], self.bits_ss_es[bit2][1]
+ self.put(ss, es, self.out_ann, data)
+
+ def handle_bits(self):
+ a, c, b = 0, 0, self.bits
+ # Individual raw bits.
+ for i in range(14):
+ if i == 0:
+ ss = max(0, self.bits[0][0] - self.halfbit)
+ else:
+ ss = self.bits_ss_es[i - 1][1]
+ es = self.bits[i][0] + self.halfbit
+ self.bits_ss_es.append([ss, es])
+ self.putb(i, i, [0, ['%d' % self.bits[i][1]]])
+ # Bits[0:0]: Startbit 1
+ s = ['Startbit1: %d' % b[0][1], 'SB1: %d' % b[0][1], 'SB1', 'S1', 'S']
+ self.putb(0, 0, [1, s])
+ # Bits[1:1]: Startbit 2
+ ann_idx = 2
+ s = ['Startbit2: %d' % b[1][1], 'SB2: %d' % b[1][1], 'SB2', 'S2', 'S']
+ if self.options['protocol'] == 'extended':
+ s = ['CMD[6]#: %d' % b[1][1], 'C6#: %d' % b[1][1], 'C6#', 'C#', 'C']
+ ann_idx = 6
+ self.putb(1, 1, [ann_idx, s])
+ # Bits[2:2]: Toggle bit
+ s = ['Togglebit: %d' % b[2][1], 'Toggle: %d' % b[2][1],
+ 'TB: %d' % b[2][1], 'TB', 'T']
+ self.putb(2, 2, [3 if b[2][1] == 0 else 4, s])
+ # Bits[3:7]: Address (MSB-first)
+ for i in range(5):
+ a |= (b[3 + i][1] << (4 - i))
+ x = system.get(a, ['Unknown', 'Unk'])
+ s = ['Address: %d (%s)' % (a, x[0]), 'Addr: %d (%s)' % (a, x[1]),
+ 'Addr: %d' % a, 'A: %d' % a, 'A']
+ self.putb(3, 7, [5, s])
+ # Bits[8:13]: Command (MSB-first)
+ for i in range(6):
+ c |= (b[8 + i][1] << (5 - i))
+ if self.options['protocol'] == 'extended':
+ inverted_bit6 = 1 if b[1][1] == 0 else 0
+ c |= (inverted_bit6 << 6)
+ cmd_type = 'VCR' if x[1] in ('VCR1', 'VCR2') else 'TV'
+ x = command[cmd_type].get(c, ['Unknown', 'Unk'])
+ s = ['Command: %d (%s)' % (c, x[0]), 'Cmd: %d (%s)' % (c, x[1]),
+ 'Cmd: %d' % c, 'C: %d' % c, 'C']
+ self.putb(8, 13, [6, s])
+
+ def edge_type(self):
+ # Categorize according to distance from last edge (short/long).
+ distance = self.samplenum - self.edges[-1]
+ s, l, margin = self.halfbit, self.halfbit * 2, int(self.halfbit / 2)
+ if distance in range(l - margin, l + margin + 1):
+ return 'l'
+ elif distance in range(s - margin, s + margin + 1):
+ return 's'
+ else:
+ return 'e' # Error, invalid edge distance.
+
+ def reset_decoder_state(self):
+ self.edges, self.bits, self.bits_ss_es = [], [], []
+ self.state = 'IDLE'
+
+ def decode(self, ss, es, data):
+ if self.samplerate is None:
+ raise Exception("Cannot decode without samplerate.")
+ for (self.samplenum, pins) in data:
+
+ self.ir = pins[0]
+
+ # Wait for any edge (rising or falling).
+ if self.old_ir == self.ir:
+ continue
+
+ # State machine.
+ if self.state == 'IDLE':
+ self.edges.append(self.samplenum)
+ self.bits.append([self.samplenum, 1])
+ self.state = 'MID1'
+ self.old_ir = self.ir
+ continue
+ edge = self.edge_type()
+ if edge == 'e':
+ self.reset_decoder_state() # Reset state machine upon errors.
+ continue
+ if self.state == 'MID1':
+ self.state = 'START1' if edge == 's' else 'MID0'
+ bit = None if edge == 's' else 0
+ elif self.state == 'MID0':
+ self.state = 'START0' if edge == 's' else 'MID1'
+ bit = None if edge == 's' else 1
+ elif self.state == 'START1':
+ if edge == 's':
+ self.state = 'MID1'
+ bit = 1 if edge == 's' else None
+ elif self.state == 'START0':
+ if edge == 's':
+ self.state = 'MID0'
+ bit = 0 if edge == 's' else None
+ else:
+ raise Exception('Invalid state: %s' % self.state)
+
+ self.edges.append(self.samplenum)
+ if bit != None:
+ self.bits.append([self.samplenum, bit])
+
+ if len(self.bits) == 14:
+ self.handle_bits()
+ self.reset_decoder_state()
+
+ self.old_ir = self.ir
+
diff --git a/decoders/jtag/__init__.py b/decoders/jtag/__init__.py
new file mode 100644
index 0000000..047e54a
--- /dev/null
+++ b/decoders/jtag/__init__.py
@@ -0,0 +1,32 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+JTAG (Joint Test Action Group), a.k.a. "IEEE 1149.1: Standard Test Access Port
+and Boundary-Scan Architecture", is a protocol used for testing, debugging,
+and flashing various digital ICs.
+
+Details:
+https://en.wikipedia.org/wiki/Joint_Test_Action_Group
+http://focus.ti.com/lit/an/ssya002c/ssya002c.pdf
+'''
+
+from .pd import *
+
diff --git a/decoders/jtag/pd.py b/decoders/jtag/pd.py
new file mode 100644
index 0000000..25f2634
--- /dev/null
+++ b/decoders/jtag/pd.py
@@ -0,0 +1,220 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012-2013 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+
+'''
+OUTPUT_PYTHON format:
+
+Packet:
+[<ptype>, <pdata>]
+
+<ptype>:
+ - 'NEW STATE': <pdata> is the new state of the JTAG state machine.
+ Valid values: 'TEST-LOGIC-RESET', 'RUN-TEST/IDLE', 'SELECT-DR-SCAN',
+ 'CAPTURE-DR', 'SHIFT-DR', 'EXIT1-DR', 'PAUSE-DR', 'EXIT2-DR', 'UPDATE-DR',
+ 'SELECT-IR-SCAN', 'CAPTURE-IR', 'SHIFT-IR', 'EXIT1-IR', 'PAUSE-IR',
+ 'EXIT2-IR', 'UPDATE-IR'.
+ - 'IR TDI': Bitstring that was clocked into the IR register.
+ - 'IR TDO': Bitstring that was clocked out of the IR register.
+ - 'DR TDI': Bitstring that was clocked into the DR register.
+ - 'DR TDO': Bitstring that was clocked out of the DR register.
+ - ...
+
+All bitstrings are a sequence of '1' and '0' characters. The right-most
+character in the bitstring is the LSB. Example: '01110001' (1 is LSB).
+'''
+
+jtag_states = [
+ # Intro "tree"
+ 'TEST-LOGIC-RESET', 'RUN-TEST/IDLE',
+ # DR "tree"
+ 'SELECT-DR-SCAN', 'CAPTURE-DR', 'UPDATE-DR', 'PAUSE-DR',
+ 'SHIFT-DR', 'EXIT1-DR', 'EXIT2-DR',
+ # IR "tree"
+ 'SELECT-IR-SCAN', 'CAPTURE-IR', 'UPDATE-IR', 'PAUSE-IR',
+ 'SHIFT-IR', 'EXIT1-IR', 'EXIT2-IR',
+]
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'jtag'
+ name = 'JTAG'
+ longname = 'Joint Test Action Group (IEEE 1149.1)'
+ desc = 'Protocol for testing, debugging, and flashing ICs.'
+ license = 'gplv2+'
+ inputs = ['logic']
+ outputs = ['jtag']
+ channels = (
+ {'id': 'tdi', 'name': 'TDI', 'desc': 'Test data input'},
+ {'id': 'tdo', 'name': 'TDO', 'desc': 'Test data output'},
+ {'id': 'tck', 'name': 'TCK', 'desc': 'Test clock'},
+ {'id': 'tms', 'name': 'TMS', 'desc': 'Test mode select'},
+ )
+ optional_channels = (
+ {'id': 'trst', 'name': 'TRST#', 'desc': 'Test reset'},
+ {'id': 'srst', 'name': 'SRST#', 'desc': 'System reset'},
+ {'id': 'rtck', 'name': 'RTCK', 'desc': 'Return clock signal'},
+ )
+ annotations = tuple([tuple([s.lower(), s]) for s in jtag_states])
+
+ def __init__(self, **kwargs):
+ # self.state = 'TEST-LOGIC-RESET'
+ self.state = 'RUN-TEST/IDLE'
+ self.oldstate = None
+ self.oldpins = (-1, -1, -1, -1)
+ self.oldtck = -1
+ self.bits_tdi = []
+ self.bits_tdo = []
+ self.samplenum = 0
+ self.ss_item = self.es_item = None
+ self.saved_item = None
+ self.first = True
+
+ def start(self):
+ self.out_python = self.register(srd.OUTPUT_PYTHON)
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def putx(self, data):
+ self.put(self.ss_item, self.es_item, self.out_ann, data)
+
+ def putp(self, data):
+ self.put(self.ss_item, self.es_item, self.out_python, data)
+
+ def advance_state_machine(self, tms):
+ self.oldstate = self.state
+
+ # Intro "tree"
+ if self.state == 'TEST-LOGIC-RESET':
+ self.state = 'TEST-LOGIC-RESET' if (tms) else 'RUN-TEST/IDLE'
+ elif self.state == 'RUN-TEST/IDLE':
+ self.state = 'SELECT-DR-SCAN' if (tms) else 'RUN-TEST/IDLE'
+
+ # DR "tree"
+ elif self.state == 'SELECT-DR-SCAN':
+ self.state = 'SELECT-IR-SCAN' if (tms) else 'CAPTURE-DR'
+ elif self.state == 'CAPTURE-DR':
+ self.state = 'EXIT1-DR' if (tms) else 'SHIFT-DR'
+ elif self.state == 'SHIFT-DR':
+ self.state = 'EXIT1-DR' if (tms) else 'SHIFT-DR'
+ elif self.state == 'EXIT1-DR':
+ self.state = 'UPDATE-DR' if (tms) else 'PAUSE-DR'
+ elif self.state == 'PAUSE-DR':
+ self.state = 'EXIT2-DR' if (tms) else 'PAUSE-DR'
+ elif self.state == 'EXIT2-DR':
+ self.state = 'UPDATE-DR' if (tms) else 'SHIFT-DR'
+ elif self.state == 'UPDATE-DR':
+ self.state = 'SELECT-DR-SCAN' if (tms) else 'RUN-TEST/IDLE'
+
+ # IR "tree"
+ elif self.state == 'SELECT-IR-SCAN':
+ self.state = 'TEST-LOGIC-RESET' if (tms) else 'CAPTURE-IR'
+ elif self.state == 'CAPTURE-IR':
+ self.state = 'EXIT1-IR' if (tms) else 'SHIFT-IR'
+ elif self.state == 'SHIFT-IR':
+ self.state = 'EXIT1-IR' if (tms) else 'SHIFT-IR'
+ elif self.state == 'EXIT1-IR':
+ self.state = 'UPDATE-IR' if (tms) else 'PAUSE-IR'
+ elif self.state == 'PAUSE-IR':
+ self.state = 'EXIT2-IR' if (tms) else 'PAUSE-IR'
+ elif self.state == 'EXIT2-IR':
+ self.state = 'UPDATE-IR' if (tms) else 'SHIFT-IR'
+ elif self.state == 'UPDATE-IR':
+ self.state = 'SELECT-DR-SCAN' if (tms) else 'RUN-TEST/IDLE'
+
+ else:
+ raise Exception('Invalid state: %s' % self.state)
+
+ def handle_rising_tck_edge(self, tdi, tdo, tck, tms):
+ # Rising TCK edges always advance the state machine.
+ self.advance_state_machine(tms)
+
+ if self.first == True:
+ # Save the start sample and item for later (no output yet).
+ self.ss_item = self.samplenum
+ self.first = False
+ self.saved_item = self.state
+ else:
+ # Output the saved item (from the last CLK edge to the current).
+ self.es_item = self.samplenum
+ # Output the state we just switched to.
+ self.putx([jtag_states.index(self.state), [self.state]])
+ self.putp(['NEW STATE', self.state])
+ self.ss_item = self.samplenum
+ self.saved_item = self.state
+
+ # If we went from SHIFT-IR to SHIFT-IR, or SHIFT-DR to SHIFT-DR,
+ # collect the current TDI/TDO values (upon rising TCK edge).
+ if self.state.startswith('SHIFT-') and self.oldstate == self.state:
+ self.bits_tdi.insert(0, tdi)
+ self.bits_tdo.insert(0, tdo)
+ # TODO: ANN/PROTO output.
+ # self.putx([0, ['TDI add: ' + str(tdi)]])
+ # self.putp([0, ['TDO add: ' + str(tdo)]])
+
+ # Output all TDI/TDO bits if we just switched from SHIFT-* to EXIT1-*.
+ if self.oldstate.startswith('SHIFT-') and \
+ self.state.startswith('EXIT1-'):
+
+ t = self.state[-2:] + ' TDI'
+ b = ''.join(map(str, self.bits_tdi))
+ h = ' (0x%x' % int('0b' + b, 2) + ')'
+ s = t + ': ' + b + h + ', ' + str(len(self.bits_tdi)) + ' bits'
+ # self.putx([0, [s]])
+ # self.putp([t, b])
+ self.bits_tdi = []
+
+ t = self.state[-2:] + ' TDO'
+ b = ''.join(map(str, self.bits_tdo))
+ h = ' (0x%x' % int('0b' + b, 2) + ')'
+ s = t + ': ' + b + h + ', ' + str(len(self.bits_tdo)) + ' bits'
+ # self.putx([0, [s]])
+ # self.putp([t, b])
+ self.bits_tdo = []
+
+ def decode(self, ss, es, data):
+ for (self.samplenum, pins) in data:
+
+ # If none of the pins changed, there's nothing to do.
+ if self.oldpins == pins:
+ continue
+
+ # Store current pin values for the next round.
+ self.oldpins = pins
+
+ # Get individual pin values into local variables.
+ # Unused channels will have a value of > 1.
+ (tdi, tdo, tck, tms, trst, srst, rtck) = pins
+
+ # We only care about TCK edges (either rising or falling).
+ if (self.oldtck == tck):
+ continue
+
+ # Store start/end sample for later usage.
+ self.ss, self.es = ss, es
+
+ # self.putx([0, ['tdi:%s, tdo:%s, tck:%s, tms:%s' \
+ # % (tdi, tdo, tck, tms)]])
+
+ if (self.oldtck == 0 and tck == 1):
+ self.handle_rising_tck_edge(tdi, tdo, tck, tms)
+
+ self.oldtck = tck
+
diff --git a/decoders/jtag_stm32/__init__.py b/decoders/jtag_stm32/__init__.py
new file mode 100644
index 0000000..8a28528
--- /dev/null
+++ b/decoders/jtag_stm32/__init__.py
@@ -0,0 +1,31 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+This decoder stacks on top of the 'jtag' PD and decodes JTAG data specific to
+the STM32 microcontroller series.
+
+Details:
+https://en.wikipedia.org/wiki/STM32
+http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/REFERENCE_MANUAL/CD00171190.pdf (e.g. chapter 31.7: "JTAG debug port")
+'''
+
+from .pd import *
+
diff --git a/decoders/jtag_stm32/pd.py b/decoders/jtag_stm32/pd.py
new file mode 100644
index 0000000..5aac07f
--- /dev/null
+++ b/decoders/jtag_stm32/pd.py
@@ -0,0 +1,223 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+
+# JTAG debug port data registers (in IR[3:0]) and their sizes (in bits)
+# Note: The ARM DAP-DP is not IEEE 1149.1 (JTAG) compliant (as per ARM docs),
+# as it does not implement the EXTEST, SAMPLE, and PRELOAD instructions.
+# Instead, BYPASS is decoded for any of these instructions.
+ir = {
+ '1111': ['BYPASS', 1], # Bypass register
+ '1110': ['IDCODE', 32], # ID code register
+ '1010': ['DPACC', 35], # Debug port access register
+ '1011': ['APACC', 35], # Access port access register
+ '1000': ['ABORT', 35], # Abort register # TODO: 32 bits? Datasheet typo?
+}
+
+# ARM Cortex-M3 r1p1-01rel0 ID code
+cm3_idcode = 0x3ba00477
+
+# JTAG ID code in the STM32F10xxx BSC (boundary scan) TAP
+jtag_idcode = {
+ 0x06412041: 'Low-density device, rev. A',
+ 0x06410041: 'Medium-density device, rev. A',
+ 0x16410041: 'Medium-density device, rev. B/Z/Y',
+ 0x06414041: 'High-density device, rev. A/Z/Y',
+ 0x06430041: 'XL-density device, rev. A',
+ 0x06418041: 'Connectivity-line device, rev. A/Z',
+}
+
+# ACK[2:0] in the DPACC/APACC registers (unlisted values are reserved)
+ack_val = {
+ '001': 'WAIT',
+ '010': 'OK/FAULT',
+}
+
+# 32bit debug port registers (addressed via A[3:2])
+dp_reg = {
+ '00': 'Reserved', # Must be kept at reset value
+ '01': 'DP CTRL/STAT',
+ '10': 'DP SELECT',
+ '11': 'DP RDBUFF',
+}
+
+# APB-AP registers (each of them 32 bits wide)
+apb_ap_reg = {
+ 0x00: ['CSW', 'Control/status word'],
+ 0x04: ['TAR', 'Transfer address'],
+ # 0x08: Reserved SBZ
+ 0x0c: ['DRW', 'Data read/write'],
+ 0x10: ['BD0', 'Banked data 0'],
+ 0x14: ['BD1', 'Banked data 1'],
+ 0x18: ['BD2', 'Banked data 2'],
+ 0x1c: ['BD3', 'Banked data 3'],
+ # 0x20-0xf4: Reserved SBZ
+ 0x800000000: ['ROM', 'Debug ROM address'],
+ 0xfc: ['IDR', 'Identification register'],
+}
+
+# TODO: All start/end sample values in self.put() calls are bogus.
+# TODO: Split off generic ARM/Cortex-M3 parts into another protocol decoder?
+
+# Bits[31:28]: Version (here: 0x3)
+# JTAG-DP: 0x3, SW-DP: 0x2
+# Bits[27:12]: Part number (here: 0xba00)
+# JTAG-DP: 0xba00, SW-DP: 0xba10
+# Bits[11:1]: JEDEC (JEP-106) manufacturer ID (here: 0x23b)
+# Bits[11:8]: Continuation code ('ARM Limited': 0x04)
+# Bits[7:1]: Identity code ('ARM Limited': 0x3b)
+# Bits[0:0]: Reserved (here: 0x1)
+def decode_device_id_code(bits):
+ id_hex = '0x%x' % int('0b' + bits, 2)
+ ver = '0x%x' % int('0b' + bits[-32:-28], 2)
+ part = '0x%x' % int('0b' + bits[-28:-12], 2)
+ manuf = '0x%x' % int('0b' + bits[-12:-1], 2)
+ res = '0x%x' % int('0b' + bits[-1], 2)
+ return (id_hex, ver, part, manuf, res)
+
+# DPACC is used to access debug port registers (CTRL/STAT, SELECT, RDBUFF).
+# APACC is used to access all Access Port (AHB-AP) registers.
+
+# APACC/DPACC, when transferring data IN:
+# Bits[34:3] = DATA[31:0]: 32bit data to transfer (write request)
+# Bits[2:1] = A[3:2]: 2-bit address (debug/access port register)
+# Bits[0:0] = RnW: Read request (1) or write request (0)
+def data_in(instruction, bits):
+ data, a, rnw = bits[:-3], bits[-3:-1], bits[-1]
+ data_hex = '0x%x' % int('0b' + data, 2)
+ r = 'Read request' if (rnw == '1') else 'Write request'
+ # reg = dp_reg[a] if (instruction == 'DPACC') else apb_ap_reg[a]
+ reg = dp_reg[a] if (instruction == 'DPACC') else a # TODO
+ return 'New transaction: DATA: %s, A: %s, RnW: %s' % (data_hex, reg, r)
+
+# APACC/DPACC, when transferring data OUT:
+# Bits[34:3] = DATA[31:0]: 32bit data which is read (read request)
+# Bits[2:0] = ACK[2:0]: 3-bit acknowledge
+def data_out(bits):
+ data, ack = bits[:-3], bits[-3:]
+ data_hex = '0x%x' % int('0b' + data, 2)
+ ack_meaning = ack_val.get(ack, 'Reserved')
+ return 'Previous transaction result: DATA: %s, ACK: %s' \
+ % (data_hex, ack_meaning)
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'jtag_stm32'
+ name = 'JTAG / STM32'
+ longname = 'Joint Test Action Group / ST STM32'
+ desc = 'ST STM32-specific JTAG protocol.'
+ license = 'gplv2+'
+ inputs = ['jtag']
+ outputs = ['jtag_stm32']
+ annotations = (
+ ('text', 'Human-readable text'),
+ )
+
+ def __init__(self, **kwargs):
+ self.state = 'IDLE'
+ # self.state = 'BYPASS'
+
+ def start(self):
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def handle_reg_bypass(self, cmd, bits):
+ # TODO
+ self.put(self.ss, self.es, self.out_ann, [0, ['BYPASS: ' + bits]])
+
+ def handle_reg_idcode(self, cmd, bits):
+ # TODO
+ # IDCODE is a read-only register which is always accessible.
+ # IR == IDCODE: The device ID code is shifted out via DR next.
+ self.put(self.ss, self.es, self.out_ann,
+ [0, ['IDCODE: %s (ver=%s, part=%s, manuf=%s, res=%s)' % \
+ decode_device_id_code(bits)]])
+
+ def handle_reg_dpacc(self, cmd, bits):
+ # self.put(self.ss, self.es, self.out_ann,
+ # [0, ['DPACC/%s: %s' % (cmd, bits)]])
+ s = data_in('DPACC', bits) if (cmd == 'DR TDI') else data_out(bits)
+ self.put(self.ss, self.es, self.out_ann, [0, [s]])
+
+ def handle_reg_apacc(self, cmd, bits):
+ # self.put(self.ss, self.es, self.out_ann,
+ # [0, ['APACC/%s: %s' % (cmd, bits)]])
+ s = data_in('APACC', bits) if (cmd == 'DR TDI') else data_out(bits)
+ self.put(self.ss, self.es, self.out_ann, [0, [s]])
+
+ def handle_reg_abort(self, cmd, bits):
+ # Bits[31:1]: reserved. Bit[0]: DAPABORT.
+ a = '' if (bits[0] == '1') else 'No '
+ s = 'DAPABORT = %s: %sDAP abort generated' % (bits[0], a)
+ self.put(self.ss, self.es, self.out_ann, [0, [s]])
+
+ # Warn if DAPABORT[31:1] contains non-zero bits.
+ if (bits[:-1] != ('0' * 31)):
+ self.put(self.ss, self.es, self.out_ann,
+ [0, ['WARNING: DAPABORT[31:1] reserved!']])
+
+ def handle_reg_unknown(self, cmd, bits):
+ self.put(self.ss, self.es, self.out_ann,
+ [0, ['Unknown instruction: ' % bits]]) # TODO
+
+ def decode(self, ss, es, data):
+ # Assumption: The right-most char in the 'val' bitstring is the LSB.
+ cmd, val = data
+
+ self.ss, self.es = ss, es
+
+ # self.put(self.ss, self.es, self.out_ann, [0, [cmd + ' / ' + val]])
+
+ # State machine
+ if self.state == 'IDLE':
+ # Wait until a new instruction is shifted into the IR register.
+ if cmd != 'IR TDI':
+ return
+ # Switch to the state named after the instruction, or 'UNKNOWN'.
+ # Ignore bits other than IR[3:0]. While the IR register is only
+ # 4 bits in size, some programs (e.g. OpenOCD) might fill in a
+ # few more (dummy) bits. OpenOCD makes IR at least 8 bits long.
+ self.state = ir.get(val[-4:], ['UNKNOWN', 0])[0]
+ self.put(self.ss, self.es, self.out_ann, [0, ['IR: ' + self.state]])
+ elif self.state == 'BYPASS':
+ # Here we're interested in incoming bits (TDI).
+ if cmd != 'DR TDI':
+ return
+ handle_reg = getattr(self, 'handle_reg_%s' % self.state.lower())
+ handle_reg(cmd, val)
+ self.state = 'IDLE'
+ elif self.state in ('IDCODE', 'ABORT', 'UNKNOWN'):
+ # Here we're interested in outgoing bits (TDO).
+ if cmd != 'DR TDO':
+ return
+ handle_reg = getattr(self, 'handle_reg_%s' % self.state.lower())
+ handle_reg(cmd, val)
+ self.state = 'IDLE'
+ elif self.state in ('DPACC', 'APACC'):
+ # Here we're interested in incoming and outgoing bits (TDI/TDO).
+ if cmd not in ('DR TDI', 'DR TDO'):
+ return
+ handle_reg = getattr(self, 'handle_reg_%s' % self.state.lower())
+ handle_reg(cmd, val)
+ if cmd == 'DR TDO': # TODO: Assumes 'DR TDI' comes before 'DR TDO'
+ self.state = 'IDLE'
+ else:
+ raise Exception('Invalid state: %s' % self.state)
+
diff --git a/decoders/lm75/__init__.py b/decoders/lm75/__init__.py
new file mode 100644
index 0000000..d096418
--- /dev/null
+++ b/decoders/lm75/__init__.py
@@ -0,0 +1,27 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+This decoder stacks on top of the 'i2c' PD and decodes the National LM75
+(and compatibles) temperature sensor protocol.
+'''
+
+from .pd import *
+
diff --git a/decoders/lm75/pd.py b/decoders/lm75/pd.py
new file mode 100644
index 0000000..89d6c61
--- /dev/null
+++ b/decoders/lm75/pd.py
@@ -0,0 +1,186 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+# TODO: Better support for various LM75 compatible devices.
+
+import sigrokdecode as srd
+
+# LM75 only supports 9 bit resolution, compatible devices usually 9-12 bits.
+resolution = {
+ # CONFIG[6:5]: <resolution>
+ 0x00: 9,
+ 0x01: 10,
+ 0x02: 11,
+ 0x03: 12,
+}
+
+ft = {
+ # CONFIG[4:3]: <fault tolerance setting>
+ 0x00: 1,
+ 0x01: 2,
+ 0x02: 4,
+ 0x03: 6,
+}
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'lm75'
+ name = 'LM75'
+ longname = 'National LM75'
+ desc = 'National LM75 (and compatibles) temperature sensor.'
+ license = 'gplv2+'
+ inputs = ['i2c']
+ outputs = ['lm75']
+ options = (
+ {'id': 'sensor', 'desc': 'Sensor type', 'default': 'lm75',
+ 'values': ('lm75',)},
+ {'id': 'resolution', 'desc': 'Resolution (bits)', 'default': 9,
+ 'values': (9, 10, 11, 12)},
+ )
+ annotations = (
+ ('celsius', 'Temperature in degrees Celsius'),
+ ('kelvin', 'Temperature in Kelvin'),
+ ('text-verbose', 'Human-readable text (verbose)'),
+ ('text', 'Human-readable text'),
+ ('warnings', 'Human-readable warnings'),
+ )
+
+ def __init__(self, **kwargs):
+ self.state = 'IDLE'
+ self.reg = 0x00 # Currently selected register
+ self.databytes = []
+
+ def start(self):
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def putx(self, data):
+ # Helper for annotations which span exactly one I²C packet.
+ self.put(self.ss, self.es, self.out_ann, data)
+
+ def putb(self, data):
+ # Helper for annotations which span a block of I²C packets.
+ self.put(self.block_start, self.block_end, self.out_ann, data)
+
+ def warn_upon_invalid_slave(self, addr):
+ # LM75 and compatible devices have a 7-bit I²C slave address where
+ # the 4 MSBs are fixed to 1001, and the 3 LSBs are configurable.
+ # Thus, valid slave addresses (1001xxx) range from 0x48 to 0x4f.
+ if addr not in range(0x48, 0x4f + 1):
+ s = 'Warning: I²C slave 0x%02x not an LM75 compatible sensor.'
+ self.putx([4, [s % addr]])
+
+ def output_temperature(self, s, rw):
+ # TODO: Support for resolutions other than 9 bit.
+ before, after = self.databytes[0], (self.databytes[1] >> 7) * 5
+ celsius = float('%d.%d' % (before, after))
+ kelvin = celsius + 273.15
+ self.putb([0, ['%s: %.1f °C' % (s, celsius)]])
+ self.putb([1, ['%s: %.1f K' % (s, kelvin)]])
+
+ # Warn about the temperature register (0x00) being read-only.
+ if s == 'Temperature' and rw == 'WRITE':
+ s = 'Warning: The temperature register is read-only!'
+ self.putb([4, [s]])
+
+ def handle_temperature_reg(self, b, s, rw):
+ # Common helper for the temperature/T_HYST/T_OS registers.
+ if len(self.databytes) == 0:
+ self.block_start = self.ss
+ self.databytes.append(b)
+ return
+ self.databytes.append(b)
+ self.block_end = self.es
+ self.output_temperature(s, rw)
+ self.databytes = []
+
+ def handle_reg_0x00(self, b, rw):
+ # Temperature register (16bits, read-only).
+ self.handle_temperature_reg(b, 'Temperature', rw)
+
+ def handle_reg_0x01(self, b, rw):
+ # Configuration register (8 bits, read/write).
+ # TODO: Bit-exact annotation ranges.
+
+ sd = b & (1 << 0)
+ tmp = 'normal operation' if (sd == 0) else 'shutdown mode'
+ s = 'SD = %d: %s\n' % (sd, tmp)
+ s2 = 'SD = %s, ' % tmp
+
+ cmp_int = b & (1 << 1)
+ tmp = 'comparator' if (cmp_int == 0) else 'interrupt'
+ s += 'CMP/INT = %d: %s mode\n' % (cmp_int, tmp)
+ s2 += 'CMP/INT = %s, ' % tmp
+
+ pol = b & (1 << 2)
+ tmp = 'low' if (pol == 0) else 'high'
+ s += 'POL = %d: OS polarity is active-%s\n' % (pol, tmp)
+ s2 += 'POL = active-%s, ' % tmp
+
+ bits = (b & ((1 << 4) | (1 << 3))) >> 3
+ s += 'Fault tolerance setting: %d bit(s)\n' % ft[bits]
+ s2 += 'FT = %d' % ft[bits]
+
+ # Not supported by LM75, but by various compatible devices.
+ if self.options['sensor'] != 'lm75': # TODO
+ bits = (b & ((1 << 6) | (1 << 5))) >> 5
+ s += 'Resolution: %d bits\n' % resolution[bits]
+ s2 += ', resolution = %d' % resolution[bits]
+
+ self.putx([2, [s]])
+ self.putx([3, [s2]])
+
+ def handle_reg_0x02(self, b, rw):
+ # T_HYST register (16 bits, read/write).
+ self.handle_temperature_reg(b, 'T_HYST trip temperature', rw)
+
+ def handle_reg_0x03(self, b, rw):
+ # T_OS register (16 bits, read/write).
+ self.handle_temperature_reg(b, 'T_OS trip temperature', rw)
+
+ def decode(self, ss, es, data):
+ cmd, databyte = data
+
+ # Store the start/end samples of this I²C packet.
+ self.ss, self.es = ss, es
+
+ # State machine.
+ if self.state == 'IDLE':
+ # Wait for an I²C START condition.
+ if cmd != 'START':
+ return
+ self.state = 'GET SLAVE ADDR'
+ elif self.state == 'GET SLAVE ADDR':
+ # Wait for an address read/write operation.
+ if cmd in ('ADDRESS READ', 'ADDRESS WRITE'):
+ self.warn_upon_invalid_slave(databyte)
+ self.state = cmd[8:] + ' REGS' # READ REGS / WRITE REGS
+ elif self.state in ('READ REGS', 'WRITE REGS'):
+ if cmd in ('DATA READ', 'DATA WRITE'):
+ handle_reg = getattr(self, 'handle_reg_0x%02x' % self.reg)
+ handle_reg(databyte, cmd[5:]) # READ / WRITE
+ elif cmd == 'STOP':
+ # TODO: Any output?
+ self.state = 'IDLE'
+ else:
+ # self.putx([0, ['Ignoring: %s (data=%s)' % (cmd, databyte)]])
+ pass
+ else:
+ raise Exception('Invalid state: %s' % self.state)
+
diff --git a/decoders/lpc/__init__.py b/decoders/lpc/__init__.py
new file mode 100644
index 0000000..62a4307
--- /dev/null
+++ b/decoders/lpc/__init__.py
@@ -0,0 +1,27 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+LPC (Low-Pin Count) is a protocol for low-bandwidth devices used on
+some PC mainboards, such as the "BIOS chip" or the so-called "Super I/O".
+'''
+
+from .pd import *
+
diff --git a/decoders/lpc/pd.py b/decoders/lpc/pd.py
new file mode 100644
index 0000000..6e03966
--- /dev/null
+++ b/decoders/lpc/pd.py
@@ -0,0 +1,370 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012-2013 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+
+# ...
+fields = {
+ # START field (indicates start or stop of a transaction)
+ 'START': {
+ 0b0000: 'Start of cycle for a target',
+ 0b0001: 'Reserved',
+ 0b0010: 'Grant for bus master 0',
+ 0b0011: 'Grant for bus master 1',
+ 0b0100: 'Reserved',
+ 0b0101: 'Reserved',
+ 0b0110: 'Reserved',
+ 0b0111: 'Reserved',
+ 0b1000: 'Reserved',
+ 0b1001: 'Reserved',
+ 0b1010: 'Reserved',
+ 0b1011: 'Reserved',
+ 0b1100: 'Reserved',
+ 0b1101: 'Start of cycle for a Firmware Memory Read cycle',
+ 0b1110: 'Start of cycle for a Firmware Memory Write cycle',
+ 0b1111: 'Stop/abort (end of a cycle for a target)',
+ },
+ # Cycle type / direction field
+ # Bit 0 (LAD[0]) is unused, should always be 0.
+ # Neither host nor peripheral are allowed to drive 0b11x0.
+ 'CT_DR': {
+ 0b0000: 'I/O read',
+ 0b0010: 'I/O write',
+ 0b0100: 'Memory read',
+ 0b0110: 'Memory write',
+ 0b1000: 'DMA read',
+ 0b1010: 'DMA write',
+ 0b1100: 'Reserved / not allowed',
+ 0b1110: 'Reserved / not allowed',
+ },
+ # SIZE field (determines how many bytes are to be transferred)
+ # Bits[3:2] are reserved, must be driven to 0b00.
+ # Neither host nor peripheral are allowed to drive 0b0010.
+ 'SIZE': {
+ 0b0000: '8 bits (1 byte)',
+ 0b0001: '16 bits (2 bytes)',
+ 0b0010: 'Reserved / not allowed',
+ 0b0011: '32 bits (4 bytes)',
+ },
+ # CHANNEL field (bits[2:0] contain the DMA channel number)
+ 'CHANNEL': {
+ 0b0000: '0',
+ 0b0001: '1',
+ 0b0010: '2',
+ 0b0011: '3',
+ 0b0100: '4',
+ 0b0101: '5',
+ 0b0110: '6',
+ 0b0111: '7',
+ },
+ # SYNC field (used to add wait states)
+ 'SYNC': {
+ 0b0000: 'Ready',
+ 0b0001: 'Reserved',
+ 0b0010: 'Reserved',
+ 0b0011: 'Reserved',
+ 0b0100: 'Reserved',
+ 0b0101: 'Short wait',
+ 0b0110: 'Long wait',
+ 0b0111: 'Reserved',
+ 0b1000: 'Reserved',
+ 0b1001: 'Ready more (DMA only)',
+ 0b1010: 'Error',
+ 0b1011: 'Reserved',
+ 0b1100: 'Reserved',
+ 0b1101: 'Reserved',
+ 0b1110: 'Reserved',
+ 0b1111: 'Reserved',
+ },
+}
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'lpc'
+ name = 'LPC'
+ longname = 'Low-Pin-Count'
+ desc = 'Protocol for low-bandwidth devices on PC mainboards.'
+ license = 'gplv2+'
+ inputs = ['logic']
+ outputs = ['lpc']
+ channels = (
+ {'id': 'lframe', 'name': 'LFRAME#', 'desc': 'Frame'},
+ {'id': 'lclk', 'name': 'LCLK', 'desc': 'Clock'},
+ {'id': 'lad0', 'name': 'LAD[0]', 'desc': 'Addr/control/data 0'},
+ {'id': 'lad1', 'name': 'LAD[1]', 'desc': 'Addr/control/data 1'},
+ {'id': 'lad2', 'name': 'LAD[2]', 'desc': 'Addr/control/data 2'},
+ {'id': 'lad3', 'name': 'LAD[3]', 'desc': 'Addr/control/data 3'},
+ )
+ optional_channels = (
+ {'id': 'lreset', 'name': 'LRESET#', 'desc': 'Reset'},
+ {'id': 'ldrq', 'name': 'LDRQ#', 'desc': 'Encoded DMA / bus master request'},
+ {'id': 'serirq', 'name': 'SERIRQ', 'desc': 'Serialized IRQ'},
+ {'id': 'clkrun', 'name': 'CLKRUN#', 'desc': 'Clock run'},
+ {'id': 'lpme', 'name': 'LPME#', 'desc': 'LPC power management event'},
+ {'id': 'lpcpd', 'name': 'LPCPD#', 'desc': 'Power down'},
+ {'id': 'lsmi', 'name': 'LSMI#', 'desc': 'System Management Interrupt'},
+ )
+ annotations = (
+ ('warnings', 'Warnings'),
+ ('start', 'Start'),
+ ('cycle-type', 'Cycle-type/direction'),
+ ('addr', 'Address'),
+ ('tar1', 'Turn-around cycle 1'),
+ ('sync', 'Sync'),
+ ('data', 'Data'),
+ ('tar2', 'Turn-around cycle 2'),
+ )
+ annotation_rows = (
+ ('data', 'Data', (1, 2, 3, 4, 5, 6, 7)),
+ ('warnings', 'Warnings', (0,)),
+ )
+
+ def __init__(self, **kwargs):
+ self.state = 'IDLE'
+ self.oldlclk = -1
+ self.samplenum = 0
+ self.clocknum = 0
+ self.lad = -1
+ self.addr = 0
+ self.cur_nibble = 0
+ self.cycle_type = -1
+ self.databyte = 0
+ self.tarcount = 0
+ self.synccount = 0
+ self.oldpins = None
+ self.ss_block = self.es_block = None
+
+ def start(self):
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def putb(self, data):
+ self.put(self.ss_block, self.es_block, self.out_ann, data)
+
+ def handle_get_start(self, lad, lad_bits, lframe):
+ # LAD[3:0]: START field (1 clock cycle).
+
+ # The last value of LAD[3:0] before LFRAME# gets de-asserted is what
+ # the peripherals must use. However, the host can keep LFRAME# asserted
+ # multiple clocks, and we output all START fields that occur, even
+ # though the peripherals are supposed to ignore all but the last one.
+ self.es_block = self.samplenum
+ self.putb([1, [fields['START'][lad], 'START', 'St', 'S']])
+ self.ss_block = self.samplenum
+
+ # Output a warning if LAD[3:0] changes while LFRAME# is low.
+ # TODO
+ if (self.lad != -1 and self.lad != lad):
+ self.putb([0, ['LAD[3:0] changed while LFRAME# was asserted']])
+
+ # LFRAME# is asserted (low). Wait until it gets de-asserted again
+ # (the host is allowed to keep it asserted multiple clocks).
+ if lframe != 1:
+ return
+
+ self.start_field = self.lad
+ self.state = 'GET CT/DR'
+
+ def handle_get_ct_dr(self, lad, lad_bits):
+ # LAD[3:0]: Cycle type / direction field (1 clock cycle).
+
+ self.cycle_type = fields['CT_DR'][lad]
+
+ # TODO: Warning/error on invalid cycle types.
+ if self.cycle_type == 'Reserved':
+ self.putb([0, ['Invalid cycle type (%s)' % lad_bits]])
+
+ self.es_block = self.samplenum
+ self.putb([2, ['Cycle type: %s' % self.cycle_type]])
+ self.ss_block = self.samplenum
+
+ self.state = 'GET ADDR'
+ self.addr = 0
+ self.cur_nibble = 0
+
+ def handle_get_addr(self, lad, lad_bits):
+ # LAD[3:0]: ADDR field (4/8/0 clock cycles).
+
+ # I/O cycles: 4 ADDR clocks. Memory cycles: 8 ADDR clocks.
+ # DMA cycles: no ADDR clocks at all.
+ if self.cycle_type in ('I/O read', 'I/O write'):
+ addr_nibbles = 4 # Address is 16bits.
+ elif self.cycle_type in ('Memory read', 'Memory write'):
+ addr_nibbles = 8 # Address is 32bits.
+ else:
+ addr_nibbles = 0 # TODO: How to handle later on?
+
+ # Addresses are driven MSN-first.
+ offset = ((addr_nibbles - 1) - self.cur_nibble) * 4
+ self.addr |= (lad << offset)
+
+ # Continue if we haven't seen all ADDR cycles, yet.
+ if (self.cur_nibble < addr_nibbles - 1):
+ self.cur_nibble += 1
+ return
+
+ self.es_block = self.samplenum
+ s = 'Address: 0x%%0%dx' % addr_nibbles
+ self.putb([3, [s % self.addr]])
+ self.ss_block = self.samplenum
+
+ self.state = 'GET TAR'
+ self.tar_count = 0
+
+ def handle_get_tar(self, lad, lad_bits):
+ # LAD[3:0]: First TAR (turn-around) field (2 clock cycles).
+
+ self.es_block = self.samplenum
+ self.putb([4, ['TAR, cycle %d: %s' % (self.tarcount, lad_bits)]])
+ self.ss_block = self.samplenum
+
+ # On the first TAR clock cycle LAD[3:0] is driven to 1111 by
+ # either the host or peripheral. On the second clock cycle,
+ # the host or peripheral tri-states LAD[3:0], but its value
+ # should still be 1111, due to pull-ups on the LAD lines.
+ if lad_bits != '1111':
+ self.putb([0, ['TAR, cycle %d: %s (expected 1111)' % \
+ (self.tarcount, lad_bits)]])
+
+ if (self.tarcount != 1):
+ self.tarcount += 1
+ return
+
+ self.tarcount = 0
+ self.state = 'GET SYNC'
+
+ def handle_get_sync(self, lad, lad_bits):
+ # LAD[3:0]: SYNC field (1-n clock cycles).
+
+ self.sync_val = lad_bits
+ self.cycle_type = fields['SYNC'][lad]
+
+ # TODO: Warnings if reserved value are seen?
+ if self.cycle_type == 'Reserved':
+ self.putb([0, ['SYNC, cycle %d: %s (reserved value)' % \
+ (self.synccount, self.sync_val)]])
+
+ self.es_block = self.samplenum
+ self.putb([5, ['SYNC, cycle %d: %s' % (self.synccount, self.sync_val)]])
+ self.ss_block = self.samplenum
+
+ # TODO
+
+ self.cycle_count = 0
+ self.state = 'GET DATA'
+
+ def handle_get_data(self, lad, lad_bits):
+ # LAD[3:0]: DATA field (2 clock cycles).
+
+ # Data is driven LSN-first.
+ if (self.cycle_count == 0):
+ self.databyte = lad
+ elif (self.cycle_count == 1):
+ self.databyte |= (lad << 4)
+ else:
+ raise Exception('Invalid cycle_count: %d' % self.cycle_count)
+
+ if (self.cycle_count != 1):
+ self.cycle_count += 1
+ return
+
+ self.es_block = self.samplenum
+ self.putb([6, ['DATA: 0x%02x' % self.databyte]])
+ self.ss_block = self.samplenum
+
+ self.cycle_count = 0
+ self.state = 'GET TAR2'
+
+ def handle_get_tar2(self, lad, lad_bits):
+ # LAD[3:0]: Second TAR field (2 clock cycles).
+
+ self.es_block = self.samplenum
+ self.putb([7, ['TAR, cycle %d: %s' % (self.tarcount, lad_bits)]])
+ self.ss_block = self.samplenum
+
+ # On the first TAR clock cycle LAD[3:0] is driven to 1111 by
+ # either the host or peripheral. On the second clock cycle,
+ # the host or peripheral tri-states LAD[3:0], but its value
+ # should still be 1111, due to pull-ups on the LAD lines.
+ if lad_bits != '1111':
+ self.putb([0, ['Warning: TAR, cycle %d: %s (expected 1111)'
+ % (self.tarcount, lad_bits)]])
+
+ if (self.tarcount != 1):
+ self.tarcount += 1
+ return
+
+ self.tarcount = 0
+ self.state = 'IDLE'
+
+ def decode(self, ss, es, data):
+ for (self.samplenum, pins) in data:
+
+ # If none of the pins changed, there's nothing to do.
+ if self.oldpins == pins:
+ continue
+
+ # Store current pin values for the next round.
+ self.oldpins = pins
+
+ # Get individual pin values into local variables.
+ (lframe, lclk, lad0, lad1, lad2, lad3) = pins[:6]
+ (lreset, ldrq, serirq, clkrun, lpme, lpcpd, lsmi) = pins[6:]
+
+ # Only look at the signals upon rising LCLK edges. The LPC clock
+ # is the same as the PCI clock (which is sampled at rising edges).
+ if not (self.oldlclk == 0 and lclk == 1):
+ self.oldlclk = lclk
+ continue
+
+ # Store LAD[3:0] bit values (one nibble) in local variables.
+ # Most (but not all) states need this.
+ if self.state != 'IDLE':
+ lad = (lad3 << 3) | (lad2 << 2) | (lad1 << 1) | lad0
+ lad_bits = bin(lad)[2:].zfill(4)
+ # self.putb([0, ['LAD: %s' % lad_bits]])
+
+ # TODO: Only memory read/write is currently supported/tested.
+
+ # State machine
+ if self.state == 'IDLE':
+ # A valid LPC cycle starts with LFRAME# being asserted (low).
+ if lframe != 0:
+ continue
+ self.ss_block = self.samplenum
+ self.state = 'GET START'
+ self.lad = -1
+ # self.clocknum = 0
+ elif self.state == 'GET START':
+ self.handle_get_start(lad, lad_bits, lframe)
+ elif self.state == 'GET CT/DR':
+ self.handle_get_ct_dr(lad, lad_bits)
+ elif self.state == 'GET ADDR':
+ self.handle_get_addr(lad, lad_bits)
+ elif self.state == 'GET TAR':
+ self.handle_get_tar(lad, lad_bits)
+ elif self.state == 'GET SYNC':
+ self.handle_get_sync(lad, lad_bits)
+ elif self.state == 'GET DATA':
+ self.handle_get_data(lad, lad_bits)
+ elif self.state == 'GET TAR2':
+ self.handle_get_tar2(lad, lad_bits)
+ else:
+ raise Exception('Invalid state: %s' % self.state)
+
diff --git a/decoders/maxim_ds28ea00/__init__.py b/decoders/maxim_ds28ea00/__init__.py
new file mode 100644
index 0000000..34d1d08
--- /dev/null
+++ b/decoders/maxim_ds28ea00/__init__.py
@@ -0,0 +1,27 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+This decoder stacks on top of the 'onewire_network' PD and decodes the
+Maxim DS28EA00 1-Wire digital thermometer protocol.
+'''
+
+from .pd import *
+
diff --git a/decoders/maxim_ds28ea00/pd.py b/decoders/maxim_ds28ea00/pd.py
new file mode 100644
index 0000000..4693cd9
--- /dev/null
+++ b/decoders/maxim_ds28ea00/pd.py
@@ -0,0 +1,93 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Iztok Jeras <iztok.jeras at gmail.com>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+
+# Dictionary of FUNCTION commands and their names.
+command = {
+ # Scratchpad
+ 0x4e: 'Write scratchpad',
+ 0xbe: 'Read scratchpad',
+ 0x48: 'Copy scratchpad',
+ # Thermometer
+ 0x44: 'Convert temperature',
+ 0xb4: 'Read power mode',
+ 0xb8: 'Recall EEPROM',
+ 0xf5: 'PIO access read',
+ 0xA5: 'PIO access write',
+ 0x99: 'Chain',
+}
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'maxim_ds28ea00'
+ name = 'DS28EA00'
+ longname = 'Maxim DS28EA00 1-Wire digital thermometer'
+ desc = '1-Wire digital thermometer with Sequence Detect and PIO.'
+ license = 'gplv2+'
+ inputs = ['onewire_network']
+ outputs = ['maxim_ds28ea00']
+ annotations = (
+ ('text', 'Human-readable text'),
+ )
+
+ def __init__(self, **kwargs):
+ self.trn_beg = 0
+ self.trn_end = 0
+ self.state = 'ROM'
+ self.rom = 0x0000000000000000
+
+ def start(self):
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def putx(self, data):
+ self.put(self.ss, self.es, self.out_ann, data)
+
+ def decode(self, ss, es, data):
+ code, val = data
+
+ self.ss, self.es = ss, es
+
+ # State machine.
+ if code == 'RESET/PRESENCE':
+ self.putx([0, ['Reset/presence: %s'
+ % ('true' if val else 'false')]])
+ self.state = 'ROM'
+ elif code == 'ROM':
+ self.rom = val
+ self.putx([0, ['ROM: 0x%016x' % (val)]])
+ self.state = 'COMMAND'
+ elif code == 'DATA':
+ if self.state == 'COMMAND':
+ if val not in command:
+ self.putx([0, ['Unrecognized command: 0x%02x' % val]])
+ return
+ self.putx([0, ['Function command: 0x%02x \'%s\''
+ % (val, command[val])]])
+ self.state = command[val].upper()
+ elif self.state == 'READ SCRATCHPAD':
+ self.putx([0, ['Scratchpad data: 0x%02x' % val]])
+ elif self.state == 'CONVERT TEMPERATURE':
+ self.putx([0, ['Temperature conversion status: 0x%02x' % val]])
+ elif self.state in [s.upper() for s in command.values()]:
+ self.putx([0, ['TODO \'%s\': 0x%02x' % (self.state, val)]])
+ else:
+ raise Exception('Invalid state: %s' % self.state)
+
diff --git a/decoders/midi/__init__.py b/decoders/midi/__init__.py
new file mode 100644
index 0000000..a453346
--- /dev/null
+++ b/decoders/midi/__init__.py
@@ -0,0 +1,30 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2013 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+This decoder stacks on top of the 'uart' PD and decodes the MIDI
+(Musical Instrument Digital Interface) protocol.
+
+MIDI is layered on top of the UART (async serial) protocol, with a fixed
+baud rate of 31250 baud (+/- 1%) and 8n1 settings. Bytes are sent LSB-first.
+'''
+
+from .pd import *
+
diff --git a/decoders/midi/lists.py b/decoders/midi/lists.py
new file mode 100644
index 0000000..bc0f9b8
--- /dev/null
+++ b/decoders/midi/lists.py
@@ -0,0 +1,470 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2013 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+status_bytes = {
+ # Channel voice messages
+ 0x80: 'note off',
+ 0x90: 'note on', # However, velocity = 0 means "note off".
+ 0xa0: 'polyphonic key pressure / aftertouch',
+ 0xb0: 'control change',
+ 0xc0: 'program change',
+ 0xd0: 'channel pressure / aftertouch',
+ 0xe0: 'pitch bend change',
+
+ # Channel mode messages
+ # 0xb0: 'select channel mode', # Note: Same as 'control change'.
+
+ # System exclusive messages
+ 0xf0: 'system exclusive (SysEx)',
+
+ # System common messages
+ 0xf1: 'MIDI time code quarter frame',
+ 0xf2: 'song position pointer',
+ 0xf3: 'song select',
+ 0xf4: 'undefined',
+ 0xf5: 'undefined',
+ 0xf6: 'tune request',
+ 0xf7: 'end of system exclusive (EOX)',
+
+ # System real time messages
+ 0xf8: 'timing clock',
+ 0xf9: 'undefined',
+ 0xfa: 'start',
+ 0xfb: 'continue',
+ 0xfc: 'stop',
+ 0xfd: 'undefined',
+ 0xfe: 'active sensing',
+ 0xff: 'system reset',
+}
+
+# Universal system exclusive (SysEx) messages, non-realtime (0x7e)
+universal_sysex_nonrealtime = {
+ (0x00, None): 'unused',
+ (0x01, None): 'sample dump header',
+ (0x02, None): 'sample data packet',
+ (0x03, None): 'sample dump request',
+
+ (0x04, None): 'MIDI time code',
+ (0x04, 0x00): 'special',
+ (0x04, 0x01): 'punch in points',
+ (0x04, 0x02): 'punch out points',
+ (0x04, 0x03): 'delete punch in point',
+ (0x04, 0x04): 'delete punch out point',
+ (0x04, 0x05): 'event start point',
+ (0x04, 0x06): 'event stop point',
+ (0x04, 0x07): 'event start points with additional info',
+ (0x04, 0x08): 'event stop points with additional info',
+ (0x04, 0x09): 'delete event start point',
+ (0x04, 0x0a): 'delete event stop point',
+ (0x04, 0x0b): 'cue points',
+ (0x04, 0x0c): 'cue points with additional info',
+ (0x04, 0x0d): 'delete cue point',
+ (0x04, 0x0e): 'event name in additional info',
+
+ (0x05, None): 'sample dump extensions',
+ (0x05, 0x01): 'multiple loop points',
+ (0x05, 0x02): 'loop points request',
+
+ (0x06, None): 'general information',
+ (0x06, 0x01): 'identity request',
+ (0x06, 0x02): 'identity reply',
+
+ (0x07, None): 'file dump',
+ (0x07, 0x01): 'header',
+ (0x07, 0x02): 'data packet',
+ (0x07, 0x03): 'request',
+
+ (0x08, None): 'MIDI tuning standard',
+ (0x08, 0x00): 'bulk dump request',
+ (0x08, 0x01): 'bulk dump reply',
+
+ (0x09, None): 'general MIDI',
+ (0x09, 0x01): 'general MIDI system on',
+ (0x09, 0x02): 'general MIDI system off',
+
+ (0x7b, None): 'end of file',
+ (0x7c, None): 'wait',
+ (0x7d, None): 'cancel',
+ (0x7e, None): 'nak',
+ (0x7f, None): 'ack',
+}
+
+# Universal system exclusive (SysEx) messages, realtime (0x7f)
+universal_sysex_realtime = {
+ (0x00, None): 'unused',
+
+ (0x01, None): 'MIDI time code',
+ (0x01, 0x01): 'full message',
+ (0x01, 0x02): 'user bits',
+
+ (0x02, None): 'MIDI show control',
+ (0x02, 0x00): 'MSC extensions',
+ # (0x02, TODO): 'TODO', # 0x01 - 0x7f: MSC commands.
+
+ (0x03, None): 'notation information',
+ (0x03, 0x01): 'bar number',
+ (0x03, 0x02): 'time signature (immediate)',
+ (0x03, 0x42): 'time signature (delayed)',
+
+ (0x04, None): 'device control',
+ (0x04, 0x01): 'master volume',
+ (0x04, 0x02): 'master balance',
+
+ (0x05, None): 'real time MTC cueing',
+ (0x05, 0x00): 'special',
+ (0x05, 0x01): 'punch in points',
+ (0x05, 0x02): 'punch out points',
+ (0x05, 0x03): 'reserved',
+ (0x05, 0x04): 'reserved',
+ (0x05, 0x05): 'event start points',
+ (0x05, 0x06): 'event stop points',
+ (0x05, 0x07): 'event start points with additional info',
+ (0x05, 0x08): 'event stop points with additional info',
+ (0x05, 0x09): 'reserved',
+ (0x05, 0x0a): 'reserved',
+ (0x05, 0x0b): 'cue points',
+ (0x05, 0x0c): 'cue points with additional info',
+ (0x05, 0x0d): 'reserved',
+ (0x05, 0x0e): 'event name in additional info',
+
+ (0x06, None): 'MIDI machine control commands',
+ # (0x06, TODO): 'TODO', # 0x00 - 0x7f: MMC commands.
+
+ (0x07, None): 'MIDI machine control responses',
+ # (0x07, TODO): 'TODO', # 0x00 - 0x7f: MMC commands.
+
+ (0x08, None): 'MIDI tuning standard',
+ (0x85, 0x02): 'note change',
+}
+
+# Note: Not all IDs are used/listed, i.e. there are some "holes".
+sysex_manufacturer_ids = {
+ # American group
+ (0x01): 'Sequential',
+ (0x02): 'IDP',
+ (0x03): 'Voyetra/Octave-Plateau',
+ (0x04): 'Moog',
+ (0x05): 'Passport Designs',
+ (0x06): 'Lexicon',
+ (0x07): 'Kurzweil',
+ (0x08): 'Fender',
+ (0x09): 'Gulbransen',
+ (0x0a): 'AKG Acoustics',
+ (0x0b): 'Voyce Music',
+ (0x0c): 'Waveframe Corp',
+ (0x0d): 'ADA Signal Processors',
+ (0x0e): 'Garfield Electronics',
+ (0x0f): 'Ensoniq',
+ (0x10): 'Oberheim',
+ (0x11): 'Apple Computer',
+ (0x12): 'Grey Matter Response',
+ (0x13): 'Digidesign',
+ (0x14): 'Palm Tree Instruments',
+ (0x15): 'JLCooper Electronics',
+ (0x16): 'Lowrey',
+ (0x17): 'Adams-Smith',
+ (0x18): 'Emu Systems',
+ (0x19): 'Harmony Systems',
+ (0x1a): 'ART',
+ (0x1b): 'Baldwin',
+ (0x1c): 'Eventide',
+ (0x1d): 'Inventronics',
+ (0x1f): 'Clarity',
+
+ (0x00, 0x00, 0x01): 'Time Warner Interactive',
+ (0x00, 0x00, 0x07): 'Digital Music Corp.',
+ (0x00, 0x00, 0x08): 'IOTA Systems',
+ (0x00, 0x00, 0x09): 'New England Digital',
+ (0x00, 0x00, 0x0a): 'Artisyn',
+ (0x00, 0x00, 0x0b): 'IVL Technologies',
+ (0x00, 0x00, 0x0c): 'Southern Music Systems',
+ (0x00, 0x00, 0x0d): 'Lake Butler Sound Company',
+ (0x00, 0x00, 0x0e): 'Alesis',
+ (0x00, 0x00, 0x10): 'DOD Electronics',
+ (0x00, 0x00, 0x11): 'Studer-Editech',
+ (0x00, 0x00, 0x14): 'Perfect Fretworks',
+ (0x00, 0x00, 0x15): 'KAT',
+ (0x00, 0x00, 0x16): 'Opcode',
+ (0x00, 0x00, 0x17): 'Rane Corp.',
+ (0x00, 0x00, 0x18): 'Anadi Inc.',
+ (0x00, 0x00, 0x19): 'KMX',
+ (0x00, 0x00, 0x1a): 'Allen & Heath Brenell',
+ (0x00, 0x00, 0x1b): 'Peavy Electronics',
+ (0x00, 0x00, 0x1c): '360 Systems',
+ (0x00, 0x00, 0x1d): 'Spectrum Design and Development',
+ (0x00, 0x00, 0x1e): 'Marquis Music',
+ (0x00, 0x00, 0x1f): 'Zeta Systems',
+
+ (0x00, 0x00, 0x20): 'Axxes',
+ (0x00, 0x00, 0x21): 'Orban',
+ (0x00, 0x00, 0x24): 'KTI',
+ (0x00, 0x00, 0x25): 'Breakaway Technologies',
+ (0x00, 0x00, 0x26): 'CAE',
+ (0x00, 0x00, 0x29): 'Rocktron Corp.',
+ (0x00, 0x00, 0x2a): 'PianoDisc',
+ (0x00, 0x00, 0x2b): 'Cannon Research Group',
+ (0x00, 0x00, 0x2d): 'Rogers Instrument Corp.',
+ (0x00, 0x00, 0x2e): 'Blue Sky Logic',
+ (0x00, 0x00, 0x2f): 'Encore Electronics',
+
+ (0x00, 0x00, 0x30): 'Uptown',
+ (0x00, 0x00, 0x31): 'Voce',
+ (0x00, 0x00, 0x32): 'CTI Audio, Inc. (Music. Intel Dev.)',
+ (0x00, 0x00, 0x33): 'S&S Research',
+ (0x00, 0x00, 0x34): 'Broderbund Software, Inc.',
+ (0x00, 0x00, 0x35): 'Allen Organ Co.',
+ (0x00, 0x00, 0x37): 'Music Quest',
+ (0x00, 0x00, 0x38): 'APHEX',
+ (0x00, 0x00, 0x39): 'Gallien Krueger',
+ (0x00, 0x00, 0x3a): 'IBM',
+ (0x00, 0x00, 0x3c): 'Hotz Instruments Technologies',
+ (0x00, 0x00, 0x3d): 'ETA Lighting',
+ (0x00, 0x00, 0x3e): 'NSI Corporation',
+ (0x00, 0x00, 0x3f): 'Ad Lib, Inc.',
+
+ (0x00, 0x00, 0x40): 'Richmond Sound Design',
+ (0x00, 0x00, 0x41): 'Microsoft',
+ (0x00, 0x00, 0x42): 'The Software Toolworks',
+ (0x00, 0x00, 0x43): 'Niche/RJMG',
+ (0x00, 0x00, 0x44): 'Intone',
+ (0x00, 0x00, 0x47): 'GT Electronics / Groove Tubes',
+ (0x00, 0x00, 0x49): 'Timeline Vista',
+ (0x00, 0x00, 0x4a): 'Mesa Boogie',
+ (0x00, 0x00, 0x4c): 'Sequoia Development',
+ (0x00, 0x00, 0x4d): 'Studio Electronics',
+ (0x00, 0x00, 0x4e): 'Euphonix',
+ (0x00, 0x00, 0x4f): 'InterMIDI, Inc.',
+
+ (0x00, 0x00, 0x50): 'MIDI Solutions',
+ (0x00, 0x00, 0x51): '3DO Company',
+ (0x00, 0x00, 0x52): 'Lightwave Research',
+ (0x00, 0x00, 0x53): 'Micro-W',
+ (0x00, 0x00, 0x54): 'Spectral Synthesis',
+ (0x00, 0x00, 0x55): 'Lone Wolf',
+ (0x00, 0x00, 0x56): 'Studio Technologies',
+ (0x00, 0x00, 0x57): 'Peterson EMP',
+ (0x00, 0x00, 0x58): 'Atari',
+ (0x00, 0x00, 0x59): 'Marion Systems',
+ (0x00, 0x00, 0x5a): 'Design Event',
+ (0x00, 0x00, 0x5b): 'Winjammer Software',
+ (0x00, 0x00, 0x5c): 'AT&T Bell Labs',
+ (0x00, 0x00, 0x5e): 'Symetrix',
+ (0x00, 0x00, 0x5f): 'MIDI the World',
+
+ (0x00, 0x00, 0x60): 'Desper Products',
+ (0x00, 0x00, 0x61): 'Micros\'N MIDI',
+ (0x00, 0x00, 0x62): 'Accordians Intl',
+ (0x00, 0x00, 0x63): 'EuPhonics',
+ (0x00, 0x00, 0x64): 'Musonix',
+ (0x00, 0x00, 0x65): 'Turtle Beach Systems',
+ (0x00, 0x00, 0x66): 'Mackie Designs',
+ (0x00, 0x00, 0x67): 'Compuserve',
+ (0x00, 0x00, 0x68): 'BES Technologies',
+ (0x00, 0x00, 0x69): 'QRS Music Rolls',
+ (0x00, 0x00, 0x6a): 'P G Music',
+ (0x00, 0x00, 0x6b): 'Sierra Semiconductor',
+ (0x00, 0x00, 0x6c): 'EpiGraf Audio Visual',
+ (0x00, 0x00, 0x6d): 'Electronics Deiversified',
+ (0x00, 0x00, 0x6e): 'Tune 1000',
+ (0x00, 0x00, 0x6f): 'Advanced Micro Devices',
+
+ (0x00, 0x00, 0x70): 'Mediamation',
+ (0x00, 0x00, 0x71): 'Sabine Music',
+ (0x00, 0x00, 0x72): 'Woog Labs',
+ (0x00, 0x00, 0x73): 'Micropolis',
+ (0x00, 0x00, 0x74): 'Ta Horng Musical Inst.',
+ (0x00, 0x00, 0x75): 'eTek (formerly Forte)',
+ (0x00, 0x00, 0x76): 'Electrovoice',
+ (0x00, 0x00, 0x77): 'Midisoft',
+ (0x00, 0x00, 0x78): 'Q-Sound Labs',
+ (0x00, 0x00, 0x79): 'Westrex',
+ (0x00, 0x00, 0x7a): 'NVidia',
+ (0x00, 0x00, 0x7b): 'ESS Technology',
+ (0x00, 0x00, 0x7c): 'MediaTrix Peripherals',
+ (0x00, 0x00, 0x7d): 'Brooktree',
+ (0x00, 0x00, 0x7e): 'Otari',
+ (0x00, 0x00, 0x7f): 'Key Electronics',
+
+ (0x00, 0x01, 0x01): 'Crystalake Multimedia',
+ (0x00, 0x01, 0x02): 'Crystal Semiconductor',
+ (0x00, 0x01, 0x03): 'Rockwell Semiconductor',
+
+ # European group
+ (0x20): 'Passac',
+ (0x21): 'SIEL',
+ (0x22): 'Synthaxe',
+ (0x24): 'Hohner',
+ (0x25): 'Twister',
+ (0x26): 'Solton',
+ (0x27): 'Jellinghaus MS',
+ (0x28): 'Southworth Music Systems',
+ (0x29): 'PPG',
+ (0x2a): 'JEN',
+ (0x2b): 'SSL Limited',
+ (0x2c): 'Audio Veritrieb',
+ (0x2f): 'Elka',
+
+ (0x30): 'Dynacord',
+ (0x31): 'Viscount',
+ (0x33): 'Clavia Digital Instruments',
+ (0x34): 'Audio Architecture',
+ (0x35): 'GeneralMusic Corp.',
+ (0x39): 'Soundcraft Electronics',
+ (0x3b): 'Wersi',
+ (0x3c): 'Avab Elektronik Ab',
+ (0x3d): 'Digigram',
+ (0x3e): 'Waldorf Electronics',
+ (0x3f): 'Quasimidi',
+
+ (0x00, 0x20, 0x00): 'Dream',
+ (0x00, 0x20, 0x01): 'Strand Lighting',
+ (0x00, 0x20, 0x02): 'Amek Systems',
+ (0x00, 0x20, 0x04): 'Böhm Electronic',
+ (0x00, 0x20, 0x06): 'Trident Audio',
+ (0x00, 0x20, 0x07): 'Real World Studio',
+ (0x00, 0x20, 0x09): 'Yes Technology',
+ (0x00, 0x20, 0x0a): 'Audiomatica',
+ (0x00, 0x20, 0x0b): 'Bontempi/Farfisa',
+ (0x00, 0x20, 0x0c): 'F.B.T. Elettronica',
+ (0x00, 0x20, 0x0d): 'MidiTemp',
+ (0x00, 0x20, 0x0e): 'LA Audio (Larking Audio)',
+ (0x00, 0x20, 0x0f): 'Zero 88 Lighting Limited',
+
+ (0x00, 0x20, 0x10): 'Micon Audio Electronics GmbH',
+ (0x00, 0x20, 0x11): 'Forefront Technology',
+ (0x00, 0x20, 0x13): 'Kenton Electronics',
+ (0x00, 0x20, 0x15): 'ADB',
+ (0x00, 0x20, 0x16): 'Marshall Products',
+ (0x00, 0x20, 0x17): 'DDA',
+ (0x00, 0x20, 0x18): 'BSS',
+ (0x00, 0x20, 0x19): 'MA Lighting Technology',
+ (0x00, 0x20, 0x1a): 'Fatar',
+ (0x00, 0x20, 0x1b): 'QSC Audio',
+ (0x00, 0x20, 0x1c): 'Artisan Classic Organ',
+ (0x00, 0x20, 0x1d): 'Orla Spa',
+ (0x00, 0x20, 0x1e): 'Pinnacle Audio',
+ (0x00, 0x20, 0x1f): 'TC Electronics',
+
+ (0x00, 0x20, 0x20): 'Doepfer Musikelektronik',
+ (0x00, 0x20, 0x21): 'Creative Technology Pte',
+ (0x00, 0x20, 0x22): 'Minami/Seiyddo',
+ (0x00, 0x20, 0x23): 'Goldstar',
+ (0x00, 0x20, 0x24): 'Midisoft s.a.s di M. Cima',
+ (0x00, 0x20, 0x25): 'Samick',
+ (0x00, 0x20, 0x26): 'Penny and Giles',
+ (0x00, 0x20, 0x27): 'Acorn Computer',
+ (0x00, 0x20, 0x28): 'LSC Electronics',
+ (0x00, 0x20, 0x29): 'Novation EMS',
+ (0x00, 0x20, 0x2a): 'Samkyung Mechatronics',
+ (0x00, 0x20, 0x2b): 'Medeli Electronics',
+ (0x00, 0x20, 0x2c): 'Charlie Lab',
+ (0x00, 0x20, 0x2d): 'Blue Chip Music Tech',
+ (0x00, 0x20, 0x2e): 'BEE OH Corp',
+
+ # Japanese group
+ (0x40): 'Kawai',
+ (0x41): 'Roland',
+ (0x42): 'Korg',
+ (0x43): 'Yamaha',
+ (0x44): 'Casio',
+ (0x46): 'Kamiya Studio',
+ (0x47): 'Akai',
+ (0x48): 'Japan Victor',
+ (0x49): 'Mesosha',
+ (0x4a): 'Hoshino Gakki',
+ (0x4b): 'Fujitsu Elect',
+ (0x4c): 'Sony',
+ (0x4d): 'Nisshin Onpa',
+ (0x4e): 'TEAC',
+ (0x50): 'Matsushita Electric',
+ (0x51): 'Fostex',
+ (0x52): 'Zoom',
+ (0x53): 'Midori Electronics',
+ (0x54): 'Matsushita Communication Industrial',
+ (0x55): 'Suzuki Musical Inst. Mfg.',
+}
+
+control_functions = {
+ 0x00: 'bank select',
+ 0x01: 'modulation wheel/lever',
+ 0x02: 'breath controller',
+ # 0x03: undefined
+ 0x04: 'foot controller',
+ 0x05: 'portamento time',
+ 0x06: 'data entry MSB',
+ 0x07: 'channel volume (formerly main volume)',
+ 0x08: 'balance',
+ # 0x09: undefined
+ 0x0a: 'pan',
+ 0x0b: 'expression controller',
+ 0x0c: 'effect control 1',
+ 0x0d: 'effect control 2',
+ # 0x0e-0x0f: undefined
+ 0x10: 'general purpose controller 1',
+ 0x11: 'general purpose controller 2',
+ 0x12: 'general purpose controller 3',
+ 0x13: 'general purpose controller 4',
+ # 0x14-0x1f: undefined
+ # 0x20-0x3f: LSB for values 0x00-0x1f
+ 0x40: 'damper pedal (sustain)',
+ 0x41: 'portamento on/off',
+ 0x42: 'sostenuto',
+ 0x43: 'soft pedal',
+ 0x44: 'legato footswitch', # vv: 00-3f = normal, 40-7f = legato
+ 0x45: 'hold 2',
+ 0x46: 'sound controller 1 (default: sound variation)',
+ 0x47: 'sound controller 2 (default: timbre / harmonic intensity)',
+ 0x48: 'sound controller 3 (default: release time)',
+ 0x49: 'sound controller 4 (default: attack time)',
+ 0x4a: 'sound controller 5 (default: brightness)',
+ 0x4b: 'sound controller 6 (GM2 default: decay time)',
+ 0x4c: 'sound controller 7 (GM2 default: vibrato rate)',
+ 0x4d: 'sound controller 8 (GM2 default: vibrato depth)',
+ 0x4e: 'sound controller 9 (GM2 default: vibrato delay)',
+ 0x4f: 'sound controller 10',
+ 0x50: 'general purpose controller 5',
+ 0x51: 'general purpose controller 6',
+ 0x52: 'general purpose controller 7',
+ 0x53: 'general purpose controller 8',
+ 0x54: 'portamento control',
+ # 0x55-0x5a: undefined
+ 0x5b: 'effects 1 depth (formerly external effects depth)',
+ 0x5c: 'effects 2 depth (formerly tremolo depth)',
+ 0x5d: 'effects 3 depth (formerly chorus depth)',
+ 0x5e: 'effects 4 depth (formerly celeste/detune depth)',
+ 0x5f: 'effects 5 depth (formerly phaser depth)',
+ 0x60: 'data increment',
+ 0x61: 'data decrement',
+ 0x62: 'non-registered parameter number LSB',
+ 0x63: 'non-registered parameter number MSB',
+ 0x64: 'registered parameter number LSB',
+ 0x65: 'registered parameter number MSB',
+ # 0x66-0x77: undefined
+ # 0x78-0x7f: reserved for channel mode messages
+ 0x78: 'all sound off',
+ 0x79: 'reset all controllers',
+ 0x7a: 'local control on/off',
+ 0x7b: 'all notes off',
+ 0x7c: 'omni mode off', # all notes off
+ 0x7d: 'omni mode on', # all notes off
+ 0x7e: 'poly mode off', # mono mode on, all notes off
+ 0x7f: 'poly mode on', # mono mode off, all notes off
+}
+
diff --git a/decoders/midi/pd.py b/decoders/midi/pd.py
new file mode 100644
index 0000000..b1f0053
--- /dev/null
+++ b/decoders/midi/pd.py
@@ -0,0 +1,211 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2013 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+from .lists import *
+
+RX = 0
+TX = 1
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'midi'
+ name = 'MIDI'
+ longname = 'Musical Instrument Digital Interface'
+ desc = 'Musical Instrument Digital Interface (MIDI) protocol.'
+ license = 'gplv2+'
+ inputs = ['uart']
+ outputs = ['midi']
+ annotations = (
+ ('text-verbose', 'Human-readable text (verbose)'),
+ )
+
+ def __init__(self, **kwargs):
+ self.cmd = []
+ self.state = 'IDLE'
+ self.ss = None
+ self.es = None
+ self.ss_block = None
+ self.es_block = None
+
+ def start(self):
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def putx(self, data):
+ self.put(self.ss_block, self.es_block, self.out_ann, data)
+
+ def handle_channel_msg_0x80(self):
+ # Note off: 8n kk vv
+ # n = channel, kk = note, vv = velocity
+ c = self.cmd
+ if len(c) < 3:
+ return
+ self.es_block = self.es
+ msg, chan, note, velocity = c[0] & 0xf0, (c[0] & 0x0f) + 1, c[1], c[2]
+ self.putx([0, ['Channel %d: %s (note = %d, velocity = %d)' % \
+ (chan, status_bytes[msg], note, velocity)]])
+ self.cmd, self.state = [], 'IDLE'
+
+ def handle_channel_msg_0x90(self):
+ # Note on: 9n kk vv
+ # n = channel, kk = note, vv = velocity
+ # If velocity == 0 that actually means 'note off', though.
+ c = self.cmd
+ if len(c) < 3:
+ return
+ self.es_block = self.ss
+ msg, chan, note, velocity = c[0] & 0xf0, (c[0] & 0x0f) + 1, c[1], c[2]
+ s = 'note off' if (velocity == 0) else status_bytes[msg]
+ self.putx([0, ['Channel %d: %s (note = %d, velocity = %d)' % \
+ (chan, s, note, velocity)]])
+ self.cmd, self.state = [], 'IDLE'
+
+ def handle_channel_msg_0xa0(self):
+ # Polyphonic key pressure / aftertouch: An kk vv
+ # n = channel, kk = polyphonic key pressure, vv = pressure value
+ pass # TODO
+
+ def handle_controller_0x44(self):
+ # Legato footswitch: Bn 44 vv
+ # n = channel, vv = value (<= 0x3f: normal, > 0x3f: legato)
+ chan, vv = (self.cmd[0] & 0x0f) + 1, self.cmd[2]
+ t = 'normal' if vv <= 0x3f else 'legato'
+ self.putx([0, ['Channel %d: control function \'%s\' = %s' % \
+ (chan, control_functions[0x44], t)]])
+
+ def handle_controller_0x54(self):
+ # Portamento control (PTC): Bn 54 kk
+ # n = channel, kk = source note for pitch reference
+ chan, kk = (self.cmd[0] & 0x0f) + 1, self.cmd[2]
+ self.putx([0, ['Channel %d: control function \'%s\' (source note ' \
+ '= %d)' % (chan, control_functions[0x54], kk)]])
+
+ def handle_controller_generic(self):
+ c = self.cmd
+ chan, fn, param = (c[0] & 0x0f) + 1, c[1], c[2]
+ ctrl_fn = control_functions.get(fn, 'undefined')
+ self.putx([0, ['Channel %d: control change to function \'%s\' ' \
+ '(param = 0x%02x)' % (chan, ctrl_fn, param)]])
+
+ def handle_channel_msg_0xb0(self):
+ # Control change (or channel mode messages): Bn cc vv
+ # n = channel, cc = control number (0 - 119), vv = control value
+ c = self.cmd
+ if (len(c) >= 2) and (c[1] in range(0x78, 0x7f + 1)):
+ # This is not a control change, but rather a channel mode message.
+ # TODO: Handle channel mode messages.
+ return
+ if len(c) < 3:
+ return
+ self.es_block = self.es
+ handle_ctrl = getattr(self, 'handle_controller_0x%02x' % c[1],
+ self.handle_controller_generic)
+ handle_ctrl()
+ self.cmd, self.state = [], 'IDLE'
+
+ def handle_channel_msg_0xc0(self):
+ # Program change: Cn pp
+ # n = channel, pp = program number (0 - 127)
+ pass # TODO
+
+ def handle_channel_msg_0xd0(self):
+ # Channel pressure / aftertouch: Dn vv
+ # n = channel, vv = pressure value
+ pass # TODO
+
+ def handle_channel_msg_0xe0(self):
+ # Pitch bend change: En ll mm
+ # n = channel, ll = pitch bend change LSB, mm = pitch bend change MSB
+ pass # TODO
+
+ def handle_channel_msg_generic(self):
+ msg_type = self.cmd[0] & 0xf0
+ self.putx([0, ['Unknown channel message type: 0x%02x' % msg_type]])
+ # TODO: Handle properly.
+
+ def handle_channel_msg(self, newbyte):
+ self.cmd.append(newbyte)
+ msg_type = self.cmd[0] & 0xf0
+ handle_msg = getattr(self, 'handle_channel_msg_0x%02x' % msg_type,
+ self.handle_channel_msg_generic)
+ handle_msg()
+
+ def handle_sysex_msg(self, newbyte):
+ # SysEx message: 1 status byte, x data bytes, EOX byte
+ self.cmd.append(newbyte)
+ if newbyte != 0xf7: # EOX
+ return
+ self.es_block = self.es
+ # TODO: Get message ID, vendor ID, message contents, etc.
+ self.putx([0, ['SysEx message']])
+ self.cmd, self.state = [], 'IDLE'
+
+ def handle_syscommon_msg(self, newbyte):
+ pass # TODO
+
+ def handle_sysrealtime_msg(self, newbyte):
+ # System realtime message: 0b11111ttt (t = message type)
+ self.es_block = self.ss
+ self.putx([0, ['System realtime message: %s' % status_bytes[newbyte]]])
+ self.cmd, self.state = [], 'IDLE'
+
+ def decode(self, ss, es, data):
+ ptype, rxtx, pdata = data
+
+ # For now, ignore all UART packets except the actual data packets.
+ if ptype != 'DATA':
+ return
+
+ self.ss, self.es = ss, es
+
+ # Short MIDI overview:
+ # - Status bytes are 0x80-0xff, data bytes are 0x00-0x7f.
+ # - Most messages: 1 status byte, 1-2 data bytes.
+ # - Real-time system messages: always 1 byte.
+ # - SysEx messages: 1 status byte, n data bytes, EOX byte.
+
+ # State machine.
+ if self.state == 'IDLE':
+ # Wait until we see a status byte (bit 7 must be set).
+ if pdata < 0x80:
+ return # TODO: How to handle? Ignore?
+ # This is a status byte, remember the start sample.
+ self.ss_block = ss
+ if pdata in range(0x80, 0xef + 1):
+ self.state = 'HANDLE CHANNEL MSG'
+ elif pdata == 0xf0:
+ self.state = 'HANDLE SYSEX MSG'
+ elif pdata in range(0xf1, 0xf7 + 1):
+ self.state = 'HANDLE SYSCOMMON MSG'
+ elif pdata in range(0xf8, 0xff + 1):
+ self.state = 'HANDLE SYSREALTIME MSG'
+
+ # Yes, this is intentionally _not_ an 'elif' here.
+ if self.state == 'HANDLE CHANNEL MSG':
+ self.handle_channel_msg(pdata)
+ elif self.state == 'HANDLE SYSEX MSG':
+ self.handle_sysex_msg(pdata)
+ elif self.state == 'HANDLE SYSCOMMON MSG':
+ self.handle_syscommon_msg(pdata)
+ elif self.state == 'HANDLE SYSREALTIME MSG':
+ self.handle_sysrealtime_msg(pdata)
+ else:
+ raise Exception('Invalid state: %s' % self.state)
+
diff --git a/decoders/mlx90614/__init__.py b/decoders/mlx90614/__init__.py
new file mode 100644
index 0000000..29cb2a9
--- /dev/null
+++ b/decoders/mlx90614/__init__.py
@@ -0,0 +1,27 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+This decoder stacks on top of the 'i2c' PD and decodes the Melexis MLX90614
+infrared thermometer protocol.
+'''
+
+from .pd import *
+
diff --git a/decoders/mlx90614/pd.py b/decoders/mlx90614/pd.py
new file mode 100644
index 0000000..edc770d
--- /dev/null
+++ b/decoders/mlx90614/pd.py
@@ -0,0 +1,78 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'mlx90614'
+ name = 'MLX90614'
+ longname = 'Melexis MLX90614'
+ desc = 'Infrared Thermometer protocol.'
+ license = 'gplv2+'
+ inputs = ['i2c']
+ outputs = ['mlx90614']
+ annotations = (
+ ('celsius', 'Temperature in degrees Celsius'),
+ ('kelvin', 'Temperature in Kelvin'),
+ )
+
+ def __init__(self, **kwargs):
+ self.state = 'IGNORE START REPEAT'
+ self.data = []
+
+ def start(self):
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def putx(self, data):
+ self.put(self.ss, self.es, self.out_ann, data)
+
+ # Quick hack implementation! This needs to be improved a lot!
+ def decode(self, ss, es, data):
+ cmd, databyte = data
+
+ # State machine.
+ if self.state == 'IGNORE START REPEAT':
+ if cmd != 'START REPEAT':
+ return
+ self.state = 'IGNORE ADDRESS WRITE'
+ elif self.state == 'IGNORE ADDRESS WRITE':
+ if cmd != 'ADDRESS WRITE':
+ return
+ self.state = 'GET TEMPERATURE'
+ elif self.state == 'GET TEMPERATURE':
+ if cmd != 'DATA WRITE':
+ return
+ if len(self.data) == 0:
+ self.data.append(databyte)
+ self.ss = ss
+ elif len(self.data) == 1:
+ self.data.append(databyte)
+ self.es = es
+ else:
+ kelvin = (self.data[0] | (self.data[1] << 8)) * 0.02
+ celsius = kelvin - 273.15
+ self.putx([0, ['Temperature: %3.2f °C' % celsius]])
+ self.putx([1, ['Temperature: %3.2f K' % kelvin]])
+ self.state = 'IGNORE START REPEAT'
+ self.data = []
+ else:
+ raise Exception('Invalid state: %s' % self.state)
+
diff --git a/decoders/mx25lxx05d/__init__.py b/decoders/mx25lxx05d/__init__.py
new file mode 100644
index 0000000..71d7b3c
--- /dev/null
+++ b/decoders/mx25lxx05d/__init__.py
@@ -0,0 +1,32 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+This decoder stacks on top of the 'spi' PD and decodes the Macronix
+MX25Lxx05D SPI (NOR) flash chip protocol.
+
+It works for the MX25L1605D/MX25L3205D/MX25L6405D.
+
+Details:
+http://www.macronix.com/QuickPlace/hq/PageLibrary4825740B00298A3B.nsf/h_Index/3F21BAC2E121E17848257639003A3146/$File/MX25L1605D-3205D-6405D-1.5.pdf
+'''
+
+from .pd import *
+
diff --git a/decoders/mx25lxx05d/pd.py b/decoders/mx25lxx05d/pd.py
new file mode 100644
index 0000000..a6c72d8
--- /dev/null
+++ b/decoders/mx25lxx05d/pd.py
@@ -0,0 +1,375 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2011-2014 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+
+# Dict which maps command IDs to their names and descriptions.
+cmds = {
+ 0x06: ('WREN', 'Write enable'),
+ 0x04: ('WRDI', 'Write disable'),
+ 0x9f: ('RDID', 'Read identification'),
+ 0x05: ('RDSR', 'Read status register'),
+ 0x01: ('WRSR', 'Write status register'),
+ 0x03: ('READ', 'Read data'),
+ 0x0b: ('FAST/READ', 'Fast read data'),
+ 0xbb: ('2READ', '2x I/O read'),
+ 0x20: ('SE', 'Sector erase'),
+ 0xd8: ('BE', 'Block erase'),
+ 0x60: ('CE', 'Chip erase'),
+ 0xc7: ('CE2', 'Chip erase'), # Alternative command ID
+ 0x02: ('PP', 'Page program'),
+ 0xad: ('CP', 'Continuously program mode'),
+ 0xb9: ('DP', 'Deep power down'),
+ 0xab: ('RDP/RES', 'Release from deep powerdown / Read electronic ID'),
+ 0x90: ('REMS', 'Read electronic manufacturer & device ID'),
+ 0xef: ('REMS2', 'Read ID for 2x I/O mode'),
+ 0xb1: ('ENSO', 'Enter secured OTP'),
+ 0xc1: ('EXSO', 'Exit secured OTP'),
+ 0x2b: ('RDSCUR', 'Read security register'),
+ 0x2f: ('WRSCUR', 'Write security register'),
+ 0x70: ('ESRY', 'Enable SO to output RY/BY#'),
+ 0x80: ('DSRY', 'Disable SO to output RY/BY#'),
+}
+
+device_name = {
+ 0x14: 'MX25L1605D',
+ 0x15: 'MX25L3205D',
+ 0x16: 'MX25L6405D',
+}
+
+def cmd_annotation_classes():
+ return tuple([tuple([cmd[0].lower(), cmd[1]]) for cmd in cmds.values()])
+
+def decode_status_reg(data):
+ # TODO: Additional per-bit(s) self.put() calls with correct start/end.
+
+ # Bits[0:0]: WIP (write in progress)
+ s = 'W' if (data & (1 << 0)) else 'No w'
+ ret = '%srite operation in progress.\n' % s
+
+ # Bits[1:1]: WEL (write enable latch)
+ s = '' if (data & (1 << 1)) else 'not '
+ ret += 'Internal write enable latch is %sset.\n' % s
+
+ # Bits[5:2]: Block protect bits
+ # TODO: More detailed decoding (chip-dependent).
+ ret += 'Block protection bits (BP3-BP0): 0x%x.\n' % ((data & 0x3c) >> 2)
+
+ # Bits[6:6]: Continuously program mode (CP mode)
+ s = '' if (data & (1 << 6)) else 'not '
+ ret += 'Device is %sin continuously program mode (CP mode).\n' % s
+
+ # Bits[7:7]: SRWD (status register write disable)
+ s = 'not ' if (data & (1 << 7)) else ''
+ ret += 'Status register writes are %sallowed.\n' % s
+
+ return ret
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'mx25lxx05d'
+ name = 'MX25Lxx05D'
+ longname = 'Macronix MX25Lxx05D'
+ desc = 'SPI (NOR) flash chip protocol.'
+ license = 'gplv2+'
+ inputs = ['logic']
+ outputs = ['mx25lxx05d']
+ annotations = cmd_annotation_classes() + (
+ ('bits', 'Bits'),
+ ('bits2', 'Bits2'),
+ ('warnings', 'Warnings'),
+ )
+ annotation_rows = (
+ ('bits', 'Bits', (24, 25)),
+ ('commands', 'Commands', tuple(range(23 + 1))),
+ ('warnings', 'Warnings', (26,)),
+ )
+
+ def __init__(self, **kwargs):
+ self.state = None
+ self.cmdstate = 1
+ self.addr = 0
+ self.data = []
+
+ def start(self):
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def putx(self, data):
+ # Simplification, most annotations span exactly one SPI byte/packet.
+ self.put(self.ss, self.es, self.out_ann, data)
+
+ def handle_wren(self, mosi, miso):
+ self.putx([0, ['Command: %s' % cmds[self.state][1]]])
+ self.state = None
+
+ def handle_wrdi(self, mosi, miso):
+ pass # TODO
+
+ # TODO: Check/display device ID / name
+ def handle_rdid(self, mosi, miso):
+ if self.cmdstate == 1:
+ # Byte 1: Master sends command ID.
+ self.start_sample = self.ss
+ self.putx([2, ['Command: %s' % cmds[self.state][1]]])
+ elif self.cmdstate == 2:
+ # Byte 2: Slave sends the JEDEC manufacturer ID.
+ self.putx([2, ['Manufacturer ID: 0x%02x' % miso]])
+ elif self.cmdstate == 3:
+ # Byte 3: Slave sends the memory type (0x20 for this chip).
+ self.putx([2, ['Memory type: 0x%02x' % miso]])
+ elif self.cmdstate == 4:
+ # Byte 4: Slave sends the device ID.
+ self.device_id = miso
+ self.putx([2, ['Device ID: 0x%02x' % miso]])
+
+ if self.cmdstate == 4:
+ # TODO: Check self.device_id is valid & exists in device_names.
+ # TODO: Same device ID? Check!
+ d = 'Device: Macronix %s' % device_name[self.device_id]
+ self.put(self.start_sample, self.es, self.out_ann, [0, [d]])
+ self.state = None
+ else:
+ self.cmdstate += 1
+
+ def handle_rdsr(self, mosi, miso):
+ # Read status register: Master asserts CS#, sends RDSR command,
+ # reads status register byte. If CS# is kept asserted, the status
+ # register can be read continuously / multiple times in a row.
+ # When done, the master de-asserts CS# again.
+ if self.cmdstate == 1:
+ # Byte 1: Master sends command ID.
+ self.putx([3, ['Command: %s' % cmds[self.state][1]]])
+ elif self.cmdstate >= 2:
+ # Bytes 2-x: Slave sends status register as long as master clocks.
+ if self.cmdstate <= 3: # TODO: While CS# asserted.
+ self.putx([24, ['Status register: 0x%02x' % miso]])
+ self.putx([25, [decode_status_reg(miso)]])
+
+ if self.cmdstate == 3: # TODO: If CS# got de-asserted.
+ self.state = None
+ return
+
+ self.cmdstate += 1
+
+ def handle_wrsr(self, mosi, miso):
+ pass # TODO
+
+ def handle_read(self, mosi, miso):
+ # Read data bytes: Master asserts CS#, sends READ command, sends
+ # 3-byte address, reads >= 1 data bytes, de-asserts CS#.
+ if self.cmdstate == 1:
+ # Byte 1: Master sends command ID.
+ self.putx([5, ['Command: %s' % cmds[self.state][1]]])
+ elif self.cmdstate in (2, 3, 4):
+ # Bytes 2/3/4: Master sends read address (24bits, MSB-first).
+ self.addr |= (mosi << ((4 - self.cmdstate) * 8))
+ # self.putx([0, ['Read address, byte %d: 0x%02x' % \
+ # (4 - self.cmdstate, mosi)]])
+ if self.cmdstate == 4:
+ self.putx([24, ['Read address: 0x%06x' % self.addr]])
+ self.addr = 0
+ elif self.cmdstate >= 5:
+ # Bytes 5-x: Master reads data bytes (until CS# de-asserted).
+ # TODO: For now we hardcode 256 bytes per READ command.
+ if self.cmdstate <= 256 + 4: # TODO: While CS# asserted.
+ self.data.append(miso)
+ # self.putx([0, ['New read byte: 0x%02x' % miso]])
+
+ if self.cmdstate == 256 + 4: # TODO: If CS# got de-asserted.
+ # s = ', '.join(map(hex, self.data))
+ s = ''.join(map(chr, self.data))
+ self.putx([24, ['Read data']])
+ self.putx([25, ['Read data: %s' % s]])
+ self.data = []
+ self.state = None
+ return
+
+ self.cmdstate += 1
+
+ def handle_fast_read(self, mosi, miso):
+ pass # TODO
+
+ def handle_2read(self, mosi, miso):
+ pass # TODO
+
+ # TODO: Warn/abort if we don't see the necessary amount of bytes.
+ # TODO: Warn if WREN was not seen before.
+ def handle_se(self, mosi, miso):
+ if self.cmdstate == 1:
+ # Byte 1: Master sends command ID.
+ self.addr = 0
+ self.start_sample = self.ss
+ self.putx([8, ['Command: %s' % cmds[self.state][1]]])
+ elif self.cmdstate in (2, 3, 4):
+ # Bytes 2/3/4: Master sends sectror address (24bits, MSB-first).
+ self.addr |= (mosi << ((4 - self.cmdstate) * 8))
+ # self.putx([0, ['Sector address, byte %d: 0x%02x' % \
+ # (4 - self.cmdstate, mosi)]])
+
+ if self.cmdstate == 4:
+ d = 'Erase sector %d (0x%06x)' % (self.addr, self.addr)
+ self.put(self.start_sample, self.es, self.out_ann, [24, [d]])
+ # TODO: Max. size depends on chip, check that too if possible.
+ if self.addr % 4096 != 0:
+ # Sector addresses must be 4K-aligned (same for all 3 chips).
+ d = 'Warning: Invalid sector address!'
+ self.put(self.start_sample, self.es, self.out_ann, [101, [d]])
+ self.state = None
+ else:
+ self.cmdstate += 1
+
+ def handle_be(self, mosi, miso):
+ pass # TODO
+
+ def handle_ce(self, mosi, miso):
+ pass # TODO
+
+ def handle_ce2(self, mosi, miso):
+ pass # TODO
+
+ def handle_pp(self, mosi, miso):
+ # Page program: Master asserts CS#, sends PP command, sends 3-byte
+ # page address, sends >= 1 data bytes, de-asserts CS#.
+ if self.cmdstate == 1:
+ # Byte 1: Master sends command ID.
+ self.putx([12, ['Command: %s' % cmds[self.state][1]]])
+ elif self.cmdstate in (2, 3, 4):
+ # Bytes 2/3/4: Master sends page address (24bits, MSB-first).
+ self.addr |= (mosi << ((4 - self.cmdstate) * 8))
+ # self.putx([0, ['Page address, byte %d: 0x%02x' % \
+ # (4 - self.cmdstate, mosi)]])
+ if self.cmdstate == 4:
+ self.putx([24, ['Page address: 0x%06x' % self.addr]])
+ self.addr = 0
+ elif self.cmdstate >= 5:
+ # Bytes 5-x: Master sends data bytes (until CS# de-asserted).
+ # TODO: For now we hardcode 256 bytes per page / PP command.
+ if self.cmdstate <= 256 + 4: # TODO: While CS# asserted.
+ self.data.append(mosi)
+ # self.putx([0, ['New data byte: 0x%02x' % mosi]])
+
+ if self.cmdstate == 256 + 4: # TODO: If CS# got de-asserted.
+ # s = ', '.join(map(hex, self.data))
+ s = ''.join(map(chr, self.data))
+ self.putx([24, ['Page data']])
+ self.putx([25, ['Page data: %s' % s]])
+ self.data = []
+ self.state = None
+ return
+
+ self.cmdstate += 1
+
+ def handle_cp(self, mosi, miso):
+ pass # TODO
+
+ def handle_dp(self, mosi, miso):
+ pass # TODO
+
+ def handle_rdp_res(self, mosi, miso):
+ pass # TODO
+
+ def handle_rems(self, mosi, miso):
+ if self.cmdstate == 1:
+ # Byte 1: Master sends command ID.
+ self.start_sample = self.ss
+ self.putx([16, ['Command: %s' % cmds[self.state][1]]])
+ elif self.cmdstate in (2, 3):
+ # Bytes 2/3: Master sends two dummy bytes.
+ # TODO: Check dummy bytes? Check reply from device?
+ self.putx([24, ['Dummy byte: %s' % mosi]])
+ elif self.cmdstate == 4:
+ # Byte 4: Master sends 0x00 or 0x01.
+ # 0x00: Master wants manufacturer ID as first reply byte.
+ # 0x01: Master wants device ID as first reply byte.
+ self.manufacturer_id_first = True if (mosi == 0x00) else False
+ d = 'manufacturer' if (mosi == 0x00) else 'device'
+ self.putx([24, ['Master wants %s ID first' % d]])
+ elif self.cmdstate == 5:
+ # Byte 5: Slave sends manufacturer ID (or device ID).
+ self.ids = [miso]
+ d = 'Manufacturer' if self.manufacturer_id_first else 'Device'
+ self.putx([24, ['%s ID' % d]])
+ elif self.cmdstate == 6:
+ # Byte 6: Slave sends device ID (or manufacturer ID).
+ self.ids.append(miso)
+ d = 'Manufacturer' if self.manufacturer_id_first else 'Device'
+ self.putx([24, ['%s ID' % d]])
+
+ if self.cmdstate == 6:
+ self.end_sample = self.es
+ id = self.ids[1] if self.manufacturer_id_first else self.ids[0]
+ self.putx([24, ['Device: Macronix %s' % device_name[id]]])
+ self.state = None
+ else:
+ self.cmdstate += 1
+
+ def handle_rems2(self, mosi, miso):
+ pass # TODO
+
+ def handle_enso(self, mosi, miso):
+ pass # TODO
+
+ def handle_exso(self, mosi, miso):
+ pass # TODO
+
+ def handle_rdscur(self, mosi, miso):
+ pass # TODO
+
+ def handle_wrscur(self, mosi, miso):
+ pass # TODO
+
+ def handle_esry(self, mosi, miso):
+ pass # TODO
+
+ def handle_dsry(self, mosi, miso):
+ pass # TODO
+
+ def decode(self, ss, es, data):
+
+ ptype, mosi, miso = data
+
+ # if ptype == 'DATA':
+ # self.putx([0, ['MOSI: 0x%02x, MISO: 0x%02x' % (mosi, miso)]])
+
+ # if ptype == 'CS-CHANGE':
+ # if mosi == 1 and miso == 0:
+ # self.putx([0, ['Asserting CS#']])
+ # elif mosi == 0 and miso == 1:
+ # self.putx([0, ['De-asserting CS#']])
+
+ if ptype != 'DATA':
+ return
+
+ self.ss, self.es = ss, es
+
+ # If we encountered a known chip command, enter the resp. state.
+ if self.state == None:
+ self.state = mosi
+ self.cmdstate = 1
+
+ # Handle commands.
+ if self.state in cmds:
+ s = 'handle_%s' % cmds[self.state][0].lower().replace('/', '_')
+ handle_reg = getattr(self, s)
+ handle_reg(mosi, miso)
+ else:
+ self.putx([24, ['Unknown command: 0x%02x' % mosi]])
+ self.state = None
+
diff --git a/decoders/mxc6225xu/__init__.py b/decoders/mxc6225xu/__init__.py
new file mode 100644
index 0000000..c4209c8
--- /dev/null
+++ b/decoders/mxc6225xu/__init__.py
@@ -0,0 +1,30 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+This decoder stacks on top of the 'i2c' PD and decodes the MEMSIC MXC6225XU
+digital thermal orientation sensor (DTOS) protocol.
+
+The chip's I²C interface supports standard mode and fast mode (max. 400kHz).
+Its I²C slave address is 0x2a.
+'''
+
+from .pd import *
+
diff --git a/decoders/mxc6225xu/pd.py b/decoders/mxc6225xu/pd.py
new file mode 100644
index 0000000..e0c857f
--- /dev/null
+++ b/decoders/mxc6225xu/pd.py
@@ -0,0 +1,218 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+
+# Definitions of various bits in MXC6225XU registers.
+status = {
+ # SH[1:0]
+ 'sh': {
+ 0b00: 'none',
+ 0b01: 'shake left',
+ 0b10: 'shake right',
+ 0b11: 'undefined',
+ },
+ # ORI[1:0] and OR[1:0] (same format)
+ 'ori': {
+ 0b00: 'vertical in upright orientation',
+ 0b01: 'rotated 90 degrees clockwise',
+ 0b10: 'vertical in inverted orientation',
+ 0b11: 'rotated 90 degrees counterclockwise',
+ },
+ # SHTH[1:0]
+ 'shth': {
+ 0b00: '0.5g',
+ 0b01: '1.0g',
+ 0b10: '1.5g',
+ 0b11: '2.0g',
+ },
+ # SHC[1:0]
+ 'shc': {
+ 0b00: '16',
+ 0b01: '32',
+ 0b10: '64',
+ 0b11: '128',
+ },
+ # ORC[1:0]
+ 'orc': {
+ 0b00: '16',
+ 0b01: '32',
+ 0b10: '64',
+ 0b11: '128',
+ },
+}
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'mxc6225xu'
+ name = 'MXC6225XU'
+ longname = 'MEMSIC MXC6225XU'
+ desc = 'Digital Thermal Orientation Sensor (DTOS) protocol.'
+ license = 'gplv2+'
+ inputs = ['i2c']
+ outputs = ['mxc6225xu']
+ annotations = (
+ ('text', 'Human-readable text'),
+ )
+
+ def __init__(self, **kwargs):
+ self.state = 'IDLE'
+
+ def start(self):
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def putx(self, data):
+ self.put(self.ss, self.es, self.out_ann, data)
+
+ def handle_reg_0x00(self, b):
+ # XOUT: 8-bit x-axis acceleration output.
+ # Data is in 2's complement, values range from -128 to 127.
+ self.putx([0, ['XOUT: %d' % b]])
+
+ def handle_reg_0x01(self, b):
+ # YOUT: 8-bit y-axis acceleration output.
+ # Data is in 2's complement, values range from -128 to 127.
+ self.putx([0, ['YOUT: %d' % b]])
+
+ def handle_reg_0x02(self, b):
+ # STATUS: Orientation and shake status.
+
+ # Bits[7:7]: INT
+ int_val = (b >> 7) & 1
+ s = 'unchanged and no' if (int_val == 0) else 'changed or'
+ ann = 'INT = %d: Orientation %s shake event occured\n' % (int_val, s)
+
+ # Bits[6:5]: SH[1:0]
+ sh = (((b >> 6) & 1) << 1) | ((b >> 5) & 1)
+ ann += 'SH[1:0] = %s: Shake event: %s\n' % \
+ (bin(sh)[2:], status['sh'][sh])
+
+ # Bits[4:4]: TILT
+ tilt = (b >> 4) & 1
+ s = '' if (tilt == 0) else 'not '
+ ann += 'TILT = %d: Orientation measurement is %svalid\n' % (tilt, s)
+
+ # Bits[3:2]: ORI[1:0]
+ ori = (((b >> 3) & 1) << 1) | ((b >> 2) & 1)
+ ann += 'ORI[1:0] = %s: %s\n' % (bin(ori)[2:], status['ori'][ori])
+
+ # Bits[1:0]: OR[1:0]
+ or_val = (((b >> 1) & 1) << 1) | ((b >> 0) & 1)
+ ann += 'OR[1:0] = %s: %s\n' % (bin(or_val)[2:], status['ori'][or_val])
+
+ # ann += 'b = %s\n' % (bin(b))
+
+ self.putx([0, [ann]])
+
+ def handle_reg_0x03(self, b):
+ # DETECTION: Powerdown, orientation and shake detection parameters.
+ # Note: This is a write-only register.
+
+ # Bits[7:7]: PD
+ pd = (b >> 7) & 1
+ s = 'Do not power down' if (pd == 0) else 'Power down'
+ ann = 'PD = %d: %s the device (into a low-power state)\n' % (pd, s)
+
+ # Bits[6:6]: SHM
+ shm = (b >> 6) & 1
+ ann = 'SHM = %d: Set shake mode to %d\n' % (shm, shm)
+
+ # Bits[5:4]: SHTH[1:0]
+ shth = (((b >> 5) & 1) << 1) | ((b >> 4) & 1)
+ ann += 'SHTH[1:0] = %s: Set shake threshold to %s\n' \
+ % (bin(shth)[2:], status['shth'][shth])
+
+ # Bits[3:2]: SHC[1:0]
+ shc = (((b >> 3) & 1) << 1) | ((b >> 2) & 1)
+ ann += 'SHC[1:0] = %s: Set shake count to %s readings\n' \
+ % (bin(shc)[2:], status['shc'][shc])
+
+ # Bits[1:0]: ORC[1:0]
+ orc = (((b >> 1) & 1) << 1) | ((b >> 0) & 1)
+ ann += 'ORC[1:0] = %s: Set orientation count to %s readings\n' \
+ % (bin(orc)[2:], status['orc'][orc])
+
+ self.putx([0, [ann]])
+
+ # TODO: Fixup, this is copy-pasted from another PD.
+ # TODO: Handle/check the ACKs/NACKs.
+ def decode(self, ss, es, data):
+ cmd, databyte = data
+
+ # Store the start/end samples of this I²C packet.
+ self.ss, self.es = ss, es
+
+ # State machine.
+ if self.state == 'IDLE':
+ # Wait for an I²C START condition.
+ if cmd != 'START':
+ return
+ self.state = 'GET SLAVE ADDR'
+ self.block_start_sample = ss
+ elif self.state == 'GET SLAVE ADDR':
+ # Wait for an address write operation.
+ # TODO: We should only handle packets to the slave(?)
+ if cmd != 'ADDRESS WRITE':
+ return
+ self.state = 'GET REG ADDR'
+ elif self.state == 'GET REG ADDR':
+ # Wait for a data write (master selects the slave register).
+ if cmd != 'DATA WRITE':
+ return
+ self.reg = databyte
+ self.state = 'WRITE REGS'
+ elif self.state == 'WRITE REGS':
+ # If we see a Repeated Start here, it's a multi-byte read.
+ if cmd == 'START REPEAT':
+ self.state = 'READ REGS'
+ return
+ # Otherwise: Get data bytes until a STOP condition occurs.
+ if cmd == 'DATA WRITE':
+ handle_reg = getattr(self, 'handle_reg_0x%02x' % self.reg)
+ handle_reg(databyte)
+ self.reg += 1
+ # TODO: Check for NACK!
+ elif cmd == 'STOP':
+ # TODO
+ self.state = 'IDLE'
+ else:
+ pass # TODO
+ elif self.state == 'READ REGS':
+ # Wait for an address read operation.
+ # TODO: We should only handle packets to the slave(?)
+ if cmd == 'ADDRESS READ':
+ self.state = 'READ REGS2'
+ return
+ else:
+ pass # TODO
+ elif self.state == 'READ REGS2':
+ if cmd == 'DATA READ':
+ handle_reg = getattr(self, 'handle_reg_0x%02x' % self.reg)
+ handle_reg(databyte)
+ self.reg += 1
+ # TODO: Check for NACK!
+ elif cmd == 'STOP':
+ # TODO
+ self.state = 'IDLE'
+ else:
+ pass # TODO?
+ else:
+ raise Exception('Invalid state: %s' % self.state)
+
diff --git a/decoders/nunchuk/__init__.py b/decoders/nunchuk/__init__.py
new file mode 100644
index 0000000..2fdaaeb
--- /dev/null
+++ b/decoders/nunchuk/__init__.py
@@ -0,0 +1,32 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+This decoder stacks on top of the 'i2c' PD and decodes the Nintendo Wii
+Nunchuk controller protocol.
+
+Details:
+http://wiibrew.org/wiki/Wiimote/Extension_Controllers/Nunchuck
+http://todbot.com/blog/2008/02/18/wiichuck-wii-nunchuck-adapter-available/
+https://www.sparkfun.com/products/9281
+'''
+
+from .pd import *
+
diff --git a/decoders/nunchuk/pd.py b/decoders/nunchuk/pd.py
new file mode 100644
index 0000000..95d7bdb
--- /dev/null
+++ b/decoders/nunchuk/pd.py
@@ -0,0 +1,207 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2010-2014 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'nunchuk'
+ name = 'Nunchuk'
+ longname = 'Nintendo Wii Nunchuk'
+ desc = 'Nintendo Wii Nunchuk controller protocol.'
+ license = 'gplv2+'
+ inputs = ['i2c']
+ outputs = ['nunchuck']
+ annotations = \
+ tuple(('reg-0x%02X' % i, 'Register 0x%02X' % i) for i in range(6)) + (
+ ('bit-bz', 'BZ bit'),
+ ('bit-bc', 'BC bit'),
+ ('bit-ax', 'AX bits'),
+ ('bit-ay', 'AY bits'),
+ ('bit-az', 'AZ bits'),
+ ('nunchuk-write', 'Nunchuk write'),
+ ('cmd-init', 'Init command'),
+ ('summary', 'Summary'),
+ ('warnings', 'Warnings'),
+ )
+ annotation_rows = (
+ ('regs', 'Registers', tuple(range(13))),
+ ('summary', 'Summary', (13,)),
+ ('warnings', 'Warnings', (14,)),
+ )
+
+ def __init__(self, **kwargs):
+ self.state = 'IDLE'
+ self.sx = self.sy = self.ax = self.ay = self.az = self.bz = self.bc = -1
+ self.databytecount = 0
+ self.reg = 0x00
+ self.ss = self.es = self.block_ss = self.block_es = 0
+ self.init_seq = []
+
+ def start(self):
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def putx(self, data):
+ self.put(self.ss, self.es, self.out_ann, data)
+
+ def putb(self, data):
+ self.put(self.block_ss, self.block_es, self.out_ann, data)
+
+ def putd(self, bit1, bit2, data):
+ self.put(self.bits[bit1][1], self.bits[bit2][2], self.out_ann, data)
+
+ def handle_reg_0x00(self, databyte):
+ self.block_ss = self.ss
+ self.sx = databyte
+ self.putx([0, ['Analog stick X position: 0x%02X' % self.sx,
+ 'SX: 0x%02X' % self.sx]])
+
+ def handle_reg_0x01(self, databyte):
+ self.sy = databyte
+ self.putx([1, ['Analog stick Y position: 0x%02X' % self.sy,
+ 'SY: 0x%02X' % self.sy]])
+
+ def handle_reg_0x02(self, databyte):
+ self.ax = databyte << 2
+ self.putx([2, ['Accelerometer X value bits[9:2]: 0x%03X' % self.ax,
+ 'AX[9:2]: 0x%03X' % self.ax]])
+
+ def handle_reg_0x03(self, databyte):
+ self.ay = databyte << 2
+ self.putx([3, ['Accelerometer Y value bits[9:2]: 0x%03X' % self.ay,
+ 'AY[9:2]: 0x%03X' % self.ay]])
+
+ def handle_reg_0x04(self, databyte):
+ self.az = databyte << 2
+ self.putx([4, ['Accelerometer Z value bits[9:2]: 0x%03X' % self.az,
+ 'AZ[9:2]: 0x%03X' % self.az]])
+
+ def handle_reg_0x05(self, databyte):
+ self.block_es = self.es
+ self.bz = (databyte & (1 << 0)) >> 0 # Bits[0:0]
+ self.bc = (databyte & (1 << 1)) >> 1 # Bits[1:1]
+ ax_rest = (databyte & (3 << 2)) >> 2 # Bits[3:2]
+ ay_rest = (databyte & (3 << 4)) >> 4 # Bits[5:4]
+ az_rest = (databyte & (3 << 6)) >> 6 # Bits[7:6]
+ self.ax |= ax_rest
+ self.ay |= ay_rest
+ self.az |= az_rest
+
+ # self.putx([5, ['Register 5', 'Reg 5', 'R5']])
+
+ s = '' if (self.bz == 0) else 'not '
+ self.putd(0, 0, [6, ['Z: %spressed' % s, 'BZ: %d' % self.bz]])
+
+ s = '' if (self.bc == 0) else 'not '
+ self.putd(1, 1, [7, ['C: %spressed' % s, 'BC: %d' % self.bc]])
+
+ self.putd(3, 2, [8, ['Accelerometer X value bits[1:0]: 0x%X' % ax_rest,
+ 'AX[1:0]: 0x%X' % ax_rest]])
+
+ self.putd(5, 4, [9, ['Accelerometer Y value bits[1:0]: 0x%X' % ay_rest,
+ 'AY[1:0]: 0x%X' % ay_rest]])
+
+ self.putd(7, 6, [10, ['Accelerometer Z value bits[1:0]: 0x%X' % az_rest,
+ 'AZ[1:0]: 0x%X' % az_rest]])
+
+ self.reg = 0x00
+
+ def output_full_block_if_possible(self):
+ # For now, only output summary annotations if all values are available.
+ t = (self.sx, self.sy, self.ax, self.ay, self.az, self.bz, self.bc)
+ if -1 in t:
+ return
+ bz = 'pressed' if self.bz == 1 else 'not pressed'
+ bc = 'pressed' if self.bc == 1 else 'not pressed'
+ s = 'Analog stick: %d/%d, accelerometer: %d/%d/%d, Z: %s, C: %s' % \
+ (self.sx, self.sy, self.ax, self.ay, self.az, bz, bc)
+ self.putb([13, [s]])
+
+ def handle_reg_write(self, databyte):
+ self.putx([11, ['Nunchuk write: 0x%02X' % databyte]])
+ if len(self.init_seq) < 2:
+ self.init_seq.append(databyte)
+
+ def output_init_seq(self):
+ if len(self.init_seq) != 2:
+ self.putb([14, ['Init sequence was %d bytes long (2 expected)' % \
+ len(self.init_seq)]])
+ return
+
+ if self.init_seq != [0x40, 0x00]:
+ self.putb([14, ['Unknown init sequence (expected: 0x40 0x00)']])
+ return
+
+ # TODO: Detect Nunchuk clones (they have different init sequences).
+
+ self.putb([12, ['Initialize Nunchuk', 'Init Nunchuk', 'Init', 'I']])
+
+ def decode(self, ss, es, data):
+ cmd, databyte = data
+
+ # Collect the 'BITS' packet, then return. The next packet is
+ # guaranteed to belong to these bits we just stored.
+ if cmd == 'BITS':
+ self.bits = databyte
+ return
+
+ self.ss, self.es = ss, es
+
+ # State machine.
+ if self.state == 'IDLE':
+ # Wait for an I²C START condition.
+ if cmd != 'START':
+ return
+ self.state = 'GET SLAVE ADDR'
+ self.block_start_sample = ss
+ elif self.state == 'GET SLAVE ADDR':
+ # Wait for an address read/write operation.
+ if cmd == 'ADDRESS READ':
+ self.state = 'READ REGS'
+ elif cmd == 'ADDRESS WRITE':
+ self.state = 'WRITE REGS'
+ elif self.state == 'READ REGS':
+ if cmd == 'DATA READ':
+ handle_reg = getattr(self, 'handle_reg_0x%02x' % self.reg)
+ handle_reg(databyte)
+ self.reg += 1
+ elif cmd == 'STOP':
+ self.block_end_sample = es
+ self.output_full_block_if_possible()
+ self.sx = self.sy = self.ax = self.ay = self.az = -1
+ self.bz = self.bc = -1
+ self.state = 'IDLE'
+ else:
+ # self.putx([14, ['Ignoring: %s (data=%s)' % (cmd, databyte)]])
+ pass
+ elif self.state == 'WRITE REGS':
+ if cmd == 'DATA WRITE':
+ self.handle_reg_write(databyte)
+ elif cmd == 'STOP':
+ self.block_end_sample = es
+ self.output_init_seq()
+ self.init_seq = []
+ self.state = 'IDLE'
+ else:
+ # self.putx([14, ['Ignoring: %s (data=%s)' % (cmd, databyte)]])
+ pass
+ else:
+ raise Exception('Invalid state: %s' % self.state)
+
diff --git a/decoders/onewire_link/__init__.py b/decoders/onewire_link/__init__.py
new file mode 100644
index 0000000..d153f93
--- /dev/null
+++ b/decoders/onewire_link/__init__.py
@@ -0,0 +1,69 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+This protocol decoder handles the 1-Wire link layer.
+
+The 1-Wire protocol enables bidirectional communication over a single wire
+(and ground) between a single master and one or multiple slaves. The protocol
+is layered:
+
+ - Link layer (reset, presence detection, reading/writing bits)
+ - Network layer (skip/search/match device ROM addresses)
+ - Transport layer (transport data between 1-Wire master and device)
+
+Sample rate:
+A sufficiently high samplerate is required to properly detect all the elements
+of the protocol. A lower samplerate can be used if the master does not use
+overdrive communication speed. The following minimal values should be used:
+
+ - overdrive available: 2MHz minimum, 5MHz suggested
+ - overdrive not available: 400kHz minimum, 1MHz suggested
+
+Channels:
+1-Wire requires a single signal, but some master implementations might have a
+separate signal used to deliver power to the bus during temperature conversion
+as an example. This power signal is currently not used.
+
+ - owr (1-Wire signal line)
+ - pwr (optional, dedicated power supply pin)
+
+Options:
+1-Wire is an asynchronous protocol, so the decoder must know the samplerate.
+The timing for sampling bits, presence, and reset is calculated by the decoder,
+but in case the user wishes to use different values, it is possible to
+configure the following timing values (number of samplerate periods):
+
+ - overdrive (if active the decoder will be prepared for overdrive)
+ - cnt_normal_bit (time for normal mode sample bit)
+ - cnt_normal_slot (time for normal mode data slot)
+ - cnt_normal_presence (time for normal mode sample presence)
+ - cnt_normal_reset (time for normal mode reset)
+ - cnt_overdrive_bit (time for overdrive mode sample bit)
+ - cnt_overdrive_slot (time for overdrive mode data slot)
+ - cnt_overdrive_presence (time for overdrive mode sample presence)
+ - cnt_overdrive_reset (time for overdrive mode reset)
+
+These options should be configured only on very rare cases and the user should
+read the decoder source code to understand them correctly.
+'''
+
+from .pd import *
+
diff --git a/decoders/onewire_link/pd.py b/decoders/onewire_link/pd.py
new file mode 100644
index 0000000..3641b98
--- /dev/null
+++ b/decoders/onewire_link/pd.py
@@ -0,0 +1,282 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Iztok Jeras <iztok.jeras at gmail.com>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'onewire_link'
+ name = '1-Wire link layer'
+ longname = '1-Wire serial communication bus (link layer)'
+ desc = 'Bidirectional, half-duplex, asynchronous serial bus.'
+ license = 'gplv2+'
+ inputs = ['logic']
+ outputs = ['onewire_link']
+ channels = (
+ {'id': 'owr', 'name': 'OWR', 'desc': '1-Wire signal line'},
+ )
+ optional_channels = (
+ {'id': 'pwr', 'name': 'PWR', 'desc': '1-Wire power supply pin'},
+ )
+ options = (
+ {'id': 'overdrive',
+ 'desc': 'Overdrive mode', 'default': 'no', 'values': ('yes', 'no')},
+ # Time options (specified in microseconds):
+ {'id': 'cnt_normal_bit',
+ 'desc': 'Normal mode sample bit time (μs)', 'default': 15},
+ {'id': 'cnt_normal_slot',
+ 'desc': 'Normal mode data slot time (μs)', 'default': 60},
+ {'id': 'cnt_normal_presence',
+ 'desc': 'Normal mode sample presence time (μs)', 'default': 75},
+ {'id': 'cnt_normal_reset',
+ 'desc': 'Normal mode reset time (μs)', 'default': 480},
+ {'id': 'cnt_overdrive_bit',
+ 'desc': 'Overdrive mode sample bit time (μs)', 'default': 2},
+ {'id': 'cnt_overdrive_slot',
+ 'desc': 'Overdrive mode data slot time (μs)', 'default': 7.3},
+ {'id': 'cnt_overdrive_presence',
+ 'desc': 'Overdrive mode sample presence time (μs)', 'default': 10},
+ {'id': 'cnt_overdrive_reset',
+ 'desc': 'Overdrive mode reset time (μs)', 'default': 48},
+ )
+ annotations = (
+ ('bit', 'Bit'),
+ ('warnings', 'Warnings'),
+ ('reset', 'Reset'),
+ ('presence', 'Presence'),
+ ('overdrive', 'Overdrive mode notifications'),
+ )
+ annotation_rows = (
+ ('bits', 'Bits', (0, 2, 3)),
+ ('info', 'Info', (4,)),
+ ('warnings', 'Warnings', (1,)),
+ )
+
+ def putm(self, data):
+ self.put(0, 0, self.out_ann, data)
+
+ def putpb(self, data):
+ self.put(self.fall, self.samplenum, self.out_python, data)
+
+ def putb(self, data):
+ self.put(self.fall, self.samplenum, self.out_ann, data)
+
+ def putx(self, data):
+ self.put(self.fall, self.cnt_bit[self.overdrive], self.out_ann, data)
+
+ def putfr(self, data):
+ self.put(self.fall, self.rise, self.out_ann, data)
+
+ def putprs(self, data):
+ self.put(self.rise, self.samplenum, self.out_python, data)
+
+ def putrs(self, data):
+ self.put(self.rise, self.samplenum, self.out_ann, data)
+
+ def __init__(self, **kwargs):
+ self.samplerate = None
+ self.samplenum = 0
+ self.state = 'WAIT FOR FALLING EDGE'
+ self.present = 0
+ self.bit = 0
+ self.bit_cnt = 0
+ self.command = 0
+ self.overdrive = 0
+ self.fall = 0
+ self.rise = 0
+
+ def start(self):
+ self.out_python = self.register(srd.OUTPUT_PYTHON)
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def metadata(self, key, value):
+ if key != srd.SRD_CONF_SAMPLERATE:
+ return
+ self.samplerate = value
+
+ # Check if samplerate is appropriate.
+ if self.options['overdrive'] == 'yes':
+ if self.samplerate < 2000000:
+ self.putm([1, ['Sampling rate is too low. Must be above ' +
+ '2MHz for proper overdrive mode decoding.']])
+ elif self.samplerate < 5000000:
+ self.putm([1, ['Sampling rate is suggested to be above 5MHz ' +
+ 'for proper overdrive mode decoding.']])
+ else:
+ if self.samplerate < 400000:
+ self.putm([1, ['Sampling rate is too low. Must be above ' +
+ '400kHz for proper normal mode decoding.']])
+ elif (self.samplerate < 1000000):
+ self.putm([1, ['Sampling rate is suggested to be above ' +
+ '1MHz for proper normal mode decoding.']])
+
+ # The default 1-Wire time base is 30us. This is used to calculate
+ # sampling times.
+ samplerate = float(self.samplerate)
+
+ x = float(self.options['cnt_normal_bit']) / 1000000.0
+ self.cnt_normal_bit = int(samplerate * x) - 1
+ x = float(self.options['cnt_normal_slot']) / 1000000.0
+ self.cnt_normal_slot = int(samplerate * x) - 1
+ x = float(self.options['cnt_normal_presence']) / 1000000.0
+ self.cnt_normal_presence = int(samplerate * x) - 1
+ x = float(self.options['cnt_normal_reset']) / 1000000.0
+ self.cnt_normal_reset = int(samplerate * x) - 1
+ x = float(self.options['cnt_overdrive_bit']) / 1000000.0
+ self.cnt_overdrive_bit = int(samplerate * x) - 1
+ x = float(self.options['cnt_overdrive_slot']) / 1000000.0
+ self.cnt_overdrive_slot = int(samplerate * x) - 1
+ x = float(self.options['cnt_overdrive_presence']) / 1000000.0
+ self.cnt_overdrive_presence = int(samplerate * x) - 1
+ x = float(self.options['cnt_overdrive_reset']) / 1000000.0
+ self.cnt_overdrive_reset = int(samplerate * x) - 1
+
+ # Organize values into lists.
+ self.cnt_bit = [self.cnt_normal_bit, self.cnt_overdrive_bit]
+ self.cnt_presence = [self.cnt_normal_presence, self.cnt_overdrive_presence]
+ self.cnt_reset = [self.cnt_normal_reset, self.cnt_overdrive_reset]
+ self.cnt_slot = [self.cnt_normal_slot, self.cnt_overdrive_slot]
+
+ # Check if sample times are in the allowed range.
+
+ time_min = float(self.cnt_normal_bit) / self.samplerate
+ time_max = float(self.cnt_normal_bit + 1) / self.samplerate
+ if (time_min < 0.000005) or (time_max > 0.000015):
+ self.putm([1, ['The normal mode data sample time interval ' +
+ '(%2.1fus-%2.1fus) should be inside (5.0us, 15.0us).'
+ % (time_min * 1000000, time_max * 1000000)]])
+
+ time_min = float(self.cnt_normal_presence) / self.samplerate
+ time_max = float(self.cnt_normal_presence + 1) / self.samplerate
+ if (time_min < 0.0000681) or (time_max > 0.000075):
+ self.putm([1, ['The normal mode presence sample time interval ' +
+ '(%2.1fus-%2.1fus) should be inside (68.1us, 75.0us).'
+ % (time_min * 1000000, time_max * 1000000)]])
+
+ time_min = float(self.cnt_overdrive_bit) / self.samplerate
+ time_max = float(self.cnt_overdrive_bit + 1) / self.samplerate
+ if (time_min < 0.000001) or (time_max > 0.000002):
+ self.putm([1, ['The overdrive mode data sample time interval ' +
+ '(%2.1fus-%2.1fus) should be inside (1.0us, 2.0us).'
+ % (time_min * 1000000, time_max * 1000000)]])
+
+ time_min = float(self.cnt_overdrive_presence) / self.samplerate
+ time_max = float(self.cnt_overdrive_presence + 1) / self.samplerate
+ if (time_min < 0.0000073) or (time_max > 0.000010):
+ self.putm([1, ['The overdrive mode presence sample time interval ' +
+ '(%2.1fus-%2.1fus) should be inside (7.3us, 10.0us).'
+ % (time_min*1000000, time_max*1000000)]])
+
+ def decode(self, ss, es, data):
+ if self.samplerate is None:
+ raise Exception("Cannot decode without samplerate.")
+ for (self.samplenum, (owr, pwr)) in data:
+ # State machine.
+ if self.state == 'WAIT FOR FALLING EDGE':
+ # The start of a cycle is a falling edge.
+ if owr != 0:
+ continue
+ # Save the sample number for the falling edge.
+ self.fall = self.samplenum
+ # Go to waiting for sample time.
+ self.state = 'WAIT FOR DATA SAMPLE'
+ elif self.state == 'WAIT FOR DATA SAMPLE':
+ # Sample data bit.
+ t = self.samplenum - self.fall
+ if t == self.cnt_bit[self.overdrive]:
+ self.bit = owr
+ self.state = 'WAIT FOR DATA SLOT END'
+ elif self.state == 'WAIT FOR DATA SLOT END':
+ # A data slot ends in a recovery period, otherwise, this is
+ # probably a reset.
+ t = self.samplenum - self.fall
+ if t != self.cnt_slot[self.overdrive]:
+ continue
+
+ if owr == 0:
+ # This seems to be a reset slot, wait for its end.
+ self.state = 'WAIT FOR RISING EDGE'
+ continue
+
+ self.putb([0, ['Bit: %d' % self.bit, '%d' % self.bit]])
+ self.putpb(['BIT', self.bit])
+
+ # Checking the first command to see if overdrive mode
+ # should be entered.
+ if self.bit_cnt <= 8:
+ self.command |= (self.bit << self.bit_cnt)
+ elif self.bit_cnt == 8 and self.command in [0x3c, 0x69]:
+ self.putx([4, ['Entering overdrive mode', 'Overdrive on']])
+ # Increment the bit counter.
+ self.bit_cnt += 1
+ # Wait for next slot.
+ self.state = 'WAIT FOR FALLING EDGE'
+ elif self.state == 'WAIT FOR RISING EDGE':
+ # The end of a cycle is a rising edge.
+ if owr != 1:
+ continue
+
+ # Check if this was a reset cycle.
+ t = self.samplenum - self.fall
+ if t > self.cnt_normal_reset:
+ # Save the sample number for the rising edge.
+ self.rise = self.samplenum
+ self.putfr([2, ['Reset', 'Rst', 'R']])
+ self.state = 'WAIT FOR PRESENCE DETECT'
+ # Exit overdrive mode.
+ if self.overdrive:
+ self.putx([4, ['Exiting overdrive mode', 'Overdrive off']])
+ self.overdrive = 0
+ # Clear command bit counter and data register.
+ self.bit_cnt = 0
+ self.command = 0
+ elif (t > self.cnt_overdrive_reset) and self.overdrive:
+ # Save the sample number for the rising edge.
+ self.rise = self.samplenum
+ self.putfr([2, ['Reset', 'Rst', 'R']])
+ self.state = "WAIT FOR PRESENCE DETECT"
+ # Otherwise this is assumed to be a data bit.
+ else:
+ self.state = "WAIT FOR FALLING EDGE"
+ elif self.state == 'WAIT FOR PRESENCE DETECT':
+ # Sample presence status.
+ t = self.samplenum - self.rise
+ if t == self.cnt_presence[self.overdrive]:
+ self.present = owr
+ self.state = 'WAIT FOR RESET SLOT END'
+ elif self.state == 'WAIT FOR RESET SLOT END':
+ # A reset slot ends in a long recovery period.
+ t = self.samplenum - self.rise
+ if t != self.cnt_reset[self.overdrive]:
+ continue
+
+ if owr == 0:
+ # This seems to be a reset slot, wait for its end.
+ self.state = 'WAIT FOR RISING EDGE'
+ continue
+
+ p = 'false' if self.present else 'true'
+ self.putrs([3, ['Presence: %s' % p, 'Presence', 'Pres', 'P']])
+ self.putprs(['RESET/PRESENCE', not self.present])
+
+ # Wait for next slot.
+ self.state = 'WAIT FOR FALLING EDGE'
+ else:
+ raise Exception('Invalid state: %s' % self.state)
diff --git a/decoders/onewire_network/__init__.py b/decoders/onewire_network/__init__.py
new file mode 100644
index 0000000..31e9134
--- /dev/null
+++ b/decoders/onewire_network/__init__.py
@@ -0,0 +1,58 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+This decoder stacks on top of the 'onewire_link' PD and decodes the
+1-Wire protocol (network layer).
+
+The 1-Wire protocol enables bidirectional communication over a single wire
+(and ground) between a single master and one or multiple slaves. The protocol
+is layered:
+
+ - Link layer (reset, presence detection, reading/writing bits)
+ - Network layer (skip/search/match device ROM addresses)
+ - Transport layer (transport data between 1-Wire master and device)
+
+Network layer:
+
+The following link layer annotations are shown:
+
+ - RESET/PRESENCE True/False
+ The event is marked from the signal negative edge to the end of the reset
+ high period. It is also reported if there are any devices attached to the
+ bus.
+
+The following network layer annotations are shown:
+
+ - ROM command <val> <name>
+ The requested ROM command is displayed as an 8bit hex value and by name.
+ - ROM <val>
+ The 64bit value of the addressed device is displayed:
+ Family code (1 byte) + serial number (6 bytes) + CRC (1 byte)
+ - Data <val>
+ Data intended for the transport layer is displayed as an 8bit hex value.
+
+TODO:
+ - Add CRC checks, to see if there were communication errors on the wire.
+ - Add reporting original/complement address values from the search algorithm.
+'''
+
+from .pd import *
+
diff --git a/decoders/onewire_network/pd.py b/decoders/onewire_network/pd.py
new file mode 100644
index 0000000..23402a6
--- /dev/null
+++ b/decoders/onewire_network/pd.py
@@ -0,0 +1,182 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Iztok Jeras <iztok.jeras at gmail.com>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+
+# Dictionary of ROM commands and their names, next state.
+command = {
+ 0x33: ['Read ROM' , 'GET ROM' ],
+ 0x0f: ['Conditional read ROM' , 'GET ROM' ],
+ 0xcc: ['Skip ROM' , 'TRANSPORT' ],
+ 0x55: ['Match ROM' , 'GET ROM' ],
+ 0xf0: ['Search ROM' , 'SEARCH ROM'],
+ 0xec: ['Conditional search ROM', 'SEARCH ROM'],
+ 0x3c: ['Overdrive skip ROM' , 'TRANSPORT' ],
+ 0x69: ['Overdrive match ROM' , 'GET ROM' ],
+}
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'onewire_network'
+ name = '1-Wire network layer'
+ longname = '1-Wire serial communication bus (network layer)'
+ desc = 'Bidirectional, half-duplex, asynchronous serial bus.'
+ license = 'gplv2+'
+ inputs = ['onewire_link']
+ outputs = ['onewire_network']
+ annotations = (
+ ('text', 'Human-readable text'),
+ )
+
+ def __init__(self, **kwargs):
+ self.beg = 0
+ self.end = 0
+ self.state = 'COMMAND'
+ self.bit_cnt = 0
+ self.search = 'P'
+ self.data_p = 0x0
+ self.data_n = 0x0
+ self.data = 0x0
+ self.rom = 0x0000000000000000
+
+ def start(self):
+ self.out_python = self.register(srd.OUTPUT_PYTHON)
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def putx(self, data):
+ # Helper function for most annotations.
+ self.put(self.beg, self.end, self.out_ann, data)
+
+ def puty(self, data):
+ # Helper function for most protocol packets.
+ self.put(self.beg, self.end, self.out_python, data)
+
+ def decode(self, ss, es, data):
+ code, val = data
+
+ # State machine.
+ if code == 'RESET/PRESENCE':
+ self.search = 'P'
+ self.bit_cnt = 0
+ self.put(ss, es, self.out_ann,
+ [0, ['Reset/presence: %s' % ('true' if val else 'false')]])
+ self.put(ss, es, self.out_python, ['RESET/PRESENCE', val])
+ self.state = 'COMMAND'
+ return
+
+ # For now we're only interested in 'RESET/PRESENCE' and 'BIT' packets.
+ if code != 'BIT':
+ return
+
+ if self.state == 'COMMAND':
+ # Receiving and decoding a ROM command.
+ if self.onewire_collect(8, val, ss, es) == 0:
+ return
+ if self.data in command:
+ self.putx([0, ['ROM command: 0x%02x \'%s\''
+ % (self.data, command[self.data][0])]])
+ self.state = command[self.data][1]
+ else:
+ self.putx([0, ['ROM command: 0x%02x \'%s\''
+ % (self.data, 'unrecognized')]])
+ self.state = 'COMMAND ERROR'
+ elif self.state == 'GET ROM':
+ # A 64 bit device address is selected.
+ # Family code (1 byte) + serial number (6 bytes) + CRC (1 byte)
+ if self.onewire_collect(64, val, ss, es) == 0:
+ return
+ self.rom = self.data & 0xffffffffffffffff
+ self.putx([0, ['ROM: 0x%016x' % self.rom]])
+ self.puty(['ROM', self.rom])
+ self.state = 'TRANSPORT'
+ elif self.state == 'SEARCH ROM':
+ # A 64 bit device address is searched for.
+ # Family code (1 byte) + serial number (6 bytes) + CRC (1 byte)
+ if self.onewire_search(64, val, ss, es) == 0:
+ return
+ self.rom = self.data & 0xffffffffffffffff
+ self.putx([0, ['ROM: 0x%016x' % self.rom]])
+ self.puty(['ROM', self.rom])
+ self.state = 'TRANSPORT'
+ elif self.state == 'TRANSPORT':
+ # The transport layer is handled in byte sized units.
+ if self.onewire_collect(8, val, ss, es) == 0:
+ return
+ self.putx([0, ['Data: 0x%02x' % self.data]])
+ self.puty(['DATA', self.data])
+ elif self.state == 'COMMAND ERROR':
+ # Since the command is not recognized, print raw data.
+ if self.onewire_collect(8, val, ss, es) == 0:
+ return
+ self.putx([0, ['ROM error data: 0x%02x' % self.data]])
+ else:
+ raise Exception('Invalid state: %s' % self.state)
+
+ # Data collector.
+ def onewire_collect(self, length, val, ss, es):
+ # Storing the sample this sequence begins with.
+ if self.bit_cnt == 1:
+ self.beg = ss
+ self.data = self.data & ~(1 << self.bit_cnt) | (val << self.bit_cnt)
+ self.bit_cnt += 1
+ # Storing the sample this sequence ends with.
+ # In case the full length of the sequence is received, return 1.
+ if self.bit_cnt == length:
+ self.end = es
+ self.data = self.data & ((1 << length) - 1)
+ self.bit_cnt = 0
+ return 1
+ else:
+ return 0
+
+ # Search collector.
+ def onewire_search(self, length, val, ss, es):
+ # Storing the sample this sequence begins with.
+ if (self.bit_cnt == 0) and (self.search == 'P'):
+ self.beg = ss
+
+ if self.search == 'P':
+ # Master receives an original address bit.
+ self.data_p = self.data_p & ~(1 << self.bit_cnt) | \
+ (val << self.bit_cnt)
+ self.search = 'N'
+ elif self.search == 'N':
+ # Master receives a complemented address bit.
+ self.data_n = self.data_n & ~(1 << self.bit_cnt) | \
+ (val << self.bit_cnt)
+ self.search = 'D'
+ elif self.search == 'D':
+ # Master transmits an address bit.
+ self.data = self.data & ~(1 << self.bit_cnt) | (val << self.bit_cnt)
+ self.search = 'P'
+ self.bit_cnt += 1
+
+ # Storing the sample this sequence ends with.
+ # In case the full length of the sequence is received, return 1.
+ if self.bit_cnt == length:
+ self.end = es
+ self.data_p = self.data_p & ((1 << length) - 1)
+ self.data_n = self.data_n & ((1 << length) - 1)
+ self.data = self.data & ((1 << length) - 1)
+ self.search = 'P'
+ self.bit_cnt = 0
+ return 1
+ else:
+ return 0
diff --git a/decoders/pan1321/__init__.py b/decoders/pan1321/__init__.py
new file mode 100644
index 0000000..9bda523
--- /dev/null
+++ b/decoders/pan1321/__init__.py
@@ -0,0 +1,27 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+This decoder stacks on top of the 'uart' PD and decodes the Panasonic PAN1321
+Bluetooth module Serial Port Profile (SPP) protocol.
+'''
+
+from .pd import *
+
diff --git a/decoders/pan1321/pd.py b/decoders/pan1321/pd.py
new file mode 100644
index 0000000..d173e1c
--- /dev/null
+++ b/decoders/pan1321/pd.py
@@ -0,0 +1,161 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012-2013 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+
+# ...
+RX = 0
+TX = 1
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'pan1321'
+ name = 'PAN1321'
+ longname = 'Panasonic PAN1321'
+ desc = 'Bluetooth RF module with Serial Port Profile (SPP).'
+ license = 'gplv2+'
+ inputs = ['uart']
+ outputs = ['pan1321']
+ annotations = (
+ ('text-verbose', 'Human-readable text (verbose)'),
+ ('text', 'Human-readable text'),
+ ('warnings', 'Human-readable warnings'),
+ )
+
+ def __init__(self, **kwargs):
+ self.cmd = ['', '']
+ self.ss_block = None
+
+ def start(self):
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def putx(self, data):
+ self.put(self.ss_block, self.es_block, self.out_ann, data)
+
+ def handle_host_command(self, rxtx, s):
+ if s.startswith('AT+JAAC'):
+ # AT+JAAC=<auto_accept> (0 or 1)
+ p = s[s.find('=') + 1:]
+ if p not in ('0', '1'):
+ self.putx([2, ['Warning: Invalid JAAC parameter "%s"' % p]])
+ return
+ x = 'Auto' if (p == '1') else 'Don\'t auto'
+ self.putx([0, ['%s-accept new connections' % x]])
+ self.putx([1, ['%s-accept connections' % x]])
+ elif s.startswith('AT+JPRO'):
+ # AT+JPRO=<mode> (0 or 1)
+ p = s[s.find('=') + 1:]
+ if p not in ('0', '1'):
+ self.putx([2, ['Warning: Invalid JPRO parameter "%s"' % p]])
+ return
+ onoff = 'off' if (p == '0') else 'on'
+ x = 'Leaving' if (p == '0') else 'Entering'
+ self.putx([0, ['%s production mode' % x]])
+ self.putx([1, ['Production mode = %s' % onoff]])
+ elif s.startswith('AT+JRES'):
+ # AT+JRES
+ if s != 'AT+JRES': # JRES has no params.
+ self.putx([2, ['Warning: Invalid JRES usage.']])
+ return
+ self.putx([0, ['Triggering a software reset']])
+ self.putx([1, ['Reset']])
+ elif s.startswith('AT+JSDA'):
+ # AT+JSDA=<l>,<d> (l: length in bytes, d: data)
+ # l is (max?) 3 decimal digits and ranges from 1 to MTU size.
+ # Data can be ASCII or binary values (l bytes total).
+ l, d = s[s.find('=') + 1:].split(',')
+ if not l.isnumeric():
+ self.putx([2, ['Warning: Invalid data length "%s".' % l]])
+ if int(l) != len(d):
+ self.putx([2, ['Warning: Data length mismatch (%d != %d).' % \
+ (int(l), len(d))]])
+ # TODO: Warn if length > MTU size (which is firmware-dependent
+ # and is negotiated by both Bluetooth devices upon connection).
+ b = ''.join(['%02x ' % ord(c) for c in d])[:-1]
+ self.putx([0, ['Sending %d data bytes: %s' % (int(l), b)]])
+ self.putx([1, ['Send %d = %s' % (int(l), b)]])
+ elif s.startswith('AT+JSEC'):
+ # AT+JSEC=<secmode>,<linkkey_info>,<pintype>,<pinlen>,<pin>
+ # secmode: Security mode 1 or 3 (default).
+ # linkkey_info: Must be 1 or 2. Has no function according to docs.
+ # pintype: 1: variable pin (default), 2: fixed pin.
+ # pinlen: PIN length (2 decimal digits). Max. PIN length is 16.
+ # pin: The Bluetooth PIN ('pinlen' chars). Used if pintype=2.
+ # Note: AT+JSEC (if used) must be the first command after reset.
+ # TODO: Parse all the other parameters.
+ pin = s[-4:]
+ self.putx([0, ['Host set the Bluetooth PIN to "' + pin + '"']])
+ self.putx([1, ['PIN = ' + pin]])
+ elif s.startswith('AT+JSLN'):
+ # AT+JSLN=<namelen>,<name>
+ # namelen: Friendly name length (2 decimal digits). Max. len is 18.
+ # name: The Bluetooth "friendly name" ('namelen' ASCII characters).
+ name = s[s.find(',') + 1:]
+ self.putx([0, ['Host set the Bluetooth name to "' + name + '"']])
+ self.putx([1, ['BT name = ' + name]])
+ else:
+ self.putx([0, ['Host sent unsupported command: %s' % s]])
+ self.putx([1, ['Unsupported command: %s' % s]])
+
+ def handle_device_reply(self, rxtx, s):
+ if s == 'ROK':
+ self.putx([0, ['Device initialized correctly']])
+ self.putx([1, ['Init']])
+ elif s == 'OK':
+ self.putx([0, ['Device acknowledged last command']])
+ self.putx([1, ['ACK']])
+ elif s.startswith('ERR'):
+ error = s[s.find('=') + 1:]
+ self.putx([0, ['Device sent error code ' + error]])
+ self.putx([1, ['ERR = ' + error]])
+ else:
+ self.putx([0, ['Device sent an unknown reply: %s' % s]])
+ self.putx([1, ['Unknown reply: %s' % s]])
+
+ def decode(self, ss, es, data):
+ ptype, rxtx, pdata = data
+
+ # For now, ignore all UART packets except the actual data packets.
+ if ptype != 'DATA':
+ return
+
+ # If this is the start of a command/reply, remember the start sample.
+ if self.cmd[rxtx] == '':
+ self.ss_block = ss
+
+ # Append a new (ASCII) byte to the currently built/parsed command.
+ self.cmd[rxtx] += chr(pdata)
+
+ # Get packets/bytes until an \r\n sequence is found (end of command).
+ if self.cmd[rxtx][-2:] != '\r\n':
+ return
+
+ # Handle host commands and device replies.
+ # We remove trailing \r\n from the strings before handling them.
+ self.es_block = es
+ if rxtx == RX:
+ self.handle_device_reply(rxtx, self.cmd[rxtx][:-2])
+ elif rxtx == TX:
+ self.handle_host_command(rxtx, self.cmd[rxtx][:-2])
+ else:
+ raise Exception('Invalid rxtx value: %d' % rxtx)
+
+ self.cmd[rxtx] = ''
+
diff --git a/decoders/parallel/__init__.py b/decoders/parallel/__init__.py
new file mode 100644
index 0000000..cc1f3d1
--- /dev/null
+++ b/decoders/parallel/__init__.py
@@ -0,0 +1,36 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2013 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+This protocol decoder can decode synchronous parallel buses with various
+number of data bits/channels and one (optional) clock line.
+
+If no clock line is supplied, the decoder works slightly differently in
+that it interprets every transition on any of the supplied data channels
+like there had been a clock transition.
+
+It is required to use the lowest data channels, and use consecutive ones.
+For example, for a 4-bit sync parallel bus, channels D0/D1/D2/D3 (and CLK)
+should be used. Using combinations like D7/D12/D3/D15 is not supported.
+For an 8-bit bus you should use D0-D7, for a 16-bit bus use D0-D15 and so on.
+'''
+
+from .pd import *
+
diff --git a/decoders/parallel/pd.py b/decoders/parallel/pd.py
new file mode 100644
index 0000000..03b5e2f
--- /dev/null
+++ b/decoders/parallel/pd.py
@@ -0,0 +1,192 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2013 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+
+'''
+OUTPUT_PYTHON format:
+
+Packet:
+[<ptype>, <pdata>]
+
+<ptype>, <pdata>
+ - 'ITEM', [<item>, <itembitsize>]
+ - 'WORD', [<word>, <wordbitsize>, <worditemcount>]
+
+<item>:
+ - A single item (a number). It can be of arbitrary size. The max. number
+ of bits in this item is specified in <itembitsize>.
+
+<itembitsize>:
+ - The size of an item (in bits). For a 4-bit parallel bus this is 4,
+ for a 16-bit parallel bus this is 16, and so on.
+
+<word>:
+ - A single word (a number). It can be of arbitrary size. The max. number
+ of bits in this word is specified in <wordbitsize>. The (exact) number
+ of items in this word is specified in <worditemcount>.
+
+<wordbitsize>:
+ - The size of a word (in bits). For a 2-item word with 8-bit items
+ <wordbitsize> is 16, for a 3-item word with 4-bit items <wordbitsize>
+ is 12, and so on.
+
+<worditemcount>:
+ - The size of a word (in number of items). For a 4-item word (no matter
+ how many bits each item consists of) <worditemcount> is 4, for a 7-item
+ word <worditemcount> is 7, and so on.
+'''
+
+def channel_list(num_channels):
+ l = [{'id': 'clk', 'name': 'CLK', 'desc': 'Clock line'}]
+ for i in range(num_channels):
+ d = {'id': 'd%d' % i, 'name': 'D%d' % i, 'desc': 'Data line %d' % i}
+ l.append(d)
+ return tuple(l)
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'parallel'
+ name = 'Parallel'
+ longname = 'Parallel sync bus'
+ desc = 'Generic parallel synchronous bus.'
+ license = 'gplv2+'
+ inputs = ['logic']
+ outputs = ['parallel']
+ optional_channels = channel_list(8)
+ options = (
+ {'id': 'clock_edge', 'desc': 'Clock edge to sample on',
+ 'default': 'rising', 'values': ('rising', 'falling')},
+ {'id': 'wordsize', 'desc': 'Data wordsize', 'default': 1},
+ {'id': 'endianness', 'desc': 'Data endianness',
+ 'default': 'little', 'values': ('little', 'big')},
+ )
+ annotations = (
+ ('items', 'Items'),
+ ('words', 'Words'),
+ )
+
+ def __init__(self):
+ self.oldclk = None
+ self.items = []
+ self.itemcount = 0
+ self.saved_item = None
+ self.samplenum = 0
+ self.oldpins = None
+ self.ss_item = self.es_item = None
+ self.first = True
+ self.state = 'IDLE'
+
+ def start(self):
+ self.out_python = self.register(srd.OUTPUT_PYTHON)
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def putpb(self, data):
+ self.put(self.ss_item, self.es_item, self.out_python, data)
+
+ def putb(self, data):
+ self.put(self.ss_item, self.es_item, self.out_ann, data)
+
+ def putpw(self, data):
+ self.put(self.ss_word, self.es_word, self.out_python, data)
+
+ def putw(self, data):
+ self.put(self.ss_word, self.es_word, self.out_ann, data)
+
+ def handle_bits(self, datapins):
+ # If this is the first item in a word, save its sample number.
+ if self.itemcount == 0:
+ self.ss_word = self.samplenum
+
+ # Get the bits for this item.
+ item, used_pins = 0, datapins.count(b'\x01') + datapins.count(b'\x00')
+ for i in range(used_pins):
+ item |= datapins[i] << i
+
+ self.items.append(item)
+ self.itemcount += 1
+
+ if self.first == True:
+ # Save the start sample and item for later (no output yet).
+ self.ss_item = self.samplenum
+ self.first = False
+ self.saved_item = item
+ else:
+ # Output the saved item (from the last CLK edge to the current).
+ self.es_item = self.samplenum
+ self.putpb(['ITEM', self.saved_item])
+ self.putb([0, ['%X' % self.saved_item]])
+ self.ss_item = self.samplenum
+ self.saved_item = item
+
+ endian, ws = self.options['endianness'], self.options['wordsize']
+
+ # Get as many items as the configured wordsize says.
+ if self.itemcount < ws:
+ return
+
+ # Output annotations/python for a word (a collection of items).
+ word = 0
+ for i in range(ws):
+ if endian == 'little':
+ word |= self.items[i] << ((ws - 1 - i) * used_pins)
+ elif endian == 'big':
+ word |= self.items[i] << (i * used_pins)
+
+ self.es_word = self.samplenum
+ # self.putpw(['WORD', word])
+ # self.putw([1, ['%X' % word]])
+ self.ss_word = self.samplenum
+
+ self.itemcount, self.items = 0, []
+
+ def find_clk_edge(self, clk, datapins):
+ # Ignore sample if the clock pin hasn't changed.
+ if clk == self.oldclk:
+ return
+ self.oldclk = clk
+
+ # Sample data on rising/falling clock edge (depends on config).
+ c = self.options['clock_edge']
+ if c == 'rising' and clk == 0: # Sample on rising clock edge.
+ return
+ elif c == 'falling' and clk == 1: # Sample on falling clock edge.
+ return
+
+ # Found the correct clock edge, now get the bits.
+ self.handle_bits(datapins)
+
+ def decode(self, ss, es, data):
+ for (self.samplenum, pins) in data:
+
+ # Ignore identical samples early on (for performance reasons).
+ if self.oldpins == pins:
+ continue
+ self.oldpins = pins
+
+ # State machine.
+ if self.state == 'IDLE':
+ if pins[0] not in (0, 1):
+ self.handle_bits(pins[1:])
+ else:
+ self.find_clk_edge(pins[0], pins[1:])
+ else:
+ raise Exception('Invalid state: %s' % self.state)
+
diff --git a/decoders/rgb_led_spi/__init__.py b/decoders/rgb_led_spi/__init__.py
new file mode 100644
index 0000000..3d41ea5
--- /dev/null
+++ b/decoders/rgb_led_spi/__init__.py
@@ -0,0 +1,27 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2014 Matt Ranostay <mranostay at gmail.com>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+This decoder stacks on top of the 'spi' PD and decodes generic RGB LED string
+values that are clocked over SPI in RGB values.
+'''
+
+from .pd import *
+
diff --git a/decoders/rgb_led_spi/pd.py b/decoders/rgb_led_spi/pd.py
new file mode 100644
index 0000000..8577928
--- /dev/null
+++ b/decoders/rgb_led_spi/pd.py
@@ -0,0 +1,69 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2014 Matt Ranostay <mranostay at gmail.com>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'rgb_led_spi'
+ name = 'RGB LED (SPI)'
+ longname = 'RGB LED string decoder (SPI)'
+ desc = 'Generic RGB LED string protocol (RGB values clocked over SPI).'
+ license = 'gplv2'
+ inputs = ['spi']
+ outputs = ['rgb_led_spi']
+ annotations = (
+ ('rgb', 'RGB values'),
+ )
+
+ def __init__(self, **kwargs):
+ self.cmd_ss, self.cmd_es = 0, 0
+ self.mosi_bytes = []
+
+ def start(self):
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def putx(self, data):
+ self.put(self.cmd_ss, self.cmd_es, self.out_ann, data)
+
+ def decode(self, ss, es, data):
+ ptype, mosi, miso = data
+
+ # Only care about data packets.
+ if ptype != 'DATA':
+ return
+ self.ss, self.es = ss, es
+
+ if len(self.mosi_bytes) == 0:
+ self.cmd_ss = ss
+ self.mosi_bytes.append(mosi)
+
+ # RGB value == 3 bytes
+ if len(self.mosi_bytes) != 3:
+ return
+
+ red, green, blue = self.mosi_bytes
+ rgb_value = int(red) << 16
+ rgb_value |= int(green) << 8
+ rgb_value |= int(blue)
+
+ self.cmd_es = es
+ self.putx([0, ["#%.6x" % rgb_value]])
+ self.mosi_bytes = []
diff --git a/decoders/rtc8564/__init__.py b/decoders/rtc8564/__init__.py
new file mode 100644
index 0000000..9a397b1
--- /dev/null
+++ b/decoders/rtc8564/__init__.py
@@ -0,0 +1,27 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+This decoder stacks on top of the 'i2c' PD and decodes the Epson
+RTC-8564 JE/NB real-time clock (RTC) protocol.
+'''
+
+from .pd import *
+
diff --git a/decoders/rtc8564/pd.py b/decoders/rtc8564/pd.py
new file mode 100644
index 0000000..f13af36
--- /dev/null
+++ b/decoders/rtc8564/pd.py
@@ -0,0 +1,257 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012-2014 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+
+# Return the specified BCD number (max. 8 bits) as integer.
+def bcd2int(b):
+ return (b & 0x0f) + ((b >> 4) * 10)
+
+def reg_list():
+ l = []
+ for i in range(8 + 1):
+ l.append(('reg-0x%02x' % i, 'Register 0x%02x' % i))
+
+ return tuple(l)
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'rtc8564'
+ name = 'RTC-8564'
+ longname = 'Epson RTC-8564 JE/NB'
+ desc = 'Realtime clock module protocol.'
+ license = 'gplv2+'
+ inputs = ['i2c']
+ outputs = ['rtc8564']
+ annotations = reg_list() + (
+ ('read', 'Read date/time'),
+ ('write', 'Write date/time'),
+ ('bit-reserved', 'Reserved bit'),
+ ('bit-vl', 'VL bit'),
+ ('bit-century', 'Century bit'),
+ ('reg-read', 'Register read'),
+ ('reg-write', 'Register write'),
+ )
+ annotation_rows = (
+ ('bits', 'Bits', tuple(range(0, 8 + 1)) + (11, 12, 13)),
+ ('regs', 'Register access', (14, 15)),
+ ('date-time', 'Date/time', (9, 10)),
+ )
+
+ def __init__(self, **kwargs):
+ self.state = 'IDLE'
+ self.hours = -1
+ self.minutes = -1
+ self.seconds = -1
+ self.days = -1
+ self.weekdays = -1
+ self.months = -1
+ self.years = -1
+ self.bits = []
+
+ def start(self):
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def putx(self, data):
+ self.put(self.ss, self.es, self.out_ann, data)
+
+ def putd(self, bit1, bit2, data):
+ self.put(self.bits[bit1][1], self.bits[bit2][2], self.out_ann, data)
+
+ def putr(self, bit):
+ self.put(self.bits[bit][1], self.bits[bit][2], self.out_ann,
+ [11, ['Reserved bit', 'Reserved', 'Rsvd', 'R']])
+
+ def handle_reg_0x00(self, b): # Control register 1
+ pass
+
+ def handle_reg_0x01(self, b): # Control register 2
+ ti_tp = 1 if (b & (1 << 4)) else 0
+ af = 1 if (b & (1 << 3)) else 0
+ tf = 1 if (b & (1 << 2)) else 0
+ aie = 1 if (b & (1 << 1)) else 0
+ tie = 1 if (b & (1 << 0)) else 0
+
+ ann = ''
+
+ s = 'repeated' if ti_tp else 'single-shot'
+ ann += 'TI/TP = %d: %s operation upon fixed-cycle timer interrupt '\
+ 'events\n' % (ti_tp, s)
+ s = '' if af else 'no '
+ ann += 'AF = %d: %salarm interrupt detected\n' % (af, s)
+ s = '' if tf else 'no '
+ ann += 'TF = %d: %sfixed-cycle timer interrupt detected\n' % (tf, s)
+ s = 'enabled' if aie else 'prohibited'
+ ann += 'AIE = %d: INT# pin output %s when an alarm interrupt '\
+ 'occurs\n' % (aie, s)
+ s = 'enabled' if tie else 'prohibited'
+ ann += 'TIE = %d: INT# pin output %s when a fixed-cycle interrupt '\
+ 'event occurs\n' % (tie, s)
+
+ self.putx([1, [ann]])
+
+ def handle_reg_0x02(self, b): # Seconds / Voltage-low bit
+ vl = 1 if (b & (1 << 7)) else 0
+ self.putd(7, 7, [12, ['Voltage low: %d' % vl, 'Volt. low: %d' % vl,
+ 'VL: %d' % vl, 'VL']])
+ s = self.seconds = bcd2int(b & 0x7f)
+ self.putd(6, 0, [2, ['Second: %d' % s, 'Sec: %d' % s, 'S: %d' % s, 'S']])
+
+ def handle_reg_0x03(self, b): # Minutes
+ self.putr(7)
+ m = self.minutes = bcd2int(b & 0x7f)
+ self.putd(6, 0, [3, ['Minute: %d' % m, 'Min: %d' % m, 'M: %d' % m, 'M']])
+
+ def handle_reg_0x04(self, b): # Hours
+ self.putr(7)
+ self.putr(6)
+ h = self.hours = bcd2int(b & 0x3f)
+ self.putd(5, 0, [4, ['Hour: %d' % h, 'H: %d' % h, 'H']])
+
+ def handle_reg_0x05(self, b): # Days
+ self.putr(7)
+ self.putr(6)
+ d = self.days = bcd2int(b & 0x3f)
+ self.putd(5, 0, [5, ['Day: %d' % d, 'D: %d' % d, 'D']])
+
+ def handle_reg_0x06(self, b): # Weekdays
+ for i in (7, 6, 5, 4, 3):
+ self.putr(i)
+ w = self.weekdays = bcd2int(b & 0x07)
+ self.putd(2, 0, [6, ['Weekday: %d' % w, 'WD: %d' % w, 'WD', 'W']])
+
+ def handle_reg_0x07(self, b): # Months / century bit
+ c = 1 if (b & (1 << 7)) else 0
+ self.putd(7, 7, [13, ['Century bit: %d' % c, 'Century: %d' % c,
+ 'Cent: %d' % c, 'C: %d' % c, 'C']])
+ self.putr(6)
+ self.putr(5)
+ m = self.months = bcd2int(b & 0x1f)
+ self.putd(4, 0, [7, ['Month: %d' % m, 'Mon: %d' % m, 'M: %d' % m, 'M']])
+
+ def handle_reg_0x08(self, b): # Years
+ y = self.years = bcd2int(b & 0xff)
+ self.putx([8, ['Year: %d' % y, 'Y: %d' % y, 'Y']])
+
+ def handle_reg_0x09(self, b): # Alarm, minute
+ pass
+
+ def handle_reg_0x0a(self, b): # Alarm, hour
+ pass
+
+ def handle_reg_0x0b(self, b): # Alarm, day
+ pass
+
+ def handle_reg_0x0c(self, b): # Alarm, weekday
+ pass
+
+ def handle_reg_0x0d(self, b): # CLKOUT output
+ pass
+
+ def handle_reg_0x0e(self, b): # Timer setting
+ pass
+
+ def handle_reg_0x0f(self, b): # Down counter for fixed-cycle timer
+ pass
+
+ def decode(self, ss, es, data):
+ cmd, databyte = data
+
+ # Collect the 'BITS' packet, then return. The next packet is
+ # guaranteed to belong to these bits we just stored.
+ if cmd == 'BITS':
+ self.bits = databyte
+ return
+
+ # Store the start/end samples of this I²C packet.
+ self.ss, self.es = ss, es
+
+ # State machine.
+ if self.state == 'IDLE':
+ # Wait for an I²C START condition.
+ if cmd != 'START':
+ return
+ self.state = 'GET SLAVE ADDR'
+ self.block_start_sample = ss
+ elif self.state == 'GET SLAVE ADDR':
+ # Wait for an address write operation.
+ # TODO: We should only handle packets to the RTC slave (0xa2/0xa3).
+ if cmd != 'ADDRESS WRITE':
+ return
+ self.state = 'GET REG ADDR'
+ elif self.state == 'GET REG ADDR':
+ # Wait for a data write (master selects the slave register).
+ if cmd != 'DATA WRITE':
+ return
+ self.reg = databyte
+ self.state = 'WRITE RTC REGS'
+ elif self.state == 'WRITE RTC REGS':
+ # If we see a Repeated Start here, it's probably an RTC read.
+ if cmd == 'START REPEAT':
+ self.state = 'READ RTC REGS'
+ return
+ # Otherwise: Get data bytes until a STOP condition occurs.
+ if cmd == 'DATA WRITE':
+ r, s = self.reg, '%02X: %02X' % (self.reg, databyte)
+ self.putx([15, ['Write register %s' % s, 'Write reg %s' % s,
+ 'WR %s' % s, 'WR', 'W']])
+ handle_reg = getattr(self, 'handle_reg_0x%02x' % self.reg)
+ handle_reg(databyte)
+ self.reg += 1
+ # TODO: Check for NACK!
+ elif cmd == 'STOP':
+ # TODO: Handle read/write of only parts of these items.
+ d = '%02d.%02d.%02d %02d:%02d:%02d' % (self.days, self.months,
+ self.years, self.hours, self.minutes, self.seconds)
+ self.put(self.block_start_sample, es, self.out_ann,
+ [9, ['Write date/time: %s' % d, 'Write: %s' % d,
+ 'W: %s' % d]])
+ self.state = 'IDLE'
+ else:
+ pass # TODO
+ elif self.state == 'READ RTC REGS':
+ # Wait for an address read operation.
+ # TODO: We should only handle packets to the RTC slave (0xa2/0xa3).
+ if cmd == 'ADDRESS READ':
+ self.state = 'READ RTC REGS2'
+ return
+ else:
+ pass # TODO
+ elif self.state == 'READ RTC REGS2':
+ if cmd == 'DATA READ':
+ r, s = self.reg, '%02X: %02X' % (self.reg, databyte)
+ self.putx([15, ['Read register %s' % s, 'Read reg %s' % s,
+ 'RR %s' % s, 'RR', 'R']])
+ handle_reg = getattr(self, 'handle_reg_0x%02x' % self.reg)
+ handle_reg(databyte)
+ self.reg += 1
+ # TODO: Check for NACK!
+ elif cmd == 'STOP':
+ d = '%02d.%02d.%02d %02d:%02d:%02d' % (self.days, self.months,
+ self.years, self.hours, self.minutes, self.seconds)
+ self.put(self.block_start_sample, es, self.out_ann,
+ [10, ['Read date/time: %s' % d, 'Read: %s' % d,
+ 'R: %s' % d]])
+ self.state = 'IDLE'
+ else:
+ pass # TODO?
+ else:
+ raise Exception('Invalid state: %s' % self.state)
+
diff --git a/decoders/sdcard_spi/__init__.py b/decoders/sdcard_spi/__init__.py
new file mode 100644
index 0000000..293b654
--- /dev/null
+++ b/decoders/sdcard_spi/__init__.py
@@ -0,0 +1,70 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+This decoder stacks on top of the 'spi' PD and decodes the SD card
+(SPI mode) low-level protocol.
+
+Most SD cards can be accessed via two different protocols/modes: SD mode
+or SPI mode.
+
+All SD cards are in SD mode upon powerup. They can be switched to SPI mode
+using a special method involving CMD0 (see spec). Once in SPI mode, the mode
+can no longer be changed without a power-cycle of the card.
+
+SPI mode properties (differences to SD mode):
+ * The 'sdcard_spi' PD stacks on top of the 'spi' PD. This is not possible
+ for the 'sdcard_sd' PD, as that protocol is not SPI related at all.
+ Hence 'sdcard_spi' and 'sdcard_sd' are two separate PDs.
+ * The state machines for SPI mode and SD mode are different.
+ * In SPI mode, data transfers are byte-oriented (commands/data are multiples
+ of 8 bits, with the CS# pin asserted respectively), unlike SD mode where
+ commands/data are bit-oriented with parallel transmission of 1 or 4 bits.
+ * While the SPI mode command set has some commands in common with the
+ SD mode command set, they are not the same and also not a subset/superset.
+ Some commands are only available in SD mode (e.g. CMD2), some only
+ in SPI mode (e.g. CMD1).
+ * Response types of commands also differ between SD mode and SPI mode.
+ E.g. CMD9 has an R2 response in SD mode, but R1 in SPI mode.
+ * The commands and functions in SD mode defined after version 2.00 of the
+ spec are NOT supported in SPI mode.
+ * SPI mode: The selected SD card ALWAYS responds to commands (unlike SD mode).
+ * Upon data retrieval problems (read operations) the card will respond with
+ an error response (and no data), as opposed to a timeout in SD mode.
+ * SPI mode: For every data block sent to the card (write operations) the host
+ gets a data response token from the card.
+ * SDSC: A data block can be max. one card write block, min. 1 byte.
+ * SDHC/SDXC: Block length is fixed to 512. The block length set by CMD16
+ is only used for CDM42 (not for memory data transfers). Thus, partial
+ read/write operations are disabled in SPI mode.
+ * SPI mode: Write protected commands (CMD28, CMD29, CMD30) are not supported.
+ * The SD mode state machine is NOT used. All commands that are supported
+ in SPI mode are always available.
+ * Per default the card is in CRC OFF mode. Exception: CMD0 (which is used to
+ switch to SPI mode) needs a valid CRC.
+ * The APP_CMD status bit is not available in SPI mode.
+ * TODO: Switch function command differences.
+ * In SPI mode cards cannot guarantee their speed class (the host should
+ assume class 0, no matter what the card indicates).
+ * The RCA register is not accessible in SPI mode.
+'''
+
+from .pd import *
+
diff --git a/decoders/sdcard_spi/pd.py b/decoders/sdcard_spi/pd.py
new file mode 100644
index 0000000..be20ee3
--- /dev/null
+++ b/decoders/sdcard_spi/pd.py
@@ -0,0 +1,444 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012-2014 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+
+# Normal commands (CMD)
+cmd_names = {
+ 0: 'GO_IDLE_STATE',
+ 1: 'SEND_OP_COND',
+ 6: 'SWITCH_FUNC',
+ 8: 'SEND_IF_COND',
+ 9: 'SEND_CSD',
+ 10: 'SEND_CID',
+ 12: 'STOP_TRANSMISSION',
+ 13: 'SEND_STATUS',
+ 16: 'SET_BLOCKLEN',
+ 17: 'READ_SINGLE_BLOCK',
+ 18: 'READ_MULTIPLE_BLOCK',
+ 24: 'WRITE_BLOCK',
+ 25: 'WRITE_MULTIPLE_BLOCK',
+ 27: 'PROGRAM_CSD',
+ 28: 'SET_WRITE_PROT',
+ 29: 'CLR_WRITE_PROT',
+ 30: 'SEND_WRITE_PROT',
+ 32: 'ERASE_WR_BLK_START_ADDR',
+ 33: 'ERASE_WR_BLK_END_ADDR',
+ 38: 'ERASE',
+ 42: 'LOCK_UNLOCK',
+ 55: 'APP_CMD',
+ 56: 'GEN_CMD',
+ 58: 'READ_OCR',
+ 59: 'CRC_ON_OFF',
+ # CMD60-63: Reserved for manufacturer
+}
+
+# Application-specific commands (ACMD)
+acmd_names = {
+ 13: 'SD_STATUS',
+ 18: 'Reserved for SD security applications',
+ 22: 'SEND_NUM_WR_BLOCKS',
+ 23: 'SET_WR_BLK_ERASE_COUNT',
+ 25: 'Reserved for SD security applications',
+ 26: 'Reserved for SD security applications',
+ 38: 'Reserved for SD security applications',
+ 41: 'SD_SEND_OP_COND',
+ 42: 'SET_CLR_CARD_DETECT',
+ 43: 'Reserved for SD security applications',
+ 44: 'Reserved for SD security applications',
+ 45: 'Reserved for SD security applications',
+ 46: 'Reserved for SD security applications',
+ 47: 'Reserved for SD security applications',
+ 48: 'Reserved for SD security applications',
+ 49: 'Reserved for SD security applications',
+ 51: 'SEND_SCR',
+}
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'sdcard_spi'
+ name = 'SD card (SPI mode)'
+ longname = 'Secure Digital card (SPI mode)'
+ desc = 'Secure Digital card (SPI mode) low-level protocol.'
+ license = 'gplv2+'
+ inputs = ['spi']
+ outputs = ['sdcard_spi']
+ annotations = \
+ tuple(('cmd%d' % i, 'CMD%d' % i) for i in range(64)) + \
+ tuple(('acmd%d' % i, 'ACMD%d' % i) for i in range(64)) + ( \
+ ('r1', 'R1 reply'),
+ ('r1b', 'R1B reply'),
+ ('r2', 'R2 reply'),
+ ('r3', 'R3 reply'),
+ ('r7', 'R7 reply'),
+ ('bits', 'Bits'),
+ ('bit-warnings', 'Bit warnings'),
+ )
+ annotation_rows = (
+ ('bits', 'Bits', (134, 135)),
+ ('cmd-reply', 'Commands/replies', tuple(range(134))),
+ )
+
+ def __init__(self, **kwargs):
+ self.state = 'IDLE'
+ self.samplenum = 0
+ self.ss, self.es = 0, 0
+ self.bit_ss, self.bit_es = 0, 0
+ self.cmd_ss, self.cmd_es = 0, 0
+ self.cmd_token = []
+ self.cmd_token_bits = []
+ self.is_acmd = False # Indicates CMD vs. ACMD
+ self.blocklen = 0
+ self.read_buf = []
+ self.cmd_str = ''
+
+ def start(self):
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def putx(self, data):
+ self.put(self.cmd_ss, self.cmd_es, self.out_ann, data)
+
+ def putc(self, cmd, desc):
+ self.putx([cmd, ['%s: %s' % (self.cmd_str, desc)]])
+
+ def putb(self, data):
+ self.put(self.bit_ss, self.bit_es, self.out_ann, data)
+
+ def cmd_name(self, cmd):
+ c = acmd_names if self.is_acmd else cmd_names
+ return c.get(cmd, 'Unknown')
+
+ def handle_command_token(self, mosi, miso):
+ # Command tokens (6 bytes) are sent (MSB-first) by the host.
+ #
+ # Format:
+ # - CMD[47:47]: Start bit (always 0)
+ # - CMD[46:46]: Transmitter bit (1 == host)
+ # - CMD[45:40]: Command index (BCD; valid: 0-63)
+ # - CMD[39:08]: Argument
+ # - CMD[07:01]: CRC7
+ # - CMD[00:00]: End bit (always 1)
+
+ if len(self.cmd_token) == 0:
+ self.cmd_ss = self.ss
+
+ self.cmd_token.append(mosi)
+ self.cmd_token_bits.append(self.mosi_bits)
+
+ # All command tokens are 6 bytes long.
+ if len(self.cmd_token) < 6:
+ return
+
+ self.cmd_es = self.es
+
+ t = self.cmd_token
+
+ # CMD or ACMD?
+ s = 'ACMD' if self.is_acmd else 'CMD'
+
+ def tb(byte, bit):
+ return self.cmd_token_bits[5 - byte][bit]
+
+ # Bits[47:47]: Start bit (always 0)
+ bit, self.bit_ss, self.bit_es = tb(5, 7)[0], tb(5, 7)[1], tb(5, 7)[2]
+ if bit == 0:
+ self.putb([134, ['Start bit: %d' % bit]])
+ else:
+ self.putb([135, ['Start bit: %s (Warning: Must be 0!)' % bit]])
+
+ # Bits[46:46]: Transmitter bit (1 == host)
+ bit, self.bit_ss, self.bit_es = tb(5, 6)[0], tb(5, 6)[1], tb(5, 6)[2]
+ if bit == 1:
+ self.putb([134, ['Transmitter bit: %d' % bit]])
+ else:
+ self.putb([135, ['Transmitter bit: %d (Warning: Must be 1!)' % bit]])
+
+ # Bits[45:40]: Command index (BCD; valid: 0-63)
+ cmd = self.cmd_index = t[0] & 0x3f
+ self.bit_ss, self.bit_es = tb(5, 5)[1], tb(5, 0)[2]
+ self.putb([134, ['Command: %s%d (%s)' % (s, cmd, self.cmd_name(cmd))]])
+
+ # Bits[39:8]: Argument
+ self.arg = (t[1] << 24) | (t[2] << 16) | (t[3] << 8) | t[4]
+ self.bit_ss, self.bit_es = tb(4, 7)[1], tb(1, 0)[2]
+ self.putb([134, ['Argument: 0x%04x' % self.arg]])
+
+ # Bits[7:1]: CRC7
+ # TODO: Check CRC7.
+ crc = t[5] >> 1
+ self.bit_ss, self.bit_es = tb(0, 7)[1], tb(0, 1)[2]
+ self.putb([134, ['CRC7: 0x%01x' % crc]])
+
+ # Bits[0:0]: End bit (always 1)
+ bit, self.bit_ss, self.bit_es = tb(0, 0)[0], tb(0, 0)[1], tb(0, 0)[2]
+ self.putb([134, ['End bit: %d' % bit]])
+ if bit == 1:
+ self.putb([134, ['End bit: %d' % bit]])
+ else:
+ self.putb([135, ['End bit: %d (Warning: Must be 1!)' % bit]])
+
+ # Handle command.
+ if cmd in (0, 1, 9, 16, 17, 41, 49, 55, 59):
+ self.state = 'HANDLE CMD%d' % cmd
+ self.cmd_str = '%s%d (%s)' % (s, cmd, self.cmd_name(cmd))
+ else:
+ self.state = 'HANDLE CMD999'
+ a = '%s%d: %02x %02x %02x %02x %02x %02x' % ((s, cmd) + tuple(t))
+ self.putx([cmd, [a]])
+
+ def handle_cmd0(self):
+ # CMD0: GO_IDLE_STATE
+ self.putc(0, 'Reset the SD card')
+ self.state = 'GET RESPONSE R1'
+
+ def handle_cmd1(self):
+ # CMD1: SEND_OP_COND
+ self.putc(1, 'Send HCS info and activate the card init process')
+ hcs = (self.arg & (1 << 30)) >> 30
+ self.bit_ss = self.cmd_token_bits[5 - 4][6][1]
+ self.bit_es = self.cmd_token_bits[5 - 4][6][2]
+ self.putb([134, ['HCS: %d' % hcs]])
+ self.state = 'GET RESPONSE R1'
+
+ def handle_cmd9(self):
+ # CMD9: SEND_CSD (128 bits / 16 bytes)
+ self.putc(9, 'Ask card to send its card specific data (CSD)')
+ if len(self.read_buf) == 0:
+ self.cmd_ss = self.ss
+ self.read_buf.append(self.miso)
+ # FIXME
+ ### if len(self.read_buf) < 16:
+ if len(self.read_buf) < 16 + 4:
+ return
+ self.cmd_es = self.es
+ self.read_buf = self.read_buf[4:] ### TODO: Document or redo.
+ self.putx([9, ['CSD: %s' % self.read_buf]])
+ # TODO: Decode all bits.
+ self.read_buf = []
+ ### self.state = 'GET RESPONSE R1'
+ self.state = 'IDLE'
+
+ def handle_cmd10(self):
+ # CMD10: SEND_CID (128 bits / 16 bytes)
+ self.putc(10, 'Ask card to send its card identification (CID)')
+ self.read_buf.append(self.miso)
+ if len(self.read_buf) < 16:
+ return
+ self.putx([10, ['CID: %s' % self.read_buf]])
+ # TODO: Decode all bits.
+ self.read_buf = []
+ self.state = 'GET RESPONSE R1'
+
+ def handle_cmd16(self):
+ # CMD16: SET_BLOCKLEN
+ self.blocklen = self.arg
+ # TODO: Sanity check on block length.
+ self.putc(16, 'Set the block length to %d bytes' % self.blocklen)
+ self.state = 'GET RESPONSE R1'
+
+ def handle_cmd17(self):
+ # CMD17: READ_SINGLE_BLOCK
+ self.putc(17, 'Read a block from address 0x%04x' % self.arg)
+ if len(self.read_buf) == 0:
+ self.cmd_ss = self.ss
+ self.read_buf.append(self.miso)
+ if len(self.read_buf) < self.blocklen + 2: # FIXME
+ return
+ self.cmd_es = self.es
+ self.read_buf = self.read_buf[2:] # FIXME
+ self.putx([17, ['Block data: %s' % self.read_buf]])
+ self.read_buf = []
+ self.state = 'GET RESPONSE R1'
+
+ def handle_cmd49(self):
+ self.state = 'GET RESPONSE R1'
+
+ def handle_cmd55(self):
+ # CMD55: APP_CMD
+ self.putc(55, 'Next command is an application-specific command')
+ self.is_acmd = True
+ self.state = 'GET RESPONSE R1'
+
+ def handle_cmd59(self):
+ # CMD59: CRC_ON_OFF
+ crc_on_off = self.arg & (1 << 0)
+ s = 'on' if crc_on_off == 1 else 'off'
+ self.putc(59, 'Turn the SD card CRC option %s' % s)
+ self.state = 'GET RESPONSE R1'
+
+ def handle_acmd41(self):
+ # ACMD41: SD_SEND_OP_COND
+ self.putc(64 + 41, 'Send HCS info and activate the card init process')
+ self.state = 'GET RESPONSE R1'
+
+ def handle_cmd999(self):
+ self.state = 'GET RESPONSE R1'
+
+ def handle_cid_register(self):
+ # Card Identification (CID) register, 128bits
+
+ cid = self.cid
+
+ # Manufacturer ID: CID[127:120] (8 bits)
+ mid = cid[15]
+
+ # OEM/Application ID: CID[119:104] (16 bits)
+ oid = (cid[14] << 8) | cid[13]
+
+ # Product name: CID[103:64] (40 bits)
+ pnm = 0
+ for i in range(12, 8 - 1, -1):
+ pnm <<= 8
+ pnm |= cid[i]
+
+ # Product revision: CID[63:56] (8 bits)
+ prv = cid[7]
+
+ # Product serial number: CID[55:24] (32 bits)
+ psn = 0
+ for i in range(6, 3 - 1, -1):
+ psn <<= 8
+ psn |= cid[i]
+
+ # RESERVED: CID[23:20] (4 bits)
+
+ # Manufacturing date: CID[19:8] (12 bits)
+ # TODO
+
+ # CRC7 checksum: CID[7:1] (7 bits)
+ # TODO
+
+ # Not used, always 1: CID[0:0] (1 bit)
+ # TODO
+
+ def handle_response_r1(self, res):
+ # The R1 response token format (1 byte).
+ # Sent by the card after every command except for SEND_STATUS.
+
+ self.cmd_ss, self.cmd_es = self.miso_bits[7][1], self.miso_bits[0][2]
+ self.putx([65, ['R1: 0x%02x' % res]])
+
+ def putbit(bit, data):
+ b = self.miso_bits[bit]
+ self.bit_ss, self.bit_es = b[1], b[2]
+ self.putb([134, data])
+
+ # Bit 0: 'In idle state' bit
+ s = '' if (res & (1 << 0)) else 'not '
+ putbit(0, ['Card is %sin idle state' % s])
+
+ # Bit 1: 'Erase reset' bit
+ s = '' if (res & (1 << 1)) else 'not '
+ putbit(1, ['Erase sequence %scleared' % s])
+
+ # Bit 2: 'Illegal command' bit
+ s = 'I' if (res & (1 << 2)) else 'No i'
+ putbit(2, ['%sllegal command detected' % s])
+
+ # Bit 3: 'Communication CRC error' bit
+ s = 'failed' if (res & (1 << 3)) else 'was successful'
+ putbit(3, ['CRC check of last command %s' % s])
+
+ # Bit 4: 'Erase sequence error' bit
+ s = 'E' if (res & (1 << 4)) else 'No e'
+ putbit(4, ['%srror in the sequence of erase commands' % s])
+
+ # Bit 5: 'Address error' bit
+ s = 'M' if (res & (1 << 4)) else 'No m'
+ putbit(5, ['%sisaligned address used in command' % s])
+
+ # Bit 6: 'Parameter error' bit
+ s = '' if (res & (1 << 4)) else 'not '
+ putbit(6, ['Command argument %soutside allowed range' % s])
+
+ # Bit 7: Always set to 0
+ putbit(7, ['Bit 7 (always 0)'])
+
+ self.state = 'IDLE'
+
+ def handle_response_r1b(self, res):
+ # TODO
+ pass
+
+ def handle_response_r2(self, res):
+ # TODO
+ pass
+
+ def handle_response_r3(self, res):
+ # TODO
+ pass
+
+ # Note: Response token formats R4 and R5 are reserved for SDIO.
+
+ # TODO: R6?
+
+ def handle_response_r7(self, res):
+ # TODO
+ pass
+
+ def decode(self, ss, es, data):
+ ptype, mosi, miso = data
+
+ # For now, only use DATA and BITS packets.
+ if ptype not in ('DATA', 'BITS'):
+ return
+
+ # Store the individual bit values and ss/es numbers. The next packet
+ # is guaranteed to be a 'DATA' packet belonging to this 'BITS' one.
+ if ptype == 'BITS':
+ self.miso_bits, self.mosi_bits = miso, mosi
+ return
+
+ self.ss, self.es = ss, es
+
+ # State machine.
+ if self.state == 'IDLE':
+ # Ignore stray 0xff bytes, some devices seem to send those!?
+ if mosi == 0xff: # TODO?
+ return
+ self.state = 'GET COMMAND TOKEN'
+ self.handle_command_token(mosi, miso)
+ elif self.state == 'GET COMMAND TOKEN':
+ self.handle_command_token(mosi, miso)
+ elif self.state.startswith('HANDLE CMD'):
+ self.miso, self.mosi = miso, mosi
+ # Call the respective handler method for the command.
+ a, cmdstr = 'a' if self.is_acmd else '', self.state[10:].lower()
+ handle_cmd = getattr(self, 'handle_%scmd%s' % (a, cmdstr))
+ handle_cmd()
+ self.cmd_token = []
+ self.cmd_token_bits = []
+ # Leave ACMD mode again after the first command after CMD55.
+ if self.is_acmd and cmdstr != '55':
+ self.is_acmd = False
+ elif self.state.startswith('GET RESPONSE'):
+ # Ignore stray 0xff bytes, some devices seem to send those!?
+ if miso == 0xff: # TODO?
+ return
+
+ # Call the respective handler method for the response.
+ s = 'handle_response_%s' % self.state[13:].lower()
+ handle_response = getattr(self, s)
+ handle_response(miso)
+
+ self.state = 'IDLE'
+ else:
+ raise Exception('Invalid state: %s' % self.state)
+
diff --git a/decoders/spi/__init__.py b/decoders/spi/__init__.py
new file mode 100644
index 0000000..a1f0f1c
--- /dev/null
+++ b/decoders/spi/__init__.py
@@ -0,0 +1,33 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+The SPI (Serial Peripheral Interface) protocol decoder supports synchronous
+SPI(-like) protocols with a clock line, a MISO and MOSI line for data
+transfer in two directions, and an optional CS# pin.
+Either MISO or MOSI (but not both) can be optional.
+
+If CS# is supplied, data is only decoded when CS# is asserted (clock
+transitions where CS# is not asserted are ignored). If CS# is not supplied,
+data is decoded on every clock transition (depending on SPI mode).
+'''
+
+from .pd import *
+
diff --git a/decoders/spi/pd.py b/decoders/spi/pd.py
new file mode 100644
index 0000000..5bab8f7
--- /dev/null
+++ b/decoders/spi/pd.py
@@ -0,0 +1,286 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2011 Gareth McMullin <gareth at blacksphere.co.nz>
+## Copyright (C) 2012-2014 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+
+'''
+OUTPUT_PYTHON format:
+
+Packet:
+[<ptype>, <data1>, <data2>]
+
+<ptype>:
+ - 'DATA': <data1> contains the MISO data, <data2> contains the MOSI data.
+ The data is _usually_ 8 bits (but can also be fewer or more bits).
+ Both data items are Python numbers (not strings), or None if the respective
+ channel was not supplied.
+ - 'BITS': <data1>/<data2> contain a list of bit values in this MISO/MOSI data
+ item, and for each of those also their respective start-/endsample numbers.
+ - 'CS CHANGE': <data1> is the old CS# pin value, <data2> is the new value.
+ Both data items are Python numbers (0/1), not strings.
+
+Examples:
+ ['CS-CHANGE', 1, 0]
+ ['DATA', 0xff, 0x3a]
+ ['BITS', [[1, 80, 82], [1, 83, 84], [1, 85, 86], [1, 87, 88],
+ [1, 89, 90], [1, 91, 92], [1, 93, 94], [1, 95, 96]],
+ [[0, 80, 82], [1, 83, 84], [0, 85, 86], [1, 87, 88],
+ [1, 89, 90], [1, 91, 92], [0, 93, 94], [0, 95, 96]]]
+ ['DATA', 0x65, 0x00]
+ ['DATA', 0xa8, None]
+ ['DATA', None, 0x55]
+ ['CS-CHANGE', 0, 1]
+'''
+
+# Key: (CPOL, CPHA). Value: SPI mode.
+# Clock polarity (CPOL) = 0/1: Clock is low/high when inactive.
+# Clock phase (CPHA) = 0/1: Data is valid on the leading/trailing clock edge.
+spi_mode = {
+ (0, 0): 0, # Mode 0
+ (0, 1): 1, # Mode 1
+ (1, 0): 2, # Mode 2
+ (1, 1): 3, # Mode 3
+}
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'spi'
+ name = 'SPI'
+ longname = 'Serial Peripheral Interface'
+ desc = 'Full-duplex, synchronous, serial bus.'
+ license = 'gplv2+'
+ inputs = ['logic']
+ outputs = ['spi']
+ channels = (
+ {'id': 'clk', 'name': 'CLK', 'desc': 'Clock'},
+ )
+ optional_channels = (
+ {'id': 'miso', 'name': 'MISO', 'desc': 'Master in, slave out'},
+ {'id': 'mosi', 'name': 'MOSI', 'desc': 'Master out, slave in'},
+ {'id': 'cs', 'name': 'CS#', 'desc': 'Chip-select'},
+ )
+ options = (
+ {'id': 'cs_polarity', 'desc': 'CS# polarity', 'default': 'active-low',
+ 'values': ('active-low', 'active-high')},
+ {'id': 'cpol', 'desc': 'Clock polarity', 'default': 0,
+ 'values': (0, 1)},
+ {'id': 'cpha', 'desc': 'Clock phase', 'default': 0,
+ 'values': (0, 1)},
+ {'id': 'bitorder', 'desc': 'Bit order',
+ 'default': 'msb-first', 'values': ('msb-first', 'lsb-first')},
+ {'id': 'wordsize', 'desc': 'Word size', 'default': 8},
+ )
+ annotations = (
+ ('miso-data', 'MISO data'),
+ ('mosi-data', 'MOSI data'),
+ ('miso-bits', 'MISO bits'),
+ ('mosi-bits', 'MOSI bits'),
+ ('warnings', 'Human-readable warnings'),
+ )
+ annotation_rows = (
+ ('miso-data', 'MISO data', (0,)),
+ ('miso-bits', 'MISO bits', (2,)),
+ ('mosi-data', 'MOSI data', (1,)),
+ ('mosi-bits', 'MOSI bits', (3,)),
+ ('other', 'Other', (4,)),
+ )
+
+ def __init__(self):
+ self.samplerate = None
+ self.oldclk = 1
+ self.bitcount = 0
+ self.misodata = self.mosidata = 0
+ self.misobits = []
+ self.mosibits = []
+ self.startsample = -1
+ self.samplenum = -1
+ self.cs_was_deasserted = False
+ self.oldcs = -1
+ self.oldpins = None
+ self.have_cs = self.have_miso = self.have_mosi = None
+ self.state = 'IDLE'
+
+ def metadata(self, key, value):
+ if key == srd.SRD_CONF_SAMPLERATE:
+ self.samplerate = value
+
+ def start(self):
+ self.out_python = self.register(srd.OUTPUT_PYTHON)
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+ self.out_bitrate = self.register(srd.OUTPUT_META,
+ meta=(int, 'Bitrate', 'Bitrate during transfers'))
+
+ def putw(self, data):
+ self.put(self.startsample, self.samplenum, self.out_ann, data)
+
+ def putdata(self):
+ # Pass MISO and MOSI bits and then data to the next PD up the stack.
+ so = self.misodata if self.have_miso else None
+ si = self.mosidata if self.have_mosi else None
+ so_bits = self.misobits if self.have_miso else None
+ si_bits = self.mosibits if self.have_mosi else None
+
+ if self.have_miso:
+ ss, es = self.misobits[-1][1], self.misobits[0][2]
+ if self.have_mosi:
+ ss, es = self.mosibits[-1][1], self.mosibits[0][2]
+
+ self.put(ss, es, self.out_python, ['BITS', si_bits, so_bits])
+ self.put(ss, es, self.out_python, ['DATA', si, so])
+
+ # Bit annotations.
+ if self.have_miso:
+ for bit in self.misobits:
+ self.put(bit[1], bit[2], self.out_ann, [2, ['%d' % bit[0]]])
+ if self.have_mosi:
+ for bit in self.mosibits:
+ self.put(bit[1], bit[2], self.out_ann, [3, ['%d' % bit[0]]])
+
+ # Dataword annotations.
+ if self.have_miso:
+ self.put(ss, es, self.out_ann, [0, ['%02X' % self.misodata]])
+ if self.have_mosi:
+ self.put(ss, es, self.out_ann, [1, ['%02X' % self.mosidata]])
+
+ def reset_decoder_state(self):
+ self.misodata = 0 if self.have_miso else None
+ self.mosidata = 0 if self.have_mosi else None
+ self.misobits = [] if self.have_miso else None
+ self.mosibits = [] if self.have_mosi else None
+ self.bitcount = 0
+
+ def handle_bit(self, miso, mosi, clk, cs):
+ # If this is the first bit of a dataword, save its sample number.
+ if self.bitcount == 0:
+ self.startsample = self.samplenum
+ self.cs_was_deasserted = False
+ if self.have_cs:
+ active_low = (self.options['cs_polarity'] == 'active-low')
+ deasserted = (cs == 1) if active_low else (cs == 0)
+ if deasserted:
+ self.cs_was_deasserted = True
+
+ ws = self.options['wordsize']
+
+ # Receive MISO bit into our shift register.
+ if self.have_miso:
+ if self.options['bitorder'] == 'msb-first':
+ self.misodata |= miso << (ws - 1 - self.bitcount)
+ else:
+ self.misodata |= miso << self.bitcount
+
+ # Receive MOSI bit into our shift register.
+ if self.have_mosi:
+ if self.options['bitorder'] == 'msb-first':
+ self.mosidata |= mosi << (ws - 1 - self.bitcount)
+ else:
+ self.mosidata |= mosi << self.bitcount
+
+ # Guesstimate the endsample for this bit (can be overridden below).
+ es = self.samplenum
+ if self.bitcount > 0:
+ if self.have_miso:
+ es += self.samplenum - self.misobits[0][1]
+ elif self.have_mosi:
+ es += self.samplenum - self.mosibits[0][1]
+
+ if self.have_miso:
+ self.misobits.insert(0, [miso, self.samplenum, es])
+ if self.have_mosi:
+ self.mosibits.insert(0, [mosi, self.samplenum, es])
+
+ if self.bitcount > 0 and self.have_miso:
+ self.misobits[1][2] = self.samplenum
+ if self.bitcount > 0 and self.have_mosi:
+ self.mosibits[1][2] = self.samplenum
+
+ self.bitcount += 1
+
+ # Continue to receive if not enough bits were received, yet.
+ if self.bitcount != ws:
+ return
+
+ self.putdata()
+
+ # Meta bitrate.
+ elapsed = 1 / float(self.samplerate)
+ elapsed *= (self.samplenum - self.startsample + 1)
+ bitrate = int(1 / elapsed * self.options['wordsize'])
+ self.put(self.startsample, self.samplenum, self.out_bitrate, bitrate)
+
+ if self.have_cs and self.cs_was_deasserted:
+ self.putw([4, ['CS# was deasserted during this data word!']])
+
+ self.reset_decoder_state()
+
+ def find_clk_edge(self, miso, mosi, clk, cs):
+ if self.have_cs and self.oldcs != cs:
+ # Send all CS# pin value changes.
+ self.put(self.samplenum, self.samplenum, self.out_python,
+ ['CS-CHANGE', self.oldcs, cs])
+ self.oldcs = cs
+ # Reset decoder state when CS# changes (and the CS# pin is used).
+ self.reset_decoder_state()
+
+ # Ignore sample if the clock pin hasn't changed.
+ if clk == self.oldclk:
+ return
+
+ self.oldclk = clk
+
+ # Sample data on rising/falling clock edge (depends on mode).
+ mode = spi_mode[self.options['cpol'], self.options['cpha']]
+ if mode == 0 and clk == 0: # Sample on rising clock edge
+ return
+ elif mode == 1 and clk == 1: # Sample on falling clock edge
+ return
+ elif mode == 2 and clk == 1: # Sample on falling clock edge
+ return
+ elif mode == 3 and clk == 0: # Sample on rising clock edge
+ return
+
+ # Found the correct clock edge, now get the SPI bit(s).
+ self.handle_bit(miso, mosi, clk, cs)
+
+ def decode(self, ss, es, data):
+ if self.samplerate is None:
+ raise Exception("Cannot decode without samplerate.")
+ # Either MISO or MOSI can be omitted (but not both). CS# is optional.
+ for (self.samplenum, pins) in data:
+
+ # Ignore identical samples early on (for performance reasons).
+ if self.oldpins == pins:
+ continue
+ self.oldpins, (clk, miso, mosi, cs) = pins, pins
+ self.have_miso = (miso in (0, 1))
+ self.have_mosi = (mosi in (0, 1))
+ self.have_cs = (cs in (0, 1))
+
+ # Either MISO or MOSI (but not both) can be omitted.
+ if not (self.have_miso or self.have_mosi):
+ raise Exception('Either MISO or MOSI (or both) pins required.')
+
+ # State machine.
+ if self.state == 'IDLE':
+ self.find_clk_edge(miso, mosi, clk, cs)
+ else:
+ raise Exception('Invalid state: %s' % self.state)
+
diff --git a/decoders/tlc5620/__init__.py b/decoders/tlc5620/__init__.py
new file mode 100644
index 0000000..c615760
--- /dev/null
+++ b/decoders/tlc5620/__init__.py
@@ -0,0 +1,26 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+The Texas Instruments TLC5620 is an 8-bit quad DAC.
+'''
+
+from .pd import *
+
diff --git a/decoders/tlc5620/pd.py b/decoders/tlc5620/pd.py
new file mode 100644
index 0000000..f8c90d9
--- /dev/null
+++ b/decoders/tlc5620/pd.py
@@ -0,0 +1,131 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+
+dacs = {
+ 0: 'DACA',
+ 1: 'DACB',
+ 2: 'DACC',
+ 3: 'DACD',
+}
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'tlc5620'
+ name = 'TI TLC5620'
+ longname = 'Texas Instruments TLC5620'
+ desc = 'Texas Instruments TLC5620 8-bit quad DAC.'
+ license = 'gplv2+'
+ inputs = ['logic']
+ outputs = ['tlc5620']
+ channels = (
+ {'id': 'clk', 'name': 'CLK', 'desc': 'Serial interface clock'},
+ {'id': 'data', 'name': 'DATA', 'desc': 'Serial interface data'},
+ )
+ optional_channels = (
+ {'id': 'load', 'name': 'LOAD', 'desc': 'Serial interface load control'},
+ {'id': 'ldac', 'name': 'LDAC', 'desc': 'Load DAC'},
+ )
+ annotations = (
+ ('dac-select', 'DAC select'),
+ ('gain', 'Gain'),
+ ('value', 'DAC value'),
+ ('data-latch', 'Data latch point'),
+ ('ldac-fall', 'LDAC falling edge'),
+ )
+
+ def __init__(self, **kwargs):
+ self.oldpins = self.oldclk = self.oldload = self.oldldac = None
+ self.datapin = None
+ self.bits = []
+ self.ss_dac = self.es_dac = 0
+ self.ss_gain = self.es_gain = 0
+ self.ss_value = self.es_value = 0
+ self.dac_select = self.gain = self.dac_value = None
+
+ def start(self):
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def handle_11bits(self):
+ s = "".join(str(i) for i in self.bits[:2])
+ self.dac_select = s = dacs[int(s, 2)]
+ self.put(self.ss_dac, self.es_dac, self.out_ann,
+ [0, ['DAC select: %s' % s, 'DAC sel: %s' % s,
+ 'DAC: %s' % s, 'D: %s' % s, s, s[3]]])
+
+ self.gain = g = 1 + self.bits[2]
+ self.put(self.ss_gain, self.es_gain, self.out_ann,
+ [1, ['Gain: x%d' % g, 'G: x%d' % g, 'x%d' % g]])
+
+ s = "".join(str(i) for i in self.bits[3:])
+ self.dac_value = v = int(s, 2)
+ self.put(self.ss_value, self.es_value, self.out_ann,
+ [2, ['DAC value: %d' % v, 'Value: %d' % v, 'Val: %d' % v,
+ 'V: %d' % v, '%d' % v]])
+
+ def handle_falling_edge_load(self):
+ s, v, g = self.dac_select, self.dac_value, self.gain
+ self.put(self.samplenum, self.samplenum, self.out_ann,
+ [3, ['Setting %s value to %d (x%d gain)' % (s, v, g),
+ '%s=%d (x%d gain)' % (s, v, g)]])
+
+ def handle_falling_edge_ldac(self):
+ self.put(self.samplenum, self.samplenum, self.out_ann,
+ [4, ['Falling edge on LDAC pin', 'LDAC fall', 'LDAC']])
+
+ def handle_new_dac_bit(self):
+ self.bits.append(self.datapin)
+
+ # Wait until we have read 11 bits, then parse them.
+ l, s = len(self.bits), self.samplenum
+ if l == 1:
+ self.ss_dac = s
+ elif l == 2:
+ self.es_dac = self.ss_gain = s
+ elif l == 3:
+ self.es_gain = self.ss_value = s
+ elif l == 11:
+ self.es_value = s
+ self.handle_11bits()
+ self.bits = []
+
+ def decode(self, ss, es, data):
+ for (self.samplenum, pins) in data:
+
+ # Ignore identical samples early on (for performance reasons).
+ if self.oldpins == pins:
+ continue
+ self.oldpins, (clk, self.datapin, load, ldac) = pins, pins
+
+ # DATA is shifted in the DAC on the falling CLK edge (MSB-first).
+ # A falling edge of LOAD will latch the data.
+
+ if self.oldload == 1 and load == 0:
+ self.handle_falling_edge_load()
+ if self.oldldac == 1 and ldac == 0:
+ self.handle_falling_edge_ldac()
+ if self.oldclk == 1 and clk == 0:
+ self.handle_new_dac_bit()
+
+ self.oldclk = clk
+ self.oldload = load
+ self.oldldac = ldac
+
diff --git a/decoders/uart/__init__.py b/decoders/uart/__init__.py
new file mode 100644
index 0000000..f3c0693
--- /dev/null
+++ b/decoders/uart/__init__.py
@@ -0,0 +1,42 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+UART (Universal Asynchronous Receiver Transmitter) is a simple serial
+communication protocol which allows two devices to talk to each other.
+
+This decoder should work on all "UART-like" async protocols with one
+start bit (0), 5-9 databits, an (optional) parity bit, and one or more
+stop bits (1), in this order.
+
+It can be run on one signal line (RX or TX) only, or on two lines (RX + TX).
+
+There are various standards for the physical layer specification of the
+signals, including RS232, (TTL) UART, RS485, and others. However, the logic
+level of the respective pins is only relevant when acquiring the data via
+a logic analyzer (you have to select the correct logic analyzer and/or
+the correct place where to probe). Once the data is in digital form and
+matches the "UART" description above, this protocol decoder can work with
+it though, no matter whether the source was on TTL UART levels, or RS232,
+or others.
+'''
+
+from .pd import *
+
diff --git a/decoders/uart/pd.py b/decoders/uart/pd.py
new file mode 100644
index 0000000..ae99874
--- /dev/null
+++ b/decoders/uart/pd.py
@@ -0,0 +1,368 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2011-2014 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+
+'''
+OUTPUT_PYTHON format:
+
+Packet:
+[<ptype>, <rxtx>, <pdata>]
+
+This is the list of <ptype>s and their respective <pdata> values:
+ - 'STARTBIT': The data is the (integer) value of the start bit (0/1).
+ - 'DATA': The data is the (integer) value of the UART data. Valid values
+ range from 0 to 512 (as the data can be up to 9 bits in size).
+ - 'DATABITS': List of data bits and their ss/es numbers.
+ - 'PARITYBIT': The data is the (integer) value of the parity bit (0/1).
+ - 'STOPBIT': The data is the (integer) value of the stop bit (0 or 1).
+ - 'INVALID STARTBIT': The data is the (integer) value of the start bit (0/1).
+ - 'INVALID STOPBIT': The data is the (integer) value of the stop bit (0/1).
+ - 'PARITY ERROR': The data is a tuple with two entries. The first one is
+ the expected parity value, the second is the actual parity value.
+ - TODO: Frame error?
+
+The <rxtx> field is 0 for RX packets, 1 for TX packets.
+'''
+
+# Used for differentiating between the two data directions.
+RX = 0
+TX = 1
+
+# Given a parity type to check (odd, even, zero, one), the value of the
+# parity bit, the value of the data, and the length of the data (5-9 bits,
+# usually 8 bits) return True if the parity is correct, False otherwise.
+# 'none' is _not_ allowed as value for 'parity_type'.
+def parity_ok(parity_type, parity_bit, data, num_data_bits):
+
+ # Handle easy cases first (parity bit is always 1 or 0).
+ if parity_type == 'zero':
+ return parity_bit == 0
+ elif parity_type == 'one':
+ return parity_bit == 1
+
+ # Count number of 1 (high) bits in the data (and the parity bit itself!).
+ ones = bin(data).count('1') + parity_bit
+
+ # Check for odd/even parity.
+ if parity_type == 'odd':
+ return (ones % 2) == 1
+ elif parity_type == 'even':
+ return (ones % 2) == 0
+ else:
+ raise Exception('Invalid parity type: %d' % parity_type)
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'uart'
+ name = 'UART'
+ longname = 'Universal Asynchronous Receiver/Transmitter'
+ desc = 'Asynchronous, serial bus.'
+ license = 'gplv2+'
+ inputs = ['logic']
+ outputs = ['uart']
+ optional_channels = (
+ # Allow specifying only one of the signals, e.g. if only one data
+ # direction exists (or is relevant).
+ {'id': 'rx', 'name': 'RX', 'desc': 'UART receive line'},
+ {'id': 'tx', 'name': 'TX', 'desc': 'UART transmit line'},
+ )
+ options = (
+ {'id': 'baudrate', 'desc': 'Baud rate', 'default': 115200},
+ {'id': 'num_data_bits', 'desc': 'Data bits', 'default': 8,
+ 'values': (5, 6, 7, 8, 9)},
+ {'id': 'parity_type', 'desc': 'Parity type', 'default': 'none',
+ 'values': ('none', 'odd', 'even', 'zero', 'one')},
+ {'id': 'parity_check', 'desc': 'Check parity?', 'default': 'yes',
+ 'values': ('yes', 'no')},
+ {'id': 'num_stop_bits', 'desc': 'Stop bits', 'default': 1.0,
+ 'values': (0.0, 0.5, 1.0, 1.5)},
+ {'id': 'bit_order', 'desc': 'Bit order', 'default': 'lsb-first',
+ 'values': ('lsb-first', 'msb-first')},
+ {'id': 'format', 'desc': 'Data format', 'default': 'ascii',
+ 'values': ('ascii', 'dec', 'hex', 'oct', 'bin')},
+ # TODO: Options to invert the signal(s).
+ )
+ annotations = (
+ ('rx-data', 'RX data'),
+ ('tx-data', 'TX data'),
+ ('rx-start', 'RX start bits'),
+ ('tx-start', 'TX start bits'),
+ ('rx-parity-ok', 'RX parity OK bits'),
+ ('tx-parity-ok', 'TX parity OK bits'),
+ ('rx-parity-err', 'RX parity error bits'),
+ ('tx-parity-err', 'TX parity error bits'),
+ ('rx-stop', 'RX stop bits'),
+ ('tx-stop', 'TX stop bits'),
+ ('rx-warnings', 'RX warnings'),
+ ('tx-warnings', 'TX warnings'),
+ ('rx-data-bits', 'RX data bits'),
+ ('tx-data-bits', 'TX data bits'),
+ )
+ annotation_rows = (
+ ('rx-data', 'RX', (0, 2, 4, 6, 8)),
+ ('rx-data-bits', 'RX bits', (12,)),
+ ('rx-warnings', 'RX warnings', (10,)),
+ ('tx-data', 'TX', (1, 3, 5, 7, 9)),
+ ('tx-data-bits', 'TX bits', (13,)),
+ ('tx-warnings', 'TX warnings', (11,)),
+ )
+ binary = (
+ ('rx', 'RX dump'),
+ ('tx', 'TX dump'),
+ ('rxtx', 'RX/TX dump'),
+ )
+
+ def putx(self, rxtx, data):
+ s, halfbit = self.startsample[rxtx], int(self.bit_width / 2)
+ self.put(s - halfbit, self.samplenum + halfbit, self.out_ann, data)
+
+ def putpx(self, rxtx, data):
+ s, halfbit = self.startsample[rxtx], int(self.bit_width / 2)
+ self.put(s - halfbit, self.samplenum + halfbit, self.out_python, data)
+
+ def putg(self, data):
+ s, halfbit = self.samplenum, int(self.bit_width / 2)
+ self.put(s - halfbit, s + halfbit, self.out_ann, data)
+
+ def putp(self, data):
+ s, halfbit = self.samplenum, int(self.bit_width / 2)
+ self.put(s - halfbit, s + halfbit, self.out_python, data)
+
+ def putbin(self, rxtx, data):
+ s, halfbit = self.startsample[rxtx], int(self.bit_width / 2)
+ self.put(s - halfbit, self.samplenum + halfbit, self.out_bin, data)
+
+ def __init__(self, **kwargs):
+ self.samplerate = None
+ self.samplenum = 0
+ self.frame_start = [-1, -1]
+ self.startbit = [-1, -1]
+ self.cur_data_bit = [0, 0]
+ self.databyte = [0, 0]
+ self.paritybit = [-1, -1]
+ self.stopbit1 = [-1, -1]
+ self.startsample = [-1, -1]
+ self.state = ['WAIT FOR START BIT', 'WAIT FOR START BIT']
+ self.oldbit = [1, 1]
+ self.oldpins = [1, 1]
+ self.databits = [[], []]
+
+ def start(self):
+ self.out_python = self.register(srd.OUTPUT_PYTHON)
+ self.out_bin = self.register(srd.OUTPUT_BINARY)
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def metadata(self, key, value):
+ if key == srd.SRD_CONF_SAMPLERATE:
+ self.samplerate = value;
+ # The width of one UART bit in number of samples.
+ self.bit_width = float(self.samplerate) / float(self.options['baudrate'])
+
+ # Return true if we reached the middle of the desired bit, false otherwise.
+ def reached_bit(self, rxtx, bitnum):
+ # bitpos is the samplenumber which is in the middle of the
+ # specified UART bit (0 = start bit, 1..x = data, x+1 = parity bit
+ # (if used) or the first stop bit, and so on).
+ bitpos = self.frame_start[rxtx] + (self.bit_width / 2.0)
+ bitpos += bitnum * self.bit_width
+ if self.samplenum >= bitpos:
+ return True
+ return False
+
+ def reached_bit_last(self, rxtx, bitnum):
+ bitpos = self.frame_start[rxtx] + ((bitnum + 1) * self.bit_width)
+ if self.samplenum >= bitpos:
+ return True
+ return False
+
+ def wait_for_start_bit(self, rxtx, old_signal, signal):
+ # The start bit is always 0 (low). As the idle UART (and the stop bit)
+ # level is 1 (high), the beginning of a start bit is a falling edge.
+ if not (old_signal == 1 and signal == 0):
+ return
+
+ # Save the sample number where the start bit begins.
+ self.frame_start[rxtx] = self.samplenum
+
+ self.state[rxtx] = 'GET START BIT'
+
+ def get_start_bit(self, rxtx, signal):
+ # Skip samples until we're in the middle of the start bit.
+ if not self.reached_bit(rxtx, 0):
+ return
+
+ self.startbit[rxtx] = signal
+
+ # The startbit must be 0. If not, we report an error.
+ if self.startbit[rxtx] != 0:
+ self.putp(['INVALID STARTBIT', rxtx, self.startbit[rxtx]])
+ # TODO: Abort? Ignore rest of the frame?
+
+ self.cur_data_bit[rxtx] = 0
+ self.databyte[rxtx] = 0
+ self.startsample[rxtx] = -1
+
+ self.state[rxtx] = 'GET DATA BITS'
+
+ self.putp(['STARTBIT', rxtx, self.startbit[rxtx]])
+ self.putg([rxtx + 2, ['Start bit', 'Start', 'S']])
+
+ def get_data_bits(self, rxtx, signal):
+ # Skip samples until we're in the middle of the desired data bit.
+ if not self.reached_bit(rxtx, self.cur_data_bit[rxtx] + 1):
+ return
+
+ # Save the sample number of the middle of the first data bit.
+ if self.startsample[rxtx] == -1:
+ self.startsample[rxtx] = self.samplenum
+
+ # Get the next data bit in LSB-first or MSB-first fashion.
+ if self.options['bit_order'] == 'lsb-first':
+ self.databyte[rxtx] >>= 1
+ self.databyte[rxtx] |= \
+ (signal << (self.options['num_data_bits'] - 1))
+ elif self.options['bit_order'] == 'msb-first':
+ self.databyte[rxtx] <<= 1
+ self.databyte[rxtx] |= (signal << 0)
+ else:
+ raise Exception('Invalid bit order value: %s',
+ self.options['bit_order'])
+
+ self.putg([rxtx + 12, ['%d' % signal]])
+
+ # Store individual data bits and their start/end samplenumbers.
+ s, halfbit = self.samplenum, int(self.bit_width / 2)
+ self.databits[rxtx].append([signal, s - halfbit, s + halfbit])
+
+ # Return here, unless we already received all data bits.
+ if self.cur_data_bit[rxtx] < self.options['num_data_bits'] - 1:
+ self.cur_data_bit[rxtx] += 1
+ return
+
+ self.state[rxtx] = 'GET PARITY BIT'
+
+ self.putpx(rxtx, ['DATABITS', rxtx, self.databits[rxtx]])
+ self.putpx(rxtx, ['DATA', rxtx, self.databyte[rxtx]])
+
+ b, f = self.databyte[rxtx], self.options['format']
+ if f == 'ascii':
+ c = chr(b) if b in range(30, 126 + 1) else '[%02X]' % b
+ self.putx(rxtx, [rxtx, [c]])
+ elif f == 'dec':
+ self.putx(rxtx, [rxtx, [str(b)]])
+ elif f == 'hex':
+ self.putx(rxtx, [rxtx, [hex(b)[2:].zfill(2).upper()]])
+ elif f == 'oct':
+ self.putx(rxtx, [rxtx, [oct(b)[2:].zfill(3)]])
+ elif f == 'bin':
+ self.putx(rxtx, [rxtx, [bin(b)[2:].zfill(8)]])
+ else:
+ raise Exception('Invalid data format option: %s' % f)
+
+ self.putbin(rxtx, (rxtx, bytes([b])))
+ self.putbin(rxtx, (2, bytes([b])))
+
+ self.databits = [[], []]
+
+ def get_parity_bit(self, rxtx, signal):
+ # If no parity is used/configured, skip to the next state immediately.
+ if self.options['parity_type'] == 'none':
+ self.state[rxtx] = 'GET STOP BITS'
+ return
+
+ # Skip samples until we're in the middle of the parity bit.
+ if not self.reached_bit(rxtx, self.options['num_data_bits'] + 1):
+ return
+
+ self.paritybit[rxtx] = signal
+
+ self.state[rxtx] = 'GET STOP BITS'
+
+ if parity_ok(self.options['parity_type'], self.paritybit[rxtx],
+ self.databyte[rxtx], self.options['num_data_bits']):
+ self.putp(['PARITYBIT', rxtx, self.paritybit[rxtx]])
+ self.putg([rxtx + 4, ['Parity bit', 'Parity', 'P']])
+ else:
+ # TODO: Return expected/actual parity values.
+ self.putp(['PARITY ERROR', rxtx, (0, 1)]) # FIXME: Dummy tuple...
+ self.putg([rxtx + 6, ['Parity error', 'Parity err', 'PE']])
+
+ # TODO: Currently only supports 1 stop bit.
+ def get_stop_bits(self, rxtx, signal):
+ # Skip samples until we're in the middle of the stop bit(s).
+ skip_parity = 0 if self.options['parity_type'] == 'none' else 1
+ b = self.options['num_data_bits'] + 1 + skip_parity
+ if not self.reached_bit(rxtx, b):
+ return
+
+ self.stopbit1[rxtx] = signal
+
+ # Stop bits must be 1. If not, we report an error.
+ if self.stopbit1[rxtx] != 1:
+ self.putp(['INVALID STOPBIT', rxtx, self.stopbit1[rxtx]])
+ self.putg([rxtx + 8, ['Frame error', 'Frame err', 'FE']])
+ # TODO: Abort? Ignore the frame? Other?
+
+ self.state[rxtx] = 'WAIT FOR START BIT'
+
+ self.putp(['STOPBIT', rxtx, self.stopbit1[rxtx]])
+ self.putg([rxtx + 4, ['Stop bit', 'Stop', 'T']])
+
+ def decode(self, ss, es, data):
+ if self.samplerate is None:
+ raise Exception("Cannot decode without samplerate.")
+ for (self.samplenum, pins) in data:
+
+ # Note: Ignoring identical samples here for performance reasons
+ # is not possible for this PD, at least not in the current state.
+ # if self.oldpins == pins:
+ # continue
+ self.oldpins, (rx, tx) = pins, pins
+
+ # Either RX or TX (but not both) can be omitted.
+ has_pin = [rx in (0, 1), tx in (0, 1)]
+ if has_pin == [False, False]:
+ raise Exception('Either TX or RX (or both) pins required.')
+
+ # State machine.
+ for rxtx in (RX, TX):
+ # Don't try to handle RX (or TX) if not supplied.
+ if not has_pin[rxtx]:
+ continue
+
+ signal = rx if (rxtx == RX) else tx
+
+ if self.state[rxtx] == 'WAIT FOR START BIT':
+ self.wait_for_start_bit(rxtx, self.oldbit[rxtx], signal)
+ elif self.state[rxtx] == 'GET START BIT':
+ self.get_start_bit(rxtx, signal)
+ elif self.state[rxtx] == 'GET DATA BITS':
+ self.get_data_bits(rxtx, signal)
+ elif self.state[rxtx] == 'GET PARITY BIT':
+ self.get_parity_bit(rxtx, signal)
+ elif self.state[rxtx] == 'GET STOP BITS':
+ self.get_stop_bits(rxtx, signal)
+ else:
+ raise Exception('Invalid state: %s' % self.state[rxtx])
+
+ # Save current RX/TX values for the next round.
+ self.oldbit[rxtx] = signal
+
diff --git a/decoders/usb_packet/__init__.py b/decoders/usb_packet/__init__.py
new file mode 100644
index 0000000..06b67b9
--- /dev/null
+++ b/decoders/usb_packet/__init__.py
@@ -0,0 +1,45 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+This decoder stacks on top of the 'usb_signalling' PD and decodes the USB
+(low-speed and full-speed) packet protocol.
+
+Protocol layer (USB spec, chapter 8):
+
+Bit/byte ordering: Bits are sent onto the bus LSB-first. Multibyte fields
+are transmitted in little-endian order (i.e., LSB to MSB).
+
+SYNC field: All packets begin with a SYNC field (8 bits).
+
+Packet field format: Packets start with an SOP (Start Of Packet) delimiter
+that is part of the SYNC field, and end with an EOP (End Of Packet).
+
+PID: A PID (packet identifier) follows the SYNC field of every packet. A PID
+consists of a 4-bit packet type field, and a 4 bit check field.
+The check field is the one's complement of the packet type field.
+
+Details:
+https://en.wikipedia.org/wiki/USB
+http://www.usb.org/developers/docs/
+'''
+
+from .pd import *
+
diff --git a/decoders/usb_packet/pd.py b/decoders/usb_packet/pd.py
new file mode 100644
index 0000000..8f86cc7
--- /dev/null
+++ b/decoders/usb_packet/pd.py
@@ -0,0 +1,343 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2011 Gareth McMullin <gareth at blacksphere.co.nz>
+## Copyright (C) 2012-2014 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+
+'''
+OUTPUT_PYTHON format:
+
+Packet:
+[<ptype>, <pdata>]
+
+<ptype>, <pdata>:
+ - 'SYNC', <sync>
+ - 'PID', <pid>
+ - 'ADDR', <addr>
+ - 'EP', <ep>
+ - 'CRC5', <crc5>
+ - 'CRC16', <crc16>
+ - 'EOP', <eop>
+ - 'FRAMENUM', <framenum>
+ - 'DATABYTE', <databyte>
+ - 'HUBADDR', <hubaddr>
+ - 'SC', <sc>
+ - 'PORT', <port>
+ - 'S', <s>
+ - 'E/U', <e/u>
+ - 'ET', <et>
+ - 'PACKET', [<pcategory>, <pname>, <pinfo>]
+
+<pcategory>, <pname>, <pinfo>:
+ - 'TOKEN', 'OUT', [<sync>, <pid>, <addr>, <ep>, <crc5>, <eop>]
+ - 'TOKEN', 'IN', [<sync>, <pid>, <addr>, <ep>, <crc5>, <eop>]
+ - 'TOKEN', 'SOF', [<sync>, <pid>, <framenum>, <crc5>, <eop>]
+ - 'TOKEN', 'SETUP', [<sync>, <pid>, <addr>, <ep>, <crc5>, <eop>]
+ - 'DATA', 'DATA0', [<sync>, <pid>, <databytes>, <crc16>, <eop>]
+ - 'DATA', 'DATA1', [<sync>, <pid>, <databytes>, <crc16>, <eop>]
+ - 'DATA', 'DATA2', [<sync>, <pid>, <databytes>, <crc16>, <eop>]
+ - 'DATA', 'MDATA', [<sync>, <pid>, <databytes>, <crc16>, <eop>]
+ - 'HANDSHAKE', 'ACK', [<sync>, <pid>, <eop>]
+ - 'HANDSHAKE', 'NAK', [<sync>, <pid>, <eop>]
+ - 'HANDSHAKE', 'STALL', [<sync>, <pid>, <eop>]
+ - 'HANDSHAKE', 'NYET', [<sync>, <pid>, <eop>]
+ - 'SPECIAL', 'PRE', [<sync>, <pid>, <addr>, <ep>, <crc5>, <eop>]
+ - 'SPECIAL', 'ERR', [<sync>, <pid>, <eop>]
+ - 'SPECIAL', 'SPLIT',
+ [<sync>, <pid>, <hubaddr>, <sc>, <port>, <s>, <e/u>, <et>, <crc5>, <eop>]
+ - 'SPECIAL', 'PING', [<sync>, <pid>, <addr>, <ep>, <crc5>, <eop>]
+ - 'SPECIAL', 'Reserved', None
+
+<sync>: SYNC field bitstring, normally '00000001' (8 chars).
+<pid>: Packet ID bitstring, e.g. '11000011' for DATA0 (8 chars).
+<addr>: Address field number, 0-127 (7 bits).
+<ep>: Endpoint number, 0-15 (4 bits).
+<crc5>: CRC-5 number (5 bits).
+<crc16>: CRC-16 number (16 bits).
+<eop>: End of packet marker. List of symbols, usually ['SE0', 'SE0', 'J'].
+<framenum>: USB (micro)frame number, 0-2047 (11 bits).
+<databyte>: A single data byte, e.g. 0x55.
+<databytes>: List of data bytes, e.g. [0x55, 0xaa, 0x99] (0 - 1024 bytes).
+<hubaddr>: TODO
+<sc>: TODO
+<port>: TODO
+<s>: TODO
+<e/u>: TODO
+<et>: TODO
+'''
+
+# Packet IDs (PIDs).
+# The first 4 bits are the 'packet type' field, the last 4 bits are the
+# 'check field' (each bit in the check field must be the inverse of the resp.
+# bit in the 'packet type' field; if not, that's a 'PID error').
+# For the 4-bit strings, the left-most '1' or '0' is the LSB, i.e. it's sent
+# to the bus first.
+pids = {
+ # Tokens
+ '10000111': ['OUT', 'Address & EP number in host-to-function transaction'],
+ '10010110': ['IN', 'Address & EP number in function-to-host transaction'],
+ '10100101': ['SOF', 'Start-Of-Frame marker & frame number'],
+ '10110100': ['SETUP', 'Address & EP number in host-to-function transaction for SETUP to a control pipe'],
+
+ # Data
+ # Note: DATA2 and MDATA are HS-only.
+ '11000011': ['DATA0', 'Data packet PID even'],
+ '11010010': ['DATA1', 'Data packet PID odd'],
+ '11100001': ['DATA2', 'Data packet PID HS, high bandwidth isosynchronous transaction in a microframe'],
+ '11110000': ['MDATA', 'Data packet PID HS for split and high-bandwidth isosynchronous transactions'],
+
+ # Handshake
+ '01001011': ['ACK', 'Receiver accepts error-free packet'],
+ '01011010': ['NAK', 'Receiver cannot accept or transmitter cannot send'],
+ '01111000': ['STALL', 'EP halted or control pipe request unsupported'],
+ '01101001': ['NYET', 'No response yet from receiver'],
+
+ # Special
+ '00111100': ['PRE', 'Host-issued preamble; enables downstream bus traffic to low-speed devices'],
+ '00111100': ['ERR', 'Split transaction error handshake'],
+ '00011110': ['SPLIT', 'HS split transaction token'],
+ '00101101': ['PING', 'HS flow control probe for a bulk/control EP'],
+ '00001111': ['Reserved', 'Reserved PID'],
+}
+
+def get_category(pidname):
+ if pidname in ('OUT', 'IN', 'SOF', 'SETUP'):
+ return 'TOKEN'
+ elif pidname in ('DATA0', 'DATA1', 'DATA2', 'MDATA'):
+ return 'DATA'
+ elif pidname in ('ACK', 'NAK', 'STALL', 'NYET'):
+ return 'HANDSHAKE'
+ else:
+ return 'SPECIAL'
+
+def ann_index(pidname):
+ l = ['OUT', 'IN', 'SOF', 'SETUP', 'DATA0', 'DATA1', 'DATA2', 'MDATA',
+ 'ACK', 'NAK', 'STALL', 'NYET', 'PRE', 'ERR', 'SPLIT', 'PING',
+ 'Reserved']
+ if pidname not in l:
+ return 28
+ return l.index(pidname) + 11
+
+def bitstr_to_num(bitstr):
+ if not bitstr:
+ return 0
+ l = list(bitstr)
+ l.reverse()
+ return int(''.join(l), 2)
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'usb_packet'
+ name = 'USB packet'
+ longname = 'Universal Serial Bus (LS/FS) packet'
+ desc = 'USB (low-speed and full-speed) packet protocol.'
+ license = 'gplv2+'
+ inputs = ['usb_signalling']
+ outputs = ['usb_packet']
+ options = (
+ {'id': 'signalling', 'desc': 'Signalling',
+ 'default': 'full-speed', 'values': ('full-speed', 'low-speed')},
+ )
+ annotations = (
+ ('sync-ok', 'SYNC'),
+ ('sync-err', 'SYNC (error)'),
+ ('pid', 'PID'),
+ ('framenum', 'FRAMENUM'),
+ ('addr', 'ADDR'),
+ ('ep', 'EP'),
+ ('crc5-ok', 'CRC5'),
+ ('crc5-err', 'CRC5 (error)'),
+ ('data', 'DATA'),
+ ('crc16-ok', 'CRC16'),
+ ('crc16-err', 'CRC16 (error)'),
+ ('packet-out', 'Packet: OUT'),
+ ('packet-in', 'Packet: IN'),
+ ('packet-sof', 'Packet: SOF'),
+ ('packet-setup', 'Packet: SETUP'),
+ ('packet-data0', 'Packet: DATA0'),
+ ('packet-data1', 'Packet: DATA1'),
+ ('packet-data2', 'Packet: DATA2'),
+ ('packet-mdata', 'Packet: MDATA'),
+ ('packet-ack', 'Packet: ACK'),
+ ('packet-nak', 'Packet: NAK'),
+ ('packet-stall', 'Packet: STALL'),
+ ('packet-nyet', 'Packet: NYET'),
+ ('packet-pre', 'Packet: PRE'),
+ ('packet-err', 'Packet: ERR'),
+ ('packet-split', 'Packet: SPLIT'),
+ ('packet-ping', 'Packet: PING'),
+ ('packet-reserved', 'Packet: Reserved'),
+ ('packet-invalid', 'Packet: Invalid'),
+ )
+ annotation_rows = (
+ ('fields', 'Packet fields', tuple(range(10 + 1))),
+ ('packet', 'Packets', tuple(range(11, 28 + 1))),
+ )
+
+ def __init__(self):
+ self.samplenum = 0
+ self.bits = []
+ self.packet = []
+ self.packet_summary = ''
+ self.ss = self.es = None
+ self.ss_packet = self.es_packet = None
+ self.state = 'WAIT FOR SOP'
+
+ def putpb(self, data):
+ self.put(self.ss, self.es, self.out_python, data)
+
+ def putb(self, data):
+ self.put(self.ss, self.es, self.out_ann, data)
+
+ def putpp(self, data):
+ self.put(self.ss_packet, self.es_packet, self.out_python, data)
+
+ def putp(self, data):
+ self.put(self.ss_packet, self.es_packet, self.out_ann, data)
+
+ def start(self):
+ self.out_python = self.register(srd.OUTPUT_PYTHON)
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def handle_packet(self):
+ packet = ''
+ for (bit, ss, es) in self.bits:
+ packet += bit
+
+ # Bits[0:7]: SYNC
+ sync = packet[:7 + 1]
+ self.ss, self.es = self.bits[0][1], self.bits[7][2]
+ # The SYNC pattern for low-speed/full-speed is KJKJKJKK (00000001).
+ if sync != '00000001':
+ self.putpb(['SYNC ERROR', sync])
+ self.putb([1, ['SYNC ERROR: %s' % sync, 'SYNC ERR: %s' % sync,
+ 'SYNC ERR', 'SE', 'S']])
+ else:
+ self.putpb(['SYNC', sync])
+ self.putb([0, ['SYNC: %s' % sync, 'SYNC', 'S']])
+ self.packet.append(sync)
+
+ # Bits[8:15]: PID
+ pid = packet[8:15 + 1]
+ pidname = pids.get(pid, (pid, ''))[0]
+ self.ss, self.es = self.bits[8][1], self.bits[15][2]
+ self.putpb(['PID', pidname])
+ self.putb([2, ['PID: %s' % pidname, pidname, pidname[0]]])
+ self.packet.append(pid)
+ self.packet_summary += pidname
+
+ if pidname in ('OUT', 'IN', 'SOF', 'SETUP', 'PRE', 'PING'):
+ if pidname == 'SOF':
+ # Bits[16:26]: Framenum
+ framenum = bitstr_to_num(packet[16:26 + 1])
+ self.ss, self.es = self.bits[16][1], self.bits[26][2]
+ self.putpb(['FRAMENUM', framenum])
+ self.putb([3, ['Frame: %d' % framenum, 'Frame', 'Fr', 'F']])
+ self.packet.append(framenum)
+ self.packet_summary += ' %d' % framenum
+ else:
+ # Bits[16:22]: Addr
+ addr = bitstr_to_num(packet[16:22 + 1])
+ self.ss, self.es = self.bits[16][1], self.bits[22][2]
+ self.putpb(['ADDR', addr])
+ self.putb([4, ['Address: %d' % addr, 'Addr: %d' % addr,
+ 'Addr', 'A']])
+ self.packet.append(addr)
+ self.packet_summary += ' ADDR %d' % addr
+
+ # Bits[23:26]: EP
+ ep = bitstr_to_num(packet[23:26 + 1])
+ self.ss, self.es = self.bits[23][1], self.bits[26][2]
+ self.putpb(['EP', ep])
+ self.putb([5, ['Endpoint: %d' % ep, 'EP: %d' % ep, 'EP', 'E']])
+ self.packet.append(ep)
+ self.packet_summary += ' EP %d' % ep
+
+ # Bits[27:31]: CRC5
+ crc5 = bitstr_to_num(packet[27:31 + 1])
+ self.ss, self.es = self.bits[27][1], self.bits[31][2]
+ self.putpb(['CRC5', crc5])
+ self.putb([6, ['CRC5: 0x%02X' % crc5, 'CRC5', 'C']])
+ self.packet.append(crc5)
+ elif pidname in ('DATA0', 'DATA1', 'DATA2', 'MDATA'):
+ # Bits[16:packetlen-16]: Data
+ data = packet[16:-16]
+ # TODO: len(data) must be a multiple of 8.
+ databytes = []
+ self.packet_summary += ' ['
+ for i in range(0, len(data), 8):
+ db = bitstr_to_num(data[i:i + 8])
+ self.ss, self.es = self.bits[16 + i][1], self.bits[23 + i][2]
+ self.putpb(['DATABYTE', db])
+ self.putb([8, ['Databyte: %02X' % db, 'Data: %02X' % db,
+ 'DB: %02X' % db, '%02X' % db]])
+ databytes.append(db)
+ self.packet_summary += ' %02X' % db
+ data = data[8:]
+ self.packet_summary += ' ]'
+
+ # Convenience Python output (no annotation) for all bytes together.
+ self.ss, self.es = self.bits[16][1], self.bits[-16][2]
+ self.putpb(['DATABYTES', databytes])
+ self.packet.append(databytes)
+
+ # Bits[packetlen-16:packetlen]: CRC16
+ crc16 = bitstr_to_num(packet[-16:])
+ self.ss, self.es = self.bits[-16][1], self.bits[-1][2]
+ self.putpb(['CRC16', crc16])
+ self.putb([9, ['CRC16: 0x%04X' % crc16, 'CRC16', 'C']])
+ self.packet.append(crc16)
+ elif pidname in ('ACK', 'NAK', 'STALL', 'NYET', 'ERR'):
+ pass # Nothing to do, these only have SYNC+PID+EOP fields.
+ else:
+ pass # TODO: Handle 'SPLIT' and possibly 'Reserved' packets.
+
+ # Output a (summary of) the whole packet.
+ pcategory, pname, pinfo = get_category(pidname), pidname, self.packet
+ self.putpp(['PACKET', [pcategory, pname, pinfo]])
+ self.putp([ann_index(pidname), ['%s' % self.packet_summary]])
+
+ self.packet, self.packet_summary = [], ''
+
+ def decode(self, ss, es, data):
+ (ptype, pdata) = data
+
+ # We only care about certain packet types for now.
+ if ptype not in ('SOP', 'BIT', 'EOP'):
+ return
+
+ # State machine.
+ if self.state == 'WAIT FOR SOP':
+ if ptype != 'SOP':
+ return
+ self.ss_packet = ss
+ self.state = 'GET BIT'
+ elif self.state == 'GET BIT':
+ if ptype == 'BIT':
+ self.bits.append([pdata, ss, es])
+ elif ptype == 'EOP':
+ self.es_packet = es
+ self.handle_packet()
+ self.bits, self.state = [], 'WAIT FOR SOP'
+ else:
+ pass # TODO: Error
+ else:
+ raise Exception('Invalid state: %s' % self.state)
+
diff --git a/decoders/usb_signalling/__init__.py b/decoders/usb_signalling/__init__.py
new file mode 100644
index 0000000..2311b1f
--- /dev/null
+++ b/decoders/usb_signalling/__init__.py
@@ -0,0 +1,52 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2012 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+This PD decodes the USB (low-speed and full-speed) signalling protocol.
+
+Electrical/signalling layer (USB spec, chapter 7):
+
+USB signalling consists of two signal lines, both driven at 3.3V
+logic levels. The signals are DP (D+) and DM (D-), and normally operate in
+differential mode.
+
+Low-speed: The state where DP=1,DM=0 is K, the state DP=0,DM=1 is J.
+Full-speed: The state where DP=1,DM=0 is J, the state DP=0,DM=1 is K.
+
+A state SE0 is defined where DP=DM=0. This common mode signal is used to
+signal a reset or end of packet (EOP). A state SE1 is defined where DP=DM=1.
+
+Data transmitted on the USB is encoded with NRZI. A transition from J to K
+or vice-versa indicates a logic 0, while no transition indicates a logic 1.
+If 6 ones are transmitted consecutively, a zero is inserted to force a
+transition. This is known as bit stuffing.
+
+Data is transferred at a rate of 1.5Mbit/s (low-speed) / 12Mbit/s (full-speed).
+
+The SE0 transmitted to signal an end-of-packet is two bit intervals long
+(low-speed: 1.25uS - 1.50uS, full-speed: 160ns - 175ns).
+
+Details:
+https://en.wikipedia.org/wiki/USB
+http://www.usb.org/developers/docs/
+'''
+
+from .pd import *
+
diff --git a/decoders/usb_signalling/pd.py b/decoders/usb_signalling/pd.py
new file mode 100644
index 0000000..8c6a9c3
--- /dev/null
+++ b/decoders/usb_signalling/pd.py
@@ -0,0 +1,242 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2011 Gareth McMullin <gareth at blacksphere.co.nz>
+## Copyright (C) 2012-2013 Uwe Hermann <uwe at hermann-uwe.de>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+import sigrokdecode as srd
+
+'''
+OUTPUT_PYTHON format:
+
+Packet:
+[<ptype>, <pdata>]
+
+<ptype>, <pdata>:
+ - 'SOP', None
+ - 'SYM', <sym>
+ - 'BIT', <bit>
+ - 'STUFF BIT', None
+ - 'EOP', None
+
+<sym>:
+ - 'J', 'K', 'SE0', or 'SE1'
+
+<bit>:
+ - 0 or 1
+ - Note: Symbols like SE0, SE1, and the J that's part of EOP don't yield 'BIT'.
+'''
+
+# Low-/full-speed symbols.
+# Note: Low-speed J and K are inverted compared to the full-speed J and K!
+symbols = {
+ 'low-speed': {
+ # (<dp>, <dm>): <symbol/state>
+ (0, 0): 'SE0',
+ (1, 0): 'K',
+ (0, 1): 'J',
+ (1, 1): 'SE1',
+ },
+ 'full-speed': {
+ # (<dp>, <dm>): <symbol/state>
+ (0, 0): 'SE0',
+ (1, 0): 'J',
+ (0, 1): 'K',
+ (1, 1): 'SE1',
+ },
+}
+
+bitrates = {
+ 'low-speed': 1500000, # 1.5Mb/s (+/- 1.5%)
+ 'full-speed': 12000000, # 12Mb/s (+/- 0.25%)
+}
+
+sym_idx = {
+ 'J': 0,
+ 'K': 1,
+ 'SE0': 2,
+ 'SE1': 3,
+}
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'usb_signalling'
+ name = 'USB signalling'
+ longname = 'Universal Serial Bus (LS/FS) signalling'
+ desc = 'USB (low-speed and full-speed) signalling protocol.'
+ license = 'gplv2+'
+ inputs = ['logic']
+ outputs = ['usb_signalling']
+ channels = (
+ {'id': 'dp', 'name': 'D+', 'desc': 'USB D+ signal'},
+ {'id': 'dm', 'name': 'D-', 'desc': 'USB D- signal'},
+ )
+ options = (
+ {'id': 'signalling', 'desc': 'Signalling',
+ 'default': 'full-speed', 'values': ('full-speed', 'low-speed')},
+ )
+ annotations = (
+ ('sym-j', 'J symbol'),
+ ('sym-k', 'K symbol'),
+ ('sym-se0', 'SE0 symbol'),
+ ('sym-se1', 'SE1 symbol'),
+ ('sop', 'Start of packet (SOP)'),
+ ('eop', 'End of packet (EOP)'),
+ ('bit', 'Bit'),
+ ('stuffbit', 'Stuff bit'),
+ )
+ annotation_rows = (
+ ('bits', 'Bits', (4, 5, 6, 7)),
+ ('symbols', 'Symbols', (0, 1, 2, 3)),
+ )
+
+ def __init__(self):
+ self.samplerate = None
+ self.oldsym = 'J' # The "idle" state is J.
+ self.ss_sop = None
+ self.ss_block = None
+ self.samplenum = 0
+ self.syms = []
+ self.bitrate = None
+ self.bitwidth = None
+ self.bitnum = 0
+ self.samplenum_target = None
+ self.oldpins = None
+ self.consecutive_ones = 0
+ self.state = 'IDLE'
+
+ def start(self):
+ self.out_python = self.register(srd.OUTPUT_PYTHON)
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def metadata(self, key, value):
+ if key == srd.SRD_CONF_SAMPLERATE:
+ self.samplerate = value
+ self.bitrate = bitrates[self.options['signalling']]
+ self.bitwidth = float(self.samplerate) / float(self.bitrate)
+ self.halfbit = int(self.bitwidth / 2)
+
+ def putpx(self, data):
+ self.put(self.samplenum, self.samplenum, self.out_python, data)
+
+ def putx(self, data):
+ self.put(self.samplenum, self.samplenum, self.out_ann, data)
+
+ def putpm(self, data):
+ s, h = self.samplenum, self.halfbit
+ self.put(self.ss_block - h, s + h, self.out_python, data)
+
+ def putm(self, data):
+ s, h = self.samplenum, self.halfbit
+ self.put(self.ss_block - h, s + h, self.out_ann, data)
+
+ def putpb(self, data):
+ s, h = self.samplenum, self.halfbit
+ self.put(s - h, s + h, self.out_python, data)
+
+ def putb(self, data):
+ s, h = self.samplenum, self.halfbit
+ self.put(s - h, s + h, self.out_ann, data)
+
+ def set_new_target_samplenum(self):
+ bitpos = self.ss_sop + (self.bitwidth / 2)
+ bitpos += self.bitnum * self.bitwidth
+ self.samplenum_target = int(bitpos)
+
+ def wait_for_sop(self, sym):
+ # Wait for a Start of Packet (SOP), i.e. a J->K symbol change.
+ if sym != 'K':
+ self.oldsym = sym
+ return
+ self.ss_sop = self.samplenum
+ self.set_new_target_samplenum()
+ self.putpx(['SOP', None])
+ self.putx([4, ['SOP', 'S']])
+ self.state = 'GET BIT'
+
+ def handle_bit(self, sym, b):
+ if self.consecutive_ones == 6 and b == '0':
+ # Stuff bit.
+ self.putpb(['STUFF BIT', None])
+ self.putb([7, ['Stuff bit: %s' % b, 'SB: %s' % b, '%s' % b]])
+ self.putb([sym_idx[sym], ['%s' % sym]])
+ self.consecutive_ones = 0
+ else:
+ # Normal bit (not a stuff bit).
+ self.putpb(['BIT', b])
+ self.putb([6, ['%s' % b]])
+ self.putb([sym_idx[sym], ['%s' % sym]])
+ if b == '1':
+ self.consecutive_ones += 1
+ else:
+ self.consecutive_ones = 0
+
+ def get_eop(self, sym):
+ # EOP: SE0 for >= 1 bittime (usually 2 bittimes), then J.
+ self.syms.append(sym)
+ self.putpb(['SYM', sym])
+ self.putb([sym_idx[sym], ['%s' % sym, '%s' % sym[0]]])
+ self.bitnum += 1
+ self.set_new_target_samplenum()
+ self.oldsym = sym
+ if self.syms[-2:] == ['SE0', 'J']:
+ # Got an EOP.
+ self.putpm(['EOP', None])
+ self.putm([5, ['EOP', 'E']])
+ self.bitnum, self.syms, self.state = 0, [], 'IDLE'
+ self.consecutive_ones = 0
+
+ def get_bit(self, sym):
+ if sym == 'SE0':
+ # Start of an EOP. Change state, run get_eop() for this bit.
+ self.state = 'GET EOP'
+ self.ss_block = self.samplenum
+ self.get_eop(sym)
+ return
+ self.syms.append(sym)
+ self.putpb(['SYM', sym])
+ b = '0' if self.oldsym != sym else '1'
+ self.handle_bit(sym, b)
+ self.bitnum += 1
+ self.set_new_target_samplenum()
+ self.oldsym = sym
+
+ def decode(self, ss, es, data):
+ if self.samplerate is None:
+ raise Exception("Cannot decode without samplerate.")
+ for (self.samplenum, pins) in data:
+ # State machine.
+ if self.state == 'IDLE':
+ # Ignore identical samples early on (for performance reasons).
+ if self.oldpins == pins:
+ continue
+ self.oldpins = pins
+ sym = symbols[self.options['signalling']][tuple(pins)]
+ self.wait_for_sop(sym)
+ elif self.state in ('GET BIT', 'GET EOP'):
+ # Wait until we're in the middle of the desired bit.
+ if self.samplenum < self.samplenum_target:
+ continue
+ sym = symbols[self.options['signalling']][tuple(pins)]
+ if self.state == 'GET BIT':
+ self.get_bit(sym)
+ elif self.state == 'GET EOP':
+ self.get_eop(sym)
+ else:
+ raise Exception('Invalid state: %s' % self.state)
+
diff --git a/decoders/xfp/__init__.py b/decoders/xfp/__init__.py
new file mode 100644
index 0000000..fa4e8a2
--- /dev/null
+++ b/decoders/xfp/__init__.py
@@ -0,0 +1,41 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2013 Bert Vermeulen <bert at biot.com>
+##
+## 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 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, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+'''
+This PD decodes the XFP I²C management interface structures/protocol.
+
+XFP modules include an I²C interface, used to monitor and control various
+aspects of the module. The specification defines an I²C slave at address
+0x50 (0xa0) which returns 128 bytes of a standard structure ("lower memory"),
+and, after setting a table number in lower memory, a set of 256 "higher
+memory" tables, which can be mapped to different subdevices on the XFP.
+
+Only one table is defined in the specification: table 0x01, the default on
+module startup. Other table are either reserved for future expansion, or
+available for vendor-specific extensions. This decoder supports both lower
+memory and table 0x01.
+
+The XFP specification is available here:
+
+ ftp://ftp.seagate.com/sff/INF-8077.PDF
+'''
+
+from .pd import *
+
diff --git a/decoders/xfp/pd.py b/decoders/xfp/pd.py
new file mode 100644
index 0000000..b8ec8ed
--- /dev/null
+++ b/decoders/xfp/pd.py
@@ -0,0 +1,647 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2013 Bert Vermeulen <bert at biot.com>
+##
+## 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 <http://www.gnu.org/licenses/>.
+##
+
+import sigrokdecode as srd
+
+MODULE_ID = {
+ 0x01: 'GBIC',
+ 0x02: 'Integrated module/connector',
+ 0x03: 'SFP',
+ 0x04: '300-pin XBI',
+ 0x05: 'XENPAK',
+ 0x06: 'XFP',
+ 0x07: 'XFF',
+ 0x08: 'XFP-E',
+ 0x09: 'XPAK',
+ 0x0a: 'X2',
+}
+
+ALARM_THRESHOLDS = {
+ 0: "Temp high alarm",
+ 2: "Temp low alarm",
+ 4: "Temp high warning",
+ 6: "Temp low warning",
+ 16: "Bias high alarm",
+ 18: "Bias low alarm",
+ 20: "Bias high warning",
+ 22: "Bias low warning",
+ 24: "TX power high alarm",
+ 26: "TX power low alarm",
+ 28: "TX power high warning",
+ 30: "TX power low warning",
+ 32: "RX power high alarm",
+ 34: "RX power low alarm",
+ 36: "RX power high warning",
+ 38: "RX power low warning",
+ 40: "AUX 1 high alarm",
+ 42: "AUX 1 low alarm",
+ 44: "AUX 1 high warning",
+ 46: "AUX 1 low warning",
+ 48: "AUX 2 high alarm",
+ 50: "AUX 2 low alarm",
+ 52: "AUX 2 high warning",
+ 54: "AUX 2 low warning",
+}
+
+AD_READOUTS = {
+ 0: "Module temperature",
+ 4: "TX bias current",
+ 6: "Measured TX output power",
+ 8: "Measured RX input power",
+ 10: "AUX 1 measurement",
+ 12: "AUX 2 measurement",
+}
+
+GCS_BITS = [
+ "TX disable",
+ "Soft TX disable",
+ "MOD_NR",
+ "P_Down",
+ "Soft P_Down",
+ "Interrupt",
+ "RX_LOS",
+ "Data_Not_Ready",
+ "TX_NR",
+ "TX_Fault",
+ "TX_CDR not locked",
+ "RX_NR",
+ "RX_CDR not locked",
+]
+
+CONNECTOR = {
+ 0x01: "SC",
+ 0x02: "Fibre Channel style 1 copper",
+ 0x03: "Fibre Channel style 2 copper",
+ 0x04: "BNC/TNC",
+ 0x05: "Fibre Channel coax",
+ 0x06: "FiberJack",
+ 0x07: "LC",
+ 0x08: "MT-RJ",
+ 0x09: "MU",
+ 0x0a: "SG",
+ 0x0b: "Optical pigtail",
+ 0x20: "HSSDC II",
+ 0x21: "Copper pigtail",
+}
+
+TRANSCEIVER = [
+ # 10GB Ethernet
+ ["10GBASE-SR", "10GBASE-LR", "10GBASE-ER", "10GBASE-LRM", "10GBASE-SW",
+ "10GBASE-LW", "10GBASE-EW"],
+ # 10GB Fibre Channel
+ ["1200-MX-SN-I", "1200-SM-LL-L", "Extended Reach 1550 nm",
+ "Intermediate reach 1300 nm FP"],
+ # 10GB Copper
+ [],
+ # 10GB low speed
+ ["1000BASE-SX / 1xFC MMF", "1000BASE-LX / 1xFC SMF", "2xFC MMF",
+ "2xFC SMF", "OC48-SR", "OC48-IR", "OC48-LR"],
+ # 10GB SONET/SDH interconnect
+ ["I-64.1r", "I-64.1", "I-64.2r", "I-64.2", "I-64.3", "I-64.5"],
+ # 10GB SONET/SDH short haul
+ ["S-64.1", "S-64.2a", "S-64.2b", "S-64.3a", "S-64.3b", "S-64.5a", "S-64.5b"],
+ # 10GB SONET/SDH long haul
+ ["L-64.1", "L-64.2a", "L-64.2b", "L-64.2c", "L-64.3", "G.959.1 P1L1-2D2"],
+ # 10GB SONET/SDH very long haul
+ ["V-64.2a", "V-64.2b", "V-64.3"],
+]
+
+SERIAL_ENCODING = [
+ "64B/66B",
+ "8B/10B",
+ "SONET scrambled",
+ "NRZ",
+ "RZ",
+]
+
+XMIT_TECH = [
+ "850 nm VCSEL",
+ "1310 nm VCSEL",
+ "1550 nm VCSEL",
+ "1310 nm FP",
+ "1310 nm DFB",
+ "1550 nm DFB",
+ "1310 nm EML"
+ "1550 nm EML"
+ "copper",
+]
+
+CDR = [
+ "9.95Gb/s",
+ "10.3Gb/s",
+ "10.5Gb/s",
+ "10.7Gb/s",
+ "11.1Gb/s",
+ "(unknown)",
+ "lineside loopback mode",
+ "XFI loopback mode",
+]
+
+DEVICE_TECH = [
+ ["no wavelength control", "sctive wavelength control"],
+ ["uncooled transmitter device", "cooled transmitter"],
+ ["PIN detector", "APD detector"],
+ ["transmitter not tunable", "transmitter tunable"],
+]
+
+ENHANCED_OPTS = [
+ "VPS",
+ "soft TX_DISABLE",
+ "soft P_Down",
+ "VPS LV regulator mode",
+ "VPS bypassed regulator mode",
+ "active FEC control",
+ "wavelength tunability",
+ "CMU",
+]
+
+AUX_TYPES = [
+ "not implemented",
+ "APD bias voltage",
+ "(unknown)",
+ "TEC current",
+ "laser temperature",
+ "laser wavelength",
+ "5V supply voltage",
+ "3.3V supply voltage",
+ "1.8V supply voltage",
+ "-5.2V supply voltage",
+ "5V supply current",
+ "(unknown)",
+ "(unknown)",
+ "3.3V supply current",
+ "1.8V supply current",
+ "-5.2V supply current",
+]
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'xfp'
+ name = 'XFP'
+ longname = '10 Gigabit Small Form Factor Pluggable Module (XFP)'
+ desc = 'Data structure describing display device capabilities.'
+ license = 'gplv3+'
+ inputs = ['i2c']
+ outputs = ['xfp']
+ annotations = (
+ ('fieldnames-and-values', 'XFP structure field names and values'),
+ ('fields', 'XFP structure fields'),
+ )
+
+ def __init__(self, **kwargs):
+ # Received data items, used as an index into samplenum/data
+ self.cnt = -1
+ # Start/end sample numbers per data item
+ self.sn = []
+ # Multi-byte structure buffer
+ self.buf = []
+ # Filled in by address 0x7f in low memory
+ self.cur_highmem_page = 0
+ # Filled in by extended ID value in table 2
+ self.have_clei = False
+ # Handlers for each field in the structure, keyed by the end
+ # index of that field. Each handler is fed all unhandled bytes
+ # up until that point, so mark unused space with the dummy
+ # handler self.ignore().
+ self.MAP_LOWER_MEMORY = {
+ 0: self.module_id,
+ 1: self.signal_cc,
+ 57: self.alarm_warnings,
+ 59: self.vps,
+ 69: self.ignore,
+ 71: self.ber,
+ 75: self.wavelength_cr,
+ 79: self.fec_cr,
+ 95: self.int_ctrl,
+ 109: self.ad_readout,
+ 111: self.gcs,
+ 117: self.ignore,
+ 118: self.ignore,
+ 122: self.ignore,
+ 126: self.ignore,
+ 127: self.page_select,
+ }
+ self.MAP_HIGH_TABLE_1 = {
+ 128: self.module_id,
+ 129: self.ext_module_id,
+ 130: self.connector,
+ 138: self.transceiver,
+ 139: self.serial_encoding,
+ 140: self.br_min,
+ 141: self.br_max,
+ 142: self.link_length_smf,
+ 143: self.link_length_e50,
+ 144: self.link_length_50um,
+ 145: self.link_length_625um,
+ 146: self.link_length_copper,
+ 147: self.device_tech,
+ 163: self.vendor,
+ 164: self.cdr,
+ 167: self.vendor_oui,
+ 183: self.vendor_pn,
+ 185: self.vendor_rev,
+ 187: self.wavelength,
+ 189: self.wavelength_tolerance,
+ 190: self.max_case_temp,
+ 191: self.ignore,
+ 195: self.power_supply,
+ 211: self.vendor_sn,
+ 219: self.manuf_date,
+ 220: self.diag_mon,
+ 221: self.enhanced_opts,
+ 222: self.aux_mon,
+ 223: self.ignore,
+ 255: self.maybe_ascii,
+ }
+
+ def start(self):
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+
+ def decode(self, ss, es, data):
+ cmd, data = data
+
+ # We only care about actual data bytes that are read (for now).
+ if cmd != 'DATA READ':
+ return
+
+ self.cnt += 1
+ self.sn.append([ss, es])
+
+ self.buf.append(data)
+ if self.cnt < 0x80:
+ if self.cnt in self.MAP_LOWER_MEMORY:
+ self.MAP_LOWER_MEMORY[self.cnt](self.buf)
+ self.buf.clear()
+ elif self.cnt < 0x0100 and self.cur_highmem_page == 0x01:
+ # Serial ID memory map
+ if self.cnt in self.MAP_HIGH_TABLE_1:
+ self.MAP_HIGH_TABLE_1[self.cnt](self.buf)
+ self.buf.clear()
+
+ # Annotation helper
+ def annotate(self, key, value, start_cnt=None, end_cnt=None):
+ if start_cnt is None:
+ start_cnt = self.cnt - len(self.buf) + 1
+ if end_cnt is None:
+ end_cnt = self.cnt
+ self.put(self.sn[start_cnt][0], self.sn[end_cnt][1],
+ self.out_ann, [0, [key + ": " + value]])
+ self.put(self.sn[start_cnt][0], self.sn[end_cnt][1],
+ self.out_ann, [1, [value]])
+
+ # Placeholder handler, needed to advance the buffer past unused or
+ # reserved space in the structures.
+ def ignore(self, data):
+ pass
+
+ # Show as ASCII if possible
+ def maybe_ascii(self, data):
+ for i in range(len(data)):
+ if data[i] >= 0x20 and data[i] < 0x7f:
+ cnt = self.cnt - len(data) + 1
+ self.annotate("Vendor ID", chr(data[i]), cnt, cnt)
+
+ # Convert 16-bit two's complement values, with each increment
+ # representing 1/256C, to degrees Celcius.
+ def to_temp(self, value):
+ if value & 0x8000:
+ value = -((value ^ 0xffff) + 1)
+ temp = value / 256.0
+ return "%.1f C" % temp
+
+ # TX bias current in uA. Each increment represents 0.2uA
+ def to_current(self, value):
+ current = value / 500000.0
+ return "%.1f mA" % current
+
+ # Power in mW, with each increment representing 0.1uW
+ def to_power(self, value):
+ power = value / 10000.0
+ return "%.2f mW" % power
+
+ # Wavelength in increments of 0.05nm
+ def to_wavelength(self, value):
+ wl = value / 20
+ return "%d nm" % wl
+
+ # Wavelength in increments of 0.005nm
+ def to_wavelength_tolerance(self, value):
+ wl = value / 200.0
+ return "%.1f nm" % wl
+
+ def module_id(self, data):
+ self.annotate("Module identifier", MODULE_ID.get(data[0], "Unknown"))
+
+ def signal_cc(self, data):
+ # No good data available.
+ if (data[0] != 0x00):
+ self.annotate("Signal Conditioner Control", "%.2x" % data[0])
+
+ def alarm_warnings(self, data):
+ cnt_idx = self.cnt - len(data)
+ idx = 0
+ while idx < 56:
+ if idx == 8:
+ # Skip over reserved A/D flag thresholds
+ idx += 8
+ value = (data[idx] << 8) | data[idx + 1]
+ if value != 0:
+ name = ALARM_THRESHOLDS.get(idx, "...")
+ if idx in (0, 2, 4, 6):
+ self.annotate(name, self.to_temp(value),
+ cnt_idx + idx, cnt_idx + idx + 1)
+ elif idx in (16, 18, 20, 22):
+ self.annotate(name, self.to_current(value),
+ cnt_idx + idx, cnt_idx + idx + 1)
+ elif idx in (24, 26, 28, 30, 32, 34, 36, 38):
+ self.annotate(name, self.to_power(value),
+ cnt_idx + idx, cnt_idx + idx + 1)
+ else:
+ self.annotate(name, "%d" % name, value, cnt_idx + idx,
+ cnt_idx + idx + 1)
+ idx += 2
+
+ def vps(self, data):
+ # No good data available.
+ if (data != [0, 0]):
+ self.annotate("VPS", "%.2x%.2x" % (data[0], data[1]))
+
+ def ber(self, data):
+ # No good data available.
+ if (data != [0, 0]):
+ self.annotate("BER", str(data))
+
+ def wavelength_cr(self, data):
+ # No good data available.
+ if (data != [0, 0, 0, 0]):
+ self.annotate("WCR", str(data))
+
+ def fec_cr(self, data):
+ if (data != [0, 0, 0, 0]):
+ self.annotate("FEC", str(data))
+
+ def int_ctrl(self, data):
+ # No good data available. Also boring.
+ out = []
+ for d in data:
+ out.append("%.2x" % d)
+ self.annotate("Interrupt bits", ' '.join(out))
+
+ def ad_readout(self, data):
+ cnt_idx = self.cnt - len(data) + 1
+ idx = 0
+ while idx < 14:
+ if idx == 2:
+ # Skip over reserved field
+ idx += 2
+ value = (data[idx] << 8) | data[idx + 1]
+ name = AD_READOUTS.get(idx, "...")
+ if value != 0:
+ if idx == 0:
+ self.annotate(name, self.to_temp(value),
+ cnt_idx + idx, cnt_idx + idx + 1)
+ elif idx == 4:
+ self.annotate(name, self.to_current(value),
+ cnt_idx + idx, cnt_idx + idx + 1)
+ elif idx in (6, 8):
+ self.annotate(name, self.to_power(value),
+ cnt_idx + idx, cnt_idx + idx + 1)
+ else:
+ self.annotate(name, str(value), cnt_idx + idx,
+ cnt_idx + idx + 1)
+ idx += 2
+
+ def gcs(self, data):
+ allbits = (data[0] << 8) | data[1]
+ out = []
+ for b in range(13):
+ if allbits & 0x8000:
+ out.append(GCS_BITS[b])
+ allbits <<= 1
+ self.annotate("General Control/Status", ', '.join(out))
+
+ def page_select(self, data):
+ self.cur_highmem_page = data[0]
+
+ def ext_module_id(self, data):
+ out = ["Power level %d module" % ((data[0] >> 6) + 1)]
+ if data[0] & 0x20 == 0:
+ out.append("CDR")
+ if data[0] & 0x10 == 0:
+ out.append("TX ref clock input required")
+ if data[0] & 0x08 == 0:
+ self.have_clei = True
+ self.annotate("Extended id", ', '.join(out))
+
+ def connector(self, data):
+ if data[0] in CONNECTOR:
+ self.annotate("Connector", CONNECTOR[data[0]])
+
+ def transceiver(self, data):
+ out = []
+ for t in range(8):
+ if data[t] == 0:
+ continue
+ value = data[t]
+ for b in range(8):
+ if value & 0x80:
+ if len(TRANSCEIVER[t]) < b + 1:
+ out.append("(unknown)")
+ else:
+ out.append(TRANSCEIVER[t][b])
+ value <<= 1
+ self.annotate("Transceiver compliance", ', '.join(out))
+
+ def serial_encoding(self, data):
+ out = []
+ value = data[0]
+ for b in range(8):
+ if value & 0x80:
+ if len(SERIAL_ENCODING) < b + 1:
+ out.append("(unknown)")
+ else:
+ out.append(SERIAL_ENCODING[b])
+ value <<= 1
+ self.annotate("Serial encoding support", ', '.join(out))
+
+ def br_min(self, data):
+ # Increments represent 100Mb/s
+ rate = data[0] / 10.0
+ self.annotate("Minimum bit rate", "%.3f GB/s" % rate)
+
+ def br_max(self, data):
+ # Increments represent 100Mb/s
+ rate = data[0] / 10.0
+ self.annotate("Maximum bit rate", "%.3f GB/s" % rate)
+
+ def link_length_smf(self, data):
+ if data[0] == 0:
+ length = "(standard)"
+ elif data[0] == 255:
+ length = "> 254 km"
+ else:
+ length = "%d km" % data[0]
+ self.annotate("Link length (SMF)", length)
+
+ def link_length_e50(self, data):
+ if data[0] == 0:
+ length = "(standard)"
+ elif data[0] == 255:
+ length = "> 508 m"
+ else:
+ length = "%d m" % (data[0] * 2)
+ self.annotate("Link length (extended, 50μm MMF)", length)
+
+ def link_length_50um(self, data):
+ if data[0] == 0:
+ length = "(standard)"
+ elif data[0] == 255:
+ length = "> 254 m"
+ else:
+ length = "%d m" % data[0]
+ self.annotate("Link length (50μm MMF)", length)
+
+ def link_length_625um(self, data):
+ if data[0] == 0:
+ length = "(standard)"
+ elif data[0] == 255:
+ length = "> 254 m"
+ else:
+ length = "%d m" % (data[0])
+ self.annotate("Link length (62.5μm MMF)", length)
+
+ def link_length_copper(self, data):
+ if data[0] == 0:
+ length = "(unknown)"
+ elif data[0] == 255:
+ length = "> 254 m"
+ else:
+ length = "%d m" % (data[0] * 2)
+ self.annotate("Link length (copper)", length)
+
+ def device_tech(self, data):
+ out = []
+ xmit = data[0] >> 4
+ if xmit <= len(XMIT_TECH) - 1:
+ out.append("%s transmitter" % XMIT_TECH[xmit])
+ dev = data[0] & 0x0f
+ for b in range(4):
+ out.append(DEVICE_TECH[b][(dev >> (3 - b)) & 0x01])
+ self.annotate("Device technology", ', '.join(out))
+
+ def vendor(self, data):
+ name = bytes(data).strip().decode('ascii').strip('\x00')
+ if name:
+ self.annotate("Vendor", name)
+
+ def cdr(self, data):
+ out = []
+ value = data[0]
+ for b in range(8):
+ if value & 0x80:
+ out.append(CDR[b])
+ value <<= 1
+ self.annotate("CDR support", ', '.join(out))
+
+ def vendor_oui(self, data):
+ if data != [0, 0, 0]:
+ self.annotate("Vendor OUI", "%.2X-%.2X-%.2X" % tuple(data))
+
+ def vendor_pn(self, data):
+ name = bytes(data).strip().decode('ascii').strip('\x00')
+ if name:
+ self.annotate("Vendor part number", name)
+
+ def vendor_rev(self, data):
+ name = bytes(data).strip().decode('ascii').strip('\x00')
+ if name:
+ self.annotate("Vendor revision", name)
+
+ def wavelength(self, data):
+ value = (data[0] << 8) | data[1]
+ self.annotate("Wavelength", self.to_wavelength(value))
+
+ def wavelength_tolerance(self, data):
+ value = (data[0] << 8) | data[1]
+ self.annotate("Wavelength tolerance", self.to_wavelength_tolerance(value))
+
+ def max_case_temp(self, data):
+ self.annotate("Maximum case temperature", "%d C" % data[0])
+
+ def power_supply(self, data):
+ out = []
+ self.annotate("Max power dissipation",
+ "%.3f W" % (data[0] * 0.02), self.cnt - 3, self.cnt - 3)
+ self.annotate("Max power dissipation (powered down)",
+ "%.3f W" % (data[1] * 0.01), self.cnt - 2, self.cnt - 2)
+ value = (data[2] >> 4) * 0.050
+ self.annotate("Max current required (5V supply)",
+ "%.3f A" % value, self.cnt - 1, self.cnt - 1)
+ value = (data[2] & 0x0f) * 0.100
+ self.annotate("Max current required (3.3V supply)",
+ "%.3f A" % value, self.cnt - 1, self.cnt - 1)
+ value = (data[3] >> 4) * 0.100
+ self.annotate("Max current required (1.8V supply)",
+ "%.3f A" % value, self.cnt, self.cnt)
+ value = (data[3] & 0x0f) * 0.050
+ self.annotate("Max current required (-5.2V supply)",
+ "%.3f A" % value, self.cnt, self.cnt)
+
+ def vendor_sn(self, data):
+ name = bytes(data).strip().decode('ascii').strip('\x00')
+ if name:
+ self.annotate("Vendor serial number", name)
+
+ def manuf_date(self, data):
+ y = int(bytes(data[0:2])) + 2000
+ m = int(bytes(data[2:4]))
+ d = int(bytes(data[4:6]))
+ mnf = "%.4d-%.2d-%.2d" % (y, m, d)
+ lot = bytes(data[6:]).strip().decode('ascii').strip('\x00')
+ if lot:
+ mnf += " lot " + lot
+ self.annotate("Manufacturing date", mnf)
+
+ def diag_mon(self, data):
+ out = []
+ if data[0] & 0x10:
+ out.append("BER support")
+ else:
+ out.append("no BER support")
+ if data[0] & 0x08:
+ out.append("average power measurement")
+ else:
+ out.append("OMA power measurement")
+ self.annotate("Diagnostic monitoring", ', '.join(out))
+
+ def enhanced_opts(self, data):
+ out = []
+ value = data[0]
+ for b in range(8):
+ if value & 0x80:
+ out.append(ENHANCED_OPTS[b])
+ value <<= 1
+ self.annotate("Enhanced option support", ', '.join(out))
+
+ def aux_mon(self, data):
+ aux = AUX_TYPES[data[0] >> 4]
+ self.annotate("AUX1 monitoring", aux)
+ aux = AUX_TYPES[data[0] & 0x0f]
+ self.annotate("AUX2 monitoring", aux)
+
diff --git a/decoders/z80/__init__.py b/decoders/z80/__init__.py
new file mode 100644
index 0000000..aaf7c76
--- /dev/null
+++ b/decoders/z80/__init__.py
@@ -0,0 +1,35 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2014 Daniel Elstner <daniel.kitta at gmail.com>
+##
+## 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 <http://www.gnu.org/licenses/>.
+##
+
+'''
+The Zilog Z80 is an 8-bit microprocessor compatible with the Intel 8080.
+
+In addition to the 8-bit data bus, this decoder requires the input signals
+/M1 (machine cycle), /RD (read) and /WR (write) to do its work. An explicit
+clock signal is not required. However, the Z80 CPU clock may be used as
+sampling clock, if applicable.
+
+Notes on the Z80 opcode format and descriptions of both documented and
+"undocumented" opcodes are available here:
+
+ http://www.z80.info/decoding.htm
+ http://clrhome.org/table/
+'''
+
+from .pd import Decoder
diff --git a/decoders/z80/pd.py b/decoders/z80/pd.py
new file mode 100644
index 0000000..e0d7ae4
--- /dev/null
+++ b/decoders/z80/pd.py
@@ -0,0 +1,352 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2014 Daniel Elstner <daniel.kitta at gmail.com>
+##
+## 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 <http://www.gnu.org/licenses/>.
+##
+
+import sigrokdecode as srd
+from functools import reduce
+from .tables import instr_table_by_prefix
+import string
+
+class Ann:
+ ADDR, MEMRD, MEMWR, IORD, IOWR, INSTR, ROP, WOP, WARN = range(9)
+class Row:
+ ADDRBUS, DATABUS, INSTRUCTIONS, OPERANDS, WARNINGS = range(5)
+class Pin:
+ D0, D7 = 0, 7
+ M1, RD, WR, MREQ, IORQ = range(8, 13)
+ A0, A15 = 13, 28
+class Cycle:
+ NONE, MEMRD, MEMWR, IORD, IOWR, FETCH, INTACK = range(7)
+
+# Provide custom format type 'H' for hexadecimal output
+# with leading decimal digit (assembler syntax).
+class AsmFormatter(string.Formatter):
+ def format_field(self, value, format_spec):
+ if format_spec.endswith('H'):
+ result = format(value, format_spec[:-1] + 'X')
+ return result if result[0] in string.digits else '0' + result
+ else:
+ return format(value, format_spec)
+
+formatter = AsmFormatter()
+
+ann_data_cycle_map = {
+ Cycle.MEMRD: Ann.MEMRD,
+ Cycle.MEMWR: Ann.MEMWR,
+ Cycle.IORD: Ann.IORD,
+ Cycle.IOWR: Ann.IOWR,
+ Cycle.FETCH: Ann.MEMRD,
+ Cycle.INTACK: Ann.IORD,
+}
+
+def reduce_bus(bus):
+ if 0xFF in bus:
+ return None # unassigned bus channels
+ else:
+ return reduce(lambda a, b: (a << 1) | b, reversed(bus))
+
+def signed_byte(byte):
+ return byte if byte < 128 else byte - 256
+
+class Decoder(srd.Decoder):
+ api_version = 2
+ id = 'z80'
+ name = 'Z80'
+ longname = 'Zilog Z80 CPU'
+ desc = 'Zilog Z80 microprocessor disassembly.'
+ license = 'gplv3+'
+ inputs = ['logic']
+ outputs = ['z80']
+ channels = tuple({
+ 'id': 'd%d' % i,
+ 'name': 'D%d' % i,
+ 'desc': 'Data bus line %d' % i
+ } for i in range(8)
+ ) + (
+ {'id': 'm1', 'name': '/M1', 'desc': 'Machine cycle 1'},
+ {'id': 'rd', 'name': '/RD', 'desc': 'Memory or I/O read'},
+ {'id': 'wr', 'name': '/WR', 'desc': 'Memory or I/O write'},
+ )
+ optional_channels = (
+ {'id': 'mreq', 'name': '/MREQ', 'desc': 'Memory request'},
+ {'id': 'iorq', 'name': '/IORQ', 'desc': 'I/O request'},
+ ) + tuple({
+ 'id': 'a%d' % i,
+ 'name': 'A%d' % i,
+ 'desc': 'Address bus line %d' % i
+ } for i in range(16)
+ )
+ annotations = (
+ ('addr', 'Memory or I/O address'),
+ ('memrd', 'Byte read from memory'),
+ ('memwr', 'Byte written to memory'),
+ ('iord', 'Byte read from I/O port'),
+ ('iowr', 'Byte written to I/O port'),
+ ('instr', 'Z80 CPU instruction'),
+ ('rop', 'Value of input operand'),
+ ('wop', 'Value of output operand'),
+ ('warn', 'Warning message'),
+ )
+ annotation_rows = (
+ ('addrbus', 'Address bus', (Ann.ADDR,)),
+ ('databus', 'Data bus', (Ann.MEMRD, Ann.MEMWR, Ann.IORD, Ann.IOWR)),
+ ('instructions', 'Instructions', (Ann.INSTR,)),
+ ('operands', 'Operands', (Ann.ROP, Ann.WOP)),
+ ('warnings', 'Warnings', (Ann.WARN,))
+ )
+
+ def __init__(self, **kwargs):
+ self.prev_cycle = Cycle.NONE
+ self.op_state = self.state_IDLE
+
+ def start(self):
+ self.out_ann = self.register(srd.OUTPUT_ANN)
+ self.bus_data = None
+ self.samplenum = None
+ self.addr_start = None
+ self.data_start = None
+ self.dasm_start = None
+ self.pend_addr = None
+ self.pend_data = None
+ self.ann_data = None
+ self.ann_dasm = None
+ self.prev_cycle = Cycle.NONE
+ self.op_state = self.state_IDLE
+ self.instr_len = 0
+
+ def decode(self, ss, es, data):
+ for (self.samplenum, pins) in data:
+ cycle = Cycle.NONE
+ if pins[Pin.MREQ] != 1: # default to asserted
+ if pins[Pin.RD] == 0:
+ cycle = Cycle.FETCH if pins[Pin.M1] == 0 else Cycle.MEMRD
+ elif pins[Pin.WR] == 0:
+ cycle = Cycle.MEMWR
+ elif pins[Pin.IORQ] == 0: # default to not asserted
+ if pins[Pin.M1] == 0:
+ cycle = Cycle.INTACK
+ elif pins[Pin.RD] == 0:
+ cycle = Cycle.IORD
+ elif pins[Pin.WR] == 0:
+ cycle = Cycle.IOWR
+
+ if cycle != Cycle.NONE:
+ self.bus_data = reduce_bus(pins[Pin.D0:Pin.D7+1])
+ if cycle != self.prev_cycle:
+ if self.prev_cycle == Cycle.NONE:
+ self.on_cycle_begin(reduce_bus(pins[Pin.A0:Pin.A15+1]))
+ elif cycle == Cycle.NONE:
+ self.on_cycle_end()
+ else:
+ self.on_cycle_trans()
+ self.prev_cycle = cycle
+
+ def on_cycle_begin(self, bus_addr):
+ if self.pend_addr is not None:
+ self.put_text(self.addr_start, Ann.ADDR,
+ '{:04X}'.format(self.pend_addr))
+ self.addr_start = self.samplenum
+ self.pend_addr = bus_addr
+
+ def on_cycle_end(self):
+ self.instr_len += 1
+ self.op_state = self.op_state()
+ if self.ann_dasm is not None:
+ self.put_disasm()
+ if self.op_state == self.state_RESTART:
+ self.op_state = self.state_IDLE()
+
+ if self.ann_data is not None:
+ self.put_text(self.data_start, self.ann_data,
+ '{:02X}'.format(self.pend_data))
+ self.data_start = self.samplenum
+ self.pend_data = self.bus_data
+ self.ann_data = ann_data_cycle_map[self.prev_cycle]
+
+ def on_cycle_trans(self):
+ self.put_text(self.samplenum - 1, Ann.WARN,
+ 'Illegal transition between control states')
+ self.pend_addr = None
+ self.ann_data = None
+ self.ann_dasm = None
+
+ def put_disasm(self):
+ text = formatter.format(self.mnemonic, r=self.arg_reg, d=self.arg_dis,
+ j=self.arg_dis+self.instr_len, i=self.arg_imm,
+ ro=self.arg_read, wo=self.arg_write)
+ self.put_text(self.dasm_start, self.ann_dasm, text)
+ self.ann_dasm = None
+ self.dasm_start = self.samplenum
+
+ def put_text(self, ss, ann_idx, ann_text):
+ self.put(ss, self.samplenum, self.out_ann, [ann_idx, [ann_text]])
+
+ def state_RESTART(self):
+ return self.state_IDLE
+
+ def state_IDLE(self):
+ if self.prev_cycle != Cycle.FETCH:
+ return self.state_IDLE
+ self.want_dis = 0
+ self.want_imm = 0
+ self.want_read = 0
+ self.want_write = 0
+ self.want_wr_be = False
+ self.op_repeat = False
+ self.arg_dis = 0
+ self.arg_imm = 0
+ self.arg_read = 0
+ self.arg_write = 0
+ self.arg_reg = ''
+ self.mnemonic = ''
+ self.instr_pend = False
+ self.read_pend = False
+ self.write_pend = False
+ self.dasm_start = self.samplenum
+ self.op_prefix = 0
+ self.instr_len = 0
+ if self.bus_data in (0xCB, 0xED, 0xDD, 0xFD):
+ return self.state_PRE1
+ else:
+ return self.state_OPCODE
+
+ def state_PRE1(self):
+ if self.prev_cycle != Cycle.FETCH:
+ self.mnemonic = 'Prefix not followed by fetch'
+ self.ann_dasm = Ann.WARN
+ return self.state_RESTART
+ self.op_prefix = self.pend_data
+ if self.op_prefix in (0xDD, 0xFD):
+ if self.bus_data == 0xCB:
+ return self.state_PRE2
+ if self.bus_data in (0xDD, 0xED, 0xFD):
+ return self.state_PRE1
+ return self.state_OPCODE
+
+ def state_PRE2(self):
+ if self.prev_cycle != Cycle.MEMRD:
+ self.mnemonic = 'Missing displacement'
+ self.ann_dasm = Ann.WARN
+ return self.state_RESTART
+ self.op_prefix = (self.op_prefix << 8) | self.pend_data
+ return self.state_PREDIS
+
+ def state_PREDIS(self):
+ if self.prev_cycle != Cycle.MEMRD:
+ self.mnemonic = 'Missing opcode'
+ self.ann_dasm = Ann.WARN
+ return self.state_RESTART
+ self.arg_dis = signed_byte(self.pend_data)
+ return self.state_OPCODE
+
+ def state_OPCODE(self):
+ (table, self.arg_reg) = instr_table_by_prefix[self.op_prefix]
+ self.op_prefix = 0
+ instruction = table.get(self.pend_data, None)
+ if instruction is None:
+ self.mnemonic = 'Invalid instruction'
+ self.ann_dasm = Ann.WARN
+ return self.state_RESTART
+ (self.want_dis, self.want_imm, self.want_read, want_write,
+ self.op_repeat, self.mnemonic) = instruction
+ self.want_write = abs(want_write)
+ self.want_wr_be = (want_write < 0)
+ if self.want_dis > 0:
+ return self.state_POSTDIS
+ if self.want_imm > 0:
+ return self.state_IMM1
+ self.ann_dasm = Ann.INSTR
+ if self.want_read > 0 and self.prev_cycle in (Cycle.MEMRD, Cycle.IORD):
+ return self.state_ROP1
+ if self.want_write > 0 and self.prev_cycle in (Cycle.MEMWR, Cycle.IOWR):
+ return self.state_WOP1
+ return self.state_RESTART
+
+ def state_POSTDIS(self):
+ self.arg_dis = signed_byte(self.pend_data)
+ if self.want_imm > 0:
+ return self.state_IMM1
+ self.ann_dasm = Ann.INSTR
+ if self.want_read > 0 and self.prev_cycle in (Cycle.MEMRD, Cycle.IORD):
+ return self.state_ROP1
+ if self.want_write > 0 and self.prev_cycle in (Cycle.MEMWR, Cycle.IOWR):
+ return self.state_WOP1
+ return self.state_RESTART
+
+ def state_IMM1(self):
+ self.arg_imm = self.pend_data
+ if self.want_imm > 1:
+ return self.state_IMM2
+ self.ann_dasm = Ann.INSTR
+ if self.want_read > 0 and self.prev_cycle in (Cycle.MEMRD, Cycle.IORD):
+ return self.state_ROP1
+ if self.want_write > 0 and self.prev_cycle in (Cycle.MEMWR, Cycle.IOWR):
+ return self.state_WOP1
+ return self.state_RESTART
+
+ def state_IMM2(self):
+ self.arg_imm |= self.pend_data << 8
+ self.ann_dasm = Ann.INSTR
+ if self.want_read > 0 and self.prev_cycle in (Cycle.MEMRD, Cycle.IORD):
+ return self.state_ROP1
+ if self.want_write > 0 and self.prev_cycle in (Cycle.MEMWR, Cycle.IOWR):
+ return self.state_WOP1
+ return self.state_RESTART
+
+ def state_ROP1(self):
+ self.arg_read = self.pend_data
+ if self.want_read < 2:
+ self.mnemonic = '{ro:02X}'
+ self.ann_dasm = Ann.ROP
+ if self.want_write > 0:
+ return self.state_WOP1
+ if self.want_read > 1:
+ return self.state_ROP2
+ if self.op_repeat and self.prev_cycle in (Cycle.MEMRD, Cycle.IORD):
+ return self.state_ROP1
+ return self.state_RESTART
+
+ def state_ROP2(self):
+ self.arg_read |= self.pend_data << 8
+ self.mnemonic = '{ro:04X}'
+ self.ann_dasm = Ann.ROP
+ if self.want_write > 0 and self.prev_cycle in (Cycle.MEMWR, Cycle.IOWR):
+ return self.state_WOP1
+ return self.state_RESTART
+
+ def state_WOP1(self):
+ self.arg_write = self.pend_data
+ if self.want_read > 1:
+ return self.state_ROP2
+ if self.want_write > 1:
+ return self.state_WOP2
+ self.mnemonic = '{wo:02X}'
+ self.ann_dasm = Ann.WOP
+ if self.want_read > 0 and self.op_repeat and \
+ self.prev_cycle in (Cycle.MEMRD, Cycle.IORD):
+ return self.state_ROP1
+ return self.state_RESTART
+
+ def state_WOP2(self):
+ if self.want_wr_be:
+ self.arg_write = (self.arg_write << 8) | self.pend_data
+ else:
+ self.arg_write |= self.pend_data << 8
+ self.mnemonic = '{wo:04X}'
+ self.ann_dasm = Ann.WOP
+ return self.state_RESTART
diff --git a/decoders/z80/tables.py b/decoders/z80/tables.py
new file mode 100644
index 0000000..ec77dae
--- /dev/null
+++ b/decoders/z80/tables.py
@@ -0,0 +1,1083 @@
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2014 Daniel Elstner <daniel.kitta at gmail.com>
+##
+## 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 <http://www.gnu.org/licenses/>.
+##
+
+'''
+Instruction tuple: (d, i, ro, wo, rep, format string)
+
+ The placeholders d and i are the number of bytes in the instruction
+ used for the displacement and the immediate operand, respectively. An
+ operand consisting of more than one byte is assembled in little endian
+ order.
+ The placeholders ro and wo are the number of bytes the instruction
+ is expected to read or write, respectively. These counts are used
+ for both memory and I/O access, but not for immediate operands.
+ A negative value indicates that the operand byte order is big endian
+ rather than the usual little endian.
+ The placeholder rep is a boolean used to mark repeating instructions.
+ The format string should refer to the {d} and {i} operands by name.
+ Displacements are interpreted as signed integers, whereas immediate
+ operands are always read as unsigned. The tables for instructions
+ operating on the IX/IY index registers additionally use {r} in the
+ format string as a placeholder for the register name.
+ Relative jump instructions may specify {j} instead of {d} to output
+ the displacement relative to the start of the instruction.
+'''
+
+# Instructions without a prefix
+main_instructions = {
+ 0x00: (0, 0, 0, 0, False, 'NOP'),
+ 0x01: (0, 2, 0, 0, False, 'LD BC,{i:04H}h'),
+ 0x02: (0, 0, 0, 1, False, 'LD (BC),A'),
+ 0x03: (0, 0, 0, 0, False, 'INC BC'),
+ 0x04: (0, 0, 0, 0, False, 'INC B'),
+ 0x05: (0, 0, 0, 0, False, 'DEC B'),
+ 0x06: (0, 1, 0, 0, False, 'LD B,{i:02H}h'),
+ 0x07: (0, 0, 0, 0, False, 'RLCA'),
+ 0x08: (0, 0, 0, 0, False, 'EX AF,AF\''),
+ 0x09: (0, 0, 0, 0, False, 'ADD HL,BC'),
+ 0x0A: (0, 0, 1, 0, False, 'LD A,(BC)'),
+ 0x0B: (0, 0, 0, 0, False, 'DEC BC'),
+ 0x0C: (0, 0, 0, 0, False, 'INC C'),
+ 0x0D: (0, 0, 0, 0, False, 'DEC C'),
+ 0x0E: (0, 1, 0, 0, False, 'LD C,{i:02H}h'),
+ 0x0F: (0, 0, 0, 0, False, 'RRCA'),
+
+ 0x10: (1, 0, 0, 0, False, 'DJNZ ${j:+d}'),
+ 0x11: (0, 2, 0, 0, False, 'LD DE,{i:04H}h'),
+ 0x12: (0, 0, 0, 1, False, 'LD (DE),A'),
+ 0x13: (0, 0, 0, 0, False, 'INC DE'),
+ 0x14: (0, 0, 0, 0, False, 'INC D'),
+ 0x15: (0, 0, 0, 0, False, 'DEC D'),
+ 0x16: (0, 1, 0, 0, False, 'LD D,{i:02H}h'),
+ 0x17: (0, 0, 0, 0, False, 'RLA'),
+ 0x18: (1, 0, 0, 0, False, 'JR ${j:+d}'),
+ 0x19: (0, 0, 0, 0, False, 'ADD HL,DE'),
+ 0x1A: (0, 0, 1, 0, False, 'LD A,(DE)'),
+ 0x1B: (0, 0, 0, 0, False, 'DEC DE'),
+ 0x1C: (0, 0, 0, 0, False, 'INC E'),
+ 0x1D: (0, 0, 0, 0, False, 'DEC E'),
+ 0x1E: (0, 1, 0, 0, False, 'LD E,{i:02H}h'),
+ 0x1F: (0, 0, 0, 0, False, 'RRA'),
+
+ 0x20: (1, 0, 0, 0, False, 'JR NZ,${j:+d}'),
+ 0x21: (0, 2, 0, 0, False, 'LD HL,{i:04H}h'),
+ 0x22: (0, 2, 0, 2, False, 'LD ({i:04H}h),HL'),
+ 0x23: (0, 0, 0, 0, False, 'INC HL'),
+ 0x24: (0, 0, 0, 0, False, 'INC H'),
+ 0x25: (0, 0, 0, 0, False, 'DEC H'),
+ 0x26: (0, 1, 0, 0, False, 'LD H,{i:02H}h'),
+ 0x27: (0, 0, 0, 0, False, 'DAA'),
+ 0x28: (1, 0, 0, 0, False, 'JR Z,${j:+d}'),
+ 0x29: (0, 0, 0, 0, False, 'ADD HL,HL'),
+ 0x2A: (0, 2, 2, 0, False, 'LD HL,({i:04H}h)'),
+ 0x2B: (0, 0, 0, 0, False, 'DEC HL'),
+ 0x2C: (0, 0, 0, 0, False, 'INC L'),
+ 0x2D: (0, 0, 0, 0, False, 'DEC L'),
+ 0x2E: (0, 1, 0, 0, False, 'LD L,{i:02H}h'),
+ 0x2F: (0, 0, 0, 0, False, 'CPL'),
+
+ 0x30: (1, 0, 0, 0, False, 'JR NC,${j:+d}'),
+ 0x31: (0, 2, 0, 0, False, 'LD SP,{i:04H}h'),
+ 0x32: (0, 2, 0, 1, False, 'LD ({i:04H}h),A'),
+ 0x33: (0, 0, 0, 0, False, 'INC SP'),
+ 0x34: (0, 0, 1, 1, False, 'INC (HL)'),
+ 0x35: (0, 0, 1, 1, False, 'DEC (HL)'),
+ 0x36: (0, 1, 0, 1, False, 'LD (HL),{i:02H}h'),
+ 0x37: (0, 0, 0, 0, False, 'SCF'),
+ 0x38: (1, 0, 0, 0, False, 'JR C,${j:+d}'),
+ 0x39: (0, 0, 0, 0, False, 'ADD HL,SP'),
+ 0x3A: (0, 2, 1, 0, False, 'LD A,({i:04H}h)'),
+ 0x3B: (0, 0, 0, 0, False, 'DEC SP'),
+ 0x3C: (0, 0, 0, 0, False, 'INC A'),
+ 0x3D: (0, 0, 0, 0, False, 'DEC A'),
+ 0x3E: (0, 1, 0, 0, False, 'LD A,{i:02H}h'),
+ 0x3F: (0, 0, 0, 0, False, 'CCF'),
+
+ 0x40: (0, 0, 0, 0, False, 'LD B,B'),
+ 0x41: (0, 0, 0, 0, False, 'LD B,C'),
+ 0x42: (0, 0, 0, 0, False, 'LD B,D'),
+ 0x43: (0, 0, 0, 0, False, 'LD B,E'),
+ 0x44: (0, 0, 0, 0, False, 'LD B,H'),
+ 0x45: (0, 0, 0, 0, False, 'LD B,L'),
+ 0x46: (0, 0, 1, 0, False, 'LD B,(HL)'),
+ 0x47: (0, 0, 0, 0, False, 'LD B,A'),
+ 0x48: (0, 0, 0, 0, False, 'LD C,B'),
+ 0x49: (0, 0, 0, 0, False, 'LD C,C'),
+ 0x4A: (0, 0, 0, 0, False, 'LD C,D'),
+ 0x4B: (0, 0, 0, 0, False, 'LD C,E'),
+ 0x4C: (0, 0, 0, 0, False, 'LD C,H'),
+ 0x4D: (0, 0, 0, 0, False, 'LD C,L'),
+ 0x4E: (0, 0, 1, 0, False, 'LD C,(HL)'),
+ 0x4F: (0, 0, 0, 0, False, 'LD C,A'),
+
+ 0x50: (0, 0, 0, 0, False, 'LD D,B'),
+ 0x51: (0, 0, 0, 0, False, 'LD D,C'),
+ 0x52: (0, 0, 0, 0, False, 'LD D,D'),
+ 0x53: (0, 0, 0, 0, False, 'LD D,E'),
+ 0x54: (0, 0, 0, 0, False, 'LD D,H'),
+ 0x55: (0, 0, 0, 0, False, 'LD D,L'),
+ 0x56: (0, 0, 1, 0, False, 'LD D,(HL)'),
+ 0x57: (0, 0, 0, 0, False, 'LD D,A'),
+ 0x58: (0, 0, 0, 0, False, 'LD E,B'),
+ 0x59: (0, 0, 0, 0, False, 'LD E,C'),
+ 0x5A: (0, 0, 0, 0, False, 'LD E,D'),
+ 0x5B: (0, 0, 0, 0, False, 'LD E,E'),
+ 0x5C: (0, 0, 0, 0, False, 'LD E,H'),
+ 0x5D: (0, 0, 0, 0, False, 'LD E,L'),
+ 0x5E: (0, 0, 1, 0, False, 'LD E,(HL)'),
+ 0x5F: (0, 0, 0, 0, False, 'LD E,A'),
+
+ 0x60: (0, 0, 0, 0, False, 'LD H,B'),
+ 0x61: (0, 0, 0, 0, False, 'LD H,C'),
+ 0x62: (0, 0, 0, 0, False, 'LD H,D'),
+ 0x63: (0, 0, 0, 0, False, 'LD H,E'),
+ 0x64: (0, 0, 0, 0, False, 'LD H,H'),
+ 0x65: (0, 0, 0, 0, False, 'LD H,L'),
+ 0x66: (0, 0, 1, 0, False, 'LD H,(HL)'),
+ 0x67: (0, 0, 0, 0, False, 'LD H,A'),
+ 0x68: (0, 0, 0, 0, False, 'LD L,B'),
+ 0x69: (0, 0, 0, 0, False, 'LD L,C'),
+ 0x6A: (0, 0, 0, 0, False, 'LD L,D'),
+ 0x6B: (0, 0, 0, 0, False, 'LD L,E'),
+ 0x6C: (0, 0, 0, 0, False, 'LD L,H'),
+ 0x6D: (0, 0, 0, 0, False, 'LD L,L'),
+ 0x6E: (0, 0, 1, 0, False, 'LD L,(HL)'),
+ 0x6F: (0, 0, 0, 0, False, 'LD L,A'),
+
+ 0x70: (0, 0, 0, 1, False, 'LD (HL),B'),
+ 0x71: (0, 0, 0, 1, False, 'LD (HL),C'),
+ 0x72: (0, 0, 0, 1, False, 'LD (HL),D'),
+ 0x73: (0, 0, 0, 1, False, 'LD (HL),E'),
+ 0x74: (0, 0, 0, 1, False, 'LD (HL),H'),
+ 0x75: (0, 0, 0, 1, False, 'LD (HL),L'),
+ 0x76: (0, 0, 0, 0, False, 'HALT'),
+ 0x77: (0, 0, 0, 1, False, 'LD (HL),A'),
+ 0x78: (0, 0, 0, 0, False, 'LD A,B'),
+ 0x79: (0, 0, 0, 0, False, 'LD A,C'),
+ 0x7A: (0, 0, 0, 0, False, 'LD A,D'),
+ 0x7B: (0, 0, 0, 0, False, 'LD A,E'),
+ 0x7C: (0, 0, 0, 0, False, 'LD A,H'),
+ 0x7D: (0, 0, 0, 0, False, 'LD A,L'),
+ 0x7E: (0, 0, 1, 0, False, 'LD A,(HL)'),
+ 0x7F: (0, 0, 0, 0, False, 'LD A,A'),
+
+ 0x80: (0, 0, 0, 0, False, 'ADD A,B'),
+ 0x81: (0, 0, 0, 0, False, 'ADD A,C'),
+ 0x82: (0, 0, 0, 0, False, 'ADD A,D'),
+ 0x83: (0, 0, 0, 0, False, 'ADD A,E'),
+ 0x84: (0, 0, 0, 0, False, 'ADD A,H'),
+ 0x85: (0, 0, 0, 0, False, 'ADD A,L'),
+ 0x86: (0, 0, 1, 0, False, 'ADD A,(HL)'),
+ 0x87: (0, 0, 0, 0, False, 'ADD A,A'),
+ 0x88: (0, 0, 0, 0, False, 'ADC A,B'),
+ 0x89: (0, 0, 0, 0, False, 'ADC A,C'),
+ 0x8A: (0, 0, 0, 0, False, 'ADC A,D'),
+ 0x8B: (0, 0, 0, 0, False, 'ADC A,E'),
+ 0x8C: (0, 0, 0, 0, False, 'ADC A,H'),
+ 0x8D: (0, 0, 0, 0, False, 'ADC A,L'),
+ 0x8E: (0, 0, 1, 0, False, 'ADC A,(HL)'),
+ 0x8F: (0, 0, 0, 0, False, 'ADC A,A'),
+
+ 0x90: (0, 0, 0, 0, False, 'SUB B'),
+ 0x91: (0, 0, 0, 0, False, 'SUB C'),
+ 0x92: (0, 0, 0, 0, False, 'SUB D'),
+ 0x93: (0, 0, 0, 0, False, 'SUB E'),
+ 0x94: (0, 0, 0, 0, False, 'SUB H'),
+ 0x95: (0, 0, 0, 0, False, 'SUB L'),
+ 0x96: (0, 0, 1, 0, False, 'SUB (HL)'),
+ 0x97: (0, 0, 0, 0, False, 'SUB A'),
+ 0x98: (0, 0, 0, 0, False, 'SBC A,B'),
+ 0x99: (0, 0, 0, 0, False, 'SBC A,C'),
+ 0x9A: (0, 0, 0, 0, False, 'SBC A,D'),
+ 0x9B: (0, 0, 0, 0, False, 'SBC A,E'),
+ 0x9C: (0, 0, 0, 0, False, 'SBC A,H'),
+ 0x9D: (0, 0, 0, 0, False, 'SBC A,L'),
+ 0x9E: (0, 0, 1, 0, False, 'SBC A,(HL)'),
+ 0x9F: (0, 0, 0, 0, False, 'SBC A,A'),
+
+ 0xA0: (0, 0, 0, 0, False, 'AND B'),
+ 0xA1: (0, 0, 0, 0, False, 'AND C'),
+ 0xA2: (0, 0, 0, 0, False, 'AND D'),
+ 0xA3: (0, 0, 0, 0, False, 'AND E'),
+ 0xA4: (0, 0, 0, 0, False, 'AND H'),
+ 0xA5: (0, 0, 0, 0, False, 'AND L'),
+ 0xA6: (0, 0, 1, 0, False, 'AND (HL)'),
+ 0xA7: (0, 0, 0, 0, False, 'AND A'),
+ 0xA8: (0, 0, 0, 0, False, 'XOR B'),
+ 0xA9: (0, 0, 0, 0, False, 'XOR C'),
+ 0xAA: (0, 0, 0, 0, False, 'XOR D'),
+ 0xAB: (0, 0, 0, 0, False, 'XOR E'),
+ 0xAC: (0, 0, 0, 0, False, 'XOR H'),
+ 0xAD: (0, 0, 0, 0, False, 'XOR L'),
+ 0xAE: (0, 0, 1, 0, False, 'XOR (HL)'),
+ 0xAF: (0, 0, 0, 0, False, 'XOR A'),
+
+ 0xB0: (0, 0, 0, 0, False, 'OR B'),
+ 0xB1: (0, 0, 0, 0, False, 'OR C'),
+ 0xB2: (0, 0, 0, 0, False, 'OR D'),
+ 0xB3: (0, 0, 0, 0, False, 'OR E'),
+ 0xB4: (0, 0, 0, 0, False, 'OR H'),
+ 0xB5: (0, 0, 0, 0, False, 'OR L'),
+ 0xB6: (0, 0, 1, 0, False, 'OR (HL)'),
+ 0xB7: (0, 0, 0, 0, False, 'OR A'),
+ 0xB8: (0, 0, 0, 0, False, 'CP B'),
+ 0xB9: (0, 0, 0, 0, False, 'CP C'),
+ 0xBA: (0, 0, 0, 0, False, 'CP D'),
+ 0xBB: (0, 0, 0, 0, False, 'CP E'),
+ 0xBC: (0, 0, 0, 0, False, 'CP H'),
+ 0xBD: (0, 0, 0, 0, False, 'CP L'),
+ 0xBE: (0, 0, 1, 0, False, 'CP (HL)'),
+ 0xBF: (0, 0, 0, 0, False, 'CP A'),
+
+ 0xC0: (0, 0, 2, 0, False, 'RET NZ'),
+ 0xC1: (0, 0, 2, 0, False, 'POP BC'),
+ 0xC2: (0, 2, 0, 0, False, 'JP NZ,{i:04H}h'),
+ 0xC3: (0, 2, 0, 0, False, 'JP {i:04H}h'),
+ 0xC4: (0, 2, 0,-2, False, 'CALL NZ,{i:04H}h'),
+ 0xC5: (0, 0, 0,-2, False, 'PUSH BC'),
+ 0xC6: (0, 1, 0, 0, False, 'ADD A,{i:02H}h'),
+ 0xC7: (0, 0, 0,-2, False, 'RST 00h'),
+ 0xC8: (0, 0, 2, 0, False, 'RET Z'),
+ 0xC9: (0, 0, 2, 0, False, 'RET'),
+ 0xCA: (0, 2, 0, 0, False, 'JP Z,{i:04H}h'),
+
+ 0xCC: (0, 2, 0,-2, False, 'CALL Z,{i:04H}h'),
+ 0xCD: (0, 2, 0,-2, False, 'CALL {i:04H}h'),
+ 0xCE: (0, 1, 0, 0, False, 'ADC A,{i:02H}h'),
+ 0xCF: (0, 0, 0,-2, False, 'RST 08h'),
+
+ 0xD0: (0, 0, 2, 0, False, 'RET NC'),
+ 0xD1: (0, 0, 2, 0, False, 'POP DE'),
+ 0xD2: (0, 2, 0, 0, False, 'JP NC,{i:04H}h'),
+ 0xD3: (0, 1, 0, 1, False, 'OUT ({i:02H}h),A'),
+ 0xD4: (0, 2, 0,-2, False, 'CALL NC,{i:04H}h'),
+ 0xD5: (0, 0, 0,-2, False, 'PUSH DE'),
+ 0xD6: (0, 1, 0, 0, False, 'SUB {i:02H}h'),
+ 0xD7: (0, 0, 0,-2, False, 'RST 10h'),
+ 0xD8: (0, 0, 2, 0, False, 'RET C'),
+ 0xD9: (0, 0, 0, 0, False, 'EXX'),
+ 0xDA: (0, 2, 0, 0, False, 'JP C,{i:04H}h'),
+ 0xDB: (0, 1, 1, 0, False, 'IN A,({i:02H}h)'),
+ 0xDC: (0, 2, 0,-2, False, 'CALL C,{i:04H}h'),
+
+ 0xDE: (0, 1, 0, 0, False, 'SBC A,{i:02H}h'),
+ 0xDF: (0, 0, 0,-2, False, 'RST 18h'),
+
+ 0xE0: (0, 0, 2, 0, False, 'RET PO'),
+ 0xE1: (0, 0, 2, 0, False, 'POP HL'),
+ 0xE2: (0, 2, 0, 0, False, 'JP PO,{i:04H}h'),
+ 0xE3: (0, 0, 2, 2, False, 'EX (SP),HL'),
+ 0xE4: (0, 2, 0,-2, False, 'CALL PO,{i:04H}h'),
+ 0xE5: (0, 0, 0,-2, False, 'PUSH HL'),
+ 0xE6: (0, 1, 0, 0, False, 'AND {i:02H}h'),
+ 0xE7: (0, 0, 0,-2, False, 'RST 20h'),
+ 0xE8: (0, 0, 2, 0, False, 'RET PE'),
+ 0xE9: (0, 0, 0, 0, False, 'JP (HL)'),
+ 0xEA: (0, 2, 0, 0, False, 'JP PE,{i:04H}h'),
+ 0xEB: (0, 0, 0, 0, False, 'EX DE,HL'),
+ 0xEC: (0, 2, 0,-2, False, 'CALL PE,{i:04H}h'),
+
+ 0xEE: (0, 1, 0, 0, False, 'XOR {i:02H}h'),
+ 0xEF: (0, 0, 0,-2, False, 'RST 28h'),
+
+ 0xF0: (0, 0, 2, 0, False, 'RET P'),
+ 0xF1: (0, 0, 2, 0, False, 'POP AF'),
+ 0xF2: (0, 2, 0, 0, False, 'JP P,{i:04H}h'),
+ 0xF3: (0, 0, 0, 0, False, 'DI'),
+ 0xF4: (0, 2, 0,-2, False, 'CALL P,{i:04H}h'),
+ 0xF5: (0, 0, 0,-2, False, 'PUSH AF'),
+ 0xF6: (0, 1, 0, 0, False, 'OR {i:02H}h'),
+ 0xF7: (0, 0, 0,-2, False, 'RST 30h'),
+ 0xF8: (0, 0, 2, 0, False, 'RET M'),
+ 0xF9: (0, 0, 0, 0, False, 'LD SP,HL'),
+ 0xFA: (0, 2, 0, 0, False, 'JP M,{i:04H}h'),
+ 0xFB: (0, 0, 0, 0, False, 'EI'),
+ 0xFC: (0, 2, 0,-2, False, 'CALL M,{i:04H}h'),
+
+ 0xFE: (0, 1, 0, 0, False, 'CP {i:02H}h'),
+ 0xFF: (0, 0, 0,-2, False, 'RST 38h')
+}
+
+# Instructions with ED prefix
+extended_instructions = {
+ 0x40: (0, 0, 1, 0, False, 'IN B,(C)'),
+ 0x41: (0, 0, 0, 1, False, 'OUT (C),B'),
+ 0x42: (0, 0, 0, 0, False, 'SBC HL,BC'),
+ 0x43: (0, 2, 0, 2, False, 'LD ({i:04H}h),BC'),
+ 0x44: (0, 0, 0, 0, False, 'NEG'),
+ 0x45: (0, 0, 2, 0, False, 'RETN'),
+ 0x46: (0, 0, 0, 0, False, 'IM 0'),
+ 0x47: (0, 0, 0, 0, False, 'LD I,A'),
+ 0x48: (0, 0, 1, 0, False, 'IN C,(C)'),
+ 0x49: (0, 0, 0, 1, False, 'OUT (C),C'),
+ 0x4A: (0, 0, 0, 0, False, 'ADC HL,BC'),
+ 0x4B: (0, 2, 2, 0, False, 'LD BC,({i:04H}h)'),
+ 0x4C: (0, 0, 0, 0, False, 'NEG'),
+ 0x4D: (0, 0, 2, 0, False, 'RETI'),
+ 0x4E: (0, 0, 0, 0, False, 'IM 0/1'),
+ 0x4F: (0, 0, 0, 0, False, 'LD R,A'),
+
+ 0x50: (0, 0, 1, 0, False, 'IN D,(C)'),
+ 0x51: (0, 0, 0, 1, False, 'OUT (C),D'),
+ 0x52: (0, 0, 0, 0, False, 'SBC HL,DE'),
+ 0x53: (0, 2, 0, 2, False, 'LD ({i:04H}h),DE'),
+ 0x54: (0, 0, 0, 0, False, 'NEG'),
+ 0x55: (0, 0, 2, 0, False, 'RETN'),
+ 0x56: (0, 0, 0, 0, False, 'IM 1'),
+ 0x57: (0, 0, 0, 0, False, 'LD A,I'),
+ 0x58: (0, 0, 1, 0, False, 'IN E,(C)'),
+ 0x59: (0, 0, 0, 1, False, 'OUT (C),E'),
+ 0x5A: (0, 0, 0, 0, False, 'ADC HL,DE'),
+ 0x5B: (0, 2, 2, 0, False, 'LD DE,({i:04H}h)'),
+ 0x5C: (0, 0, 0, 0, False, 'NEG'),
+ 0x5D: (0, 0, 2, 0, False, 'RETN'),
+ 0x5E: (0, 0, 0, 0, False, 'IM 2'),
+ 0x5F: (0, 0, 0, 0, False, 'LD A,R'),
+
+ 0x60: (0, 0, 1, 0, False, 'IN H,(C)'),
+ 0x61: (0, 0, 0, 1, False, 'OUT (C),H'),
+ 0x62: (0, 0, 0, 0, False, 'SBC HL,HL'),
+ 0x63: (0, 2, 0, 2, False, 'LD ({i:04H}h),HL'),
+ 0x64: (0, 0, 0, 0, False, 'NEG'),
+ 0x65: (0, 0, 2, 0, False, 'RETN'),
+ 0x66: (0, 0, 0, 0, False, 'IM 0'),
+ 0x67: (0, 0, 1, 1, False, 'RRD'),
+ 0x68: (0, 0, 1, 0, False, 'IN L,(C)'),
+ 0x69: (0, 0, 0, 1, False, 'OUT (C),L'),
+ 0x6A: (0, 0, 0, 0, False, 'ADC HL,HL'),
+ 0x6B: (0, 2, 2, 0, False, 'LD HL,({i:04H}h)'),
+ 0x6C: (0, 0, 0, 0, False, 'NEG'),
+ 0x6D: (0, 0, 2, 0, False, 'RETN'),
+ 0x6E: (0, 0, 0, 0, False, 'IM 0/1'),
+ 0x6F: (0, 0, 1, 1, False, 'RLD'),
+
+ 0x70: (0, 0, 1, 0, False, 'IN (C)'),
+ 0x71: (0, 0, 0, 1, False, 'OUT (C),0'),
+ 0x72: (0, 0, 0, 0, False, 'SBC HL,SP'),
+ 0x73: (0, 2, 0, 2, False, 'LD ({i:04H}h),SP'),
+ 0x74: (0, 0, 0, 0, False, 'NEG'),
+ 0x75: (0, 0, 2, 0, False, 'RETN'),
+ 0x76: (0, 0, 0, 0, False, 'IM 1'),
+
+ 0x78: (0, 0, 1, 0, False, 'IN A,(C)'),
+ 0x79: (0, 0, 0, 1, False, 'OUT (C),A'),
+ 0x7A: (0, 0, 0, 0, False, 'ADC HL,SP'),
+ 0x7B: (0, 2, 2, 0, False, 'LD SP,({i:04H}h)'),
+ 0x7C: (0, 0, 0, 0, False, 'NEG'),
+ 0x7D: (0, 0, 2, 0, False, 'RETN'),
+ 0x7E: (0, 0, 0, 0, False, 'IM 2'),
+
+ 0xA0: (0, 0, 1, 1, False, 'LDI'),
+ 0xA1: (0, 0, 1, 0, False, 'CPI'),
+ 0xA2: (0, 0, 1, 1, False, 'INI'),
+ 0xA3: (0, 0, 1, 1, False, 'OUTI'),
+
+ 0xA8: (0, 0, 1, 1, False, 'LDD'),
+ 0xA9: (0, 0, 1, 0, False, 'CPD'),
+ 0xAA: (0, 0, 1, 1, False, 'IND'),
+ 0xAB: (0, 0, 1, 1, False, 'OUTD'),
+
+ 0xB0: (0, 0, 1, 1, True, 'LDIR'),
+ 0xB1: (0, 0, 1, 0, True, 'CPIR'),
+ 0xB2: (0, 0, 1, 1, True, 'INIR'),
+ 0xB3: (0, 0, 1, 1, True, 'OTIR'),
+
+ 0xB8: (0, 0, 1, 1, True, 'LDDR'),
+ 0xB9: (0, 0, 1, 0, True, 'CPDR'),
+ 0xBA: (0, 0, 1, 1, True, 'INDR'),
+ 0xBB: (0, 0, 1, 1, True, 'OTDR')
+}
+
+# Instructions with CB prefix
+bit_instructions = {
+ 0x00: (0, 0, 0, 0, False, 'RLC B'),
+ 0x01: (0, 0, 0, 0, False, 'RLC C'),
+ 0x02: (0, 0, 0, 0, False, 'RLC D'),
+ 0x03: (0, 0, 0, 0, False, 'RLC E'),
+ 0x04: (0, 0, 0, 0, False, 'RLC H'),
+ 0x05: (0, 0, 0, 0, False, 'RLC L'),
+ 0x06: (0, 0, 1, 1, False, 'RLC (HL)'),
+ 0x07: (0, 0, 0, 0, False, 'RLC A'),
+ 0x08: (0, 0, 0, 0, False, 'RRC B'),
+ 0x09: (0, 0, 0, 0, False, 'RRC C'),
+ 0x0A: (0, 0, 0, 0, False, 'RRC D'),
+ 0x0B: (0, 0, 0, 0, False, 'RRC E'),
+ 0x0C: (0, 0, 0, 0, False, 'RRC H'),
+ 0x0D: (0, 0, 0, 0, False, 'RRC L'),
+ 0x0E: (0, 0, 1, 1, False, 'RRC (HL)'),
+ 0x0F: (0, 0, 0, 0, False, 'RRC A'),
+
+ 0x10: (0, 0, 0, 0, False, 'RL B'),
+ 0x11: (0, 0, 0, 0, False, 'RL C'),
+ 0x12: (0, 0, 0, 0, False, 'RL D'),
+ 0x13: (0, 0, 0, 0, False, 'RL E'),
+ 0x14: (0, 0, 0, 0, False, 'RL H'),
+ 0x15: (0, 0, 0, 0, False, 'RL L'),
+ 0x16: (0, 0, 1, 1, False, 'RL (HL)'),
+ 0x17: (0, 0, 0, 0, False, 'RL A'),
+ 0x18: (0, 0, 0, 0, False, 'RR B'),
+ 0x19: (0, 0, 0, 0, False, 'RR C'),
+ 0x1A: (0, 0, 0, 0, False, 'RR D'),
+ 0x1B: (0, 0, 0, 0, False, 'RR E'),
+ 0x1C: (0, 0, 0, 0, False, 'RR H'),
+ 0x1D: (0, 0, 0, 0, False, 'RR L'),
+ 0x1E: (0, 0, 1, 1, False, 'RR (HL)'),
+ 0x1F: (0, 0, 0, 0, False, 'RR A'),
+
+ 0x20: (0, 0, 0, 0, False, 'SLA B'),
+ 0x21: (0, 0, 0, 0, False, 'SLA C'),
+ 0x22: (0, 0, 0, 0, False, 'SLA D'),
+ 0x23: (0, 0, 0, 0, False, 'SLA E'),
+ 0x24: (0, 0, 0, 0, False, 'SLA H'),
+ 0x25: (0, 0, 0, 0, False, 'SLA L'),
+ 0x26: (0, 0, 1, 1, False, 'SLA (HL)'),
+ 0x27: (0, 0, 0, 0, False, 'SLA A'),
+ 0x28: (0, 0, 0, 0, False, 'SRA B'),
+ 0x29: (0, 0, 0, 0, False, 'SRA C'),
+ 0x2A: (0, 0, 0, 0, False, 'SRA D'),
+ 0x2B: (0, 0, 0, 0, False, 'SRA E'),
+ 0x2C: (0, 0, 0, 0, False, 'SRA H'),
+ 0x2D: (0, 0, 0, 0, False, 'SRA L'),
+ 0x2E: (0, 0, 1, 1, False, 'SRA (HL)'),
+ 0x2F: (0, 0, 0, 0, False, 'SRA A'),
+
+ 0x30: (0, 0, 0, 0, False, 'SLL B'),
+ 0x31: (0, 0, 0, 0, False, 'SLL C'),
+ 0x32: (0, 0, 0, 0, False, 'SLL D'),
+ 0x33: (0, 0, 0, 0, False, 'SLL E'),
+ 0x34: (0, 0, 0, 0, False, 'SLL H'),
+ 0x35: (0, 0, 0, 0, False, 'SLL L'),
+ 0x36: (0, 0, 1, 1, False, 'SLL (HL)'),
+ 0x37: (0, 0, 0, 0, False, 'SLL A'),
+ 0x38: (0, 0, 0, 0, False, 'SRL B'),
+ 0x39: (0, 0, 0, 0, False, 'SRL C'),
+ 0x3A: (0, 0, 0, 0, False, 'SRL D'),
+ 0x3B: (0, 0, 0, 0, False, 'SRL E'),
+ 0x3C: (0, 0, 0, 0, False, 'SRL H'),
+ 0x3D: (0, 0, 0, 0, False, 'SRL L'),
+ 0x3E: (0, 0, 1, 1, False, 'SRL (HL)'),
+ 0x3F: (0, 0, 0, 0, False, 'SRL A'),
+
+ 0x40: (0, 0, 0, 0, False, 'BIT 0,B'),
+ 0x41: (0, 0, 0, 0, False, 'BIT 0,C'),
+ 0x42: (0, 0, 0, 0, False, 'BIT 0,D'),
+ 0x43: (0, 0, 0, 0, False, 'BIT 0,E'),
+ 0x44: (0, 0, 0, 0, False, 'BIT 0,H'),
+ 0x45: (0, 0, 0, 0, False, 'BIT 0,L'),
+ 0x46: (0, 0, 1, 0, False, 'BIT 0,(HL)'),
+ 0x47: (0, 0, 0, 0, False, 'BIT 0,A'),
+ 0x48: (0, 0, 0, 0, False, 'BIT 1,B'),
+ 0x49: (0, 0, 0, 0, False, 'BIT 1,C'),
+ 0x4A: (0, 0, 0, 0, False, 'BIT 1,D'),
+ 0x4B: (0, 0, 0, 0, False, 'BIT 1,E'),
+ 0x4C: (0, 0, 0, 0, False, 'BIT 1,H'),
+ 0x4D: (0, 0, 0, 0, False, 'BIT 1,L'),
+ 0x4E: (0, 0, 1, 0, False, 'BIT 1,(HL)'),
+ 0x4F: (0, 0, 0, 0, False, 'BIT 1,A'),
+
+ 0x50: (0, 0, 0, 0, False, 'BIT 2,B'),
+ 0x51: (0, 0, 0, 0, False, 'BIT 2,C'),
+ 0x52: (0, 0, 0, 0, False, 'BIT 2,D'),
+ 0x53: (0, 0, 0, 0, False, 'BIT 2,E'),
+ 0x54: (0, 0, 0, 0, False, 'BIT 2,H'),
+ 0x55: (0, 0, 0, 0, False, 'BIT 2,L'),
+ 0x56: (0, 0, 1, 0, False, 'BIT 2,(HL)'),
+ 0x57: (0, 0, 0, 0, False, 'BIT 2,A'),
+ 0x58: (0, 0, 0, 0, False, 'BIT 3,B'),
+ 0x59: (0, 0, 0, 0, False, 'BIT 3,C'),
+ 0x5A: (0, 0, 0, 0, False, 'BIT 3,D'),
+ 0x5B: (0, 0, 0, 0, False, 'BIT 3,E'),
+ 0x5C: (0, 0, 0, 0, False, 'BIT 3,H'),
+ 0x5D: (0, 0, 0, 0, False, 'BIT 3,L'),
+ 0x5E: (0, 0, 1, 0, False, 'BIT 3,(HL)'),
+ 0x5F: (0, 0, 0, 0, False, 'BIT 3,A'),
+
+ 0x60: (0, 0, 0, 0, False, 'BIT 4,B'),
+ 0x61: (0, 0, 0, 0, False, 'BIT 4,C'),
+ 0x62: (0, 0, 0, 0, False, 'BIT 4,D'),
+ 0x63: (0, 0, 0, 0, False, 'BIT 4,E'),
+ 0x64: (0, 0, 0, 0, False, 'BIT 4,H'),
+ 0x65: (0, 0, 0, 0, False, 'BIT 4,L'),
+ 0x66: (0, 0, 1, 0, False, 'BIT 4,(HL)'),
+ 0x67: (0, 0, 0, 0, False, 'BIT 4,A'),
+ 0x68: (0, 0, 0, 0, False, 'BIT 5,B'),
+ 0x69: (0, 0, 0, 0, False, 'BIT 5,C'),
+ 0x6A: (0, 0, 0, 0, False, 'BIT 5,D'),
+ 0x6B: (0, 0, 0, 0, False, 'BIT 5,E'),
+ 0x6C: (0, 0, 0, 0, False, 'BIT 5,H'),
+ 0x6D: (0, 0, 0, 0, False, 'BIT 5,L'),
+ 0x6E: (0, 0, 1, 0, False, 'BIT 5,(HL)'),
+ 0x6F: (0, 0, 0, 0, False, 'BIT 5,A'),
+
+ 0x70: (0, 0, 0, 0, False, 'BIT 6,B'),
+ 0x71: (0, 0, 0, 0, False, 'BIT 6,C'),
+ 0x72: (0, 0, 0, 0, False, 'BIT 6,D'),
+ 0x73: (0, 0, 0, 0, False, 'BIT 6,E'),
+ 0x74: (0, 0, 0, 0, False, 'BIT 6,H'),
+ 0x75: (0, 0, 0, 0, False, 'BIT 6,L'),
+ 0x76: (0, 0, 1, 0, False, 'BIT 6,(HL)'),
+ 0x77: (0, 0, 0, 0, False, 'BIT 6,A'),
+ 0x78: (0, 0, 0, 0, False, 'BIT 7,B'),
+ 0x79: (0, 0, 0, 0, False, 'BIT 7,C'),
+ 0x7A: (0, 0, 0, 0, False, 'BIT 7,D'),
+ 0x7B: (0, 0, 0, 0, False, 'BIT 7,E'),
+ 0x7C: (0, 0, 0, 0, False, 'BIT 7,H'),
+ 0x7D: (0, 0, 0, 0, False, 'BIT 7,L'),
+ 0x7E: (0, 0, 1, 0, False, 'BIT 7,(HL)'),
+ 0x7F: (0, 0, 0, 0, False, 'BIT 7,A'),
+
+ 0x80: (0, 0, 0, 0, False, 'RES 0,B'),
+ 0x81: (0, 0, 0, 0, False, 'RES 0,C'),
+ 0x82: (0, 0, 0, 0, False, 'RES 0,D'),
+ 0x83: (0, 0, 0, 0, False, 'RES 0,E'),
+ 0x84: (0, 0, 0, 0, False, 'RES 0,H'),
+ 0x85: (0, 0, 0, 0, False, 'RES 0,L'),
+ 0x86: (0, 0, 1, 1, False, 'RES 0,(HL)'),
+ 0x87: (0, 0, 0, 0, False, 'RES 0,A'),
+ 0x88: (0, 0, 0, 0, False, 'RES 1,B'),
+ 0x89: (0, 0, 0, 0, False, 'RES 1,C'),
+ 0x8A: (0, 0, 0, 0, False, 'RES 1,D'),
+ 0x8B: (0, 0, 0, 0, False, 'RES 1,E'),
+ 0x8C: (0, 0, 0, 0, False, 'RES 1,H'),
+ 0x8D: (0, 0, 0, 0, False, 'RES 1,L'),
+ 0x8E: (0, 0, 1, 1, False, 'RES 1,(HL)'),
+ 0x8F: (0, 0, 0, 0, False, 'RES 1,A'),
+
+ 0x90: (0, 0, 0, 0, False, 'RES 2,B'),
+ 0x91: (0, 0, 0, 0, False, 'RES 2,C'),
+ 0x92: (0, 0, 0, 0, False, 'RES 2,D'),
+ 0x93: (0, 0, 0, 0, False, 'RES 2,E'),
+ 0x94: (0, 0, 0, 0, False, 'RES 2,H'),
+ 0x95: (0, 0, 0, 0, False, 'RES 2,L'),
+ 0x96: (0, 0, 1, 1, False, 'RES 2,(HL)'),
+ 0x97: (0, 0, 0, 0, False, 'RES 2,A'),
+ 0x98: (0, 0, 0, 0, False, 'RES 3,B'),
+ 0x99: (0, 0, 0, 0, False, 'RES 3,C'),
+ 0x9A: (0, 0, 0, 0, False, 'RES 3,D'),
+ 0x9B: (0, 0, 0, 0, False, 'RES 3,E'),
+ 0x9C: (0, 0, 0, 0, False, 'RES 3,H'),
+ 0x9D: (0, 0, 0, 0, False, 'RES 3,L'),
+ 0x9E: (0, 0, 1, 1, False, 'RES 3,(HL)'),
+ 0x9F: (0, 0, 0, 0, False, 'RES 3,A'),
+
+ 0xA0: (0, 0, 0, 0, False, 'RES 4,B'),
+ 0xA1: (0, 0, 0, 0, False, 'RES 4,C'),
+ 0xA2: (0, 0, 0, 0, False, 'RES 4,D'),
+ 0xA3: (0, 0, 0, 0, False, 'RES 4,E'),
+ 0xA4: (0, 0, 0, 0, False, 'RES 4,H'),
+ 0xA5: (0, 0, 0, 0, False, 'RES 4,L'),
+ 0xA6: (0, 0, 1, 1, False, 'RES 4,(HL)'),
+ 0xA7: (0, 0, 0, 0, False, 'RES 4,A'),
+ 0xA8: (0, 0, 0, 0, False, 'RES 5,B'),
+ 0xA9: (0, 0, 0, 0, False, 'RES 5,C'),
+ 0xAA: (0, 0, 0, 0, False, 'RES 5,D'),
+ 0xAB: (0, 0, 0, 0, False, 'RES 5,E'),
+ 0xAC: (0, 0, 0, 0, False, 'RES 5,H'),
+ 0xAD: (0, 0, 0, 0, False, 'RES 5,L'),
+ 0xAE: (0, 0, 1, 1, False, 'RES 5,(HL)'),
+ 0xAF: (0, 0, 0, 0, False, 'RES 5,A'),
+
+ 0xB0: (0, 0, 0, 0, False, 'RES 6,B'),
+ 0xB1: (0, 0, 0, 0, False, 'RES 6,C'),
+ 0xB2: (0, 0, 0, 0, False, 'RES 6,D'),
+ 0xB3: (0, 0, 0, 0, False, 'RES 6,E'),
+ 0xB4: (0, 0, 0, 0, False, 'RES 6,H'),
+ 0xB5: (0, 0, 0, 0, False, 'RES 6,L'),
+ 0xB6: (0, 0, 1, 1, False, 'RES 6,(HL)'),
+ 0xB7: (0, 0, 0, 0, False, 'RES 6,A'),
+ 0xB8: (0, 0, 0, 0, False, 'RES 7,B'),
+ 0xB9: (0, 0, 0, 0, False, 'RES 7,C'),
+ 0xBA: (0, 0, 0, 0, False, 'RES 7,D'),
+ 0xBB: (0, 0, 0, 0, False, 'RES 7,E'),
+ 0xBC: (0, 0, 0, 0, False, 'RES 7,H'),
+ 0xBD: (0, 0, 0, 0, False, 'RES 7,L'),
+ 0xBE: (0, 0, 1, 1, False, 'RES 7,(HL)'),
+ 0xBF: (0, 0, 0, 0, False, 'RES 7,A'),
+
+ 0xC0: (0, 0, 0, 0, False, 'SET 0,B'),
+ 0xC1: (0, 0, 0, 0, False, 'SET 0,C'),
+ 0xC2: (0, 0, 0, 0, False, 'SET 0,D'),
+ 0xC3: (0, 0, 0, 0, False, 'SET 0,E'),
+ 0xC4: (0, 0, 0, 0, False, 'SET 0,H'),
+ 0xC5: (0, 0, 0, 0, False, 'SET 0,L'),
+ 0xC6: (0, 0, 1, 1, False, 'SET 0,(HL)'),
+ 0xC7: (0, 0, 0, 0, False, 'SET 0,A'),
+ 0xC8: (0, 0, 0, 0, False, 'SET 1,B'),
+ 0xC9: (0, 0, 0, 0, False, 'SET 1,C'),
+ 0xCA: (0, 0, 0, 0, False, 'SET 1,D'),
+ 0xCB: (0, 0, 0, 0, False, 'SET 1,E'),
+ 0xCC: (0, 0, 0, 0, False, 'SET 1,H'),
+ 0xCD: (0, 0, 0, 0, False, 'SET 1,L'),
+ 0xCE: (0, 0, 1, 1, False, 'SET 1,(HL)'),
+ 0xCF: (0, 0, 0, 0, False, 'SET 1,A'),
+
+ 0xD0: (0, 0, 0, 0, False, 'SET 2,B'),
+ 0xD1: (0, 0, 0, 0, False, 'SET 2,C'),
+ 0xD2: (0, 0, 0, 0, False, 'SET 2,D'),
+ 0xD3: (0, 0, 0, 0, False, 'SET 2,E'),
+ 0xD4: (0, 0, 0, 0, False, 'SET 2,H'),
+ 0xD5: (0, 0, 0, 0, False, 'SET 2,L'),
+ 0xD6: (0, 0, 1, 1, False, 'SET 2,(HL)'),
+ 0xD7: (0, 0, 0, 0, False, 'SET 2,A'),
+ 0xD8: (0, 0, 0, 0, False, 'SET 3,B'),
+ 0xD9: (0, 0, 0, 0, False, 'SET 3,C'),
+ 0xDA: (0, 0, 0, 0, False, 'SET 3,D'),
+ 0xDB: (0, 0, 0, 0, False, 'SET 3,E'),
+ 0xDC: (0, 0, 0, 0, False, 'SET 3,H'),
+ 0xDD: (0, 0, 0, 0, False, 'SET 3,L'),
+ 0xDE: (0, 0, 1, 1, False, 'SET 3,(HL)'),
+ 0xDF: (0, 0, 0, 0, False, 'SET 3,A'),
+
+ 0xE0: (0, 0, 0, 0, False, 'SET 4,B'),
+ 0xE1: (0, 0, 0, 0, False, 'SET 4,C'),
+ 0xE2: (0, 0, 0, 0, False, 'SET 4,D'),
+ 0xE3: (0, 0, 0, 0, False, 'SET 4,E'),
+ 0xE4: (0, 0, 0, 0, False, 'SET 4,H'),
+ 0xE5: (0, 0, 0, 0, False, 'SET 4,L'),
+ 0xE6: (0, 0, 1, 1, False, 'SET 4,(HL)'),
+ 0xE7: (0, 0, 0, 0, False, 'SET 4,A'),
+ 0xE8: (0, 0, 0, 0, False, 'SET 5,B'),
+ 0xE9: (0, 0, 0, 0, False, 'SET 5,C'),
+ 0xEA: (0, 0, 0, 0, False, 'SET 5,D'),
+ 0xEB: (0, 0, 0, 0, False, 'SET 5,E'),
+ 0xEC: (0, 0, 0, 0, False, 'SET 5,H'),
+ 0xED: (0, 0, 0, 0, False, 'SET 5,L'),
+ 0xEE: (0, 0, 1, 1, False, 'SET 5,(HL)'),
+ 0xEF: (0, 0, 0, 0, False, 'SET 5,A'),
+
+ 0xF0: (0, 0, 0, 0, False, 'SET 6,B'),
+ 0xF1: (0, 0, 0, 0, False, 'SET 6,C'),
+ 0xF2: (0, 0, 0, 0, False, 'SET 6,D'),
+ 0xF3: (0, 0, 0, 0, False, 'SET 6,E'),
+ 0xF4: (0, 0, 0, 0, False, 'SET 6,H'),
+ 0xF5: (0, 0, 0, 0, False, 'SET 6,L'),
+ 0xF6: (0, 0, 1, 1, False, 'SET 6,(HL)'),
+ 0xF7: (0, 0, 0, 0, False, 'SET 6,A'),
+ 0xF8: (0, 0, 0, 0, False, 'SET 7,B'),
+ 0xF9: (0, 0, 0, 0, False, 'SET 7,C'),
+ 0xFA: (0, 0, 0, 0, False, 'SET 7,D'),
+ 0xFB: (0, 0, 0, 0, False, 'SET 7,E'),
+ 0xFC: (0, 0, 0, 0, False, 'SET 7,H'),
+ 0xFD: (0, 0, 0, 0, False, 'SET 7,L'),
+ 0xFE: (0, 0, 1, 1, False, 'SET 7,(HL)'),
+ 0xFF: (0, 0, 0, 0, False, 'SET 7,A')
+}
+
+# Instructions with DD or FD prefix
+index_instructions = {
+ 0x09: (0, 0, 0, 0, False, 'ADD {r},BC'),
+
+ 0x19: (0, 0, 0, 0, False, 'ADD {r},DE'),
+
+ 0x21: (0, 2, 0, 0, False, 'LD {r},{i:04H}h'),
+ 0x22: (0, 2, 0, 2, False, 'LD ({i:04H}h),{r}'),
+ 0x23: (0, 0, 0, 0, False, 'INC {r}'),
+ 0x24: (0, 0, 0, 0, False, 'INC {r}h'),
+ 0x25: (0, 0, 0, 0, False, 'DEC {r}h'),
+ 0x26: (0, 1, 0, 0, False, 'LD {r}h,{i:02H}h'),
+
+ 0x29: (0, 0, 0, 0, False, 'ADD {r},{r}'),
+ 0x2A: (0, 2, 2, 0, False, 'LD {r},({i:04H}h)'),
+ 0x2B: (0, 0, 0, 0, False, 'DEC {r}'),
+ 0x2C: (0, 0, 0, 0, False, 'INC {r}l'),
+ 0x2D: (0, 0, 0, 0, False, 'DEC {r}l'),
+ 0x2E: (0, 1, 0, 0, False, 'LD {r}l,{i:02H}h'),
+
+ 0x34: (1, 0, 1, 1, False, 'INC ({r}{d:+d})'),
+ 0x35: (1, 0, 1, 1, False, 'DEC ({r}{d:+d})'),
+ 0x36: (1, 1, 0, 1, False, 'LD ({r}{d:+d}),{i:02H}h'),
+
+ 0x39: (0, 0, 0, 0, False, 'ADD {r},SP'),
+
+ 0x44: (0, 0, 0, 0, False, 'LD B,{r}h'),
+ 0x45: (0, 0, 0, 0, False, 'LD B,{r}l'),
+ 0x46: (1, 0, 1, 0, False, 'LD B,({r}{d:+d})'),
+
+ 0x4C: (0, 0, 0, 0, False, 'LD C,{r}h'),
+ 0x4D: (0, 0, 0, 0, False, 'LD C,{r}l'),
+ 0x4E: (1, 0, 1, 0, False, 'LD C,({r}{d:+d})'),
+
+ 0x54: (0, 0, 0, 0, False, 'LD D,{r}h'),
+ 0x55: (0, 0, 0, 0, False, 'LD D,{r}l'),
+ 0x56: (1, 0, 1, 0, False, 'LD D,({r}{d:+d})'),
+
+ 0x5C: (0, 0, 0, 0, False, 'LD E,{r}h'),
+ 0x5D: (0, 0, 0, 0, False, 'LD E,{r}l'),
+ 0x5E: (1, 0, 1, 0, False, 'LD E,({r}{d:+d})'),
+
+ 0x60: (0, 0, 0, 0, False, 'LD {r}h,B'),
+ 0x61: (0, 0, 0, 0, False, 'LD {r}h,C'),
+ 0x62: (0, 0, 0, 0, False, 'LD {r}h,D'),
+ 0x63: (0, 0, 0, 0, False, 'LD {r}h,E'),
+ 0x64: (0, 0, 0, 0, False, 'LD {r}h,{r}h'),
+ 0x65: (0, 0, 0, 0, False, 'LD {r}h,{r}l'),
+ 0x66: (1, 0, 1, 0, False, 'LD H,({r}{d:+d})'),
+ 0x67: (0, 0, 0, 0, False, 'LD {r}h,A'),
+ 0x68: (0, 0, 0, 0, False, 'LD {r}l,B'),
+ 0x69: (0, 0, 0, 0, False, 'LD {r}l,C'),
+ 0x6A: (0, 0, 0, 0, False, 'LD {r}l,D'),
+ 0x6B: (0, 0, 0, 0, False, 'LD {r}l,E'),
+ 0x6C: (0, 0, 0, 0, False, 'LD {r}l,{r}h'),
+ 0x6D: (0, 0, 0, 0, False, 'LD {r}l,{r}l'),
+ 0x6E: (1, 0, 1, 0, False, 'LD L,({r}{d:+d})'),
+ 0x6F: (0, 0, 0, 0, False, 'LD {r}l,A'),
+
+ 0x70: (1, 0, 0, 1, False, 'LD ({r}{d:+d}),B'),
+ 0x71: (1, 0, 0, 1, False, 'LD ({r}{d:+d}),C'),
+ 0x72: (1, 0, 0, 1, False, 'LD ({r}{d:+d}),D'),
+ 0x73: (1, 0, 0, 1, False, 'LD ({r}{d:+d}),E'),
+ 0x74: (1, 0, 0, 1, False, 'LD ({r}{d:+d}),H'),
+ 0x75: (1, 0, 0, 1, False, 'LD ({r}{d:+d}),L'),
+
+ 0x77: (1, 0, 0, 1, False, 'LD ({r}{d:+d}),A'),
+
+ 0x7C: (0, 0, 0, 0, False, 'LD A,{r}h'),
+ 0x7D: (0, 0, 0, 0, False, 'LD A,{r}l'),
+ 0x7E: (1, 0, 1, 0, False, 'LD A,({r}{d:+d})'),
+
+ 0x84: (0, 0, 0, 0, False, 'ADD A,{r}h'),
+ 0x85: (0, 0, 0, 0, False, 'ADD A,{r}l'),
+ 0x86: (1, 0, 1, 0, False, 'ADD A,({r}{d:+d})'),
+
+ 0x8C: (0, 0, 0, 0, False, 'ADC A,{r}h'),
+ 0x8D: (0, 0, 0, 0, False, 'ADC A,{r}l'),
+ 0x8E: (1, 0, 1, 0, False, 'ADC A,({r}{d:+d})'),
+
+ 0x94: (0, 0, 0, 0, False, 'SUB {r}h'),
+ 0x95: (0, 0, 0, 0, False, 'SUB {r}l'),
+ 0x96: (1, 0, 1, 0, False, 'SUB ({r}{d:+d})'),
+
+ 0x9C: (0, 0, 0, 0, False, 'SBC A,{r}h'),
+ 0x9D: (0, 0, 0, 0, False, 'SBC A,{r}l'),
+ 0x9E: (1, 0, 1, 0, False, 'SBC A,({r}{d:+d})'),
+
+ 0xA4: (0, 0, 0, 0, False, 'AND {r}h'),
+ 0xA5: (0, 0, 0, 0, False, 'AND {r}l'),
+ 0xA6: (1, 0, 1, 0, False, 'AND ({r}{d:+d})'),
+
+ 0xAC: (0, 0, 0, 0, False, 'XOR {r}h'),
+ 0xAD: (0, 0, 0, 0, False, 'XOR {r}l'),
+ 0xAE: (1, 0, 1, 0, False, 'XOR ({r}{d:+d})'),
+
+ 0xB4: (0, 0, 0, 0, False, 'OR {r}h'),
+ 0xB5: (0, 0, 0, 0, False, 'OR {r}l'),
+ 0xB6: (1, 0, 1, 0, False, 'OR ({r}{d:+d})'),
+
+ 0xBC: (0, 0, 0, 0, False, 'CP {r}h'),
+ 0xBD: (0, 0, 0, 0, False, 'CP {r}l'),
+ 0xBE: (1, 0, 1, 0, False, 'CP ({r}{d:+d})'),
+
+ 0xE1: (0, 0, 2, 0, False, 'POP {r}'),
+
+ 0xE3: (0, 0, 2, 2, False, 'EX (SP),{r}'),
+
+ 0xE5: (0, 0, 0,-2, False, 'PUSH {r}'),
+
+ 0xE9: (0, 0, 0, 0, False, 'JP ({r})'),
+
+ 0xF9: (0, 0, 0, 0, False, 'LD SP,{r}')
+}
+
+# Instructions with DD CB or FD CB prefix.
+# For these instructions, the displacement precedes the opcode byte.
+# This is handled as a special case in the code, and thus the entries
+# in this table specify 0 for the displacement length.
+index_bit_instructions = {
+ 0x00: (0, 0, 1, 1, False, 'RLC ({r}{d:+d}),B'),
+ 0x01: (0, 0, 1, 1, False, 'RLC ({r}{d:+d}),C'),
+ 0x02: (0, 0, 1, 1, False, 'RLC ({r}{d:+d}),D'),
+ 0x03: (0, 0, 1, 1, False, 'RLC ({r}{d:+d}),E'),
+ 0x04: (0, 0, 1, 1, False, 'RLC ({r}{d:+d}),H'),
+ 0x05: (0, 0, 1, 1, False, 'RLC ({r}{d:+d}),L'),
+ 0x06: (0, 0, 1, 1, False, 'RLC ({r}{d:+d})'),
+ 0x07: (0, 0, 1, 1, False, 'RLC ({r}{d:+d}),A'),
+ 0x08: (0, 0, 1, 1, False, 'RRC ({r}{d:+d}),B'),
+ 0x09: (0, 0, 1, 1, False, 'RRC ({r}{d:+d}),C'),
+ 0x0A: (0, 0, 1, 1, False, 'RRC ({r}{d:+d}),D'),
+ 0x0B: (0, 0, 1, 1, False, 'RRC ({r}{d:+d}),E'),
+ 0x0C: (0, 0, 1, 1, False, 'RRC ({r}{d:+d}),H'),
+ 0x0D: (0, 0, 1, 1, False, 'RRC ({r}{d:+d}),L'),
+ 0x0E: (0, 0, 1, 1, False, 'RRC ({r}{d:+d})'),
+ 0x0F: (0, 0, 1, 1, False, 'RRC ({r}{d:+d}),A'),
+
+ 0x10: (0, 0, 1, 1, False, 'RL ({r}{d:+d}),B'),
+ 0x11: (0, 0, 1, 1, False, 'RL ({r}{d:+d}),C'),
+ 0x12: (0, 0, 1, 1, False, 'RL ({r}{d:+d}),D'),
+ 0x13: (0, 0, 1, 1, False, 'RL ({r}{d:+d}),E'),
+ 0x14: (0, 0, 1, 1, False, 'RL ({r}{d:+d}),H'),
+ 0x15: (0, 0, 1, 1, False, 'RL ({r}{d:+d}),L'),
+ 0x16: (0, 0, 1, 1, False, 'RL ({r}{d:+d})'),
+ 0x17: (0, 0, 1, 1, False, 'RL ({r}{d:+d}),A'),
+ 0x18: (0, 0, 1, 1, False, 'RR ({r}{d:+d}),B'),
+ 0x19: (0, 0, 1, 1, False, 'RR ({r}{d:+d}),C'),
+ 0x1A: (0, 0, 1, 1, False, 'RR ({r}{d:+d}),D'),
+ 0x1B: (0, 0, 1, 1, False, 'RR ({r}{d:+d}),E'),
+ 0x1C: (0, 0, 1, 1, False, 'RR ({r}{d:+d}),H'),
+ 0x1D: (0, 0, 1, 1, False, 'RR ({r}{d:+d}),L'),
+ 0x1E: (0, 0, 1, 1, False, 'RR ({r}{d:+d})'),
+ 0x1F: (0, 0, 1, 1, False, 'RR ({r}{d:+d}),A'),
+
+ 0x20: (0, 0, 1, 1, False, 'SLA ({r}{d:+d}),B'),
+ 0x21: (0, 0, 1, 1, False, 'SLA ({r}{d:+d}),C'),
+ 0x22: (0, 0, 1, 1, False, 'SLA ({r}{d:+d}),D'),
+ 0x23: (0, 0, 1, 1, False, 'SLA ({r}{d:+d}),E'),
+ 0x24: (0, 0, 1, 1, False, 'SLA ({r}{d:+d}),H'),
+ 0x25: (0, 0, 1, 1, False, 'SLA ({r}{d:+d}),L'),
+ 0x26: (0, 0, 1, 1, False, 'SLA ({r}{d:+d})'),
+ 0x27: (0, 0, 1, 1, False, 'SLA ({r}{d:+d}),A'),
+ 0x28: (0, 0, 1, 1, False, 'SRA ({r}{d:+d}),B'),
+ 0x29: (0, 0, 1, 1, False, 'SRA ({r}{d:+d}),C'),
+ 0x2A: (0, 0, 1, 1, False, 'SRA ({r}{d:+d}),D'),
+ 0x2B: (0, 0, 1, 1, False, 'SRA ({r}{d:+d}),E'),
+ 0x2C: (0, 0, 1, 1, False, 'SRA ({r}{d:+d}),H'),
+ 0x2D: (0, 0, 1, 1, False, 'SRA ({r}{d:+d}),L'),
+ 0x2E: (0, 0, 1, 1, False, 'SRA ({r}{d:+d})'),
+ 0x2F: (0, 0, 1, 1, False, 'SRA ({r}{d:+d}),A'),
+
+ 0x30: (0, 0, 1, 1, False, 'SLL ({r}{d:+d}),B'),
+ 0x31: (0, 0, 1, 1, False, 'SLL ({r}{d:+d}),C'),
+ 0x32: (0, 0, 1, 1, False, 'SLL ({r}{d:+d}),D'),
+ 0x33: (0, 0, 1, 1, False, 'SLL ({r}{d:+d}),E'),
+ 0x34: (0, 0, 1, 1, False, 'SLL ({r}{d:+d}),H'),
+ 0x35: (0, 0, 1, 1, False, 'SLL ({r}{d:+d}),L'),
+ 0x36: (0, 0, 1, 1, False, 'SLL ({r}{d:+d})'),
+ 0x37: (0, 0, 1, 1, False, 'SLL ({r}{d:+d}),A'),
+ 0x38: (0, 0, 1, 1, False, 'SRL ({r}{d:+d}),B'),
+ 0x39: (0, 0, 1, 1, False, 'SRL ({r}{d:+d}),C'),
+ 0x3A: (0, 0, 1, 1, False, 'SRL ({r}{d:+d}),D'),
+ 0x3B: (0, 0, 1, 1, False, 'SRL ({r}{d:+d}),E'),
+ 0x3C: (0, 0, 1, 1, False, 'SRL ({r}{d:+d}),H'),
+ 0x3D: (0, 0, 1, 1, False, 'SRL ({r}{d:+d}),L'),
+ 0x3E: (0, 0, 1, 1, False, 'SRL ({r}{d:+d})'),
+ 0x3F: (0, 0, 1, 1, False, 'SRL ({r}{d:+d}),A'),
+
+ 0x40: (0, 0, 1, 0, False, 'BIT 0,({r}{d:+d})'),
+ 0x41: (0, 0, 1, 0, False, 'BIT 0,({r}{d:+d})'),
+ 0x42: (0, 0, 1, 0, False, 'BIT 0,({r}{d:+d})'),
+ 0x43: (0, 0, 1, 0, False, 'BIT 0,({r}{d:+d})'),
+ 0x44: (0, 0, 1, 0, False, 'BIT 0,({r}{d:+d})'),
+ 0x45: (0, 0, 1, 0, False, 'BIT 0,({r}{d:+d})'),
+ 0x46: (0, 0, 1, 0, False, 'BIT 0,({r}{d:+d})'),
+ 0x47: (0, 0, 1, 0, False, 'BIT 0,({r}{d:+d})'),
+ 0x48: (0, 0, 1, 0, False, 'BIT 1,({r}{d:+d})'),
+ 0x49: (0, 0, 1, 0, False, 'BIT 1,({r}{d:+d})'),
+ 0x4A: (0, 0, 1, 0, False, 'BIT 1,({r}{d:+d})'),
+ 0x4B: (0, 0, 1, 0, False, 'BIT 1,({r}{d:+d})'),
+ 0x4C: (0, 0, 1, 0, False, 'BIT 1,({r}{d:+d})'),
+ 0x4D: (0, 0, 1, 0, False, 'BIT 1,({r}{d:+d})'),
+ 0x4E: (0, 0, 1, 0, False, 'BIT 1,({r}{d:+d})'),
+ 0x4F: (0, 0, 1, 0, False, 'BIT 1,({r}{d:+d})'),
+
+ 0x50: (0, 0, 1, 0, False, 'BIT 2,({r}{d:+d})'),
+ 0x51: (0, 0, 1, 0, False, 'BIT 2,({r}{d:+d})'),
+ 0x52: (0, 0, 1, 0, False, 'BIT 2,({r}{d:+d})'),
+ 0x53: (0, 0, 1, 0, False, 'BIT 2,({r}{d:+d})'),
+ 0x54: (0, 0, 1, 0, False, 'BIT 2,({r}{d:+d})'),
+ 0x55: (0, 0, 1, 0, False, 'BIT 2,({r}{d:+d})'),
+ 0x56: (0, 0, 1, 0, False, 'BIT 2,({r}{d:+d})'),
+ 0x57: (0, 0, 1, 0, False, 'BIT 2,({r}{d:+d})'),
+ 0x58: (0, 0, 1, 0, False, 'BIT 3,({r}{d:+d})'),
+ 0x59: (0, 0, 1, 0, False, 'BIT 3,({r}{d:+d})'),
+ 0x5A: (0, 0, 1, 0, False, 'BIT 3,({r}{d:+d})'),
+ 0x5B: (0, 0, 1, 0, False, 'BIT 3,({r}{d:+d})'),
+ 0x5C: (0, 0, 1, 0, False, 'BIT 3,({r}{d:+d})'),
+ 0x5D: (0, 0, 1, 0, False, 'BIT 3,({r}{d:+d})'),
+ 0x5E: (0, 0, 1, 0, False, 'BIT 3,({r}{d:+d})'),
+ 0x5F: (0, 0, 1, 0, False, 'BIT 3,({r}{d:+d})'),
+
+ 0x60: (0, 0, 1, 0, False, 'BIT 4,({r}{d:+d})'),
+ 0x61: (0, 0, 1, 0, False, 'BIT 4,({r}{d:+d})'),
+ 0x62: (0, 0, 1, 0, False, 'BIT 4,({r}{d:+d})'),
+ 0x63: (0, 0, 1, 0, False, 'BIT 4,({r}{d:+d})'),
+ 0x64: (0, 0, 1, 0, False, 'BIT 4,({r}{d:+d})'),
+ 0x65: (0, 0, 1, 0, False, 'BIT 4,({r}{d:+d})'),
+ 0x66: (0, 0, 1, 0, False, 'BIT 4,({r}{d:+d})'),
+ 0x67: (0, 0, 1, 0, False, 'BIT 4,({r}{d:+d})'),
+ 0x68: (0, 0, 1, 0, False, 'BIT 5,({r}{d:+d})'),
+ 0x69: (0, 0, 1, 0, False, 'BIT 5,({r}{d:+d})'),
+ 0x6A: (0, 0, 1, 0, False, 'BIT 5,({r}{d:+d})'),
+ 0x6B: (0, 0, 1, 0, False, 'BIT 5,({r}{d:+d})'),
+ 0x6C: (0, 0, 1, 0, False, 'BIT 5,({r}{d:+d})'),
+ 0x6D: (0, 0, 1, 0, False, 'BIT 5,({r}{d:+d})'),
+ 0x6E: (0, 0, 1, 0, False, 'BIT 5,({r}{d:+d})'),
+ 0x6F: (0, 0, 1, 0, False, 'BIT 5,({r}{d:+d})'),
+
+ 0x70: (0, 0, 1, 0, False, 'BIT 6,({r}{d:+d})'),
+ 0x71: (0, 0, 1, 0, False, 'BIT 6,({r}{d:+d})'),
+ 0x72: (0, 0, 1, 0, False, 'BIT 6,({r}{d:+d})'),
+ 0x73: (0, 0, 1, 0, False, 'BIT 6,({r}{d:+d})'),
+ 0x74: (0, 0, 1, 0, False, 'BIT 6,({r}{d:+d})'),
+ 0x75: (0, 0, 1, 0, False, 'BIT 6,({r}{d:+d})'),
+ 0x76: (0, 0, 1, 0, False, 'BIT 6,({r}{d:+d})'),
+ 0x77: (0, 0, 1, 0, False, 'BIT 6,({r}{d:+d})'),
+ 0x78: (0, 0, 1, 0, False, 'BIT 7,({r}{d:+d})'),
+ 0x79: (0, 0, 1, 0, False, 'BIT 7,({r}{d:+d})'),
+ 0x7A: (0, 0, 1, 0, False, 'BIT 7,({r}{d:+d})'),
+ 0x7B: (0, 0, 1, 0, False, 'BIT 7,({r}{d:+d})'),
+ 0x7C: (0, 0, 1, 0, False, 'BIT 7,({r}{d:+d})'),
+ 0x7D: (0, 0, 1, 0, False, 'BIT 7,({r}{d:+d})'),
+ 0x7E: (0, 0, 1, 0, False, 'BIT 7,({r}{d:+d})'),
+ 0x7F: (0, 0, 1, 0, False, 'BIT 7,({r}{d:+d})'),
+
+ 0x80: (0, 0, 1, 1, False, 'RES 0,({r}{d:+d}),B'),
+ 0x81: (0, 0, 1, 1, False, 'RES 0,({r}{d:+d}),C'),
+ 0x82: (0, 0, 1, 1, False, 'RES 0,({r}{d:+d}),D'),
+ 0x83: (0, 0, 1, 1, False, 'RES 0,({r}{d:+d}),E'),
+ 0x84: (0, 0, 1, 1, False, 'RES 0,({r}{d:+d}),H'),
+ 0x85: (0, 0, 1, 1, False, 'RES 0,({r}{d:+d}),L'),
+ 0x86: (0, 0, 1, 1, False, 'RES 0,({r}{d:+d})'),
+ 0x87: (0, 0, 1, 1, False, 'RES 0,({r}{d:+d}),A'),
+ 0x88: (0, 0, 1, 1, False, 'RES 1,({r}{d:+d}),B'),
+ 0x89: (0, 0, 1, 1, False, 'RES 1,({r}{d:+d}),C'),
+ 0x8A: (0, 0, 1, 1, False, 'RES 1,({r}{d:+d}),D'),
+ 0x8B: (0, 0, 1, 1, False, 'RES 1,({r}{d:+d}),E'),
+ 0x8C: (0, 0, 1, 1, False, 'RES 1,({r}{d:+d}),H'),
+ 0x8D: (0, 0, 1, 1, False, 'RES 1,({r}{d:+d}),L'),
+ 0x8E: (0, 0, 1, 1, False, 'RES 1,({r}{d:+d})'),
+ 0x8F: (0, 0, 1, 1, False, 'RES 1,({r}{d:+d}),A'),
+
+ 0x90: (0, 0, 1, 1, False, 'RES 2,({r}{d:+d}),B'),
+ 0x91: (0, 0, 1, 1, False, 'RES 2,({r}{d:+d}),C'),
+ 0x92: (0, 0, 1, 1, False, 'RES 2,({r}{d:+d}),D'),
+ 0x93: (0, 0, 1, 1, False, 'RES 2,({r}{d:+d}),E'),
+ 0x94: (0, 0, 1, 1, False, 'RES 2,({r}{d:+d}),H'),
+ 0x95: (0, 0, 1, 1, False, 'RES 2,({r}{d:+d}),L'),
+ 0x96: (0, 0, 1, 1, False, 'RES 2,({r}{d:+d})'),
+ 0x97: (0, 0, 1, 1, False, 'RES 2,({r}{d:+d}),A'),
+ 0x98: (0, 0, 1, 1, False, 'RES 3,({r}{d:+d}),B'),
+ 0x99: (0, 0, 1, 1, False, 'RES 3,({r}{d:+d}),C'),
+ 0x9A: (0, 0, 1, 1, False, 'RES 3,({r}{d:+d}),D'),
+ 0x9B: (0, 0, 1, 1, False, 'RES 3,({r}{d:+d}),E'),
+ 0x9C: (0, 0, 1, 1, False, 'RES 3,({r}{d:+d}),H'),
+ 0x9D: (0, 0, 1, 1, False, 'RES 3,({r}{d:+d}),L'),
+ 0x9E: (0, 0, 1, 1, False, 'RES 3,({r}{d:+d})'),
+ 0x9F: (0, 0, 1, 1, False, 'RES 3,({r}{d:+d}),A'),
+
+ 0xA0: (0, 0, 1, 1, False, 'RES 4,({r}{d:+d}),B'),
+ 0xA1: (0, 0, 1, 1, False, 'RES 4,({r}{d:+d}),C'),
+ 0xA2: (0, 0, 1, 1, False, 'RES 4,({r}{d:+d}),D'),
+ 0xA3: (0, 0, 1, 1, False, 'RES 4,({r}{d:+d}),E'),
+ 0xA4: (0, 0, 1, 1, False, 'RES 4,({r}{d:+d}),H'),
+ 0xA5: (0, 0, 1, 1, False, 'RES 4,({r}{d:+d}),L'),
+ 0xA6: (0, 0, 1, 1, False, 'RES 4,({r}{d:+d})'),
+ 0xA7: (0, 0, 1, 1, False, 'RES 4,({r}{d:+d}),A'),
+ 0xA8: (0, 0, 1, 1, False, 'RES 5,({r}{d:+d}),B'),
+ 0xA9: (0, 0, 1, 1, False, 'RES 5,({r}{d:+d}),C'),
+ 0xAA: (0, 0, 1, 1, False, 'RES 5,({r}{d:+d}),D'),
+ 0xAB: (0, 0, 1, 1, False, 'RES 5,({r}{d:+d}),E'),
+ 0xAC: (0, 0, 1, 1, False, 'RES 5,({r}{d:+d}),H'),
+ 0xAD: (0, 0, 1, 1, False, 'RES 5,({r}{d:+d}),L'),
+ 0xAE: (0, 0, 1, 1, False, 'RES 5,({r}{d:+d})'),
+ 0xAF: (0, 0, 1, 1, False, 'RES 5,({r}{d:+d}),A'),
+
+ 0xB0: (0, 0, 1, 1, False, 'RES 6,({r}{d:+d}),B'),
+ 0xB1: (0, 0, 1, 1, False, 'RES 6,({r}{d:+d}),C'),
+ 0xB2: (0, 0, 1, 1, False, 'RES 6,({r}{d:+d}),D'),
+ 0xB3: (0, 0, 1, 1, False, 'RES 6,({r}{d:+d}),E'),
+ 0xB4: (0, 0, 1, 1, False, 'RES 6,({r}{d:+d}),H'),
+ 0xB5: (0, 0, 1, 1, False, 'RES 6,({r}{d:+d}),L'),
+ 0xB6: (0, 0, 1, 1, False, 'RES 6,({r}{d:+d})'),
+ 0xB7: (0, 0, 1, 1, False, 'RES 6,({r}{d:+d}),A'),
+ 0xB8: (0, 0, 1, 1, False, 'RES 7,({r}{d:+d}),B'),
+ 0xB9: (0, 0, 1, 1, False, 'RES 7,({r}{d:+d}),C'),
+ 0xBA: (0, 0, 1, 1, False, 'RES 7,({r}{d:+d}),D'),
+ 0xBB: (0, 0, 1, 1, False, 'RES 7,({r}{d:+d}),E'),
+ 0xBC: (0, 0, 1, 1, False, 'RES 7,({r}{d:+d}),H'),
+ 0xBD: (0, 0, 1, 1, False, 'RES 7,({r}{d:+d}),L'),
+ 0xBE: (0, 0, 1, 1, False, 'RES 7,({r}{d:+d})'),
+ 0xBF: (0, 0, 1, 1, False, 'RES 7,({r}{d:+d}),A'),
+
+ 0xC0: (0, 0, 1, 1, False, 'SET 0,({r}{d:+d}),B'),
+ 0xC1: (0, 0, 1, 1, False, 'SET 0,({r}{d:+d}),C'),
+ 0xC2: (0, 0, 1, 1, False, 'SET 0,({r}{d:+d}),D'),
+ 0xC3: (0, 0, 1, 1, False, 'SET 0,({r}{d:+d}),E'),
+ 0xC4: (0, 0, 1, 1, False, 'SET 0,({r}{d:+d}),H'),
+ 0xC5: (0, 0, 1, 1, False, 'SET 0,({r}{d:+d}),L'),
+ 0xC6: (0, 0, 1, 1, False, 'SET 0,({r}{d:+d})'),
+ 0xC7: (0, 0, 1, 1, False, 'SET 0,({r}{d:+d}),A'),
+ 0xC8: (0, 0, 1, 1, False, 'SET 1,({r}{d:+d}),B'),
+ 0xC9: (0, 0, 1, 1, False, 'SET 1,({r}{d:+d}),C'),
+ 0xCA: (0, 0, 1, 1, False, 'SET 1,({r}{d:+d}),D'),
+ 0xCB: (0, 0, 1, 1, False, 'SET 1,({r}{d:+d}),E'),
+ 0xCC: (0, 0, 1, 1, False, 'SET 1,({r}{d:+d}),H'),
+ 0xCD: (0, 0, 1, 1, False, 'SET 1,({r}{d:+d}),L'),
+ 0xCE: (0, 0, 1, 1, False, 'SET 1,({r}{d:+d})'),
+ 0xCF: (0, 0, 1, 1, False, 'SET 1,({r}{d:+d}),A'),
+
+ 0xD0: (0, 0, 1, 1, False, 'SET 2,({r}{d:+d}),B'),
+ 0xD1: (0, 0, 1, 1, False, 'SET 2,({r}{d:+d}),C'),
+ 0xD2: (0, 0, 1, 1, False, 'SET 2,({r}{d:+d}),D'),
+ 0xD3: (0, 0, 1, 1, False, 'SET 2,({r}{d:+d}),E'),
+ 0xD4: (0, 0, 1, 1, False, 'SET 2,({r}{d:+d}),H'),
+ 0xD5: (0, 0, 1, 1, False, 'SET 2,({r}{d:+d}),L'),
+ 0xD6: (0, 0, 1, 1, False, 'SET 2,({r}{d:+d})'),
+ 0xD7: (0, 0, 1, 1, False, 'SET 2,({r}{d:+d}),A'),
+ 0xD8: (0, 0, 1, 1, False, 'SET 3,({r}{d:+d}),B'),
+ 0xD9: (0, 0, 1, 1, False, 'SET 3,({r}{d:+d}),C'),
+ 0xDA: (0, 0, 1, 1, False, 'SET 3,({r}{d:+d}),D'),
+ 0xDB: (0, 0, 1, 1, False, 'SET 3,({r}{d:+d}),E'),
+ 0xDC: (0, 0, 1, 1, False, 'SET 3,({r}{d:+d}),H'),
+ 0xDD: (0, 0, 1, 1, False, 'SET 3,({r}{d:+d}),L'),
+ 0xDE: (0, 0, 1, 1, False, 'SET 3,({r}{d:+d})'),
+ 0xDF: (0, 0, 1, 1, False, 'SET 3,({r}{d:+d}),A'),
+
+ 0xE0: (0, 0, 1, 1, False, 'SET 4,({r}{d:+d}),B'),
+ 0xE1: (0, 0, 1, 1, False, 'SET 4,({r}{d:+d}),C'),
+ 0xE2: (0, 0, 1, 1, False, 'SET 4,({r}{d:+d}),D'),
+ 0xE3: (0, 0, 1, 1, False, 'SET 4,({r}{d:+d}),E'),
+ 0xE4: (0, 0, 1, 1, False, 'SET 4,({r}{d:+d}),H'),
+ 0xE5: (0, 0, 1, 1, False, 'SET 4,({r}{d:+d}),L'),
+ 0xE6: (0, 0, 1, 1, False, 'SET 4,({r}{d:+d})'),
+ 0xE7: (0, 0, 1, 1, False, 'SET 4,({r}{d:+d}),A'),
+ 0xE8: (0, 0, 1, 1, False, 'SET 5,({r}{d:+d}),B'),
+ 0xE9: (0, 0, 1, 1, False, 'SET 5,({r}{d:+d}),C'),
+ 0xEA: (0, 0, 1, 1, False, 'SET 5,({r}{d:+d}),D'),
+ 0xEB: (0, 0, 1, 1, False, 'SET 5,({r}{d:+d}),E'),
+ 0xEC: (0, 0, 1, 1, False, 'SET 5,({r}{d:+d}),H'),
+ 0xED: (0, 0, 1, 1, False, 'SET 5,({r}{d:+d}),L'),
+ 0xEE: (0, 0, 1, 1, False, 'SET 5,({r}{d:+d})'),
+ 0xEF: (0, 0, 1, 1, False, 'SET 5,({r}{d:+d}),A'),
+
+ 0xF0: (0, 0, 1, 1, False, 'SET 6,({r}{d:+d}),B'),
+ 0xF1: (0, 0, 1, 1, False, 'SET 6,({r}{d:+d}),C'),
+ 0xF2: (0, 0, 1, 1, False, 'SET 6,({r}{d:+d}),D'),
+ 0xF3: (0, 0, 1, 1, False, 'SET 6,({r}{d:+d}),E'),
+ 0xF4: (0, 0, 1, 1, False, 'SET 6,({r}{d:+d}),H'),
+ 0xF5: (0, 0, 1, 1, False, 'SET 6,({r}{d:+d}),L'),
+ 0xF6: (0, 0, 1, 1, False, 'SET 6,({r}{d:+d})'),
+ 0xF7: (0, 0, 1, 1, False, 'SET 6,({r}{d:+d}),A'),
+ 0xF8: (0, 0, 1, 1, False, 'SET 7,({r}{d:+d}),B'),
+ 0xF9: (0, 0, 1, 1, False, 'SET 7,({r}{d:+d}),C'),
+ 0xFA: (0, 0, 1, 1, False, 'SET 7,({r}{d:+d}),D'),
+ 0xFB: (0, 0, 1, 1, False, 'SET 7,({r}{d:+d}),E'),
+ 0xFC: (0, 0, 1, 1, False, 'SET 7,({r}{d:+d}),H'),
+ 0xFD: (0, 0, 1, 1, False, 'SET 7,({r}{d:+d}),L'),
+ 0xFE: (0, 0, 1, 1, False, 'SET 7,({r}{d:+d})'),
+ 0xFF: (0, 0, 1, 1, False, 'SET 7,({r}{d:+d}),A')
+}
+
+instr_table_by_prefix = {
+ 0: (main_instructions, ''),
+ 0xED: (extended_instructions, ''),
+ 0xCB: (bit_instructions, ''),
+ 0xDD: (index_instructions, 'IX'),
+ 0xFD: (index_instructions, 'IY'),
+ 0xDDCB: (index_bit_instructions, 'IX'),
+ 0xFDCB: (index_bit_instructions, 'IY')
+}
diff --git a/error.c b/error.c
new file mode 100644
index 0000000..e6abd4b
--- /dev/null
+++ b/error.c
@@ -0,0 +1,152 @@
+/*
+ * This file is part of the libsigrokdecode project.
+ *
+ * Copyright (C) 2013 Uwe Hermann <uwe at hermann-uwe.de>
+ *
+ * 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 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "libsigrokdecode.h"
+
+/**
+ * @file
+ *
+ * Error handling in libsigrokdecode.
+ */
+
+/**
+ * @defgroup grp_error Error handling
+ *
+ * Error handling in libsigrokdecode.
+ *
+ * libsigrokdecode functions usually return @ref SRD_OK upon success, or a
+ * negative error code on failure.
+ *
+ * @{
+ */
+
+/**
+ * Return a human-readable error string for the given libsigrokdecode error
+ * code.
+ *
+ * @param error_code A libsigrokdecode error code number, such as
+ * SRD_ERR_MALLOC.
+ *
+ * @return A const string containing a short, human-readable (English)
+ * description of the error, such as "memory allocation error".
+ * The string must NOT be free'd by the caller!
+ *
+ * @see srd_strerror_name
+ *
+ * @since 0.2.0
+ */
+SRD_API const char *srd_strerror(int error_code)
+{
+ const char *str;
+
+ /*
+ * Note: All defined SRD_* error macros from libsigrokdecode.h must
+ * have an entry in this function, as well as in srd_strerror_name().
+ */
+
+ switch (error_code) {
+ case SRD_OK:
+ str = "no error";
+ break;
+ case SRD_ERR:
+ str = "generic/unspecified error";
+ break;
+ case SRD_ERR_MALLOC:
+ str = "memory allocation error";
+ break;
+ case SRD_ERR_ARG:
+ str = "invalid argument";
+ break;
+ case SRD_ERR_BUG:
+ str = "internal error";
+ break;
+ case SRD_ERR_PYTHON:
+ str = "Python API error";
+ break;
+ case SRD_ERR_DECODERS_DIR:
+ str = "decoders directory access error";
+ break;
+ default:
+ str = "unknown error";
+ break;
+ }
+
+ return str;
+}
+
+/**
+ * Return the "name" string of the given libsigrokdecode error code.
+ *
+ * For example, the "name" of the SRD_ERR_MALLOC error code is
+ * "SRD_ERR_MALLOC", the name of the SRD_OK code is "SRD_OK", and so on.
+ *
+ * This function can be used for various purposes where the "name" string of
+ * a libsigrokdecode error code is useful.
+ *
+ * @param error_code A libsigrokdecode error code number, such as
+ * SRD_ERR_MALLOC.
+ *
+ * @return A const string containing the "name" of the error code as string.
+ * The string must NOT be free'd by the caller!
+ *
+ * @see srd_strerror
+ *
+ * @since 0.2.0
+ */
+SRD_API const char *srd_strerror_name(int error_code)
+{
+ const char *str;
+
+ /*
+ * Note: All defined SRD_* error macros from libsigrokdecode.h must
+ * have an entry in this function, as well as in srd_strerror().
+ */
+
+ switch (error_code) {
+ case SRD_OK:
+ str = "SRD_OK";
+ break;
+ case SRD_ERR:
+ str = "SRD_ERR";
+ break;
+ case SRD_ERR_MALLOC:
+ str = "SRD_ERR_MALLOC";
+ break;
+ case SRD_ERR_ARG:
+ str = "SRD_ERR_ARG";
+ break;
+ case SRD_ERR_BUG:
+ str = "SRD_ERR_BUG";
+ break;
+ case SRD_ERR_PYTHON:
+ str = "SRD_ERR_PYTHON";
+ break;
+ case SRD_ERR_DECODERS_DIR:
+ str = "SRD_ERR_DECODERS_DIR";
+ break;
+ default:
+ str = "unknown error code";
+ break;
+ }
+
+ return str;
+}
+
+/** @} */
diff --git a/exception.c b/exception.c
new file mode 100644
index 0000000..1ce66a8
--- /dev/null
+++ b/exception.c
@@ -0,0 +1,91 @@
+/*
+ * This file is part of the libsigrokdecode project.
+ *
+ * Copyright (C) 2012 Bert Vermeulen <bert at biot.com>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "libsigrokdecode.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include "libsigrokdecode-internal.h"
+#include "config.h"
+#include <stdarg.h>
+#include <glib.h>
+#include <frameobject.h> /* Python header not pulled in by default. */
+
+/** @private */
+SRD_PRIV void srd_exception_catch(const char *format, ...)
+{
+ PyObject *etype, *evalue, *etb, *py_str;
+ PyTracebackObject *py_tb;
+ GString *msg;
+ va_list args;
+ char *ename, *str, *tracestr;
+
+ if (!PyErr_Occurred())
+ /* Nothing is wrong. */
+ return;
+
+ PyErr_Fetch(&etype, &evalue, &etb);
+ PyErr_NormalizeException(&etype, &evalue, &etb);
+
+ if (!(py_str = PyObject_Str(evalue))) {
+ /* Shouldn't happen. */
+ srd_dbg("Failed to convert exception value to string.");
+ return;
+ }
+
+ msg = g_string_sized_new(128);
+ va_start(args, format);
+ g_string_vprintf(msg, format, args);
+ va_end(args);
+
+ /* Can be NULL. */
+ if (evalue)
+ ename = (char *)Py_TYPE(evalue)->tp_name;
+ else
+ ename = "(unknown exception)";
+
+ /* Send the exception error message(s) to srd_err(). */
+ py_str_as_str(py_str, &str);
+ g_string_append(msg, ename);
+ g_string_append(msg, ": ");
+ g_string_append(msg, str);
+ Py_DecRef(py_str);
+ srd_err(msg->str);
+
+ /* Send a more precise error location to srd_dbg(), if we have it. */
+ if (etb && etb != Py_None) {
+ tracestr = NULL;
+ py_tb = (PyTracebackObject *)etb;
+ py_str = PyUnicode_FromFormat("%U:%d in %U",
+ py_tb->tb_frame->f_code->co_filename,
+ py_tb->tb_frame->f_lineno,
+ py_tb->tb_frame->f_code->co_name);
+ py_str_as_str(py_str, &tracestr);
+ Py_DecRef(py_str);
+ g_string_printf(msg, "%s in %s: %s", ename, tracestr, str);
+ srd_dbg(msg->str);
+ g_free(tracestr);
+ }
+ g_free(str);
+ g_string_free(msg, TRUE);
+
+ Py_XDECREF(etype);
+ Py_XDECREF(evalue);
+ Py_XDECREF(etb);
+
+ /* Just in case. */
+ PyErr_Clear();
+}
diff --git a/instance.c b/instance.c
new file mode 100644
index 0000000..8a5ddef
--- /dev/null
+++ b/instance.c
@@ -0,0 +1,664 @@
+/*
+ * This file is part of the libsigrokdecode project.
+ *
+ * Copyright (C) 2010 Uwe Hermann <uwe at hermann-uwe.de>
+ * Copyright (C) 2012 Bert Vermeulen <bert at biot.com>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "libsigrokdecode.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include "libsigrokdecode-internal.h"
+#include "config.h"
+#include <glib.h>
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdint.h>
+
+/** @cond PRIVATE */
+
+extern SRD_PRIV GSList *sessions;
+
+/* type_logic.c */
+extern SRD_PRIV PyTypeObject srd_logic_type;
+
+/** @endcond */
+
+/**
+ * @file
+ *
+ * Decoder instance handling.
+ */
+
+/**
+ * @defgroup grp_instances Decoder instances
+ *
+ * Decoder instance handling.
+ *
+ * @{
+ */
+
+/**
+ * Set one or more options in a decoder instance.
+ *
+ * Handled options are removed from the hash.
+ *
+ * @param di Decoder instance.
+ * @param options A GHashTable of options to set.
+ *
+ * @return SRD_OK upon success, a (negative) error code otherwise.
+ *
+ * @since 0.1.0
+ */
+SRD_API int srd_inst_option_set(struct srd_decoder_inst *di,
+ GHashTable *options)
+{
+ struct srd_decoder_option *sdo;
+ PyObject *py_di_options, *py_optval;
+ GVariant *value;
+ GSList *l;
+ double val_double;
+ gint64 val_int;
+ int ret;
+ const char *val_str;
+
+ if (!di) {
+ srd_err("Invalid decoder instance.");
+ return SRD_ERR_ARG;
+ }
+
+ if (!options) {
+ srd_err("Invalid options GHashTable.");
+ return SRD_ERR_ARG;
+ }
+
+ if (!PyObject_HasAttrString(di->decoder->py_dec, "options")) {
+ /* Decoder has no options. */
+ if (g_hash_table_size(options) == 0) {
+ /* No options provided. */
+ return SRD_OK;
+ } else {
+ srd_err("Protocol decoder has no options.");
+ return SRD_ERR_ARG;
+ }
+ return SRD_OK;
+ }
+
+ ret = SRD_ERR_PYTHON;
+ py_optval = NULL;
+
+ /*
+ * The 'options' tuple is a class variable, but we need to
+ * change it. Changing it directly will affect the entire class,
+ * so we need to create a new object for it, and populate that
+ * instead.
+ */
+ if (!(py_di_options = PyObject_GetAttrString(di->py_inst, "options")))
+ goto err_out;
+ Py_DECREF(py_di_options);
+ py_di_options = PyDict_New();
+ PyObject_SetAttrString(di->py_inst, "options", py_di_options);
+
+ for (l = di->decoder->options; l; l = l->next) {
+ sdo = l->data;
+ if ((value = g_hash_table_lookup(options, sdo->id))) {
+ /* A value was supplied for this option. */
+ if (!g_variant_type_equal(g_variant_get_type(value),
+ g_variant_get_type(sdo->def))) {
+ srd_err("Option '%s' should have the same type "
+ "as the default value.", sdo->id);
+ goto err_out;
+ }
+ } else {
+ /* Use default for this option. */
+ value = sdo->def;
+ }
+ if (g_variant_is_of_type(value, G_VARIANT_TYPE_STRING)) {
+ val_str = g_variant_get_string(value, NULL);
+ if (!(py_optval = PyUnicode_FromString(val_str))) {
+ /* Some UTF-8 encoding error. */
+ PyErr_Clear();
+ srd_err("Option '%s' requires a UTF-8 string value.", sdo->id);
+ goto err_out;
+ }
+ } else if (g_variant_is_of_type(value, G_VARIANT_TYPE_INT64)) {
+ val_int = g_variant_get_int64(value);
+ if (!(py_optval = PyLong_FromLong(val_int))) {
+ /* ValueError Exception */
+ PyErr_Clear();
+ srd_err("Option '%s' has invalid integer value.", sdo->id);
+ goto err_out;
+ }
+ } else if (g_variant_is_of_type(value, G_VARIANT_TYPE_DOUBLE)) {
+ val_double = g_variant_get_double(value);
+ if (!(py_optval = PyFloat_FromDouble(val_double))) {
+ /* ValueError Exception */
+ PyErr_Clear();
+ srd_err("Option '%s' has invalid float value.", sdo->id);
+ goto err_out;
+ }
+ }
+ if (PyDict_SetItemString(py_di_options, sdo->id, py_optval) == -1)
+ goto err_out;
+ /* Not harmful even if we used the default. */
+ g_hash_table_remove(options, sdo->id);
+ }
+ if (g_hash_table_size(options) != 0)
+ srd_warn("Unknown options specified for '%s'", di->inst_id);
+
+ ret = SRD_OK;
+
+err_out:
+ Py_XDECREF(py_optval);
+ if (PyErr_Occurred()) {
+ srd_exception_catch("Stray exception in srd_inst_option_set().");
+ ret = SRD_ERR_PYTHON;
+ }
+
+ return ret;
+}
+
+/* Helper GComparefunc for g_slist_find_custom() in srd_inst_channel_set_all() */
+static gint compare_channel_id(const struct srd_channel *pdch,
+ const char *channel_id)
+{
+ return strcmp(pdch->id, channel_id);
+}
+
+/**
+ * Set all channels in a decoder instance.
+ *
+ * This function sets _all_ channels for the specified decoder instance, i.e.,
+ * it overwrites any channels that were already defined (if any).
+ *
+ * @param di Decoder instance.
+ * @param new_channels A GHashTable of channels to set. Key is channel name,
+ * value is the channel number. Samples passed to this
+ * instance will be arranged in this order.
+ * @param unit_size Number of bytes per sample in the data stream to be passed
+ * to the decoder. The highest channel index specified in the
+ * channel map must lie within a sample unit.
+ *
+ * @return SRD_OK upon success, a (negative) error code otherwise.
+ *
+ * @since 0.3.0
+ */
+SRD_API int srd_inst_channel_set_all(struct srd_decoder_inst *di,
+ GHashTable *new_channels, int unit_size)
+{
+ GVariant *channel_val;
+ GList *l;
+ GSList *sl;
+ struct srd_channel *pdch;
+ int *new_channelmap, new_channelnum, num_required_channels, i;
+ char *channel_id;
+
+ srd_dbg("Setting channels for instance %s with list of %d channels, "
+ "unitsize %d.", di->inst_id, g_hash_table_size(new_channels), unit_size);
+
+ if (g_hash_table_size(new_channels) == 0)
+ /* No channels provided. */
+ return SRD_OK;
+
+ if (di->dec_num_channels == 0) {
+ /* Decoder has no channels. */
+ srd_err("Protocol decoder %s has no channels to define.",
+ di->decoder->name);
+ return SRD_ERR_ARG;
+ }
+
+ new_channelmap = NULL;
+
+ if (!(new_channelmap = g_try_malloc(sizeof(int) * di->dec_num_channels))) {
+ srd_err("Failed to g_malloc() new channel map.");
+ return SRD_ERR_MALLOC;
+ }
+
+ /*
+ * For now, map all indexes to channel -1 (can be overridden later).
+ * This -1 is interpreted as an unspecified channel later.
+ */
+ for (i = 0; i < di->dec_num_channels; i++)
+ new_channelmap[i] = -1;
+
+ for (l = g_hash_table_get_keys(new_channels); l; l = l->next) {
+ channel_id = l->data;
+ channel_val = g_hash_table_lookup(new_channels, channel_id);
+ if (!g_variant_is_of_type(channel_val, G_VARIANT_TYPE_INT32)) {
+ /* Channel name was specified without a value. */
+ srd_err("No channel number was specified for %s.",
+ channel_id);
+ g_free(new_channelmap);
+ return SRD_ERR_ARG;
+ }
+ new_channelnum = g_variant_get_int32(channel_val);
+ if (new_channelnum >= 8 * unit_size) {
+ srd_err("Channel index %d not within data unit (%d bit).",
+ new_channelnum, 8 * unit_size);
+ g_free(new_channelmap);
+ return SRD_ERR_ARG;
+ }
+ if (!(sl = g_slist_find_custom(di->decoder->channels, channel_id,
+ (GCompareFunc)compare_channel_id))) {
+ /* Fall back on optional channels. */
+ if (!(sl = g_slist_find_custom(di->decoder->opt_channels,
+ channel_id, (GCompareFunc) compare_channel_id))) {
+ srd_err("Protocol decoder %s has no channel "
+ "'%s'.", di->decoder->name, channel_id);
+ g_free(new_channelmap);
+ return SRD_ERR_ARG;
+ }
+ }
+ pdch = sl->data;
+ new_channelmap[pdch->order] = new_channelnum;
+ srd_dbg("Setting channel mapping: %s (index %d) = channel %d.",
+ pdch->id, pdch->order, new_channelnum);
+ }
+ di->data_unitsize = unit_size;
+
+ srd_dbg("Final channel map:");
+ num_required_channels = g_slist_length(di->decoder->channels);
+ for (i = 0; i < di->dec_num_channels; i++) {
+ srd_dbg(" - index %d = channel %d (%s)", i, new_channelmap[i],
+ (i < num_required_channels) ? "required" : "optional");
+ }
+
+ /* Report an error if not all required channels were specified. */
+ for (i = 0; i < num_required_channels; i++) {
+ if (new_channelmap[i] != -1)
+ continue;
+ pdch = g_slist_nth(di->decoder->channels, i)->data;
+ srd_err("Required channel '%s' (index %d) was not specified.",
+ pdch->id, i);
+ return SRD_ERR;
+ }
+
+ g_free(di->dec_channelmap);
+ di->dec_channelmap = new_channelmap;
+
+ return SRD_OK;
+}
+
+/**
+ * Create a new protocol decoder instance.
+ *
+ * @param sess The session holding the protocol decoder instance.
+ * @param decoder_id Decoder 'id' field.
+ * @param options GHashtable of options which override the defaults set in
+ * the decoder class. May be NULL.
+ *
+ * @return Pointer to a newly allocated struct srd_decoder_inst, or
+ * NULL in case of failure.
+ *
+ * @since 0.3.0
+ */
+SRD_API struct srd_decoder_inst *srd_inst_new(struct srd_session *sess,
+ const char *decoder_id, GHashTable *options)
+{
+ int i;
+ struct srd_decoder *dec;
+ struct srd_decoder_inst *di;
+ char *inst_id;
+
+ srd_dbg("Creating new %s instance.", decoder_id);
+
+ if (session_is_valid(sess) != SRD_OK) {
+ srd_err("Invalid session.");
+ return NULL;
+ }
+
+ if (!(dec = srd_decoder_get_by_id(decoder_id))) {
+ srd_err("Protocol decoder %s not found.", decoder_id);
+ return NULL;
+ }
+
+ if (!(di = g_try_malloc0(sizeof(struct srd_decoder_inst)))) {
+ srd_err("Failed to g_malloc() instance.");
+ return NULL;
+ }
+
+ di->decoder = dec;
+ di->sess = sess;
+ if (options) {
+ inst_id = g_hash_table_lookup(options, "id");
+ di->inst_id = g_strdup(inst_id ? inst_id : decoder_id);
+ g_hash_table_remove(options, "id");
+ } else
+ di->inst_id = g_strdup(decoder_id);
+
+ /*
+ * Prepare a default channel map, where samples come in the
+ * order in which the decoder class defined them.
+ */
+ di->dec_num_channels = g_slist_length(di->decoder->channels) +
+ g_slist_length(di->decoder->opt_channels);
+ if (di->dec_num_channels) {
+ if (!(di->dec_channelmap =
+ g_try_malloc(sizeof(int) * di->dec_num_channels))) {
+ srd_err("Failed to g_malloc() channel map.");
+ g_free(di);
+ return NULL;
+ }
+ for (i = 0; i < di->dec_num_channels; i++)
+ di->dec_channelmap[i] = i;
+ di->data_unitsize = (di->dec_num_channels + 7) / 8;
+ /*
+ * Will be used to prepare a sample at every iteration
+ * of the instance's decode() method.
+ */
+ if (!(di->channel_samples = g_try_malloc(di->dec_num_channels))) {
+ srd_err("Failed to g_malloc() sample buffer.");
+ g_free(di->dec_channelmap);
+ g_free(di);
+ return NULL;
+ }
+ }
+
+ /* Create a new instance of this decoder class. */
+ if (!(di->py_inst = PyObject_CallObject(dec->py_dec, NULL))) {
+ if (PyErr_Occurred())
+ srd_exception_catch("failed to create %s instance: ",
+ decoder_id);
+ g_free(di->dec_channelmap);
+ g_free(di);
+ return NULL;
+ }
+
+ if (options && srd_inst_option_set(di, options) != SRD_OK) {
+ g_free(di->dec_channelmap);
+ g_free(di);
+ return NULL;
+ }
+
+ /* Instance takes input from a frontend by default. */
+ sess->di_list = g_slist_append(sess->di_list, di);
+
+ return di;
+}
+
+/**
+ * Stack a decoder instance on top of another.
+ *
+ * @param sess The session holding the protocol decoder instances.
+ * @param di_bottom The instance on top of which di_top will be stacked.
+ * @param di_top The instance to go on top.
+ *
+ * @return SRD_OK upon success, a (negative) error code otherwise.
+ *
+ * @since 0.3.0
+ */
+SRD_API int srd_inst_stack(struct srd_session *sess,
+ struct srd_decoder_inst *di_bottom,
+ struct srd_decoder_inst *di_top)
+{
+
+ if (session_is_valid(sess) != SRD_OK) {
+ srd_err("Invalid session.");
+ return SRD_ERR_ARG;
+ }
+
+ if (!di_bottom || !di_top) {
+ srd_err("Invalid from/to instance pair.");
+ return SRD_ERR_ARG;
+ }
+
+ if (g_slist_find(sess->di_list, di_top)) {
+ /* Remove from the unstacked list. */
+ sess->di_list = g_slist_remove(sess->di_list, di_top);
+ }
+
+ /* Stack on top of source di. */
+ di_bottom->next_di = g_slist_append(di_bottom->next_di, di_top);
+
+ srd_dbg("Stacked %s on top of %s.", di_top->inst_id, di_bottom->inst_id);
+
+ return SRD_OK;
+}
+
+/**
+ * Find a decoder instance by its instance ID.
+ *
+ * Only the bottom level of instances are searched -- instances already stacked
+ * on top of another one will not be found.
+ *
+ * @param sess The session holding the protocol decoder instance.
+ * @param inst_id The instance ID to be found.
+ *
+ * @return Pointer to struct srd_decoder_inst, or NULL if not found.
+ *
+ * @since 0.3.0
+ */
+SRD_API struct srd_decoder_inst *srd_inst_find_by_id(struct srd_session *sess,
+ const char *inst_id)
+{
+ GSList *l;
+ struct srd_decoder_inst *tmp, *di;
+
+ if (session_is_valid(sess) != SRD_OK) {
+ srd_err("Invalid session.");
+ return NULL;
+ }
+
+ di = NULL;
+ for (l = sess->di_list; l; l = l->next) {
+ tmp = l->data;
+ if (!strcmp(tmp->inst_id, inst_id)) {
+ di = tmp;
+ break;
+ }
+ }
+
+ return di;
+}
+
+static struct srd_decoder_inst *srd_sess_inst_find_by_obj(
+ struct srd_session *sess, const GSList *stack,
+ const PyObject *obj)
+{
+ const GSList *l;
+ struct srd_decoder_inst *tmp, *di;
+
+ if (session_is_valid(sess) != SRD_OK) {
+ srd_err("Invalid session.");
+ return NULL;
+ }
+
+ di = NULL;
+ for (l = stack ? stack : sess->di_list; di == NULL && l != NULL; l = l->next) {
+ tmp = l->data;
+ if (tmp->py_inst == obj)
+ di = tmp;
+ else if (tmp->next_di)
+ di = srd_sess_inst_find_by_obj(sess, tmp->next_di, obj);
+ }
+
+ return di;
+}
+
+/**
+ * Find a decoder instance by its Python object.
+ *
+ * I.e. find that instance's instantiation of the sigrokdecode.Decoder class.
+ * This will recurse to find the instance anywhere in the stack tree of all
+ * sessions.
+ *
+ * @param stack Pointer to a GSList of struct srd_decoder_inst, indicating the
+ * stack to search. To start searching at the bottom level of
+ * decoder instances, pass NULL.
+ * @param obj The Python class instantiation.
+ *
+ * @return Pointer to struct srd_decoder_inst, or NULL if not found.
+ *
+ * @private
+ *
+ * @since 0.1.0
+ */
+SRD_PRIV struct srd_decoder_inst *srd_inst_find_by_obj(const GSList *stack,
+ const PyObject *obj)
+{
+ struct srd_decoder_inst *di;
+ struct srd_session *sess;
+ GSList *l;
+
+ di = NULL;
+ for (l = sessions; di == NULL && l != NULL; l = l->next) {
+ sess = l->data;
+ di = srd_sess_inst_find_by_obj(sess, stack, obj);
+ }
+
+ return di;
+}
+
+/** @private */
+SRD_PRIV int srd_inst_start(struct srd_decoder_inst *di)
+{
+ PyObject *py_res;
+ GSList *l;
+ struct srd_decoder_inst *next_di;
+ int ret;
+
+ srd_dbg("Calling start() method on protocol decoder instance %s.",
+ di->inst_id);
+
+ if (!(py_res = PyObject_CallMethod(di->py_inst, "start", NULL))) {
+ srd_exception_catch("Protocol decoder instance %s: ",
+ di->inst_id);
+ return SRD_ERR_PYTHON;
+ }
+ Py_DecRef(py_res);
+
+ /* Start all the PDs stacked on top of this one. */
+ for (l = di->next_di; l; l = l->next) {
+ next_di = l->data;
+ if ((ret = srd_inst_start(next_di)) != SRD_OK)
+ return ret;
+ }
+
+ return SRD_OK;
+}
+
+/**
+ * Run the specified decoder function.
+ *
+ * @param di The decoder instance to call. Must not be NULL.
+ * @param start_samplenum The starting sample number for the buffer's sample
+ * set, relative to the start of capture.
+ * @param end_samplenum The ending sample number for the buffer's sample
+ * set, relative to the start of capture.
+ * @param inbuf The buffer to decode. Must not be NULL.
+ * @param inbuflen Length of the buffer. Must be > 0.
+ *
+ * @return SRD_OK upon success, a (negative) error code otherwise.
+ *
+ * @private
+ *
+ * @since 0.1.0
+ */
+SRD_PRIV int srd_inst_decode(const struct srd_decoder_inst *di,
+ uint64_t start_samplenum, uint64_t end_samplenum,
+ const uint8_t *inbuf, uint64_t inbuflen)
+{
+ PyObject *py_res;
+ srd_logic *logic;
+
+ srd_dbg("Calling decode() on instance %s with %" PRIu64 " bytes "
+ "starting at sample %" PRIu64 ".", di->inst_id, inbuflen,
+ start_samplenum);
+
+ /* Return an error upon unusable input. */
+ if (!di) {
+ srd_dbg("empty decoder instance");
+ return SRD_ERR_ARG;
+ }
+ if (!inbuf) {
+ srd_dbg("NULL buffer pointer");
+ return SRD_ERR_ARG;
+ }
+ if (inbuflen == 0) {
+ srd_dbg("empty buffer");
+ return SRD_ERR_ARG;
+ }
+
+ /*
+ * Create new srd_logic object. Each iteration around the PD's loop
+ * will fill one sample into this object.
+ */
+ logic = PyObject_New(srd_logic, &srd_logic_type);
+ Py_INCREF(logic);
+ logic->di = (struct srd_decoder_inst *)di;
+ logic->start_samplenum = start_samplenum;
+ logic->itercnt = 0;
+ logic->inbuf = (uint8_t *)inbuf;
+ logic->inbuflen = inbuflen;
+ logic->sample = PyList_New(2);
+ Py_INCREF(logic->sample);
+
+ Py_IncRef(di->py_inst);
+ if (!(py_res = PyObject_CallMethod(di->py_inst, "decode",
+ "KKO", start_samplenum, end_samplenum, logic))) {
+ srd_exception_catch("Protocol decoder instance %s: ", di->inst_id);
+ return SRD_ERR_PYTHON;
+ }
+ Py_DecRef(py_res);
+
+ return SRD_OK;
+}
+
+/** @private */
+SRD_PRIV void srd_inst_free(struct srd_decoder_inst *di)
+{
+ GSList *l;
+ struct srd_pd_output *pdo;
+
+ srd_dbg("Freeing instance %s", di->inst_id);
+
+ Py_DecRef(di->py_inst);
+ g_free(di->inst_id);
+ g_free(di->dec_channelmap);
+ g_slist_free(di->next_di);
+ for (l = di->pd_output; l; l = l->next) {
+ pdo = l->data;
+ g_free(pdo->proto_id);
+ g_free(pdo);
+ }
+ g_slist_free(di->pd_output);
+ g_free(di);
+}
+
+/** @private */
+SRD_PRIV void srd_inst_free_all(struct srd_session *sess, GSList *stack)
+{
+ GSList *l;
+ struct srd_decoder_inst *di;
+
+ if (session_is_valid(sess) != SRD_OK) {
+ srd_err("Invalid session.");
+ return;
+ }
+
+ di = NULL;
+ for (l = stack ? stack : sess->di_list; di == NULL && l != NULL; l = l->next) {
+ di = l->data;
+ if (di->next_di)
+ srd_inst_free_all(sess, di->next_di);
+ srd_inst_free(di);
+ }
+ if (!stack) {
+ g_slist_free(sess->di_list);
+ sess->di_list = NULL;
+ }
+}
+
+/** @} */
+
diff --git a/libsigrokdecode-internal.h b/libsigrokdecode-internal.h
new file mode 100644
index 0000000..f386cd7
--- /dev/null
+++ b/libsigrokdecode-internal.h
@@ -0,0 +1,78 @@
+/*
+ * This file is part of the libsigrokdecode project.
+ *
+ * Copyright (C) 2011 Uwe Hermann <uwe at hermann-uwe.de>
+ * Copyright (C) 2012 Bert Vermeulen <bert at biot.com>
+ *
+ * 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 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef LIBSIGROKDECODE_LIBSIGROKDECODE_INTERNAL_H
+#define LIBSIGROKDECODE_LIBSIGROKDECODE_INTERNAL_H
+
+#include "libsigrokdecode.h"
+
+struct srd_session {
+ int session_id;
+
+ /* List of decoder instances. */
+ GSList *di_list;
+
+ /* List of frontend callbacks to receive decoder output. */
+ GSList *callbacks;
+};
+
+
+/* srd.c */
+SRD_PRIV int srd_decoder_searchpath_add(const char *path);
+
+/* session.c */
+SRD_PRIV int session_is_valid(struct srd_session *sess);
+SRD_PRIV struct srd_pd_callback *srd_pd_output_callback_find(struct srd_session *sess,
+ int output_type);
+
+/* instance.c */
+SRD_PRIV struct srd_decoder_inst *srd_inst_find_by_obj( const GSList *stack,
+ const PyObject *obj);
+SRD_PRIV int srd_inst_start(struct srd_decoder_inst *di);
+SRD_PRIV int srd_inst_decode(const struct srd_decoder_inst *di,
+ uint64_t start_samplenum, uint64_t end_samplenum,
+ const uint8_t *inbuf, uint64_t inbuflen);
+SRD_PRIV void srd_inst_free(struct srd_decoder_inst *di);
+SRD_PRIV void srd_inst_free_all(struct srd_session *sess, GSList *stack);
+
+/* log.c */
+SRD_PRIV int srd_log(int loglevel, const char *format, ...);
+SRD_PRIV int srd_spew(const char *format, ...);
+SRD_PRIV int srd_dbg(const char *format, ...);
+SRD_PRIV int srd_info(const char *format, ...);
+SRD_PRIV int srd_warn(const char *format, ...);
+SRD_PRIV int srd_err(const char *format, ...);
+
+/* module_sigrokdecode.c */
+PyMODINIT_FUNC PyInit_sigrokdecode(void);
+
+/* util.c */
+SRD_PRIV int py_attr_as_str(const PyObject *py_obj, const char *attr,
+ char **outstr);
+SRD_PRIV int py_dictitem_as_str(const PyObject *py_obj, const char *key,
+ char **outstr);
+SRD_PRIV int py_str_as_str(const PyObject *py_str, char **outstr);
+SRD_PRIV int py_strseq_to_char(const PyObject *py_strseq, char ***outstr);
+
+/* exception.c */
+SRD_PRIV void srd_exception_catch(const char *format, ...);
+
+#endif
diff --git a/libsigrokdecode.h b/libsigrokdecode.h
new file mode 100644
index 0000000..9d2dbd3
--- /dev/null
+++ b/libsigrokdecode.h
@@ -0,0 +1,350 @@
+/*
+ * This file is part of the libsigrokdecode project.
+ *
+ * Copyright (C) 2010 Uwe Hermann <uwe at hermann-uwe.de>
+ * Copyright (C) 2012 Bert Vermeulen <bert at biot.com>
+ *
+ * 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 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef LIBSIGROKDECODE_SIGROKDECODE_H
+#define LIBSIGROKDECODE_SIGROKDECODE_H
+
+#include <Python.h> /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include <stdint.h>
+#include <glib.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct srd_session;
+
+/**
+ * @file
+ *
+ * The public libsigrokdecode header file to be used by frontends.
+ *
+ * This is the only file that libsigrokdecode users (frontends) are supposed
+ * to use and include. There are other header files which get installed with
+ * libsigrokdecode, but those are not meant to be used directly by frontends.
+ *
+ * The correct way to get/use the libsigrokdecode API functions is:
+ *
+ * @code{.c}
+ * #include <libsigrokdecode/libsigrokdecode.h>
+ * @endcode
+ */
+
+/*
+ * All possible return codes of libsigrokdecode functions must be listed here.
+ * Functions should never return hardcoded numbers as status, but rather
+ * use these enum values. All error codes are negative numbers.
+ *
+ * The error codes are globally unique in libsigrokdecode, i.e. if one of the
+ * libsigrokdecode functions returns a "malloc error" it must be exactly the
+ * same return value as used by all other functions to indicate "malloc error".
+ * There must be no functions which indicate two different errors via the
+ * same return code.
+ *
+ * Also, for compatibility reasons, no defined return codes are ever removed
+ * or reused for different errors later. You can only add new entries and
+ * return codes, but never remove or redefine existing ones.
+ */
+
+/** Status/error codes returned by libsigrokdecode functions. */
+enum srd_error_code {
+ SRD_OK = 0, /**< No error */
+ SRD_ERR = -1, /**< Generic/unspecified error */
+ SRD_ERR_MALLOC = -2, /**< Malloc/calloc/realloc error */
+ SRD_ERR_ARG = -3, /**< Function argument error */
+ SRD_ERR_BUG = -4, /**< Errors hinting at internal bugs */
+ SRD_ERR_PYTHON = -5, /**< Python C API error */
+ SRD_ERR_DECODERS_DIR = -6, /**< Protocol decoder path invalid */
+
+ /*
+ * Note: When adding entries here, don't forget to also update the
+ * srd_strerror() and srd_strerror_name() functions in error.c.
+ */
+};
+
+/* libsigrokdecode loglevels. */
+enum srd_loglevel {
+ SRD_LOG_NONE = 0, /**< Output no messages at all. */
+ SRD_LOG_ERR = 1, /**< Output error messages. */
+ SRD_LOG_WARN = 2, /**< Output warnings. */
+ SRD_LOG_INFO = 3, /**< Output informational messages. */
+ SRD_LOG_DBG = 4, /**< Output debug messages. */
+ SRD_LOG_SPEW = 5, /**< Output very noisy debug messages. */
+};
+
+/*
+ * Use SRD_API to mark public API symbols, and SRD_PRIV for private symbols.
+ *
+ * Variables and functions marked 'static' are private already and don't
+ * need SRD_PRIV. However, functions which are not static (because they need
+ * to be used in other libsigrokdecode-internal files) but are also not
+ * meant to be part of the public libsigrokdecode API, must use SRD_PRIV.
+ *
+ * This uses the 'visibility' feature of gcc (requires gcc >= 4.0).
+ *
+ * This feature is not available on MinGW/Windows, as it is a feature of
+ * ELF files and MinGW/Windows uses PE files.
+ *
+ * Details: http://gcc.gnu.org/wiki/Visibility
+ */
+
+/* Marks public libsigrokdecode API symbols. */
+#ifndef _WIN32
+#define SRD_API __attribute__((visibility("default")))
+#else
+#define SRD_API
+#endif
+
+/* Marks private, non-public libsigrokdecode symbols (not part of the API). */
+#ifndef _WIN32
+#define SRD_PRIV __attribute__((visibility("hidden")))
+#else
+#define SRD_PRIV
+#endif
+
+/*
+ * When adding an output type, don't forget to...
+ * - expose it to PDs in controller.c:PyInit_sigrokdecode()
+ * - add a check in module_sigrokdecode.c:Decoder_put()
+ * - add a debug string in type_decoder.c:OUTPUT_TYPES
+ */
+enum srd_output_type {
+ SRD_OUTPUT_ANN,
+ SRD_OUTPUT_PYTHON,
+ SRD_OUTPUT_BINARY,
+ SRD_OUTPUT_META,
+};
+
+enum srd_configkey {
+ SRD_CONF_SAMPLERATE = 10000,
+};
+
+struct srd_decoder {
+ /** The decoder ID. Must be non-NULL and unique for all decoders. */
+ char *id;
+
+ /** The (short) decoder name. Must be non-NULL. */
+ char *name;
+
+ /** The (long) decoder name. Must be non-NULL. */
+ char *longname;
+
+ /** A (short, one-line) description of the decoder. Must be non-NULL. */
+ char *desc;
+
+ /**
+ * The license of the decoder. Valid values: "gplv2+", "gplv3+".
+ * Other values are currently not allowed. Must be non-NULL.
+ */
+ char *license;
+
+ /** List of channels required by this decoder. */
+ GSList *channels;
+
+ /** List of optional channels for this decoder. */
+ GSList *opt_channels;
+
+ /**
+ * List of NULL-terminated char[], containing descriptions of the
+ * supported annotation output.
+ */
+ GSList *annotations;
+
+ /**
+ * List of annotation rows (row items: id, description, and a list
+ * of annotation classes belonging to this row).
+ */
+ GSList *annotation_rows;
+
+ /**
+ * List of NULL-terminated char[], containing descriptions of the
+ * supported binary output.
+ */
+ GSList *binary;
+
+ /** List of decoder options. */
+ GSList *options;
+
+ /** Python module. */
+ PyObject *py_mod;
+
+ /** sigrokdecode.Decoder class. */
+ PyObject *py_dec;
+};
+
+/**
+ * Structure which contains information about one protocol decoder channel.
+ * For example, I2C has two channels, SDA and SCL.
+ */
+struct srd_channel {
+ /** The ID of the channel. Must be non-NULL. */
+ char *id;
+ /** The name of the channel. Must not be NULL. */
+ char *name;
+ /** The description of the channel. Must not be NULL. */
+ char *desc;
+ /** The index of the channel, i.e. its order in the list of channels. */
+ int order;
+};
+
+struct srd_decoder_option {
+ char *id;
+ char *desc;
+ GVariant *def;
+ GSList *values;
+};
+
+struct srd_decoder_annotation_row {
+ char *id;
+ char *desc;
+ GSList *ann_classes;
+};
+
+struct srd_decoder_inst {
+ struct srd_decoder *decoder;
+ struct srd_session *sess;
+ PyObject *py_inst;
+ char *inst_id;
+ GSList *pd_output;
+ int dec_num_channels;
+ int *dec_channelmap;
+ int data_unitsize;
+ uint8_t *channel_samples;
+ GSList *next_di;
+};
+
+struct srd_pd_output {
+ int pdo_id;
+ int output_type;
+ struct srd_decoder_inst *di;
+ char *proto_id;
+ /* Only used for OUTPUT_META. */
+ const GVariantType *meta_type;
+ char *meta_name;
+ char *meta_descr;
+};
+
+struct srd_proto_data {
+ uint64_t start_sample;
+ uint64_t end_sample;
+ struct srd_pd_output *pdo;
+ void *data;
+};
+struct srd_proto_data_annotation {
+ int ann_format;
+ char **ann_text;
+};
+struct srd_proto_data_binary {
+ int bin_class;
+ uint64_t size;
+ const unsigned char *data;
+};
+
+typedef void (*srd_pd_output_callback)(struct srd_proto_data *pdata,
+ void *cb_data);
+
+struct srd_pd_callback {
+ int output_type;
+ srd_pd_output_callback cb;
+ void *cb_data;
+};
+
+/* Custom Python types: */
+
+typedef struct {
+ PyObject_HEAD
+ struct srd_decoder_inst *di;
+ uint64_t start_samplenum;
+ unsigned int itercnt;
+ uint8_t *inbuf;
+ uint64_t inbuflen;
+ PyObject *sample;
+} srd_logic;
+
+
+/* srd.c */
+SRD_API int srd_init(const char *path);
+SRD_API int srd_exit(void);
+
+/* session.c */
+SRD_API int srd_session_new(struct srd_session **sess);
+SRD_API int srd_session_start(struct srd_session *sess);
+SRD_API int srd_session_metadata_set(struct srd_session *sess, int key,
+ GVariant *data);
+SRD_API int srd_session_send(struct srd_session *sess,
+ uint64_t start_samplenum, uint64_t end_samplenum,
+ const uint8_t *inbuf, uint64_t inbuflen);
+SRD_API int srd_session_destroy(struct srd_session *sess);
+SRD_API int srd_pd_output_callback_add(struct srd_session *sess,
+ int output_type, srd_pd_output_callback cb, void *cb_data);
+
+/* decoder.c */
+SRD_API const GSList *srd_decoder_list(void);
+SRD_API struct srd_decoder *srd_decoder_get_by_id(const char *id);
+SRD_API int srd_decoder_load(const char *name);
+SRD_API char *srd_decoder_doc_get(const struct srd_decoder *dec);
+SRD_API int srd_decoder_unload(struct srd_decoder *dec);
+SRD_API int srd_decoder_load_all(void);
+SRD_API int srd_decoder_unload_all(void);
+
+/* instance.c */
+SRD_API int srd_inst_option_set(struct srd_decoder_inst *di,
+ GHashTable *options);
+SRD_API int srd_inst_channel_set_all(struct srd_decoder_inst *di,
+ GHashTable *channels, int unit_size);
+SRD_API struct srd_decoder_inst *srd_inst_new(struct srd_session *sess,
+ const char *id, GHashTable *options);
+SRD_API int srd_inst_stack(struct srd_session *sess,
+ struct srd_decoder_inst *di_from, struct srd_decoder_inst *di_to);
+SRD_API struct srd_decoder_inst *srd_inst_find_by_id(struct srd_session *sess,
+ const char *inst_id);
+
+/* log.c */
+typedef int (*srd_log_callback)(void *cb_data, int loglevel,
+ const char *format, va_list args);
+SRD_API int srd_log_loglevel_set(int loglevel);
+SRD_API int srd_log_loglevel_get(void);
+SRD_API int srd_log_callback_set(srd_log_callback cb, void *cb_data);
+SRD_API int srd_log_callback_set_default(void);
+SRD_API int srd_log_logdomain_set(const char *logdomain);
+SRD_API char *srd_log_logdomain_get(void);
+
+/* error.c */
+SRD_API const char *srd_strerror(int error_code);
+SRD_API const char *srd_strerror_name(int error_code);
+
+/* version.c */
+SRD_API int srd_package_version_major_get(void);
+SRD_API int srd_package_version_minor_get(void);
+SRD_API int srd_package_version_micro_get(void);
+SRD_API const char *srd_package_version_string_get(void);
+SRD_API int srd_lib_version_current_get(void);
+SRD_API int srd_lib_version_revision_get(void);
+SRD_API int srd_lib_version_age_get(void);
+SRD_API const char *srd_lib_version_string_get(void);
+
+#include "version.h"
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/libsigrokdecode.pc.in b/libsigrokdecode.pc.in
new file mode 100644
index 0000000..b180f27
--- /dev/null
+++ b/libsigrokdecode.pc.in
@@ -0,0 +1,15 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libsigrokdecode
+Description: Protocol decoder library of the sigrok logic analyzer software
+URL: http://www.sigrok.org
+Requires:
+Requires.private: glib-2.0
+Version: @VERSION@
+Libs: -L${libdir} -lsigrokdecode
+Libs.private: @LDFLAGS_PYTHON@
+Cflags: -I${includedir} @CPPFLAGS_PYTHON@
+
diff --git a/log.c b/log.c
new file mode 100644
index 0000000..1723a0e
--- /dev/null
+++ b/log.c
@@ -0,0 +1,301 @@
+/*
+ * This file is part of the libsigrokdecode project.
+ *
+ * Copyright (C) 2011-2012 Uwe Hermann <uwe at hermann-uwe.de>
+ *
+ * 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 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "libsigrokdecode.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include "libsigrokdecode-internal.h"
+#include <stdarg.h>
+#include <stdio.h>
+
+/**
+ * @file
+ *
+ * Controlling the libsigrokdecode message logging functionality.
+ */
+
+/**
+ * @defgroup grp_logging Logging
+ *
+ * Controlling the libsigrokdecode message logging functionality.
+ *
+ * @{
+ */
+
+/* Currently selected libsigrokdecode loglevel. Default: SRD_LOG_WARN. */
+static int cur_loglevel = SRD_LOG_WARN; /* Show errors+warnings per default. */
+
+/* Function prototype. */
+static int srd_logv(void *cb_data, int loglevel, const char *format,
+ va_list args);
+
+/* Pointer to the currently selected log callback. Default: srd_logv(). */
+static srd_log_callback srd_log_cb = srd_logv;
+
+/*
+ * Pointer to private data that can be passed to the log callback.
+ * This can be used (for example) by C++ GUIs to pass a "this" pointer.
+ */
+static void *srd_log_cb_data = NULL;
+
+/* Log domain (a short string that is used as prefix for all messages). */
+/** @cond PRIVATE */
+#define LOGDOMAIN_MAXLEN 30
+#define LOGDOMAIN_DEFAULT "srd: "
+/** @endcond */
+static char srd_log_domain[LOGDOMAIN_MAXLEN + 1] = LOGDOMAIN_DEFAULT;
+
+/**
+ * Set the libsigrokdecode loglevel.
+ *
+ * This influences the amount of log messages (debug messages, error messages,
+ * and so on) libsigrokdecode will output. Using SRD_LOG_NONE disables all
+ * messages.
+ *
+ * Note that this function itself will also output log messages. After the
+ * loglevel has changed, it will output a debug message with SRD_LOG_DBG for
+ * example. Whether this message is shown depends on the (new) loglevel.
+ *
+ * @param loglevel The loglevel to set (SRD_LOG_NONE, SRD_LOG_ERR,
+ * SRD_LOG_WARN, SRD_LOG_INFO, SRD_LOG_DBG, or SRD_LOG_SPEW).
+ *
+ * @return SRD_OK upon success, SRD_ERR_ARG upon invalid loglevel.
+ *
+ * @since 0.1.0
+ */
+SRD_API int srd_log_loglevel_set(int loglevel)
+{
+ if (loglevel < SRD_LOG_NONE || loglevel > SRD_LOG_SPEW) {
+ srd_err("Invalid loglevel %d.", loglevel);
+ return SRD_ERR_ARG;
+ }
+
+ cur_loglevel = loglevel;
+
+ srd_dbg("libsigrokdecode loglevel set to %d.", loglevel);
+
+ return SRD_OK;
+}
+
+/**
+ * Get the libsigrokdecode loglevel.
+ *
+ * @return The currently configured libsigrokdecode loglevel.
+ *
+ * @since 0.1.0
+ */
+SRD_API int srd_log_loglevel_get(void)
+{
+ return cur_loglevel;
+}
+
+/**
+ * Set the libsigrokdecode logdomain string.
+ *
+ * @param logdomain The string to use as logdomain for libsigrokdecode log
+ * messages from now on. Must not be NULL. The maximum
+ * length of the string is 30 characters (this does not
+ * include the trailing NUL-byte). Longer strings are
+ * silently truncated.
+ * In order to not use a logdomain, pass an empty string.
+ * The function makes its own copy of the input string, i.e.
+ * the caller does not need to keep it around.
+ *
+ * @return SRD_OK upon success, SRD_ERR_ARG upon invalid logdomain.
+ *
+ * @since 0.1.0
+ */
+SRD_API int srd_log_logdomain_set(const char *logdomain)
+{
+ if (!logdomain) {
+ srd_err("log: %s: logdomain was NULL", __func__);
+ return SRD_ERR_ARG;
+ }
+
+ snprintf((char *)&srd_log_domain, LOGDOMAIN_MAXLEN, "%s", logdomain);
+
+ srd_dbg("Log domain set to '%s'.", (const char *)&srd_log_domain);
+
+ return SRD_OK;
+}
+
+/**
+ * Get the currently configured libsigrokdecode logdomain.
+ *
+ * @return A copy of the currently configured libsigrokdecode logdomain
+ * string. The caller is responsible for g_free()ing the string when
+ * it is no longer needed.
+ *
+ * @since 0.1.0
+ */
+SRD_API char *srd_log_logdomain_get(void)
+{
+ return g_strdup((const char *)&srd_log_domain);
+}
+
+/**
+ * Set the libsigrokdecode log callback to the specified function.
+ *
+ * @param cb Function pointer to the log callback function to use.
+ * Must not be NULL.
+ * @param cb_data Pointer to private data to be passed on. This can be used
+ * by the caller to pass arbitrary data to the log functions.
+ * This pointer is only stored or passed on by libsigrokdecode,
+ * and is never used or interpreted in any way. The pointer
+ * is allowed to be NULL if the caller doesn't need/want to
+ * pass any data.
+ *
+ * @return SRD_OK upon success, SRD_ERR_ARG upon invalid arguments.
+ *
+ * @since 0.3.0
+ */
+SRD_API int srd_log_callback_set(srd_log_callback cb, void *cb_data)
+{
+ if (!cb) {
+ srd_err("log: %s: cb was NULL", __func__);
+ return SRD_ERR_ARG;
+ }
+
+ /* Note: 'cb_data' is allowed to be NULL. */
+
+ srd_log_cb = cb;
+ srd_log_cb_data = cb_data;
+
+ return SRD_OK;
+}
+
+/**
+ * Set the libsigrokdecode log callback to the default built-in one.
+ *
+ * Additionally, the internal 'srd_log_cb_data' pointer is set to NULL.
+ *
+ * @return SRD_OK upon success, a (negative) error code otherwise.
+ *
+ * @since 0.1.0
+ */
+SRD_API int srd_log_callback_set_default(void)
+{
+ /*
+ * Note: No log output in this function, as it should safely work
+ * even if the currently set log callback is buggy/broken.
+ */
+ srd_log_cb = srd_logv;
+ srd_log_cb_data = NULL;
+
+ return SRD_OK;
+}
+
+static int srd_logv(void *cb_data, int loglevel, const char *format,
+ va_list args)
+{
+ int ret;
+
+ /* This specific log callback doesn't need the void pointer data. */
+ (void)cb_data;
+
+ /* Only output messages of at least the selected loglevel(s). */
+ if (loglevel > cur_loglevel)
+ return SRD_OK;
+
+ if (srd_log_domain[0] != '\0')
+ fprintf(stderr, "%s", srd_log_domain);
+ ret = vfprintf(stderr, format, args);
+ fprintf(stderr, "\n");
+
+ return ret;
+}
+
+/** @private */
+SRD_PRIV int srd_log(int loglevel, const char *format, ...)
+{
+ int ret;
+ va_list args;
+
+ va_start(args, format);
+ ret = srd_log_cb(srd_log_cb_data, loglevel, format, args);
+ va_end(args);
+
+ return ret;
+}
+
+/** @private */
+SRD_PRIV int srd_spew(const char *format, ...)
+{
+ int ret;
+ va_list args;
+
+ va_start(args, format);
+ ret = srd_log_cb(srd_log_cb_data, SRD_LOG_SPEW, format, args);
+ va_end(args);
+
+ return ret;
+}
+
+/** @private */
+SRD_PRIV int srd_dbg(const char *format, ...)
+{
+ int ret;
+ va_list args;
+
+ va_start(args, format);
+ ret = srd_log_cb(srd_log_cb_data, SRD_LOG_DBG, format, args);
+ va_end(args);
+
+ return ret;
+}
+
+/** @private */
+SRD_PRIV int srd_info(const char *format, ...)
+{
+ int ret;
+ va_list args;
+
+ va_start(args, format);
+ ret = srd_log_cb(srd_log_cb_data, SRD_LOG_INFO, format, args);
+ va_end(args);
+
+ return ret;
+}
+
+/** @private */
+SRD_PRIV int srd_warn(const char *format, ...)
+{
+ int ret;
+ va_list args;
+
+ va_start(args, format);
+ ret = srd_log_cb(srd_log_cb_data, SRD_LOG_WARN, format, args);
+ va_end(args);
+
+ return ret;
+}
+
+/** @private */
+SRD_PRIV int srd_err(const char *format, ...)
+{
+ int ret;
+ va_list args;
+
+ va_start(args, format);
+ ret = srd_log_cb(srd_log_cb_data, SRD_LOG_ERR, format, args);
+ va_end(args);
+
+ return ret;
+}
+
+/** @} */
diff --git a/module_sigrokdecode.c b/module_sigrokdecode.c
new file mode 100644
index 0000000..d5172d6
--- /dev/null
+++ b/module_sigrokdecode.c
@@ -0,0 +1,88 @@
+/*
+ * This file is part of the libsigrokdecode project.
+ *
+ * Copyright (C) 2012 Bert Vermeulen <bert at biot.com>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "libsigrokdecode.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include "libsigrokdecode-internal.h"
+#include "config.h"
+
+/** @cond PRIVATE */
+
+/* type_decoder.c */
+extern SRD_PRIV PyTypeObject srd_Decoder_type;
+
+/* type_logic.c */
+extern SRD_PRIV PyTypeObject srd_logic_type;
+
+/*
+ * When initialized, a reference to this module inside the Python interpreter
+ * lives here.
+ */
+SRD_PRIV PyObject *mod_sigrokdecode = NULL;
+
+/** @endcond */
+
+static struct PyModuleDef sigrokdecode_module = {
+ PyModuleDef_HEAD_INIT,
+ .m_name = "sigrokdecode",
+ .m_doc = "sigrokdecode module",
+ .m_size = -1,
+};
+
+/** @cond PRIVATE */
+PyMODINIT_FUNC PyInit_sigrokdecode(void)
+{
+ PyObject *mod;
+
+ /* tp_new needs to be assigned here for compiler portability. */
+ srd_Decoder_type.tp_new = PyType_GenericNew;
+ if (PyType_Ready(&srd_Decoder_type) < 0)
+ return NULL;
+
+ srd_logic_type.tp_new = PyType_GenericNew;
+ if (PyType_Ready(&srd_logic_type) < 0)
+ return NULL;
+
+ mod = PyModule_Create(&sigrokdecode_module);
+ Py_INCREF(&srd_Decoder_type);
+ if (PyModule_AddObject(mod, "Decoder",
+ (PyObject *)&srd_Decoder_type) == -1)
+ return NULL;
+ Py_INCREF(&srd_logic_type);
+ if (PyModule_AddObject(mod, "srd_logic",
+ (PyObject *)&srd_logic_type) == -1)
+ return NULL;
+
+ /* Expose output types as symbols in the sigrokdecode module */
+ if (PyModule_AddIntConstant(mod, "OUTPUT_ANN", SRD_OUTPUT_ANN) == -1)
+ return NULL;
+ if (PyModule_AddIntConstant(mod, "OUTPUT_PYTHON", SRD_OUTPUT_PYTHON) == -1)
+ return NULL;
+ if (PyModule_AddIntConstant(mod, "OUTPUT_BINARY", SRD_OUTPUT_BINARY) == -1)
+ return NULL;
+ if (PyModule_AddIntConstant(mod, "OUTPUT_META", SRD_OUTPUT_META) == -1)
+ return NULL;
+ /* Expose meta input symbols. */
+ if (PyModule_AddIntConstant(mod, "SRD_CONF_SAMPLERATE", SRD_CONF_SAMPLERATE) == -1)
+ return NULL;
+
+ mod_sigrokdecode = mod;
+
+ return mod;
+}
+/** @endcond */
diff --git a/session.c b/session.c
new file mode 100644
index 0000000..24846c5
--- /dev/null
+++ b/session.c
@@ -0,0 +1,352 @@
+/*
+ * This file is part of the libsigrokdecode project.
+ *
+ * Copyright (C) 2010 Uwe Hermann <uwe at hermann-uwe.de>
+ * Copyright (C) 2013 Bert Vermeulen <bert at biot.com>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "libsigrokdecode.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include "libsigrokdecode-internal.h"
+#include "config.h"
+#include <inttypes.h>
+#include <glib.h>
+
+/**
+ * @file
+ *
+ * Session handling.
+ */
+
+/**
+ * @defgroup grp_session Session handling
+ *
+ * Starting and handling decoding sessions.
+ *
+ * @{
+ */
+
+/** @cond PRIVATE */
+
+SRD_PRIV GSList *sessions = NULL;
+SRD_PRIV int max_session_id = -1;
+
+/** @endcond */
+
+/** @private */
+SRD_PRIV int session_is_valid(struct srd_session *sess)
+{
+
+ if (!sess || sess->session_id < 1)
+ return SRD_ERR;
+
+ return SRD_OK;
+}
+
+/**
+ * Create a decoding session.
+ *
+ * A session holds all decoder instances, their stack relationships and
+ * output callbacks.
+ *
+ * @param sess A pointer which will hold a pointer to a newly
+ * initialized session on return.
+ *
+ * @return SRD_OK upon success, a (negative) error code otherwise.
+ *
+ * @since 0.3.0
+ */
+SRD_API int srd_session_new(struct srd_session **sess)
+{
+
+ if (!sess) {
+ srd_err("Invalid session pointer.");
+ return SRD_ERR_ARG;
+ }
+
+ if (!(*sess = g_try_malloc(sizeof(struct srd_session))))
+ return SRD_ERR_MALLOC;
+ (*sess)->session_id = ++max_session_id;
+ (*sess)->di_list = (*sess)->callbacks = NULL;
+
+ /* Keep a list of all sessions, so we can clean up as needed. */
+ sessions = g_slist_append(sessions, *sess);
+
+ srd_dbg("Created session %d.", (*sess)->session_id);
+
+ return SRD_OK;
+}
+
+/**
+ * Start a decoding session.
+ *
+ * Decoders, instances and stack must have been prepared beforehand,
+ * and all SRD_CONF parameters set.
+ *
+ * @param sess The session to start.
+ *
+ * @return SRD_OK upon success, a (negative) error code otherwise.
+ *
+ * @since 0.3.0
+ */
+SRD_API int srd_session_start(struct srd_session *sess)
+{
+ GSList *d;
+ struct srd_decoder_inst *di;
+ int ret;
+
+ if (session_is_valid(sess) != SRD_OK) {
+ srd_err("Invalid session pointer.");
+ return SRD_ERR;
+ }
+
+ srd_dbg("Calling start() on all instances in session %d.", sess->session_id);
+
+ /* Run the start() method on all decoders receiving frontend data. */
+ ret = SRD_OK;
+ for (d = sess->di_list; d; d = d->next) {
+ di = d->data;
+ if ((ret = srd_inst_start(di)) != SRD_OK)
+ break;
+ }
+
+ return ret;
+}
+
+static int srd_inst_send_meta(struct srd_decoder_inst *di, int key,
+ GVariant *data)
+{
+ PyObject *py_ret;
+
+ if (key != SRD_CONF_SAMPLERATE)
+ /* This is the only key we pass on to the decoder for now. */
+ return SRD_OK;
+
+ if (!PyObject_HasAttrString(di->py_inst, "metadata"))
+ /* This decoder doesn't want metadata, that's fine. */
+ return SRD_OK;
+
+ py_ret = PyObject_CallMethod(di->py_inst, "metadata", "lK",
+ (long)SRD_CONF_SAMPLERATE,
+ (unsigned long long)g_variant_get_uint64(data));
+ Py_XDECREF(py_ret);
+
+ return SRD_OK;
+}
+
+/**
+ * Set a metadata configuration key in a session.
+ *
+ * @param sess The session to configure.
+ * @param key The configuration key (SRD_CONF_*).
+ * @param data The new value for the key, as a GVariant with GVariantType
+ * appropriate to that key. A floating reference can be passed
+ * in; its refcount will be sunk and unreferenced after use.
+ *
+ * @return SRD_OK upon success, a (negative) error code otherwise.
+ *
+ * @since 0.3.0
+ */
+SRD_API int srd_session_metadata_set(struct srd_session *sess, int key,
+ GVariant *data)
+{
+ GSList *l;
+ int ret;
+
+ if (session_is_valid(sess) != SRD_OK) {
+ srd_err("Invalid session.");
+ return SRD_ERR_ARG;
+ }
+
+ if (!key) {
+ srd_err("Invalid key.");
+ return SRD_ERR_ARG;
+ }
+
+ if (!data) {
+ srd_err("Invalid value.");
+ return SRD_ERR_ARG;
+ }
+
+ /* Hardcoded to samplerate/uint64 for now. */
+
+ if (key != SRD_CONF_SAMPLERATE) {
+ srd_err("Unknown config key %d.", key);
+ return SRD_ERR_ARG;
+ }
+ if (!g_variant_is_of_type(data, G_VARIANT_TYPE_UINT64)) {
+ srd_err("Invalid value type: expected uint64, got %s",
+ g_variant_get_type_string(data));
+ return SRD_ERR_ARG;
+ }
+
+ srd_dbg("Setting session %d samplerate to %"PRIu64".",
+ sess->session_id, g_variant_get_uint64(data));
+
+ ret = SRD_OK;
+ for (l = sess->di_list; l; l = l->next) {
+ if ((ret = srd_inst_send_meta(l->data, key, data)) != SRD_OK)
+ break;
+ }
+
+ g_variant_unref(data);
+
+ return ret;
+}
+
+/**
+ * Send a chunk of logic sample data to a running decoder session.
+ *
+ * If no channel map has been set up, the logic samples must be arranged
+ * in channel order, in the least amount of space possible. The default
+ * channel set consists of all required channels + all optional channels.
+ *
+ * The size of a sample in inbuf is the unit size passed to
+ * srd_inst_channel_set_all(). If no channel map has been configured, it is
+ * the minimum number of bytes needed to store the default channels.
+ *
+ * @param sess The session to use.
+ * @param start_samplenum The sample number of the first sample in this chunk.
+ * @param end_samplenum The sample number of the last sample in this chunk.
+ * @param inbuf Pointer to sample data.
+ * @param inbuflen Length in bytes of the buffer.
+ *
+ * @return SRD_OK upon success, a (negative) error code otherwise.
+ *
+ * @since 0.3.0
+ */
+SRD_API int srd_session_send(struct srd_session *sess,
+ uint64_t start_samplenum, uint64_t end_samplenum,
+ const uint8_t *inbuf, uint64_t inbuflen)
+{
+ GSList *d;
+ int ret;
+
+ if (session_is_valid(sess) != SRD_OK) {
+ srd_err("Invalid session.");
+ return SRD_ERR_ARG;
+ }
+
+ srd_dbg("Calling decode() on all instances with starting sample "
+ "number %" PRIu64 ", %" PRIu64 " bytes at 0x%p",
+ start_samplenum, inbuflen, inbuf);
+
+ for (d = sess->di_list; d; d = d->next) {
+ if ((ret = srd_inst_decode(d->data, start_samplenum,
+ end_samplenum, inbuf, inbuflen)) != SRD_OK)
+ return ret;
+ }
+
+ return SRD_OK;
+}
+
+/**
+ * Destroy a decoding session.
+ *
+ * All decoder instances and output callbacks are properly released.
+ *
+ * @param sess The session to be destroyed.
+ *
+ * @return SRD_OK upon success, a (negative) error code otherwise.
+ *
+ * @since 0.3.0
+ */
+SRD_API int srd_session_destroy(struct srd_session *sess)
+{
+ int session_id;
+
+ if (!sess) {
+ srd_err("Invalid session.");
+ return SRD_ERR_ARG;
+ }
+
+ session_id = sess->session_id;
+ if (sess->di_list)
+ srd_inst_free_all(sess, NULL);
+ if (sess->callbacks)
+ g_slist_free_full(sess->callbacks, g_free);
+ sessions = g_slist_remove(sessions, sess);
+ g_free(sess);
+
+ srd_dbg("Destroyed session %d.", session_id);
+
+ return SRD_OK;
+}
+
+/**
+ * Register/add a decoder output callback function.
+ *
+ * The function will be called when a protocol decoder sends output back
+ * to the PD controller (except for Python objects, which only go up the
+ * stack).
+ *
+ * @param sess The output session in which to register the callback.
+ * @param output_type The output type this callback will receive. Only one
+ * callback per output type can be registered.
+ * @param cb The function to call. Must not be NULL.
+ * @param cb_data Private data for the callback function. Can be NULL.
+ *
+ * @since 0.3.0
+ */
+SRD_API int srd_pd_output_callback_add(struct srd_session *sess,
+ int output_type, srd_pd_output_callback cb, void *cb_data)
+{
+ struct srd_pd_callback *pd_cb;
+
+ if (session_is_valid(sess) != SRD_OK) {
+ srd_err("Invalid session.");
+ return SRD_ERR_ARG;
+ }
+
+ srd_dbg("Registering new callback for output type %d.", output_type);
+
+ if (!(pd_cb = g_try_malloc(sizeof(struct srd_pd_callback)))) {
+ srd_err("Failed to g_malloc() struct srd_pd_callback.");
+ return SRD_ERR_MALLOC;
+ }
+
+ pd_cb->output_type = output_type;
+ pd_cb->cb = cb;
+ pd_cb->cb_data = cb_data;
+ sess->callbacks = g_slist_append(sess->callbacks, pd_cb);
+
+ return SRD_OK;
+}
+
+/** @private */
+SRD_PRIV struct srd_pd_callback *srd_pd_output_callback_find(
+ struct srd_session *sess, int output_type)
+{
+ GSList *l;
+ struct srd_pd_callback *tmp, *pd_cb;
+
+ if (session_is_valid(sess) != SRD_OK) {
+ srd_err("Invalid session.");
+ return NULL;
+ }
+
+ pd_cb = NULL;
+ for (l = sess->callbacks; l; l = l->next) {
+ tmp = l->data;
+ if (tmp->output_type == output_type) {
+ pd_cb = tmp;
+ break;
+ }
+ }
+
+ return pd_cb;
+}
+
+/** @} */
diff --git a/srd.c b/srd.c
new file mode 100644
index 0000000..599d190
--- /dev/null
+++ b/srd.c
@@ -0,0 +1,264 @@
+/*
+ * This file is part of the libsigrokdecode project.
+ *
+ * Copyright (C) 2010 Uwe Hermann <uwe at hermann-uwe.de>
+ * Copyright (C) 2013 Bert Vermeulen <bert at biot.com>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "libsigrokdecode.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include "libsigrokdecode-internal.h"
+#include "config.h"
+#include <glib.h>
+
+/** @cond PRIVATE */
+
+/* Python module search paths */
+SRD_PRIV GSList *searchpaths = NULL;
+
+/* session.c */
+extern SRD_PRIV GSList *sessions;
+extern SRD_PRIV int max_session_id;
+
+/** @endcond */
+
+/**
+ * @mainpage libsigrokdecode API
+ *
+ * @section sec_intro Introduction
+ *
+ * The <a href="http://sigrok.org">sigrok</a> project aims at creating a
+ * portable, cross-platform, Free/Libre/Open-Source signal analysis software
+ * suite that supports various device types (such as logic analyzers,
+ * oscilloscopes, multimeters, and more).
+ *
+ * <a href="http://sigrok.org/wiki/Libsigrokdecode">libsigrokdecode</a> is a
+ * shared library written in C which provides the basic API for (streaming)
+ * protocol decoding functionality.
+ *
+ * The <a href="http://sigrok.org/wiki/Protocol_decoders">protocol decoders</a>
+ * are written in Python (>= 3.0).
+ *
+ * @section sec_api API reference
+ *
+ * See the "Modules" page for an introduction to various libsigrokdecode
+ * related topics and the detailed API documentation of the respective
+ * functions.
+ *
+ * You can also browse the API documentation by file, or review all
+ * data structures.
+ *
+ * @section sec_mailinglists Mailing lists
+ *
+ * There are two mailing lists for sigrok/libsigrokdecode: <a href="https://lists.sourceforge.net/lists/listinfo/sigrok-devel">sigrok-devel</a> and <a href="https://lists.sourceforge.net/lists/listinfo/sigrok-commits">sigrok-commits</a>.
+ *
+ * @section sec_irc IRC
+ *
+ * You can find the sigrok developers in the
+ * <a href="irc://chat.freenode.net/sigrok">\#sigrok</a>
+ * IRC channel on Freenode.
+ *
+ * @section sec_website Website
+ *
+ * <a href="http://sigrok.org/wiki/Libsigrokdecode">sigrok.org/wiki/Libsigrokdecode</a>
+ */
+
+/**
+ * @file
+ *
+ * Initializing and shutting down libsigrokdecode.
+ */
+
+/**
+ * @defgroup grp_init Initialization
+ *
+ * Initializing and shutting down libsigrokdecode.
+ *
+ * Before using any of the libsigrokdecode functionality, srd_init() must
+ * be called to initialize the library.
+ *
+ * When libsigrokdecode functionality is no longer needed, srd_exit() should
+ * be called.
+ *
+ * @{
+ */
+
+/**
+ * Initialize libsigrokdecode.
+ *
+ * This initializes the Python interpreter, and creates and initializes
+ * a "sigrokdecode" Python module.
+ *
+ * Then, it searches for sigrok protocol decoders in the "decoders"
+ * subdirectory of the the libsigrokdecode installation directory.
+ * All decoders that are found are loaded into memory and added to an
+ * internal list of decoders, which can be queried via srd_decoder_list().
+ *
+ * The caller is responsible for calling the clean-up function srd_exit(),
+ * which will properly shut down libsigrokdecode and free its allocated memory.
+ *
+ * Multiple calls to srd_init(), without calling srd_exit() in between,
+ * are not allowed.
+ *
+ * @param path Path to an extra directory containing protocol decoders
+ * which will be added to the Python sys.path. May be NULL.
+ *
+ * @return SRD_OK upon success, a (negative) error code otherwise.
+ * Upon Python errors, SRD_ERR_PYTHON is returned. If the decoders
+ * directory cannot be accessed, SRD_ERR_DECODERS_DIR is returned.
+ * If not enough memory could be allocated, SRD_ERR_MALLOC is returned.
+ *
+ * @since 0.1.0
+ */
+SRD_API int srd_init(const char *path)
+{
+ int ret;
+ char *env_path;
+
+ if (max_session_id != -1) {
+ srd_err("libsigrokdecode is already initialized.");
+ return SRD_ERR;
+ }
+
+ srd_dbg("Initializing libsigrokdecode.");
+
+ /* Add our own module to the list of built-in modules. */
+ PyImport_AppendInittab("sigrokdecode", PyInit_sigrokdecode);
+
+ /* Initialize the Python interpreter. */
+ Py_Initialize();
+
+ /* Installed decoders. */
+ if ((ret = srd_decoder_searchpath_add(DECODERS_DIR)) != SRD_OK) {
+ Py_Finalize();
+ return ret;
+ }
+
+ /* Path specified by the user. */
+ if (path) {
+ if ((ret = srd_decoder_searchpath_add(path)) != SRD_OK) {
+ Py_Finalize();
+ return ret;
+ }
+ }
+
+ /* Environment variable overrides everything, for debugging. */
+ if ((env_path = getenv("SIGROKDECODE_DIR"))) {
+ if ((ret = srd_decoder_searchpath_add(env_path)) != SRD_OK) {
+ Py_Finalize();
+ return ret;
+ }
+ }
+
+ max_session_id = 0;
+
+ return SRD_OK;
+}
+
+/**
+ * Shutdown libsigrokdecode.
+ *
+ * This frees all the memory allocated for protocol decoders and shuts down
+ * the Python interpreter.
+ *
+ * This function should only be called if there was a (successful!) invocation
+ * of srd_init() before. Calling this function multiple times in a row, without
+ * any successful srd_init() calls in between, is not allowed.
+ *
+ * @return SRD_OK upon success, a (negative) error code otherwise.
+ *
+ * @since 0.1.0
+ */
+SRD_API int srd_exit(void)
+{
+ GSList *l;
+
+ srd_dbg("Exiting libsigrokdecode.");
+
+ for (l = sessions; l; l = l->next)
+ srd_session_destroy((struct srd_session *)l->data);
+
+ srd_decoder_unload_all();
+ g_slist_free_full(searchpaths, g_free);
+ searchpaths = NULL;
+
+ /* Py_Finalize() returns void, any finalization errors are ignored. */
+ Py_Finalize();
+
+ max_session_id = -1;
+
+ return SRD_OK;
+}
+
+/**
+ * Add an additional search directory for the protocol decoders.
+ *
+ * The specified directory is prepended (not appended!) to Python's sys.path,
+ * in order to search for sigrok protocol decoders in the specified
+ * directories first, and in the generic Python module directories (and in
+ * the current working directory) last. This avoids conflicts if there are
+ * Python modules which have the same name as a sigrok protocol decoder in
+ * sys.path or in the current working directory.
+ *
+ * @param path Path to the directory containing protocol decoders which shall
+ * be added to the Python sys.path, or NULL.
+ *
+ * @return SRD_OK upon success, a (negative) error code otherwise.
+ *
+ * @private
+ *
+ * @since 0.1.0
+ */
+SRD_PRIV int srd_decoder_searchpath_add(const char *path)
+{
+ PyObject *py_cur_path, *py_item;
+ GString *new_path;
+ int wc_len, i;
+ wchar_t *wc_new_path;
+ char *item;
+
+ srd_dbg("Adding '%s' to module path.", path);
+
+ new_path = g_string_sized_new(256);
+ g_string_assign(new_path, path);
+ py_cur_path = PySys_GetObject("path");
+ for (i = 0; i < PyList_Size(py_cur_path); i++) {
+ g_string_append(new_path, G_SEARCHPATH_SEPARATOR_S);
+ py_item = PyList_GetItem(py_cur_path, i);
+ if (!PyUnicode_Check(py_item))
+ /* Shouldn't happen. */
+ continue;
+ if (py_str_as_str(py_item, &item) != SRD_OK)
+ continue;
+ g_string_append(new_path, item);
+ g_free(item);
+ }
+
+ /* Convert to wide chars. */
+ wc_len = sizeof(wchar_t) * (new_path->len + 1);
+ if (!(wc_new_path = g_try_malloc(wc_len))) {
+ srd_dbg("malloc failed");
+ return SRD_ERR_MALLOC;
+ }
+ mbstowcs(wc_new_path, new_path->str, wc_len);
+ PySys_SetPath(wc_new_path);
+ g_string_free(new_path, TRUE);
+ g_free(wc_new_path);
+ searchpaths = g_slist_append(searchpaths, g_strdup(path));
+
+ return SRD_OK;
+}
+
+/** @} */
diff --git a/tests/check_core.c b/tests/check_core.c
new file mode 100644
index 0000000..e5b7b35
--- /dev/null
+++ b/tests/check_core.c
@@ -0,0 +1,114 @@
+/*
+ * This file is part of the libsigrokdecode project.
+ *
+ * Copyright (C) 2013 Uwe Hermann <uwe at hermann-uwe.de>
+ *
+ * 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 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "../libsigrokdecode.h" /* First, to avoid compiler warning. */
+#include <stdlib.h>
+#include <check.h>
+#include "lib.h"
+
+static void setup(void)
+{
+ /* Silence libsigrokdecode while the unit tests run. */
+ srd_log_loglevel_set(SRD_LOG_NONE);
+}
+
+static void teardown(void)
+{
+}
+
+/*
+ * Check various basic init related things.
+ *
+ * - Check whether an srd_init() call with path == NULL works.
+ * If it returns != SRD_OK (or segfaults) this test will fail.
+ *
+ * - Check whether a subsequent srd_exit() works.
+ * If it returns != SRD_OK (or segfaults) this test will fail.
+ */
+START_TEST(test_init_exit)
+{
+ int ret;
+
+ ret = srd_init(NULL);
+ fail_unless(ret == SRD_OK, "srd_init() failed: %d.", ret);
+ ret = srd_exit();
+ fail_unless(ret == SRD_OK, "srd_exit() failed: %d.", ret);
+}
+END_TEST
+
+/*
+ * Check whether nested srd_init()/srd_exit() calls work/fail correctly.
+ * Two consecutive srd_init() calls without any srd_exit() inbetween are
+ * not allowed and should fail. However, two consecutive srd_exit() calls
+ * are currently allowed, the second one will just be a NOP basically.
+ */
+START_TEST(test_init_exit_2)
+{
+ int ret;
+
+ ret = srd_init(NULL);
+ fail_unless(ret == SRD_OK, "srd_init() 1 failed: %d.", ret);
+ ret = srd_init(NULL);
+ fail_unless(ret != SRD_OK, "srd_init() 2 didn't fail: %d.", ret);
+ ret = srd_exit();
+ fail_unless(ret == SRD_OK, "srd_exit() 2 failed: %d.", ret);
+ ret = srd_exit();
+ fail_unless(ret == SRD_OK, "srd_exit() 1 failed: %d.", ret);
+}
+END_TEST
+
+/*
+ * Check whether three nested srd_init()/srd_exit() calls work/fail correctly.
+ */
+START_TEST(test_init_exit_3)
+{
+ int ret;
+
+ ret = srd_init(NULL);
+ fail_unless(ret == SRD_OK, "srd_init() 1 failed: %d.", ret);
+ ret = srd_init(NULL);
+ fail_unless(ret != SRD_OK, "srd_init() 2 didn't fail: %d.", ret);
+ ret = srd_init(NULL);
+ fail_unless(ret != SRD_OK, "srd_init() 3 didn't fail: %d.", ret);
+ ret = srd_exit();
+ fail_unless(ret == SRD_OK, "srd_exit() 3 failed: %d.", ret);
+ ret = srd_exit();
+ fail_unless(ret == SRD_OK, "srd_exit() 2 failed: %d.", ret);
+ ret = srd_exit();
+ fail_unless(ret == SRD_OK, "srd_exit() 1 failed: %d.", ret);
+}
+END_TEST
+
+Suite *suite_core(void)
+{
+ Suite *s;
+ TCase *tc;
+
+ s = suite_create("core");
+
+ tc = tcase_create("init_exit");
+ tcase_add_checked_fixture(tc, setup, teardown);
+ tcase_add_test(tc, test_init_exit);
+ tcase_add_test(tc, test_init_exit_2);
+ tcase_add_test(tc, test_init_exit_3);
+ suite_add_tcase(s, tc);
+
+ return s;
+}
diff --git a/tests/check_decoder.c b/tests/check_decoder.c
new file mode 100644
index 0000000..527845f
--- /dev/null
+++ b/tests/check_decoder.c
@@ -0,0 +1,354 @@
+/*
+ * This file is part of the libsigrokdecode project.
+ *
+ * Copyright (C) 2013 Uwe Hermann <uwe at hermann-uwe.de>
+ *
+ * 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 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "../libsigrokdecode.h" /* First, to avoid compiler warning. */
+#include <stdlib.h>
+#include <check.h>
+#include "lib.h"
+
+static void setup(void)
+{
+ /* Silence libsigrokdecode while the unit tests run. */
+ srd_log_loglevel_set(SRD_LOG_NONE);
+}
+
+static void teardown(void)
+{
+}
+
+/*
+ * Check whether srd_decoder_load_all() works.
+ * If it returns != SRD_OK (or segfaults) this test will fail.
+ */
+START_TEST(test_load_all)
+{
+ int ret;
+
+ srd_init(DECODERS_DIR);
+ ret = srd_decoder_load_all();
+ fail_unless(ret == SRD_OK, "srd_decoder_load_all() failed: %d.", ret);
+ srd_exit();
+}
+END_TEST
+
+/*
+ * Check whether srd_decoder_load_all() fails without prior srd_init().
+ * If it returns != SRD_OK (or segfaults) this test will fail.
+ * See also: http://sigrok.org/bugzilla/show_bug.cgi?id=178
+ */
+START_TEST(test_load_all_no_init)
+{
+ int ret;
+
+ ret = srd_decoder_load_all();
+ fail_unless(ret != SRD_OK, "srd_decoder_load_all() didn't fail properly.");
+}
+END_TEST
+
+/*
+ * Check whether srd_decoder_load() works.
+ * If it returns != SRD_OK (or segfaults) this test will fail.
+ */
+START_TEST(test_load)
+{
+ int ret;
+
+ srd_init(DECODERS_DIR);
+ ret = srd_decoder_load("uart");
+ fail_unless(ret == SRD_OK, "srd_decoder_load(uart) failed: %d.", ret);
+ ret = srd_decoder_load("spi");
+ fail_unless(ret == SRD_OK, "srd_decoder_load(spi) failed: %d.", ret);
+ ret = srd_decoder_load("usb_signalling");
+ fail_unless(ret == SRD_OK, "srd_decoder_load(usb_signalling) failed: %d.", ret);
+ srd_exit();
+}
+END_TEST
+
+/*
+ * Check whether srd_decoder_load() fails for non-existing or bogus PDs.
+ * If it returns SRD_OK (or segfaults) this test will fail.
+ */
+START_TEST(test_load_bogus)
+{
+ srd_init(DECODERS_DIR);
+ /* http://sigrok.org/bugzilla/show_bug.cgi?id=176 */
+ fail_unless(srd_decoder_load(NULL) != SRD_OK);
+ fail_unless(srd_decoder_load("") != SRD_OK);
+ fail_unless(srd_decoder_load(" ") != SRD_OK);
+ fail_unless(srd_decoder_load("nonexisting") != SRD_OK);
+ fail_unless(srd_decoder_load("UART") != SRD_OK);
+ fail_unless(srd_decoder_load("UaRt") != SRD_OK);
+ fail_unless(srd_decoder_load("u a r t") != SRD_OK);
+ fail_unless(srd_decoder_load("uart ") != SRD_OK);
+ fail_unless(srd_decoder_load(" uart") != SRD_OK);
+ fail_unless(srd_decoder_load(" uart ") != SRD_OK);
+ fail_unless(srd_decoder_load("uart spi") != SRD_OK);
+ srd_exit();
+}
+END_TEST
+
+/*
+ * Check whether srd_decoder_load() works/fails for valid/bogus PDs.
+ * If it returns incorrect values (or segfaults) this test will fail.
+ */
+START_TEST(test_load_valid_and_bogus)
+{
+ srd_init(DECODERS_DIR);
+ fail_unless(srd_decoder_load("") != SRD_OK);
+ fail_unless(srd_decoder_load("uart") == SRD_OK);
+ fail_unless(srd_decoder_load("") != SRD_OK);
+ fail_unless(srd_decoder_load("spi") == SRD_OK);
+ fail_unless(srd_decoder_load("") != SRD_OK);
+ fail_unless(srd_decoder_load("can") == SRD_OK);
+ fail_unless(srd_decoder_load("") != SRD_OK);
+ srd_exit();
+}
+END_TEST
+
+/*
+ * Check whether srd_decoder_load() fails when run multiple times.
+ * If it returns a value != SRD_OK (or segfaults) this test will fail.
+ * See also: http://sigrok.org/bugzilla/show_bug.cgi?id=177
+ */
+START_TEST(test_load_multiple)
+{
+ int ret;
+
+ srd_init(DECODERS_DIR);
+ ret = srd_decoder_load("uart");
+ fail_unless(ret == SRD_OK, "Loading uart PD 1x failed: %d", ret);
+ ret = srd_decoder_load("uart");
+ fail_unless(ret == SRD_OK, "Loading uart PD 2x failed: %d", ret);
+ ret = srd_decoder_load("uart");
+ fail_unless(ret == SRD_OK, "Loading uart PD 3x failed: %d", ret);
+ srd_exit();
+}
+END_TEST
+
+/*
+ * Check whether srd_decoder_load() fails if a non-existing PD dir is used.
+ * If it returns SRD_OK (or segfaults) this test will fail.
+ */
+START_TEST(test_load_nonexisting_pd_dir)
+{
+#if 0
+ /* TODO: Build libsigrokdecode with no default PD dir. */
+ srd_init("/nonexisting_dir");
+ fail_unless(srd_decoder_load("spi") != SRD_OK);
+ fail_unless(g_slist_length((GSList *)srd_decoder_list()) == 0);
+ srd_exit();
+#endif
+}
+END_TEST
+
+/*
+ * Check whether srd_decoder_list() returns a non-empty list.
+ * If it returns an empty list (or segfaults) this test will fail.
+ */
+START_TEST(test_decoder_list)
+{
+ srd_init(DECODERS_DIR);
+ srd_decoder_load_all();
+ fail_unless(srd_decoder_list() != NULL);
+ srd_exit();
+}
+END_TEST
+
+/*
+ * Check whether srd_decoder_list() without prior srd_decoder_load_all()
+ * returns an empty list (return value != NULL).
+ * If it returns a non-empty list (or segfaults) this test will fail.
+ */
+START_TEST(test_decoder_list_no_load)
+{
+ srd_init(DECODERS_DIR);
+ fail_unless(srd_decoder_list() == NULL);
+ srd_exit();
+}
+END_TEST
+
+/*
+ * Check whether srd_decoder_list() without prior srd_init()
+ * returns an empty list.
+ * If it returns a non-empty list (or segfaults) this test will fail.
+ * See also: http://sigrok.org/bugzilla/show_bug.cgi?id=178
+ */
+START_TEST(test_decoder_list_no_init)
+{
+ srd_decoder_load_all();
+ fail_unless(srd_decoder_list() == NULL);
+}
+END_TEST
+
+/*
+ * Check whether srd_decoder_list() without prior srd_init() and without
+ * prior srd_decoder_load_all() returns an empty list.
+ * If it returns a non-empty list (or segfaults) this test will fail.
+ */
+START_TEST(test_decoder_list_no_init_no_load)
+{
+ fail_unless(srd_decoder_list() == NULL);
+}
+END_TEST
+
+/*
+ * Check whether srd_decoder_list() returns the correct number of PDs.
+ * If it returns a wrong number (or segfaults) this test will fail.
+ */
+START_TEST(test_decoder_list_correct_numbers)
+{
+ srd_init(DECODERS_DIR);
+ fail_unless(g_slist_length((GSList *)srd_decoder_list()) == 0);
+ srd_decoder_load("spi");
+ fail_unless(g_slist_length((GSList *)srd_decoder_list()) == 1);
+ srd_decoder_load("uart");
+ fail_unless(g_slist_length((GSList *)srd_decoder_list()) == 2);
+ srd_decoder_load("can");
+ fail_unless(g_slist_length((GSList *)srd_decoder_list()) == 3);
+ srd_decoder_load("can"); /* Load same PD twice. */
+ fail_unless(g_slist_length((GSList *)srd_decoder_list()) == 3);
+ srd_exit();
+}
+END_TEST
+
+/*
+ * Check whether srd_decoder_get_by_id() works.
+ * If it returns NULL for valid PDs (or segfaults) this test will fail.
+ */
+START_TEST(test_get_by_id)
+{
+ srd_init(DECODERS_DIR);
+ srd_decoder_load("uart");
+ fail_unless(srd_decoder_get_by_id("uart") != NULL);
+ fail_unless(srd_decoder_get_by_id("can") == NULL);
+ srd_decoder_load("can");
+ fail_unless(srd_decoder_get_by_id("uart") != NULL);
+ fail_unless(srd_decoder_get_by_id("can") != NULL);
+ srd_exit();
+}
+END_TEST
+
+/*
+ * Check whether srd_decoder_get_by_id() works multiple times in a row.
+ * If it returns NULL for valid PDs (or segfaults) this test will fail.
+ */
+START_TEST(test_get_by_id_multiple)
+{
+ srd_init(DECODERS_DIR);
+ srd_decoder_load("uart");
+ fail_unless(srd_decoder_get_by_id("uart") != NULL);
+ fail_unless(srd_decoder_get_by_id("uart") != NULL);
+ fail_unless(srd_decoder_get_by_id("uart") != NULL);
+ fail_unless(srd_decoder_get_by_id("uart") != NULL);
+ srd_exit();
+}
+END_TEST
+
+/*
+ * Check whether srd_decoder_get_by_id() fails for bogus PDs.
+ * If it returns a value != NULL (or segfaults) this test will fail.
+ */
+START_TEST(test_get_by_id_bogus)
+{
+ srd_init(DECODERS_DIR);
+ fail_unless(srd_decoder_get_by_id(NULL) == NULL);
+ fail_unless(srd_decoder_get_by_id("") == NULL);
+ fail_unless(srd_decoder_get_by_id(" ") == NULL);
+ fail_unless(srd_decoder_get_by_id("nonexisting") == NULL);
+ fail_unless(srd_decoder_get_by_id("sPi") == NULL);
+ fail_unless(srd_decoder_get_by_id("SPI") == NULL);
+ fail_unless(srd_decoder_get_by_id("s p i") == NULL);
+ fail_unless(srd_decoder_get_by_id(" spi") == NULL);
+ fail_unless(srd_decoder_get_by_id("spi ") == NULL);
+ fail_unless(srd_decoder_get_by_id(" spi ") == NULL);
+ fail_unless(srd_decoder_get_by_id("spi uart") == NULL);
+ srd_exit();
+}
+END_TEST
+
+/*
+ * Check whether srd_decoder_doc_get() works.
+ * If it returns NULL for valid PDs (or segfaults) this test will fail.
+ */
+START_TEST(test_doc_get)
+{
+ struct srd_decoder *dec;
+
+ srd_init(DECODERS_DIR);
+ srd_decoder_load("uart");
+ dec = srd_decoder_get_by_id("uart");
+ fail_unless(srd_decoder_doc_get(dec) != NULL);
+ srd_exit();
+}
+END_TEST
+
+/*
+ * Check whether srd_decoder_doc_get() fails with NULL as argument.
+ * If it returns a value != NULL (or segfaults) this test will fail.
+ * See also: http://sigrok.org/bugzilla/show_bug.cgi?id=179
+ */
+START_TEST(test_doc_get_null)
+{
+ srd_init(DECODERS_DIR);
+ fail_unless(srd_decoder_doc_get(NULL) == NULL);
+ srd_exit();
+}
+END_TEST
+
+Suite *suite_decoder(void)
+{
+ Suite *s;
+ TCase *tc;
+
+ s = suite_create("decoder");
+
+ tc = tcase_create("load");
+ tcase_add_checked_fixture(tc, setup, teardown);
+ tcase_add_test(tc, test_load_all);
+ tcase_add_test(tc, test_load_all_no_init);
+ tcase_add_test(tc, test_load);
+ tcase_add_test(tc, test_load_bogus);
+ tcase_add_test(tc, test_load_valid_and_bogus);
+ tcase_add_test(tc, test_load_multiple);
+ tcase_add_test(tc, test_load_nonexisting_pd_dir);
+ suite_add_tcase(s, tc);
+
+ tc = tcase_create("list");
+ tcase_add_checked_fixture(tc, setup, teardown);
+ tcase_add_test(tc, test_decoder_list);
+ tcase_add_test(tc, test_decoder_list_no_load);
+ tcase_add_test(tc, test_decoder_list_no_init);
+ tcase_add_test(tc, test_decoder_list_no_init_no_load);
+ tcase_add_test(tc, test_decoder_list_correct_numbers);
+ suite_add_tcase(s, tc);
+
+ tc = tcase_create("get_by_id");
+ tcase_add_test(tc, test_get_by_id);
+ tcase_add_test(tc, test_get_by_id_multiple);
+ tcase_add_test(tc, test_get_by_id_bogus);
+ suite_add_tcase(s, tc);
+
+ tc = tcase_create("doc_get");
+ tcase_add_test(tc, test_doc_get);
+ tcase_add_test(tc, test_doc_get_null);
+ suite_add_tcase(s, tc);
+
+ return s;
+}
diff --git a/tests/check_inst.c b/tests/check_inst.c
new file mode 100644
index 0000000..fccd2e1
--- /dev/null
+++ b/tests/check_inst.c
@@ -0,0 +1,173 @@
+/*
+ * This file is part of the libsigrokdecode project.
+ *
+ * Copyright (C) 2013 Uwe Hermann <uwe at hermann-uwe.de>
+ *
+ * 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 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "../libsigrokdecode.h" /* First, to avoid compiler warning. */
+#include <stdlib.h>
+#include <check.h>
+#include "lib.h"
+
+static void setup(void)
+{
+ /* Silence libsigrokdecode while the unit tests run. */
+ srd_log_loglevel_set(SRD_LOG_NONE);
+}
+
+static void teardown(void)
+{
+}
+
+/*
+ * Check whether srd_inst_new() works.
+ * If it returns NULL (or segfaults) this test will fail.
+ */
+START_TEST(test_inst_new)
+{
+ struct srd_session *sess;
+ struct srd_decoder_inst *inst;
+
+ srd_init(DECODERS_DIR);
+ srd_decoder_load("uart");
+ srd_session_new(&sess);
+ inst = srd_inst_new(sess, "uart", NULL);
+ fail_unless(inst != NULL, "srd_inst_new() failed.");
+ srd_exit();
+}
+END_TEST
+
+/*
+ * Check whether multiple srd_inst_new() calls work.
+ * If any of them returns NULL (or segfaults) this test will fail.
+ */
+START_TEST(test_inst_new_multiple)
+{
+ struct srd_session *sess;
+ struct srd_decoder_inst *inst1, *inst2, *inst3;
+
+ inst1 = inst2 = inst3 = NULL;
+
+ srd_init(DECODERS_DIR);
+ srd_decoder_load_all();
+ srd_session_new(&sess);
+
+ /* Multiple srd_inst_new() calls must work. */
+ inst1 = srd_inst_new(sess, "uart", NULL);
+ fail_unless(inst1 != NULL, "srd_inst_new() 1 failed.");
+ inst2 = srd_inst_new(sess, "spi", NULL);
+ fail_unless(inst2 != NULL, "srd_inst_new() 2 failed.");
+ inst3 = srd_inst_new(sess, "can", NULL);
+ fail_unless(inst3 != NULL, "srd_inst_new() 3 failed.");
+
+ /* The returned instance pointers must not be the same. */
+ fail_unless(inst1 != inst2);
+ fail_unless(inst1 != inst3);
+ fail_unless(inst2 != inst3);
+
+ /* Each instance must have another py_inst than any of the others. */
+ fail_unless(inst1->py_inst != inst2->py_inst);
+ fail_unless(inst1->py_inst != inst3->py_inst);
+ fail_unless(inst2->py_inst != inst3->py_inst);
+
+ srd_exit();
+}
+END_TEST
+
+/*
+ * Check whether srd_inst_option_set() works for an empty options hash.
+ * If it returns != SRD_OK (or segfaults) this test will fail.
+ */
+START_TEST(test_inst_option_set_empty)
+{
+ int ret;
+ struct srd_session *sess;
+ struct srd_decoder_inst *inst;
+ GHashTable *options;
+
+ srd_init(DECODERS_DIR);
+ srd_decoder_load_all();
+ srd_session_new(&sess);
+ inst = srd_inst_new(sess, "uart", NULL);
+ options = g_hash_table_new_full(g_str_hash, g_str_equal, g_free,
+ (GDestroyNotify)g_variant_unref);
+ ret = srd_inst_option_set(inst, options);
+ fail_unless(ret == SRD_OK, "srd_inst_option_set() with empty options "
+ "hash failed: %d.", ret);
+ srd_exit();
+}
+END_TEST
+
+/*
+ * Check whether srd_inst_option_set() works for bogus options.
+ * If it returns != SRD_OK (or segfaults) this test will fail.
+ */
+START_TEST(test_inst_option_set_bogus)
+{
+ int ret;
+ struct srd_session *sess;
+ struct srd_decoder_inst *inst;
+ GHashTable *options;
+
+ srd_init(DECODERS_DIR);
+ srd_decoder_load_all();
+ srd_session_new(&sess);
+ inst = srd_inst_new(sess, "uart", NULL);
+
+ options = g_hash_table_new_full(g_str_hash, g_str_equal, g_free,
+ (GDestroyNotify)g_variant_unref);
+
+ /* NULL instance. */
+ ret = srd_inst_option_set(NULL, options);
+ fail_unless(ret != SRD_OK, "srd_inst_option_set() with NULL "
+ "instance failed: %d.", ret);
+
+ /* NULL 'options' GHashTable. */
+ ret = srd_inst_option_set(inst, NULL);
+ fail_unless(ret != SRD_OK, "srd_inst_option_set() with NULL "
+ "options hash failed: %d.", ret);
+
+ /* NULL instance and NULL 'options' GHashTable. */
+ ret = srd_inst_option_set(NULL, NULL);
+ fail_unless(ret != SRD_OK, "srd_inst_option_set() with NULL "
+ "instance and NULL options hash failed: %d.", ret);
+
+ srd_exit();
+}
+END_TEST
+
+Suite *suite_inst(void)
+{
+ Suite *s;
+ TCase *tc;
+
+ s = suite_create("inst");
+
+ tc = tcase_create("new");
+ tcase_add_checked_fixture(tc, setup, teardown);
+ tcase_add_test(tc, test_inst_new);
+ tcase_add_test(tc, test_inst_new_multiple);
+ suite_add_tcase(s, tc);
+
+ tc = tcase_create("option");
+ tcase_add_checked_fixture(tc, setup, teardown);
+ tcase_add_test(tc, test_inst_option_set_empty);
+ tcase_add_test(tc, test_inst_option_set_bogus);
+ suite_add_tcase(s, tc);
+
+ return s;
+}
diff --git a/tests/check_main.c b/tests/check_main.c
new file mode 100644
index 0000000..6af3c3f
--- /dev/null
+++ b/tests/check_main.c
@@ -0,0 +1,46 @@
+/*
+ * This file is part of the libsigrokdecode project.
+ *
+ * Copyright (C) 2013 Uwe Hermann <uwe at hermann-uwe.de>
+ *
+ * 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 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "../libsigrokdecode.h" /* First, to avoid compiler warning. */
+#include <stdlib.h>
+#include <check.h>
+#include "lib.h"
+
+int main(void)
+{
+ int ret;
+ Suite *s;
+ SRunner *srunner;
+
+ s = suite_create("mastersuite");
+ srunner = srunner_create(s);
+
+ /* Add all testsuites to the master suite. */
+ srunner_add_suite(srunner, suite_core());
+ srunner_add_suite(srunner, suite_decoder());
+ srunner_add_suite(srunner, suite_inst());
+ srunner_add_suite(srunner, suite_session());
+
+ srunner_run_all(srunner, CK_VERBOSE);
+ ret = srunner_ntests_failed(srunner);
+ srunner_free(srunner);
+
+ return (ret == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/tests/check_session.c b/tests/check_session.c
new file mode 100644
index 0000000..f411854
--- /dev/null
+++ b/tests/check_session.c
@@ -0,0 +1,260 @@
+/*
+ * This file is part of the libsigrokdecode project.
+ *
+ * Copyright (C) 2013 Uwe Hermann <uwe at hermann-uwe.de>
+ *
+ * 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 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "../libsigrokdecode.h" /* First, to avoid compiler warning. */
+#include "../libsigrokdecode-internal.h"
+#include <stdint.h>
+#include <stdlib.h>
+#include <check.h>
+#include "lib.h"
+
+static void setup(void)
+{
+ /* Silence libsigrokdecode while the unit tests run. */
+ srd_log_loglevel_set(SRD_LOG_NONE);
+}
+
+static void teardown(void)
+{
+}
+
+/*
+ * Check whether srd_session_new() works.
+ * If it returns != SRD_OK (or segfaults) this test will fail.
+ */
+START_TEST(test_session_new)
+{
+ int ret;
+ struct srd_session *sess;
+
+ srd_init(NULL);
+ ret = srd_session_new(&sess);
+ fail_unless(ret == SRD_OK, "srd_session_new() failed: %d.", ret);
+ srd_exit();
+}
+END_TEST
+
+/*
+ * Check whether srd_session_new() fails for bogus parameters.
+ * If it returns SRD_OK (or segfaults) this test will fail.
+ */
+START_TEST(test_session_new_bogus)
+{
+ int ret;
+
+ srd_init(NULL);
+ ret = srd_session_new(NULL);
+ fail_unless(ret != SRD_OK, "srd_session_new(NULL) worked.");
+ srd_exit();
+}
+END_TEST
+
+/*
+ * Check whether multiple srd_session_new() calls work.
+ * If any call returns != SRD_OK (or segfaults) this test will fail.
+ */
+START_TEST(test_session_new_multiple)
+{
+ int ret;
+ struct srd_session *sess1, *sess2, *sess3;
+
+ sess1 = sess2 = sess3 = NULL;
+
+ srd_init(NULL);
+
+ /* Multiple srd_session_new() calls must work. */
+ ret = srd_session_new(&sess1);
+ fail_unless(ret == SRD_OK, "srd_session_new() 1 failed: %d.", ret);
+ ret = srd_session_new(&sess2);
+ fail_unless(ret == SRD_OK, "srd_session_new() 2 failed: %d.", ret);
+ ret = srd_session_new(&sess3);
+ fail_unless(ret == SRD_OK, "srd_session_new() 3 failed: %d.", ret);
+
+ /* The returned session pointers must all be non-NULL. */
+ fail_unless(sess1 != NULL);
+ fail_unless(sess2 != NULL);
+ fail_unless(sess3 != NULL);
+
+ /* The returned session pointers must not be the same. */
+ fail_unless(sess1 != sess2);
+ fail_unless(sess1 != sess3);
+ fail_unless(sess2 != sess3);
+
+ /* Each session must have another ID than any other session. */
+ fail_unless(sess1->session_id != sess2->session_id);
+ fail_unless(sess1->session_id != sess3->session_id);
+ fail_unless(sess2->session_id != sess3->session_id);
+
+ /* Destroying any of the sessions must work. */
+ ret = srd_session_destroy(sess1);
+ fail_unless(ret == SRD_OK, "srd_session_destroy() 1 failed: %d.", ret);
+ ret = srd_session_destroy(sess2);
+ fail_unless(ret == SRD_OK, "srd_session_destroy() 2 failed: %d.", ret);
+ ret = srd_session_destroy(sess3);
+ fail_unless(ret == SRD_OK, "srd_session_destroy() 3 failed: %d.", ret);
+
+ srd_exit();
+}
+END_TEST
+
+/*
+ * Check whether srd_session_destroy() works.
+ * If it returns != SRD_OK (or segfaults) this test will fail.
+ */
+START_TEST(test_session_destroy)
+{
+ int ret;
+ struct srd_session *sess;
+
+ srd_init(NULL);
+ srd_session_new(&sess);
+ ret = srd_session_destroy(sess);
+ fail_unless(ret == SRD_OK, "srd_session_destroy() failed: %d.", ret);
+ srd_exit();
+}
+END_TEST
+
+/*
+ * Check whether srd_session_destroy() fails for bogus sessions.
+ * If it returns SRD_OK (or segfaults) this test will fail.
+ */
+START_TEST(test_session_destroy_bogus)
+{
+ int ret;
+
+ srd_init(NULL);
+ ret = srd_session_destroy(NULL);
+ fail_unless(ret != SRD_OK, "srd_session_destroy() failed: %d.", ret);
+ srd_exit();
+}
+END_TEST
+
+static void conf_check_ok(struct srd_session *sess, int key, uint64_t x)
+{
+ int ret;
+
+ ret = srd_session_metadata_set(sess, key, g_variant_new_uint64(x));
+ fail_unless(ret == SRD_OK, "srd_session_metadata_set(%p, %d, %"
+ PRIu64 ") failed: %d.", sess, key, x, ret);
+}
+
+static void conf_check_fail(struct srd_session *sess, int key, uint64_t x)
+{
+ int ret;
+
+ ret = srd_session_metadata_set(sess, key, g_variant_new_uint64(x));
+ fail_unless(ret != SRD_OK, "srd_session_metadata_set(%p, %d, %"
+ PRIu64 ") worked.", sess, key, x);
+}
+
+static void conf_check_fail_null(struct srd_session *sess, int key)
+{
+ int ret;
+
+ ret = srd_session_metadata_set(sess, key, NULL);
+ fail_unless(ret != SRD_OK,
+ "srd_session_metadata_set(NULL) for key %d worked.", key);
+}
+
+static void conf_check_fail_str(struct srd_session *sess, int key, const char *s)
+{
+ int ret;
+
+ ret = srd_session_metadata_set(sess, key, g_variant_new_string(s));
+ fail_unless(ret != SRD_OK, "srd_session_metadata_set() for key %d "
+ "failed: %d.", key, ret);
+}
+
+/*
+ * Check whether srd_session_metadata_set() works.
+ * If it returns != SRD_OK (or segfaults) this test will fail.
+ */
+START_TEST(test_session_metadata_set)
+{
+ uint64_t i;
+ struct srd_session *sess;
+
+ srd_init(NULL);
+ srd_session_new(&sess);
+ /* Try a bunch of values. */
+ for (i = 0; i < 1000; i++)
+ conf_check_ok(sess, SRD_CONF_SAMPLERATE, i);
+ /* Try the max. possible value. */
+ conf_check_ok(sess, SRD_CONF_SAMPLERATE, UINT64_MAX);
+ srd_session_destroy(sess);
+ srd_exit();
+}
+END_TEST
+
+/*
+ * Check whether srd_session_metadata_set() fails with invalid input.
+ * If it returns SRD_OK (or segfaults) this test will fail.
+ */
+START_TEST(test_session_metadata_set_bogus)
+{
+ struct srd_session *sess;
+
+ srd_init(NULL);
+ srd_session_new(&sess);
+
+ /* Incorrect gvariant type (currently only uint64 is used). */
+ conf_check_fail_str(sess, SRD_CONF_SAMPLERATE, "");
+ conf_check_fail_str(sess, SRD_CONF_SAMPLERATE, "Foo");
+
+ /* NULL data pointer. */
+ conf_check_fail_null(sess, SRD_CONF_SAMPLERATE);
+
+ /* NULL session. */
+ conf_check_fail(NULL, SRD_CONF_SAMPLERATE, 0);
+
+ /* Invalid keys. */
+ conf_check_fail(sess, -1, 0);
+ conf_check_fail(sess, 9, 0);
+ conf_check_fail(sess, 123, 0);
+
+ srd_session_destroy(sess);
+ srd_exit();
+}
+END_TEST
+
+Suite *suite_session(void)
+{
+ Suite *s;
+ TCase *tc;
+
+ s = suite_create("session");
+
+ tc = tcase_create("new_destroy");
+ tcase_add_checked_fixture(tc, setup, teardown);
+ tcase_add_test(tc, test_session_new);
+ tcase_add_test(tc, test_session_new_bogus);
+ tcase_add_test(tc, test_session_new_multiple);
+ tcase_add_test(tc, test_session_destroy);
+ tcase_add_test(tc, test_session_destroy_bogus);
+ suite_add_tcase(s, tc);
+
+ tc = tcase_create("config");
+ tcase_add_checked_fixture(tc, setup, teardown);
+ tcase_add_test(tc, test_session_metadata_set);
+ tcase_add_test(tc, test_session_metadata_set_bogus);
+ suite_add_tcase(s, tc);
+
+ return s;
+}
diff --git a/tests/lib.h b/tests/lib.h
new file mode 100644
index 0000000..e5609d4
--- /dev/null
+++ b/tests/lib.h
@@ -0,0 +1,29 @@
+/*
+ * This file is part of the libsigrokdecode project.
+ *
+ * Copyright (C) 2013 Uwe Hermann <uwe at hermann-uwe.de>
+ *
+ * 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 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef LIBSIGROKDECODE_TESTS_LIB_H
+#define LIBSIGROKDECODE_TESTS_LIB_H
+
+Suite *suite_core(void);
+Suite *suite_decoder(void);
+Suite *suite_inst(void);
+Suite *suite_session(void);
+
+#endif
diff --git a/tests/runtc.c b/tests/runtc.c
new file mode 100644
index 0000000..cd3d449
--- /dev/null
+++ b/tests/runtc.c
@@ -0,0 +1,837 @@
+/*
+ * This file is part of the libsigrokdecode project.
+ *
+ * Copyright (C) 2013 Bert Vermeulen <bert at biot.com>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "../libsigrokdecode.h"
+#include <libsigrok/libsigrok.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <unistd.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <time.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <dirent.h>
+#include <glib.h>
+#ifdef __LINUX__
+#include <sched.h>
+#endif
+#include "../config.h"
+
+int debug = FALSE;
+int statistics = FALSE;
+char *coverage_report;
+
+struct channel {
+ char *name;
+ int channel;
+};
+
+struct option {
+ char *key;
+ char *value;
+};
+
+struct pd {
+ char *name;
+ GSList *channels;
+ GSList *options;
+};
+
+struct output {
+ char *pd;
+ int type;
+ char *class;
+ int class_idx;
+ char *outfile;
+ int outfd;
+};
+
+struct cvg {
+ int num_lines;
+ int num_missed;
+ float coverage;
+ GSList *missed_lines;
+};
+
+
+struct cvg *get_mod_cov(PyObject *py_cov, char *module_name);
+void cvg_add(struct cvg *dst, struct cvg *src);
+struct cvg *cvg_new(void);
+gboolean find_missed_line(struct cvg *cvg, char *linespec);
+
+
+static void logmsg(char *prefix, FILE *out, const char *format, va_list args)
+{
+ if (prefix)
+ fprintf(out, "%s", prefix);
+ vfprintf(out, format, args);
+ fprintf(out, "\n");
+}
+
+static void DBG(const char *format, ...)
+{
+ va_list args;
+
+ if (!debug)
+ return;
+ va_start(args, format);
+ logmsg("DBG: runtc: ", stdout, format, args);
+ va_end(args);
+}
+
+static void ERR(const char *format, ...)
+{
+ va_list args;
+
+ va_start(args, format);
+ logmsg("Error: ", stderr, format, args);
+ va_end(args);
+}
+
+static int sr_log(void *cb_data, int loglevel, const char *format, va_list args)
+{
+ (void)cb_data;
+
+ if (loglevel == SR_LOG_ERR || loglevel == SR_LOG_WARN)
+ logmsg("Error: sr: ", stderr, format, args);
+ else if (debug)
+ logmsg("DBG: sr: ", stdout, format, args);
+
+ return SRD_OK;
+}
+
+static int srd_log(void *cb_data, int loglevel, const char *format, va_list args)
+{
+ (void)cb_data;
+
+ if (loglevel == SRD_LOG_ERR || loglevel == SRD_LOG_WARN)
+ logmsg("Error: srd: ", stderr, format, args);
+ else if (debug)
+ logmsg("DBG: srd: ", stdout, format, args);
+
+ return SRD_OK;
+}
+
+static void usage(char *msg)
+{
+ if (msg)
+ fprintf(stderr, "%s\n", msg);
+
+ printf("Usage: runtc [-dPpoiOf]\n");
+ printf(" -d Debug\n");
+ printf(" -P <protocol decoder>\n");
+ printf(" -p <channelname=channelnum> (optional)\n");
+ printf(" -o <channeloption=value> (optional)\n");
+ printf(" -i <input file>\n");
+ printf(" -O <output-pd:output-type[:output-class]>\n");
+ printf(" -f <output file> (optional)\n");
+ printf(" -c <coverage report> (optional)\n");
+ exit(msg ? 1 : 0);
+
+}
+
+/* This is a neutered version of libsigrokdecode's py_str_as_str(). It
+ * does no error checking, but then the only strings it processes are
+ * generated by Python's repr(), so are known good. */
+static char *py_str_as_str(const PyObject *py_str)
+{
+ PyObject *py_encstr;
+ char *str, *outstr;
+
+ py_encstr = PyUnicode_AsEncodedString((PyObject *)py_str, "utf-8", NULL);
+ str = PyBytes_AS_STRING(py_encstr);
+ outstr = g_strdup(str);
+ Py_DecRef(py_encstr);
+
+ return outstr;
+}
+
+static void srd_cb_py(struct srd_proto_data *pdata, void *cb_data)
+{
+ struct output *op;
+ PyObject *pydata, *pyrepr;
+ GString *out;
+ char *s;
+
+ DBG("Python output from %s", pdata->pdo->di->inst_id);
+ op = cb_data;
+ pydata = pdata->data;
+ DBG("ptr %p", pydata);
+
+ if (strcmp(pdata->pdo->di->inst_id, op->pd))
+ /* This is not the PD selected for output. */
+ return;
+
+ if (!(pyrepr = PyObject_Repr(pydata))) {
+ ERR("Invalid Python object.");
+ return;
+ }
+ s = py_str_as_str(pyrepr);
+ Py_DecRef(pyrepr);
+
+ /* Output format for testing is '<ss>-<es> <inst-id>: <repr>\n' */
+ out = g_string_sized_new(128);
+ g_string_printf(out, "%"PRIu64"-%"PRIu64" %s: %s\n",
+ pdata->start_sample, pdata->end_sample,
+ pdata->pdo->di->inst_id, s);
+ g_free(s);
+ if (write(op->outfd, out->str, out->len) == -1)
+ ERR("SRD_OUTPUT_PYTHON callback write failure!");
+ DBG("wrote '%s'", out->str);
+ g_string_free(out, TRUE);
+
+}
+
+static void srd_cb_bin(struct srd_proto_data *pdata, void *cb_data)
+{
+ struct srd_proto_data_binary *pdb;
+ struct output *op;
+ GString *out;
+ unsigned int i;
+
+ DBG("Binary output from %s", pdata->pdo->di->inst_id);
+ op = cb_data;
+ pdb = pdata->data;
+
+ if (strcmp(pdata->pdo->di->inst_id, op->pd))
+ /* This is not the PD selected for output. */
+ return;
+
+ if (op->class_idx != -1 && op->class_idx != pdb->bin_class)
+ /*
+ * This output takes a specific binary class,
+ * but not the one that just came in.
+ */
+ return;
+
+ out = g_string_sized_new(128);
+ g_string_printf(out, "%"PRIu64"-%"PRIu64" %s:",
+ pdata->start_sample, pdata->end_sample,
+ pdata->pdo->di->inst_id);
+ for (i = 0; i < pdb->size; i++) {
+ g_string_append_printf(out, " %.2x", pdb->data[i]);
+ }
+ g_string_append(out, "\n");
+ if (write(op->outfd, out->str, out->len) == -1)
+ ERR("SRD_OUTPUT_BINARY callback write failure!");
+
+}
+
+static void srd_cb_ann(struct srd_proto_data *pdata, void *cb_data)
+{
+ struct srd_decoder *dec;
+ struct srd_proto_data_annotation *pda;
+ struct output *op;
+ GString *line;
+ int i;
+ char **dec_ann;
+
+ DBG("Annotation output from %s", pdata->pdo->di->inst_id);
+ op = cb_data;
+ pda = pdata->data;
+ dec = pdata->pdo->di->decoder;
+ if (strcmp(pdata->pdo->di->inst_id, op->pd))
+ /* This is not the PD selected for output. */
+ return;
+
+ if (op->class_idx != -1 && op->class_idx != pda->ann_format)
+ /*
+ * This output takes a specific annotation class,
+ * but not the one that just came in.
+ */
+ return;
+
+ dec_ann = g_slist_nth_data(dec->annotations, pda->ann_format);
+ line = g_string_sized_new(256);
+ g_string_printf(line, "%"PRIu64"-%"PRIu64" %s: %s:",
+ pdata->start_sample, pdata->end_sample,
+ pdata->pdo->di->inst_id, dec_ann[0]);
+ for (i = 0; pda->ann_text[i]; i++)
+ g_string_append_printf(line, " \"%s\"", pda->ann_text[i]);
+ g_string_append(line, "\n");
+ if (write(op->outfd, line->str, line->len) == -1)
+ ERR("SRD_OUTPUT_ANN callback write failure!");
+ g_string_free(line, TRUE);
+
+}
+
+static void sr_cb(const struct sr_dev_inst *sdi,
+ const struct sr_datafeed_packet *packet, void *cb_data)
+{
+ const struct sr_datafeed_logic *logic;
+ struct srd_session *sess;
+ GVariant *gvar;
+ uint64_t samplerate;
+ int num_samples;
+ static int samplecnt = 0;
+
+ sess = cb_data;
+
+ switch (packet->type) {
+ case SR_DF_HEADER:
+ DBG("Received SR_DF_HEADER");
+ if (sr_config_get(sdi->driver, sdi, NULL, SR_CONF_SAMPLERATE,
+ &gvar) != SR_OK) {
+ ERR("Getting samplerate failed");
+ break;
+ }
+ samplerate = g_variant_get_uint64(gvar);
+ g_variant_unref(gvar);
+ if (srd_session_metadata_set(sess, SRD_CONF_SAMPLERATE,
+ g_variant_new_uint64(samplerate)) != SRD_OK) {
+ ERR("Setting samplerate failed");
+ break;
+ }
+ if (srd_session_start(sess) != SRD_OK) {
+ ERR("Session start failed");
+ break;
+ }
+ break;
+ case SR_DF_LOGIC:
+ logic = packet->payload;
+ num_samples = logic->length / logic->unitsize;
+ DBG("Received SR_DF_LOGIC: %d samples", num_samples);
+ srd_session_send(sess, samplecnt, samplecnt + num_samples,
+ logic->data, logic->length);
+ samplecnt += logic->length / logic->unitsize;
+ break;
+ case SR_DF_END:
+ DBG("Received SR_DF_END");
+ break;
+ }
+
+}
+
+static int run_testcase(char *infile, GSList *pdlist, struct output *op)
+{
+ struct srd_session *sess;
+ struct srd_decoder *dec;
+ struct srd_decoder_inst *di, *prev_di;
+ srd_pd_output_callback cb;
+ struct pd *pd;
+ struct channel *channel;
+ struct option *option;
+ GVariant *gvar;
+ GHashTable *channels, *opts;
+ GSList *pdl, *l;
+ int idx;
+ int max_channel;
+ char **decoder_class;
+
+ if (op->outfile) {
+ if ((op->outfd = open(op->outfile, O_CREAT|O_WRONLY, 0600)) == -1) {
+ ERR("Unable to open %s for writing: %s", op->outfile,
+ strerror(errno));
+ return FALSE;
+ }
+ }
+
+ if (sr_session_load(infile) != SR_OK)
+ return FALSE;
+
+ if (srd_session_new(&sess) != SRD_OK)
+ return FALSE;
+ sr_session_datafeed_callback_add(sr_cb, sess);
+ switch (op->type) {
+ case SRD_OUTPUT_ANN:
+ cb = srd_cb_ann;
+ break;
+ case SRD_OUTPUT_BINARY:
+ cb = srd_cb_bin;
+ break;
+ case SRD_OUTPUT_PYTHON:
+ cb = srd_cb_py;
+ break;
+ default:
+ return FALSE;
+ }
+ srd_pd_output_callback_add(sess, op->type, cb, op);
+
+ prev_di = NULL;
+ pd = NULL;
+ for (pdl = pdlist; pdl; pdl = pdl->next) {
+ pd = pdl->data;
+ if (srd_decoder_load(pd->name) != SRD_OK)
+ return FALSE;
+
+ /* Instantiate decoder and pass in options. */
+ opts = g_hash_table_new_full(g_str_hash, g_str_equal, NULL,
+ (GDestroyNotify)g_variant_unref);
+ for (l = pd->options; l; l = l->next) {
+ option = l->data;
+ g_hash_table_insert(opts, option->key, option->value);
+ }
+ if (!(di = srd_inst_new(sess, pd->name, opts)))
+ return FALSE;
+ g_hash_table_destroy(opts);
+
+ /* Map channels. */
+ if (pd->channels) {
+ channels = g_hash_table_new_full(g_str_hash, g_str_equal, NULL,
+ (GDestroyNotify)g_variant_unref);
+ max_channel = 0;
+ for (l = pd->channels; l; l = l->next) {
+ channel = l->data;
+ if (channel->channel > max_channel)
+ max_channel = channel->channel;
+ gvar = g_variant_new_int32(channel->channel);
+ g_variant_ref_sink(gvar);
+ g_hash_table_insert(channels, channel->name, gvar);
+ }
+ if (srd_inst_channel_set_all(di, channels,
+ (max_channel + 8) / 8) != SRD_OK)
+ return FALSE;
+ g_hash_table_destroy(channels);
+ }
+
+ /* If this is not the first decoder in the list, stack it
+ * on top of the previous one. */
+ if (prev_di) {
+ if (srd_inst_stack(sess, prev_di, di) != SRD_OK) {
+ ERR("Failed to stack decoder instances.");
+ return FALSE;
+ }
+ }
+ prev_di = di;
+ }
+
+ /* Resolve top decoder's class index, so we can match. */
+ dec = srd_decoder_get_by_id(pd->name);
+ if (op->class) {
+ if (op->type == SRD_OUTPUT_ANN)
+ l = dec->annotations;
+ else if (op->type == SRD_OUTPUT_BINARY)
+ l = dec->binary;
+ else
+ /* Only annotations and binary can have a class. */
+ return FALSE;
+ idx = 0;
+ while (l) {
+ decoder_class = l->data;
+ if (!strcmp(decoder_class[0], op->class)) {
+ op->class_idx = idx;
+ break;
+ } else
+ idx++;
+ l = l->next;
+ }
+ if (op->class_idx == -1) {
+ ERR("Output class '%s' not found in decoder %s.",
+ op->class, pd->name);
+ return FALSE;
+ } else
+ DBG("Class %s index is %d", op->class, op->class_idx);
+ }
+
+ sr_session_start();
+ sr_session_run();
+ sr_session_stop();
+
+ srd_session_destroy(sess);
+
+ if (op->outfile)
+ close(op->outfd);
+
+ return TRUE;
+}
+
+static PyObject *start_coverage(GSList *pdlist)
+{
+ PyObject *py_mod, *py_pdlist, *py_pd, *py_func, *py_args, *py_kwargs, *py_cov;
+ GSList *l;
+ struct pd *pd;
+
+ DBG("Starting coverage.");
+
+ if (!(py_mod = PyImport_ImportModule("coverage")))
+ return NULL;
+
+ if (!(py_pdlist = PyList_New(0)))
+ return NULL;
+ for (l = pdlist; l; l = l->next) {
+ pd = l->data;
+ py_pd = PyUnicode_FromFormat("*/%s/*.py", pd->name);
+ if (PyList_Append(py_pdlist, py_pd) < 0)
+ return NULL;
+ Py_DecRef(py_pd);
+ }
+ if (!(py_func = PyObject_GetAttrString(py_mod, "coverage")))
+ return NULL;
+ if (!(py_args = PyTuple_New(0)))
+ return NULL;
+ if (!(py_kwargs = Py_BuildValue("{sO}", "include", py_pdlist)))
+ return NULL;
+ if (!(py_cov = PyObject_Call(py_func, py_args, py_kwargs)))
+ return NULL;
+ if (!(PyObject_CallMethod(py_cov, "start", NULL)))
+ return NULL;
+ Py_DecRef(py_pdlist);
+ Py_DecRef(py_args);
+ Py_DecRef(py_kwargs);
+ Py_DecRef(py_func);
+
+ return py_cov;
+}
+
+struct cvg *get_mod_cov(PyObject *py_cov, char *module_name)
+{
+ PyObject *py_mod, *py_pathlist, *py_path, *py_func, *py_pd;
+ PyObject *py_result, *py_missed, *py_item;
+ DIR *d;
+ struct dirent *de;
+ struct cvg *cvg_mod;
+ int num_lines, num_missed, linenum, i, j;
+ char *path, *linespec;
+
+ if (!(py_mod = PyImport_ImportModule(module_name)))
+ return NULL;
+
+ cvg_mod = NULL;
+ py_pathlist = PyObject_GetAttrString(py_mod, "__path__");
+ for (i = 0; i < PyList_Size(py_pathlist); i++) {
+ py_path = PyList_GetItem(py_pathlist, i);
+ PyUnicode_FSConverter(PyList_GetItem(py_pathlist, i), &py_path);
+ path = PyBytes_AS_STRING(py_path);
+ if (!(d = opendir(path))) {
+ ERR("Invalid module path '%s'", path);
+ return NULL;
+ }
+ while ((de = readdir(d))) {
+ if (strncmp(de->d_name + strlen(de->d_name) - 3, ".py", 3))
+ continue;
+
+ if (!(py_func = PyObject_GetAttrString(py_cov, "analysis2")))
+ return NULL;
+ if (!(py_pd = PyUnicode_FromFormat("%s/%s", path, de->d_name)))
+ return NULL;
+ if (!(py_result = PyObject_CallFunction(py_func, "O", py_pd)))
+ return NULL;
+ Py_DecRef(py_pd);
+ Py_DecRef(py_func);
+
+ if (!cvg_mod)
+ cvg_mod = cvg_new();
+ if (PyTuple_Size(py_result) != 5) {
+ ERR("Invalid result from coverage of '%s/%s'", path, de->d_name);
+ return NULL;
+ }
+ num_lines = PyList_Size(PyTuple_GetItem(py_result, 1));
+ py_missed = PyTuple_GetItem(py_result, 3);
+ num_missed = PyList_Size(py_missed);
+ cvg_mod->num_lines += num_lines;
+ cvg_mod->num_missed += num_missed;
+ for (j = 0; j < num_missed; j++) {
+ py_item = PyList_GetItem(py_missed, j);
+ linenum = PyLong_AsLong(py_item);
+ linespec = g_strdup_printf("%s/%s:%d", module_name,
+ de->d_name, linenum);
+ cvg_mod->missed_lines = g_slist_append(cvg_mod->missed_lines, linespec);
+ }
+ DBG("Coverage for %s/%s: %d lines, %d missed.",
+ module_name, de->d_name, num_lines, num_missed);
+ Py_DecRef(py_result);
+ }
+ }
+ if (cvg_mod->num_lines)
+ cvg_mod->coverage = 100 - ((float)cvg_mod->num_missed / (float)cvg_mod->num_lines * 100);
+
+ Py_DecRef(py_mod);
+ Py_DecRef(py_path);
+
+ return cvg_mod;
+}
+
+struct cvg *cvg_new(void)
+{
+ struct cvg *cvg;
+
+ cvg = calloc(1, sizeof(struct cvg));
+
+ return cvg;
+}
+
+gboolean find_missed_line(struct cvg *cvg, char *linespec)
+{
+ GSList *l;
+
+ for (l = cvg->missed_lines; l; l = l->next)
+ if (!strcmp(l->data, linespec))
+ return TRUE;
+
+ return FALSE;
+}
+
+void cvg_add(struct cvg *dst, struct cvg *src)
+{
+ GSList *l;
+ char *linespec;
+
+
+ dst->num_lines += src->num_lines;
+ dst->num_missed += src->num_missed;
+ for (l = src->missed_lines; l; l = l->next) {
+ linespec = l->data;
+ if (!find_missed_line(dst, linespec))
+ dst->missed_lines = g_slist_append(dst->missed_lines, linespec);
+ }
+
+}
+
+static int report_coverage(PyObject *py_cov, GSList *pdlist)
+{
+ PyObject *py_func, *py_mod, *py_args, *py_kwargs, *py_outfile, *py_pct;
+ GSList *l, *ml;
+ struct pd *pd;
+ struct cvg *cvg_mod, *cvg_all;
+ float total_coverage;
+ int lines, missed, cnt;
+
+ DBG("Making coverage report.");
+
+ /* Get coverage for each module in the stack. */
+ lines = missed = 0;
+ cvg_all = cvg_new();
+ for (cnt = 0, l = pdlist; l; l = l->next, cnt++) {
+ pd = l->data;
+ if (!(cvg_mod = get_mod_cov(py_cov, pd->name)))
+ return FALSE;
+ printf("coverage: scope=%s coverage=%.0f%% lines=%d missed=%d "
+ "missed_lines=", pd->name, cvg_mod->coverage,
+ cvg_mod->num_lines, cvg_mod->num_missed);
+ for (ml = cvg_mod->missed_lines; ml; ml = ml->next) {
+ if (ml != cvg_mod->missed_lines)
+ printf(",");
+ printf("%s", (char *)ml->data);
+ }
+ printf("\n");
+ lines += cvg_mod->num_lines;
+ missed += cvg_mod->num_missed;
+ cvg_add(cvg_all, cvg_mod);
+ DBG("Coverage for module %s: %d lines, %d missed", pd->name,
+ cvg_mod->num_lines, cvg_mod->num_missed);
+ }
+ lines /= cnt;
+ missed /= cnt;
+ total_coverage = 100 - ((float)missed / (float)lines * 100);
+
+ /* Machine-readable stats on stdout. */
+ printf("coverage: scope=all coverage=%.0f%% lines=%d missed=%d\n",
+ total_coverage, cvg_all->num_lines, cvg_all->num_missed);
+
+
+ /* Write text report to file. */
+ /* io.open(coverage_report, "w") */
+ if (!(py_mod = PyImport_ImportModule("io")))
+ return FALSE;
+ if (!(py_func = PyObject_GetAttrString(py_mod, "open")))
+ return FALSE;
+ if (!(py_args = PyTuple_New(0)))
+ return FALSE;
+ if (!(py_kwargs = Py_BuildValue("{ssss}", "file", coverage_report,
+ "mode", "w")))
+ return FALSE;
+ if (!(py_outfile = PyObject_Call(py_func, py_args, py_kwargs)))
+ return FALSE;
+ Py_DecRef(py_kwargs);
+ Py_DecRef(py_func);
+
+ /* py_cov.report(file=py_outfile) */
+ if (!(py_func = PyObject_GetAttrString(py_cov, "report")))
+ return FALSE;
+ if (!(py_kwargs = Py_BuildValue("{sO}", "file", py_outfile)))
+ return FALSE;
+ if (!(py_pct = PyObject_Call(py_func, py_args, py_kwargs)))
+ return FALSE;
+ Py_DecRef(py_pct);
+ Py_DecRef(py_kwargs);
+ Py_DecRef(py_func);
+
+ /* py_outfile.close() */
+ if (!(py_func = PyObject_GetAttrString(py_outfile, "close")))
+ return FALSE;
+ if (!PyObject_Call(py_func, py_args, NULL))
+ return FALSE;
+ Py_DecRef(py_outfile);
+ Py_DecRef(py_func);
+ Py_DecRef(py_args);
+ Py_DecRef(py_mod);
+
+ return TRUE;
+}
+
+int main(int argc, char **argv)
+{
+ struct sr_context *ctx;
+ PyObject *coverage;
+ GSList *pdlist;
+ struct pd *pd;
+ struct channel *channel;
+ struct option *option;
+ struct output *op;
+ int ret;
+ char c, *opt_infile, **kv, **opstr;
+
+ op = malloc(sizeof(struct output));
+ op->pd = NULL;
+ op->type = -1;
+ op->class = NULL;
+ op->class_idx = -1;
+ op->outfd = 1;
+
+ pdlist = NULL;
+ opt_infile = NULL;
+ pd = NULL;
+ coverage = NULL;
+ while ((c = getopt(argc, argv, "dP:p:o:i:O:f:c:S")) != -1) {
+ switch(c) {
+ case 'd':
+ debug = TRUE;
+ break;
+ case 'P':
+ pd = g_malloc(sizeof(struct pd));
+ pd->name = g_strdup(optarg);
+ pd->channels = pd->options = NULL;
+ pdlist = g_slist_append(pdlist, pd);
+ break;
+ case 'p':
+ case 'o':
+ if (g_slist_length(pdlist) == 0) {
+ /* No previous -P. */
+ ERR("Syntax error at '%s'", optarg);
+ usage(NULL);
+ }
+ kv = g_strsplit(optarg, "=", 0);
+ if (!kv[0] || (!kv[1] || kv[2])) {
+ /* Need x=y. */
+ ERR("Syntax error at '%s'", optarg);
+ g_strfreev(kv);
+ usage(NULL);
+ }
+ if (c == 'p') {
+ channel = malloc(sizeof(struct channel));
+ channel->name = g_strdup(kv[0]);
+ channel->channel = strtoul(kv[1], 0, 10);
+ /* Apply to last PD. */
+ pd->channels = g_slist_append(pd->channels, channel);
+ } else {
+ option = malloc(sizeof(struct option));
+ option->key = g_strdup(kv[0]);
+ option->value = g_strdup(kv[1]);
+ /* Apply to last PD. */
+ pd->options = g_slist_append(pd->options, option);
+ }
+ break;
+ case 'i':
+ opt_infile = optarg;
+ break;
+ case 'O':
+ opstr = g_strsplit(optarg, ":", 0);
+ if (!opstr[0] || !opstr[1]) {
+ /* Need at least abc:def. */
+ ERR("Syntax error at '%s'", optarg);
+ g_strfreev(opstr);
+ usage(NULL);
+ }
+ op->pd = g_strdup(opstr[0]);
+ if (!strcmp(opstr[1], "annotation"))
+ op->type = SRD_OUTPUT_ANN;
+ else if (!strcmp(opstr[1], "binary"))
+ op->type = SRD_OUTPUT_BINARY;
+ else if (!strcmp(opstr[1], "python"))
+ op->type = SRD_OUTPUT_PYTHON;
+ else {
+ ERR("Unknown output type '%s'", opstr[1]);
+ g_strfreev(opstr);
+ usage(NULL);
+ }
+ if (opstr[2])
+ op->class = g_strdup(opstr[2]);
+ g_strfreev(opstr);
+ break;
+ case 'f':
+ op->outfile = g_strdup(optarg);
+ op->outfd = -1;
+ break;
+ case 'c':
+ coverage_report = optarg;
+ break;
+ case 'S':
+ statistics = TRUE;
+ break;
+ default:
+ usage(NULL);
+ }
+ }
+ if (argc > optind)
+ usage(NULL);
+ if (g_slist_length(pdlist) == 0)
+ usage(NULL);
+ if (!opt_infile)
+ usage(NULL);
+ if (!op->pd || op->type == -1)
+ usage(NULL);
+
+ sr_log_callback_set(sr_log, NULL);
+ if (sr_init(&ctx) != SR_OK)
+ return 1;
+
+ srd_log_callback_set(srd_log, NULL);
+ if (srd_init(DECODERS_DIR) != SRD_OK)
+ return 1;
+
+ if (coverage_report) {
+ if (!(coverage = start_coverage(pdlist))) {
+ DBG("Failed to start coverage.");
+ if (PyErr_Occurred()) {
+ PyErr_PrintEx(0);
+ PyErr_Clear();
+ }
+ }
+ }
+
+ ret = 0;
+ if (!run_testcase(opt_infile, pdlist, op))
+ ret = 1;
+
+ if (coverage) {
+ DBG("Stopping coverage.");
+
+ if (!(PyObject_CallMethod(coverage, "stop", NULL)))
+ ERR("Failed to stop coverage.");
+ else if (!(report_coverage(coverage, pdlist)))
+ ERR("Failed to make coverage report.");
+ else
+ DBG("Coverage report in %s", coverage_report);
+
+ if (PyErr_Occurred()) {
+ PyErr_PrintEx(0);
+ PyErr_Clear();
+ }
+ Py_DecRef(coverage);
+ }
+
+ srd_exit();
+ sr_exit(ctx);
+
+ return ret;
+}
diff --git a/tools/install-decoders b/tools/install-decoders
new file mode 100755
index 0000000..465c70e
--- /dev/null
+++ b/tools/install-decoders
@@ -0,0 +1,112 @@
+#!/usr/bin/env python3
+##
+## This file is part of the libsigrokdecode project.
+##
+## Copyright (C) 2013 Bert Vermeulen <bert at biot.com>
+##
+## 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 <http://www.gnu.org/licenses/>.
+##
+
+import os
+import sys
+from shutil import copy
+from getopt import getopt
+
+
+def install(srcdir, dstdir):
+ worklist = []
+ for pd in os.listdir(srcdir):
+ pd_dir = srcdir + '/' + pd
+ if not os.path.isdir(pd_dir):
+ continue
+ install_list = []
+ for f in os.listdir(pd_dir):
+ pd_file = pd_dir + '/' + f
+ if not os.path.isfile(pd_file):
+ continue
+ if f == 'config':
+ install_list.extend(config_get_extra_install(pd_file))
+ elif f[-3:] == '.py':
+ install_list.append(f)
+ worklist.append((pd, pd_dir, install_list))
+
+ print("Installing %d protocol decoders:" % len(worklist))
+ col = 0
+ for pd, pd_dir, install_list in worklist:
+ msg = pd + ' '
+ if (col + len(msg) > 80):
+ print()
+ col = 0
+ print(msg, end='')
+ col += len(msg)
+ pd_dst = os.path.join(dstdir, pd)
+ try:
+ os.mkdir(pd_dst)
+ except OSError as e:
+ if e.errno != os.errno.EEXIST:
+ raise
+ else:
+ pass
+ for f in install_list:
+ copy(os.path.join(pd_dir, f), pd_dst)
+ print()
+
+
+def config_get_extra_install(config_file):
+ install_list = []
+ for line in open(config_file).read().split('\n'):
+ line = line.strip()
+ if len(line) == 0 or line[0] == '#':
+ continue
+ words = line.split()
+ if words[0] != 'extra-install':
+ continue
+ install_list.extend(words[1:])
+
+ return install_list
+
+
+def usage(msg=None):
+ if msg:
+ print(msg)
+ ret = 1
+ else:
+ ret = 0
+ print("""Usage:
+ install-decoders [-i <decoder source>] -o <install path>""")
+ sys.exit(ret)
+
+
+#
+# main
+#
+
+src = 'decoders'
+dst = None
+try:
+ opts, args = getopt(sys.argv[1:], 'i:o:')
+ for opt, arg in opts:
+ if opt == '-i':
+ src = arg
+ elif opt == '-o':
+ dst = arg
+except Exception as e:
+ usage(str(e))
+
+if len(args) != 0 or dst is None:
+ usage()
+
+install(src, dst)
+
+
diff --git a/type_decoder.c b/type_decoder.c
new file mode 100644
index 0000000..11c8ec0
--- /dev/null
+++ b/type_decoder.c
@@ -0,0 +1,393 @@
+/*
+ * This file is part of the libsigrokdecode project.
+ *
+ * Copyright (C) 2012 Bert Vermeulen <bert at biot.com>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "libsigrokdecode.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include "libsigrokdecode-internal.h"
+#include "config.h"
+#include <inttypes.h>
+
+typedef struct {
+ PyObject_HEAD
+} srd_Decoder;
+
+/* This is only used for nicer srd_dbg() output. */
+static const char *OUTPUT_TYPES[] = {
+ "OUTPUT_ANN",
+ "OUTPUT_PYTHON",
+ "OUTPUT_BINARY",
+ "OUTPUT_META",
+};
+
+static int convert_annotation(struct srd_decoder_inst *di, PyObject *obj,
+ struct srd_proto_data *pdata)
+{
+ PyObject *py_tmp;
+ struct srd_pd_output *pdo;
+ struct srd_proto_data_annotation *pda;
+ int ann_format;
+ char **ann_text;
+
+ /* Should be a list of [annotation format, [string, ...]]. */
+ if (!PyList_Check(obj) && !PyTuple_Check(obj)) {
+ srd_err("Protocol decoder %s submitted %s instead of list.",
+ di->decoder->name, obj->ob_type->tp_name);
+ return SRD_ERR_PYTHON;
+ }
+
+ /* Should have 2 elements. */
+ if (PyList_Size(obj) != 2) {
+ srd_err("Protocol decoder %s submitted annotation list with "
+ "%d elements instead of 2", di->decoder->name,
+ PyList_Size(obj));
+ return SRD_ERR_PYTHON;
+ }
+
+ /*
+ * The first element should be an integer matching a previously
+ * registered annotation format.
+ */
+ py_tmp = PyList_GetItem(obj, 0);
+ if (!PyLong_Check(py_tmp)) {
+ srd_err("Protocol decoder %s submitted annotation list, but "
+ "first element was not an integer.", di->decoder->name);
+ return SRD_ERR_PYTHON;
+ }
+ ann_format = PyLong_AsLong(py_tmp);
+ if (!(pdo = g_slist_nth_data(di->decoder->annotations, ann_format))) {
+ srd_err("Protocol decoder %s submitted data to unregistered "
+ "annotation format %d.", di->decoder->name, ann_format);
+ return SRD_ERR_PYTHON;
+ }
+
+ /* Second element must be a list. */
+ py_tmp = PyList_GetItem(obj, 1);
+ if (!PyList_Check(py_tmp)) {
+ srd_err("Protocol decoder %s submitted annotation list, but "
+ "second element was not a list.", di->decoder->name);
+ return SRD_ERR_PYTHON;
+ }
+ if (py_strseq_to_char(py_tmp, &ann_text) != SRD_OK) {
+ srd_err("Protocol decoder %s submitted annotation list, but "
+ "second element was malformed.", di->decoder->name);
+ return SRD_ERR_PYTHON;
+ }
+
+ if (!(pda = g_try_malloc(sizeof(struct srd_proto_data_annotation))))
+ return SRD_ERR_MALLOC;
+ pda->ann_format = ann_format;
+ pda->ann_text = ann_text;
+ pdata->data = pda;
+
+ return SRD_OK;
+}
+
+static int convert_binary(struct srd_decoder_inst *di, PyObject *obj,
+ struct srd_proto_data *pdata)
+{
+ struct srd_proto_data_binary *pdb;
+ PyObject *py_tmp;
+ Py_ssize_t size;
+ int bin_class;
+ char *class_name, *buf;
+
+ /* Should be a tuple of (binary class, bytes). */
+ if (!PyTuple_Check(obj)) {
+ srd_err("Protocol decoder %s submitted SRD_OUTPUT_BINARY with "
+ "%s instead of tuple.", di->decoder->name,
+ obj->ob_type->tp_name);
+ return SRD_ERR_PYTHON;
+ }
+
+ /* Should have 2 elements. */
+ if (PyTuple_Size(obj) != 2) {
+ srd_err("Protocol decoder %s submitted SRD_OUTPUT_BINARY tuple "
+ "with %d elements instead of 2", di->decoder->name,
+ PyList_Size(obj));
+ return SRD_ERR_PYTHON;
+ }
+
+ /* The first element should be an integer. */
+ py_tmp = PyTuple_GetItem(obj, 0);
+ if (!PyLong_Check(py_tmp)) {
+ srd_err("Protocol decoder %s submitted SRD_OUTPUT_BINARY tuple, "
+ "but first element was not an integer.", di->decoder->name);
+ return SRD_ERR_PYTHON;
+ }
+ bin_class = PyLong_AsLong(py_tmp);
+ if (!(class_name = g_slist_nth_data(di->decoder->binary, bin_class))) {
+ srd_err("Protocol decoder %s submitted SRD_OUTPUT_BINARY with "
+ "unregistered binary class %d.", di->decoder->name, bin_class);
+ return SRD_ERR_PYTHON;
+ }
+
+ /* Second element should be bytes. */
+ py_tmp = PyTuple_GetItem(obj, 1);
+ if (!PyBytes_Check(py_tmp)) {
+ srd_err("Protocol decoder %s submitted SRD_OUTPUT_BINARY tuple, "
+ "but second element was not bytes.", di->decoder->name);
+ return SRD_ERR_PYTHON;
+ }
+
+ /* Consider an empty set of bytes a bug. */
+ if (PyBytes_Size(py_tmp) == 0) {
+ srd_err("Protocol decoder %s submitted SRD_OUTPUT_BINARY "
+ "with empty data set.", di->decoder->name);
+ return SRD_ERR_PYTHON;
+ }
+
+ if (!(pdb = g_try_malloc(sizeof(struct srd_proto_data_binary))))
+ return SRD_ERR_MALLOC;
+ if (PyBytes_AsStringAndSize(py_tmp, &buf, &size) == -1)
+ return SRD_ERR_PYTHON;
+ pdb->bin_class = bin_class;
+ pdb->size = size;
+ if (!(pdb->data = g_try_malloc(pdb->size)))
+ return SRD_ERR_MALLOC;
+ memcpy((void *)pdb->data, (const void *)buf, pdb->size);
+ pdata->data = pdb;
+
+ return SRD_OK;
+}
+
+static int convert_meta(struct srd_proto_data *pdata, PyObject *obj)
+{
+ long long intvalue;
+ double dvalue;
+
+ if (pdata->pdo->meta_type == G_VARIANT_TYPE_INT64) {
+ if (!PyLong_Check(obj)) {
+ PyErr_Format(PyExc_TypeError, "This output was registered "
+ "as 'int', but '%s' was passed.", obj->ob_type->tp_name);
+ return SRD_ERR_PYTHON;
+ }
+ intvalue = PyLong_AsLongLong(obj);
+ if (PyErr_Occurred())
+ return SRD_ERR_PYTHON;
+ pdata->data = g_variant_new_int64(intvalue);
+ } else if (pdata->pdo->meta_type == G_VARIANT_TYPE_DOUBLE) {
+ if (!PyFloat_Check(obj)) {
+ PyErr_Format(PyExc_TypeError, "This output was registered "
+ "as 'float', but '%s' was passed.", obj->ob_type->tp_name);
+ return SRD_ERR_PYTHON;
+ }
+ dvalue = PyFloat_AsDouble(obj);
+ if (PyErr_Occurred())
+ return SRD_ERR_PYTHON;
+ pdata->data = g_variant_new_double(dvalue);
+ }
+
+ return SRD_OK;
+}
+
+static PyObject *Decoder_put(PyObject *self, PyObject *args)
+{
+ GSList *l;
+ PyObject *py_data, *py_res;
+ struct srd_decoder_inst *di, *next_di;
+ struct srd_pd_output *pdo;
+ struct srd_proto_data *pdata;
+ uint64_t start_sample, end_sample;
+ int output_id;
+ struct srd_pd_callback *cb;
+
+ if (!(di = srd_inst_find_by_obj(NULL, self))) {
+ /* Shouldn't happen. */
+ srd_dbg("put(): self instance not found.");
+ return NULL;
+ }
+
+ if (!PyArg_ParseTuple(args, "KKiO", &start_sample, &end_sample,
+ &output_id, &py_data)) {
+ /*
+ * This throws an exception, but by returning NULL here we let
+ * Python raise it. This results in a much better trace in
+ * controller.c on the decode() method call.
+ */
+ return NULL;
+ }
+
+ if (!(l = g_slist_nth(di->pd_output, output_id))) {
+ srd_err("Protocol decoder %s submitted invalid output ID %d.",
+ di->decoder->name, output_id);
+ return NULL;
+ }
+ pdo = l->data;
+
+ srd_spew("Instance %s put %" PRIu64 "-%" PRIu64 " %s on oid %d.",
+ di->inst_id, start_sample, end_sample,
+ OUTPUT_TYPES[pdo->output_type], output_id);
+
+ if (!(pdata = g_try_malloc0(sizeof(struct srd_proto_data)))) {
+ srd_err("Failed to g_malloc() struct srd_proto_data.");
+ return NULL;
+ }
+ pdata->start_sample = start_sample;
+ pdata->end_sample = end_sample;
+ pdata->pdo = pdo;
+
+ switch (pdo->output_type) {
+ case SRD_OUTPUT_ANN:
+ /* Annotations are only fed to callbacks. */
+ if ((cb = srd_pd_output_callback_find(di->sess, pdo->output_type))) {
+ /* Convert from PyDict to srd_proto_data_annotation. */
+ if (convert_annotation(di, py_data, pdata) != SRD_OK) {
+ /* An error was already logged. */
+ break;
+ }
+ cb->cb(pdata, cb->cb_data);
+ }
+ break;
+ case SRD_OUTPUT_PYTHON:
+ for (l = di->next_di; l; l = l->next) {
+ next_di = l->data;
+ srd_spew("Sending %d-%d to instance %s",
+ start_sample, end_sample, next_di->inst_id);
+ if (!(py_res = PyObject_CallMethod(
+ next_di->py_inst, "decode", "KKO", start_sample,
+ end_sample, py_data))) {
+ srd_exception_catch("Calling %s decode(): ",
+ next_di->inst_id);
+ }
+ Py_XDECREF(py_res);
+ }
+ if ((cb = srd_pd_output_callback_find(di->sess, pdo->output_type))) {
+ /* Frontends aren't really supposed to get Python
+ * callbacks, but it's useful for testing. */
+ pdata->data = py_data;
+ cb->cb(pdata, cb->cb_data);
+ }
+ break;
+ case SRD_OUTPUT_BINARY:
+ if ((cb = srd_pd_output_callback_find(di->sess, pdo->output_type))) {
+ /* Convert from PyDict to srd_proto_data_binary. */
+ if (convert_binary(di, py_data, pdata) != SRD_OK) {
+ /* An error was already logged. */
+ break;
+ }
+ cb->cb(pdata, cb->cb_data);
+ }
+ break;
+ case SRD_OUTPUT_META:
+ if ((cb = srd_pd_output_callback_find(di->sess, pdo->output_type))) {
+ /* Annotations need converting from PyObject. */
+ if (convert_meta(pdata, py_data) != SRD_OK) {
+ /* An exception was already set up. */
+ break;
+ }
+ cb->cb(pdata, cb->cb_data);
+ }
+ break;
+ default:
+ srd_err("Protocol decoder %s submitted invalid output type %d.",
+ di->decoder->name, pdo->output_type);
+ break;
+ }
+
+ g_free(pdata);
+
+ Py_RETURN_NONE;
+}
+
+static PyObject *Decoder_register(PyObject *self, PyObject *args,
+ PyObject *kwargs)
+{
+ struct srd_decoder_inst *di;
+ struct srd_pd_output *pdo;
+ PyObject *py_new_output_id;
+ PyTypeObject *meta_type_py;
+ const GVariantType *meta_type_gv;
+ int output_type;
+ char *proto_id, *meta_name, *meta_descr;
+ char *keywords[] = {"output_type", "proto_id", "meta", NULL};
+
+ meta_type_py = NULL;
+ meta_type_gv = NULL;
+ meta_name = meta_descr = NULL;
+
+ if (!(di = srd_inst_find_by_obj(NULL, self))) {
+ PyErr_SetString(PyExc_Exception, "decoder instance not found");
+ return NULL;
+ }
+
+ /* Default to instance id, which defaults to class id. */
+ proto_id = di->inst_id;
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i|s(Oss)", keywords,
+ &output_type, &proto_id,
+ &meta_type_py, &meta_name, &meta_descr)) {
+ /* Let Python raise this exception. */
+ return NULL;
+ }
+
+ /* Check if the meta value's type is supported. */
+ if (output_type == SRD_OUTPUT_META) {
+ if (meta_type_py == &PyLong_Type)
+ meta_type_gv = G_VARIANT_TYPE_INT64;
+ else if (meta_type_py == &PyFloat_Type)
+ meta_type_gv = G_VARIANT_TYPE_DOUBLE;
+ else {
+ PyErr_Format(PyExc_TypeError, "Unsupported type '%s'.",
+ meta_type_py->tp_name);
+ return NULL;
+ }
+ }
+
+ srd_dbg("Instance %s creating new output type %d for %s.",
+ di->inst_id, output_type, proto_id);
+
+ if (!(pdo = g_try_malloc(sizeof(struct srd_pd_output)))) {
+ PyErr_SetString(PyExc_MemoryError, "struct srd_pd_output");
+ return NULL;
+ }
+
+ /* pdo_id is just a simple index, nothing is deleted from this list anyway. */
+ pdo->pdo_id = g_slist_length(di->pd_output);
+ pdo->output_type = output_type;
+ pdo->di = di;
+ pdo->proto_id = g_strdup(proto_id);
+
+ if (output_type == SRD_OUTPUT_META) {
+ pdo->meta_type = meta_type_gv;
+ pdo->meta_name = g_strdup(meta_name);
+ pdo->meta_descr = g_strdup(meta_descr);
+ }
+
+ di->pd_output = g_slist_append(di->pd_output, pdo);
+ py_new_output_id = Py_BuildValue("i", pdo->pdo_id);
+
+ return py_new_output_id;
+}
+
+static PyMethodDef Decoder_methods[] = {
+ {"put", Decoder_put, METH_VARARGS,
+ "Accepts a dictionary with the following keys: startsample, endsample, data"},
+ {"register", (PyCFunction)Decoder_register, METH_VARARGS|METH_KEYWORDS,
+ "Register a new output stream"},
+ {NULL, NULL, 0, NULL}
+};
+
+/** @cond PRIVATE */
+SRD_PRIV PyTypeObject srd_Decoder_type = {
+ PyVarObject_HEAD_INIT(NULL, 0)
+ .tp_name = "sigrokdecode.Decoder",
+ .tp_basicsize = sizeof(srd_Decoder),
+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ .tp_doc = "sigrok Decoder base class",
+ .tp_methods = Decoder_methods,
+};
+/** @endcond */
diff --git a/type_logic.c b/type_logic.c
new file mode 100644
index 0000000..4367680
--- /dev/null
+++ b/type_logic.c
@@ -0,0 +1,85 @@
+/*
+ * This file is part of the libsigrokdecode project.
+ *
+ * Copyright (C) 2012 Bert Vermeulen <bert at biot.com>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "libsigrokdecode.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include "config.h"
+#include <inttypes.h>
+#include <string.h>
+
+static PyObject *srd_logic_iter(PyObject *self)
+{
+ return self;
+}
+
+static PyObject *srd_logic_iternext(PyObject *self)
+{
+ srd_logic *logic;
+ PyObject *py_samplenum, *py_samples;
+ uint8_t *sample_pos, sample;
+ int byte_offset, bit_offset, i;
+
+ logic = (srd_logic *)self;
+ if (logic->itercnt >= logic->inbuflen / logic->di->data_unitsize) {
+ /* End iteration loop. */
+ return NULL;
+ }
+
+ /*
+ * Convert the bit-packed sample to an array of bytes, with only 0x01
+ * and 0x00 values, so the PD doesn't need to do any bitshifting.
+ */
+ sample_pos = logic->inbuf + logic->itercnt * logic->di->data_unitsize;
+ for (i = 0; i < logic->di->dec_num_channels; i++) {
+ /* A channelmap value of -1 means "unused optional channel". */
+ if (logic->di->dec_channelmap[i] == -1) {
+ /* Value of unused channel is 0xff, instead of 0 or 1. */
+ logic->di->channel_samples[i] = 0xff;
+ } else {
+ byte_offset = logic->di->dec_channelmap[i] / 8;
+ bit_offset = logic->di->dec_channelmap[i] % 8;
+ sample = *(sample_pos + byte_offset) & (1 << bit_offset) ? 1 : 0;
+ logic->di->channel_samples[i] = sample;
+ }
+ }
+
+ /* Prepare the next samplenum/sample list in this iteration. */
+ py_samplenum =
+ PyLong_FromUnsignedLongLong(logic->start_samplenum +
+ logic->itercnt);
+ PyList_SetItem(logic->sample, 0, py_samplenum);
+ py_samples = PyBytes_FromStringAndSize((const char *)logic->di->channel_samples,
+ logic->di->dec_num_channels);
+ PyList_SetItem(logic->sample, 1, py_samples);
+ Py_INCREF(logic->sample);
+ logic->itercnt++;
+
+ return logic->sample;
+}
+
+/** @cond PRIVATE */
+SRD_PRIV PyTypeObject srd_logic_type = {
+ PyVarObject_HEAD_INIT(NULL, 0)
+ .tp_name = "srd_logic",
+ .tp_basicsize = sizeof(srd_logic),
+ .tp_flags = Py_TPFLAGS_DEFAULT,
+ .tp_doc = "Sigrokdecode logic sample object",
+ .tp_iter = srd_logic_iter,
+ .tp_iternext = srd_logic_iternext,
+};
+/** @endcond */
diff --git a/util.c b/util.c
new file mode 100644
index 0000000..1efaa84
--- /dev/null
+++ b/util.c
@@ -0,0 +1,200 @@
+/*
+ * This file is part of the libsigrokdecode project.
+ *
+ * Copyright (C) 2010 Uwe Hermann <uwe at hermann-uwe.de>
+ * Copyright (C) 2012 Bert Vermeulen <bert at biot.com>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#include "libsigrokdecode.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include "libsigrokdecode-internal.h"
+#include "config.h"
+
+/**
+ * Get the value of a Python object's attribute, returned as a newly
+ * allocated char *.
+ *
+ * @param py_obj The object to probe.
+ * @param attr Name of the attribute to retrieve.
+ * @param outstr ptr to char * storage to be filled in.
+ *
+ * @return SRD_OK upon success, a (negative) error code otherwise.
+ * The 'outstr' argument points to a malloc()ed string upon success.
+ *
+ * @private
+ */
+SRD_PRIV int py_attr_as_str(const PyObject *py_obj, const char *attr,
+ char **outstr)
+{
+ PyObject *py_str;
+ int ret;
+
+ if (!PyObject_HasAttrString((PyObject *)py_obj, attr)) {
+ srd_dbg("%s object has no attribute '%s'.",
+ Py_TYPE(py_obj)->tp_name, attr);
+ return SRD_ERR_PYTHON;
+ }
+
+ if (!(py_str = PyObject_GetAttrString((PyObject *)py_obj, attr))) {
+ srd_exception_catch("");
+ return SRD_ERR_PYTHON;
+ }
+
+ if (!PyUnicode_Check(py_str)) {
+ srd_dbg("%s attribute should be a string, but is a %s.",
+ attr, Py_TYPE(py_str)->tp_name);
+ Py_DecRef(py_str);
+ return SRD_ERR_PYTHON;
+ }
+
+ ret = py_str_as_str(py_str, outstr);
+ Py_DecRef(py_str);
+
+ return ret;
+}
+
+/**
+ * Get the value of a Python dictionary item, returned as a newly
+ * allocated char *.
+ *
+ * @param py_obj The dictionary to probe.
+ * @param key Key of the item to retrieve.
+ * @param outstr Pointer to char * storage to be filled in.
+ *
+ * @return SRD_OK upon success, a (negative) error code otherwise.
+ * The 'outstr' argument points to a malloc()ed string upon success.
+ *
+ * @private
+ */
+SRD_PRIV int py_dictitem_as_str(const PyObject *py_obj, const char *key,
+ char **outstr)
+{
+ PyObject *py_value;
+ int ret;
+
+ if (!PyDict_Check((PyObject *)py_obj)) {
+ srd_dbg("Object is a %s, not a dictionary.",
+ Py_TYPE((PyObject *)py_obj)->tp_name);
+ return SRD_ERR_PYTHON;
+ }
+
+ if (!(py_value = PyDict_GetItemString((PyObject *)py_obj, key))) {
+ srd_dbg("Dictionary has no attribute '%s'.", key);
+ return SRD_ERR_PYTHON;
+ }
+
+ if (!PyUnicode_Check(py_value)) {
+ srd_dbg("Dictionary value for %s should be a string, but is "
+ "a %s.", key, Py_TYPE(py_value)->tp_name);
+ return SRD_ERR_PYTHON;
+ }
+
+ ret = py_str_as_str(py_value, outstr);
+
+ return ret;
+}
+
+/**
+ * Get the value of a Python unicode string object, returned as a newly
+ * allocated char *.
+ *
+ * @param py_str The unicode string object.
+ * @param outstr ptr to char * storage to be filled in.
+ *
+ * @return SRD_OK upon success, a (negative) error code otherwise.
+ * The 'outstr' argument points to a malloc()ed string upon success.
+ *
+ * @private
+ */
+SRD_PRIV int py_str_as_str(const PyObject *py_str, char **outstr)
+{
+ PyObject *py_encstr;
+ int ret;
+ char *str;
+
+ py_encstr = NULL;
+ str = NULL;
+ ret = SRD_OK;
+
+ if (!PyUnicode_Check((PyObject *)py_str)) {
+ srd_dbg("Object is a %s, not a string object.",
+ Py_TYPE((PyObject *)py_str)->tp_name);
+ ret = SRD_ERR_PYTHON;
+ goto err_out;
+ }
+
+ if (!(py_encstr = PyUnicode_AsEncodedString((PyObject *)py_str,
+ "utf-8", NULL))) {
+ ret = SRD_ERR_PYTHON;
+ goto err_out;
+ }
+ if (!(str = PyBytes_AS_STRING(py_encstr))) {
+ ret = SRD_ERR_PYTHON;
+ goto err_out;
+ }
+
+ if (!(*outstr = g_strdup(str))) {
+ srd_dbg("Failed to g_malloc() outstr.");
+ ret = SRD_ERR_MALLOC;
+ goto err_out;
+ }
+
+err_out:
+ if (py_encstr)
+ Py_XDECREF(py_encstr);
+
+ if (PyErr_Occurred()) {
+ srd_exception_catch("string conversion failed");
+ }
+
+ return ret;
+}
+
+/**
+ * Convert a Python list of unicode strings to a NULL-terminated UTF8-encoded
+ * char * array. The caller must g_free() each string when finished.
+ *
+ * @param py_strlist The list object.
+ * @param outstr ptr to char ** storage to be filled in.
+ *
+ * @return SRD_OK upon success, a (negative) error code otherwise.
+ * The 'outstr' argument points to a g_malloc()ed char** upon success.
+ *
+ * @private
+ */
+SRD_PRIV int py_strseq_to_char(const PyObject *py_strseq, char ***outstr)
+{
+ PyObject *py_str;
+ int list_len, i;
+ char **out, *str;
+
+ list_len = PySequence_Size((PyObject *)py_strseq);
+ if (!(out = g_try_malloc(sizeof(char *) * (list_len + 1)))) {
+ srd_err("Failed to g_malloc() 'out'.");
+ return SRD_ERR_MALLOC;
+ }
+ for (i = 0; i < list_len; i++) {
+ if (!(py_str = PyUnicode_AsEncodedString(
+ PySequence_GetItem((PyObject *)py_strseq, i), "utf-8", NULL)))
+ return SRD_ERR_PYTHON;
+ if (!(str = PyBytes_AS_STRING(py_str)))
+ return SRD_ERR_PYTHON;
+ out[i] = g_strdup(str);
+ }
+ out[i] = NULL;
+ *outstr = out;
+
+ return SRD_OK;
+}
diff --git a/version.c b/version.c
new file mode 100644
index 0000000..8fbbafa
--- /dev/null
+++ b/version.c
@@ -0,0 +1,148 @@
+/*
+ * This file is part of the libsigrokdecode project.
+ *
+ * Copyright (C) 2012-2013 Uwe Hermann <uwe at hermann-uwe.de>
+ *
+ * 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 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "libsigrokdecode.h"
+
+/**
+ * @file
+ *
+ * Version number querying functions, definitions, and macros.
+ */
+
+/**
+ * @defgroup grp_versions Versions
+ *
+ * Version number querying functions, definitions, and macros.
+ *
+ * This set of API calls returns two different version numbers related
+ * to libsigrokdecode. The "package version" is the release version number
+ * of the libsigrokdecode tarball in the usual "major.minor.micro" format,
+ * e.g. "0.1.0".
+ *
+ * The "library version" is independent of that; it is the libtool version
+ * number in the "current:revision:age" format, e.g. "2:0:0".
+ * See http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning for details.
+ *
+ * Both version numbers (and/or individual components of them) can be
+ * retrieved via the API calls at runtime, and/or they can be checked at
+ * compile/preprocessor time using the respective macros.
+ *
+ * @{
+ */
+
+/**
+ * Get the major libsigrokdecode package version number.
+ *
+ * @return The major package version number.
+ *
+ * @since 0.1.0
+ */
+SRD_API int srd_package_version_major_get(void)
+{
+ return SRD_PACKAGE_VERSION_MAJOR;
+}
+
+/**
+ * Get the minor libsigrokdecode package version number.
+ *
+ * @return The minor package version number.
+ *
+ * @since 0.1.0
+ */
+SRD_API int srd_package_version_minor_get(void)
+{
+ return SRD_PACKAGE_VERSION_MINOR;
+}
+
+/**
+ * Get the micro libsigrokdecode package version number.
+ *
+ * @return The micro package version number.
+ *
+ * @since 0.1.0
+ */
+SRD_API int srd_package_version_micro_get(void)
+{
+ return SRD_PACKAGE_VERSION_MICRO;
+}
+
+/**
+ * Get the libsigrokdecode package version number as a string.
+ *
+ * @return The package version number string. The returned string is
+ * static and thus should NOT be free'd by the caller.
+ *
+ * @since 0.1.0
+ */
+SRD_API const char *srd_package_version_string_get(void)
+{
+ return SRD_PACKAGE_VERSION_STRING;
+}
+
+/**
+ * Get the "current" part of the libsigrokdecode library version number.
+ *
+ * @return The "current" library version number.
+ *
+ * @since 0.1.0
+ */
+SRD_API int srd_lib_version_current_get(void)
+{
+ return SRD_LIB_VERSION_CURRENT;
+}
+
+/**
+ * Get the "revision" part of the libsigrokdecode library version number.
+ *
+ * @return The "revision" library version number.
+ *
+ * @since 0.1.0
+ */
+SRD_API int srd_lib_version_revision_get(void)
+{
+ return SRD_LIB_VERSION_REVISION;
+}
+
+/**
+ * Get the "age" part of the libsigrokdecode library version number.
+ *
+ * @return The "age" library version number.
+ *
+ * @since 0.1.0
+ */
+SRD_API int srd_lib_version_age_get(void)
+{
+ return SRD_LIB_VERSION_AGE;
+}
+
+/**
+ * Get the libsigrokdecode library version number as a string.
+ *
+ * @return The library version number string. The returned string is
+ * static and thus should NOT be free'd by the caller.
+ *
+ * @since 0.1.0
+ */
+SRD_API const char *srd_lib_version_string_get(void)
+{
+ return SRD_LIB_VERSION_STRING;
+}
+
+/** @} */
diff --git a/version.h b/version.h
new file mode 100644
index 0000000..017bea7
--- /dev/null
+++ b/version.h
@@ -0,0 +1,70 @@
+/*
+ * This file is part of the libsigrokdecode project.
+ *
+ * Copyright (C) 2010 Uwe Hermann <uwe at hermann-uwe.de>
+ * Copyright (C) 2012 Bert Vermeulen <bert at biot.com>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef LIBSIGROKDECODE_VERSION_H
+#define LIBSIGROKDECODE_VERSION_H
+
+/**
+ * @file
+ *
+ * Version number definitions and macros.
+ */
+
+/**
+ * @ingroup grp_versions
+ *
+ * @{
+ */
+
+/*
+ * Package version macros (can be used for conditional compilation).
+ */
+
+/** The libsigrokdecode package 'major' version number. */
+#define SRD_PACKAGE_VERSION_MAJOR 0
+
+/** The libsigrokdecode package 'minor' version number. */
+#define SRD_PACKAGE_VERSION_MINOR 3
+
+/** The libsigrokdecode package 'micro' version number. */
+#define SRD_PACKAGE_VERSION_MICRO 0
+
+/** The libsigrokdecode package version ("major.minor.micro") as string. */
+#define SRD_PACKAGE_VERSION_STRING "0.3.0"
+
+/*
+ * Library/libtool version macros (can be used for conditional compilation).
+ */
+
+/** The libsigrokdecode libtool 'current' version number. */
+#define SRD_LIB_VERSION_CURRENT 2
+
+/** The libsigrokdecode libtool 'revision' version number. */
+#define SRD_LIB_VERSION_REVISION 0
+
+/** The libsigrokdecode libtool 'age' version number. */
+#define SRD_LIB_VERSION_AGE 0
+
+/** The libsigrokdecode libtool version ("current:revision:age") as string. */
+#define SRD_LIB_VERSION_STRING "2:0:0"
+
+/** @} */
+
+#endif
diff --git a/version.h.in b/version.h.in
new file mode 100644
index 0000000..5e78711
--- /dev/null
+++ b/version.h.in
@@ -0,0 +1,70 @@
+/*
+ * This file is part of the libsigrokdecode project.
+ *
+ * Copyright (C) 2010 Uwe Hermann <uwe at hermann-uwe.de>
+ * Copyright (C) 2012 Bert Vermeulen <bert at biot.com>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef LIBSIGROKDECODE_VERSION_H
+#define LIBSIGROKDECODE_VERSION_H
+
+/**
+ * @file
+ *
+ * Version number definitions and macros.
+ */
+
+/**
+ * @ingroup grp_versions
+ *
+ * @{
+ */
+
+/*
+ * Package version macros (can be used for conditional compilation).
+ */
+
+/** The libsigrokdecode package 'major' version number. */
+#define SRD_PACKAGE_VERSION_MAJOR @SRD_PACKAGE_VERSION_MAJOR@
+
+/** The libsigrokdecode package 'minor' version number. */
+#define SRD_PACKAGE_VERSION_MINOR @SRD_PACKAGE_VERSION_MINOR@
+
+/** The libsigrokdecode package 'micro' version number. */
+#define SRD_PACKAGE_VERSION_MICRO @SRD_PACKAGE_VERSION_MICRO@
+
+/** The libsigrokdecode package version ("major.minor.micro") as string. */
+#define SRD_PACKAGE_VERSION_STRING "@SRD_PACKAGE_VERSION@"
+
+/*
+ * Library/libtool version macros (can be used for conditional compilation).
+ */
+
+/** The libsigrokdecode libtool 'current' version number. */
+#define SRD_LIB_VERSION_CURRENT @SRD_LIB_VERSION_CURRENT@
+
+/** The libsigrokdecode libtool 'revision' version number. */
+#define SRD_LIB_VERSION_REVISION @SRD_LIB_VERSION_REVISION@
+
+/** The libsigrokdecode libtool 'age' version number. */
+#define SRD_LIB_VERSION_AGE @SRD_LIB_VERSION_AGE@
+
+/** The libsigrokdecode libtool version ("current:revision:age") as string. */
+#define SRD_LIB_VERSION_STRING "@SRD_LIB_VERSION@"
+
+/** @} */
+
+#endif
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/libsigrokdecode.git
More information about the debian-science-commits
mailing list