import SDK release
authorLuc Pionchon <luc.pionchon@nokia.com>
Mon, 4 Jul 2005 18:31:56 +0000 (18:31 +0000)
committerLuc Pionchon <luc.pionchon@nokia.com>
Mon, 4 Jul 2005 18:31:56 +0000 (18:31 +0000)
154 files changed:
COPYING [new file with mode: 0755]
Makefile.am [new file with mode: 0644]
Makefile.in [new file with mode: 0644]
aclocal.m4 [new file with mode: 0644]
config.guess [new file with mode: 0755]
config.h.in [new file with mode: 0644]
config.sub [new file with mode: 0755]
configure [new file with mode: 0755]
configure.ac [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/hildon-libs-dev.docs [new file with mode: 0644]
debian/hildon-libs-dev.install [new file with mode: 0644]
debian/hildon-libs-l10n-engb.install [new file with mode: 0644]
debian/hildon-libs-l10n-src.install [new file with mode: 0644]
debian/hildon-libs0-dbg.install [new file with mode: 0644]
debian/hildon-libs0.install [new file with mode: 0644]
debian/rules [new file with mode: 0755]
depcomp [new file with mode: 0755]
doc/Makefile.am [new file with mode: 0644]
doc/Makefile.in [new file with mode: 0644]
doc/hildon-libs-docs.xml [new file with mode: 0644]
doc/hildon-libs.types [new file with mode: 0644]
doc/tmpl/hildon-calendar-popup.sgml [new file with mode: 0644]
doc/tmpl/hildon-color-button.sgml [new file with mode: 0644]
doc/tmpl/hildon-color-selector.sgml [new file with mode: 0644]
doc/tmpl/hildon-controlbar.sgml [new file with mode: 0644]
doc/tmpl/hildon-date-editor.sgml [new file with mode: 0644]
doc/tmpl/hildon-dialoghelp.sgml [new file with mode: 0644]
doc/tmpl/hildon-file-details-dialog.sgml [new file with mode: 0644]
doc/tmpl/hildon-file-handling-note.sgml [new file with mode: 0644]
doc/tmpl/hildon-find-object-dialog.sgml [new file with mode: 0644]
doc/tmpl/hildon-font-selection-dialog.sgml [new file with mode: 0644]
doc/tmpl/hildon-get-password-dialog.sgml [new file with mode: 0644]
doc/tmpl/hildon-grid-item-private.sgml [new file with mode: 0644]
doc/tmpl/hildon-grid-item.sgml [new file with mode: 0644]
doc/tmpl/hildon-grid.sgml [new file with mode: 0644]
doc/tmpl/hildon-hvolumebar.sgml [new file with mode: 0644]
doc/tmpl/hildon-hwr-area.sgml [new file with mode: 0644]
doc/tmpl/hildon-insert-object-dialog.sgml [new file with mode: 0644]
doc/tmpl/hildon-libs-unused.sgml [new file with mode: 0644]
doc/tmpl/hildon-name-password-dialog.sgml [new file with mode: 0644]
doc/tmpl/hildon-note.sgml [new file with mode: 0644]
doc/tmpl/hildon-number-editor.sgml [new file with mode: 0644]
doc/tmpl/hildon-range-editor.sgml [new file with mode: 0644]
doc/tmpl/hildon-scroll-area.sgml [new file with mode: 0644]
doc/tmpl/hildon-search.sgml [new file with mode: 0644]
doc/tmpl/hildon-seekbar.sgml [new file with mode: 0644]
doc/tmpl/hildon-set-password-dialog.sgml [new file with mode: 0644]
doc/tmpl/hildon-sort-dialog.sgml [new file with mode: 0644]
doc/tmpl/hildon-telephone-editor.sgml [new file with mode: 0644]
doc/tmpl/hildon-time-editor.sgml [new file with mode: 0644]
doc/tmpl/hildon-time-picker.sgml [new file with mode: 0644]
doc/tmpl/hildon-volumebar.sgml [new file with mode: 0644]
doc/tmpl/hildon-vvolumebar.sgml [new file with mode: 0644]
doc/tmpl/hildon-weekday-picker.sgml [new file with mode: 0644]
doc/tmpl/hildon-wizard-dialog.sgml [new file with mode: 0644]
hildon-libs.pc.in [new file with mode: 0644]
hildon-widgets/Makefile.am [new file with mode: 0644]
hildon-widgets/Makefile.in [new file with mode: 0644]
hildon-widgets/hildon-add-home-dialog.c [new file with mode: 0644]
hildon-widgets/hildon-add-home-dialog.h [new file with mode: 0644]
hildon-widgets/hildon-calendar-popup.c [new file with mode: 0644]
hildon-widgets/hildon-calendar-popup.h [new file with mode: 0644]
hildon-widgets/hildon-color-button.c [new file with mode: 0644]
hildon-widgets/hildon-color-button.h [new file with mode: 0644]
hildon-widgets/hildon-color-popup.c [new file with mode: 0644]
hildon-widgets/hildon-color-popup.h [new file with mode: 0644]
hildon-widgets/hildon-color-selector.c [new file with mode: 0644]
hildon-widgets/hildon-color-selector.h [new file with mode: 0644]
hildon-widgets/hildon-composite-widget.c [new file with mode: 0644]
hildon-widgets/hildon-composite-widget.h [new file with mode: 0644]
hildon-widgets/hildon-controlbar.c [new file with mode: 0644]
hildon-widgets/hildon-controlbar.h [new file with mode: 0644]
hildon-widgets/hildon-date-editor.c [new file with mode: 0644]
hildon-widgets/hildon-date-editor.h [new file with mode: 0644]
hildon-widgets/hildon-dialoghelp.c [new file with mode: 0644]
hildon-widgets/hildon-dialoghelp.h [new file with mode: 0644]
hildon-widgets/hildon-file-details-dialog.c [new file with mode: 0644]
hildon-widgets/hildon-file-details-dialog.h [new file with mode: 0644]
hildon-widgets/hildon-file-handling-note.c [new file with mode: 0644]
hildon-widgets/hildon-file-handling-note.h [new file with mode: 0644]
hildon-widgets/hildon-find-object-dialog.c [new file with mode: 0644]
hildon-widgets/hildon-find-object-dialog.h [new file with mode: 0644]
hildon-widgets/hildon-find-replace-dialog.c [new file with mode: 0644]
hildon-widgets/hildon-find-replace-dialog.h [new file with mode: 0644]
hildon-widgets/hildon-font-selection-dialog.c [new file with mode: 0644]
hildon-widgets/hildon-font-selection-dialog.h [new file with mode: 0644]
hildon-widgets/hildon-get-password-dialog.c [new file with mode: 0644]
hildon-widgets/hildon-get-password-dialog.h [new file with mode: 0644]
hildon-widgets/hildon-grid-item-private.h [new file with mode: 0644]
hildon-widgets/hildon-grid-item.c [new file with mode: 0644]
hildon-widgets/hildon-grid-item.h [new file with mode: 0644]
hildon-widgets/hildon-grid.c [new file with mode: 0644]
hildon-widgets/hildon-grid.h [new file with mode: 0644]
hildon-widgets/hildon-hvolumebar.c [new file with mode: 0644]
hildon-widgets/hildon-hvolumebar.h [new file with mode: 0644]
hildon-widgets/hildon-insert-object-dialog.c [new file with mode: 0644]
hildon-widgets/hildon-insert-object-dialog.h [new file with mode: 0644]
hildon-widgets/hildon-name-password-dialog.c [new file with mode: 0644]
hildon-widgets/hildon-name-password-dialog.h [new file with mode: 0644]
hildon-widgets/hildon-note.c [new file with mode: 0644]
hildon-widgets/hildon-note.h [new file with mode: 0644]
hildon-widgets/hildon-number-editor.c [new file with mode: 0644]
hildon-widgets/hildon-number-editor.h [new file with mode: 0644]
hildon-widgets/hildon-range-editor.c [new file with mode: 0644]
hildon-widgets/hildon-range-editor.h [new file with mode: 0644]
hildon-widgets/hildon-scroll-area.c [new file with mode: 0644]
hildon-widgets/hildon-scroll-area.h [new file with mode: 0644]
hildon-widgets/hildon-search.c [new file with mode: 0644]
hildon-widgets/hildon-search.h [new file with mode: 0644]
hildon-widgets/hildon-seekbar.c [new file with mode: 0644]
hildon-widgets/hildon-seekbar.h [new file with mode: 0644]
hildon-widgets/hildon-set-password-dialog.c [new file with mode: 0644]
hildon-widgets/hildon-set-password-dialog.h [new file with mode: 0644]
hildon-widgets/hildon-sort-dialog.c [new file with mode: 0644]
hildon-widgets/hildon-sort-dialog.h [new file with mode: 0644]
hildon-widgets/hildon-telephone-editor.c [new file with mode: 0644]
hildon-widgets/hildon-telephone-editor.h [new file with mode: 0644]
hildon-widgets/hildon-time-editor.c [new file with mode: 0644]
hildon-widgets/hildon-time-editor.h [new file with mode: 0644]
hildon-widgets/hildon-time-picker.c [new file with mode: 0644]
hildon-widgets/hildon-time-picker.h [new file with mode: 0644]
hildon-widgets/hildon-volumebar-private.h [new file with mode: 0644]
hildon-widgets/hildon-volumebar-range.c [new file with mode: 0644]
hildon-widgets/hildon-volumebar-range.h [new file with mode: 0644]
hildon-widgets/hildon-volumebar.c [new file with mode: 0644]
hildon-widgets/hildon-volumebar.h [new file with mode: 0644]
hildon-widgets/hildon-vvolumebar.c [new file with mode: 0644]
hildon-widgets/hildon-vvolumebar.h [new file with mode: 0644]
hildon-widgets/hildon-weekday-picker.c [new file with mode: 0644]
hildon-widgets/hildon-weekday-picker.h [new file with mode: 0644]
hildon-widgets/hildon-wizard-dialog.c [new file with mode: 0644]
hildon-widgets/hildon-wizard-dialog.h [new file with mode: 0644]
install-sh [new file with mode: 0755]
ltmain.sh [new file with mode: 0644]
missing [new file with mode: 0755]
mkinstalldirs [new file with mode: 0755]
po/Makefile.am [new file with mode: 0644]
po/Makefile.in [new file with mode: 0644]
po/POTFILES [new file with mode: 0644]
po/POTFILES.in [new file with mode: 0644]
po/README [new file with mode: 0644]
po/debian/compat [new file with mode: 0644]
po/debian/control [new file with mode: 0644]
po/debian/rules [new file with mode: 0755]
po/en_GB.po [new file with mode: 0644]
po/porules.mk.in [new file with mode: 0644]
ut/Makefile.am [new file with mode: 0644]
ut/Makefile.in [new file with mode: 0644]
ut/hildon-clock-widgets_tests.c [new file with mode: 0644]
ut/hildon-widgets_tests.c [new file with mode: 0644]
ut/tmp [new file with mode: 0644]

diff --git a/COPYING b/COPYING
new file mode 100755 (executable)
index 0000000..54905a6
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,504 @@
+                 GNU LESSER GENERAL PUBLIC LICENSE\r
+                      Version 2.1, February 1999\r
+\r
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.\r
+     51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\r
+ Everyone is permitted to copy and distribute verbatim copies\r
+ of this license document, but changing it is not allowed.\r
+\r
+[This is the first released version of the Lesser GPL.  It also counts\r
+ as the successor of the GNU Library Public License, version 2, hence\r
+ the version number 2.1.]\r
+\r
+                           Preamble\r
+\r
+  The licenses for most software are designed to take away your\r
+freedom to share and change it.  By contrast, the GNU General Public\r
+Licenses are intended to guarantee your freedom to share and change\r
+free software--to make sure the software is free for all its users.\r
+\r
+  This license, the Lesser General Public License, applies to some\r
+specially designated software packages--typically libraries--of the\r
+Free Software Foundation and other authors who decide to use it.  You\r
+can use it too, but we suggest you first think carefully about whether\r
+this license or the ordinary General Public License is the better\r
+strategy to use in any particular case, based on the explanations below.\r
+\r
+  When we speak of free software, we are referring to freedom of use,\r
+not price.  Our General Public Licenses are designed to make sure that\r
+you have the freedom to distribute copies of free software (and charge\r
+for this service if you wish); that you receive source code or can get\r
+it if you want it; that you can change the software and use pieces of\r
+it in new free programs; and that you are informed that you can do\r
+these things.\r
+\r
+  To protect your rights, we need to make restrictions that forbid\r
+distributors to deny you these rights or to ask you to surrender these\r
+rights.  These restrictions translate to certain responsibilities for\r
+you if you distribute copies of the library or if you modify it.\r
+\r
+  For example, if you distribute copies of the library, whether gratis\r
+or for a fee, you must give the recipients all the rights that we gave\r
+you.  You must make sure that they, too, receive or can get the source\r
+code.  If you link other code with the library, you must provide\r
+complete object files to the recipients, so that they can relink them\r
+with the library after making changes to the library and recompiling\r
+it.  And you must show them these terms so they know their rights.\r
+\r
+  We protect your rights with a two-step method: (1) we copyright the\r
+library, and (2) we offer you this license, which gives you legal\r
+permission to copy, distribute and/or modify the library.\r
+\r
+  To protect each distributor, we want to make it very clear that\r
+there is no warranty for the free library.  Also, if the library is\r
+modified by someone else and passed on, the recipients should know\r
+that what they have is not the original version, so that the original\r
+author's reputation will not be affected by problems that might be\r
+introduced by others.\r
+\f\r
+  Finally, software patents pose a constant threat to the existence of\r
+any free program.  We wish to make sure that a company cannot\r
+effectively restrict the users of a free program by obtaining a\r
+restrictive license from a patent holder.  Therefore, we insist that\r
+any patent license obtained for a version of the library must be\r
+consistent with the full freedom of use specified in this license.\r
+\r
+  Most GNU software, including some libraries, is covered by the\r
+ordinary GNU General Public License.  This license, the GNU Lesser\r
+General Public License, applies to certain designated libraries, and\r
+is quite different from the ordinary General Public License.  We use\r
+this license for certain libraries in order to permit linking those\r
+libraries into non-free programs.\r
+\r
+  When a program is linked with a library, whether statically or using\r
+a shared library, the combination of the two is legally speaking a\r
+combined work, a derivative of the original library.  The ordinary\r
+General Public License therefore permits such linking only if the\r
+entire combination fits its criteria of freedom.  The Lesser General\r
+Public License permits more lax criteria for linking other code with\r
+the library.\r
+\r
+  We call this license the "Lesser" General Public License because it\r
+does Less to protect the user's freedom than the ordinary General\r
+Public License.  It also provides other free software developers Less\r
+of an advantage over competing non-free programs.  These disadvantages\r
+are the reason we use the ordinary General Public License for many\r
+libraries.  However, the Lesser license provides advantages in certain\r
+special circumstances.\r
+\r
+  For example, on rare occasions, there may be a special need to\r
+encourage the widest possible use of a certain library, so that it becomes\r
+a de-facto standard.  To achieve this, non-free programs must be\r
+allowed to use the library.  A more frequent case is that a free\r
+library does the same job as widely used non-free libraries.  In this\r
+case, there is little to gain by limiting the free library to free\r
+software only, so we use the Lesser General Public License.\r
+\r
+  In other cases, permission to use a particular library in non-free\r
+programs enables a greater number of people to use a large body of\r
+free software.  For example, permission to use the GNU C Library in\r
+non-free programs enables many more people to use the whole GNU\r
+operating system, as well as its variant, the GNU/Linux operating\r
+system.\r
+\r
+  Although the Lesser General Public License is Less protective of the\r
+users' freedom, it does ensure that the user of a program that is\r
+linked with the Library has the freedom and the wherewithal to run\r
+that program using a modified version of the Library.\r
+\r
+  The precise terms and conditions for copying, distribution and\r
+modification follow.  Pay close attention to the difference between a\r
+"work based on the library" and a "work that uses the library".  The\r
+former contains code derived from the library, whereas the latter must\r
+be combined with the library in order to run.\r
+\f\r
+                 GNU LESSER GENERAL PUBLIC LICENSE\r
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\r
+\r
+  0. This License Agreement applies to any software library or other\r
+program which contains a notice placed by the copyright holder or\r
+other authorized party saying it may be distributed under the terms of\r
+this Lesser General Public License (also called "this License").\r
+Each licensee is addressed as "you".\r
+\r
+  A "library" means a collection of software functions and/or data\r
+prepared so as to be conveniently linked with application programs\r
+(which use some of those functions and data) to form executables.\r
+\r
+  The "Library", below, refers to any such software library or work\r
+which has been distributed under these terms.  A "work based on the\r
+Library" means either the Library or any derivative work under\r
+copyright law: that is to say, a work containing the Library or a\r
+portion of it, either verbatim or with modifications and/or translated\r
+straightforwardly into another language.  (Hereinafter, translation is\r
+included without limitation in the term "modification".)\r
+\r
+  "Source code" for a work means the preferred form of the work for\r
+making modifications to it.  For a library, complete source code means\r
+all the source code for all modules it contains, plus any associated\r
+interface definition files, plus the scripts used to control compilation\r
+and installation of the library.\r
+\r
+  Activities other than copying, distribution and modification are not\r
+covered by this License; they are outside its scope.  The act of\r
+running a program using the Library is not restricted, and output from\r
+such a program is covered only if its contents constitute a work based\r
+on the Library (independent of the use of the Library in a tool for\r
+writing it).  Whether that is true depends on what the Library does\r
+and what the program that uses the Library does.\r
+  \r
+  1. You may copy and distribute verbatim copies of the Library's\r
+complete source code as you receive it, in any medium, provided that\r
+you conspicuously and appropriately publish on each copy an\r
+appropriate copyright notice and disclaimer of warranty; keep intact\r
+all the notices that refer to this License and to the absence of any\r
+warranty; and distribute a copy of this License along with the\r
+Library.\r
+\r
+  You may charge a fee for the physical act of transferring a copy,\r
+and you may at your option offer warranty protection in exchange for a\r
+fee.\r
+\f\r
+  2. You may modify your copy or copies of the Library or any portion\r
+of it, thus forming a work based on the Library, and copy and\r
+distribute such modifications or work under the terms of Section 1\r
+above, provided that you also meet all of these conditions:\r
+\r
+    a) The modified work must itself be a software library.\r
+\r
+    b) You must cause the files modified to carry prominent notices\r
+    stating that you changed the files and the date of any change.\r
+\r
+    c) You must cause the whole of the work to be licensed at no\r
+    charge to all third parties under the terms of this License.\r
+\r
+    d) If a facility in the modified Library refers to a function or a\r
+    table of data to be supplied by an application program that uses\r
+    the facility, other than as an argument passed when the facility\r
+    is invoked, then you must make a good faith effort to ensure that,\r
+    in the event an application does not supply such function or\r
+    table, the facility still operates, and performs whatever part of\r
+    its purpose remains meaningful.\r
+\r
+    (For example, a function in a library to compute square roots has\r
+    a purpose that is entirely well-defined independent of the\r
+    application.  Therefore, Subsection 2d requires that any\r
+    application-supplied function or table used by this function must\r
+    be optional: if the application does not supply it, the square\r
+    root function must still compute square roots.)\r
+\r
+These requirements apply to the modified work as a whole.  If\r
+identifiable sections of that work are not derived from the Library,\r
+and can be reasonably considered independent and separate works in\r
+themselves, then this License, and its terms, do not apply to those\r
+sections when you distribute them as separate works.  But when you\r
+distribute the same sections as part of a whole which is a work based\r
+on the Library, the distribution of the whole must be on the terms of\r
+this License, whose permissions for other licensees extend to the\r
+entire whole, and thus to each and every part regardless of who wrote\r
+it.\r
+\r
+Thus, it is not the intent of this section to claim rights or contest\r
+your rights to work written entirely by you; rather, the intent is to\r
+exercise the right to control the distribution of derivative or\r
+collective works based on the Library.\r
+\r
+In addition, mere aggregation of another work not based on the Library\r
+with the Library (or with a work based on the Library) on a volume of\r
+a storage or distribution medium does not bring the other work under\r
+the scope of this License.\r
+\r
+  3. You may opt to apply the terms of the ordinary GNU General Public\r
+License instead of this License to a given copy of the Library.  To do\r
+this, you must alter all the notices that refer to this License, so\r
+that they refer to the ordinary GNU General Public License, version 2,\r
+instead of to this License.  (If a newer version than version 2 of the\r
+ordinary GNU General Public License has appeared, then you can specify\r
+that version instead if you wish.)  Do not make any other change in\r
+these notices.\r
+\f\r
+  Once this change is made in a given copy, it is irreversible for\r
+that copy, so the ordinary GNU General Public License applies to all\r
+subsequent copies and derivative works made from that copy.\r
+\r
+  This option is useful when you wish to copy part of the code of\r
+the Library into a program that is not a library.\r
+\r
+  4. You may copy and distribute the Library (or a portion or\r
+derivative of it, under Section 2) in object code or executable form\r
+under the terms of Sections 1 and 2 above provided that you accompany\r
+it with the complete corresponding machine-readable source code, which\r
+must be distributed under the terms of Sections 1 and 2 above on a\r
+medium customarily used for software interchange.\r
+\r
+  If distribution of object code is made by offering access to copy\r
+from a designated place, then offering equivalent access to copy the\r
+source code from the same place satisfies the requirement to\r
+distribute the source code, even though third parties are not\r
+compelled to copy the source along with the object code.\r
+\r
+  5. A program that contains no derivative of any portion of the\r
+Library, but is designed to work with the Library by being compiled or\r
+linked with it, is called a "work that uses the Library".  Such a\r
+work, in isolation, is not a derivative work of the Library, and\r
+therefore falls outside the scope of this License.\r
+\r
+  However, linking a "work that uses the Library" with the Library\r
+creates an executable that is a derivative of the Library (because it\r
+contains portions of the Library), rather than a "work that uses the\r
+library".  The executable is therefore covered by this License.\r
+Section 6 states terms for distribution of such executables.\r
+\r
+  When a "work that uses the Library" uses material from a header file\r
+that is part of the Library, the object code for the work may be a\r
+derivative work of the Library even though the source code is not.\r
+Whether this is true is especially significant if the work can be\r
+linked without the Library, or if the work is itself a library.  The\r
+threshold for this to be true is not precisely defined by law.\r
+\r
+  If such an object file uses only numerical parameters, data\r
+structure layouts and accessors, and small macros and small inline\r
+functions (ten lines or less in length), then the use of the object\r
+file is unrestricted, regardless of whether it is legally a derivative\r
+work.  (Executables containing this object code plus portions of the\r
+Library will still fall under Section 6.)\r
+\r
+  Otherwise, if the work is a derivative of the Library, you may\r
+distribute the object code for the work under the terms of Section 6.\r
+Any executables containing that work also fall under Section 6,\r
+whether or not they are linked directly with the Library itself.\r
+\f\r
+  6. As an exception to the Sections above, you may also combine or\r
+link a "work that uses the Library" with the Library to produce a\r
+work containing portions of the Library, and distribute that work\r
+under terms of your choice, provided that the terms permit\r
+modification of the work for the customer's own use and reverse\r
+engineering for debugging such modifications.\r
+\r
+  You must give prominent notice with each copy of the work that the\r
+Library is used in it and that the Library and its use are covered by\r
+this License.  You must supply a copy of this License.  If the work\r
+during execution displays copyright notices, you must include the\r
+copyright notice for the Library among them, as well as a reference\r
+directing the user to the copy of this License.  Also, you must do one\r
+of these things:\r
+\r
+    a) Accompany the work with the complete corresponding\r
+    machine-readable source code for the Library including whatever\r
+    changes were used in the work (which must be distributed under\r
+    Sections 1 and 2 above); and, if the work is an executable linked\r
+    with the Library, with the complete machine-readable "work that\r
+    uses the Library", as object code and/or source code, so that the\r
+    user can modify the Library and then relink to produce a modified\r
+    executable containing the modified Library.  (It is understood\r
+    that the user who changes the contents of definitions files in the\r
+    Library will not necessarily be able to recompile the application\r
+    to use the modified definitions.)\r
+\r
+    b) Use a suitable shared library mechanism for linking with the\r
+    Library.  A suitable mechanism is one that (1) uses at run time a\r
+    copy of the library already present on the user's computer system,\r
+    rather than copying library functions into the executable, and (2)\r
+    will operate properly with a modified version of the library, if\r
+    the user installs one, as long as the modified version is\r
+    interface-compatible with the version that the work was made with.\r
+\r
+    c) Accompany the work with a written offer, valid for at\r
+    least three years, to give the same user the materials\r
+    specified in Subsection 6a, above, for a charge no more\r
+    than the cost of performing this distribution.\r
+\r
+    d) If distribution of the work is made by offering access to copy\r
+    from a designated place, offer equivalent access to copy the above\r
+    specified materials from the same place.\r
+\r
+    e) Verify that the user has already received a copy of these\r
+    materials or that you have already sent this user a copy.\r
+\r
+  For an executable, the required form of the "work that uses the\r
+Library" must include any data and utility programs needed for\r
+reproducing the executable from it.  However, as a special exception,\r
+the materials to be distributed need not include anything that is\r
+normally distributed (in either source or binary form) with the major\r
+components (compiler, kernel, and so on) of the operating system on\r
+which the executable runs, unless that component itself accompanies\r
+the executable.\r
+\r
+  It may happen that this requirement contradicts the license\r
+restrictions of other proprietary libraries that do not normally\r
+accompany the operating system.  Such a contradiction means you cannot\r
+use both them and the Library together in an executable that you\r
+distribute.\r
+\f\r
+  7. You may place library facilities that are a work based on the\r
+Library side-by-side in a single library together with other library\r
+facilities not covered by this License, and distribute such a combined\r
+library, provided that the separate distribution of the work based on\r
+the Library and of the other library facilities is otherwise\r
+permitted, and provided that you do these two things:\r
+\r
+    a) Accompany the combined library with a copy of the same work\r
+    based on the Library, uncombined with any other library\r
+    facilities.  This must be distributed under the terms of the\r
+    Sections above.\r
+\r
+    b) Give prominent notice with the combined library of the fact\r
+    that part of it is a work based on the Library, and explaining\r
+    where to find the accompanying uncombined form of the same work.\r
+\r
+  8. You may not copy, modify, sublicense, link with, or distribute\r
+the Library except as expressly provided under this License.  Any\r
+attempt otherwise to copy, modify, sublicense, link with, or\r
+distribute the Library is void, and will automatically terminate your\r
+rights under this License.  However, parties who have received copies,\r
+or rights, from you under this License will not have their licenses\r
+terminated so long as such parties remain in full compliance.\r
+\r
+  9. You are not required to accept this License, since you have not\r
+signed it.  However, nothing else grants you permission to modify or\r
+distribute the Library or its derivative works.  These actions are\r
+prohibited by law if you do not accept this License.  Therefore, by\r
+modifying or distributing the Library (or any work based on the\r
+Library), you indicate your acceptance of this License to do so, and\r
+all its terms and conditions for copying, distributing or modifying\r
+the Library or works based on it.\r
+\r
+  10. Each time you redistribute the Library (or any work based on the\r
+Library), the recipient automatically receives a license from the\r
+original licensor to copy, distribute, link with or modify the Library\r
+subject to these terms and conditions.  You may not impose any further\r
+restrictions on the recipients' exercise of the rights granted herein.\r
+You are not responsible for enforcing compliance by third parties with\r
+this License.\r
+\f\r
+  11. If, as a consequence of a court judgment or allegation of patent\r
+infringement or for any other reason (not limited to patent issues),\r
+conditions are imposed on you (whether by court order, agreement or\r
+otherwise) that contradict the conditions of this License, they do not\r
+excuse you from the conditions of this License.  If you cannot\r
+distribute so as to satisfy simultaneously your obligations under this\r
+License and any other pertinent obligations, then as a consequence you\r
+may not distribute the Library at all.  For example, if a patent\r
+license would not permit royalty-free redistribution of the Library by\r
+all those who receive copies directly or indirectly through you, then\r
+the only way you could satisfy both it and this License would be to\r
+refrain entirely from distribution of the Library.\r
+\r
+If any portion of this section is held invalid or unenforceable under any\r
+particular circumstance, the balance of the section is intended to apply,\r
+and the section as a whole is intended to apply in other circumstances.\r
+\r
+It is not the purpose of this section to induce you to infringe any\r
+patents or other property right claims or to contest validity of any\r
+such claims; this section has the sole purpose of protecting the\r
+integrity of the free software distribution system which is\r
+implemented by public license practices.  Many people have made\r
+generous contributions to the wide range of software distributed\r
+through that system in reliance on consistent application of that\r
+system; it is up to the author/donor to decide if he or she is willing\r
+to distribute software through any other system and a licensee cannot\r
+impose that choice.\r
+\r
+This section is intended to make thoroughly clear what is believed to\r
+be a consequence of the rest of this License.\r
+\r
+  12. If the distribution and/or use of the Library is restricted in\r
+certain countries either by patents or by copyrighted interfaces, the\r
+original copyright holder who places the Library under this License may add\r
+an explicit geographical distribution limitation excluding those countries,\r
+so that distribution is permitted only in or among countries not thus\r
+excluded.  In such case, this License incorporates the limitation as if\r
+written in the body of this License.\r
+\r
+  13. The Free Software Foundation may publish revised and/or new\r
+versions of the Lesser General Public License from time to time.\r
+Such new versions will be similar in spirit to the present version,\r
+but may differ in detail to address new problems or concerns.\r
+\r
+Each version is given a distinguishing version number.  If the Library\r
+specifies a version number of this License which applies to it and\r
+"any later version", you have the option of following the terms and\r
+conditions either of that version or of any later version published by\r
+the Free Software Foundation.  If the Library does not specify a\r
+license version number, you may choose any version ever published by\r
+the Free Software Foundation.\r
+\f\r
+  14. If you wish to incorporate parts of the Library into other free\r
+programs whose distribution conditions are incompatible with these,\r
+write to the author to ask for permission.  For software which is\r
+copyrighted by the Free Software Foundation, write to the Free\r
+Software Foundation; we sometimes make exceptions for this.  Our\r
+decision will be guided by the two goals of preserving the free status\r
+of all derivatives of our free software and of promoting the sharing\r
+and reuse of software generally.\r
+\r
+                           NO WARRANTY\r
+\r
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO\r
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.\r
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR\r
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY\r
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE\r
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME\r
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\r
+\r
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN\r
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY\r
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU\r
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR\r
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE\r
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING\r
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A\r
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF\r
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\r
+DAMAGES.\r
+\r
+                    END OF TERMS AND CONDITIONS\r
+\f\r
+           How to Apply These Terms to Your New Libraries\r
+\r
+  If you develop a new library, and you want it to be of the greatest\r
+possible use to the public, we recommend making it free software that\r
+everyone can redistribute and change.  You can do so by permitting\r
+redistribution under these terms (or, alternatively, under the terms of the\r
+ordinary General Public License).\r
+\r
+  To apply these terms, attach the following notices to the library.  It is\r
+safest to attach them to the start of each source file to most effectively\r
+convey the exclusion of warranty; and each file should have at least the\r
+"copyright" line and a pointer to where the full notice is found.\r
+\r
+    <one line to give the library's name and a brief idea of what it does.>\r
+    Copyright (C) <year>  <name of author>\r
+\r
+    This library is free software; you can redistribute it and/or\r
+    modify it under the terms of the GNU Lesser General Public\r
+    License as published by the Free Software Foundation; either\r
+    version 2.1 of the License, or (at your option) any later version.\r
+\r
+    This library is distributed in the hope that it will be useful,\r
+    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+    Lesser General Public License for more details.\r
+\r
+    You should have received a copy of the GNU Lesser General Public\r
+    License along with this library; if not, write to the Free Software\r
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\r
+\r
+Also add information on how to contact you by electronic and paper mail.\r
+\r
+You should also get your employer (if you work as a programmer) or your\r
+school, if any, to sign a "copyright disclaimer" for the library, if\r
+necessary.  Here is a sample; alter the names:\r
+\r
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the\r
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.\r
+\r
+  <signature of Ty Coon>, 1 April 1990\r
+  Ty Coon, President of Vice\r
+\r
+That's all there is to it!\r
+\r
+\r
diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..34655d2
--- /dev/null
@@ -0,0 +1,27 @@
+SUBDIRS = hildon-widgets ut po doc 
+EXTRA_DIST = \
+       debian/changelog \
+       debian/control \
+       debian/copyright \
+       debian/hildon-libs-dev.docs \
+       debian/hildon-libs-dev.install \
+       debian/hildon-libs0.install \
+       debian/hildon-libs0-dbg.install \
+       debian/hildon-libs-l10n-engb.install \
+       debian/hildon-libs-l10n-src.install \
+       debian/rules
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = hildon-libs.pc
+
+distclean-am: 
+       -rm -rf autom4te.cache 
+       -rm -f config.status config.cache config.log configure.lineno  
+#      -rm -f config.guess config.h.in config.sub configure depcomp
+#      -rm -f install-sh ltmain.sh missing mkinstalldirs Makefile.in aclocal.m4
+
+deb: dist
+       -mkdir debian-build
+       cd debian-build && \
+       tar zxvf ../$(PACKAGE)-$(VERSION).tar.gz && \
+       cd $(PACKAGE)-$(VERSION) && dpkg-buildpackage -rfakeroot
diff --git a/Makefile.in b/Makefile.in
new file mode 100644 (file)
index 0000000..831f4a5
--- /dev/null
@@ -0,0 +1,639 @@
+# Makefile.in generated by automake 1.7.9 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = .
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+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 = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DOXYGEN_FOUND = @DOXYGEN_FOUND@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_GTK_DOC_FALSE = @ENABLE_GTK_DOC_FALSE@
+ENABLE_GTK_DOC_TRUE = @ENABLE_GTK_DOC_TRUE@
+ESD_CFLAGS = @ESD_CFLAGS@
+ESD_LIBS = @ESD_LIBS@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GCONF_CFLAGS = @GCONF_CFLAGS@
+GCONF_LIBS = @GCONF_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GNOME_VFS_CFLAGS = @GNOME_VFS_CFLAGS@
+GNOME_VFS_LIBS = @GNOME_VFS_LIBS@
+GTKDOC = @GTKDOC@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_VERSION = @GTK_VERSION@
+HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@
+HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@
+HTML_DIR = @HTML_DIR@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJEXT = @OBJEXT@
+OUTO_CFLAGS = @OUTO_CFLAGS@
+OUTO_LIBS = @OUTO_LIBS@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+docdir = @docdir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+outomoduledir = @outomoduledir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+SUBDIRS = hildon-widgets ut po doc 
+EXTRA_DIST = \
+       debian/changelog \
+       debian/control \
+       debian/copyright \
+       debian/hildon-libs-dev.docs \
+       debian/hildon-libs-dev.install \
+       debian/hildon-libs0.install \
+       debian/hildon-libs0-dbg.install \
+       debian/hildon-libs-l10n-engb.install \
+       debian/hildon-libs-l10n-src.install \
+       debian/rules
+
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = hildon-libs.pc
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = hildon-libs.pc
+DIST_SOURCES =
+DATA = $(pkgconfig_DATA)
+
+
+RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
+       ps-recursive install-info-recursive uninstall-info-recursive \
+       all-recursive install-data-recursive install-exec-recursive \
+       installdirs-recursive install-recursive uninstall-recursive \
+       check-recursive installcheck-recursive
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/configure COPYING \
+       Makefile.am aclocal.m4 config.guess config.h.in config.sub \
+       configure configure.ac depcomp hildon-libs.pc.in install-sh \
+       ltmain.sh missing mkinstalldirs
+DIST_SUBDIRS = $(SUBDIRS)
+all: config.h
+       $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --foreign  Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+       cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
+
+$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       $(SHELL) ./config.status --recheck
+$(srcdir)/configure:  $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+       cd $(srcdir) && $(AUTOCONF)
+
+$(ACLOCAL_M4):  configure.ac 
+       cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+config.h: stamp-h1
+       @if test ! -f $@; then \
+         rm -f stamp-h1; \
+         $(MAKE) stamp-h1; \
+       else :; fi
+
+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:  $(top_srcdir)/configure.ac $(ACLOCAL_M4) 
+       cd $(top_srcdir) && $(AUTOHEADER)
+       touch $(srcdir)/config.h.in
+
+distclean-hdr:
+       -rm -f config.h stamp-h1
+hildon-libs.pc: $(top_builddir)/config.status hildon-libs.pc.in
+       cd $(top_builddir) && $(SHELL) ./config.status $@
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+
+distclean-libtool:
+       -rm -f libtool
+uninstall-info-am:
+pkgconfigDATA_INSTALL = $(INSTALL_DATA)
+install-pkgconfigDATA: $(pkgconfig_DATA)
+       @$(NORMAL_INSTALL)
+       $(mkinstalldirs) $(DESTDIR)$(pkgconfigdir)
+       @list='$(pkgconfig_DATA)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         f="`echo $$p | sed -e 's|^.*/||'`"; \
+         echo " $(pkgconfigDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgconfigdir)/$$f"; \
+         $(pkgconfigDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgconfigdir)/$$f; \
+       done
+
+uninstall-pkgconfigDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(pkgconfig_DATA)'; for p in $$list; do \
+         f="`echo $$p | sed -e 's|^.*/||'`"; \
+         echo " rm -f $(DESTDIR)$(pkgconfigdir)/$$f"; \
+         rm -f $(DESTDIR)$(pkgconfigdir)/$$f; \
+       done
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+       @set fnord $$MAKEFLAGS; amf=$$2; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+          || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+       @set fnord $$MAKEFLAGS; amf=$$2; \
+       dot_seen=no; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
+       done; \
+       rev="$$rev ."; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+          || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+       done && test -z "$$fail"
+tags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+       done
+ctags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+       done
+
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       mkid -fID $$unique
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       if (etags --etags-include --version) >/dev/null 2>&1; then \
+         include_option=--etags-include; \
+       else \
+         include_option=--include; \
+       fi; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test -f $$subdir/TAGS && \
+             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+         fi; \
+       done; \
+       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(ETAGS_ARGS)$$tags$$unique" \
+         || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+            $$tags $$unique
+
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = .
+distdir = $(PACKAGE)-$(VERSION)
+
+am__remove_distdir = \
+  { test ! -d $(distdir) \
+    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr $(distdir); }; }
+
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+
+distdir: $(DISTFILES)
+       $(am__remove_distdir)
+       mkdir $(distdir)
+       $(mkinstalldirs) $(distdir)/. $(distdir)/debian $(distdir)/po
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkinstalldirs) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test -d $(distdir)/$$subdir \
+           || mkdir $(distdir)/$$subdir \
+           || exit 1; \
+           (cd $$subdir && \
+             $(MAKE) $(AM_MAKEFLAGS) \
+               top_distdir="$(top_distdir)" \
+               distdir=../$(distdir)/$$subdir \
+               distdir) \
+             || exit 1; \
+         fi; \
+       done
+       -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -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 $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+       || chmod -R a+r $(distdir)
+dist-gzip: distdir
+       $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+       $(am__remove_distdir)
+
+dist dist-all: distdir
+       $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+       $(am__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
+       $(am__remove_distdir)
+       GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
+       chmod -R a-w $(distdir); chmod a+w $(distdir)
+       mkdir $(distdir)/_build
+       mkdir $(distdir)/_inst
+       chmod a-w $(distdir)
+       dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+         && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+         && cd $(distdir)/_build \
+         && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+           $(DISTCHECK_CONFIGURE_FLAGS) \
+         && $(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 ../.. && $(mkinstalldirs) "$$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-gzip \
+         && rm -f $(distdir).tar.gz \
+         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+       $(am__remove_distdir)
+       @echo "$(distdir).tar.gz is ready for distribution" | \
+         sed 'h;s/./=/g;p;x;p;x'
+distuninstallcheck:
+       @cd $(distuninstallcheck_dir) \
+       && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+          || { 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
+check: check-recursive
+all-am: Makefile $(DATA) config.h
+installdirs: installdirs-recursive
+installdirs-am:
+       $(mkinstalldirs) $(DESTDIR)$(pkgconfigdir)
+
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr distclean-libtool \
+       distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-pkgconfigDATA
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+       -rm -rf $(top_srcdir)/autom4te.cache
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-pkgconfigDATA
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
+       clean-generic clean-libtool clean-recursive ctags \
+       ctags-recursive dist dist-all dist-gzip distcheck distclean \
+       distclean-generic distclean-hdr distclean-libtool \
+       distclean-recursive distclean-tags distcleancheck distdir \
+       distuninstallcheck dvi dvi-am dvi-recursive info info-am \
+       info-recursive install install-am install-data install-data-am \
+       install-data-recursive install-exec install-exec-am \
+       install-exec-recursive install-info install-info-am \
+       install-info-recursive install-man install-pkgconfigDATA \
+       install-recursive install-strip installcheck installcheck-am \
+       installdirs installdirs-am installdirs-recursive \
+       maintainer-clean maintainer-clean-generic \
+       maintainer-clean-recursive mostlyclean mostlyclean-generic \
+       mostlyclean-libtool mostlyclean-recursive pdf pdf-am \
+       pdf-recursive ps ps-am ps-recursive tags tags-recursive \
+       uninstall uninstall-am uninstall-info-am \
+       uninstall-info-recursive uninstall-pkgconfigDATA \
+       uninstall-recursive
+
+
+distclean-am: 
+       -rm -rf autom4te.cache 
+       -rm -f config.status config.cache config.log configure.lineno  
+#      -rm -f config.guess config.h.in config.sub configure depcomp
+#      -rm -f install-sh ltmain.sh missing mkinstalldirs Makefile.in aclocal.m4
+
+deb: dist
+       -mkdir debian-build
+       cd debian-build && \
+       tar zxvf ../$(PACKAGE)-$(VERSION).tar.gz && \
+       cd $(PACKAGE)-$(VERSION) && dpkg-buildpackage -rfakeroot
+# 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/aclocal.m4 b/aclocal.m4
new file mode 100644 (file)
index 0000000..0aebd17
--- /dev/null
@@ -0,0 +1,7226 @@
+# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# 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.
+
+# Do all the work for Automake.                            -*- Autoconf -*-
+
+# 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.
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 10
+
+AC_PREREQ([2.54])
+
+# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
+# the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+
+# 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_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
+  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+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],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])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)
+AM_MISSING_PROG(AMTAR, tar)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+# 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([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                  [_AM_DEPENDENCIES(CC)],
+                  [define([AC_PROG_CC],
+                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                  [_AM_DEPENDENCIES(CXX)],
+                  [define([AC_PROG_CXX],
+                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+
+# 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_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $1 | $1:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# Copyright 2002  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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+
+# 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.
+AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+        [AM_AUTOMAKE_VERSION([1.7.9])])
+
+# Helper functions for option handling.                    -*- Autoconf -*-
+
+# Copyright 2001, 2002  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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# _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],
+[AC_FOREACH([_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])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+# Copyright 1996, 1997, 2000, 2001 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# 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 (
+   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
+   rm -f conftest.file
+   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
+
+   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)])
+
+#  -*- Autoconf -*-
+
+
+# Copyright 1997, 1999, 2000, 2001 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# 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 supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# AM_AUX_DIR_EXPAND
+
+# Copyright 2001 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# 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.
+
+# Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])
+
+AC_DEFUN([AM_AUX_DIR_EXPAND], [
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+
+# Copyright 2001 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# AM_PROG_INSTALL_STRIP
+
+# Copyright 2001 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# 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="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+#                                                          -*- Autoconf -*-
+# Copyright (C) 2003  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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 1
+
+# 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])])
+
+# serial 5                                             -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003  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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+
+# 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", "GCJ", or "OBJC".
+# 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
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$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'.
+  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
+  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
+      : > sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    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
+      ;;
+    none) break ;;
+    esac
+    # 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.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} 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
+      # (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored.
+      if grep 'ignoring option' 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,
+[  --disable-dependency-tracking Speeds up one-time builds
+  --enable-dependency-tracking  Do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
+
+# Generate code to set up dependency tracking.   -*- Autoconf -*-
+
+# Copyright 1999, 2000, 2001, 2002 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+#serial 2
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; 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.
+  # So let's grep whole file.
+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+    dirpart=`AS_DIRNAME("$mf")`
+  else
+    continue
+  fi
+  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
+  # Extract the definition of DEP_FILES from the Makefile without
+  # running `make'.
+  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n -e '/^U = / s///p' < "$mf"`
+  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+  # 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 -e '
+    /^DEP_FILES = .*\\\\$/ {
+      s/^DEP_FILES = //
+      :loop
+       s/\\\\$//
+       p
+       n
+       /\\\\$/ b loop
+      p
+    }
+    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/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"])
+])
+
+# Check to see how 'make' treats includes.     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# 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 done
+.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
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# AM_CONDITIONAL                                              -*- Autoconf -*-
+
+# Copyright 1997, 2000, 2001 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 5
+
+AC_PREREQ(2.52)
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+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])])
+
+# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
+
+# Copyright 1996, 1997, 2000, 2001 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+AC_PREREQ([2.52])
+
+# serial 6
+
+# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+
+# serial 47 AC_PROG_LIBTOOL
+
+
+# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
+# -----------------------------------------------------------
+# If this macro is not defined by Autoconf, define it here.
+m4_ifdef([AC_PROVIDE_IFELSE],
+         [],
+         [m4_define([AC_PROVIDE_IFELSE],
+                [m4_ifdef([AC_PROVIDE_$1],
+                          [$2], [$3])])])
+
+
+# AC_PROG_LIBTOOL
+# ---------------
+AC_DEFUN([AC_PROG_LIBTOOL],
+[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
+dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
+dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
+  AC_PROVIDE_IFELSE([AC_PROG_CXX],
+    [AC_LIBTOOL_CXX],
+    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
+  ])])
+dnl And a similar setup for Fortran 77 support
+  AC_PROVIDE_IFELSE([AC_PROG_F77],
+    [AC_LIBTOOL_F77],
+    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
+])])
+
+dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
+dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
+dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
+  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+    [AC_LIBTOOL_GCJ],
+    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+      [AC_LIBTOOL_GCJ],
+      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
+       [AC_LIBTOOL_GCJ],
+      [ifdef([AC_PROG_GCJ],
+            [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+       ifdef([A][M_PROG_GCJ],
+            [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+       ifdef([LT_AC_PROG_GCJ],
+            [define([LT_AC_PROG_GCJ],
+               defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
+])])# AC_PROG_LIBTOOL
+
+
+# _AC_PROG_LIBTOOL
+# ----------------
+AC_DEFUN([_AC_PROG_LIBTOOL],
+[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+# Prevent multiple expansion
+define([AC_PROG_LIBTOOL], [])
+])# _AC_PROG_LIBTOOL
+
+
+# AC_LIBTOOL_SETUP
+# ----------------
+AC_DEFUN([AC_LIBTOOL_SETUP],
+[AC_PREREQ(2.50)dnl
+AC_REQUIRE([AC_ENABLE_SHARED])dnl
+AC_REQUIRE([AC_ENABLE_STATIC])dnl
+AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
+
+AC_REQUIRE([AC_PROG_LN_S])dnl
+AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+AC_REQUIRE([AC_OBJEXT])dnl
+AC_REQUIRE([AC_EXEEXT])dnl
+dnl
+
+AC_LIBTOOL_SYS_MAX_CMD_LEN
+AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+AC_LIBTOOL_OBJDIR
+
+AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+_LT_AC_PROG_ECHO_BACKSLASH
+
+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
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e s/^X//'
+[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 avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Constants:
+rm="rm -f"
+
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+libext=a
+ltmain="$ac_aux_dir/ltmain.sh"
+ofile="$default_ofile"
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+AC_CHECK_TOOL(AR, ar, false)
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_CHECK_TOOL(STRIP, strip, :)
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+test -z "$AS" && AS=as
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$LD" && LD=ld
+test -z "$LN_S" && LN_S="ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+test -z "$NM" && NM=nm
+test -z "$SED" && SED=sed
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$RANLIB" && RANLIB=:
+test -z "$STRIP" && STRIP=:
+test -z "$ac_objext" && ac_objext=o
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
+    ;;
+  *)
+    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    AC_PATH_MAGIC
+  fi
+  ;;
+esac
+
+AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+enable_win32_dll=yes, enable_win32_dll=no)
+
+AC_ARG_ENABLE([libtool-lock],
+    [AC_HELP_STRING([--disable-libtool-lock],
+       [avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+AC_ARG_WITH([pic],
+    [AC_HELP_STRING([--with-pic],
+       [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+    [pic_mode="$withval"],
+    [pic_mode=default])
+test -z "$pic_mode" && pic_mode=default
+
+# Use C for the default configuration in the libtool script
+tagname=
+AC_LIBTOOL_LANG_C_CONFIG
+_LT_AC_TAGCONFIG
+])# AC_LIBTOOL_SETUP
+
+
+# _LT_AC_SYS_COMPILER
+# -------------------
+AC_DEFUN([_LT_AC_SYS_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_AC_SYS_COMPILER
+
+
+# _LT_AC_SYS_LIBPATH_AIX
+# ----------------------
+# 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.
+AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
+[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_AC_SYS_LIBPATH_AIX
+
+
+# _LT_AC_SHELL_INIT(ARG)
+# ----------------------
+AC_DEFUN([_LT_AC_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+            [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+        [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_AC_SHELL_INIT
+
+
+# _LT_AC_PROG_ECHO_BACKSLASH
+# --------------------------
+# Add some code to the start of the generated configure script which
+# will find an echo command which doesn't interpret backslashes.
+AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
+[_LT_AC_SHELL_INIT([
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+  ;;
+esac
+
+echo=${ECHO-echo}
+if test "X[$]1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X[$]1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell.
+  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+fi
+
+if test "X[$]1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+[$]*
+EOF
+  exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+
+if test -z "$ECHO"; then
+if test "X${echo_test_string+set}" != Xset; then
+# find a string as large as possible, as long as the shell can cope with it
+  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
+       echo_test_string="`eval $cmd`" &&
+       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
+    then
+      break
+    fi
+  done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+   test "X$echo_testing_string" = "X$echo_test_string"; then
+  :
+else
+  # The Solaris, AIX, and Digital Unix default echo programs unquote
+  # backslashes.  This makes it impossible to quote backslashes using
+  #   echo "$something" | sed 's/\\/\\\\/g'
+  #
+  # So, first we look for a working echo in the user's PATH.
+
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for dir in $PATH /usr/ucb; do
+    IFS="$lt_save_ifs"
+    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      echo="$dir/echo"
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  if test "X$echo" = Xecho; then
+    # We didn't find a better echo, so look for alternatives.
+    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      # This shell has a builtin print -r that does the trick.
+      echo='print -r'
+    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+        test "X$CONFIG_SHELL" != X/bin/ksh; then
+      # If we have ksh, try running configure again with it.
+      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+      export ORIGINAL_CONFIG_SHELL
+      CONFIG_SHELL=/bin/ksh
+      export CONFIG_SHELL
+      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+    else
+      # Try using printf.
+      echo='printf %s\n'
+      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+        echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+        test "X$echo_testing_string" = "X$echo_test_string"; then
+       # Cool, printf works
+       :
+      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+          test "X$echo_testing_string" = 'X\t' &&
+          echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+          test "X$echo_testing_string" = "X$echo_test_string"; then
+       CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+       export CONFIG_SHELL
+       SHELL="$CONFIG_SHELL"
+       export SHELL
+       echo="$CONFIG_SHELL [$]0 --fallback-echo"
+      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+          test "X$echo_testing_string" = 'X\t' &&
+          echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+          test "X$echo_testing_string" = "X$echo_test_string"; then
+       echo="$CONFIG_SHELL [$]0 --fallback-echo"
+      else
+       # maybe with a smaller string...
+       prev=:
+
+       for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+         if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
+         then
+           break
+         fi
+         prev="$cmd"
+       done
+
+       if test "$prev" != 'sed 50q "[$]0"'; then
+         echo_test_string=`eval $prev`
+         export echo_test_string
+         exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+       else
+         # Oops.  We lost completely, so just stick with echo.
+         echo=echo
+       fi
+      fi
+    fi
+  fi
+fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+ECHO=$echo
+if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
+
+AC_SUBST(ECHO)
+])])# _LT_AC_PROG_ECHO_BACKSLASH
+
+
+# _LT_AC_LOCK
+# -----------
+AC_DEFUN([_LT_AC_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+    [AC_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 __oline__ "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-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|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-*linux*)
+          LD="${LD-ld} -m elf_i386"
+          ;;
+        ppc64-*linux*|powerpc64-*linux*)
+          LD="${LD-ld} -m elf32ppclinux"
+          ;;
+        s390x-*linux*)
+          LD="${LD-ld} -m elf_s390"
+          ;;
+        sparc64-*linux*)
+          LD="${LD-ld} -m elf32_sparc"
+          ;;
+      esac
+      ;;
+    *64-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        ppc*-*linux*|powerpc*-*linux*)
+          LD="${LD-ld} -m elf64ppc"
+          ;;
+        s390*-*linux*)
+          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_TRY_LINK([],[],[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
+  ;;
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+  AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+  ;;
+  ])
+esac
+
+need_locks="$enable_libtool_lock"
+
+])# _LT_AC_LOCK
+
+
+# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#              [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
+[AC_REQUIRE([LT_AC_PROG_SED])
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+   printf "$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}? :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $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
+     if test ! -s conftest.err; then
+       $2=yes
+     fi
+   fi
+   $rm conftest*
+])
+
+if test x"[$]$2" = xyes; then
+    ifelse([$5], , :, [$5])
+else
+    ifelse([$6], , :, [$6])
+fi
+])# AC_LIBTOOL_COMPILER_OPTION
+
+
+# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#                          [ACTION-SUCCESS], [ACTION-FAILURE])
+# ------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
+[AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $3"
+   printf "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The compiler 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
+     else
+       $2=yes
+     fi
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+    ifelse([$4], , :, [$4])
+else
+    ifelse([$5], , :, [$5])
+fi
+])# AC_LIBTOOL_LINKER_OPTION
+
+
+# AC_LIBTOOL_SYS_MAX_CMD_LEN
+# --------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
+[# 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*)
+    # 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;
+    ;;
+
+  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;
+    ;;
+
+ *)
+    # 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"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
+              = "XX$teststring") >/dev/null 2>&1 &&
+           new_result=`expr "X$teststring" : ".*" 2>&1` &&
+           lt_cv_sys_max_cmd_len=$new_result &&
+           test $i != 17 # 1/2 MB should be enough
+    do
+      i=`expr $i + 1`
+      teststring=$teststring$teststring
+    done
+    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`
+    ;;
+  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
+])# AC_LIBTOOL_SYS_MAX_CMD_LEN
+
+
+# _LT_AC_CHECK_DLFCN
+# --------------------
+AC_DEFUN([_LT_AC_CHECK_DLFCN],
+[AC_CHECK_HEADERS(dlfcn.h)dnl
+])# _LT_AC_CHECK_DLFCN
+
+
+# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ------------------------------------------------------------------
+AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
+[AC_REQUIRE([_LT_AC_CHECK_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 <<EOF
+[#line __oline__ "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
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=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;
+      /* dlclose (self); */
+    }
+
+    exit (status);
+}]
+EOF
+  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) $1 ;;
+      x$lt_dlneed_uscore) $2 ;;
+      x$lt_unknown|x*) $3 ;;
+    esac
+  else :
+    # compilation failed
+    $3
+  fi
+fi
+rm -fr conftest*
+])# _LT_AC_TRY_DLOPEN_SELF
+
+
+# AC_LIBTOOL_DLOPEN_SELF
+# -------------------
+AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
+[AC_REQUIRE([_LT_AC_CHECK_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*)
+    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="-dld"],
+       [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="-dld"])
+             ])
+           ])
+         ])
+       ])
+      ])
+    ;;
+  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"
+    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_AC_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
+      LDFLAGS="$LDFLAGS $link_static_flag"
+      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+         lt_cv_dlopen_self_static, [dnl
+         _LT_AC_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
+])# AC_LIBTOOL_DLOPEN_SELF
+
+
+# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
+# ---------------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler
+AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
+[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$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}? :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $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:__oline__: \$? = $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
+     if test ! -s out/conftest.err; then
+       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+     fi
+   fi
+   chmod u+w .
+   $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 ..
+   rmdir conftest
+   $rm conftest*
+])
+])# AC_LIBTOOL_PROG_CC_C_O
+
+
+# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
+# -----------------------------------------
+# Check to see if we can do hard links to lock some files if needed
+AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
+[AC_REQUIRE([_LT_AC_LOCK])dnl
+
+hard_links="nottested"
+if test "$_LT_AC_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
+])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
+
+
+# AC_LIBTOOL_OBJDIR
+# -----------------
+AC_DEFUN([AC_LIBTOOL_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
+])# AC_LIBTOOL_OBJDIR
+
+
+# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
+# ----------------------------------------------
+# Check hardcoding attributes.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_AC_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
+   test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
+   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$_LT_AC_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_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
+    # Linking always hardcodes the temporary library directory.
+    _LT_AC_TAGVAR(hardcode_action, $1)=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; 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
+])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
+
+
+# AC_LIBTOOL_SYS_LIB_STRIP
+# ------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
+[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"
+         AC_MSG_RESULT([yes])
+       else
+  AC_MSG_RESULT([no])
+fi
+       ;;
+   *)
+  AC_MSG_RESULT([no])
+    ;;
+  esac
+fi
+])# AC_LIBTOOL_SYS_LIB_STRIP
+
+
+# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
+[AC_MSG_CHECKING([dynamic linker characteristics])
+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"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # 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.
+    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
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+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
+  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'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  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*)
+  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=`$echo "X$lib" | $Xsed -e '\''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'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi4*)
+  version_type=linux
+  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*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    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'
+    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="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        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
+      ;;
+    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
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # 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}${versuffix}$shared_ext ${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)'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  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
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+kfreebsd*-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='GNU ld.so'
+  ;;
+
+freebsd*)
+  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+  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
+    ;;
+  *) # from 3.2 on
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+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
+  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'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+       if test "$lt_cv_prog_gnu_ld" = yes; then
+               version_type=linux
+       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 Linux ELF.
+linux*)
+  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'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # 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=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | 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'
+  ;;
+
+knetbsd*-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='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  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=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=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=yes
+  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"
+  ;;
+
+sco3.2v5*)
+  version_type=osf
+  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
+  ;;
+
+solaris*)
+  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=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.2uw2* | sysv4.3* | sysv5*)
+  version_type=linux
+  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
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      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
+    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
+  ;;
+
+uts4*)
+  version_type=linux
+  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
+])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+
+
+# _LT_AC_TAGCONFIG
+# ----------------
+AC_DEFUN([_LT_AC_TAGCONFIG],
+[AC_ARG_WITH([tags],
+    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
+        [include additional configurations @<:@automatic@:>@])],
+    [tagnames="$withval"])
+
+if test -f "$ltmain" && test -n "$tagnames"; then
+  if test ! -f "${ofile}"; then
+    AC_MSG_WARN([output file `$ofile' does not exist])
+  fi
+
+  if test -z "$LTCC"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+    if test -z "$LTCC"; then
+      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
+    else
+      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
+    fi
+  fi
+
+  # Extract list of available tagged configurations in $ofile.
+  # Note that this assumes the entire list is on one line.
+  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+
+  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+  for tagname in $tagnames; do
+    IFS="$lt_save_ifs"
+    # Check whether tagname contains only valid characters
+    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
+    "") ;;
+    *)  AC_MSG_ERROR([invalid tag name: $tagname])
+       ;;
+    esac
+
+    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+    then
+      AC_MSG_ERROR([tag name \"$tagname\" already exists])
+    fi
+
+    # Update the list of available tags.
+    if test -n "$tagname"; then
+      echo appending configuration tag \"$tagname\" to $ofile
+
+      case $tagname in
+      CXX)
+       if test -n "$CXX" && test "X$CXX" != "Xno"; then
+         AC_LIBTOOL_LANG_CXX_CONFIG
+       else
+         tagname=""
+       fi
+       ;;
+
+      F77)
+       if test -n "$F77" && test "X$F77" != "Xno"; then
+         AC_LIBTOOL_LANG_F77_CONFIG
+       else
+         tagname=""
+       fi
+       ;;
+
+      GCJ)
+       if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+         AC_LIBTOOL_LANG_GCJ_CONFIG
+       else
+         tagname=""
+       fi
+       ;;
+
+      RC)
+       AC_LIBTOOL_LANG_RC_CONFIG
+       ;;
+
+      *)
+       AC_MSG_ERROR([Unsupported tag name: $tagname])
+       ;;
+      esac
+
+      # Append the new tag name to the list of available tags.
+      if test -n "$tagname" ; then
+      available_tags="$available_tags $tagname"
+    fi
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  # Now substitute the updated list of available tags.
+  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
+    mv "${ofile}T" "$ofile"
+    chmod +x "$ofile"
+  else
+    rm -f "${ofile}T"
+    AC_MSG_ERROR([unable to update list of available tagged configurations.])
+  fi
+fi
+])# _LT_AC_TAGCONFIG
+
+
+# AC_LIBTOOL_DLOPEN
+# -----------------
+# enable checks for dlopen support
+AC_DEFUN([AC_LIBTOOL_DLOPEN],
+ [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_DLOPEN
+
+
+# AC_LIBTOOL_WIN32_DLL
+# --------------------
+# declare package support for building win32 dll's
+AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_WIN32_DLL
+
+
+# AC_ENABLE_SHARED([DEFAULT])
+# ---------------------------
+# implement the --enable-shared flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_SHARED],
+[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([shared],
+    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+       [build shared libraries @<:@default=]AC_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=]AC_ENABLE_SHARED_DEFAULT)
+])# AC_ENABLE_SHARED
+
+
+# AC_DISABLE_SHARED
+# -----------------
+#- set the default shared flag to --disable-shared
+AC_DEFUN([AC_DISABLE_SHARED],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_SHARED(no)
+])# AC_DISABLE_SHARED
+
+
+# AC_ENABLE_STATIC([DEFAULT])
+# ---------------------------
+# implement the --enable-static flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_STATIC],
+[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([static],
+    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+       [build static libraries @<:@default=]AC_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=]AC_ENABLE_STATIC_DEFAULT)
+])# AC_ENABLE_STATIC
+
+
+# AC_DISABLE_STATIC
+# -----------------
+# set the default static flag to --disable-static
+AC_DEFUN([AC_DISABLE_STATIC],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_STATIC(no)
+])# AC_DISABLE_STATIC
+
+
+# AC_ENABLE_FAST_INSTALL([DEFAULT])
+# ---------------------------------
+# implement the --enable-fast-install flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_FAST_INSTALL],
+[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([fast-install],
+    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+    [optimize for fast installation @<:@default=]AC_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=]AC_ENABLE_FAST_INSTALL_DEFAULT)
+])# AC_ENABLE_FAST_INSTALL
+
+
+# AC_DISABLE_FAST_INSTALL
+# -----------------------
+# set the default to --disable-fast-install
+AC_DEFUN([AC_DISABLE_FAST_INSTALL],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_FAST_INSTALL(no)
+])# AC_DISABLE_FAST_INSTALL
+
+
+# AC_LIBTOOL_PICMODE([MODE])
+# --------------------------
+# implement the --with-pic flag
+# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
+AC_DEFUN([AC_LIBTOOL_PICMODE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+pic_mode=ifelse($#,1,$1,default)
+])# AC_LIBTOOL_PICMODE
+
+
+# AC_PROG_EGREP
+# -------------
+# This is predefined starting with Autoconf 2.54, so this conditional
+# definition can be removed once we require Autoconf 2.54 or later.
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
+[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
+   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi])
+ EGREP=$ac_cv_prog_egrep
+ AC_SUBST([EGREP])
+])])
+
+
+# AC_PATH_TOOL_PREFIX
+# -------------------
+# find a file program which can recognise shared library
+AC_DEFUN([AC_PATH_TOOL_PREFIX],
+[AC_REQUIRE([AC_PROG_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="ifelse([$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 <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+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
+])# AC_PATH_TOOL_PREFIX
+
+
+# AC_PATH_MAGIC
+# -------------
+# find a file program which can recognise a shared library
+AC_DEFUN([AC_PATH_MAGIC],
+[AC_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
+    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+  else
+    MAGIC_CMD=:
+  fi
+fi
+])# AC_PATH_MAGIC
+
+
+# AC_PROG_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([AC_PROG_LD],
+[AC_ARG_WITH([gnu-ld],
+    [AC_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])
+AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])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 GNU ld's 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])
+AC_PROG_LD_GNU
+])# AC_PROG_LD
+
+
+# AC_PROG_LD_GNU
+# --------------
+AC_DEFUN([AC_PROG_LD_GNU],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+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 ld's 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
+])# AC_PROG_LD_GNU
+
+
+# AC_PROG_LD_RELOAD_FLAG
+# ----------------------
+# find reload flag for linker
+#   -- PORTME Some linkers may need a different reload flag.
+AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
+[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'
+])# AC_PROG_LD_RELOAD_FLAG
+
+
+# AC_DEPLIBS_CHECK_METHOD
+# -----------------------
+# how to check for library dependencies
+#  -- PORTME fill in with the dynamic library characteristics
+AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
+[AC_CACHE_CHECK([how to recognise 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
+aix4* | aix5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi4*)
+  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'.
+  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | kfreebsd*-gnu)
+  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)/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
+  ;;
+
+gnu*)
+  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]) 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
+  ;;
+
+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 Linux ELF.
+linux*)
+  case $host_cpu in
+  alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*)
+    lt_cv_deplibs_check_method=pass_all ;;
+  *)
+    # glibc up to 2.1.1 does not perform some relocations on ARM
+    # this will be overridden with pass_all, but let us keep it just in case
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
+  esac
+  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+nto-qnx*)
+  lt_cv_deplibs_check_method=unknown
+  ;;
+
+openbsd*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
+  else
+    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sco3.2v5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  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
+    ;;
+  esac
+  ;;
+
+sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+])
+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
+])# AC_DEPLIBS_CHECK_METHOD
+
+
+# AC_PROG_NM
+# ----------
+# find the pathname to a BSD-compatible name lister
+AC_DEFUN([AC_PROG_NM],
+[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
+[if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    tmp_nm="$ac_dir/${ac_tool_prefix}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"
+  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi])
+NM="$lt_cv_path_NM"
+])# AC_PROG_NM
+
+
+# AC_CHECK_LIBM
+# -------------
+# check for math library
+AC_DEFUN([AC_CHECK_LIBM],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-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_CHECK_LIBM
+
+
+# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl convenience library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
+# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
+# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
+# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
+# '${top_srcdir}/' (note the single quotes!).  If your package is not
+# flat and you're not using automake, define top_builddir and
+# top_srcdir appropriately in the Makefiles.
+AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+  case $enable_ltdl_convenience in
+  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+  "") enable_ltdl_convenience=yes
+      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+  esac
+  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
+  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+  # For backwards non-gettext consistent compatibility...
+  INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_CONVENIENCE
+
+
+# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl installable library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
+# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
+# DIRECTORY is not provided and an installed libltdl is not found, it is
+# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
+# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
+# quotes!).  If your package is not flat and you're not using automake,
+# define top_builddir and top_srcdir appropriately in the Makefiles.
+# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
+AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+  AC_CHECK_LIB(ltdl, lt_dlinit,
+  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
+  [if test x"$enable_ltdl_install" = xno; then
+     AC_MSG_WARN([libltdl not installed, but installation disabled])
+   else
+     enable_ltdl_install=yes
+   fi
+  ])
+  if test x"$enable_ltdl_install" = x"yes"; then
+    ac_configure_args="$ac_configure_args --enable-ltdl-install"
+    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
+    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+  else
+    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
+    LIBLTDL="-lltdl"
+    LTDLINCL=
+  fi
+  # For backwards non-gettext consistent compatibility...
+  INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_INSTALLABLE
+
+
+# AC_LIBTOOL_CXX
+# --------------
+# enable support for C++ libraries
+AC_DEFUN([AC_LIBTOOL_CXX],
+[AC_REQUIRE([_LT_AC_LANG_CXX])
+])# AC_LIBTOOL_CXX
+
+
+# _LT_AC_LANG_CXX
+# ---------------
+AC_DEFUN([_LT_AC_LANG_CXX],
+[AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([AC_PROG_CXXCPP])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
+])# _LT_AC_LANG_CXX
+
+
+# AC_LIBTOOL_F77
+# --------------
+# enable support for Fortran 77 libraries
+AC_DEFUN([AC_LIBTOOL_F77],
+[AC_REQUIRE([_LT_AC_LANG_F77])
+])# AC_LIBTOOL_F77
+
+
+# _LT_AC_LANG_F77
+# ---------------
+AC_DEFUN([_LT_AC_LANG_F77],
+[AC_REQUIRE([AC_PROG_F77])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
+])# _LT_AC_LANG_F77
+
+
+# AC_LIBTOOL_GCJ
+# --------------
+# enable support for GCJ libraries
+AC_DEFUN([AC_LIBTOOL_GCJ],
+[AC_REQUIRE([_LT_AC_LANG_GCJ])
+])# AC_LIBTOOL_GCJ
+
+
+# _LT_AC_LANG_GCJ
+# ---------------
+AC_DEFUN([_LT_AC_LANG_GCJ],
+[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
+  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
+    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
+      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
+        [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
+          [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
+])# _LT_AC_LANG_GCJ
+
+
+# AC_LIBTOOL_RC
+# --------------
+# enable support for Windows resource files
+AC_DEFUN([AC_LIBTOOL_RC],
+[AC_REQUIRE([LT_AC_PROG_RC])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
+])# AC_LIBTOOL_RC
+
+
+# AC_LIBTOOL_LANG_C_CONFIG
+# ------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
+AC_DEFUN([_LT_AC_LANG_C_CONFIG],
+[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_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}\n'
+
+_LT_AC_SYS_COMPILER
+
+#
+# Check for any special shared library compilation flags.
+#
+_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
+if test "$GCC" = no; then
+  case $host_os in
+  sco3.2v5*)
+    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
+    ;;
+  esac
+fi
+if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
+  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
+  if echo "$old_CC $old_CFLAGS " | grep "[[    ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[        ]]" >/dev/null; then :
+  else
+    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
+    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
+  fi
+fi
+
+
+#
+# Check to make sure the static flag actually works.
+#
+AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
+  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
+  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
+  [],
+  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
+
+
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF($1)
+
+# Report which librarie types wil 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
+  ;;
+
+aix4* | aix5*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
+  ;;
+  darwin* | rhapsody*)
+  if test "$GCC" = yes; then
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    case "$host_os" in
+    rhapsody* | darwin1.[[012]])
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
+      ;;
+    *) # Darwin 1.3 on
+      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+      else
+        case ${MACOSX_DEPLOYMENT_TARGET} in
+          10.[[012]])
+            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+            ;;
+          10.*)
+            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
+            ;;
+        esac
+      fi
+      ;;
+    esac
+    output_verbose_link_cmd='echo'
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
+    _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    _LT_AC_TAGVAR(hardcode_direct, $1)=no
+    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
+    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+  else
+    _LT_AC_TAGVAR(ld_shlibs, $1)=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])
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_C_CONFIG
+
+
+# AC_LIBTOOL_LANG_CXX_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
+AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
+[AC_LANG_PUSH(C++)
+AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([AC_PROG_CXXCPP])
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Dependencies to place before and after the object being linked:
+_LT_AC_TAGVAR(predep_objects, $1)=
+_LT_AC_TAGVAR(postdep_objects, $1)=
+_LT_AC_TAGVAR(predeps, $1)=
+_LT_AC_TAGVAR(postdeps, $1)=
+_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
+
+# Source file extension for C++ test sources.
+ac_ext=cc
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+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
+  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
+  unset lt_cv_path_LD
+fi
+test -z "${LDCXX+set}" || LD=$LDCXX
+CC=${CXX-"c++"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+
+# We don't want -fno-exception wen compiling C++ code, so set the
+# no_builtin_flag separately
+if test "$GXX" = yes; then
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+else
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+fi
+
+if test "$GXX" = yes; then
+  # Set up default GNU C++ configuration
+
+  AC_PROG_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+    _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      _LT_AC_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_AC_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 "\-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_AC_TAGVAR(ld_shlibs, $1)=yes
+case $host_os in
+  aix3*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  aix4* | aix5*)
+    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]].*|aix5*)
+       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_AC_TAGVAR(archive_cmds, $1)=''
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+    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
+         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+       else
+         # We have old collect2
+         _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes
+         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+       fi
+      esac
+      shared_flag='-shared'
+    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
+
+    # It seems that -bexpall does not export symbols beginning with
+    # underscore (_), so it is better to generate a list of symbols to export.
+    _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+      # Determine the default libpath from the value encoded in an empty executable.
+      _LT_AC_SYS_LIBPATH_AIX
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+     else
+      if test "$host_cpu" = ia64; then
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+       _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+      else
+       # Determine the default libpath from the value encoded in an empty executable.
+       _LT_AC_SYS_LIBPATH_AIX
+       _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+       # -bexpall does not export symbols beginning with underscore (_)
+       _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+       # Exported symbols can be pulled into shared objects from archives
+       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
+       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+       # This is similar to how AIX traditionally builds it's shared libraries.
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+      fi
+    fi
+    ;;
+  chorus*)
+    case $cc_basename in
+      *)
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+    esac
+    ;;
+
+  cygwin* | mingw* | pw32*)
+    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+    # as there is no search path for DLLs.
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+    _LT_AC_TAGVAR(always_export_symbols, $1)=no
+    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+      # If the export-symbols file already is a .def file (1st line
+      # is EXPORTS), use it as is; otherwise, prepend...
+      _LT_AC_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}--image-base=0x10000000 ${wl}--out-implib,$lib'
+    else
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    fi
+  ;;
+
+  darwin* | rhapsody*)
+  if test "$GXX" = yes; then
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    case "$host_os" in
+    rhapsody* | darwin1.[[012]])
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
+      ;;
+    *) # Darwin 1.3 on
+      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+      else
+        case ${MACOSX_DEPLOYMENT_TARGET} in
+          10.[[012]])
+            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+            ;;
+          10.*)
+            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
+            ;;
+        esac
+      fi
+      ;;
+    esac
+    lt_int_apple_cc_single_mod=no
+    output_verbose_link_cmd='echo'
+    if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
+      lt_int_apple_cc_single_mod=yes
+    fi
+    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+    else
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -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'
+    fi
+    _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+
+    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    else
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    fi
+    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    _LT_AC_TAGVAR(hardcode_direct, $1)=no
+    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
+    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+  else
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+  fi
+    ;;
+
+  dgux*)
+    case $cc_basename in
+      ec++)
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+      ghcx)
+       # Green Hills C++ Compiler
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+      *)
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+    esac
+    ;;
+  freebsd[12]*)
+    # C++ shared libraries reported to be fairly broken before switch to ELF
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  freebsd-elf*)
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    ;;
+  freebsd* | kfreebsd*-gnu)
+    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+    # conventions
+    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+    ;;
+  gnu*)
+    ;;
+  hpux9*)
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    aCC)
+      _LT_AC_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) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+      ;;
+    *)
+      if test "$GXX" = yes; then
+        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
+    ;;
+  hpux10*|hpux11*)
+    if test $with_gnu_ld = no; then
+      case "$host_cpu" in
+      hppa*64*)
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+        ;;
+      ia64*)
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+        ;;
+      *)
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+        ;;
+      esac
+    fi
+    case "$host_cpu" in
+    hppa*64*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+    ia64*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+                                             # but as the default
+                                             # location of the library.
+      ;;
+    *)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+      aCC)
+       case "$host_cpu" in
+       hppa*64*|ia64*)
+         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+         ;;
+       *)
+         _LT_AC_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; echo $list'
+       ;;
+      *)
+       if test "$GXX" = yes; then
+         if test $with_gnu_ld = no; then
+           case "$host_cpu" in
+           ia64*|hppa*64*)
+             _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+             ;;
+           *)
+             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${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_AC_TAGVAR(ld_shlibs, $1)=no
+       fi
+       ;;
+    esac
+    ;;
+  irix5* | irix6*)
+    case $cc_basename in
+      CC)
+       # SGI C++
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+         else
+           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
+         fi
+       fi
+       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+       ;;
+    esac
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+    ;;
+  linux*)
+    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_AC_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_AC_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; echo $list'
+
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
+       _LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+       ;;
+      icpc)
+       # Intel C++
+       with_gnu_ld=yes
+       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       _LT_AC_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'
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+       ;;
+      cxx)
+       # Compaq C++
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+       _LT_AC_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=`echo $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; echo $list'
+       ;;
+    esac
+    ;;
+  lynxos*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  m88k*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  mvs*)
+    case $cc_basename in
+      cxx)
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+      *)
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+    esac
+    ;;
+  netbsd*)
+    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+      wlarc=
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_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::"'
+    ;;
+  osf3*)
+    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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+       # Archives containing C++ object files must be created using
+       # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+
+       ;;
+      RCC)
+       # Rational C++ 2.4.1
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+      cxx)
+       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+       _LT_AC_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=`echo $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; echo $list'
+       ;;
+      *)
+       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+         _LT_AC_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" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+         _LT_AC_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 "\-L"'
+
+       else
+         # FIXME: insert proper C++ library support
+         _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       fi
+       ;;
+    esac
+    ;;
+  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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+       # Archives containing C++ object files must be created using
+       # the KAI C++ compiler.
+       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
+       ;;
+      RCC)
+       # Rational C++ 2.4.1
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+      cxx)
+       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+       _LT_AC_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 $objdir/so_locations -o $lib~
+         $rm $lib.exp'
+
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+       _LT_AC_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=`echo $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; echo $list'
+       ;;
+      *)
+       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+         _LT_AC_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 "\-L"'
+
+       else
+         # FIXME: insert proper C++ library support
+         _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       fi
+       ;;
+    esac
+    ;;
+  psos*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  sco*)
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    case $cc_basename in
+      CC)
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+      *)
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+    esac
+    ;;
+  sunos4*)
+    case $cc_basename in
+      CC)
+       # Sun C++ 4.x
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+      lcc)
+       # Lucid
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+      *)
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+    esac
+    ;;
+  solaris*)
+    case $cc_basename in
+      CC)
+       # Sun C++ 4.2, 5.x and Centerline C++
+       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+       _LT_AC_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} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+       case $host_os in
+         solaris2.[0-5] | solaris2.[0-5].*) ;;
+         *)
+           # The C++ compiler is used as linker so we must use $wl
+           # flag to pass the commands to the underlying system
+           # linker.
+           # Supported since Solaris 2.6 (maybe 2.5.1?)
+           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+           ;;
+       esac
+       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+       # 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 -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+       # 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_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+       ;;
+      gcx)
+       # Green Hills C++ Compiler
+       _LT_AC_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_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+         if $CC --version | grep -v '^2\.7' > /dev/null; then
+           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+               $CC -shared -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 \"\-L\""
+         else
+           # g++ 2.7 appears to require `-G' NOT `-shared' on this
+           # platform.
+           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+           _LT_AC_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 \"\-L\""
+         fi
+
+         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+       fi
+       ;;
+    esac
+    ;;
+  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    ;;
+  tandem*)
+    case $cc_basename in
+      NCC)
+       # NonStop-UX NCC 3.20
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+      *)
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+    esac
+    ;;
+  vxworks*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  *)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+esac
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_AC_TAGVAR(GCC, $1)="$GXX"
+_LT_AC_TAGVAR(LD, $1)="$LD"
+
+AC_LIBTOOL_POSTDEP_PREDEP($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC=$lt_save_CC
+LDCXX=$LD
+LD=$lt_save_LD
+GCC=$lt_save_GCC
+with_gnu_ldcxx=$with_gnu_ld
+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
+])# AC_LIBTOOL_LANG_CXX_CONFIG
+
+# AC_LIBTOOL_POSTDEP_PREDEP([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.
+AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
+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...
+ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
+int a;
+void foo (void) { a = 0; }
+EOF
+],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+EOF
+],[$1],[F77],[cat > conftest.$ac_ext <<EOF
+      subroutine foo
+      implicit none
+      integer*4 a
+      a=0
+      return
+      end
+EOF
+],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
+public class foo {
+  private int a;
+  public void bar (void) {
+    a = 0;
+  }
+};
+EOF
+])
+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
+
+  # The `*' in the case matches for architectures that use `case' in
+  # $output_verbose_cmd can trigger glob expansion during the loop
+  # eval without this substitution.
+  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
+
+  for p in `eval $output_verbose_link_cmd`; do
+    case $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
+       else
+        prev=
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+        case $p 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_AC_TAGVAR(compiler_lib_search_path, $1)"; then
+            _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+          else
+            _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_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_AC_TAGVAR(postdeps, $1)"; then
+          _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
+        else
+          _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
+        fi
+       fi
+       ;;
+
+    *.$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_AC_TAGVAR(predep_objects, $1)"; then
+          _LT_AC_TAGVAR(predep_objects, $1)="$p"
+        else
+          _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
+        fi
+       else
+        if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
+          _LT_AC_TAGVAR(postdep_objects, $1)="$p"
+        else
+          _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_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
+
+case " $_LT_AC_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+])# AC_LIBTOOL_POSTDEP_PREDEP
+
+# AC_LIBTOOL_LANG_F77_CONFIG
+# ------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
+AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
+[AC_REQUIRE([AC_PROG_F77])
+AC_LANG_PUSH(Fortran 77)
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_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_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="      program t\n      end\n"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${F77-"f77"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+
+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
+  ;;
+aix4* | aix5*)
+  test "$enable_shared" = yes && enable_static=no
+  ;;
+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])
+
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_AC_TAGVAR(GCC, $1)="$G77"
+_LT_AC_TAGVAR(LD, $1)="$LD"
+
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_F77_CONFIG
+
+
+# AC_LIBTOOL_LANG_GCJ_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
+AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
+[AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_GCJ_CONFIG
+
+
+# AC_LIBTOOL_LANG_RC_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the Windows resource compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
+AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
+[AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+
+# 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_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${RC-"windres"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_RC_CONFIG
+
+
+# AC_LIBTOOL_CONFIG([TAGNAME])
+# ----------------------------
+# If TAGNAME is not passed, then 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
+# TAGNAME from the matching tagged config vars.
+AC_DEFUN([AC_LIBTOOL_CONFIG],
+[# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # 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
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    _LT_AC_TAGVAR(compiler, $1) \
+    _LT_AC_TAGVAR(CC, $1) \
+    _LT_AC_TAGVAR(LD, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
+    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
+    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
+    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
+    _LT_AC_TAGVAR(old_archive_cmds, $1) \
+    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
+    _LT_AC_TAGVAR(predep_objects, $1) \
+    _LT_AC_TAGVAR(postdep_objects, $1) \
+    _LT_AC_TAGVAR(predeps, $1) \
+    _LT_AC_TAGVAR(postdeps, $1) \
+    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
+    _LT_AC_TAGVAR(archive_cmds, $1) \
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
+    _LT_AC_TAGVAR(postinstall_cmds, $1) \
+    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
+    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
+    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
+    _LT_AC_TAGVAR(no_undefined_flag, $1) \
+    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
+    _LT_AC_TAGVAR(hardcode_automatic, $1) \
+    _LT_AC_TAGVAR(module_cmds, $1) \
+    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
+    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
+    _LT_AC_TAGVAR(exclude_expsyms, $1) \
+    _LT_AC_TAGVAR(include_expsyms, $1); do
+
+    case $var in
+    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
+    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
+    _LT_AC_TAGVAR(archive_cmds, $1) | \
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
+    _LT_AC_TAGVAR(module_cmds, $1) | \
+    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
+    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
+    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\[$]0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
+    ;;
+  esac
+
+ifelse([$1], [],
+  [cfgfile="${ofile}T"
+  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+  $rm -f "$cfgfile"
+  AC_MSG_NOTICE([creating $ofile])],
+  [cfgfile="$ofile"])
+
+  cat <<__EOF__ >> "$cfgfile"
+ifelse([$1], [],
+[#! $SHELL
+
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 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 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.
+
+# 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 s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+
+# The names of the tagged configurations supported by this script.
+available_tags=
+
+# ### BEGIN LIBTOOL CONFIG],
+[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
+
+# Is the compiler the GNU C compiler?
+with_gcc=$_LT_AC_TAGVAR(GCC, $1)
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
+
+# Must we lock files when doing compilation ?
+need_locks=$lt_need_locks
+
+# 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
+
+# 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
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
+
+# Library versioning type.
+version_type=$version_type
+
+# 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
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
+archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
+module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
+
+# 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
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# 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
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
+
+# 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=$_LT_AC_TAGVAR(hardcode_automatic, $1)
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
+
+# 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
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
+
+# Symbols that must always be exported.
+include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
+
+ifelse([$1],[],
+[# ### END LIBTOOL CONFIG],
+[# ### END LIBTOOL TAG CONFIG: $tagname])
+
+__EOF__
+
+ifelse([$1],[], [
+  case $host_os in
+  aix3*)
+    cat <<\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
+EOF
+    ;;
+  esac
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" || \
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+])
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+])# AC_LIBTOOL_CONFIG
+
+
+# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
+[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+
+_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+    lt_cv_prog_compiler_rtti_exceptions,
+    [-fno-rtti -fno-exceptions], [],
+    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
+
+
+# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+# ---------------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
+[AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_NM])
+AC_REQUIRE([AC_OBJEXT])
+# 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]]*\)'
+
+# Transform the above into a raw symbol and a C symbol.
+symxfrm='\1 \2\3 \3'
+
+# Transform an extracted symbol line into a proper C declaration
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[[BCDT]]'
+  ;;
+cygwin* | mingw* | pw32*)
+  symcode='[[ABCDGISTW]]'
+  ;;
+hpux*) # Its linker distinguishes data from code symbols
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDEGRST]]'
+  fi
+  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  ;;
+irix* | nonstopux*)
+  symcode='[[BCDEGRST]]'
+  ;;
+osf*)
+  symcode='[[BCDEGQRST]]'
+  ;;
+solaris* | sysv5*)
+  symcode='[[BDRT]]'
+  ;;
+sysv4)
+  symcode='[[DFNSTU]]'
+  ;;
+esac
+
+# 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
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Write the raw and C identifiers.
+  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+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 <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+         # Now generate the symbol file.
+         eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+
+         cat <<EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+  const char *name;
+  lt_ptr_t address;
+}
+lt_preloaded_symbols[[]] =
+{
+EOF
+         $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
+         cat <<\EOF >> conftest.$ac_ext
+  {0, (lt_ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+         # Now try linking the two files.
+         mv conftest.$ac_objext conftstm.$ac_objext
+         lt_save_LIBS="$LIBS"
+         lt_save_CFLAGS="$CFLAGS"
+         LIBS="conftstm.$ac_objext"
+         CFLAGS="$CFLAGS$_LT_AC_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_save_LIBS"
+         CFLAGS="$lt_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 -f 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
+]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+
+
+# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
+# ---------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
+[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
+
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+ ifelse([$1],[CXX],[
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+    amigaos*)
+      # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+      ;;
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | os2* | pw32*)
+      # 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_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # 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*)
+       ;;
+      *)
+       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+       ;;
+      esac
+      ;;
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix4* | aix5*)
+       # All AIX code is PIC.
+       if test "$host_cpu" = ia64; then
+         # AIX 5 now supports IA64 processor
+         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+       else
+         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+       fi
+       ;;
+      chorus*)
+       case $cc_basename in
+       cxch68)
+         # Green Hills C++ Compiler
+         # _LT_AC_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
+       ;;
+      dgux*)
+       case $cc_basename in
+         ec++)
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+           ;;
+         ghcx)
+           # Green Hills C++ Compiler
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      freebsd* | kfreebsd*-gnu)
+       # FreeBSD uses GNU C++
+       ;;
+      hpux9* | hpux10* | hpux11*)
+       case $cc_basename in
+         CC)
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+           if test "$host_cpu" != ia64; then
+             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+           fi
+           ;;
+         aCC)
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+           case "$host_cpu" in
+           hppa*64*|ia64*)
+             # +Z the default
+             ;;
+           *)
+             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+             ;;
+           esac
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      irix5* | irix6* | nonstopux*)
+       case $cc_basename in
+         CC)
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+           # CC pic flag -KPIC is the default.
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      linux*)
+       case $cc_basename in
+         KCC)
+           # KAI C++ Compiler
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+           ;;
+         icpc)
+           # Intel C++
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+           ;;
+         cxx)
+           # Compaq C++
+           # Make sure the PIC flag is empty.  It appears that all Alpha
+           # Linux and Compaq Tru64 Unix objects are PIC.
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      lynxos*)
+       ;;
+      m88k*)
+       ;;
+      mvs*)
+       case $cc_basename in
+         cxx)
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      netbsd*)
+       ;;
+      osf3* | osf4* | osf5*)
+       case $cc_basename in
+         KCC)
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+           ;;
+         RCC)
+           # Rational C++ 2.4.1
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+           ;;
+         cxx)
+           # Digital/Compaq C++
+           _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      psos*)
+       ;;
+      sco*)
+       case $cc_basename in
+         CC)
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      solaris*)
+       case $cc_basename in
+         CC)
+           # Sun C++ 4.2, 5.x and Centerline C++
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+           ;;
+         gcx)
+           # Green Hills C++ Compiler
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      sunos4*)
+       case $cc_basename in
+         CC)
+           # Sun C++ 4.x
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+           ;;
+         lcc)
+           # Lucid
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      tandem*)
+       case $cc_basename in
+         NCC)
+           # NonStop-UX NCC 3.20
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      unixware*)
+       ;;
+      vxworks*)
+       ;;
+      *)
+       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+       ;;
+    esac
+  fi
+],
+[
+  if test "$GCC" = yes; then
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | pw32* | os2*)
+      # 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_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+       ;;
+      esac
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      else
+       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+
+    mingw* | pw32* | os2*)
+      # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+       ;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC (with -KPIC) is the default.
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    newsos6)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    linux*)
+      case $CC in
+      icc* | ecc*)
+       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      ccc*)
+        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+        # All Alpha code is PIC.
+        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+        ;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # All OSF/1 code is PIC.
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    sco3.2v5*)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
+      ;;
+
+    solaris*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sunos4*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    uts4*)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+    esac
+  fi
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
+  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
+    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
+    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
+    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
+     "" | " "*) ;;
+     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+     esac],
+    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+case "$host_os" in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+    ;;
+  *)
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
+    ;;
+esac
+])
+
+
+# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
+# ------------------------------------
+# See if the linker supports building shared libraries.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
+[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ifelse([$1],[CXX],[
+  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  case $host_os in
+  aix4* | aix5*)
+    # 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
+    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+    else
+      _LT_AC_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_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+  ;;
+  cygwin* | mingw*)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  *)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+],[
+  runpath_var=
+  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+  _LT_AC_TAGVAR(archive_cmds, $1)=
+  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
+  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
+  _LT_AC_TAGVAR(module_cmds, $1)=
+  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
+  _LT_AC_TAGVAR(always_export_symbols, $1)=no
+  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  _LT_AC_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_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
+  # 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.
+  extract_expsyms_cmds=
+
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # 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
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, 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 modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+
+      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+       # support --undefined.  This deserves some investigation.  FIXME
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+      # as there is no search path for DLLs.
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_TAGVAR(always_export_symbols, $1)=no
+      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+       # If the export-symbols file already is a .def file (1st line
+       # is EXPORTS), use it as is; otherwise, prepend...
+       _LT_AC_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}--image-base=0x10000000  ${wl}--out-implib,$lib'
+      else
+       ld_shlibs=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+       wlarc=
+      else
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris* | sysv5*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       cat <<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.
+
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    sunos4*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+  linux*)
+    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
+      supports_anon_versioning=no
+      case `$LD -v 2>/dev/null` in
+        *\ [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
+      if test $supports_anon_versioning = yes; then
+        _LT_AC_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 -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+      else
+        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
+      fi
+    else
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    fi
+    ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
+
+    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
+      runpath_var=LD_RUN_PATH
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+      _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+      fi
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+      _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      if test "$GCC" = yes && test -z "$link_static_flag"; then
+       # Neither direct hardcoding nor static linking is supported with a
+       # broken collect2.
+       _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+      fi
+      ;;
+
+    aix4* | aix5*)
+      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
+       if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+         _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+       else
+         _LT_AC_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]].*|aix5*)
+         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_AC_TAGVAR(archive_cmds, $1)=''
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+      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
+         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+         else
+         # We have old collect2
+         _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes
+         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+         fi
+       esac
+       shared_flag='-shared'
+      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
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       _LT_AC_SYS_LIBPATH_AIX
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+       if test "$host_cpu" = ia64; then
+         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+         _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+       else
+        # Determine the default libpath from the value encoded in an empty executable.
+        _LT_AC_SYS_LIBPATH_AIX
+        _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+         # -bexpall does not export symbols beginning with underscore (_)
+         _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+         # Exported symbols can be pulled into shared objects from archives
+         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
+         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+         # This is similar to how AIX traditionally builds it's shared libraries.
+         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+       fi
+      fi
+      ;;
+
+    amigaos*)
+      _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      # see comment about different semantics on the GNU ld section
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    bsdi4*)
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # 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.
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+      _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
+      # FIXME: Should let the user specify the lib program.
+      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path='`cygpath -w "$srcfile"`'
+      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      ;;
+
+    darwin* | rhapsody*)
+    if test "$GXX" = yes ; then
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      case "$host_os" in
+      rhapsody* | darwin1.[[012]])
+       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
+       ;;
+      *) # Darwin 1.3 on
+      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+      else
+        case ${MACOSX_DEPLOYMENT_TARGET} in
+          10.[[012]])
+            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+            ;;
+          10.*)
+            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
+            ;;
+        esac
+      fi
+       ;;
+      esac
+       lt_int_apple_cc_single_mod=no
+       output_verbose_link_cmd='echo'
+       if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
+         lt_int_apple_cc_single_mod=yes
+       fi
+       if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+       else
+        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -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'
+      fi
+      _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+        else
+          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+        fi
+          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+    else
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    fi
+      ;;
+
+    dgux*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    freebsd1*)
+      _LT_AC_TAGVAR(ld_shlibs, $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_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | kfreebsd*-gnu)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      ;;
+
+    hpux10* | hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+       case "$host_cpu" in
+       hppa*64*|ia64*)
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       esac
+      else
+       case "$host_cpu" in
+       hppa*64*|ia64*)
+         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+         ;;
+       *)
+         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+         ;;
+       esac
+      fi
+      if test "$with_gnu_ld" = no; then
+       case "$host_cpu" in
+       hppa*64*)
+         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+         _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+         _LT_AC_TAGVAR(hardcode_direct, $1)=no
+         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+         ;;
+       ia64*)
+         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+         _LT_AC_TAGVAR(hardcode_direct, $1)=no
+         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+
+         # hardcode_minus_L: Not really in the search PATH,
+         # but as the default location of the library.
+         _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+         ;;
+       *)
+         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+         _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes
+         ;;
+       esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    newsos6)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    openbsd*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      else
+       case $host_os in
+        openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+          ;;
+        *)
+          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+          ;;
+       esac
+      fi
+      ;;
+
+    os2*)
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_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_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    osf4* | osf5*)     # as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      else
+       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       _LT_AC_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~
+       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+
+       # Both c and cxx compiler support -rpath directly
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    sco3.2v5*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+      runpath_var=LD_RUN_PATH
+      hardcode_runpath_var=yes
+      ;;
+
+    solaris*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+      if test "$GCC" = yes; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+         $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+       _LT_AC_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'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      case $host_os in
+      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
+      esac
+      _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+       sni)
+         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+       ;;
+       siemens)
+         ## LD is ld it makes a PLAMLIB
+         ## CC just makes a GrossModule.
+         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+         _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+         _LT_AC_TAGVAR(hardcode_direct, $1)=no
+        ;;
+       motorola)
+         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+       ;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4.3*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+       runpath_var=LD_RUN_PATH
+       hardcode_runpath_var=yes
+       _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+      fi
+      ;;
+
+    sysv4.2uw2*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      hardcode_runpath_var=yes
+      runpath_var=LD_RUN_PATH
+      ;;
+
+   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
+      if test "$GCC" = yes; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      runpath_var='LD_RUN_PATH'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv5*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+      # $CC -shared without GNU ld will not create a library from C++
+      # object files and a static libstdc++, better avoid it by now
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_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'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
+      ;;
+
+    uts4*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    esac
+  fi
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = 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
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+  # Assume -lc should be added
+  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $_LT_AC_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_MSG_CHECKING([whether -lc should be explicitly linked in])
+      $rm conftest*
+      printf "$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_AC_TAGVAR(lt_prog_compiler_wl, $1)
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
+        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
+        then
+         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+        else
+         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+        fi
+        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
+      ;;
+    esac
+  fi
+  ;;
+esac
+])# AC_LIBTOOL_PROG_LD_SHLIBS
+
+
+# _LT_AC_FILE_LTDLL_C
+# -------------------
+# Be careful that the start marker always follows a newline.
+AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
+# /* ltdll.c starts here */
+# #define WIN32_LEAN_AND_MEAN
+# #include <windows.h>
+# #undef WIN32_LEAN_AND_MEAN
+# #include <stdio.h>
+#
+# #ifndef __CYGWIN__
+# #  ifdef __CYGWIN32__
+# #    define __CYGWIN__ __CYGWIN32__
+# #  endif
+# #endif
+#
+# #ifdef __cplusplus
+# extern "C" {
+# #endif
+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
+# #ifdef __cplusplus
+# }
+# #endif
+#
+# #ifdef __CYGWIN__
+# #include <cygwin/cygwin_dll.h>
+# DECLARE_CYGWIN_DLL( DllMain );
+# #endif
+# HINSTANCE __hDllInstance_base;
+#
+# BOOL APIENTRY
+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
+# {
+#   __hDllInstance_base = hInst;
+#   return TRUE;
+# }
+# /* ltdll.c ends here */
+])# _LT_AC_FILE_LTDLL_C
+
+
+# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
+# ---------------------------------
+AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
+
+
+# old names
+AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
+AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
+AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
+AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
+AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
+
+# This is just to silence aclocal about the macro not being used
+ifelse([AC_DISABLE_FAST_INSTALL])
+
+AC_DEFUN([LT_AC_PROG_GCJ],
+[AC_CHECK_TOOL(GCJ, gcj, no)
+  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+  AC_SUBST(GCJFLAGS)
+])
+
+AC_DEFUN([LT_AC_PROG_RC],
+[AC_CHECK_TOOL(RC, windres, no)
+])
+
+# 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.                               #
+# LT_AC_PROG_SED
+# --------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible.  Prefer GNU sed if found.
+AC_DEFUN([LT_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
+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 && break
+  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_MSG_RESULT([$SED])
+])
+
+
+dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
+dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
+dnl also defines GSTUFF_PKG_ERRORS on error
+AC_DEFUN(PKG_CHECK_MODULES, [
+  succeeded=no
+
+  if test -z "$PKG_CONFIG"; then
+    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+  fi
+
+  if test "$PKG_CONFIG" = "no" ; then
+     echo "*** The pkg-config script could not be found. Make sure it is"
+     echo "*** in your path, or set the PKG_CONFIG environment variable"
+     echo "*** to the full path to pkg-config."
+     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
+  else
+     PKG_CONFIG_MIN_VERSION=0.9.0
+     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
+        AC_MSG_CHECKING(for $2)
+
+        if $PKG_CONFIG --exists "$2" ; then
+            AC_MSG_RESULT(yes)
+            succeeded=yes
+
+            AC_MSG_CHECKING($1_CFLAGS)
+            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
+            AC_MSG_RESULT($$1_CFLAGS)
+
+            AC_MSG_CHECKING($1_LIBS)
+            $1_LIBS=`$PKG_CONFIG --libs "$2"`
+            AC_MSG_RESULT($$1_LIBS)
+        else
+            $1_CFLAGS=""
+            $1_LIBS=""
+            ## If we have a custom action on failure, don't print errors, but 
+            ## do set a variable so people can do so.
+            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+            ifelse([$4], ,echo $$1_PKG_ERRORS,)
+        fi
+
+        AC_SUBST($1_CFLAGS)
+        AC_SUBST($1_LIBS)
+     else
+        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
+        echo "*** See http://www.freedesktop.org/software/pkgconfig"
+     fi
+  fi
+
+  if test $succeeded = yes; then
+     ifelse([$3], , :, [$3])
+  else
+     ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
+  fi
+])
+
+
+
+# Copyright (C) 1995-2002 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003,2004 Red Hat, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License.  As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# This file can be copied and used freely without restrictions.  It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+#
+# Macro to add for using GNU gettext.
+# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
+#
+# Modified to never use included libintl. 
+# Owen Taylor <otaylor@redhat.com>, 12/15/1998
+#
+# Major rework to remove unused code
+# Owen Taylor <otaylor@redhat.com>, 12/11/2002
+#
+# Added better handling of ALL_LINGUAS from GNU gettext version 
+# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
+#
+# Modified to require ngettext
+# Matthias Clasen <mclasen@redhat.com> 08/06/2004
+#
+# We need this here as well, since someone might use autoconf-2.5x
+# to configure GLib then an older version to configure a package
+# using AM_GLIB_GNU_GETTEXT
+AC_PREREQ(2.53)
+
+dnl
+dnl We go to great lengths to make sure that aclocal won't 
+dnl try to pull in the installed version of these macros
+dnl when running aclocal in the glib directory.
+dnl
+m4_copy([AC_DEFUN],[glib_DEFUN])
+m4_copy([AC_REQUIRE],[glib_REQUIRE])
+dnl
+dnl At the end, if we're not within glib, we'll define the public
+dnl definitions in terms of our private definitions.
+dnl
+
+# GLIB_LC_MESSAGES
+#--------------------
+glib_DEFUN([GLIB_LC_MESSAGES],
+  [AC_CHECK_HEADERS([locale.h])
+    if test $ac_cv_header_locale_h = yes; then
+    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+    if test $am_cv_val_LC_MESSAGES = yes; then
+      AC_DEFINE(HAVE_LC_MESSAGES, 1,
+        [Define if your <locale.h> file defines LC_MESSAGES.])
+    fi
+  fi])
+
+# GLIB_PATH_PROG_WITH_TEST
+#----------------------------
+dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+  /*)
+  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in ifelse([$5], , $PATH, [$5]); do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if [$3]; then
+       ac_cv_path_$1="$ac_dir/$ac_word"
+       break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+  ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+  AC_MSG_RESULT([$]$1)
+else
+  AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+
+# GLIB_WITH_NLS
+#-----------------
+glib_DEFUN([GLIB_WITH_NLS],
+  dnl NLS is obligatory
+  [USE_NLS=yes
+    AC_SUBST(USE_NLS)
+
+    gt_cv_have_gettext=no
+
+    CATOBJEXT=NONE
+    XGETTEXT=:
+    INTLLIBS=
+
+    AC_CHECK_HEADER(libintl.h,
+     [gt_cv_func_dgettext_libintl="no"
+      libintl_extra_libs=""
+
+      #
+      # First check in libc
+      #
+      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
+        [AC_TRY_LINK([
+#include <libintl.h>
+],
+         [return (int) ngettext ("","", 1)],
+         gt_cv_func_ngettext_libc=yes,
+          gt_cv_func_ngettext_libc=no)
+        ])
+  
+      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+             AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
+               [AC_TRY_LINK([
+#include <libintl.h>
+],
+                 [return (int) dgettext ("","")],
+                 gt_cv_func_dgettext_libc=yes,
+                 gt_cv_func_dgettext_libc=no)
+               ])
+      fi
+  
+      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+        AC_CHECK_FUNCS(bind_textdomain_codeset)
+      fi
+
+      #
+      # If we don't have everything we want, check in libintl
+      #
+      if test "$gt_cv_func_dgettext_libc" != "yes" \
+        || test "$gt_cv_func_ngettext_libc" != "yes" \
+         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
+        
+        AC_CHECK_LIB(intl, bindtextdomain,
+           [AC_CHECK_LIB(intl, ngettext,
+                   [AC_CHECK_LIB(intl, dgettext,
+                                 gt_cv_func_dgettext_libintl=yes)])])
+
+       if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
+         AC_MSG_CHECKING([if -liconv is needed to use gettext])
+         AC_MSG_RESULT([])
+         AC_CHECK_LIB(intl, ngettext,
+               [AC_CHECK_LIB(intl, dcgettext,
+                      [gt_cv_func_dgettext_libintl=yes
+                       libintl_extra_libs=-liconv],
+                       :,-liconv)],
+               :,-liconv)
+        fi
+
+        #
+        # If we found libintl, then check in it for bind_textdomain_codeset();
+        # we'll prefer libc if neither have bind_textdomain_codeset(),
+        # and both have dgettext and ngettext
+        #
+        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
+          glib_save_LIBS="$LIBS"
+          LIBS="$LIBS -lintl $libintl_extra_libs"
+          unset ac_cv_func_bind_textdomain_codeset
+          AC_CHECK_FUNCS(bind_textdomain_codeset)
+          LIBS="$glib_save_LIBS"
+
+          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
+            gt_cv_func_dgettext_libc=no
+          else
+            if test "$gt_cv_func_dgettext_libc" = "yes" \
+               && test "$gt_cv_func_ngettext_libc" = "yes"; then
+              gt_cv_func_dgettext_libintl=no
+            fi
+          fi
+        fi
+      fi
+
+      if test "$gt_cv_func_dgettext_libc" = "yes" \
+       || test "$gt_cv_func_dgettext_libintl" = "yes"; then
+        gt_cv_have_gettext=yes
+      fi
+  
+      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
+        INTLLIBS="-lintl $libintl_extra_libs"
+      fi
+  
+      if test "$gt_cv_have_gettext" = "yes"; then
+       AC_DEFINE(HAVE_GETTEXT,1,
+         [Define if the GNU gettext() function is already present or preinstalled.])
+       GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+         [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
+       if test "$MSGFMT" != "no"; then
+          glib_save_LIBS="$LIBS"
+          LIBS="$LIBS $INTLLIBS"
+         AC_CHECK_FUNCS(dcgettext)
+         AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+         GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+           [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+         AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
+                        return _nl_msg_cat_cntr],
+           [CATOBJEXT=.gmo 
+             DATADIRNAME=share],
+           [case $host in
+           *-*-solaris*)
+           dnl On Solaris, if bind_textdomain_codeset is in libc,
+           dnl GNU format message catalog is always supported,
+            dnl since both are added to the libc all together.
+           dnl Hence, we'd like to go with DATADIRNAME=share and
+           dnl and CATOBJEXT=.gmo in this case.
+            AC_CHECK_FUNC(bind_textdomain_codeset,
+             [CATOBJEXT=.gmo 
+               DATADIRNAME=share],
+             [CATOBJEXT=.mo
+               DATADIRNAME=lib])
+           ;;
+           *)
+           CATOBJEXT=.mo
+            DATADIRNAME=lib
+           ;;
+           esac])
+          LIBS="$glib_save_LIBS"
+         INSTOBJEXT=.mo
+       else
+         gt_cv_have_gettext=no
+       fi
+      fi
+    ])
+
+    if test "$gt_cv_have_gettext" = "yes" ; then
+      AC_DEFINE(ENABLE_NLS, 1,
+        [always defined to indicate that i18n is enabled])
+    fi
+
+    dnl Test whether we really found GNU xgettext.
+    if test "$XGETTEXT" != ":"; then
+      dnl If it is not GNU xgettext we define it as : so that the
+      dnl Makefiles still can work.
+      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+        : ;
+      else
+        AC_MSG_RESULT(
+         [found xgettext program is not GNU xgettext; ignore it])
+        XGETTEXT=":"
+      fi
+    fi
+
+    # We need to process the po/ directory.
+    POSUB=po
+
+    AC_OUTPUT_COMMANDS(
+      [case "$CONFIG_FILES" in *po/Makefile.in*)
+        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+      esac])
+
+    dnl These rules are solely for the distribution goal.  While doing this
+    dnl we only have to keep exactly one list of the available catalogs
+    dnl in configure.in.
+    for lang in $ALL_LINGUAS; do
+      GMOFILES="$GMOFILES $lang.gmo"
+      POFILES="$POFILES $lang.po"
+    done
+
+    dnl Make all variables we use known to autoconf.
+    AC_SUBST(CATALOGS)
+    AC_SUBST(CATOBJEXT)
+    AC_SUBST(DATADIRNAME)
+    AC_SUBST(GMOFILES)
+    AC_SUBST(INSTOBJEXT)
+    AC_SUBST(INTLLIBS)
+    AC_SUBST(PO_IN_DATADIR_TRUE)
+    AC_SUBST(PO_IN_DATADIR_FALSE)
+    AC_SUBST(POFILES)
+    AC_SUBST(POSUB)
+  ])
+
+# AM_GLIB_GNU_GETTEXT
+# -------------------
+# Do checks necessary for use of gettext. If a suitable implementation 
+# of gettext is found in either in libintl or in the C library,
+# it will set INTLLIBS to the libraries needed for use of gettext
+# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
+# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
+# on various variables needed by the Makefile.in.in installed by 
+# glib-gettextize.
+dnl
+glib_DEFUN([GLIB_GNU_GETTEXT],
+  [AC_REQUIRE([AC_PROG_CC])dnl
+   AC_REQUIRE([AC_HEADER_STDC])dnl
+   
+   GLIB_LC_MESSAGES
+   GLIB_WITH_NLS
+
+   if test "$gt_cv_have_gettext" = "yes"; then
+     if test "x$ALL_LINGUAS" = "x"; then
+       LINGUAS=
+     else
+       AC_MSG_CHECKING(for catalogs to be installed)
+       NEW_LINGUAS=
+       for presentlang in $ALL_LINGUAS; do
+         useit=no
+         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
+           desiredlanguages="$LINGUAS"
+         else
+           desiredlanguages="$ALL_LINGUAS"
+         fi
+         for desiredlang in $desiredlanguages; do
+          # Use the presentlang catalog if desiredlang is
+           #   a. equal to presentlang, or
+           #   b. a variant of presentlang (because in this case,
+           #      presentlang can be used as a fallback for messages
+           #      which are not translated in the desiredlang catalog).
+           case "$desiredlang" in
+             "$presentlang"*) useit=yes;;
+           esac
+         done
+         if test $useit = yes; then
+           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
+         fi
+       done
+       LINGUAS=$NEW_LINGUAS
+       AC_MSG_RESULT($LINGUAS)
+     fi
+
+     dnl Construct list of names of catalog files to be constructed.
+     if test -n "$LINGUAS"; then
+       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+     fi
+   fi
+
+   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
+   dnl Try to locate is.
+   MKINSTALLDIRS=
+   if test -n "$ac_aux_dir"; then
+     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+   fi
+   if test -z "$MKINSTALLDIRS"; then
+     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+   fi
+   AC_SUBST(MKINSTALLDIRS)
+
+   dnl Generate list of files to be processed by xgettext which will
+   dnl be included in po/Makefile.
+   test -d po || mkdir po
+   if test "x$srcdir" != "x."; then
+     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+       posrcprefix="$srcdir/"
+     else
+       posrcprefix="../$srcdir/"
+     fi
+   else
+     posrcprefix="../"
+   fi
+   rm -f po/POTFILES
+   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,        $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+       < $srcdir/po/POTFILES.in > po/POTFILES
+  ])
+
+# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
+# -------------------------------
+# Define VARIABLE to the location where catalog files will
+# be installed by po/Makefile.
+glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
+[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
+glib_save_prefix="$prefix"
+glib_save_exec_prefix="$exec_prefix"
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+test "x$exec_prefix" = xNONE && exec_prefix=$prefix
+if test "x$CATOBJEXT" = "x.mo" ; then
+  localedir=`eval echo "${libdir}/locale"`
+else
+  localedir=`eval echo "${datadir}/locale"`
+fi
+prefix="$glib_save_prefix"
+exec_prefix="$glib_save_exec_prefix"
+AC_DEFINE_UNQUOTED($1, "$localedir",
+  [Define the location where the catalogs will be installed])
+])
+
+dnl
+dnl Now the definitions that aclocal will find
+dnl
+ifdef(glib_configure_in,[],[
+AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
+AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
+])dnl
+
diff --git a/config.guess b/config.guess
new file mode 100755 (executable)
index 0000000..e8c6fc0
--- /dev/null
@@ -0,0 +1,1432 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+timestamp='2004-01-05'
+
+# 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 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.
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+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@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+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 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # 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 -q "$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 ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/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
+
+# 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 tupples: *-*-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 ;;
+           *) 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 __ELF__ >/dev/null
+               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 0 ;;
+    amiga:OpenBSD:*:*)
+       echo m68k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    arc:OpenBSD:*:*)
+       echo mipsel-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    hp300:OpenBSD:*:*)
+       echo m68k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    mac68k:OpenBSD:*:*)
+       echo m68k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    macppc:OpenBSD:*:*)
+       echo powerpc-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    mvme68k:OpenBSD:*:*)
+       echo m68k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    mvme88k:OpenBSD:*:*)
+       echo m88k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    mvmeppc:OpenBSD:*:*)
+       echo powerpc-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    pegasos:OpenBSD:*:*)
+       echo powerpc-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    pmax:OpenBSD:*:*)
+       echo mipsel-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    sgi:OpenBSD:*:*)
+       echo mipseb-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    sun3:OpenBSD:*:*)
+       echo m68k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    wgrisc:OpenBSD:*:*)
+       echo mipsel-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    *:OpenBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    alpha:OSF1:*:*)
+       if test $UNAME_RELEASE = "V4.0"; then
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+       fi
+       # 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 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/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+       exit 0 ;;
+    Alpha*:OpenVMS:*:*)
+       echo alpha-hp-vms
+       exit 0 ;;
+    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 0 ;;
+    21064:Windows_NT:50:3)
+       echo alpha-dec-winnt3.5
+       exit 0 ;;
+    Amiga*:UNIX_System_V:4.0:*)
+       echo m68k-unknown-sysv4
+       exit 0;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+       echo ${UNAME_MACHINE}-unknown-amigaos
+       exit 0 ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+       echo ${UNAME_MACHINE}-unknown-morphos
+       exit 0 ;;
+    *:OS/390:*:*)
+       echo i370-ibm-openedition
+       exit 0 ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+       exit 0 ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+       echo arm-acorn-riscix${UNAME_RELEASE}
+       exit 0;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+       echo hppa1.1-hitachi-hiuxmpp
+       exit 0;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+       # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+       if test "`(/bin/universe) 2>/dev/null`" = att ; then
+               echo pyramid-pyramid-sysv3
+       else
+               echo pyramid-pyramid-bsd
+       fi
+       exit 0 ;;
+    NILE*:*:*:dcosx)
+       echo pyramid-pyramid-svr4
+       exit 0 ;;
+    DRS?6000:unix:4.0:6*)
+       echo sparc-icl-nx6
+       exit 0 ;;
+    DRS?6000:UNIX_SV:4.2*:7*)
+       case `/usr/bin/uname -p` in
+           sparc) echo sparc-icl-nx7 && exit 0 ;;
+       esac ;;
+    sun4H:SunOS:5.*:*)
+       echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit 0 ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit 0 ;;
+    i86pc:SunOS:5.*:*)
+       echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit 0 ;;
+    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 0 ;;
+    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 0 ;;
+    sun3*:SunOS:*:*)
+       echo m68k-sun-sunos${UNAME_RELEASE}
+       exit 0 ;;
+    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 0 ;;
+    aushp:SunOS:*:*)
+       echo sparc-auspex-sunos${UNAME_RELEASE}
+       exit 0 ;;
+    # 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 0 ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+       echo m68k-atari-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+       exit 0 ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit 0 ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit 0 ;;
+    powerpc:machten:*:*)
+       echo powerpc-apple-machten${UNAME_RELEASE}
+       exit 0 ;;
+    RISC*:Mach:*:*)
+       echo mips-dec-mach_bsd4.3
+       exit 0 ;;
+    RISC*:ULTRIX:*:*)
+       echo mips-dec-ultrix${UNAME_RELEASE}
+       exit 0 ;;
+    VAX*:ULTRIX*:*:*)
+       echo vax-dec-ultrix${UNAME_RELEASE}
+       exit 0 ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+       echo clipper-intergraph-clix${UNAME_RELEASE}
+       exit 0 ;;
+    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 \
+         && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+         && exit 0
+       echo mips-mips-riscos${UNAME_RELEASE}
+       exit 0 ;;
+    Motorola:PowerMAX_OS:*:*)
+       echo powerpc-motorola-powermax
+       exit 0 ;;
+    Motorola:*:4.3:PL8-*)
+       echo powerpc-harris-powermax
+       exit 0 ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+       echo powerpc-harris-powermax
+       exit 0 ;;
+    Night_Hawk:Power_UNIX:*:*)
+       echo powerpc-harris-powerunix
+       exit 0 ;;
+    m88k:CX/UX:7*:*)
+       echo m88k-harris-cxux7
+       exit 0 ;;
+    m88k:*:4*:R4*)
+       echo m88k-motorola-sysv4
+       exit 0 ;;
+    m88k:*:3*:R3*)
+       echo m88k-motorola-sysv3
+       exit 0 ;;
+    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 0 ;;
+    M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
+       echo m88k-dolphin-sysv3
+       exit 0 ;;
+    M88*:*:R3*:*)
+       # Delta 88k system running SVR3
+       echo m88k-motorola-sysv3
+       exit 0 ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+       echo m88k-tektronix-sysv3
+       exit 0 ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+       echo m68k-tektronix-bsd
+       exit 0 ;;
+    *:IRIX*:*:*)
+       echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+       exit 0 ;;
+    ????????: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 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+       echo i386-ibm-aix
+       exit 0 ;;
+    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 0 ;;
+    *: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
+               $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+               echo rs6000-ibm-aix3.2.5
+       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 0 ;;
+    *:AIX:*:[45])
+       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 0 ;;
+    *:AIX:*:*)
+       echo rs6000-ibm-aix
+       exit 0 ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+       echo romp-ibm-bsd4.4
+       exit 0 ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+       exit 0 ;;                           # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+       echo rs6000-bull-bosx
+       exit 0 ;;
+    DPX/2?00:B.O.S.:*:*)
+       echo m68k-bull-sysv3
+       exit 0 ;;
+    9000/[34]??:4.3bsd:1.*:*)
+       echo m68k-hp-bsd
+       exit 0 ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+       echo m68k-hp-bsd4.4
+       exit 0 ;;
+    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
+           # avoid double evaluation of $set_cc_for_build
+           test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+           then
+               HP_ARCH="hppa2.0w"
+           else
+               HP_ARCH="hppa64"
+           fi
+       fi
+       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+       exit 0 ;;
+    ia64:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       echo ia64-hp-hpux${HPUX_REV}
+       exit 0 ;;
+    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 && $dummy && exit 0
+       echo unknown-hitachi-hiuxwe2
+       exit 0 ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+       echo hppa1.1-hp-bsd
+       exit 0 ;;
+    9000/8??:4.3bsd:*:*)
+       echo hppa1.0-hp-bsd
+       exit 0 ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+       echo hppa1.0-hp-mpeix
+       exit 0 ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+       echo hppa1.1-hp-osf
+       exit 0 ;;
+    hp8??:OSF1:*:*)
+       echo hppa1.0-hp-osf
+       exit 0 ;;
+    i*86:OSF1:*:*)
+       if [ -x /usr/sbin/sysversion ] ; then
+           echo ${UNAME_MACHINE}-unknown-osf1mk
+       else
+           echo ${UNAME_MACHINE}-unknown-osf1
+       fi
+       exit 0 ;;
+    parisc*:Lites*:*:*)
+       echo hppa1.1-hp-lites
+       exit 0 ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+       echo c1-convex-bsd
+        exit 0 ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+        exit 0 ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+       echo c34-convex-bsd
+        exit 0 ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+       echo c38-convex-bsd
+        exit 0 ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+       echo c4-convex-bsd
+        exit 0 ;;
+    CRAY*Y-MP:*:*:*)
+       echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit 0 ;;
+    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 0 ;;
+    CRAY*TS:*:*:*)
+       echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit 0 ;;
+    CRAY*T3E:*:*:*)
+       echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit 0 ;;
+    CRAY*SV1:*:*:*)
+       echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit 0 ;;
+    *:UNICOS/mp:*:*)
+       echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit 0 ;;
+    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 0 ;;
+    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 0 ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+       exit 0 ;;
+    sparc*:BSD/OS:*:*)
+       echo sparc-unknown-bsdi${UNAME_RELEASE}
+       exit 0 ;;
+    *:BSD/OS:*:*)
+       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+       exit 0 ;;
+    *:FreeBSD:*:*)
+       # Determine whether the default compiler uses glibc.
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #include <features.h>
+       #if __GLIBC__ >= 2
+       LIBC=gnu
+       #else
+       LIBC=
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+       # GNU/KFreeBSD systems have a "k" prefix to indicate we are using
+       # FreeBSD's kernel, but not the complete OS.
+       case ${LIBC} in gnu) kernel_only='k' ;; esac
+       echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
+       exit 0 ;;
+    i*:CYGWIN*:*)
+       echo ${UNAME_MACHINE}-pc-cygwin
+       exit 0 ;;
+    i*:MINGW*:*)
+       echo ${UNAME_MACHINE}-pc-mingw32
+       exit 0 ;;
+    i*:PW*:*)
+       echo ${UNAME_MACHINE}-pc-pw32
+       exit 0 ;;
+    x86:Interix*:[34]*)
+       echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+       exit 0 ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+       echo i${UNAME_MACHINE}-pc-mks
+       exit 0 ;;
+    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 0 ;;
+    i*:UWIN*:*)
+       echo ${UNAME_MACHINE}-pc-uwin
+       exit 0 ;;
+    p*:CYGWIN*:*)
+       echo powerpcle-unknown-cygwin
+       exit 0 ;;
+    prep*:SunOS:5.*:*)
+       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit 0 ;;
+    *:GNU:*:*)
+       # the GNU system
+       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+       exit 0 ;;
+    *: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/[-(].*//'`-gnu
+       exit 0 ;;
+    i*86:Minix:*:*)
+       echo ${UNAME_MACHINE}-pc-minix
+       exit 0 ;;
+    arm*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    cris:Linux:*:*)
+       echo cris-axis-linux-gnu
+       exit 0 ;;
+    ia64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    m68*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    mips:Linux:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #undef CPU
+       #undef mips
+       #undef mipsel
+       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+       CPU=mipsel
+       #else
+       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+       CPU=mips
+       #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-gnu" && exit 0
+       ;;
+    mips64:Linux:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #undef CPU
+       #undef mips64
+       #undef mips64el
+       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+       CPU=mips64el
+       #else
+       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+       CPU=mips64
+       #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-gnu" && exit 0
+       ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-gnu
+       exit 0 ;;
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-gnu
+       exit 0 ;;
+    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 ld.so.1 >/dev/null
+       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       exit 0 ;;
+    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-gnu ;;
+         PA8*) echo hppa2.0-unknown-linux-gnu ;;
+         *)    echo hppa-unknown-linux-gnu ;;
+       esac
+       exit 0 ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-gnu
+       exit 0 ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+       echo ${UNAME_MACHINE}-ibm-linux
+       exit 0 ;;
+    sh64*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    sh*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    x86_64:Linux:*:*)
+       echo x86_64-unknown-linux-gnu
+       exit 0 ;;
+    i*86:Linux:*:*)
+       # The BFD linker knows what the default object file format is, so
+       # first see if it will tell us. cd to the root directory to prevent
+       # problems with other programs or directories called `ld' in the path.
+       # Set LC_ALL=C to ensure ld outputs messages in English.
+       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+                        | sed -ne '/supported targets:/!d
+                                   s/[         ][      ]*/ /g
+                                   s/.*supported targets: *//
+                                   s/ .*//
+                                   p'`
+        case "$ld_supported_targets" in
+         elf32-i386)
+               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+               ;;
+         a.out-i386-linux)
+               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+               exit 0 ;;
+         coff-i386)
+               echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+               exit 0 ;;
+         "")
+               # Either a pre-BFD a.out linker (linux-gnuoldld) or
+               # one that does not give us useful --help.
+               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+               exit 0 ;;
+       esac
+       # Determine whether the default compiler is a.out or elf
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #include <features.h>
+       #ifdef __ELF__
+       # ifdef __GLIBC__
+       #  if __GLIBC__ >= 2
+       LIBC=gnu
+       #  else
+       LIBC=gnulibc1
+       #  endif
+       # else
+       LIBC=gnulibc1
+       # endif
+       #else
+       #ifdef __INTEL_COMPILER
+       LIBC=gnu
+       #else
+       LIBC=gnuaout
+       #endif
+       #endif
+       #ifdef __dietlibc__
+       LIBC=dietlibc
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+       test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
+       test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+       ;;
+    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 0 ;;
+    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 0 ;;
+    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 0 ;;
+    i*86:XTS-300:*:STOP)
+       echo ${UNAME_MACHINE}-unknown-stop
+       exit 0 ;;
+    i*86:atheos:*:*)
+       echo ${UNAME_MACHINE}-unknown-atheos
+       exit 0 ;;
+       i*86:syllable:*:*)
+       echo ${UNAME_MACHINE}-pc-syllable
+       exit 0 ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+       echo i386-unknown-lynxos${UNAME_RELEASE}
+       exit 0 ;;
+    i*86:*DOS:*:*)
+       echo ${UNAME_MACHINE}-pc-msdosdjgpp
+       exit 0 ;;
+    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 0 ;;
+    i*86:*:5:[78]*)
+       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 0 ;;
+    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 0 ;;
+    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 i386.
+       echo i386-pc-msdosdjgpp
+        exit 0 ;;
+    Intel:Mach:3*:*)
+       echo i386-pc-mach3
+       exit 0 ;;
+    paragon:*:*:*)
+       echo i860-intel-osf1
+       exit 0 ;;
+    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 0 ;;
+    mini*:CTIX:SYS*5:*)
+       # "miniframe"
+       echo m68010-convergent-sysv
+       exit 0 ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+       echo m68k-convergent-sysv
+       exit 0 ;;
+    M680?0:D-NIX:5.3:*)
+       echo m68k-diab-dnix
+       exit 0 ;;
+    M68*:*:R3V[567]*:*)
+       test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+    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)
+       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 0
+       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+         && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && echo i486-ncr-sysv4 && exit 0 ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+       echo m68k-unknown-lynxos${UNAME_RELEASE}
+       exit 0 ;;
+    mc68030:UNIX_System_V:4.*:*)
+       echo m68k-atari-sysv4
+       exit 0 ;;
+    TSUNAMI:LynxOS:2.*:*)
+       echo sparc-unknown-lynxos${UNAME_RELEASE}
+       exit 0 ;;
+    rs6000:LynxOS:2.*:*)
+       echo rs6000-unknown-lynxos${UNAME_RELEASE}
+       exit 0 ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+       echo powerpc-unknown-lynxos${UNAME_RELEASE}
+       exit 0 ;;
+    SM[BE]S:UNIX_SV:*:*)
+       echo mips-dde-sysv${UNAME_RELEASE}
+       exit 0 ;;
+    RM*:ReliantUNIX-*:*:*)
+       echo mips-sni-sysv4
+       exit 0 ;;
+    RM*:SINIX-*:*:*)
+       echo mips-sni-sysv4
+       exit 0 ;;
+    *: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 0 ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel@ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit 0 ;;
+    *:UNIX_System_V:4*:FTX*)
+       # From Gerald Hewes <hewes@openmarket.com>.
+       # How about differentiating between stratus architectures? -djm
+       echo hppa1.1-stratus-sysv4
+       exit 0 ;;
+    *:*:*:FTX*)
+       # From seanf@swdc.stratus.com.
+       echo i860-stratus-sysv4
+       exit 0 ;;
+    *:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo hppa1.1-stratus-vos
+       exit 0 ;;
+    mc68*:A/UX:*:*)
+       echo m68k-apple-aux${UNAME_RELEASE}
+       exit 0 ;;
+    news*:NEWS-OS:6*:*)
+       echo mips-sony-newsos6
+       exit 0 ;;
+    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 0 ;;
+    BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
+       echo powerpc-be-beos
+       exit 0 ;;
+    BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
+       echo powerpc-apple-beos
+       exit 0 ;;
+    BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
+       echo i586-pc-beos
+       exit 0 ;;
+    SX-4:SUPER-UX:*:*)
+       echo sx4-nec-superux${UNAME_RELEASE}
+       exit 0 ;;
+    SX-5:SUPER-UX:*:*)
+       echo sx5-nec-superux${UNAME_RELEASE}
+       exit 0 ;;
+    SX-6:SUPER-UX:*:*)
+       echo sx6-nec-superux${UNAME_RELEASE}
+       exit 0 ;;
+    Power*:Rhapsody:*:*)
+       echo powerpc-apple-rhapsody${UNAME_RELEASE}
+       exit 0 ;;
+    *:Rhapsody:*:*)
+       echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+       exit 0 ;;
+    *:Darwin:*:*)
+       case `uname -p` in
+           *86) UNAME_PROCESSOR=i686 ;;
+           powerpc) UNAME_PROCESSOR=powerpc ;;
+       esac
+       echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+       exit 0 ;;
+    *: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 0 ;;
+    *:QNX:*:4*)
+       echo i386-pc-qnx
+       exit 0 ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+       echo nsr-tandem-nsk${UNAME_RELEASE}
+       exit 0 ;;
+    *:NonStop-UX:*:*)
+       echo mips-compaq-nonstopux
+       exit 0 ;;
+    BS2000:POSIX*:*:*)
+       echo bs2000-siemens-sysv
+       exit 0 ;;
+    DS/*:UNIX_System_V:*:*)
+       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+       exit 0 ;;
+    *: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 0 ;;
+    *:TOPS-10:*:*)
+       echo pdp10-unknown-tops10
+       exit 0 ;;
+    *:TENEX:*:*)
+       echo pdp10-unknown-tenex
+       exit 0 ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+       echo pdp10-dec-tops20
+       exit 0 ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+       echo pdp10-xkl-tops20
+       exit 0 ;;
+    *:TOPS-20:*:*)
+       echo pdp10-unknown-tops20
+       exit 0 ;;
+    *:ITS:*:*)
+       echo pdp10-unknown-its
+       exit 0 ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+       exit 0 ;;
+    *:DRAGONFLY:*:*)
+       echo ${UNAME_MACHINE}-unknown-dragonfly${UNAME_RELEASE}
+       exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+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"); 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 && $dummy && exit 0
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# 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 0 ;;
+    c2*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+       exit 0 ;;
+    c34*)
+       echo c34-convex-bsd
+       exit 0 ;;
+    c38*)
+       echo c38-convex-bsd
+       exit 0 ;;
+    c4*)
+       echo c4-convex-bsd
+       exit 0 ;;
+    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
+
+    ftp://ftp.gnu.org/pub/gnu/config/
+
+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@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/config.h.in b/config.h.in
new file mode 100644 (file)
index 0000000..ab4e92b
--- /dev/null
@@ -0,0 +1,76 @@
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* always defined to indicate that i18n is enabled */
+#undef ENABLE_NLS
+
+/* Define to 1 if you have the `bind_textdomain_codeset' function. */
+#undef HAVE_BIND_TEXTDOMAIN_CODESET
+
+/* Define to 1 if you have the `dcgettext' function. */
+#undef HAVE_DCGETTEXT
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#undef HAVE_GETTEXT
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define if your <locale.h> file defines LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
+
+/* Define to 1 if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_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
+
+/* 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 version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* 1 if ESD is available */
+#undef USE_ESD
+
+/* Version number of package */
+#undef VERSION
diff --git a/config.sub b/config.sub
new file mode 100755 (executable)
index 0000000..463186d
--- /dev/null
@@ -0,0 +1,1537 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+timestamp='2004-01-05'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# 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 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.
+
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# 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.
+
+# 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@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+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 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # 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 0;;
+
+    * )
+       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-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
+  kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    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)
+               os=
+               basic_machine=$1
+               ;;
+       -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
+               ;;
+       -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/'`
+               ;;
+       -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*)
+               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 \
+       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+       | am33_2.0 \
+       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+       | c4x | clipper \
+       | d10v | d30v | dlx | dsp16xx \
+       | fr30 | frv \
+       | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+       | i370 | i860 | i960 | ia64 \
+       | ip2k | iq2000 \
+       | m32r | m68000 | m68k | m88k | mcore \
+       | mips | mipsbe | mipseb | mipsel | mipsle \
+       | mips16 \
+       | mips64 | mips64el \
+       | mips64vr | mips64vrel \
+       | mips64orion | mips64orionel \
+       | mips64vr4100 | mips64vr4100el \
+       | mips64vr4300 | mips64vr4300el \
+       | mips64vr5000 | mips64vr5000el \
+       | mipsisa32 | mipsisa32el \
+       | mipsisa32r2 | mipsisa32r2el \
+       | mipsisa64 | mipsisa64el \
+       | mipsisa64r2 | mipsisa64r2el \
+       | mipsisa64sb1 | mipsisa64sb1el \
+       | mipsisa64sr71k | mipsisa64sr71kel \
+       | mipstx39 | mipstx39el \
+       | mn10200 | mn10300 \
+       | msp430 \
+       | ns16k | ns32k \
+       | openrisc | or32 \
+       | pdp10 | pdp11 | pj | pjl \
+       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+       | pyramid \
+       | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+       | sh64 | sh64le \
+       | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
+       | strongarm \
+       | tahoe | thumb | tic4x | tic80 | tron \
+       | v850 | v850e \
+       | we32k \
+       | x86 | xscale | xstormy16 | xtensa \
+       | z8k)
+               basic_machine=$basic_machine-unknown
+               ;;
+       m6811 | m68hc11 | m6812 | m68hc12)
+               # Motorola 68HC11/12.
+               basic_machine=$basic_machine-unknown
+               os=-none
+               ;;
+       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+               ;;
+
+       # 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-* \
+       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+       | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+       | avr-* \
+       | bs2000-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+       | clipper-* | cydra-* \
+       | d10v-* | d30v-* | dlx-* \
+       | elxsi-* \
+       | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+       | h8300-* | h8500-* \
+       | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+       | i*86-* | i860-* | i960-* | ia64-* \
+       | ip2k-* | iq2000-* \
+       | m32r-* \
+       | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+       | m88110-* | m88k-* | mcore-* \
+       | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+       | mips16-* \
+       | mips64-* | mips64el-* \
+       | mips64vr-* | mips64vrel-* \
+       | mips64orion-* | mips64orionel-* \
+       | mips64vr4100-* | mips64vr4100el-* \
+       | mips64vr4300-* | mips64vr4300el-* \
+       | mips64vr5000-* | mips64vr5000el-* \
+       | mipsisa32-* | mipsisa32el-* \
+       | mipsisa32r2-* | mipsisa32r2el-* \
+       | mipsisa64-* | mipsisa64el-* \
+       | mipsisa64r2-* | mipsisa64r2el-* \
+       | mipsisa64sb1-* | mipsisa64sb1el-* \
+       | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+       | mipstx39-* | mipstx39el-* \
+       | msp430-* \
+       | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
+       | orion-* \
+       | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+       | pyramid-* \
+       | romp-* | rs6000-* \
+       | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+       | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+       | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+       | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+       | tahoe-* | thumb-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tron-* \
+       | v850-* | v850e-* | vax-* \
+       | we32k-* \
+       | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
+       | xtensa-* \
+       | ymp-* \
+       | z8k-*)
+               ;;
+       # 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
+               ;;
+       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
+               ;;
+       aux)
+               basic_machine=m68k-apple
+               os=-aux
+               ;;
+       balance)
+               basic_machine=ns32k-sequent
+               os=-dynix
+               ;;
+       c90)
+               basic_machine=c90-cray
+               os=-unicos
+               ;;
+       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
+               ;;
+       crds | unos)
+               basic_machine=m68k-crds
+               ;;
+       cris | cris-* | etrax*)
+               basic_machine=cris-axis
+               ;;
+       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
+               ;;
+       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'm not sure what "Sysv32" means.  Should this be sysv3.2?
+       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
+               ;;
+       m88k-omron*)
+               basic_machine=m88k-omron
+               ;;
+       magnum | m3230)
+               basic_machine=mips-mips
+               os=-sysv
+               ;;
+       merlin)
+               basic_machine=ns32k-utek
+               os=-sysv
+               ;;
+       mingw32)
+               basic_machine=i386-pc
+               os=-mingw32
+               ;;
+       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
+               ;;
+       mmix*)
+               basic_machine=mmix-knuth
+               os=-mmixware
+               ;;
+       monitor)
+               basic_machine=m68k-rom68k
+               os=-coff
+               ;;
+       morphos)
+               basic_machine=powerpc-unknown
+               os=-morphos
+               ;;
+       msdos)
+               basic_machine=i386-pc
+               os=-msdos
+               ;;
+       mvs)
+               basic_machine=i370-ibm
+               os=-mvs
+               ;;
+       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
+               ;;
+       nv1)
+               basic_machine=nv1-cray
+               os=-unicosmp
+               ;;
+       nsr-tandem)
+               basic_machine=nsr-tandem
+               ;;
+       op50n-* | op60c-*)
+               basic_machine=hppa1.1-oki
+               os=-proelf
+               ;;
+       or32 | or32-*)
+               basic_machine=or32-unknown
+               os=-coff
+               ;;
+       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
+               ;;
+       pbd)
+               basic_machine=sparc-tti
+               ;;
+       pbb)
+               basic_machine=m68k-tti
+               ;;
+       pc532 | pc532-*)
+               basic_machine=ns32k-pc532
+               ;;
+       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)    basic_machine=powerpc-unknown
+               ;;
+       ppc-*)  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
+               ;;
+       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
+               ;;
+       sei)
+               basic_machine=mips-sei
+               os=-seiux
+               ;;
+       sequent)
+               basic_machine=i386-sequent
+               ;;
+       sh)
+               basic_machine=sh-hitachi
+               os=-hms
+               ;;
+       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
+               ;;
+       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
+               ;;
+       tic54x | c54x*)
+               basic_machine=tic54x-unknown
+               os=-coff
+               ;;
+       tic55x | c55x*)
+               basic_machine=tic55x-unknown
+               os=-coff
+               ;;
+       tic6x | c6x*)
+               basic_machine=tic6x-unknown
+               os=-coff
+               ;;
+       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
+               ;;
+       xps | xps100)
+               basic_machine=xps100-honeywell
+               ;;
+       ymp)
+               basic_machine=ymp-cray
+               os=-unicos
+               ;;
+       z8k-*-coff)
+               basic_machine=z8k-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
+               ;;
+       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
+               ;;
+       sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
+               basic_machine=sh-unknown
+               ;;
+       sh64)
+               basic_machine=sh64-unknown
+               ;;
+       sparc | sparcv9 | sparcv9b)
+               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.
+       -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* | -sunos | -sunos[34]*\
+             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+             | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+             | -aos* \
+             | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+             | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+             | -hiux* | -386bsd* | -knetbsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \
+             | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+             | -chorusos* | -chorusrdb* \
+             | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+             | -mingw32* | -linux-gnu* | -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*)
+       # 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* \
+             | -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
+               ;;
+       -kaos*)
+               os=-kaos
+               ;;
+       -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
+       *-acorn)
+               os=-riscix1.2
+               ;;
+       arm*-rebel)
+               os=-linux
+               ;;
+       arm*-semi)
+               os=-aout
+               ;;
+    c4x-* | tic4x-*)
+        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
+               # This also exists in the configure program, but was not the
+               # default.
+               # os=-sunos4
+               ;;
+       m68*-cisco)
+               os=-aout
+               ;;
+       mips*-cisco)
+               os=-elf
+               ;;
+       mips*-*)
+               os=-elf
+               ;;
+       or32-*)
+               os=-coff
+               ;;
+       *-tti)  # must be before sparc entry or we get the wrong os.
+               os=-sysv3
+               ;;
+       sparc-* | *-sun)
+               os=-sunos4.1.1
+               ;;
+       *-be)
+               os=-beos
+               ;;
+       *-ibm)
+               os=-aix
+               ;;
+       *-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
+                               ;;
+                       -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 0
+
+# 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/configure b/configure
new file mode 100755 (executable)
index 0000000..1dac5f1
--- /dev/null
+++ b/configure
@@ -0,0 +1,23089 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.59.
+#
+# Copyright (C) 2003 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 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+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; 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
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)$' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+         /^X\/\(\/\/\)$/{ s//\1/; q; }
+         /^X\/\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# 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
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  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
+
+       ;;
+  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
+    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+        case $as_dir in
+        /*)
+          if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+            $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+            $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+            CONFIG_SHELL=$as_dir/$as_base
+            export CONFIG_SHELL
+            exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+          fi;;
+        esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # 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 sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='     ' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# 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'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS="  $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
+  ;;
+esac
+
+echo=${ECHO-echo}
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell.
+  exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+
+if test -z "$ECHO"; then
+if test "X${echo_test_string+set}" != Xset; then
+# find a string as large as possible, as long as the shell can cope with it
+  for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
+       echo_test_string="`eval $cmd`" &&
+       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
+    then
+      break
+    fi
+  done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+   test "X$echo_testing_string" = "X$echo_test_string"; then
+  :
+else
+  # The Solaris, AIX, and Digital Unix default echo programs unquote
+  # backslashes.  This makes it impossible to quote backslashes using
+  #   echo "$something" | sed 's/\\/\\\\/g'
+  #
+  # So, first we look for a working echo in the user's PATH.
+
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for dir in $PATH /usr/ucb; do
+    IFS="$lt_save_ifs"
+    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      echo="$dir/echo"
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  if test "X$echo" = Xecho; then
+    # We didn't find a better echo, so look for alternatives.
+    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      # This shell has a builtin print -r that does the trick.
+      echo='print -r'
+    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+        test "X$CONFIG_SHELL" != X/bin/ksh; then
+      # If we have ksh, try running configure again with it.
+      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+      export ORIGINAL_CONFIG_SHELL
+      CONFIG_SHELL=/bin/ksh
+      export CONFIG_SHELL
+      exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
+    else
+      # Try using printf.
+      echo='printf %s\n'
+      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+        echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+        test "X$echo_testing_string" = "X$echo_test_string"; then
+       # Cool, printf works
+       :
+      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+          test "X$echo_testing_string" = 'X\t' &&
+          echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+          test "X$echo_testing_string" = "X$echo_test_string"; then
+       CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+       export CONFIG_SHELL
+       SHELL="$CONFIG_SHELL"
+       export SHELL
+       echo="$CONFIG_SHELL $0 --fallback-echo"
+      elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+          test "X$echo_testing_string" = 'X\t' &&
+          echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+          test "X$echo_testing_string" = "X$echo_test_string"; then
+       echo="$CONFIG_SHELL $0 --fallback-echo"
+      else
+       # maybe with a smaller string...
+       prev=:
+
+       for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+         if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
+         then
+           break
+         fi
+         prev="$cmd"
+       done
+
+       if test "$prev" != 'sed 50q "$0"'; then
+         echo_test_string=`eval $prev`
+         export echo_test_string
+         exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+       else
+         # Oops.  We lost completely, so just stick with echo.
+         echo=echo
+       fi
+      fi
+    fi
+  fi
+fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+ECHO=$echo
+if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+   ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+fi
+
+
+
+
+tagnames=${tagnames+${tagnames},}CXX
+
+tagnames=${tagnames+${tagnames},}F77
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete.  It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="Makefile.am"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL PKG_CONFIG OUTO_CFLAGS OUTO_LIBS GTK_CFLAGS GTK_LIBS GTK_VERSION DBUS_CFLAGS DBUS_LIBS ESD_CFLAGS ESD_LIBS GNOME_VFS_CFLAGS GNOME_VFS_LIBS GCONF_CFLAGS GCONF_LIBS ALL_LINGUAS USE_NLS MSGFMT GMSGFMT XGETTEXT CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLLIBS PO_IN_DATADIR_TRUE PO_IN_DATADIR_FALSE POFILES POSUB MKINSTALLDIRS GTKDOC ENABLE_GTK_DOC_TRUE ENABLE_GTK_DOC_FALSE DOXYGEN_FOUND HAVE_DOXYGEN_TRUE HAVE_DOXYGEN_FALSE docdir localedir outomoduledir HTML_DIR LIBOBJS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# 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.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+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
+
+  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_option in
+
+  -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 | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval "enable_$ac_feature=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_$ac_feature='$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 ;;
+
+  -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 ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    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 ;;
+
+  -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_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_$ac_package='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    eval "with_$ac_package=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 ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+    eval "$ac_envvar='$ac_optarg'"
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      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'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+             localstatedir libdir includedir oldincludedir infodir mandir
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+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
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  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
+
+
+# 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 its parent.
+  ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$0" : 'X\(//\)[^/]' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+    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
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+   { (exit 1); exit 1; }; }
+  else
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+  fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+   { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+ac_env_CXX_set=${CXX+set}
+ac_env_CXX_value=$CXX
+ac_cv_env_CXX_set=${CXX+set}
+ac_cv_env_CXX_value=$CXX
+ac_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_env_CXXFLAGS_value=$CXXFLAGS
+ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_cv_env_CXXFLAGS_value=$CXXFLAGS
+ac_env_CXXCPP_set=${CXXCPP+set}
+ac_env_CXXCPP_value=$CXXCPP
+ac_cv_env_CXXCPP_set=${CXXCPP+set}
+ac_cv_env_CXXCPP_value=$CXXCPP
+ac_env_F77_set=${F77+set}
+ac_env_F77_value=$F77
+ac_cv_env_F77_set=${F77+set}
+ac_cv_env_F77_value=$F77
+ac_env_FFLAGS_set=${FFLAGS+set}
+ac_env_FFLAGS_value=$FFLAGS
+ac_cv_env_FFLAGS_set=${FFLAGS+set}
+ac_cv_env_FFLAGS_value=$FFLAGS
+
+#
+# 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 this package 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 \`..']
+
+_ACEOF
+
+  cat <<_ACEOF
+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]
+  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
+  --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]
+  --infodir=DIR          info documentation [PREFIX/info]
+  --mandir=DIR           man documentation [PREFIX/man]
+_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
+
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --disable-dependency-tracking Speeds up one-time builds
+  --enable-dependency-tracking  Do not reject slow dependency extractors
+  --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)
+  --enable-gtk-doc        use gtk-doc to build documenta
+tion default=yes
+ --with-doc-dir=PATH path to installed docs
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-pic              try to use only PIC/non-PIC objects [default=use
+                          both]
+  --with-tags[=TAGS]
+                          include additional configurations [automatic]
+  --with-html-dir=PATH    path to installed docs
+
+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>
+  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
+              headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+  CXXCPP      C++ preprocessor
+  F77         Fortran 77 compiler command
+  FFLAGS      Fortran 77 compiler flags
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  ac_popdir=`pwd`
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d $ac_dir || continue
+    ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+    cd $ac_dir
+    # Check for guested configure; otherwise get Cygnus style 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
+    elif test -f $ac_srcdir/configure.ac ||
+          test -f $ac_srcdir/configure.in; then
+      echo
+      $ac_configure --help
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi
+    cd "$ac_popdir"
+  done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+  cat <<\_ACEOF
+
+Copyright (C) 2003 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 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+{
+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`
+hostinfo               = `(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=.
+  echo "PATH: $as_dir"
+done
+
+} >&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_sep=
+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=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$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
+      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+      # Get rid of the leading space.
+      ac_sep=" "
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export 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: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+{
+  (set) 2>&1 |
+    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      sed -n \
+       "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+      ;;
+    *)
+      sed -n \
+       "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+}
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=$`echo $ac_var`
+      echo "$ac_var='"'"'$ac_val'"'"'"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+       eval ac_val=$`echo $ac_var`
+       echo "$ac_var='"'"'$ac_val'"'"'"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      sed "/^$/d" confdefs.h | sort
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core &&
+  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+     ' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >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
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  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.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . $cache_file;;
+      *)                      . ./$cache_file;;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+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 `(set) 2>&1 |
+              sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; 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,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+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
+       { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+       { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+       { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+       ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *" "*|*"   "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=$ac_var=`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.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+am__api_version="1.7"
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; 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
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# 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.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_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
+           ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+           break 3
+         fi
+       fi
+      done
+    done
+    ;;
+esac
+done
+
+
+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.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL=$ac_install_sh
+  fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$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'
+
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# 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 (
+   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
+   rm -f conftest.file
+   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".
+      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+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 $.  echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.make <<\_ACEOF
+all:
+       @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+  SET_MAKE=
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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
+
+ # test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
+  { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+   { (exit 1); exit 1; }; }
+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=hildon-libs
+ VERSION=0.9.6
+
+
+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"}
+
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# 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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  STRIP=$ac_ct_STRIP
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+
+
+
+          ac_config_headers="$ac_config_headers config.h"
+
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+   { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+  ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+  ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+
+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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_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"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+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
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl
+  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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CC" && break
+done
+
+  CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out 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.
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+  (eval $ac_link_default) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Find the output, starting from the most likely.  This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+       ;;
+    conftest.$ac_ext )
+       # This is the source file.
+       ;;
+    [ab].out )
+       # We found the default executable, but exeext='' is most
+       # certainly right.
+       break;;
+    *.* )
+       ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+       # FIXME: I believe we export ac_cv_exeext for Libtool,
+       # but it would be cool to find out if it's true.  Does anybody
+       # maintain Libtool? --akim.
+       export ac_cv_exeext
+       break;;
+    * )
+       break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+       cross_compiling=yes
+    else
+       { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; 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 | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+         export ac_cv_exeext
+         break;;
+    * ) break;;
+  esac
+done
+else
+  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$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
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* 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 -std1 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 -std1.  */
+int osf4_cc_array ['\x00' == 0 ? 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
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX                  -qlanglvl=ansi
+# Ultrix and OSF/1     -std1
+# HP-UX 10.20 and later        -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4                 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+  x|xno)
+    echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+  *)
+    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+    CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C.  Since we use `exit',
+# in C++ we need to declare it.  In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+  choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  for ac_declaration in \
+   '' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f 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
+DEPDIR="${am__leading_dot}deps"
+
+          ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+
+
+echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking or --disable-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='\'
+fi
+
+
+if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+
+
+depcc="$CC"   am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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'.
+  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
+  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
+      : > sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    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
+      ;;
+    none) break ;;
+    esac
+    # 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.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} 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
+      # (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored.
+      if grep 'ignoring option' 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
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$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
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f 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
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+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
+
+# 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.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_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
+           ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+           break 3
+         fi
+       fi
+      done
+    done
+    ;;
+esac
+done
+
+
+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.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL=$ac_install_sh
+  fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$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'
+
+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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$AWK" && break
+done
+
+# Check whether --enable-shared or --disable-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 or --disable-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 --enable-fast-install or --disable-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;
+
+echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
+if test "${lt_cv_path_SED+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # 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
+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 && break
+  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
+
+fi
+
+echo "$as_me:$LINENO: result: $SED" >&5
+echo "${ECHO_T}$SED" >&6
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+
+# Check whether --with-gnu-ld or --without-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.
+  echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&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
+  echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
+else
+  echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
+fi
+if test "${lt_cv_path_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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 GNU ld's 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
+  echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # I'd rather use --version here, but apparently some GNU ld's 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
+echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
+echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
+if test "${lt_cv_ld_reload_flag+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_ld_reload_flag='-r'
+fi
+echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+echo "${ECHO_T}$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'
+
+echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
+echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
+if test "${lt_cv_path_NM+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    tmp_nm="$ac_dir/${ac_tool_prefix}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"
+  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi
+fi
+echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
+echo "${ECHO_T}$lt_cv_path_NM" >&6
+NM="$lt_cv_path_NM"
+
+echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6
+fi
+
+echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
+echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6
+if test "${lt_cv_deplibs_check_method+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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
+aix4* | aix5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi4*)
+  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'.
+  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | kfreebsd*-gnu)
+  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)/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
+  ;;
+
+gnu*)
+  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]) 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
+  ;;
+
+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 Linux ELF.
+linux*)
+  case $host_cpu in
+  alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*)
+    lt_cv_deplibs_check_method=pass_all ;;
+  *)
+    # glibc up to 2.1.1 does not perform some relocations on ARM
+    # this will be overridden with pass_all, but let us keep it just in case
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
+  esac
+  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+nto-qnx*)
+  lt_cv_deplibs_check_method=unknown
+  ;;
+
+openbsd*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
+  else
+    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sco3.2v5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  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
+    ;;
+  esac
+  ;;
+
+sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
+echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
+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 no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check whether --enable-libtool-lock or --disable-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:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; 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 3958 "configure"' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; 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-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case "`/usr/bin/file conftest.o`" in
+    *32-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_i386"
+          ;;
+        ppc64-*linux*|powerpc64-*linux*)
+          LD="${LD-ld} -m elf32ppclinux"
+          ;;
+        s390x-*linux*)
+          LD="${LD-ld} -m elf_s390"
+          ;;
+        sparc64-*linux*)
+          LD="${LD-ld} -m elf32_sparc"
+          ;;
+      esac
+      ;;
+    *64-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        ppc*-*linux*|powerpc*-*linux*)
+          LD="${LD-ld} -m elf64ppc"
+          ;;
+        s390*-*linux*)
+          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"
+  echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
+echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
+if test "${lt_cv_cc_needs_belf+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  lt_cv_cc_needs_belf=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+lt_cv_cc_needs_belf=no
+fi
+rm -f 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
+echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
+echo "${ECHO_T}$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
+  ;;
+
+esac
+
+need_locks="$enable_libtool_lock"
+
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f 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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.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))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+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=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+for ac_header in dlfcn.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CXX" && break
+done
+test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
+
+  CXX=$ac_ct_CXX
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cxx_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+for ac_declaration in \
+   '' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+depcc="$CXX"  am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  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
+      : > sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    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
+      ;;
+    none) break ;;
+    esac
+    # 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.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} 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
+      # (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored.
+      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+
+
+if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+fi
+
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
+echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
+if test -z "$CXXCPP"; then
+  if test "${ac_cv_prog_CXXCPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CXXCPP needs to be expanded
+    for CXXCPP in "$CXX -E" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+  CXXCPP=$ac_cv_prog_CXXCPP
+else
+  ac_cv_prog_CXXCPP=$CXXCPP
+fi
+echo "$as_me:$LINENO: result: $CXXCPP" >&5
+echo "${ECHO_T}$CXXCPP" >&6
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
+  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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$F77"; then
+  ac_cv_prog_F77="$F77" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+F77=$ac_cv_prog_F77
+if test -n "$F77"; then
+  echo "$as_me:$LINENO: result: $F77" >&5
+echo "${ECHO_T}$F77" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$F77" && break
+  done
+fi
+if test -z "$F77"; then
+  ac_ct_F77=$F77
+  for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_F77"; then
+  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_F77="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_F77=$ac_cv_prog_ac_ct_F77
+if test -n "$ac_ct_F77"; then
+  echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
+echo "${ECHO_T}$ac_ct_F77" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_F77" && break
+done
+
+  F77=$ac_ct_F77
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:5281:" \
+     "checking for Fortran 77 compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+rm -f a.out
+
+# If we don't use `.F' as extension, the preprocessor is not run on the
+# input file.  (Note that this only needs to work for GNU compilers.)
+ac_save_ext=$ac_ext
+ac_ext=F
+echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6
+if test "${ac_cv_f77_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+      program main
+#ifndef __GNUC__
+       choke me
+#endif
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_f77_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_f77_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6
+ac_ext=$ac_save_ext
+ac_test_FFLAGS=${FFLAGS+set}
+ac_save_FFLAGS=$FFLAGS
+FFLAGS=
+echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
+echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_f77_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  FFLAGS=-g
+cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_f77_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_f77_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_f77_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
+echo "${ECHO_T}$ac_cv_prog_f77_g" >&6
+if test "$ac_test_FFLAGS" = set; then
+  FFLAGS=$ac_save_FFLAGS
+elif test $ac_cv_prog_f77_g = yes; then
+  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+    FFLAGS="-g -O2"
+  else
+    FFLAGS="-g"
+  fi
+else
+  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+    FFLAGS="-O2"
+  else
+    FFLAGS=
+  fi
+fi
+
+G77=`test $ac_compiler_gnu = yes && echo yes`
+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
+
+
+
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+
+# find the maximum length of command line arguments
+echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
+echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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*)
+    # 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;
+    ;;
+
+  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;
+    ;;
+
+ *)
+    # 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"`$CONFIG_SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
+              = "XX$teststring") >/dev/null 2>&1 &&
+           new_result=`expr "X$teststring" : ".*" 2>&1` &&
+           lt_cv_sys_max_cmd_len=$new_result &&
+           test $i != 17 # 1/2 MB should be enough
+    do
+      i=`expr $i + 1`
+      teststring=$teststring$teststring
+    done
+    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`
+    ;;
+  esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+  echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
+echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
+else
+  echo "$as_me:$LINENO: result: none" >&5
+echo "${ECHO_T}none" >&6
+fi
+
+
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
+echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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]*\)'
+
+# Transform the above into a raw symbol and a C symbol.
+symxfrm='\1 \2\3 \3'
+
+# Transform an extracted symbol line into a proper C declaration
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[BCDT]'
+  ;;
+cygwin* | mingw* | pw32*)
+  symcode='[ABCDGISTW]'
+  ;;
+hpux*) # Its linker distinguishes data from code symbols
+  if test "$host_cpu" = ia64; then
+    symcode='[ABCDEGRST]'
+  fi
+  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  ;;
+irix* | nonstopux*)
+  symcode='[BCDEGRST]'
+  ;;
+osf*)
+  symcode='[BCDEGQRST]'
+  ;;
+solaris* | sysv5*)
+  symcode='[BDRT]'
+  ;;
+sysv4)
+  symcode='[DFNSTU]'
+  ;;
+esac
+
+# 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
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Write the raw and C identifiers.
+  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[      ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+EOF
+
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if { (eval echo "$as_me:$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=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && 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 <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+         # Now generate the symbol file.
+         eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+
+         cat <<EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+  const char *name;
+  lt_ptr_t address;
+}
+lt_preloaded_symbols[] =
+{
+EOF
+         $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
+         cat <<\EOF >> conftest.$ac_ext
+  {0, (lt_ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+         # Now try linking the two files.
+         mv conftest.$ac_objext conftstm.$ac_objext
+         lt_save_LIBS="$LIBS"
+         lt_save_CFLAGS="$CFLAGS"
+         LIBS="conftstm.$ac_objext"
+         CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+         if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext}; then
+           pipe_works=yes
+         fi
+         LIBS="$lt_save_LIBS"
+         CFLAGS="$lt_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 -f 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
+  echo "$as_me:$LINENO: result: failed" >&5
+echo "${ECHO_T}failed" >&6
+else
+  echo "$as_me:$LINENO: result: ok" >&5
+echo "${ECHO_T}ok" >&6
+fi
+
+echo "$as_me:$LINENO: checking for objdir" >&5
+echo $ECHO_N "checking for objdir... $ECHO_C" >&6
+if test "${lt_cv_objdir+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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
+echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
+echo "${ECHO_T}$lt_cv_objdir" >&6
+objdir=$lt_cv_objdir
+
+
+
+
+
+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
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e s/^X//'
+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 avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Constants:
+rm="rm -f"
+
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+libext=a
+ltmain="$ac_aux_dir/ltmain.sh"
+ofile="$default_ofile"
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AR="${ac_tool_prefix}ar"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+  ac_ct_AR=$AR
+  # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_AR="ar"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  AR=$ac_ct_AR
+else
+  AR="$ac_cv_prog_AR"
+fi
+
+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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  RANLIB=$ac_ct_RANLIB
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  STRIP=$ac_ct_STRIP
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+test -z "$AS" && AS=as
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$LD" && LD=ld
+test -z "$LN_S" && LN_S="ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+test -z "$NM" && NM=nm
+test -z "$SED" && SED=sed
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$RANLIB" && RANLIB=:
+test -z "$STRIP" && STRIP=:
+test -z "$ac_objext" && ac_objext=o
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
+    ;;
+  *)
+    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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 <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+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
+  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    echo "$as_me:$LINENO: checking for file" >&5
+echo $ECHO_N "checking for file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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 <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+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
+  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  else
+    MAGIC_CMD=:
+  fi
+fi
+
+  fi
+  ;;
+esac
+
+enable_dlopen=no
+enable_win32_dll=no
+
+# Check whether --enable-libtool-lock or --disable-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
+
+
+# Check whether --with-pic or --without-pic was given.
+if test "${with_pic+set}" = set; then
+  withval="$with_pic"
+  pic_mode="$withval"
+else
+  pic_mode=default
+fi;
+test -z "$pic_mode" && pic_mode=default
+
+# Use C for the default configuration in the libtool script
+tagname=
+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;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}\n'
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+#
+# Check for any special shared library compilation flags.
+#
+lt_prog_cc_shlib=
+if test "$GCC" = no; then
+  case $host_os in
+  sco3.2v5*)
+    lt_prog_cc_shlib='-belf'
+    ;;
+  esac
+fi
+if test -n "$lt_prog_cc_shlib"; then
+  { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5
+echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;}
+  if echo "$old_CC $old_CFLAGS " | grep "[     ]$lt_prog_cc_shlib[     ]" >/dev/null; then :
+  else
+    { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
+echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
+    lt_cv_prog_cc_can_build_shared=no
+  fi
+fi
+
+
+#
+# Check to make sure the static flag actually works.
+#
+echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6
+if test "${lt_prog_compiler_static_works+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_static_works=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
+   printf "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The compiler 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
+     else
+       lt_prog_compiler_static_works=yes
+     fi
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
+
+if test x"$lt_prog_compiler_static_works" = xyes; then
+    :
+else
+    lt_prog_compiler_static=
+fi
+
+
+
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+
+echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_rtti_exceptions=no
+  ac_outfile=conftest.$ac_objext
+   printf "$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}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:6313: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:6317: \$? = $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
+     if test ! -s conftest.err; then
+       lt_cv_prog_compiler_rtti_exceptions=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$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=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+
+  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*)
+      # 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'
+      ;;
+
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | pw32* | os2*)
+      # 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'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic='-fno-common'
+      ;;
+
+    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
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       lt_prog_compiler_pic=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # 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='-fPIC'
+       ;;
+      esac
+      ;;
+
+    *)
+      lt_prog_compiler_pic='-fPIC'
+      ;;
+    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* | pw32* | os2*)
+      # 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'
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    linux*)
+      case $CC in
+      icc* | ecc*)
+       lt_prog_compiler_wl='-Wl,'
+       lt_prog_compiler_pic='-KPIC'
+       lt_prog_compiler_static='-static'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static='-non_shared'
+        ;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    sco3.2v5*)
+      lt_prog_compiler_pic='-Kpic'
+      lt_prog_compiler_static='-dn'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl='-Qoption ld '
+      lt_prog_compiler_pic='-PIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+      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
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic='-pic'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared=no
+      ;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic" >&6
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+
+echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_pic_works=no
+  ac_outfile=conftest.$ac_objext
+   printf "$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}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:6546: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:6550: \$? = $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
+     if test ! -s conftest.err; then
+       lt_prog_compiler_pic_works=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
+
+if test x"$lt_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
+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
+
+echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$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}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:6606: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:6610: \$? = $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
+     if test ! -s out/conftest.err; then
+       lt_cv_prog_compiler_c_o=yes
+     fi
+   fi
+   chmod u+w .
+   $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 ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+echo "${ECHO_T}$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
+  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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
+  echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+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
+
+echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+  runpath_var=
+  allow_undefined_flag=
+  enable_shared_with_static_runtimes=no
+  archive_cmds=
+  archive_expsym_cmds=
+  old_archive_From_new_cmds=
+  old_archive_from_expsyms_cmds=
+  export_dynamic_flag_spec=
+  whole_archive_flag_spec=
+  thread_safe_flag_spec=
+  hardcode_libdir_flag_spec=
+  hardcode_libdir_flag_spec_ld=
+  hardcode_libdir_separator=
+  hardcode_direct=no
+  hardcode_minus_L=no
+  hardcode_shlibpath_var=unsupported
+  link_all_deplibs=unknown
+  hardcode_automatic=no
+  module_cmds=
+  module_expsym_cmds=
+  always_export_symbols=no
+  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # 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_"
+  # 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.
+  extract_expsyms_cmds=
+
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # 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
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+       ld_shlibs=no
+       cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, 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 modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      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
+
+      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      ld_shlibs=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       allow_undefined_flag=unsupported
+       # Joseph Beckenbach <jrb3@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*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec='-L$libdir'
+      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 '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$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}--image-base=0x10000000  ${wl}--out-implib,$lib'
+      else
+       ld_shlibs=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+       wlarc=
+      else
+       archive_cmds='$CC -shared $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'
+      fi
+      ;;
+
+    solaris* | sysv5*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+       ld_shlibs=no
+       cat <<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.
+
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       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
+      ;;
+
+    sunos4*)
+      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+  linux*)
+    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_cmds="$tmp_archive_cmds"
+      supports_anon_versioning=no
+      case `$LD -v 2>/dev/null` in
+        *\ 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
+      if test $supports_anon_versioning = yes; 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 -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+      else
+        archive_expsym_cmds="$tmp_archive_cmds"
+      fi
+    else
+      ld_shlibs=no
+    fi
+    ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       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
+
+    if test "$ld_shlibs" = yes; then
+      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
+    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 "$link_static_flag"; then
+       # Neither direct hardcoding nor static linking is supported with a
+       # broken collect2.
+       hardcode_direct=unsupported
+      fi
+      ;;
+
+    aix4* | aix5*)
+      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
+       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")) && (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].*|aix5*)
+         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_libdir_separator=':'
+      link_all_deplibs=yes
+
+      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
+         hardcode_direct=yes
+         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'
+      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
+
+      # 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.
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+       archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${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 $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+       else
+        # Determine the default libpath from the value encoded in an empty executable.
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; 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'
+         # -bexpall does not export symbols beginning with underscore (_)
+         always_export_symbols=yes
+         # Exported symbols can be pulled into shared objects from archives
+         whole_archive_flag_spec=' '
+         archive_cmds_need_lc=yes
+         # This is similar to how AIX traditionally builds it's shared libraries.
+         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+       fi
+      fi
+      ;;
+
+    amigaos*)
+      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
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs=no
+      ;;
+
+    bsdi4*)
+      export_dynamic_flag_spec=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec=' '
+      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 `echo "$deplibs" | $SED -e '\''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'
+      fix_srcfile_path='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes=yes
+      ;;
+
+    darwin* | rhapsody*)
+    if test "$GXX" = yes ; then
+      archive_cmds_need_lc=no
+      case "$host_os" in
+      rhapsody* | darwin1.[012])
+       allow_undefined_flag='-undefined suppress'
+       ;;
+      *) # Darwin 1.3 on
+      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+       allow_undefined_flag='-flat_namespace -undefined suppress'
+      else
+        case ${MACOSX_DEPLOYMENT_TARGET} in
+          10.[012])
+            allow_undefined_flag='-flat_namespace -undefined suppress'
+            ;;
+          10.*)
+            allow_undefined_flag='-undefined dynamic_lookup'
+            ;;
+        esac
+      fi
+       ;;
+      esac
+       lt_int_apple_cc_single_mod=no
+       output_verbose_link_cmd='echo'
+       if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
+         lt_int_apple_cc_single_mod=yes
+       fi
+       if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+         archive_cmds='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+       else
+        archive_cmds='$CC -r ${wl}-bind_at_load -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'
+      fi
+      module_cmds='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+          archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+        else
+          archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+        fi
+          module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      hardcode_direct=no
+      hardcode_automatic=yes
+      hardcode_shlibpath_var=unsupported
+      whole_archive_flag_spec='-all_load $convenience'
+      link_all_deplibs=yes
+    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
+      ;;
+
+    freebsd1*)
+      ld_shlibs=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* | kfreebsd*-gnu)
+      archive_cmds='$CC -shared -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 -fPIC ${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* | hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+       case "$host_cpu" in
+       hppa*64*|ia64*)
+         archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+         archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       esac
+      else
+       case "$host_cpu" in
+       hppa*64*|ia64*)
+         archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+         ;;
+       *)
+         archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+         ;;
+       esac
+      fi
+      if test "$with_gnu_ld" = no; then
+       case "$host_cpu" in
+       hppa*64*)
+         hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+         hardcode_libdir_flag_spec_ld='+b $libdir'
+         hardcode_libdir_separator=:
+         hardcode_direct=no
+         hardcode_shlibpath_var=no
+         ;;
+       ia64*)
+         hardcode_libdir_flag_spec='-L$libdir'
+         hardcode_direct=no
+         hardcode_shlibpath_var=no
+
+         # hardcode_minus_L: Not really in the search PATH,
+         # but as the default location of the library.
+         hardcode_minus_L=yes
+         ;;
+       *)
+         hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+         hardcode_libdir_separator=:
+         hardcode_direct=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 $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+       archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       hardcode_libdir_flag_spec_ld='-rpath $libdir'
+      fi
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      link_all_deplibs=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    newsos6)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_shlibpath_var=no
+      ;;
+
+    openbsd*)
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      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'
+       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
+      ;;
+
+    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" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+       allow_undefined_flag=' -expect_unresolved \*'
+       archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      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} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${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='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -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; echo "-hidden">> $lib.exp~
+       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+
+       # Both c and cxx compiler support -rpath directly
+       hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      hardcode_libdir_separator=:
+      ;;
+
+    sco3.2v5*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var=no
+      export_dynamic_flag_spec='${wl}-Bexport'
+      runpath_var=LD_RUN_PATH
+      hardcode_runpath_var=yes
+      ;;
+
+    solaris*)
+      no_undefined_flag=' -z text'
+      if test "$GCC" = yes; then
+       archive_cmds='$CC -shared ${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 ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+       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'
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_shlibpath_var=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
+      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.2uw2*)
+      archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_minus_L=no
+      hardcode_shlibpath_var=no
+      hardcode_runpath_var=yes
+      runpath_var=LD_RUN_PATH
+      ;;
+
+   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
+      no_undefined_flag='${wl}-z ${wl}text'
+      if test "$GCC" = yes; then
+       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv5*)
+      no_undefined_flag=' -z text'
+      # $CC -shared without GNU ld will not create a library from C++
+      # object files and a static libstdc++, better avoid it by now
+      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'
+      hardcode_libdir_flag_spec=
+      hardcode_shlibpath_var=no
+      runpath_var='LD_RUN_PATH'
+      ;;
+
+    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
+  fi
+
+echo "$as_me:$LINENO: result: $ld_shlibs" >&5
+echo "${ECHO_T}$ld_shlibs" >&6
+test "$ld_shlibs" = 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
+
+#
+# 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.
+      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl
+        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:$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=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+         archive_cmds_need_lc=no
+        else
+         archive_cmds_need_lc=yes
+        fi
+        allow_undefined_flag=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
+echo "${ECHO_T}$archive_cmds_need_lc" >&6
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # 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.
+    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
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+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
+  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'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  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*)
+  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=`$echo "X$lib" | $Xsed -e '\''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'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi4*)
+  version_type=linux
+  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*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    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'
+    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="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        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
+      ;;
+    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
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # 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}${versuffix}$shared_ext ${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)'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  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
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+kfreebsd*-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='GNU ld.so'
+  ;;
+
+freebsd*)
+  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+  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
+    ;;
+  *) # from 3.2 on
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+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
+  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'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+       if test "$lt_cv_prog_gnu_ld" = yes; then
+               version_type=linux
+       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 Linux ELF.
+linux*)
+  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'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # 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=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | 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'
+  ;;
+
+knetbsd*-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='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  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=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=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=yes
+  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"
+  ;;
+
+sco3.2v5*)
+  version_type=osf
+  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
+  ;;
+
+solaris*)
+  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=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.2uw2* | sysv4.3* | sysv5*)
+  version_type=linux
+  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
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      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
+    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
+  ;;
+
+uts4*)
+  version_type=linux
+  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
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" || \
+   test -n "$runpath_var " || \
+   test "X$hardcode_automatic"="Xyes" ; then
+
+  # We can hardcode non-existant 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_AC_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
+echo "$as_me:$LINENO: result: $hardcode_action" >&5
+echo "${ECHO_T}$hardcode_action" >&6
+
+if test "$hardcode_action" = relink; 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
+
+striplib=
+old_striplib=
+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&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"
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}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"
+         echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+       else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+       ;;
+   *)
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+    ;;
+  esac
+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*)
+    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
+    echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; 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
+
+   ;;
+
+  *)
+    echo "$as_me:$LINENO: checking for shl_load" >&5
+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
+if test "${ac_cv_func_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define shl_load innocuous_shl_load
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shl_load (); 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 shl_load
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+/* 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_shl_load) || defined (__stub___shl_load)
+choke me
+#else
+char (*f) () = shl_load;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != shl_load;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+echo "${ECHO_T}$ac_cv_func_shl_load" >&6
+if test $ac_cv_func_shl_load = yes; then
+  lt_cv_dlopen="shl_load"
+else
+  echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+int
+main ()
+{
+shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dld_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+if test $ac_cv_lib_dld_shl_load = yes; then
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
+else
+  echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+if test "${ac_cv_func_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define dlopen innocuous_dlopen
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dlopen (); 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 dlopen
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+/* 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_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+char (*f) () = dlopen;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != dlopen;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6
+if test $ac_cv_func_dlopen = yes; then
+  lt_cv_dlopen="dlopen"
+else
+  echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+  echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_svld_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_svld_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
+if test $ac_cv_lib_svld_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+  echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dld_link ();
+int
+main ()
+{
+dld_link ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dld_dld_link=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_dld_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
+if test $ac_cv_lib_dld_dld_link = yes; then
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
+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"
+    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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 <<EOF
+#line 8781 "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
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=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;
+      /* dlclose (self); */
+    }
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) 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_unknown|x*) lt_cv_dlopen_self=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self" >&6
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      LDFLAGS="$LDFLAGS $link_static_flag"
+      echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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 <<EOF
+#line 8879 "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
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=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;
+      /* dlclose (self); */
+    }
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) 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_unknown|x*) lt_cv_dlopen_self_static=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self_static=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+echo "${ECHO_T}$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
+
+
+# Report which librarie types wil actually be built
+echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $can_build_shared" >&5
+echo "${ECHO_T}$can_build_shared" >&6
+
+echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&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
+  ;;
+
+aix4* | aix5*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
+  ;;
+  darwin* | rhapsody*)
+  if test "$GCC" = yes; then
+    archive_cmds_need_lc=no
+    case "$host_os" in
+    rhapsody* | darwin1.[012])
+      allow_undefined_flag='-undefined suppress'
+      ;;
+    *) # Darwin 1.3 on
+      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+       allow_undefined_flag='-flat_namespace -undefined suppress'
+      else
+        case ${MACOSX_DEPLOYMENT_TARGET} in
+          10.[012])
+            allow_undefined_flag='-flat_namespace -undefined suppress'
+            ;;
+          10.*)
+            allow_undefined_flag='-undefined dynamic_lookup'
+            ;;
+        esac
+      fi
+      ;;
+    esac
+    output_verbose_link_cmd='echo'
+    archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
+    module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+    archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    hardcode_direct=no
+    hardcode_automatic=yes
+    hardcode_shlibpath_var=unsupported
+    whole_archive_flag_spec='-all_load $convenience'
+    link_all_deplibs=yes
+  else
+    ld_shlibs=no
+  fi
+    ;;
+esac
+echo "$as_me:$LINENO: result: $enable_shared" >&5
+echo "${ECHO_T}$enable_shared" >&6
+
+echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+echo "$as_me:$LINENO: result: $enable_static" >&5
+echo "${ECHO_T}$enable_static" >&6
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # 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
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler \
+    CC \
+    LD \
+    lt_prog_compiler_wl \
+    lt_prog_compiler_pic \
+    lt_prog_compiler_static \
+    lt_prog_compiler_no_builtin_flag \
+    export_dynamic_flag_spec \
+    thread_safe_flag_spec \
+    whole_archive_flag_spec \
+    enable_shared_with_static_runtimes \
+    old_archive_cmds \
+    old_archive_from_new_cmds \
+    predep_objects \
+    postdep_objects \
+    predeps \
+    postdeps \
+    compiler_lib_search_path \
+    archive_cmds \
+    archive_expsym_cmds \
+    postinstall_cmds \
+    postuninstall_cmds \
+    old_archive_from_expsyms_cmds \
+    allow_undefined_flag \
+    no_undefined_flag \
+    export_symbols_cmds \
+    hardcode_libdir_flag_spec \
+    hardcode_libdir_flag_spec_ld \
+    hardcode_libdir_separator \
+    hardcode_automatic \
+    module_cmds \
+    module_expsym_cmds \
+    lt_cv_prog_compiler_c_o \
+    exclude_expsyms \
+    include_expsyms; do
+
+    case $var in
+    old_archive_cmds | \
+    old_archive_from_new_cmds | \
+    archive_cmds | \
+    archive_expsym_cmds | \
+    module_cmds | \
+    module_expsym_cmds | \
+    old_archive_from_expsyms_cmds | \
+    export_symbols_cmds | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="${ofile}T"
+  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+  $rm -f "$cfgfile"
+  { echo "$as_me:$LINENO: creating $ofile" >&5
+echo "$as_me: creating $ofile" >&6;}
+
+  cat <<__EOF__ >> "$cfgfile"
+#! $SHELL
+
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 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 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.
+
+# 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 s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+
+# The names of the tagged configurations supported by this script.
+available_tags=
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# 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
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Must we lock files when doing compilation ?
+need_locks=$lt_need_locks
+
+# 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
+
+# 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
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# 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
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec
+
+# Library versioning type.
+version_type=$version_type
+
+# 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
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# 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 and install a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path
+
+# 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
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# 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
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# 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
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# 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 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
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# 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
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path"
+
+# 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
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_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
+
+# ### END LIBTOOL CONFIG
+
+__EOF__
+
+
+  case $host_os in
+  aix3*)
+    cat <<\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
+EOF
+    ;;
+  esac
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" || \
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+
+# Check whether --with-tags or --without-tags was given.
+if test "${with_tags+set}" = set; then
+  withval="$with_tags"
+  tagnames="$withval"
+fi;
+
+if test -f "$ltmain" && test -n "$tagnames"; then
+  if test ! -f "${ofile}"; then
+    { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
+echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
+  fi
+
+  if test -z "$LTCC"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+    if test -z "$LTCC"; then
+      { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
+echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
+    else
+      { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
+echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
+    fi
+  fi
+
+  # Extract list of available tagged configurations in $ofile.
+  # Note that this assumes the entire list is on one line.
+  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+
+  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+  for tagname in $tagnames; do
+    IFS="$lt_save_ifs"
+    # Check whether tagname contains only valid characters
+    case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
+    "") ;;
+    *)  { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
+echo "$as_me: error: invalid tag name: $tagname" >&2;}
+   { (exit 1); exit 1; }; }
+       ;;
+    esac
+
+    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+    then
+      { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
+echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+
+    # Update the list of available tags.
+    if test -n "$tagname"; then
+      echo appending configuration tag \"$tagname\" to $ofile
+
+      case $tagname in
+      CXX)
+       if test -n "$CXX" && test "X$CXX" != "Xno"; then
+         ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+
+
+archive_cmds_need_lc_CXX=no
+allow_undefined_flag_CXX=
+always_export_symbols_CXX=no
+archive_expsym_cmds_CXX=
+export_dynamic_flag_spec_CXX=
+hardcode_direct_CXX=no
+hardcode_libdir_flag_spec_CXX=
+hardcode_libdir_flag_spec_ld_CXX=
+hardcode_libdir_separator_CXX=
+hardcode_minus_L_CXX=no
+hardcode_automatic_CXX=no
+module_cmds_CXX=
+module_expsym_cmds_CXX=
+link_all_deplibs_CXX=unknown
+old_archive_cmds_CXX=$old_archive_cmds
+no_undefined_flag_CXX=
+whole_archive_flag_spec_CXX=
+enable_shared_with_static_runtimes_CXX=no
+
+# Dependencies to place before and after the object being linked:
+predep_objects_CXX=
+postdep_objects_CXX=
+predeps_CXX=
+postdeps_CXX=
+compiler_lib_search_path_CXX=
+
+# Source file extension for C++ test sources.
+ac_ext=cc
+
+# Object file extension for compiled C++ test sources.
+objext=o
+objext_CXX=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int, char *) { return(0); }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+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
+  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
+  unset lt_cv_path_LD
+fi
+test -z "${LDCXX+set}" || LD=$LDCXX
+CC=${CXX-"c++"}
+compiler=$CC
+compiler_CXX=$CC
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+
+# We don't want -fno-exception wen compiling C++ code, so set the
+# no_builtin_flag separately
+if test "$GXX" = yes; then
+  lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+else
+  lt_prog_compiler_no_builtin_flag_CXX=
+fi
+
+if test "$GXX" = yes; then
+  # Set up default GNU C++ configuration
+
+
+# Check whether --with-gnu-ld or --without-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.
+  echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&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
+  echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
+else
+  echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
+fi
+if test "${lt_cv_path_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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 GNU ld's 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
+  echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # I'd rather use --version here, but apparently some GNU ld's 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
+echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+  # Check if GNU C++ uses GNU ld as the underlying linker, since the
+  # archiving commands below assume that GNU ld is being used.
+  if test "$with_gnu_ld" = yes; then
+    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+    hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+    #     investigate it a little bit more. (MM)
+    wlarc='${wl}'
+
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
+       grep 'no-whole-archive' > /dev/null; then
+      whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      whole_archive_flag_spec_CXX=
+    fi
+  else
+    with_gnu_ld=no
+    wlarc=
+
+    # A generic and very simple default shared library creation
+    # command for GNU C++ for the case where it uses the native
+    # linker, instead of GNU ld.  If possible, this setting should
+    # overridden to take advantage of the native linker features on
+    # the platform it is being used on.
+    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+  fi
+
+  # Commands to make compiler produce verbose output that lists
+  # what "hidden" libraries, object files and flags are used when
+  # linking a shared library.
+  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+else
+  GXX=no
+  with_gnu_ld=no
+  wlarc=
+fi
+
+# PORTME: fill in a description of your system's C++ link characteristics
+echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+ld_shlibs_CXX=yes
+case $host_os in
+  aix3*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  aix4* | aix5*)
+    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].*|aix5*)
+       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.
+
+    archive_cmds_CXX=''
+    hardcode_direct_CXX=yes
+    hardcode_libdir_separator_CXX=':'
+    link_all_deplibs_CXX=yes
+
+    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
+         hardcode_direct_CXX=yes
+       else
+         # We have old collect2
+         hardcode_direct_CXX=unsupported
+         # It fails to find uninstalled libraries when the uninstalled
+         # path is not listed in the libpath.  Setting hardcode_minus_L
+         # to unsupported forces relinking
+         hardcode_minus_L_CXX=yes
+         hardcode_libdir_flag_spec_CXX='-L$libdir'
+         hardcode_libdir_separator_CXX=
+       fi
+      esac
+      shared_flag='-shared'
+    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
+
+    # It seems that -bexpall does not export symbols beginning with
+    # underscore (_), so it is better to generate a list of symbols to export.
+    always_export_symbols_CXX=yes
+    if test "$aix_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_CXX='-berok'
+      # Determine the default libpath from the value encoded in an empty executable.
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+      hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+      archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+     else
+      if test "$host_cpu" = ia64; then
+       hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+       allow_undefined_flag_CXX="-z nodefs"
+       archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+      else
+       # Determine the default libpath from the value encoded in an empty executable.
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+       # Warning - without using the other run time loading flags,
+       # -berok will link without error, but may produce a broken library.
+       no_undefined_flag_CXX=' ${wl}-bernotok'
+       allow_undefined_flag_CXX=' ${wl}-berok'
+       # -bexpall does not export symbols beginning with underscore (_)
+       always_export_symbols_CXX=yes
+       # Exported symbols can be pulled into shared objects from archives
+       whole_archive_flag_spec_CXX=' '
+       archive_cmds_need_lc_CXX=yes
+       # This is similar to how AIX traditionally builds it's shared libraries.
+       archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+      fi
+    fi
+    ;;
+  chorus*)
+    case $cc_basename in
+      *)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+    esac
+    ;;
+
+  cygwin* | mingw* | pw32*)
+    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+    # as there is no search path for DLLs.
+    hardcode_libdir_flag_spec_CXX='-L$libdir'
+    allow_undefined_flag_CXX=unsupported
+    always_export_symbols_CXX=no
+    enable_shared_with_static_runtimes_CXX=yes
+
+    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+      archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+      # If the export-symbols file already is a .def file (1st line
+      # is EXPORTS), use it as is; otherwise, prepend...
+      archive_expsym_cmds_CXX='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}--image-base=0x10000000 ${wl}--out-implib,$lib'
+    else
+      ld_shlibs_CXX=no
+    fi
+  ;;
+
+  darwin* | rhapsody*)
+  if test "$GXX" = yes; then
+    archive_cmds_need_lc_CXX=no
+    case "$host_os" in
+    rhapsody* | darwin1.[012])
+      allow_undefined_flag_CXX='-undefined suppress'
+      ;;
+    *) # Darwin 1.3 on
+      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+       allow_undefined_flag_CXX='-flat_namespace -undefined suppress'
+      else
+        case ${MACOSX_DEPLOYMENT_TARGET} in
+          10.[012])
+            allow_undefined_flag_CXX='-flat_namespace -undefined suppress'
+            ;;
+          10.*)
+            allow_undefined_flag_CXX='-undefined dynamic_lookup'
+            ;;
+        esac
+      fi
+      ;;
+    esac
+    lt_int_apple_cc_single_mod=no
+    output_verbose_link_cmd='echo'
+    if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
+      lt_int_apple_cc_single_mod=yes
+    fi
+    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+      archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+    else
+      archive_cmds_CXX='$CC -r ${wl}-bind_at_load -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'
+    fi
+    module_cmds_CXX='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+
+    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+      archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    else
+      archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    fi
+    module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    hardcode_direct_CXX=no
+    hardcode_automatic_CXX=yes
+    hardcode_shlibpath_var_CXX=unsupported
+    whole_archive_flag_spec_CXX='-all_load $convenience'
+    link_all_deplibs_CXX=yes
+  else
+    ld_shlibs_CXX=no
+  fi
+    ;;
+
+  dgux*)
+    case $cc_basename in
+      ec++)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+      ghcx)
+       # Green Hills C++ Compiler
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+      *)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+    esac
+    ;;
+  freebsd12*)
+    # C++ shared libraries reported to be fairly broken before switch to ELF
+    ld_shlibs_CXX=no
+    ;;
+  freebsd-elf*)
+    archive_cmds_need_lc_CXX=no
+    ;;
+  freebsd* | kfreebsd*-gnu)
+    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+    # conventions
+    ld_shlibs_CXX=yes
+    ;;
+  gnu*)
+    ;;
+  hpux9*)
+    hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+    hardcode_libdir_separator_CXX=:
+    export_dynamic_flag_spec_CXX='${wl}-E'
+    hardcode_direct_CXX=yes
+    hardcode_minus_L_CXX=yes # Not in the search PATH,
+                               # but as the default
+                               # location of the library.
+
+    case $cc_basename in
+    CC)
+      # FIXME: insert proper C++ library support
+      ld_shlibs_CXX=no
+      ;;
+    aCC)
+      archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $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) | grep "-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+      ;;
+    *)
+      if test "$GXX" = yes; then
+        archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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
+        ld_shlibs_CXX=no
+      fi
+      ;;
+    esac
+    ;;
+  hpux10*|hpux11*)
+    if test $with_gnu_ld = no; then
+      case "$host_cpu" in
+      hppa*64*)
+       hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+       hardcode_libdir_flag_spec_ld_CXX='+b $libdir'
+       hardcode_libdir_separator_CXX=:
+        ;;
+      ia64*)
+       hardcode_libdir_flag_spec_CXX='-L$libdir'
+        ;;
+      *)
+       hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+       hardcode_libdir_separator_CXX=:
+       export_dynamic_flag_spec_CXX='${wl}-E'
+        ;;
+      esac
+    fi
+    case "$host_cpu" in
+    hppa*64*)
+      hardcode_direct_CXX=no
+      hardcode_shlibpath_var_CXX=no
+      ;;
+    ia64*)
+      hardcode_direct_CXX=no
+      hardcode_shlibpath_var_CXX=no
+      hardcode_minus_L_CXX=yes # Not in the search PATH,
+                                             # but as the default
+                                             # location of the library.
+      ;;
+    *)
+      hardcode_direct_CXX=yes
+      hardcode_minus_L_CXX=yes # Not in the search PATH,
+                                             # but as the default
+                                             # location of the library.
+      ;;
+    esac
+
+    case $cc_basename in
+      CC)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+      aCC)
+       case "$host_cpu" in
+       hppa*64*|ia64*)
+         archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+         ;;
+       *)
+         archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+         ;;
+       esac
+       # Commands to make compiler produce verbose output that lists
+       # what "hidden" libraries, object files and flags are used when
+       # linking a shared library.
+       #
+       # There doesn't appear to be a way to prevent this compiler from
+       # explicitly linking system object files so we need to strip them
+       # from the output so that they don't get included in the library
+       # dependencies.
+       output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+       ;;
+      *)
+       if test "$GXX" = yes; then
+         if test $with_gnu_ld = no; then
+           case "$host_cpu" in
+           ia64*|hppa*64*)
+             archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+             ;;
+           *)
+             archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+             ;;
+           esac
+         fi
+       else
+         # FIXME: insert proper C++ library support
+         ld_shlibs_CXX=no
+       fi
+       ;;
+    esac
+    ;;
+  irix5* | irix6*)
+    case $cc_basename in
+      CC)
+       # SGI C++
+       archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+
+       # Archives containing C++ object files must be created using
+       # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+       # necessary to make sure instantiated templates are included
+       # in the archive.
+       old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
+       ;;
+      *)
+       if test "$GXX" = yes; then
+         if test "$with_gnu_ld" = no; then
+           archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+         else
+           archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
+         fi
+       fi
+       link_all_deplibs_CXX=yes
+       ;;
+    esac
+    hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+    hardcode_libdir_separator_CXX=:
+    ;;
+  linux*)
+    case $cc_basename in
+      KCC)
+       # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+       # KCC will only create a shared library if the output file
+       # ends with ".so" (or ".sl" for HP-UX), so rename the library
+       # to its proper name (with version) after linking.
+       archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+       archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+       # Commands to make compiler produce verbose output that lists
+       # what "hidden" libraries, object files and flags are used when
+       # linking a shared library.
+       #
+       # There doesn't appear to be a way to prevent this compiler from
+       # explicitly linking system object files so we need to strip them
+       # from the output so that they don't get included in the library
+       # dependencies.
+       output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+       hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir'
+       export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+       # Archives containing C++ object files must be created using
+       # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+       old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+       ;;
+      icpc)
+       # Intel C++
+       with_gnu_ld=yes
+       archive_cmds_need_lc_CXX=no
+       archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+       export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+       whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+       ;;
+      cxx)
+       # Compaq C++
+       archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+       runpath_var=LD_RUN_PATH
+       hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+       hardcode_libdir_separator_CXX=:
+
+       # Commands to make compiler produce verbose output that lists
+       # what "hidden" libraries, object files and flags are used when
+       # linking a shared library.
+       #
+       # There doesn't appear to be a way to prevent this compiler from
+       # explicitly linking system object files so we need to strip them
+       # from the output so that they don't get included in the library
+       # dependencies.
+       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $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; echo $list'
+       ;;
+    esac
+    ;;
+  lynxos*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  m88k*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  mvs*)
+    case $cc_basename in
+      cxx)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+      *)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+    esac
+    ;;
+  netbsd*)
+    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+      archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+      wlarc=
+      hardcode_libdir_flag_spec_CXX='-R$libdir'
+      hardcode_direct_CXX=yes
+      hardcode_shlibpath_var_CXX=no
+    fi
+    # Workaround some broken pre-1.5 toolchains
+    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+    ;;
+  osf3*)
+    case $cc_basename in
+      KCC)
+       # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+       # KCC will only create a shared library if the output file
+       # ends with ".so" (or ".sl" for HP-UX), so rename the library
+       # to its proper name (with version) after linking.
+       archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+       hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+       hardcode_libdir_separator_CXX=:
+
+       # Archives containing C++ object files must be created using
+       # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+       old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+
+       ;;
+      RCC)
+       # Rational C++ 2.4.1
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+      cxx)
+       allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+       archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+
+       hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+       hardcode_libdir_separator_CXX=:
+
+       # Commands to make compiler produce verbose output that lists
+       # what "hidden" libraries, object files and flags are used when
+       # linking a shared library.
+       #
+       # 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=`echo $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; echo $list'
+       ;;
+      *)
+       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+         allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+         archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+         hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+         hardcode_libdir_separator_CXX=:
+
+         # Commands to make compiler produce verbose output that lists
+         # what "hidden" libraries, object files and flags are used when
+         # linking a shared library.
+         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+       else
+         # FIXME: insert proper C++ library support
+         ld_shlibs_CXX=no
+       fi
+       ;;
+    esac
+    ;;
+  osf4* | osf5*)
+    case $cc_basename in
+      KCC)
+       # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+       # KCC will only create a shared library if the output file
+       # ends with ".so" (or ".sl" for HP-UX), so rename the library
+       # to its proper name (with version) after linking.
+       archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+       hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+       hardcode_libdir_separator_CXX=:
+
+       # Archives containing C++ object files must be created using
+       # the KAI C++ compiler.
+       old_archive_cmds_CXX='$CC -o $oldlib $oldobjs'
+       ;;
+      RCC)
+       # Rational C++ 2.4.1
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+      cxx)
+       allow_undefined_flag_CXX=' -expect_unresolved \*'
+       archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+       archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+         echo "-hidden">> $lib.exp~
+         $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
+         $rm $lib.exp'
+
+       hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+       hardcode_libdir_separator_CXX=:
+
+       # Commands to make compiler produce verbose output that lists
+       # what "hidden" libraries, object files and flags are used when
+       # linking a shared library.
+       #
+       # There doesn't appear to be a way to prevent this compiler from
+       # explicitly linking system object files so we need to strip them
+       # from the output so that they don't get included in the library
+       # dependencies.
+       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list'
+       ;;
+      *)
+       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+         allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+        archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+         hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+         hardcode_libdir_separator_CXX=:
+
+         # Commands to make compiler produce verbose output that lists
+         # what "hidden" libraries, object files and flags are used when
+         # linking a shared library.
+         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+       else
+         # FIXME: insert proper C++ library support
+         ld_shlibs_CXX=no
+       fi
+       ;;
+    esac
+    ;;
+  psos*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  sco*)
+    archive_cmds_need_lc_CXX=no
+    case $cc_basename in
+      CC)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+      *)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+    esac
+    ;;
+  sunos4*)
+    case $cc_basename in
+      CC)
+       # Sun C++ 4.x
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+      lcc)
+       # Lucid
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+      *)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+    esac
+    ;;
+  solaris*)
+    case $cc_basename in
+      CC)
+       # Sun C++ 4.2, 5.x and Centerline C++
+       no_undefined_flag_CXX=' -zdefs'
+       archive_cmds_CXX='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+       archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+       $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+       hardcode_libdir_flag_spec_CXX='-R$libdir'
+       hardcode_shlibpath_var_CXX=no
+       case $host_os in
+         solaris2.0-5 | solaris2.0-5.*) ;;
+         *)
+           # The C++ compiler is used as linker so we must use $wl
+           # flag to pass the commands to the underlying system
+           # linker.
+           # Supported since Solaris 2.6 (maybe 2.5.1?)
+           whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+           ;;
+       esac
+       link_all_deplibs_CXX=yes
+
+       # 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 -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[LR]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+       # Archives containing C++ object files must be created using
+       # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+       # necessary to make sure instantiated templates are included
+       # in the archive.
+       old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+       ;;
+      gcx)
+       # Green Hills C++ Compiler
+       archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+       # The C++ compiler must be used to create the archive.
+       old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+       ;;
+      *)
+       # GNU C++ compiler with Solaris linker
+       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+         no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+         if $CC --version | grep -v '^2\.7' > /dev/null; then
+           archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+           archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+               $CC -shared -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 \"\-L\""
+         else
+           # g++ 2.7 appears to require `-G' NOT `-shared' on this
+           # platform.
+           archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+           archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+               $CC -G -nostdlib ${wl}-M $wl$lib.exp -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 \"\-L\""
+         fi
+
+         hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+       fi
+       ;;
+    esac
+    ;;
+  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
+    archive_cmds_need_lc_CXX=no
+    ;;
+  tandem*)
+    case $cc_basename in
+      NCC)
+       # NonStop-UX NCC 3.20
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+      *)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+    esac
+    ;;
+  vxworks*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  *)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+esac
+echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+echo "${ECHO_T}$ld_shlibs_CXX" >&6
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+GCC_CXX="$GXX"
+LD_CXX="$LD"
+
+
+cat > conftest.$ac_ext <<EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+EOF
+
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; 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
+
+  # The `*' in the case matches for architectures that use `case' in
+  # $output_verbose_cmd can trigger glob expansion during the loop
+  # eval without this substitution.
+  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
+
+  for p in `eval $output_verbose_link_cmd`; do
+    case $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
+       else
+        prev=
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+        case $p in
+        -L* | -R*)
+          # Internal compiler library paths should come after those
+          # provided the user.  The postdeps already come after the
+          # user supplied libs so there is no need to process them.
+          if test -z "$compiler_lib_search_path_CXX"; then
+            compiler_lib_search_path_CXX="${prev}${p}"
+          else
+            compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+          fi
+          ;;
+        # The "-l" case would never come before the object being
+        # linked, so don't bother handling this case.
+        esac
+       else
+        if test -z "$postdeps_CXX"; then
+          postdeps_CXX="${prev}${p}"
+        else
+          postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+        fi
+       fi
+       ;;
+
+    *.$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 "$predep_objects_CXX"; then
+          predep_objects_CXX="$p"
+        else
+          predep_objects_CXX="$predep_objects_CXX $p"
+        fi
+       else
+        if test -z "$postdep_objects_CXX"; then
+          postdep_objects_CXX="$p"
+        else
+          postdep_objects_CXX="$postdep_objects_CXX $p"
+        fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling CXX test program"
+fi
+
+$rm -f confest.$objext
+
+case " $postdeps_CXX " in
+*" -lc "*) archive_cmds_need_lc_CXX=no ;;
+esac
+
+lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    lt_prog_compiler_wl_CXX='-Wl,'
+    lt_prog_compiler_static_CXX='-static'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       lt_prog_compiler_static_CXX='-Bstatic'
+      fi
+      ;;
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+      ;;
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | os2* | pw32*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_CXX='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      lt_prog_compiler_pic_CXX=
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       lt_prog_compiler_pic_CXX=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # 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*)
+       ;;
+      *)
+       lt_prog_compiler_pic_CXX='-fPIC'
+       ;;
+      esac
+      ;;
+    *)
+      lt_prog_compiler_pic_CXX='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix4* | aix5*)
+       # All AIX code is PIC.
+       if test "$host_cpu" = ia64; then
+         # AIX 5 now supports IA64 processor
+         lt_prog_compiler_static_CXX='-Bstatic'
+       else
+         lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+       fi
+       ;;
+      chorus*)
+       case $cc_basename in
+       cxch68)
+         # Green Hills C++ Compiler
+         # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+         ;;
+       esac
+       ;;
+      dgux*)
+       case $cc_basename in
+         ec++)
+           lt_prog_compiler_pic_CXX='-KPIC'
+           ;;
+         ghcx)
+           # Green Hills C++ Compiler
+           lt_prog_compiler_pic_CXX='-pic'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      freebsd* | kfreebsd*-gnu)
+       # FreeBSD uses GNU C++
+       ;;
+      hpux9* | hpux10* | hpux11*)
+       case $cc_basename in
+         CC)
+           lt_prog_compiler_wl_CXX='-Wl,'
+           lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+           if test "$host_cpu" != ia64; then
+             lt_prog_compiler_pic_CXX='+Z'
+           fi
+           ;;
+         aCC)
+           lt_prog_compiler_wl_CXX='-Wl,'
+           lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+           case "$host_cpu" in
+           hppa*64*|ia64*)
+             # +Z the default
+             ;;
+           *)
+             lt_prog_compiler_pic_CXX='+Z'
+             ;;
+           esac
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      irix5* | irix6* | nonstopux*)
+       case $cc_basename in
+         CC)
+           lt_prog_compiler_wl_CXX='-Wl,'
+           lt_prog_compiler_static_CXX='-non_shared'
+           # CC pic flag -KPIC is the default.
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      linux*)
+       case $cc_basename in
+         KCC)
+           # KAI C++ Compiler
+           lt_prog_compiler_wl_CXX='--backend -Wl,'
+           lt_prog_compiler_pic_CXX='-fPIC'
+           ;;
+         icpc)
+           # Intel C++
+           lt_prog_compiler_wl_CXX='-Wl,'
+           lt_prog_compiler_pic_CXX='-KPIC'
+           lt_prog_compiler_static_CXX='-static'
+           ;;
+         cxx)
+           # Compaq C++
+           # Make sure the PIC flag is empty.  It appears that all Alpha
+           # Linux and Compaq Tru64 Unix objects are PIC.
+           lt_prog_compiler_pic_CXX=
+           lt_prog_compiler_static_CXX='-non_shared'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      lynxos*)
+       ;;
+      m88k*)
+       ;;
+      mvs*)
+       case $cc_basename in
+         cxx)
+           lt_prog_compiler_pic_CXX='-W c,exportall'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      netbsd*)
+       ;;
+      osf3* | osf4* | osf5*)
+       case $cc_basename in
+         KCC)
+           lt_prog_compiler_wl_CXX='--backend -Wl,'
+           ;;
+         RCC)
+           # Rational C++ 2.4.1
+           lt_prog_compiler_pic_CXX='-pic'
+           ;;
+         cxx)
+           # Digital/Compaq C++
+           lt_prog_compiler_wl_CXX='-Wl,'
+           # Make sure the PIC flag is empty.  It appears that all Alpha
+           # Linux and Compaq Tru64 Unix objects are PIC.
+           lt_prog_compiler_pic_CXX=
+           lt_prog_compiler_static_CXX='-non_shared'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      psos*)
+       ;;
+      sco*)
+       case $cc_basename in
+         CC)
+           lt_prog_compiler_pic_CXX='-fPIC'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      solaris*)
+       case $cc_basename in
+         CC)
+           # Sun C++ 4.2, 5.x and Centerline C++
+           lt_prog_compiler_pic_CXX='-KPIC'
+           lt_prog_compiler_static_CXX='-Bstatic'
+           lt_prog_compiler_wl_CXX='-Qoption ld '
+           ;;
+         gcx)
+           # Green Hills C++ Compiler
+           lt_prog_compiler_pic_CXX='-PIC'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      sunos4*)
+       case $cc_basename in
+         CC)
+           # Sun C++ 4.x
+           lt_prog_compiler_pic_CXX='-pic'
+           lt_prog_compiler_static_CXX='-Bstatic'
+           ;;
+         lcc)
+           # Lucid
+           lt_prog_compiler_pic_CXX='-pic'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      tandem*)
+       case $cc_basename in
+         NCC)
+           # NonStop-UX NCC 3.20
+           lt_prog_compiler_pic_CXX='-KPIC'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      unixware*)
+       ;;
+      vxworks*)
+       ;;
+      *)
+       lt_prog_compiler_can_build_shared_CXX=no
+       ;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_CXX"; then
+
+echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_pic_works_CXX=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_CXX -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}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:11056: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:11060: \$? = $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
+     if test ! -s conftest.err; then
+       lt_prog_compiler_pic_works_CXX=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6
+
+if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then
+    case $lt_prog_compiler_pic_CXX in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
+     esac
+else
+    lt_prog_compiler_pic_CXX=
+     lt_prog_compiler_can_build_shared_CXX=no
+fi
+
+fi
+case "$host_os" in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_CXX=
+    ;;
+  *)
+    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
+    ;;
+esac
+
+echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o_CXX=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$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}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:11116: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:11120: \$? = $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
+     if test ! -s out/conftest.err; then
+       lt_cv_prog_compiler_c_o_CXX=yes
+     fi
+   fi
+   chmod u+w .
+   $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 ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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
+  echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+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
+
+echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  case $host_os in
+  aix4* | aix5*)
+    # 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
+    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+    else
+      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    export_symbols_cmds_CXX="$ltdll_cmds"
+  ;;
+  cygwin* | mingw*)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  *)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+
+echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+echo "${ECHO_T}$ld_shlibs_CXX" >&6
+test "$ld_shlibs_CXX" = 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
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_CXX" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_CXX=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_CXX in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_CXX
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
+        allow_undefined_flag_CXX=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+         archive_cmds_need_lc_CXX=no
+        else
+         archive_cmds_need_lc_CXX=yes
+        fi
+        allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # 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.
+    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
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+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
+  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'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  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*)
+  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=`$echo "X$lib" | $Xsed -e '\''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'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi4*)
+  version_type=linux
+  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*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    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'
+    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="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        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
+      ;;
+    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
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # 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}${versuffix}$shared_ext ${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)'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  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
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+kfreebsd*-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='GNU ld.so'
+  ;;
+
+freebsd*)
+  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+  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
+    ;;
+  *) # from 3.2 on
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+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
+  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'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+       if test "$lt_cv_prog_gnu_ld" = yes; then
+               version_type=linux
+       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 Linux ELF.
+linux*)
+  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'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # 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=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | 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'
+  ;;
+
+knetbsd*-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='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  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=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=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=yes
+  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"
+  ;;
+
+sco3.2v5*)
+  version_type=osf
+  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
+  ;;
+
+solaris*)
+  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=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.2uw2* | sysv4.3* | sysv5*)
+  version_type=linux
+  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
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      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
+    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
+  ;;
+
+uts4*)
+  version_type=linux
+  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
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+hardcode_action_CXX=
+if test -n "$hardcode_libdir_flag_spec_CXX" || \
+   test -n "$runpath_var CXX" || \
+   test "X$hardcode_automatic_CXX"="Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct_CXX" != 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_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
+     test "$hardcode_minus_L_CXX" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_CXX=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_CXX=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_CXX=unsupported
+fi
+echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
+echo "${ECHO_T}$hardcode_action_CXX" >&6
+
+if test "$hardcode_action_CXX" = relink; 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
+
+striplib=
+old_striplib=
+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&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"
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}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"
+         echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+       else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+       ;;
+   *)
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+    ;;
+  esac
+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*)
+    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
+    echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; 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
+
+   ;;
+
+  *)
+    echo "$as_me:$LINENO: checking for shl_load" >&5
+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
+if test "${ac_cv_func_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define shl_load innocuous_shl_load
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shl_load (); 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 shl_load
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+/* 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_shl_load) || defined (__stub___shl_load)
+choke me
+#else
+char (*f) () = shl_load;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != shl_load;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+echo "${ECHO_T}$ac_cv_func_shl_load" >&6
+if test $ac_cv_func_shl_load = yes; then
+  lt_cv_dlopen="shl_load"
+else
+  echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+int
+main ()
+{
+shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dld_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+if test $ac_cv_lib_dld_shl_load = yes; then
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
+else
+  echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+if test "${ac_cv_func_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define dlopen innocuous_dlopen
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dlopen (); 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 dlopen
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+/* 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_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+char (*f) () = dlopen;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != dlopen;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6
+if test $ac_cv_func_dlopen = yes; then
+  lt_cv_dlopen="dlopen"
+else
+  echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+  echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_svld_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_svld_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
+if test $ac_cv_lib_svld_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+  echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dld_link ();
+int
+main ()
+{
+dld_link ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dld_dld_link=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_dld_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
+if test $ac_cv_lib_dld_dld_link = yes; then
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
+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"
+    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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 <<EOF
+#line 12470 "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
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=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;
+      /* dlclose (self); */
+    }
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) 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_unknown|x*) lt_cv_dlopen_self=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self" >&6
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      LDFLAGS="$LDFLAGS $link_static_flag"
+      echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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 <<EOF
+#line 12568 "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
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=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;
+      /* dlclose (self); */
+    }
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) 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_unknown|x*) lt_cv_dlopen_self_static=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self_static=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+echo "${ECHO_T}$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
+
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # 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
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_CXX \
+    CC_CXX \
+    LD_CXX \
+    lt_prog_compiler_wl_CXX \
+    lt_prog_compiler_pic_CXX \
+    lt_prog_compiler_static_CXX \
+    lt_prog_compiler_no_builtin_flag_CXX \
+    export_dynamic_flag_spec_CXX \
+    thread_safe_flag_spec_CXX \
+    whole_archive_flag_spec_CXX \
+    enable_shared_with_static_runtimes_CXX \
+    old_archive_cmds_CXX \
+    old_archive_from_new_cmds_CXX \
+    predep_objects_CXX \
+    postdep_objects_CXX \
+    predeps_CXX \
+    postdeps_CXX \
+    compiler_lib_search_path_CXX \
+    archive_cmds_CXX \
+    archive_expsym_cmds_CXX \
+    postinstall_cmds_CXX \
+    postuninstall_cmds_CXX \
+    old_archive_from_expsyms_cmds_CXX \
+    allow_undefined_flag_CXX \
+    no_undefined_flag_CXX \
+    export_symbols_cmds_CXX \
+    hardcode_libdir_flag_spec_CXX \
+    hardcode_libdir_flag_spec_ld_CXX \
+    hardcode_libdir_separator_CXX \
+    hardcode_automatic_CXX \
+    module_cmds_CXX \
+    module_expsym_cmds_CXX \
+    lt_cv_prog_compiler_c_o_CXX \
+    exclude_expsyms_CXX \
+    include_expsyms_CXX; do
+
+    case $var in
+    old_archive_cmds_CXX | \
+    old_archive_from_new_cmds_CXX | \
+    archive_cmds_CXX | \
+    archive_expsym_cmds_CXX | \
+    module_cmds_CXX | \
+    module_expsym_cmds_CXX | \
+    old_archive_from_expsyms_cmds_CXX | \
+    export_symbols_cmds_CXX | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_CXX
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_compiler_CXX
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_CXX
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_CXX
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_CXX
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
+
+# Must we lock files when doing compilation ?
+need_locks=$lt_need_locks
+
+# 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
+
+# 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
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_CXX
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX
+
+# Library versioning type.
+version_type=$version_type
+
+# 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
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_CXX
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_CXX
+archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_CXX
+module_expsym_cmds=$lt_module_expsym_cmds_CXX
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_CXX
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_CXX
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_CXX
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_CXX
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
+
+# 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
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_CXX
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_CXX
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# 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
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_CXX
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_CXX
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_CXX
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_CXX
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_CXX
+
+# 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
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path_CXX"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_CXX
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_CXX
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_CXX
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_CXX
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC=$lt_save_CC
+LDCXX=$LD
+LD=$lt_save_LD
+GCC=$lt_save_GCC
+with_gnu_ldcxx=$with_gnu_ld
+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
+
+       else
+         tagname=""
+       fi
+       ;;
+
+      F77)
+       if test -n "$F77" && test "X$F77" != "Xno"; then
+
+ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+
+
+archive_cmds_need_lc_F77=no
+allow_undefined_flag_F77=
+always_export_symbols_F77=no
+archive_expsym_cmds_F77=
+export_dynamic_flag_spec_F77=
+hardcode_direct_F77=no
+hardcode_libdir_flag_spec_F77=
+hardcode_libdir_flag_spec_ld_F77=
+hardcode_libdir_separator_F77=
+hardcode_minus_L_F77=no
+hardcode_automatic_F77=no
+module_cmds_F77=
+module_expsym_cmds_F77=
+link_all_deplibs_F77=unknown
+old_archive_cmds_F77=$old_archive_cmds
+no_undefined_flag_F77=
+whole_archive_flag_spec_F77=
+enable_shared_with_static_runtimes_F77=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+objext_F77=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="      program t\n      end\n"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${F77-"f77"}
+compiler=$CC
+compiler_F77=$CC
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+
+echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $can_build_shared" >&5
+echo "${ECHO_T}$can_build_shared" >&6
+
+echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&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
+  ;;
+aix4* | aix5*)
+  test "$enable_shared" = yes && enable_static=no
+  ;;
+esac
+echo "$as_me:$LINENO: result: $enable_shared" >&5
+echo "${ECHO_T}$enable_shared" >&6
+
+echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+echo "$as_me:$LINENO: result: $enable_static" >&5
+echo "${ECHO_T}$enable_static" >&6
+
+test "$ld_shlibs_F77" = no && can_build_shared=no
+
+GCC_F77="$G77"
+LD_F77="$LD"
+
+lt_prog_compiler_wl_F77=
+lt_prog_compiler_pic_F77=
+lt_prog_compiler_static_F77=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl_F77='-Wl,'
+    lt_prog_compiler_static_F77='-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_F77='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      # 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_F77='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | pw32* | os2*)
+      # 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_F77='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_F77='-fno-common'
+      ;;
+
+    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_F77=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       lt_prog_compiler_pic_F77=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # 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_F77='-fPIC'
+       ;;
+      esac
+      ;;
+
+    *)
+      lt_prog_compiler_pic_F77='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       lt_prog_compiler_static_F77='-Bstatic'
+      else
+       lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+
+    mingw* | pw32* | os2*)
+      # 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_F77='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl_F77='-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_F77='+Z'
+       ;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static_F77='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static_F77='-non_shared'
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    linux*)
+      case $CC in
+      icc* | ecc*)
+       lt_prog_compiler_wl_F77='-Wl,'
+       lt_prog_compiler_pic_F77='-KPIC'
+       lt_prog_compiler_static_F77='-static'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl_F77='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static_F77='-non_shared'
+        ;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static_F77='-non_shared'
+      ;;
+
+    sco3.2v5*)
+      lt_prog_compiler_pic_F77='-Kpic'
+      lt_prog_compiler_static_F77='-dn'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl_F77='-Qoption ld '
+      lt_prog_compiler_pic_F77='-PIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+       lt_prog_compiler_pic_F77='-Kconform_pic'
+       lt_prog_compiler_static_F77='-Bstatic'
+      fi
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic_F77='-pic'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared_F77=no
+      ;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_F77"; then
+
+echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_pic_works_F77=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_F77"
+   # 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}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:13395: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:13399: \$? = $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
+     if test ! -s conftest.err; then
+       lt_prog_compiler_pic_works_F77=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6
+
+if test x"$lt_prog_compiler_pic_works_F77" = xyes; then
+    case $lt_prog_compiler_pic_F77 in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
+     esac
+else
+    lt_prog_compiler_pic_F77=
+     lt_prog_compiler_can_build_shared_F77=no
+fi
+
+fi
+case "$host_os" in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_F77=
+    ;;
+  *)
+    lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
+    ;;
+esac
+
+echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o_F77=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$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}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:13455: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:13459: \$? = $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
+     if test ! -s out/conftest.err; then
+       lt_cv_prog_compiler_c_o_F77=yes
+     fi
+   fi
+   chmod u+w .
+   $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 ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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
+  echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+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
+
+echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+  runpath_var=
+  allow_undefined_flag_F77=
+  enable_shared_with_static_runtimes_F77=no
+  archive_cmds_F77=
+  archive_expsym_cmds_F77=
+  old_archive_From_new_cmds_F77=
+  old_archive_from_expsyms_cmds_F77=
+  export_dynamic_flag_spec_F77=
+  whole_archive_flag_spec_F77=
+  thread_safe_flag_spec_F77=
+  hardcode_libdir_flag_spec_F77=
+  hardcode_libdir_flag_spec_ld_F77=
+  hardcode_libdir_separator_F77=
+  hardcode_direct_F77=no
+  hardcode_minus_L_F77=no
+  hardcode_shlibpath_var_F77=unsupported
+  link_all_deplibs_F77=unknown
+  hardcode_automatic_F77=no
+  module_cmds_F77=
+  module_expsym_cmds_F77=
+  always_export_symbols_F77=no
+  export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms_F77=
+  # 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_F77="_GLOBAL_OFFSET_TABLE_"
+  # 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.
+  extract_expsyms_cmds=
+
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # 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
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs_F77=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+       ld_shlibs_F77=no
+       cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, 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 modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds_F77='$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_F77='-L$libdir'
+      hardcode_minus_L_F77=yes
+
+      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      ld_shlibs_F77=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       allow_undefined_flag_F77=unsupported
+       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+       # support --undefined.  This deserves some investigation.  FIXME
+       archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+       ld_shlibs_F77=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      allow_undefined_flag_F77=unsupported
+      always_export_symbols_F77=no
+      enable_shared_with_static_runtimes_F77=yes
+      export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+       # If the export-symbols file already is a .def file (1st line
+       # is EXPORTS), use it as is; otherwise, prepend...
+       archive_expsym_cmds_F77='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}--image-base=0x10000000  ${wl}--out-implib,$lib'
+      else
+       ld_shlibs=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+       archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+       wlarc=
+      else
+       archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris* | sysv5*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+       ld_shlibs_F77=no
+       cat <<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.
+
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+       ld_shlibs_F77=no
+      fi
+      ;;
+
+    sunos4*)
+      archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+  linux*)
+    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_cmds_F77="$tmp_archive_cmds"
+      supports_anon_versioning=no
+      case `$LD -v 2>/dev/null` in
+        *\ 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
+      if test $supports_anon_versioning = yes; then
+        archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~
+cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+$echo "local: *; };" >> $output_objdir/$libname.ver~
+        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+      else
+        archive_expsym_cmds_F77="$tmp_archive_cmds"
+      fi
+    else
+      ld_shlibs_F77=no
+    fi
+    ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+       ld_shlibs_F77=no
+      fi
+      ;;
+    esac
+
+    if test "$ld_shlibs_F77" = yes; then
+      runpath_var=LD_RUN_PATH
+      hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir'
+      export_dynamic_flag_spec_F77='${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_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+       whole_archive_flag_spec_F77=
+      fi
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag_F77=unsupported
+      always_export_symbols_F77=yes
+      archive_expsym_cmds_F77='$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_F77=yes
+      if test "$GCC" = yes && test -z "$link_static_flag"; then
+       # Neither direct hardcoding nor static linking is supported with a
+       # broken collect2.
+       hardcode_direct_F77=unsupported
+      fi
+      ;;
+
+    aix4* | aix5*)
+      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
+       if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+         export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+       else
+         export_symbols_cmds_F77='$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].*|aix5*)
+         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_F77=''
+      hardcode_direct_F77=yes
+      hardcode_libdir_separator_F77=':'
+      link_all_deplibs_F77=yes
+
+      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
+         hardcode_direct_F77=yes
+         else
+         # We have old collect2
+         hardcode_direct_F77=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_F77=yes
+         hardcode_libdir_flag_spec_F77='-L$libdir'
+         hardcode_libdir_separator_F77=
+         fi
+       esac
+       shared_flag='-shared'
+      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
+
+      # 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_F77=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_F77='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_f77_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
+       archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+       if test "$host_cpu" = ia64; then
+         hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib'
+         allow_undefined_flag_F77="-z nodefs"
+         archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+       else
+        # Determine the default libpath from the value encoded in an empty executable.
+        cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_f77_werror_flag"                         || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+        hardcode_libdir_flag_spec_F77='${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_F77=' ${wl}-bernotok'
+         allow_undefined_flag_F77=' ${wl}-berok'
+         # -bexpall does not export symbols beginning with underscore (_)
+         always_export_symbols_F77=yes
+         # Exported symbols can be pulled into shared objects from archives
+         whole_archive_flag_spec_F77=' '
+         archive_cmds_need_lc_F77=yes
+         # This is similar to how AIX traditionally builds it's shared libraries.
+         archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+       fi
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds_F77='$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_F77='-L$libdir'
+      hardcode_minus_L_F77=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs_F77=no
+      ;;
+
+    bsdi4*)
+      export_dynamic_flag_spec_F77=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec_F77=' '
+      allow_undefined_flag_F77=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_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_From_new_cmds_F77='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes_F77=yes
+      ;;
+
+    darwin* | rhapsody*)
+    if test "$GXX" = yes ; then
+      archive_cmds_need_lc_F77=no
+      case "$host_os" in
+      rhapsody* | darwin1.[012])
+       allow_undefined_flag_F77='-undefined suppress'
+       ;;
+      *) # Darwin 1.3 on
+      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+       allow_undefined_flag_F77='-flat_namespace -undefined suppress'
+      else
+        case ${MACOSX_DEPLOYMENT_TARGET} in
+          10.[012])
+            allow_undefined_flag_F77='-flat_namespace -undefined suppress'
+            ;;
+          10.*)
+            allow_undefined_flag_F77='-undefined dynamic_lookup'
+            ;;
+        esac
+      fi
+       ;;
+      esac
+       lt_int_apple_cc_single_mod=no
+       output_verbose_link_cmd='echo'
+       if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
+         lt_int_apple_cc_single_mod=yes
+       fi
+       if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+         archive_cmds_F77='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+       else
+        archive_cmds_F77='$CC -r ${wl}-bind_at_load -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'
+      fi
+      module_cmds_F77='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+          archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+        else
+          archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+        fi
+          module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      hardcode_direct_F77=no
+      hardcode_automatic_F77=yes
+      hardcode_shlibpath_var_F77=unsupported
+      whole_archive_flag_spec_F77='-all_load $convenience'
+      link_all_deplibs_F77=yes
+    else
+      ld_shlibs_F77=no
+    fi
+      ;;
+
+    dgux*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs_F77=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_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_F77=yes
+      hardcode_minus_L_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | kfreebsd*-gnu)
+      archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+       archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${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_F77='$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_F77='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      hardcode_direct_F77=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L_F77=yes
+      export_dynamic_flag_spec_F77='${wl}-E'
+      ;;
+
+    hpux10* | hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+       case "$host_cpu" in
+       hppa*64*|ia64*)
+         archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+         archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       esac
+      else
+       case "$host_cpu" in
+       hppa*64*|ia64*)
+         archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+         ;;
+       *)
+         archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+         ;;
+       esac
+      fi
+      if test "$with_gnu_ld" = no; then
+       case "$host_cpu" in
+       hppa*64*)
+         hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+         hardcode_libdir_flag_spec_ld_F77='+b $libdir'
+         hardcode_libdir_separator_F77=:
+         hardcode_direct_F77=no
+         hardcode_shlibpath_var_F77=no
+         ;;
+       ia64*)
+         hardcode_libdir_flag_spec_F77='-L$libdir'
+         hardcode_direct_F77=no
+         hardcode_shlibpath_var_F77=no
+
+         # hardcode_minus_L: Not really in the search PATH,
+         # but as the default location of the library.
+         hardcode_minus_L_F77=yes
+         ;;
+       *)
+         hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+         hardcode_libdir_separator_F77=:
+         hardcode_direct_F77=yes
+         export_dynamic_flag_spec_F77='${wl}-E'
+
+         # hardcode_minus_L: Not really in the search PATH,
+         # but as the default location of the library.
+         hardcode_minus_L_F77=yes
+         ;;
+       esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+       archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+       archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       hardcode_libdir_flag_spec_ld_F77='-rpath $libdir'
+      fi
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      link_all_deplibs_F77=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+       archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+       archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    newsos6)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_F77=yes
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    openbsd*)
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+       archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+       hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+       export_dynamic_flag_spec_F77='${wl}-E'
+      else
+       case $host_os in
+        openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+          archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+          hardcode_libdir_flag_spec_F77='-R$libdir'
+          ;;
+        *)
+          archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+          hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+          ;;
+       esac
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_minus_L_F77=yes
+      allow_undefined_flag_F77=unsupported
+      archive_cmds_F77='$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_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+       allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
+       archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+       allow_undefined_flag_F77=' -expect_unresolved \*'
+       archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      ;;
+
+    osf4* | osf5*)     # as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+       allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
+       archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      else
+       allow_undefined_flag_F77=' -expect_unresolved \*'
+       archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+
+       # Both c and cxx compiler support -rpath directly
+       hardcode_libdir_flag_spec_F77='-rpath $libdir'
+      fi
+      hardcode_libdir_separator_F77=:
+      ;;
+
+    sco3.2v5*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_F77=no
+      export_dynamic_flag_spec_F77='${wl}-Bexport'
+      runpath_var=LD_RUN_PATH
+      hardcode_runpath_var=yes
+      ;;
+
+    solaris*)
+      no_undefined_flag_F77=' -z text'
+      if test "$GCC" = yes; then
+       archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+         $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+       archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+       archive_expsym_cmds_F77='$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'
+      fi
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_shlibpath_var_F77=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+       whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;;
+      esac
+      link_all_deplibs_F77=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_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_direct_F77=yes
+      hardcode_minus_L_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+       sni)
+         archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         hardcode_direct_F77=yes # is this really true???
+       ;;
+       siemens)
+         ## LD is ld it makes a PLAMLIB
+         ## CC just makes a GrossModule.
+         archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+         reload_cmds_F77='$CC -r -o $output$reload_objs'
+         hardcode_direct_F77=no
+        ;;
+       motorola)
+         archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie
+       ;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_F77=no
+      export_dynamic_flag_spec_F77='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+       hardcode_shlibpath_var_F77=no
+       runpath_var=LD_RUN_PATH
+       hardcode_runpath_var=yes
+       ld_shlibs_F77=yes
+      fi
+      ;;
+
+    sysv4.2uw2*)
+      archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_F77=yes
+      hardcode_minus_L_F77=no
+      hardcode_shlibpath_var_F77=no
+      hardcode_runpath_var=yes
+      runpath_var=LD_RUN_PATH
+      ;;
+
+   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
+      no_undefined_flag_F77='${wl}-z ${wl}text'
+      if test "$GCC" = yes; then
+       archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    sysv5*)
+      no_undefined_flag_F77=' -z text'
+      # $CC -shared without GNU ld will not create a library from C++
+      # object files and a static libstdc++, better avoid it by now
+      archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      archive_expsym_cmds_F77='$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'
+      hardcode_libdir_flag_spec_F77=
+      hardcode_shlibpath_var_F77=no
+      runpath_var='LD_RUN_PATH'
+      ;;
+
+    uts4*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    *)
+      ld_shlibs_F77=no
+      ;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5
+echo "${ECHO_T}$ld_shlibs_F77" >&6
+test "$ld_shlibs_F77" = 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
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_F77" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_F77=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_F77 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.
+      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_F77
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_F77
+        allow_undefined_flag_F77=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+         archive_cmds_need_lc_F77=no
+        else
+         archive_cmds_need_lc_F77=yes
+        fi
+        allow_undefined_flag_F77=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # 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.
+    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
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+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
+  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'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  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*)
+  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=`$echo "X$lib" | $Xsed -e '\''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'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi4*)
+  version_type=linux
+  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*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    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'
+    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="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        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
+      ;;
+    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
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # 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}${versuffix}$shared_ext ${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)'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  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
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+kfreebsd*-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='GNU ld.so'
+  ;;
+
+freebsd*)
+  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+  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
+    ;;
+  *) # from 3.2 on
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+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
+  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'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+       if test "$lt_cv_prog_gnu_ld" = yes; then
+               version_type=linux
+       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 Linux ELF.
+linux*)
+  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'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # 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=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | 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'
+  ;;
+
+knetbsd*-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='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  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=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=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=yes
+  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"
+  ;;
+
+sco3.2v5*)
+  version_type=osf
+  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
+  ;;
+
+solaris*)
+  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=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.2uw2* | sysv4.3* | sysv5*)
+  version_type=linux
+  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
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      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
+    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
+  ;;
+
+uts4*)
+  version_type=linux
+  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
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+hardcode_action_F77=
+if test -n "$hardcode_libdir_flag_spec_F77" || \
+   test -n "$runpath_var F77" || \
+   test "X$hardcode_automatic_F77"="Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct_F77" != 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_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no &&
+     test "$hardcode_minus_L_F77" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_F77=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_F77=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_F77=unsupported
+fi
+echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5
+echo "${ECHO_T}$hardcode_action_F77" >&6
+
+if test "$hardcode_action_F77" = relink; 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
+
+striplib=
+old_striplib=
+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&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"
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}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"
+         echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+       else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+       ;;
+   *)
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+    ;;
+  esac
+fi
+
+
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # 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
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_F77 \
+    CC_F77 \
+    LD_F77 \
+    lt_prog_compiler_wl_F77 \
+    lt_prog_compiler_pic_F77 \
+    lt_prog_compiler_static_F77 \
+    lt_prog_compiler_no_builtin_flag_F77 \
+    export_dynamic_flag_spec_F77 \
+    thread_safe_flag_spec_F77 \
+    whole_archive_flag_spec_F77 \
+    enable_shared_with_static_runtimes_F77 \
+    old_archive_cmds_F77 \
+    old_archive_from_new_cmds_F77 \
+    predep_objects_F77 \
+    postdep_objects_F77 \
+    predeps_F77 \
+    postdeps_F77 \
+    compiler_lib_search_path_F77 \
+    archive_cmds_F77 \
+    archive_expsym_cmds_F77 \
+    postinstall_cmds_F77 \
+    postuninstall_cmds_F77 \
+    old_archive_from_expsyms_cmds_F77 \
+    allow_undefined_flag_F77 \
+    no_undefined_flag_F77 \
+    export_symbols_cmds_F77 \
+    hardcode_libdir_flag_spec_F77 \
+    hardcode_libdir_flag_spec_ld_F77 \
+    hardcode_libdir_separator_F77 \
+    hardcode_automatic_F77 \
+    module_cmds_F77 \
+    module_expsym_cmds_F77 \
+    lt_cv_prog_compiler_c_o_F77 \
+    exclude_expsyms_F77 \
+    include_expsyms_F77; do
+
+    case $var in
+    old_archive_cmds_F77 | \
+    old_archive_from_new_cmds_F77 | \
+    archive_cmds_F77 | \
+    archive_expsym_cmds_F77 | \
+    module_cmds_F77 | \
+    module_expsym_cmds_F77 | \
+    old_archive_from_expsyms_cmds_F77 | \
+    export_symbols_cmds_F77 | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_F77
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_compiler_F77
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_F77
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_F77
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_F77
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_F77
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77
+
+# Must we lock files when doing compilation ?
+need_locks=$lt_need_locks
+
+# 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
+
+# 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
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_F77
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77
+
+# Library versioning type.
+version_type=$version_type
+
+# 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
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_F77
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_F77
+archive_expsym_cmds=$lt_archive_expsym_cmds_F77
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_F77
+module_expsym_cmds=$lt_module_expsym_cmds_F77
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_F77
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_F77
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_F77
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_F77
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_F77
+
+# 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
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_F77
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_F77
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# 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
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_F77
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# 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_F77
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_F77
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_F77
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_F77
+
+# 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_F77
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_F77
+
+# 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
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path_F77"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_F77
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_F77
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_F77
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_F77
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+       else
+         tagname=""
+       fi
+       ;;
+
+      GCJ)
+       if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+
+
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+objext_GCJ=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String argv) {}; }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${GCJ-"gcj"}
+compiler=$CC
+compiler_GCJ=$CC
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+archive_cmds_need_lc_GCJ=no
+
+
+lt_prog_compiler_no_builtin_flag_GCJ=
+
+if test "$GCC" = yes; then
+  lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin'
+
+
+echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_rtti_exceptions=no
+  ac_outfile=conftest.$ac_objext
+   printf "$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}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:15487: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:15491: \$? = $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
+     if test ! -s conftest.err; then
+       lt_cv_prog_compiler_rtti_exceptions=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions"
+else
+    :
+fi
+
+fi
+
+lt_prog_compiler_wl_GCJ=
+lt_prog_compiler_pic_GCJ=
+lt_prog_compiler_static_GCJ=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl_GCJ='-Wl,'
+    lt_prog_compiler_static_GCJ='-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_GCJ='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      # 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_GCJ='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | pw32* | os2*)
+      # 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_GCJ='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_GCJ='-fno-common'
+      ;;
+
+    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_GCJ=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       lt_prog_compiler_pic_GCJ=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # 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_GCJ='-fPIC'
+       ;;
+      esac
+      ;;
+
+    *)
+      lt_prog_compiler_pic_GCJ='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       lt_prog_compiler_static_GCJ='-Bstatic'
+      else
+       lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+
+    mingw* | pw32* | os2*)
+      # 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_GCJ='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl_GCJ='-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_GCJ='+Z'
+       ;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static_GCJ='-non_shared'
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    linux*)
+      case $CC in
+      icc* | ecc*)
+       lt_prog_compiler_wl_GCJ='-Wl,'
+       lt_prog_compiler_pic_GCJ='-KPIC'
+       lt_prog_compiler_static_GCJ='-static'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl_GCJ='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static_GCJ='-non_shared'
+        ;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static_GCJ='-non_shared'
+      ;;
+
+    sco3.2v5*)
+      lt_prog_compiler_pic_GCJ='-Kpic'
+      lt_prog_compiler_static_GCJ='-dn'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl_GCJ='-Qoption ld '
+      lt_prog_compiler_pic_GCJ='-PIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+       lt_prog_compiler_pic_GCJ='-Kconform_pic'
+       lt_prog_compiler_static_GCJ='-Bstatic'
+      fi
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic_GCJ='-pic'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared_GCJ=no
+      ;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_GCJ"; then
+
+echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_pic_works_GCJ=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
+   # 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}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:15720: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:15724: \$? = $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
+     if test ! -s conftest.err; then
+       lt_prog_compiler_pic_works_GCJ=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6
+
+if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then
+    case $lt_prog_compiler_pic_GCJ in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;;
+     esac
+else
+    lt_prog_compiler_pic_GCJ=
+     lt_prog_compiler_can_build_shared_GCJ=no
+fi
+
+fi
+case "$host_os" in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_GCJ=
+    ;;
+  *)
+    lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ"
+    ;;
+esac
+
+echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o_GCJ=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$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}? :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:15780: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:15784: \$? = $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
+     if test ! -s out/conftest.err; then
+       lt_cv_prog_compiler_c_o_GCJ=yes
+     fi
+   fi
+   chmod u+w .
+   $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 ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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
+  echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+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
+
+echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+  runpath_var=
+  allow_undefined_flag_GCJ=
+  enable_shared_with_static_runtimes_GCJ=no
+  archive_cmds_GCJ=
+  archive_expsym_cmds_GCJ=
+  old_archive_From_new_cmds_GCJ=
+  old_archive_from_expsyms_cmds_GCJ=
+  export_dynamic_flag_spec_GCJ=
+  whole_archive_flag_spec_GCJ=
+  thread_safe_flag_spec_GCJ=
+  hardcode_libdir_flag_spec_GCJ=
+  hardcode_libdir_flag_spec_ld_GCJ=
+  hardcode_libdir_separator_GCJ=
+  hardcode_direct_GCJ=no
+  hardcode_minus_L_GCJ=no
+  hardcode_shlibpath_var_GCJ=unsupported
+  link_all_deplibs_GCJ=unknown
+  hardcode_automatic_GCJ=no
+  module_cmds_GCJ=
+  module_expsym_cmds_GCJ=
+  always_export_symbols_GCJ=no
+  export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms_GCJ=
+  # 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_GCJ="_GLOBAL_OFFSET_TABLE_"
+  # 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.
+  extract_expsyms_cmds=
+
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # 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
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs_GCJ=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+       ld_shlibs_GCJ=no
+       cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, 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 modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds_GCJ='$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_GCJ='-L$libdir'
+      hardcode_minus_L_GCJ=yes
+
+      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      ld_shlibs_GCJ=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       allow_undefined_flag_GCJ=unsupported
+       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+       # support --undefined.  This deserves some investigation.  FIXME
+       archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+       ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      allow_undefined_flag_GCJ=unsupported
+      always_export_symbols_GCJ=no
+      enable_shared_with_static_runtimes_GCJ=yes
+      export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+       # If the export-symbols file already is a .def file (1st line
+       # is EXPORTS), use it as is; otherwise, prepend...
+       archive_expsym_cmds_GCJ='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}--image-base=0x10000000  ${wl}--out-implib,$lib'
+      else
+       ld_shlibs=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+       archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+       wlarc=
+      else
+       archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris* | sysv5*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+       ld_shlibs_GCJ=no
+       cat <<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.
+
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+       ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    sunos4*)
+      archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+  linux*)
+    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_cmds_GCJ="$tmp_archive_cmds"
+      supports_anon_versioning=no
+      case `$LD -v 2>/dev/null` in
+        *\ 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
+      if test $supports_anon_versioning = yes; then
+        archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~
+cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+$echo "local: *; };" >> $output_objdir/$libname.ver~
+        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+      else
+        archive_expsym_cmds_GCJ="$tmp_archive_cmds"
+      fi
+    else
+      ld_shlibs_GCJ=no
+    fi
+    ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+       ld_shlibs_GCJ=no
+      fi
+      ;;
+    esac
+
+    if test "$ld_shlibs_GCJ" = yes; then
+      runpath_var=LD_RUN_PATH
+      hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir'
+      export_dynamic_flag_spec_GCJ='${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_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+       whole_archive_flag_spec_GCJ=
+      fi
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag_GCJ=unsupported
+      always_export_symbols_GCJ=yes
+      archive_expsym_cmds_GCJ='$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_GCJ=yes
+      if test "$GCC" = yes && test -z "$link_static_flag"; then
+       # Neither direct hardcoding nor static linking is supported with a
+       # broken collect2.
+       hardcode_direct_GCJ=unsupported
+      fi
+      ;;
+
+    aix4* | aix5*)
+      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
+       if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+         export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+       else
+         export_symbols_cmds_GCJ='$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].*|aix5*)
+         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_GCJ=''
+      hardcode_direct_GCJ=yes
+      hardcode_libdir_separator_GCJ=':'
+      link_all_deplibs_GCJ=yes
+
+      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
+         hardcode_direct_GCJ=yes
+         else
+         # We have old collect2
+         hardcode_direct_GCJ=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_GCJ=yes
+         hardcode_libdir_flag_spec_GCJ='-L$libdir'
+         hardcode_libdir_separator_GCJ=
+         fi
+       esac
+       shared_flag='-shared'
+      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
+
+      # 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_GCJ=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_GCJ='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
+       archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+       if test "$host_cpu" = ia64; then
+         hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib'
+         allow_undefined_flag_GCJ="-z nodefs"
+         archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+       else
+        # Determine the default libpath from the value encoded in an empty executable.
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+        hardcode_libdir_flag_spec_GCJ='${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_GCJ=' ${wl}-bernotok'
+         allow_undefined_flag_GCJ=' ${wl}-berok'
+         # -bexpall does not export symbols beginning with underscore (_)
+         always_export_symbols_GCJ=yes
+         # Exported symbols can be pulled into shared objects from archives
+         whole_archive_flag_spec_GCJ=' '
+         archive_cmds_need_lc_GCJ=yes
+         # This is similar to how AIX traditionally builds it's shared libraries.
+         archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+       fi
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds_GCJ='$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_GCJ='-L$libdir'
+      hardcode_minus_L_GCJ=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs_GCJ=no
+      ;;
+
+    bsdi4*)
+      export_dynamic_flag_spec_GCJ=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec_GCJ=' '
+      allow_undefined_flag_GCJ=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_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_From_new_cmds_GCJ='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes_GCJ=yes
+      ;;
+
+    darwin* | rhapsody*)
+    if test "$GXX" = yes ; then
+      archive_cmds_need_lc_GCJ=no
+      case "$host_os" in
+      rhapsody* | darwin1.[012])
+       allow_undefined_flag_GCJ='-undefined suppress'
+       ;;
+      *) # Darwin 1.3 on
+      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+       allow_undefined_flag_GCJ='-flat_namespace -undefined suppress'
+      else
+        case ${MACOSX_DEPLOYMENT_TARGET} in
+          10.[012])
+            allow_undefined_flag_GCJ='-flat_namespace -undefined suppress'
+            ;;
+          10.*)
+            allow_undefined_flag_GCJ='-undefined dynamic_lookup'
+            ;;
+        esac
+      fi
+       ;;
+      esac
+       lt_int_apple_cc_single_mod=no
+       output_verbose_link_cmd='echo'
+       if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
+         lt_int_apple_cc_single_mod=yes
+       fi
+       if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+         archive_cmds_GCJ='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+       else
+        archive_cmds_GCJ='$CC -r ${wl}-bind_at_load -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'
+      fi
+      module_cmds_GCJ='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+          archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+        else
+          archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+        fi
+          module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      hardcode_direct_GCJ=no
+      hardcode_automatic_GCJ=yes
+      hardcode_shlibpath_var_GCJ=unsupported
+      whole_archive_flag_spec_GCJ='-all_load $convenience'
+      link_all_deplibs_GCJ=yes
+    else
+      ld_shlibs_GCJ=no
+    fi
+      ;;
+
+    dgux*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs_GCJ=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_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_GCJ=yes
+      hardcode_minus_L_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | kfreebsd*-gnu)
+      archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+       archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${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_GCJ='$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_GCJ='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      hardcode_direct_GCJ=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L_GCJ=yes
+      export_dynamic_flag_spec_GCJ='${wl}-E'
+      ;;
+
+    hpux10* | hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+       case "$host_cpu" in
+       hppa*64*|ia64*)
+         archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+         archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       esac
+      else
+       case "$host_cpu" in
+       hppa*64*|ia64*)
+         archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+         ;;
+       *)
+         archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+         ;;
+       esac
+      fi
+      if test "$with_gnu_ld" = no; then
+       case "$host_cpu" in
+       hppa*64*)
+         hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+         hardcode_libdir_flag_spec_ld_GCJ='+b $libdir'
+         hardcode_libdir_separator_GCJ=:
+         hardcode_direct_GCJ=no
+         hardcode_shlibpath_var_GCJ=no
+         ;;
+       ia64*)
+         hardcode_libdir_flag_spec_GCJ='-L$libdir'
+         hardcode_direct_GCJ=no
+         hardcode_shlibpath_var_GCJ=no
+
+         # hardcode_minus_L: Not really in the search PATH,
+         # but as the default location of the library.
+         hardcode_minus_L_GCJ=yes
+         ;;
+       *)
+         hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+         hardcode_libdir_separator_GCJ=:
+         hardcode_direct_GCJ=yes
+         export_dynamic_flag_spec_GCJ='${wl}-E'
+
+         # hardcode_minus_L: Not really in the search PATH,
+         # but as the default location of the library.
+         hardcode_minus_L_GCJ=yes
+         ;;
+       esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+       archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+       archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir'
+      fi
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      link_all_deplibs_GCJ=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+       archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+       archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    newsos6)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_GCJ=yes
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    openbsd*)
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+       archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+       hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+       export_dynamic_flag_spec_GCJ='${wl}-E'
+      else
+       case $host_os in
+        openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+          archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+          hardcode_libdir_flag_spec_GCJ='-R$libdir'
+          ;;
+        *)
+          archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+          hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+          ;;
+       esac
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_minus_L_GCJ=yes
+      allow_undefined_flag_GCJ=unsupported
+      archive_cmds_GCJ='$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_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+       allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
+       archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+       allow_undefined_flag_GCJ=' -expect_unresolved \*'
+       archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      ;;
+
+    osf4* | osf5*)     # as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+       allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
+       archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      else
+       allow_undefined_flag_GCJ=' -expect_unresolved \*'
+       archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+
+       # Both c and cxx compiler support -rpath directly
+       hardcode_libdir_flag_spec_GCJ='-rpath $libdir'
+      fi
+      hardcode_libdir_separator_GCJ=:
+      ;;
+
+    sco3.2v5*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_GCJ=no
+      export_dynamic_flag_spec_GCJ='${wl}-Bexport'
+      runpath_var=LD_RUN_PATH
+      hardcode_runpath_var=yes
+      ;;
+
+    solaris*)
+      no_undefined_flag_GCJ=' -z text'
+      if test "$GCC" = yes; then
+       archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+         $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+       archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+       archive_expsym_cmds_GCJ='$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'
+      fi
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_shlibpath_var_GCJ=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+       whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;;
+      esac
+      link_all_deplibs_GCJ=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_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_minus_L_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+       sni)
+         archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         hardcode_direct_GCJ=yes # is this really true???
+       ;;
+       siemens)
+         ## LD is ld it makes a PLAMLIB
+         ## CC just makes a GrossModule.
+         archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+         reload_cmds_GCJ='$CC -r -o $output$reload_objs'
+         hardcode_direct_GCJ=no
+        ;;
+       motorola)
+         archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie
+       ;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_GCJ=no
+      export_dynamic_flag_spec_GCJ='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+       hardcode_shlibpath_var_GCJ=no
+       runpath_var=LD_RUN_PATH
+       hardcode_runpath_var=yes
+       ld_shlibs_GCJ=yes
+      fi
+      ;;
+
+    sysv4.2uw2*)
+      archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_GCJ=yes
+      hardcode_minus_L_GCJ=no
+      hardcode_shlibpath_var_GCJ=no
+      hardcode_runpath_var=yes
+      runpath_var=LD_RUN_PATH
+      ;;
+
+   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
+      no_undefined_flag_GCJ='${wl}-z ${wl}text'
+      if test "$GCC" = yes; then
+       archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    sysv5*)
+      no_undefined_flag_GCJ=' -z text'
+      # $CC -shared without GNU ld will not create a library from C++
+      # object files and a static libstdc++, better avoid it by now
+      archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      archive_expsym_cmds_GCJ='$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'
+      hardcode_libdir_flag_spec_GCJ=
+      hardcode_shlibpath_var_GCJ=no
+      runpath_var='LD_RUN_PATH'
+      ;;
+
+    uts4*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    *)
+      ld_shlibs_GCJ=no
+      ;;
+    esac
+  fi
+
+echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
+echo "${ECHO_T}$ld_shlibs_GCJ" >&6
+test "$ld_shlibs_GCJ" = 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
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_GCJ" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_GCJ=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_GCJ 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.
+      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_GCJ
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ
+        allow_undefined_flag_GCJ=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+         archive_cmds_need_lc_GCJ=no
+        else
+         archive_cmds_need_lc_GCJ=yes
+        fi
+        allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # 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.
+    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
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+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
+  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'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  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*)
+  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=`$echo "X$lib" | $Xsed -e '\''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'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi4*)
+  version_type=linux
+  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*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    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'
+    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="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        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
+      ;;
+    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
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # 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}${versuffix}$shared_ext ${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)'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  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
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+kfreebsd*-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='GNU ld.so'
+  ;;
+
+freebsd*)
+  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+  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
+    ;;
+  *) # from 3.2 on
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+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
+  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'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+       if test "$lt_cv_prog_gnu_ld" = yes; then
+               version_type=linux
+       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 Linux ELF.
+linux*)
+  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'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # 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=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | 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'
+  ;;
+
+knetbsd*-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='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  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=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=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=yes
+  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"
+  ;;
+
+sco3.2v5*)
+  version_type=osf
+  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
+  ;;
+
+solaris*)
+  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=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.2uw2* | sysv4.3* | sysv5*)
+  version_type=linux
+  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
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      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
+    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
+  ;;
+
+uts4*)
+  version_type=linux
+  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
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+hardcode_action_GCJ=
+if test -n "$hardcode_libdir_flag_spec_GCJ" || \
+   test -n "$runpath_var GCJ" || \
+   test "X$hardcode_automatic_GCJ"="Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct_GCJ" != 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_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no &&
+     test "$hardcode_minus_L_GCJ" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_GCJ=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_GCJ=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_GCJ=unsupported
+fi
+echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5
+echo "${ECHO_T}$hardcode_action_GCJ" >&6
+
+if test "$hardcode_action_GCJ" = relink; 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
+
+striplib=
+old_striplib=
+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&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"
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}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"
+         echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+       else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+       ;;
+   *)
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+    ;;
+  esac
+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*)
+    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
+    echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; 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
+
+   ;;
+
+  *)
+    echo "$as_me:$LINENO: checking for shl_load" >&5
+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
+if test "${ac_cv_func_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define shl_load innocuous_shl_load
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shl_load (); 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 shl_load
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+/* 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_shl_load) || defined (__stub___shl_load)
+choke me
+#else
+char (*f) () = shl_load;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != shl_load;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+echo "${ECHO_T}$ac_cv_func_shl_load" >&6
+if test $ac_cv_func_shl_load = yes; then
+  lt_cv_dlopen="shl_load"
+else
+  echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shl_load ();
+int
+main ()
+{
+shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dld_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+if test $ac_cv_lib_dld_shl_load = yes; then
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
+else
+  echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+if test "${ac_cv_func_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define dlopen innocuous_dlopen
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dlopen (); 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 dlopen
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+/* 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_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+char (*f) () = dlopen;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != dlopen;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6
+if test $ac_cv_func_dlopen = yes; then
+  lt_cv_dlopen="dlopen"
+else
+  echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+  echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_svld_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_svld_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
+if test $ac_cv_lib_svld_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+  echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dld_link ();
+int
+main ()
+{
+dld_link ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dld_dld_link=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_dld_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
+if test $ac_cv_lib_dld_dld_link = yes; then
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
+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"
+    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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 <<EOF
+#line 17955 "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
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=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;
+      /* dlclose (self); */
+    }
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) 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_unknown|x*) lt_cv_dlopen_self=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self" >&6
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      LDFLAGS="$LDFLAGS $link_static_flag"
+      echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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 <<EOF
+#line 18053 "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
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=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;
+      /* dlclose (self); */
+    }
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) 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_unknown|x*) lt_cv_dlopen_self_static=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self_static=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+echo "${ECHO_T}$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
+
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # 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
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_GCJ \
+    CC_GCJ \
+    LD_GCJ \
+    lt_prog_compiler_wl_GCJ \
+    lt_prog_compiler_pic_GCJ \
+    lt_prog_compiler_static_GCJ \
+    lt_prog_compiler_no_builtin_flag_GCJ \
+    export_dynamic_flag_spec_GCJ \
+    thread_safe_flag_spec_GCJ \
+    whole_archive_flag_spec_GCJ \
+    enable_shared_with_static_runtimes_GCJ \
+    old_archive_cmds_GCJ \
+    old_archive_from_new_cmds_GCJ \
+    predep_objects_GCJ \
+    postdep_objects_GCJ \
+    predeps_GCJ \
+    postdeps_GCJ \
+    compiler_lib_search_path_GCJ \
+    archive_cmds_GCJ \
+    archive_expsym_cmds_GCJ \
+    postinstall_cmds_GCJ \
+    postuninstall_cmds_GCJ \
+    old_archive_from_expsyms_cmds_GCJ \
+    allow_undefined_flag_GCJ \
+    no_undefined_flag_GCJ \
+    export_symbols_cmds_GCJ \
+    hardcode_libdir_flag_spec_GCJ \
+    hardcode_libdir_flag_spec_ld_GCJ \
+    hardcode_libdir_separator_GCJ \
+    hardcode_automatic_GCJ \
+    module_cmds_GCJ \
+    module_expsym_cmds_GCJ \
+    lt_cv_prog_compiler_c_o_GCJ \
+    exclude_expsyms_GCJ \
+    include_expsyms_GCJ; do
+
+    case $var in
+    old_archive_cmds_GCJ | \
+    old_archive_from_new_cmds_GCJ | \
+    archive_cmds_GCJ | \
+    archive_expsym_cmds_GCJ | \
+    module_cmds_GCJ | \
+    module_expsym_cmds_GCJ | \
+    old_archive_from_expsyms_cmds_GCJ | \
+    export_symbols_cmds_GCJ | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_GCJ
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_compiler_GCJ
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_GCJ
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_GCJ
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_GCJ
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_GCJ
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ
+
+# Must we lock files when doing compilation ?
+need_locks=$lt_need_locks
+
+# 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
+
+# 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
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_GCJ
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ
+
+# Library versioning type.
+version_type=$version_type
+
+# 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
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_GCJ
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_GCJ
+archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_GCJ
+module_expsym_cmds=$lt_module_expsym_cmds_GCJ
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_GCJ
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_GCJ
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_GCJ
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_GCJ
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ
+
+# 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
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_GCJ
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_GCJ
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# 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
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_GCJ
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# 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_GCJ
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_GCJ
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_GCJ
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ
+
+# 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_GCJ
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_GCJ
+
+# 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
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path_GCJ"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_GCJ
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_GCJ
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_GCJ
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_GCJ
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+       else
+         tagname=""
+       fi
+       ;;
+
+      RC)
+
+
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+objext_RC=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${RC-"windres"}
+compiler=$CC
+compiler_RC=$CC
+lt_cv_prog_compiler_c_o_RC=yes
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # 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
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_RC \
+    CC_RC \
+    LD_RC \
+    lt_prog_compiler_wl_RC \
+    lt_prog_compiler_pic_RC \
+    lt_prog_compiler_static_RC \
+    lt_prog_compiler_no_builtin_flag_RC \
+    export_dynamic_flag_spec_RC \
+    thread_safe_flag_spec_RC \
+    whole_archive_flag_spec_RC \
+    enable_shared_with_static_runtimes_RC \
+    old_archive_cmds_RC \
+    old_archive_from_new_cmds_RC \
+    predep_objects_RC \
+    postdep_objects_RC \
+    predeps_RC \
+    postdeps_RC \
+    compiler_lib_search_path_RC \
+    archive_cmds_RC \
+    archive_expsym_cmds_RC \
+    postinstall_cmds_RC \
+    postuninstall_cmds_RC \
+    old_archive_from_expsyms_cmds_RC \
+    allow_undefined_flag_RC \
+    no_undefined_flag_RC \
+    export_symbols_cmds_RC \
+    hardcode_libdir_flag_spec_RC \
+    hardcode_libdir_flag_spec_ld_RC \
+    hardcode_libdir_separator_RC \
+    hardcode_automatic_RC \
+    module_cmds_RC \
+    module_expsym_cmds_RC \
+    lt_cv_prog_compiler_c_o_RC \
+    exclude_expsyms_RC \
+    include_expsyms_RC; do
+
+    case $var in
+    old_archive_cmds_RC | \
+    old_archive_from_new_cmds_RC | \
+    archive_cmds_RC | \
+    archive_expsym_cmds_RC | \
+    module_cmds_RC | \
+    module_expsym_cmds_RC | \
+    old_archive_from_expsyms_cmds_RC | \
+    export_symbols_cmds_RC | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_RC
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_compiler_RC
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_RC
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_RC
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_RC
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_RC
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
+
+# Must we lock files when doing compilation ?
+need_locks=$lt_need_locks
+
+# 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
+
+# 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
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_RC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
+
+# Library versioning type.
+version_type=$version_type
+
+# 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
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_RC
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_RC
+archive_expsym_cmds=$lt_archive_expsym_cmds_RC
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_RC
+module_expsym_cmds=$lt_module_expsym_cmds_RC
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_RC
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_RC
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_RC
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_RC
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_RC
+
+# 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
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_RC
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_RC
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# 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
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_RC
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_RC
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_RC
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_RC
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_RC
+
+# 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
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path_RC"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_RC
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_RC
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_RC
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_RC
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+       ;;
+
+      *)
+       { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
+echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
+   { (exit 1); exit 1; }; }
+       ;;
+      esac
+
+      # Append the new tag name to the list of available tags.
+      if test -n "$tagname" ; then
+      available_tags="$available_tags $tagname"
+    fi
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  # Now substitute the updated list of available tags.
+  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
+    mv "${ofile}T" "$ofile"
+    chmod +x "$ofile"
+  else
+    rm -f "${ofile}T"
+    { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
+echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+fi
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+# Prevent multiple expansion
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f 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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.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))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+
+  succeeded=no
+
+  if test -z "$PKG_CONFIG"; then
+    # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+
+if test -n "$PKG_CONFIG"; then
+  echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  fi
+
+  if test "$PKG_CONFIG" = "no" ; then
+     echo "*** The pkg-config script could not be found. Make sure it is"
+     echo "*** in your path, or set the PKG_CONFIG environment variable"
+     echo "*** to the full path to pkg-config."
+     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
+  else
+     PKG_CONFIG_MIN_VERSION=0.9.0
+     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
+        echo "$as_me:$LINENO: checking for outo >= 0.1.1" >&5
+echo $ECHO_N "checking for outo >= 0.1.1... $ECHO_C" >&6
+
+        if $PKG_CONFIG --exists "outo >= 0.1.1" ; then
+            echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+            succeeded=yes
+
+            echo "$as_me:$LINENO: checking OUTO_CFLAGS" >&5
+echo $ECHO_N "checking OUTO_CFLAGS... $ECHO_C" >&6
+            OUTO_CFLAGS=`$PKG_CONFIG --cflags "outo >= 0.1.1"`
+            echo "$as_me:$LINENO: result: $OUTO_CFLAGS" >&5
+echo "${ECHO_T}$OUTO_CFLAGS" >&6
+
+            echo "$as_me:$LINENO: checking OUTO_LIBS" >&5
+echo $ECHO_N "checking OUTO_LIBS... $ECHO_C" >&6
+            OUTO_LIBS=`$PKG_CONFIG --libs "outo >= 0.1.1"`
+            echo "$as_me:$LINENO: result: $OUTO_LIBS" >&5
+echo "${ECHO_T}$OUTO_LIBS" >&6
+        else
+            OUTO_CFLAGS=""
+            OUTO_LIBS=""
+            ## If we have a custom action on failure, don't print errors, but
+            ## do set a variable so people can do so.
+            OUTO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "outo >= 0.1.1"`
+            echo $OUTO_PKG_ERRORS
+        fi
+
+
+
+     else
+        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
+        echo "*** See http://www.freedesktop.org/software/pkgconfig"
+     fi
+  fi
+
+  if test $succeeded = yes; then
+     :
+  else
+     { { echo "$as_me:$LINENO: error: Library requirements (outo >= 0.1.1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
+echo "$as_me: error: Library requirements (outo >= 0.1.1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+
+
+
+# -pedantic removed due to D-BUS; should be replaced after D-BUS is no
+# longer broken in this regard...
+
+CFLAGS="$CFLAGS -Wall -ansi -Wmissing-prototypes -Wmissing-declarations -Werror"
+
+GTK_VERSION=2.6.4
+
+
+  succeeded=no
+
+  if test -z "$PKG_CONFIG"; then
+    # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+
+if test -n "$PKG_CONFIG"; then
+  echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  fi
+
+  if test "$PKG_CONFIG" = "no" ; then
+     echo "*** The pkg-config script could not be found. Make sure it is"
+     echo "*** in your path, or set the PKG_CONFIG environment variable"
+     echo "*** to the full path to pkg-config."
+     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
+  else
+     PKG_CONFIG_MIN_VERSION=0.9.0
+     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
+        echo "$as_me:$LINENO: checking for hildon-lgpl >= 0.9.1 hildon-fm >= 0.8.6" >&5
+echo $ECHO_N "checking for hildon-lgpl >= 0.9.1 hildon-fm >= 0.8.6... $ECHO_C" >&6
+
+        if $PKG_CONFIG --exists "hildon-lgpl >= 0.9.1 hildon-fm >= 0.8.6" ; then
+            echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+            succeeded=yes
+
+            echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
+echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6
+            GTK_CFLAGS=`$PKG_CONFIG --cflags "hildon-lgpl >= 0.9.1 hildon-fm >= 0.8.6"`
+            echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
+echo "${ECHO_T}$GTK_CFLAGS" >&6
+
+            echo "$as_me:$LINENO: checking GTK_LIBS" >&5
+echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6
+            GTK_LIBS=`$PKG_CONFIG --libs "hildon-lgpl >= 0.9.1 hildon-fm >= 0.8.6"`
+            echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
+echo "${ECHO_T}$GTK_LIBS" >&6
+        else
+            GTK_CFLAGS=""
+            GTK_LIBS=""
+            ## If we have a custom action on failure, don't print errors, but
+            ## do set a variable so people can do so.
+            GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "hildon-lgpl >= 0.9.1 hildon-fm >= 0.8.6"`
+            echo $GTK_PKG_ERRORS
+        fi
+
+
+
+     else
+        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
+        echo "*** See http://www.freedesktop.org/software/pkgconfig"
+     fi
+  fi
+
+  if test $succeeded = yes; then
+     :
+  else
+     { { echo "$as_me:$LINENO: error: Library requirements (hildon-lgpl >= 0.9.1 hildon-fm >= 0.8.6) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
+echo "$as_me: error: Library requirements (hildon-lgpl >= 0.9.1 hildon-fm >= 0.8.6) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+
+
+
+
+
+# The hildon-note uses D-BUS directly as an interim solution for sound
+# playback - remove these after this is no longer the case!
+
+
+  succeeded=no
+
+  if test -z "$PKG_CONFIG"; then
+    # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+
+if test -n "$PKG_CONFIG"; then
+  echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  fi
+
+  if test "$PKG_CONFIG" = "no" ; then
+     echo "*** The pkg-config script could not be found. Make sure it is"
+     echo "*** in your path, or set the PKG_CONFIG environment variable"
+     echo "*** to the full path to pkg-config."
+     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
+  else
+     PKG_CONFIG_MIN_VERSION=0.9.0
+     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
+        echo "$as_me:$LINENO: checking for dbus-glib-1 >= 0.20" >&5
+echo $ECHO_N "checking for dbus-glib-1 >= 0.20... $ECHO_C" >&6
+
+        if $PKG_CONFIG --exists "dbus-glib-1 >= 0.20" ; then
+            echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+            succeeded=yes
+
+            echo "$as_me:$LINENO: checking DBUS_CFLAGS" >&5
+echo $ECHO_N "checking DBUS_CFLAGS... $ECHO_C" >&6
+            DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-glib-1 >= 0.20"`
+            echo "$as_me:$LINENO: result: $DBUS_CFLAGS" >&5
+echo "${ECHO_T}$DBUS_CFLAGS" >&6
+
+            echo "$as_me:$LINENO: checking DBUS_LIBS" >&5
+echo $ECHO_N "checking DBUS_LIBS... $ECHO_C" >&6
+            DBUS_LIBS=`$PKG_CONFIG --libs "dbus-glib-1 >= 0.20"`
+            echo "$as_me:$LINENO: result: $DBUS_LIBS" >&5
+echo "${ECHO_T}$DBUS_LIBS" >&6
+        else
+            DBUS_CFLAGS=""
+            DBUS_LIBS=""
+            ## If we have a custom action on failure, don't print errors, but
+            ## do set a variable so people can do so.
+            DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-glib-1 >= 0.20"`
+            echo $DBUS_PKG_ERRORS
+        fi
+
+
+
+     else
+        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
+        echo "*** See http://www.freedesktop.org/software/pkgconfig"
+     fi
+  fi
+
+  if test $succeeded = yes; then
+     :
+  else
+     { { echo "$as_me:$LINENO: error: Library requirements (dbus-glib-1 >= 0.20) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
+echo "$as_me: error: Library requirements (dbus-glib-1 >= 0.20) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+
+
+
+
+# Related to the previous entry, check if we have ESD headers available.
+# If yes, Hildon-note will build sound support with it; we're phasing
+# away from OSSO Multimedia... Clean this up after ESD is the
+# default.
+
+
+  succeeded=no
+
+  if test -z "$PKG_CONFIG"; then
+    # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+
+if test -n "$PKG_CONFIG"; then
+  echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  fi
+
+  if test "$PKG_CONFIG" = "no" ; then
+     echo "*** The pkg-config script could not be found. Make sure it is"
+     echo "*** in your path, or set the PKG_CONFIG environment variable"
+     echo "*** to the full path to pkg-config."
+     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
+  else
+     PKG_CONFIG_MIN_VERSION=0.9.0
+     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
+        echo "$as_me:$LINENO: checking for esound" >&5
+echo $ECHO_N "checking for esound... $ECHO_C" >&6
+
+        if $PKG_CONFIG --exists "esound" ; then
+            echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+            succeeded=yes
+
+            echo "$as_me:$LINENO: checking ESD_CFLAGS" >&5
+echo $ECHO_N "checking ESD_CFLAGS... $ECHO_C" >&6
+            ESD_CFLAGS=`$PKG_CONFIG --cflags "esound"`
+            echo "$as_me:$LINENO: result: $ESD_CFLAGS" >&5
+echo "${ECHO_T}$ESD_CFLAGS" >&6
+
+            echo "$as_me:$LINENO: checking ESD_LIBS" >&5
+echo $ECHO_N "checking ESD_LIBS... $ECHO_C" >&6
+            ESD_LIBS=`$PKG_CONFIG --libs "esound"`
+            echo "$as_me:$LINENO: result: $ESD_LIBS" >&5
+echo "${ECHO_T}$ESD_LIBS" >&6
+        else
+            ESD_CFLAGS=""
+            ESD_LIBS=""
+            ## If we have a custom action on failure, don't print errors, but
+            ## do set a variable so people can do so.
+            ESD_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "esound"`
+
+        fi
+
+
+
+     else
+        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
+        echo "*** See http://www.freedesktop.org/software/pkgconfig"
+     fi
+  fi
+
+  if test $succeeded = yes; then
+     esd_found=1
+  else
+     esd_found=0
+  fi
+
+if test "x$esd_found" = "x1"; then
+
+
+
+
+
+
+if $ESD; then
+cat >>confdefs.h <<_ACEOF
+#define USE_ESD "1"
+_ACEOF
+
+fi
+
+else
+echo "No ESD found, so falling back to OSSO Multimedia support"
+fi
+
+# Needed to demonstrate how mime-types can be handled with gnome-vfs
+
+  succeeded=no
+
+  if test -z "$PKG_CONFIG"; then
+    # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+
+if test -n "$PKG_CONFIG"; then
+  echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  fi
+
+  if test "$PKG_CONFIG" = "no" ; then
+     echo "*** The pkg-config script could not be found. Make sure it is"
+     echo "*** in your path, or set the PKG_CONFIG environment variable"
+     echo "*** to the full path to pkg-config."
+     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
+  else
+     PKG_CONFIG_MIN_VERSION=0.9.0
+     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
+        echo "$as_me:$LINENO: checking for gnome-vfs-2.0 >= 2.6 gnome-vfs-module-2.0 >= 2.6" >&5
+echo $ECHO_N "checking for gnome-vfs-2.0 >= 2.6 gnome-vfs-module-2.0 >= 2.6... $ECHO_C" >&6
+
+        if $PKG_CONFIG --exists "gnome-vfs-2.0 >= 2.6 gnome-vfs-module-2.0 >= 2.6" ; then
+            echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+            succeeded=yes
+
+            echo "$as_me:$LINENO: checking GNOME_VFS_CFLAGS" >&5
+echo $ECHO_N "checking GNOME_VFS_CFLAGS... $ECHO_C" >&6
+            GNOME_VFS_CFLAGS=`$PKG_CONFIG --cflags "gnome-vfs-2.0 >= 2.6 gnome-vfs-module-2.0 >= 2.6"`
+            echo "$as_me:$LINENO: result: $GNOME_VFS_CFLAGS" >&5
+echo "${ECHO_T}$GNOME_VFS_CFLAGS" >&6
+
+            echo "$as_me:$LINENO: checking GNOME_VFS_LIBS" >&5
+echo $ECHO_N "checking GNOME_VFS_LIBS... $ECHO_C" >&6
+            GNOME_VFS_LIBS=`$PKG_CONFIG --libs "gnome-vfs-2.0 >= 2.6 gnome-vfs-module-2.0 >= 2.6"`
+            echo "$as_me:$LINENO: result: $GNOME_VFS_LIBS" >&5
+echo "${ECHO_T}$GNOME_VFS_LIBS" >&6
+        else
+            GNOME_VFS_CFLAGS=""
+            GNOME_VFS_LIBS=""
+            ## If we have a custom action on failure, don't print errors, but
+            ## do set a variable so people can do so.
+            GNOME_VFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnome-vfs-2.0 >= 2.6 gnome-vfs-module-2.0 >= 2.6"`
+            echo $GNOME_VFS_PKG_ERRORS
+        fi
+
+
+
+     else
+        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
+        echo "*** See http://www.freedesktop.org/software/pkgconfig"
+     fi
+  fi
+
+  if test $succeeded = yes; then
+     :
+  else
+     { { echo "$as_me:$LINENO: error: Library requirements (gnome-vfs-2.0 >= 2.6 gnome-vfs-module-2.0 >= 2.6) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
+echo "$as_me: error: Library requirements (gnome-vfs-2.0 >= 2.6 gnome-vfs-module-2.0 >= 2.6) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+
+
+
+
+
+  succeeded=no
+
+  if test -z "$PKG_CONFIG"; then
+    # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+
+if test -n "$PKG_CONFIG"; then
+  echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  fi
+
+  if test "$PKG_CONFIG" = "no" ; then
+     echo "*** The pkg-config script could not be found. Make sure it is"
+     echo "*** in your path, or set the PKG_CONFIG environment variable"
+     echo "*** to the full path to pkg-config."
+     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
+  else
+     PKG_CONFIG_MIN_VERSION=0.9.0
+     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
+        echo "$as_me:$LINENO: checking for gconf-2.0 >= 2.6" >&5
+echo $ECHO_N "checking for gconf-2.0 >= 2.6... $ECHO_C" >&6
+
+        if $PKG_CONFIG --exists "gconf-2.0 >= 2.6" ; then
+            echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+            succeeded=yes
+
+            echo "$as_me:$LINENO: checking GCONF_CFLAGS" >&5
+echo $ECHO_N "checking GCONF_CFLAGS... $ECHO_C" >&6
+            GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.6"`
+            echo "$as_me:$LINENO: result: $GCONF_CFLAGS" >&5
+echo "${ECHO_T}$GCONF_CFLAGS" >&6
+
+            echo "$as_me:$LINENO: checking GCONF_LIBS" >&5
+echo $ECHO_N "checking GCONF_LIBS... $ECHO_C" >&6
+            GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.6"`
+            echo "$as_me:$LINENO: result: $GCONF_LIBS" >&5
+echo "${ECHO_T}$GCONF_LIBS" >&6
+        else
+            GCONF_CFLAGS=""
+            GCONF_LIBS=""
+            ## If we have a custom action on failure, don't print errors, but
+            ## do set a variable so people can do so.
+            GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.6"`
+            echo $GCONF_PKG_ERRORS
+        fi
+
+
+
+     else
+        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
+        echo "*** See http://www.freedesktop.org/software/pkgconfig"
+     fi
+  fi
+
+  if test $succeeded = yes; then
+     :
+  else
+     { { echo "$as_me:$LINENO: error: Library requirements (gconf-2.0 >= 2.6) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
+echo "$as_me: error: Library requirements (gconf-2.0 >= 2.6) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+
+
+
+
+ALL_LINGUAS="en_GB"
+
+
+
+for ac_header in locale.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+    if test $ac_cv_header_locale_h = yes; then
+    echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
+echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
+if test "${am_cv_val_LC_MESSAGES+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <locale.h>
+int
+main ()
+{
+return LC_MESSAGES
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  am_cv_val_LC_MESSAGES=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+am_cv_val_LC_MESSAGES=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
+echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
+    if test $am_cv_val_LC_MESSAGES = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LC_MESSAGES 1
+_ACEOF
+
+    fi
+  fi
+     USE_NLS=yes
+
+
+    gt_cv_have_gettext=no
+
+    CATOBJEXT=NONE
+    XGETTEXT=:
+    INTLLIBS=
+
+    if test "${ac_cv_header_libintl_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for libintl.h" >&5
+echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
+if test "${ac_cv_header_libintl_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
+echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking libintl.h usability" >&5
+echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <libintl.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking libintl.h presence" >&5
+echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <libintl.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libintl.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: libintl.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: libintl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for libintl.h" >&5
+echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
+if test "${ac_cv_header_libintl_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_libintl_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
+echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
+
+fi
+if test $ac_cv_header_libintl_h = yes; then
+  gt_cv_func_dgettext_libintl="no"
+      libintl_extra_libs=""
+
+      #
+      # First check in libc
+      #
+      echo "$as_me:$LINENO: checking for ngettext in libc" >&5
+echo $ECHO_N "checking for ngettext in libc... $ECHO_C" >&6
+if test "${gt_cv_func_ngettext_libc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <libintl.h>
+
+int
+main ()
+{
+return (int) ngettext ("","", 1)
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  gt_cv_func_ngettext_libc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_func_ngettext_libc=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $gt_cv_func_ngettext_libc" >&5
+echo "${ECHO_T}$gt_cv_func_ngettext_libc" >&6
+
+      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+             echo "$as_me:$LINENO: checking for dgettext in libc" >&5
+echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6
+if test "${gt_cv_func_dgettext_libc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <libintl.h>
+
+int
+main ()
+{
+return (int) dgettext ("","")
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  gt_cv_func_dgettext_libc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_func_dgettext_libc=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
+echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6
+      fi
+
+      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+
+for ac_func in bind_textdomain_codeset
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); 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 $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* 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_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+      fi
+
+      #
+      # If we don't have everything we want, check in libintl
+      #
+      if test "$gt_cv_func_dgettext_libc" != "yes" \
+        || test "$gt_cv_func_ngettext_libc" != "yes" \
+         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
+
+        echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
+echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
+if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char bindtextdomain ();
+int
+main ()
+{
+bindtextdomain ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_intl_bindtextdomain=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_intl_bindtextdomain=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
+echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
+if test $ac_cv_lib_intl_bindtextdomain = yes; then
+  echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5
+echo $ECHO_N "checking for ngettext in -lintl... $ECHO_C" >&6
+if test "${ac_cv_lib_intl_ngettext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char ngettext ();
+int
+main ()
+{
+ngettext ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_intl_ngettext=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_intl_ngettext=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5
+echo "${ECHO_T}$ac_cv_lib_intl_ngettext" >&6
+if test $ac_cv_lib_intl_ngettext = yes; then
+  echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
+echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6
+if test "${ac_cv_lib_intl_dgettext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dgettext ();
+int
+main ()
+{
+dgettext ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_intl_dgettext=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_intl_dgettext=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
+echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6
+if test $ac_cv_lib_intl_dgettext = yes; then
+  gt_cv_func_dgettext_libintl=yes
+fi
+
+fi
+
+fi
+
+
+       if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
+         echo "$as_me:$LINENO: checking if -liconv is needed to use gettext" >&5
+echo $ECHO_N "checking if -liconv is needed to use gettext... $ECHO_C" >&6
+         echo "$as_me:$LINENO: result: " >&5
+echo "${ECHO_T}" >&6
+         echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5
+echo $ECHO_N "checking for ngettext in -lintl... $ECHO_C" >&6
+if test "${ac_cv_lib_intl_ngettext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl -liconv $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char ngettext ();
+int
+main ()
+{
+ngettext ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_intl_ngettext=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_intl_ngettext=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5
+echo "${ECHO_T}$ac_cv_lib_intl_ngettext" >&6
+if test $ac_cv_lib_intl_ngettext = yes; then
+  echo "$as_me:$LINENO: checking for dcgettext in -lintl" >&5
+echo $ECHO_N "checking for dcgettext in -lintl... $ECHO_C" >&6
+if test "${ac_cv_lib_intl_dcgettext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl -liconv $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dcgettext ();
+int
+main ()
+{
+dcgettext ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_intl_dcgettext=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_intl_dcgettext=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dcgettext" >&5
+echo "${ECHO_T}$ac_cv_lib_intl_dcgettext" >&6
+if test $ac_cv_lib_intl_dcgettext = yes; then
+  gt_cv_func_dgettext_libintl=yes
+                       libintl_extra_libs=-liconv
+else
+  :
+fi
+
+else
+  :
+fi
+
+        fi
+
+        #
+        # If we found libintl, then check in it for bind_textdomain_codeset();
+        # we'll prefer libc if neither have bind_textdomain_codeset(),
+        # and both have dgettext and ngettext
+        #
+        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
+          glib_save_LIBS="$LIBS"
+          LIBS="$LIBS -lintl $libintl_extra_libs"
+          unset ac_cv_func_bind_textdomain_codeset
+
+for ac_func in bind_textdomain_codeset
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); 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 $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* 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_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+          LIBS="$glib_save_LIBS"
+
+          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
+            gt_cv_func_dgettext_libc=no
+          else
+            if test "$gt_cv_func_dgettext_libc" = "yes" \
+               && test "$gt_cv_func_ngettext_libc" = "yes"; then
+              gt_cv_func_dgettext_libintl=no
+            fi
+          fi
+        fi
+      fi
+
+      if test "$gt_cv_func_dgettext_libc" = "yes" \
+       || test "$gt_cv_func_dgettext_libintl" = "yes"; then
+        gt_cv_have_gettext=yes
+      fi
+
+      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
+        INTLLIBS="-lintl $libintl_extra_libs"
+      fi
+
+      if test "$gt_cv_have_gettext" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETTEXT 1
+_ACEOF
+
+       # Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_MSGFMT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case "$MSGFMT" in
+  /*)
+  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+       ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+       break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
+  ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test "$MSGFMT" != "no"; then
+  echo "$as_me:$LINENO: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+       if test "$MSGFMT" != "no"; then
+          glib_save_LIBS="$LIBS"
+          LIBS="$LIBS $INTLLIBS"
+
+for ac_func in dcgettext
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); 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 $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* 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_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+         # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_GMSGFMT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $GMSGFMT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GMSGFMT="$GMSGFMT" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+  ;;
+esac
+fi
+GMSGFMT=$ac_cv_path_GMSGFMT
+
+if test -n "$GMSGFMT"; then
+  echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+echo "${ECHO_T}$GMSGFMT" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+         # Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_XGETTEXT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case "$XGETTEXT" in
+  /*)
+  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+       ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+       break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+  ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test "$XGETTEXT" != ":"; then
+  echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+         cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+extern int _nl_msg_cat_cntr;
+                        return _nl_msg_cat_cntr
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  CATOBJEXT=.gmo
+             DATADIRNAME=share
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+case $host in
+           *-*-solaris*)
+                                                               echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5
+echo $ECHO_N "checking for bind_textdomain_codeset... $ECHO_C" >&6
+if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define bind_textdomain_codeset to an innocuous variant, in case <limits.h> declares bind_textdomain_codeset.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define bind_textdomain_codeset innocuous_bind_textdomain_codeset
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char bind_textdomain_codeset (); 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 bind_textdomain_codeset
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char bind_textdomain_codeset ();
+/* 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_bind_textdomain_codeset) || defined (__stub___bind_textdomain_codeset)
+choke me
+#else
+char (*f) () = bind_textdomain_codeset;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != bind_textdomain_codeset;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_bind_textdomain_codeset=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_bind_textdomain_codeset=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5
+echo "${ECHO_T}$ac_cv_func_bind_textdomain_codeset" >&6
+if test $ac_cv_func_bind_textdomain_codeset = yes; then
+  CATOBJEXT=.gmo
+               DATADIRNAME=share
+else
+  CATOBJEXT=.mo
+               DATADIRNAME=lib
+fi
+
+           ;;
+           *)
+           CATOBJEXT=.mo
+            DATADIRNAME=lib
+           ;;
+           esac
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+          LIBS="$glib_save_LIBS"
+         INSTOBJEXT=.mo
+       else
+         gt_cv_have_gettext=no
+       fi
+      fi
+
+fi
+
+
+
+    if test "$gt_cv_have_gettext" = "yes" ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_NLS 1
+_ACEOF
+
+    fi
+
+        if test "$XGETTEXT" != ":"; then
+                  if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+        : ;
+      else
+        echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
+echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
+        XGETTEXT=":"
+      fi
+    fi
+
+    # We need to process the po/ directory.
+    POSUB=po
+
+              ac_config_commands="$ac_config_commands default-1"
+
+
+                for lang in $ALL_LINGUAS; do
+      GMOFILES="$GMOFILES $lang.gmo"
+      POFILES="$POFILES $lang.po"
+    done
+
+
+
+
+
+
+
+
+
+
+
+
+
+   if test "$gt_cv_have_gettext" = "yes"; then
+     if test "x$ALL_LINGUAS" = "x"; then
+       LINGUAS=
+     else
+       echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
+echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
+       NEW_LINGUAS=
+       for presentlang in $ALL_LINGUAS; do
+         useit=no
+         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
+           desiredlanguages="$LINGUAS"
+         else
+           desiredlanguages="$ALL_LINGUAS"
+         fi
+         for desiredlang in $desiredlanguages; do
+          # Use the presentlang catalog if desiredlang is
+           #   a. equal to presentlang, or
+           #   b. a variant of presentlang (because in this case,
+           #      presentlang can be used as a fallback for messages
+           #      which are not translated in the desiredlang catalog).
+           case "$desiredlang" in
+             "$presentlang"*) useit=yes;;
+           esac
+         done
+         if test $useit = yes; then
+           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
+         fi
+       done
+       LINGUAS=$NEW_LINGUAS
+       echo "$as_me:$LINENO: result: $LINGUAS" >&5
+echo "${ECHO_T}$LINGUAS" >&6
+     fi
+
+          if test -n "$LINGUAS"; then
+       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+     fi
+   fi
+
+            MKINSTALLDIRS=
+   if test -n "$ac_aux_dir"; then
+     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+   fi
+   if test -z "$MKINSTALLDIRS"; then
+     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+   fi
+
+
+         test -d po || mkdir po
+   if test "x$srcdir" != "x."; then
+     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+       posrcprefix="$srcdir/"
+     else
+       posrcprefix="../$srcdir/"
+     fi
+   else
+     posrcprefix="../"
+   fi
+   rm -f po/POTFILES
+   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,        $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+       < $srcdir/po/POTFILES.in > po/POTFILES
+
+
+##################################################
+# Check for gtk-doc.
+##################################################
+
+
+# Check whether --with-html-dir or --without-html-dir was given.
+if test "${with_html_dir+set}" = set; then
+  withval="$with_html_dir"
+
+fi;
+
+if test "x$with_html_dir" = "x" ; then
+  HTML_DIR='${datadir}/gtk-doc/html'
+else
+  HTML_DIR=$with_html_dir
+fi
+
+# Extract the first word of "gtkdoc-mkdb", so it can be a program name with args.
+set dummy gtkdoc-mkdb; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_GTKDOC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$GTKDOC"; then
+  ac_cv_prog_GTKDOC="$GTKDOC" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_GTKDOC="true"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_GTKDOC" && ac_cv_prog_GTKDOC="false"
+fi
+fi
+GTKDOC=$ac_cv_prog_GTKDOC
+if test -n "$GTKDOC"; then
+  echo "$as_me:$LINENO: result: $GTKDOC" >&5
+echo "${ECHO_T}$GTKDOC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+gtk_doc_min_version=0.10
+if $GTKDOC ; then
+    gtk_doc_version=`gtkdoc-mkdb --version`
+    echo "$as_me:$LINENO: checking gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version
+" >&5
+echo $ECHO_N "checking gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version
+... $ECHO_C" >&6
+    if perl <<EOF ; then
+      exit (("$gtk_doc_version" =~ /^[0-9]+\.[0-9]+$/) &&
+            ("$gtk_doc_version" >= "$gtk_doc_min_version") ? 0 : 1);
+EOF
+      echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+   else
+      echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+      GTKDOC=false
+   fi
+fi
+
+# Let people disable the gtk-doc stuff.
+# Check whether --enable-gtk-doc or --disable-gtk-doc was given.
+if test "${enable_gtk_doc+set}" = set; then
+  enableval="$enable_gtk_doc"
+  enable_gtk_doc="$enableval"
+else
+  enable_gtk_doc=yes
+fi;
+
+if test x$enable_gtk_doc = xauto ; then
+  if test x$GTKDOC = xtrue ; then
+    enable_gtk_doc=yes
+  else
+    enable_gtk_doc=no
+  fi
+fi
+
+
+
+if test x$enable_gtk_doc = xyes; then
+  ENABLE_GTK_DOC_TRUE=
+  ENABLE_GTK_DOC_FALSE='#'
+else
+  ENABLE_GTK_DOC_TRUE='#'
+  ENABLE_GTK_DOC_FALSE=
+fi
+
+
+# Extract the first word of "doxygen", so it can be a program name with args.
+set dummy doxygen; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_DOXYGEN_FOUND+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$DOXYGEN_FOUND"; then
+  ac_cv_prog_DOXYGEN_FOUND="$DOXYGEN_FOUND" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_DOXYGEN_FOUND="yes"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_DOXYGEN_FOUND" && ac_cv_prog_DOXYGEN_FOUND="no"
+fi
+fi
+DOXYGEN_FOUND=$ac_cv_prog_DOXYGEN_FOUND
+if test -n "$DOXYGEN_FOUND"; then
+  echo "$as_me:$LINENO: result: $DOXYGEN_FOUND" >&5
+echo "${ECHO_T}$DOXYGEN_FOUND" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+
+if test "$DOXYGEN_FOUND" = "yes"; then
+  HAVE_DOXYGEN_TRUE=
+  HAVE_DOXYGEN_FALSE='#'
+else
+  HAVE_DOXYGEN_TRUE='#'
+  HAVE_DOXYGEN_FALSE=
+fi
+
+
+localedir=${datadir}/locale
+outomoduledir=${libdir}/outo
+
+# Check whether --enable-doc-dir or --disable-doc-dir was given.
+if test "${enable_doc_dir+set}" = set; then
+  enableval="$enable_doc_dir"
+
+fi;
+if test "x$with_doc_dir" = "x" ; then
+  docdir='${datadir}/doc'
+else
+  docdir=$with_doc_dir
+fi
+
+HTML_DIR=${docdir}/html
+
+
+
+
+
+
+                                                                      ac_config_files="$ac_config_files Makefile hildon-widgets/Makefile ut/Makefile po/Makefile po/porules.mk doc/Makefile hildon-libs.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, don't put newlines in cache variables' values.
+# 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.
+{
+  (set) 2>&1 |
+    case `(ac_space=' '; set | grep ac_space) 2>&1` in
+    *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 \
+       "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+} |
+  sed '
+     t clear
+     : clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+  if test -w $cache_file; then
+    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+    cat confcache >$cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  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}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ 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[        ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[    ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[      ]*$//;
+}'
+fi
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_i=`echo "$ac_i" |
+        sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+  # 2. Add them.
+  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"ENABLE_GTK_DOC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"ENABLE_GTK_DOC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_DOXYGEN_TRUE}" && test -z "${HAVE_DOXYGEN_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"HAVE_DOXYGEN\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"HAVE_DOXYGEN\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $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}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# 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+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; 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
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)$' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+         /^X\/\(\/\/\)$/{ s//\1/; q; }
+         /^X\/\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# 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
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  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
+
+       ;;
+  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
+    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+        case $as_dir in
+        /*)
+          if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+            $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+            $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+            CONFIG_SHELL=$as_dir/$as_base
+            export CONFIG_SHELL
+            exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+          fi;;
+        esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+   { (exit 1); exit 1; }; }
+
+  # 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 sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='     ' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# 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'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS="  $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.  Logging --version etc. is OK.
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -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
+      --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 <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.59,
+  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+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=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  *) # This is not an option, so the user has probably given explicit
+     # arguments.
+     ac_option=$1
+     ac_need_defaults=false;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --vers* | -V )
+    echo "$ac_cs_version"; exit 0 ;;
+  --he | --h)
+    # Conflict between --help and --header
+    { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit 0 ;;
+  --debug | --d* | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    ac_need_defaults=false;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1" ;;
+
+  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
+if \$ac_cs_recheck; then
+  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+_ACEOF
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+  case "$ac_config_target" in
+  # Handling of arguments.
+  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+  "hildon-widgets/Makefile" ) CONFIG_FILES="$CONFIG_FILES hildon-widgets/Makefile" ;;
+  "ut/Makefile" ) CONFIG_FILES="$CONFIG_FILES ut/Makefile" ;;
+  "po/Makefile" ) CONFIG_FILES="$CONFIG_FILES po/Makefile" ;;
+  "po/porules.mk" ) CONFIG_FILES="$CONFIG_FILES po/porules.mk" ;;
+  "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
+  "hildon-libs.pc" ) CONFIG_FILES="$CONFIG_FILES hildon-libs.pc" ;;
+  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+  "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  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 to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./confstat$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+  # Protect against being on the right side of a sed subst in config.status.
+  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@CYGPATH_W@,$CYGPATH_W,;t t
+s,@PACKAGE@,$PACKAGE,;t t
+s,@VERSION@,$VERSION,;t t
+s,@ACLOCAL@,$ACLOCAL,;t t
+s,@AUTOCONF@,$AUTOCONF,;t t
+s,@AUTOMAKE@,$AUTOMAKE,;t t
+s,@AUTOHEADER@,$AUTOHEADER,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@install_sh@,$install_sh,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@AWK@,$AWK,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@am__leading_dot@,$am__leading_dot,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@DEPDIR@,$DEPDIR,;t t
+s,@am__include@,$am__include,;t t
+s,@am__quote@,$am__quote,;t t
+s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
+s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
+s,@CCDEPMODE@,$CCDEPMODE,;t t
+s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
+s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
+s,@CPP@,$CPP,;t t
+s,@EGREP@,$EGREP,;t t
+s,@LN_S@,$LN_S,;t t
+s,@ECHO@,$ECHO,;t t
+s,@AR@,$AR,;t t
+s,@ac_ct_AR@,$ac_ct_AR,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@CXX@,$CXX,;t t
+s,@CXXFLAGS@,$CXXFLAGS,;t t
+s,@ac_ct_CXX@,$ac_ct_CXX,;t t
+s,@CXXDEPMODE@,$CXXDEPMODE,;t t
+s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t
+s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t
+s,@CXXCPP@,$CXXCPP,;t t
+s,@F77@,$F77,;t t
+s,@FFLAGS@,$FFLAGS,;t t
+s,@ac_ct_F77@,$ac_ct_F77,;t t
+s,@LIBTOOL@,$LIBTOOL,;t t
+s,@PKG_CONFIG@,$PKG_CONFIG,;t t
+s,@OUTO_CFLAGS@,$OUTO_CFLAGS,;t t
+s,@OUTO_LIBS@,$OUTO_LIBS,;t t
+s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t
+s,@GTK_LIBS@,$GTK_LIBS,;t t
+s,@GTK_VERSION@,$GTK_VERSION,;t t
+s,@DBUS_CFLAGS@,$DBUS_CFLAGS,;t t
+s,@DBUS_LIBS@,$DBUS_LIBS,;t t
+s,@ESD_CFLAGS@,$ESD_CFLAGS,;t t
+s,@ESD_LIBS@,$ESD_LIBS,;t t
+s,@GNOME_VFS_CFLAGS@,$GNOME_VFS_CFLAGS,;t t
+s,@GNOME_VFS_LIBS@,$GNOME_VFS_LIBS,;t t
+s,@GCONF_CFLAGS@,$GCONF_CFLAGS,;t t
+s,@GCONF_LIBS@,$GCONF_LIBS,;t t
+s,@ALL_LINGUAS@,$ALL_LINGUAS,;t t
+s,@USE_NLS@,$USE_NLS,;t t
+s,@MSGFMT@,$MSGFMT,;t t
+s,@GMSGFMT@,$GMSGFMT,;t t
+s,@XGETTEXT@,$XGETTEXT,;t t
+s,@CATALOGS@,$CATALOGS,;t t
+s,@CATOBJEXT@,$CATOBJEXT,;t t
+s,@DATADIRNAME@,$DATADIRNAME,;t t
+s,@GMOFILES@,$GMOFILES,;t t
+s,@INSTOBJEXT@,$INSTOBJEXT,;t t
+s,@INTLLIBS@,$INTLLIBS,;t t
+s,@PO_IN_DATADIR_TRUE@,$PO_IN_DATADIR_TRUE,;t t
+s,@PO_IN_DATADIR_FALSE@,$PO_IN_DATADIR_FALSE,;t t
+s,@POFILES@,$POFILES,;t t
+s,@POSUB@,$POSUB,;t t
+s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
+s,@GTKDOC@,$GTKDOC,;t t
+s,@ENABLE_GTK_DOC_TRUE@,$ENABLE_GTK_DOC_TRUE,;t t
+s,@ENABLE_GTK_DOC_FALSE@,$ENABLE_GTK_DOC_FALSE,;t t
+s,@DOXYGEN_FOUND@,$DOXYGEN_FOUND,;t t
+s,@HAVE_DOXYGEN_TRUE@,$HAVE_DOXYGEN_TRUE,;t t
+s,@HAVE_DOXYGEN_FALSE@,$HAVE_DOXYGEN_FALSE,;t t
+s,@docdir@,$docdir,;t t
+s,@localedir@,$localedir,;t t
+s,@outomoduledir@,$outomoduledir,;t t
+s,@HTML_DIR@,$HTML_DIR,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+  cat >>$CONFIG_STATUS <<\_ACEOF
+  # Split the substitutions into bite-sized pieces for seds with
+  # small command number limits, like on Digital OSF/1 and HP-UX.
+  ac_max_sed_lines=48
+  ac_sed_frag=1 # Number of current file.
+  ac_beg=1 # First line for current file.
+  ac_end=$ac_max_sed_lines # Line after last line for current file.
+  ac_more_lines=:
+  ac_sed_cmds=
+  while $ac_more_lines; do
+    if test $ac_beg -gt 1; then
+      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    else
+      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    fi
+    if test ! -s $tmp/subs.frag; then
+      ac_more_lines=false
+    else
+      # The purpose of the label and of the branching condition is to
+      # speed up the sed processing (if there are no `@' at all, there
+      # is no need to browse any of the substitutions).
+      # These are the two extra sed commands mentioned above.
+      (echo ':t
+  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+      if test -z "$ac_sed_cmds"; then
+       ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+      else
+       ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+      fi
+      ac_sed_frag=`expr $ac_sed_frag + 1`
+      ac_beg=$ac_end
+      ac_end=`expr $ac_end + $ac_max_sed_lines`
+    fi
+  done
+  if test -z "$ac_sed_cmds"; then
+    ac_sed_cmds=cat
+  fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+       cat >$tmp/stdin
+       ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+       ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+       ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$ac_file" : 'X\(//\)[^/]' \| \
+        X"$ac_file" : 'X\(//\)$' \| \
+        X"$ac_file" : 'X\(/\)' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+  esac
+
+  # 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.  */
+  if test x"$ac_file" = x-; then
+    configure_input=
+  else
+    configure_input="$ac_file.  "
+  fi
+  configure_input=$configure_input"Generated from `echo $ac_file_in |
+                                    sed 's,.*/,,'` by configure."
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+        # Absolute (can't be DOS-style, as IFS=:)
+        test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+        echo "$f";;
+      *) # Relative
+        if test -f "$f"; then
+          # Build tree
+          echo "$f"
+        elif test -f "$srcdir/$f"; then
+          # Source tree
+          echo "$srcdir/$f"
+        else
+          # /dev/null tree
+          { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+        fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;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,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+  rm -f $tmp/stdin
+  if test x"$ac_file" != x-; then
+    mv $tmp/out $ac_file
+  else
+    cat $tmp/out
+    rm -f $tmp/out
+  fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
+ac_dB='[        ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+       cat >$tmp/stdin
+       ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+       ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+       ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+        # Absolute (can't be DOS-style, as IFS=:)
+        test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+        # Do quote $f, to prevent DOS paths from being IFS'd.
+        echo "$f";;
+      *) # Relative
+        if test -f "$f"; then
+          # Build tree
+          echo "$f"
+        elif test -f "$srcdir/$f"; then
+          # Source tree
+          echo "$srcdir/$f"
+        else
+          # /dev/null tree
+          { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+        fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  # Remove the trailing spaces.
+  sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h.  The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status.  Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless.  Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #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.
+cat >>conftest.undefs <<\_ACEOF
+s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo '  if grep "^[     ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo '  :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+  # Write a limited-size here document to $tmp/defines.sed.
+  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#define' lines.
+  echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/defines.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+  rm -f conftest.defines
+  mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo '  fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+do
+  # Write a limited-size here document to $tmp/undefs.sed.
+  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#undef'
+  echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+  rm -f conftest.undefs
+  mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+  # 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.  */
+  if test x"$ac_file" = x-; then
+    echo "/* Generated by configure.  */" >$tmp/config.h
+  else
+    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
+  fi
+  cat $tmp/in >>$tmp/config.h
+  rm -f $tmp/in
+  if test x"$ac_file" != x-; then
+    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$ac_file" : 'X\(//\)[^/]' \| \
+        X"$ac_file" : 'X\(//\)$' \| \
+        X"$ac_file" : 'X\(/\)' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+      { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+      rm -f $ac_file
+      mv $tmp/config.h $ac_file
+    fi
+  else
+    cat $tmp/config.h
+    rm -f $tmp/config.h
+  fi
+# Compute $ac_file's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $ac_file | $ac_file:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
+$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X$ac_file : 'X\(//\)[^/]' \| \
+        X$ac_file : 'X\(//\)$' \| \
+        X$ac_file : 'X\(/\)' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X$ac_file |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`/stamp-h$_am_stamp_count
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$ac_dest" : 'X\(//\)[^/]' \| \
+        X"$ac_dest" : 'X\(//\)$' \| \
+        X"$ac_dest" : 'X\(/\)' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+  case $ac_dest in
+    depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; 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.
+  # So let's grep whole file.
+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+    dirpart=`(dirname "$mf") 2>/dev/null ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$mf" : 'X\(//\)[^/]' \| \
+        X"$mf" : 'X\(//\)$' \| \
+        X"$mf" : 'X\(/\)' \| \
+        .     : '\(.\)' 2>/dev/null ||
+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
+  grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
+  # Extract the definition of DEP_FILES from the Makefile without
+  # running `make'.
+  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n -e '/^U = / s///p' < "$mf"`
+  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+  # 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 -e '
+    /^DEP_FILES = .*\\\\$/ {
+      s/^DEP_FILES = //
+      :loop
+       s/\\\\$//
+       p
+       n
+       /\\\\$/ b loop
+      p
+    }
+    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`(dirname "$file") 2>/dev/null ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$file" : 'X\(//\)[^/]' \| \
+        X"$file" : 'X\(//\)$' \| \
+        X"$file" : 'X\(/\)' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+    { if $as_mkdir_p; then
+    mkdir -p $dirpart/$fdir
+  else
+    as_dir=$dirpart/$fdir
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+ ;;
+    default-1 ) case "$CONFIG_FILES" in *po/Makefile.in*)
+        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+      esac ;;
+  esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# 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 || { (exit 1); exit 1; }
+fi
+
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..d1d8ced
--- /dev/null
@@ -0,0 +1,139 @@
+AC_INIT(Makefile.am)
+AM_INIT_AUTOMAKE(hildon-libs, 0.9.6)
+AM_CONFIG_HEADER(config.h)
+
+AC_CANONICAL_HOST
+
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_INSTALL
+AC_PROG_AWK
+AC_PROG_LIBTOOL
+
+AC_HEADER_STDC
+PKG_CHECK_MODULES(OUTO, outo >= 0.1.1)
+AC_SUBST(OUTO_CFLAGS)
+
+# -pedantic removed due to D-BUS; should be replaced after D-BUS is no
+# longer broken in this regard...
+
+CFLAGS="$CFLAGS -Wall -ansi -Wmissing-prototypes -Wmissing-declarations -Werror"
+
+GTK_VERSION=2.6.4
+
+PKG_CHECK_MODULES(GTK, hildon-lgpl >= 0.9.1 hildon-fm >= 0.8.6)
+AC_SUBST(GTK_LIBS)
+AC_SUBST(GTK_CFLAGS)
+AC_SUBST(GTK_VERSION)
+
+# The hildon-note uses D-BUS directly as an interim solution for sound
+# playback - remove these after this is no longer the case!
+
+PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.20)
+AC_SUBST(DBUS_LIBS)
+AC_SUBST(DBUS_CFLAGS)
+
+# Related to the previous entry, check if we have ESD headers available.
+# If yes, Hildon-note will build sound support with it; we're phasing
+# away from OSSO Multimedia... Clean this up after ESD is the
+# default.
+
+PKG_CHECK_MODULES(ESD, esound, esd_found=1, esd_found=0)
+if test "x$esd_found" = "x1"; then
+AC_SUBST(ESD_LIBS)
+AC_SUBST(ESD_CFLAGS)
+
+AH_TEMPLATE([USE_ESD], [1 if ESD is available])
+
+if $ESD; then
+AC_DEFINE_UNQUOTED([USE_ESD], ["1"])
+fi
+
+else
+echo "No ESD found, so falling back to OSSO Multimedia support"
+fi
+
+# Needed to demonstrate how mime-types can be handled with gnome-vfs
+PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0 >= 2.6 gnome-vfs-module-2.0 >= 2.6)
+AC_SUBST(GNOME_VFS_CFLAGS)
+AC_SUBST(GNOME_VFS_LIBS)
+
+PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 2.6)
+AC_SUBST(GCONF_CFLAGS)
+AC_SUBST(GCONF_LIBS)
+
+ALL_LINGUAS="en_GB"
+AC_SUBST(ALL_LINGUAS) 
+AM_GLIB_GNU_GETTEXT
+
+##################################################
+# Check for gtk-doc.
+##################################################
+
+AC_ARG_WITH(html-dir, [  --with-html-dir=PATH    path to installed docs ])
+
+if test "x$with_html_dir" = "x" ; then
+  HTML_DIR='${datadir}/gtk-doc/html'
+else
+  HTML_DIR=$with_html_dir
+fi
+
+AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
+
+gtk_doc_min_version=0.10
+if $GTKDOC ; then
+    gtk_doc_version=`gtkdoc-mkdb --version`
+    AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version]
+)
+    if perl <<EOF ; then
+      exit (("$gtk_doc_version" =~ /^[[0-9]]+\.[[0-9]]+$/) &&
+            ("$gtk_doc_version" >= "$gtk_doc_min_version") ? 0 : 1);
+EOF
+      AC_MSG_RESULT(yes)
+   else
+      AC_MSG_RESULT(no)
+      GTKDOC=false
+   fi
+fi
+
+# Let people disable the gtk-doc stuff.
+AC_ARG_ENABLE(gtk-doc, [  --enable-gtk-doc        use gtk-doc to build documenta
+tion [default=yes]], enable_gtk_doc="$enableval", enable_gtk_doc=yes)
+
+if test x$enable_gtk_doc = xauto ; then
+  if test x$GTKDOC = xtrue ; then
+    enable_gtk_doc=yes
+  else
+    enable_gtk_doc=no
+  fi
+fi
+
+AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
+
+AC_CHECK_PROG(DOXYGEN_FOUND, doxygen, yes, no)
+AM_CONDITIONAL(HAVE_DOXYGEN, [test "$DOXYGEN_FOUND" = "yes"])
+
+localedir=${datadir}/locale
+outomoduledir=${libdir}/outo
+
+AC_ARG_ENABLE(doc-dir, [ --with-doc-dir=PATH path to installed docs ])
+if test "x$with_doc_dir" = "x" ; then
+  docdir='${datadir}/doc'
+else
+  docdir=$with_doc_dir 
+fi
+
+HTML_DIR=${docdir}/html
+
+AC_SUBST(docdir)
+AC_SUBST(localedir)
+AC_SUBST(outomoduledir)
+AC_SUBST(HTML_DIR)
+
+AC_OUTPUT(Makefile \
+  hildon-widgets/Makefile \
+       ut/Makefile \
+       po/Makefile \
+       po/porules.mk \
+       doc/Makefile \
+       hildon-libs.pc)
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..bc1c7bc
--- /dev/null
@@ -0,0 +1,411 @@
+hildon-libs (0.9.6-2) unstable; urgency=low
+
+  * removed extra locales
+
+ -- Nokia <Nokia>  Sun,  22 May 2005 18:27:55 +0300
+
+hildon-libs (0.9.6-1) unstable; urgency=low
+
+  * Cleaned non-logical and obsolete strings
+  * Updated localization
+
+ -- First Release <Nokia>  Wed,  6 Apr 2005 18:27:55 +0300
+
+hildon-libs (0.9.5-1) unstable; urgency=low
+
+  * Seekbar fixes
+  * Updated dependency to newest GTK
+
+
+hildon-libs (0.9.4-1) unstable; urgency=low
+
+  * Fixed #2953 (HildonNumberEditor returns maximum value when it is
+    empy)
+  * Fixed #5542 (Hildon number editor behaviour is not inlined with UI
+    SPEC)
+  * Fixed #8386 (Incorrect + and - button showing in HildonNumberEditor)
+
+
+hildon-libs (0.9.3-1) unstable; urgency=low
+
+  * Fixed #8416 (Icons were missing in most of the information notes
+    displayed by the applications)
+  * Removed a useless focus grabbing to avoid focus flashing when
+    scrolling the page with focused item in it (task1645).
+  * Fixed #4276 (HildonDateEditor - When user enters a date manually in
+    the dateeditor, it is not accepted)
+  * Fixed #6050 (HildonDateEditor : No calendar icon debchange Fixed
+
+
+hildon-libs (0.9.2-1) unstable; urgency=low
+
+  * Updated to GTK 2.6
+
+
+hildon-libs (0.9.1-1) unstable; urgency=low
+
+  * GTK 2.6 Fixes
+
+
+hildon-libs (0.8.25-1) unstable; urgency=low
+
+  * Fixed hildon-time-editor to use icon name instead of stock icons
+  * Fixed hildon-time-editor pixels so that the previously unvisible
+    frame is show.
+  * Fixed po headers
+  * Fixed #3440 (HildonSetPasswordDialog - on pressing ENTER hard key
+    the field is getting cleared(reset))
+
+
+hildon-libs (0.8.24-1) unstable; urgency=low
+
+  * Update HildonGrid not to change focus when scrolled
+  * Dialogs: Keyboard navigation for each dialog, the focus must cycle
+    around the dialog widgets
+
+
+hildon-libs (0.8.23-1) unstable; urgency=low
+
+  * Fixed po issues
+  * Fixed logical localization IDs in all widgets according to WS 2.0
+    part 2
+  * Separated the More Colors selector to its own widget from the Color
+    Selector Widget
+
+
+hildon-libs (0.8.22-1) unstable; urgency=low
+
+  * Added es_MX and fr_CA
+  * Renamed localization packages: fi -> fi_FI
+
+
+hildon-libs (0.8.21-2) unstable; urgency=low
+
+  * Updated dependency to hildon-fm1
+
+
+hildon-libs (0.8.21-1) unstable; urgency=low
+
+  * ControlBar: application option for minimum number of visible bars
+
+
+hildon-libs (0.8.20-1) unstable; urgency=low
+
+  * Fixed #4638 (Updates to <Filetype> Details Dialog (WUD-DIA272)
+  * ColorSelector: add new color
+  * Number editor errorhandling improvements and localization
+  * VolumeBar: hardkey mute/unmute addition
+
+
+hildon-libs (0.8.19-1) unstable; urgency=low
+
+  * Seekbar: Added a feature that allows a different stream graphics to be shown
+    when streaming is complete.
+  * Fixed #6383 (hildon-libs, hildon-lgpl --- refers to new API provided
+    by updated gtk, but this is not specified in build-deps.)
+  * Fixed #6355 (HildonFontSelectionDialog - Segmentation Fault)
+
+
+hildon-libs (0.8.18-1) unstable; urgency=low
+
+  * Merge had happened against non-100% HEAD code, thus rebuilding...
+
+
+hildon-libs (0.8.17-1) unstable; urgency=low
+
+  * Added support for GTK icon theme names (task1777)
+  * hildon
+
+
+hildon-libs (0.8.16-1) unstable; urgency=low
+
+  * Fixed #5705 (HildonFontSelectionDialog crashes with Nokia Sans font
+    when selecting bold face)
+  * Fixed #5739 (FontSelectionDialog allows choosing italic face even
+    though it doesn't exist for some fonts)
+
+
+hildon-libs (0.8.15-1) unstable; urgency=low
+
+  * HildonFontSelectionDialog updates
+
+
+hildon-libs (0.8.14-1) unstable; urgency=low
+
+  * Fixed #3827 (HildonVolumebar is not dimmed when volume is muted)
+
+
+hildon-libs (0.8.13-1) unstable; urgency=low
+
+  * Timepicker skin updates
+
+
+hildon-libs (0.8.12-1) unstable; urgency=low
+
+  * Debianized locale-packages
+  * Fixed #4704 (libraries should be versioned)
+
+
+hildon-libs (0.8.11-1) unstable; urgency=low
+
+  * Fixed #1638 (HildonSeekBar & HilldonVolumeBar: widgets grab focus and
+    keypress events). Fixed by adding an option for applications to set focus
+    on/off
+
+
+hildon-libs (0.8.10-1) unstable; urgency=low
+
+  * Editors: Changed the focus behaviour inside a widget
+  * Fixed #3689 (It is not possible to adjust sound level through navigational
+    keys.). Mute button no longer can get focus. 
+
+
+hildon-libs (0.8.9-1) unstable; urgency=low
+
+  * Fixed #4285 (API docs contain old/deprecated widgets) 
+
+
+hildon-libs (0.8.8-2) unstable; urgency=low
+
+  * Added GnomeVFS dependencies
+
+
+hildon-libs (0.8.8-1) unstable; urgency=low
+
+  * Added sound support to hildon-note. Requires DBUS and osso-sounds-ui.
+  * Removed erroneus version dependency from pkgconfig file for fm and lgp.
+
+
+hildon-libs (0.8.7-1) unstable; urgency=low
+
+  * Fixed #4652 (missing dependency to hildon-fm-dev)
+  * Removed dependency to matchbox 
+
+
+hildon-libs (0.8.6-1) unstable; urgency=low
+
+  * Lots of updates from development. 
+
+
+hildon-libs (0.8.5-1) unstable; urgency=low
+
+  * Release 0.8.5 
+
+
+hildon-libs (0.8.4-3) unstable; urgency=low
+
+  * HildonRangeEditor: Changed author, removed #include
+  * Updated GTK doc
+
+
+hildon-libs (0.8.4-1) unstable; urgency=low
+
+  * Teema 0.8.4 Release
+
+
+hildon-libs (0.8.3-10) unstable; urgency=low
+
+  * Nightly build
+
+
+hildon-libs (0.8.3-9) unstable; urgency=low
+
+  * Nightly build
+
+
+hildon-libs (0.8.3-8) unstable; urgency=low
+
+  * Nightly build
+
+
+hildon-libs (0.8.3-7) unstable; urgency=low
+
+  * Nightly build
+
+
+hildon-libs (0.8.3-6) unstable; urgency=low
+
+  * Nightly build
+
+
+hildon-libs (0.8.3-5) unstable; urgency=low
+
+  * Nightly build
+
+
+hildon-libs (0.8.3-4) unstable; urgency=low
+
+  * Nightly build
+
+
+hildon-libs (0.8.3-3) unstable; urgency=low
+
+  * Nightly build
+
+
+hildon-libs (0.8.3-2) unstable; urgency=low
+
+  * Nightly build
+
+
+hildon-libs (0.8.3-1) unstable; urgency=low
+
+  * Teema 0.8.3 release
+
+
+hildon-libs (0.8.2-6) unstable; urgency=low
+
+  * Nightly build
+
+
+hildon-libs (0.8.2-5) unstable; urgency=low
+
+  * Nightly build
+
+
+hildon-libs (0.8.2-4) unstable; urgency=low
+
+  * Last minute fixes
+
+
+hildon-libs (0.8.2-3) unstable; urgency=low
+
+  * Nightly build
+
+
+hildon-libs (0.8.2-2) unstable; urgency=low
+
+  * Nightly build
+
+
+hildon-libs (0.8.2-1) unstable; urgency=low
+
+  * Release 0.8.2
+
+
+hildon-libs (0.8.1-5) unstable; urgency=low
+
+  * Nightly build
+
+
+hildon-libs (0.8.1-4) unstable; urgency=low
+
+  * Nightly build
+
+
+hildon-libs (0.8.1-3) unstable; urgency=low
+
+  * Nightly build
+
+
+hildon-libs (0.8.1-2) unstable; urgency=low
+
+  * Nightly build
+
+
+hildon-libs (0.8.1-1) unstable; urgency=low
+
+  * 0.8.1 release
+
+
+hildon-libs (0.8.0pre1.2-1) unstable; urgency=low
+
+  * hildon filesystem model 
+
+
+hildon-libs (0.8.0pre1.1-1) unstable; urgency=low
+
+  * possible updates 
+
+
+hildon-libs (0.8.0pre1-1) unstable; urgency=low
+
+  * Teema 0.8.0pre1 release
+
+
+hildon-libs (0.7.6-1) unstable; urgency=low
+
+  * Teema 0.7.6 release
+
+
+hildon-libs (0.7.5-1) unstable; urgency=low
+
+  * Teema 0.7.5 release
+
+
+hildon-libs (0.7.4-1) unstable; urgency=low
+
+  * Teema 0.7.4 release
+
+hildon-libs (0.7.3-1) unstable; urgency=low
+
+  * Teema 0.7.3 release
+
+
+hildon-libs (0.7.2-1) unstable; urgency=low
+
+  * Teema 0.7.2 release
+
+
+hildon-libs (0.7.1-1) unstable; urgency=low
+
+  * Teema 0.7.1 release
+
+
+hildon-libs (0.7.0-1) unstable; urgency=low
+
+  * T7 preliminary version
+
+hildon-libs (0.6.6-1) unstable; urgency=low
+
+  * M3 bug fix release 2
+
+
+hildon-libs (0.6.5-1) unstable; urgency=low
+
+  * M3 bug fix release
+
+
+hildon-libs (0.6.4-1) unstable; urgency=low
+
+  * M3 release
+
+
+hildon-libs (0.6.3-1) unstable; urgency=low
+
+  * M2 bug fix / M3 preview release
+  * Added -dbg package
+
+
+hildon-libs (0.6.2-1) unstable; urgency=low
+
+  * M2 release
+
+
+hildon-libs (0.6.1-1) unstable; urgency=low
+
+  * M1 bug fix / M2 preview release
+
+
+hildon-libs (0.6.0-1) unstable; urgency=low
+
+  * Updated dependencies.
+
+  * HildonRenameDialog and HildonNewObjectDialog was replaced by 
+  HildonNameObjectDialog. 
+
+  * Added new widgets HildonFindObjectDialog and HildonFindObjectOptionsDialog.
+       
+
+hildon-libs (0.5.1-1) unstable; urgency=low
+
+  * Teema5 M2 second delivery.
+
+
+hildon-libs (0.5.20040211-1) unstable; urgency=low
+
+  * Initial Release.
+
+
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..0cbc126
--- /dev/null
@@ -0,0 +1,42 @@
+Source: hildon-libs
+Section: x11
+Priority: optional
+Maintainer: Luc Piochon <luc.piochon@nokia.com>
+Build-Depends: debhelper (>= 4.0.0), pkg-config, dbus-1-dev, hildon-lgpl-dev (>= 0.9.1), outo, libosso-gnomevfs2-dev, hildon-fm-dev, libgtk2.0-dev (>= 2:2.6.4-1.osso6)
+Standards-Version: 3.6.0
+
+Package: hildon-libs-dev
+Section: devel
+Architecture: any
+Depends: hildon-libs0 (= ${Source-Version}), libgtk2.0-dev (>= 2:2.6.4-1.osso6), hildon-lgpl-dev, hildon-fm-dev, libosso-gnomevfs2-dev
+Description: Hildon libraries development files
+
+Package: hildon-libs0
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, dbus-1, hildon-lgpl0, hildon-fm1, osso-sounds-ui, libosso-gnomevfs2-0
+Description: Hildon libraries
+
+Package: hildon-libs-test
+Section: libs
+Architecture: any
+Conflicts: hildon-libs (<<0.8.12)
+Depends: hildon-libs0, outo
+Description: Hildon libraries unit tests.
+
+Package: hildon-libs0-dbg
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, dbus-1, hildon-lgpl0-dbg, hildon-fm1-dbg, osso-sounds-ui, libosso-gnomevfs2-0
+Description: Hildon libraries (with debug info)
+
+Package: hildon-libs-l10n-engb
+Architecture: all
+Description: Locale for package hildon-libs
+ en_GB locale for hildon-libs.
+
+Package: hildon-libs-l10n-src
+Architecture: all
+Depends: gettext
+Description: Locale source package for hildon-libs
+ Source package for locales.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..2f8ac05
--- /dev/null
@@ -0,0 +1,3 @@
+Copyright: (c) 2005 Nokia Corporation
+
+This package is licensed under the LGPL
diff --git a/debian/hildon-libs-dev.docs b/debian/hildon-libs-dev.docs
new file mode 100644 (file)
index 0000000..7e7afef
--- /dev/null
@@ -0,0 +1 @@
+debian/build/usr/share/doc/html
diff --git a/debian/hildon-libs-dev.install b/debian/hildon-libs-dev.install
new file mode 100644 (file)
index 0000000..f240be8
--- /dev/null
@@ -0,0 +1,4 @@
+usr/include
+usr/lib/*.so
+usr/lib/*.la
+usr/lib/pkgconfig
diff --git a/debian/hildon-libs-l10n-engb.install b/debian/hildon-libs-l10n-engb.install
new file mode 100644 (file)
index 0000000..059d74a
--- /dev/null
@@ -0,0 +1 @@
+usr/share/locale/en_GB/LC_MESSAGES/hildon-libs.mo
diff --git a/debian/hildon-libs-l10n-src.install b/debian/hildon-libs-l10n-src.install
new file mode 100644 (file)
index 0000000..3335178
--- /dev/null
@@ -0,0 +1 @@
+usr/share/osso/l10n/hildon-libs/*
diff --git a/debian/hildon-libs0-dbg.install b/debian/hildon-libs0-dbg.install
new file mode 100644 (file)
index 0000000..cddaee0
--- /dev/null
@@ -0,0 +1 @@
+usr/lib/debug/*
diff --git a/debian/hildon-libs0.install b/debian/hildon-libs0.install
new file mode 100644 (file)
index 0000000..093956b
--- /dev/null
@@ -0,0 +1 @@
+usr/lib/*.so.*
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..9f4c0e5
--- /dev/null
@@ -0,0 +1,127 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -O0
+else
+       CFLAGS += -O2
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+       INSTALL_PROGRAM += -s
+endif
+
+# shared library versions, option 1
+version=2.0.5
+major=2
+# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
+#version=`ls src/.libs/lib*.so.* | \
+# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
+#major=`ls src/.libs/lib*.so.* | \
+# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
+
+config.status: configure
+       dh_testdir
+       # Add here commands to configure the package.
+       CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-doc-dir=\$${prefix}/share/doc --disable-dependency-tracking --disable-gtk-doc
+
+
+build: build-stamp
+build-stamp:  config.status
+       dh_testdir
+
+       # Add here commands to compile the package.
+       $(MAKE)
+
+       touch build-stamp
+
+clean:
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp 
+
+       # Add here commands to clean up after the build process.
+       -$(MAKE) distclean
+ifneq "$(wildcard /usr/share/misc/config.sub)" ""
+       cp -f /usr/share/misc/config.sub config.sub
+endif
+ifneq "$(wildcard /usr/share/misc/config.guess)" ""
+       cp -f /usr/share/misc/config.guess config.guess
+endif
+
+
+       dh_clean 
+
+install: build
+       dh_testdir
+       dh_testroot
+       dh_clean -k 
+       dh_installdirs
+
+       # Add here commands to install the package into debian/build
+       $(MAKE) install DESTDIR=$(CURDIR)/debian/build
+       rm -f $(CURDIR)/debian/build/usr/lib/outo/*.*a
+
+       # for the -dbg package
+       -rm -rf $(CURDIR)/debian/build/usr/lib/debug
+       -mkdir -p $(CURDIR)/debian/build/usr/lib/debug
+       -cp -vd $(CURDIR)/debian/build/usr/lib/lib*.so* $(CURDIR)/debian/build/usr/lib/debug
+
+       # Install locale stuff
+       mkdir -p $(CURDIR)/debian/build/usr/share/osso/l10n/hildon-libs
+       cp po/*.po po/porules.mk $(CURDIR)/debian/build/usr/share/osso/l10n/hildon-libs/
+       cp -a po/debian $(CURDIR)/debian/build/usr/share/osso/l10n/hildon-libs/
+       cp debian/hildon-libs-l10n-engb.install $(CURDIR)/debian/build/usr/share/osso/l10n/hildon-libs/debian/
+       cp debian/copyright $(CURDIR)/debian/build/usr/share/osso/l10n/hildon-libs/debian/
+       sed -r -e "s/^([a-z0-9-]+) /\1-l10n-src /g" debian/changelog > $(CURDIR)/debian/build/usr/share/osso/l10n/hildon-libs/debian/changelog 
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+       dh_testdir
+       dh_testroot
+       dh_installchangelogs 
+#      dh_installexamples
+       dh_installdocs
+       dh_install --sourcedir=debian/build -v
+#      dh_installmenu
+#      dh_installdebconf       
+#      dh_installlogrotate
+#      dh_installemacsen
+#      dh_installpam
+#      dh_installmime
+#      dh_installinit
+#      dh_installcron
+#      dh_installinfo
+       dh_installman
+       dh_link
+       dh_strip --dbg-package="hildon-libs0-dbg"
+       dh_compress
+       dh_fixperms
+#      dh_perl
+#      dh_python
+       dh_makeshlibs -V
+       dh_installdeb
+       dh_shlibdeps
+       dh_gencontrol
+       dh_md5sums
+       dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install 
diff --git a/depcomp b/depcomp
new file mode 100755 (executable)
index 0000000..edb5d38
--- /dev/null
+++ b/depcomp
@@ -0,0 +1,479 @@
+#! /bin/sh
+
+# depcomp - compile a program generating dependencies as side-effects
+# Copyright 1999, 2000, 2003 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, 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.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+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
+# `libtool' can also be set to `yes' or `no'.
+
+if test -z "$depfile"; then
+   base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
+   dir=`echo "$object" | sed 's,/.*$,/,'`
+   if test "$dir" = "$object"; then
+      dir=
+   fi
+   # FIXME: should be _deps on DOS.
+   depfile="$dir.deps/$base"
+fi
+
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# 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
+
+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.
+  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## 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).
+## - 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 -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## 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.
+  tr ' ' '
+' < "$tmpdepfile" |
+## 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.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -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 -eq 0; then :
+  else
+    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 ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> $depfile
+    echo >> $depfile
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> $depfile
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+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.
+  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
+  tmpdepfile="$stripped.u"
+  if test "$libtool" = yes; then
+    "$@" -Wc,-M
+  else
+    "$@" -M
+  fi
+  stat=$?
+
+  if test -f "$tmpdepfile"; then :
+  else
+    stripped=`echo "$stripped" | sed 's,^.*/,,'`
+    tmpdepfile="$stripped.u"
+  fi
+
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+
+  if test -f "$tmpdepfile"; then
+    outname="$stripped.o"
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+icc)
+  # Intel's C compiler understands `-MD -MF file'.  However on
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # ICC 7.0 will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using \ :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    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"
+  ;;
+
+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.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      tmpdepfile1="$dir.libs/$base.lo.d"
+      tmpdepfile2="$dir.libs/$base.d"
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1="$dir$base.o.d"
+      tmpdepfile2="$dir$base.d"
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2"
+      exit $stat
+   fi
+
+   if test -f "$tmpdepfile1"; then
+      tmpdepfile="$tmpdepfile1"
+   else
+      tmpdepfile="$tmpdepfile2"
+   fi
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a tab and a space in the [].
+      sed -e 's,^.*\.[a-z]*:[   ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#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 $1 != '--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:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    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 $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no
+  for arg in "$@"; do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    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.
+    -*|$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"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    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 $1 != '--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 '/^# [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, regardless of -o,
+  # because we must use -o when running libtool.
+  "$@" || exit $?
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+       set fnord "$@"
+       shift
+       shift
+       ;;
+    *)
+       set fnord "$@" "$arg"
+       shift
+       shift
+       ;;
+    esac
+  done
+  "$@" -E |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::   \1 \\:p' >> "$depfile"
+  echo "       " >> "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644 (file)
index 0000000..fc845c3
--- /dev/null
@@ -0,0 +1,200 @@
+## Process this file with automake to produce Makefile.in
+
+# This is a blank Makefile.am for using gtk-doc.
+# Copy this to your project's API docs directory and modify the variables to
+# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
+# of using the various options.
+
+# The name of the module, e.g. 'glib'.
+DOC_MODULE=hildon-libs
+
+# The top-level SGML file. Change it if you want.
+DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml
+
+# The directory containing the source code. Relative to $(srcdir).
+# gtk-doc will search all .c & .h files beneath here for inline comments
+# documenting functions and macros.
+DOC_SOURCE_DIR=../hildon-widgets
+
+# Extra options to pass to gtkdoc-scanobj or gtkdoc-scangobj.
+SCANOBJ_OPTIONS=--type-init-func="gtk_type_init(0)"
+
+# Extra options to supply to gtkdoc-scan.
+SCAN_OPTIONS=
+
+# Header files to ignore when scanning.
+IGNORE_HFILES=*private* config.h ut md5.h hildon-volumebar-range.h hildon-volumebar-private.h \
+               hildon-app-private.h
+
+# Files to ignore when making the DB.
+IGNORE_FILES=$(IGNORE_HFILES)
+
+# Extra options to supply to gtkdoc-mkdb.
+MKDB_OPTIONS=--ignore-files="$(IGNORE_FILES)" --sgml-mode --output-format=xml
+
+# Extra options to supply to gtkdoc-fixref.
+FIXXREF_OPTIONS=
+
+# Used for dependencies.
+HFILE_GLOB=$(top_srcdir)/hildon-widgets/*.h
+CFILE_GLOB=$(top_srcdir)/hildon-widgets/*.c
+
+
+
+# Images to copy into HTML directory.
+HTML_IMAGES =
+
+# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
+content_files =
+
+# Other files to distribute.
+extra_files =
+
+# CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
+# contains GtkObjects/GObjects and you want to document signals and properties.
+GTKDOC_CFLAGS = $(GTK_CFLAGS) -I$(top_srcdir) $(GNOME_VFS_CFLAGS)
+GTKDOC_LIBS = $(GTK_LIBS) ../hildon-widgets/libhildonwidgets.la 
+
+GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
+GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
+
+# If you need to override some of the declarations, place them in the
+# $(DOC_MODULE)-overrides.txt file and uncomment the second line here.
+DOC_OVERRIDES =
+#DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
+
+
+
+###########################################################################
+# Everything below here is generic and you shouldn't need to change it.
+###########################################################################
+
+TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
+
+EXTRA_DIST =                           \
+       $(content_files)                \
+       $(extra_files)                  \
+       $(HTML_IMAGES)                  \
+       $(DOC_MAIN_SGML_FILE)           \
+       $(DOC_MODULE).types             \
+       $(DOC_OVERRIDES)
+
+DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
+          $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
+
+SCANOBJ_FILES =                 \
+       $(DOC_MODULE).args       \
+       $(DOC_MODULE).hierarchy  \
+       $(DOC_MODULE).interfaces \
+       $(DOC_MODULE).prerequisites \
+       $(DOC_MODULE).signals
+
+if ENABLE_GTK_DOC
+all-local: html-build.stamp
+
+#### scan ####
+
+scan-build.stamp: $(HFILE_GLOB)
+       @echo '*** Scanning header files ***'
+       if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
+           CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
+       else \
+           cd $(srcdir) ; \
+           for i in $(SCANOBJ_FILES) ; do \
+               test -f $$i || touch $$i ; \
+           done \
+       fi
+       cd $(srcdir) && \
+         gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
+       touch scan-build.stamp
+
+$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
+       @true
+
+#### templates ####
+
+tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
+       @echo '*** Rebuilding template files ***'
+       cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
+       touch tmpl-build.stamp
+
+tmpl.stamp: tmpl-build.stamp
+       @true
+
+#### xml ####
+
+sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
+       @echo '*** Building XML ***'
+       cd $(srcdir) && \
+       gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
+       touch sgml-build.stamp
+
+sgml.stamp: sgml-build.stamp
+       @true
+
+#### html ####
+
+html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
+       @echo '*** Building HTML ***'
+       rm -rf $(srcdir)/html
+       mkdir $(srcdir)/html
+       cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
+       test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
+       @echo '-- Fixing Crossreferences' 
+       cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
+       touch html-build.stamp
+endif
+
+##############
+
+clean-local:
+       rm -rf *~ *.bak $(SCANOBJ_FILES) .libs *-unused.txt $(DOC_STAMPS)
+
+maintainer-clean-local: clean
+       cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+
+gtkdocdir=$(docdir)
+gtkdochtmldir=$(gtkdocdir)/html
+gtkdocpackagedir=$(gtkdochtmldir)/$(DOC_MODULE)
+
+gtkdocpackage_DATA = $(wildcard $(srcdir)/html/*.html)
+
+#install-data-local:
+#      $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
+#      (installfiles=`echo $(srcdir)/html/*.html`; \
+#      if test "$$installfiles" = '$(srcdir)/html/*.html'; \
+#      then echo '-- Nothing to install' ; \
+#      else \
+#        for i in $$installfiles; do \
+#          echo '-- Installing '$$i ; \
+#          $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
+#        done; \
+#        echo '-- Installing $(srcdir)/html/index.sgml' ; \
+#        $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
+#      fi)
+
+#
+# Require gtk-doc when making dist
+#
+if ENABLE_GTK_DOC
+dist-check-gtkdoc:
+else
+dist-check-gtkdoc:
+       @echo "*** gtk-doc must be installed and enabled in order to make dist"
+       @false
+endif
+
+dist-hook: dist-check-gtkdoc dist-hook-local
+       mkdir $(distdir)/tmpl
+       mkdir $(distdir)/sgml
+       mkdir $(distdir)/html
+       -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
+       -cp $(srcdir)/xml/*.xml $(distdir)/xml
+       -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
+
+       images=$(HTML_IMAGES) ;               \
+       for i in $$images ; do                \
+         cp $(srcdir)/$$i $(distdir)/html ;  \
+       done
+
+.PHONY : dist-hook-local
diff --git a/doc/Makefile.in b/doc/Makefile.in
new file mode 100644 (file)
index 0000000..d432133
--- /dev/null
@@ -0,0 +1,541 @@
+# Makefile.in generated by automake 1.7.9 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# This is a blank Makefile.am for using gtk-doc.
+# Copy this to your project's API docs directory and modify the variables to
+# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
+# of using the various options.
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+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 = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DOXYGEN_FOUND = @DOXYGEN_FOUND@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_GTK_DOC_FALSE = @ENABLE_GTK_DOC_FALSE@
+ENABLE_GTK_DOC_TRUE = @ENABLE_GTK_DOC_TRUE@
+ESD_CFLAGS = @ESD_CFLAGS@
+ESD_LIBS = @ESD_LIBS@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GCONF_CFLAGS = @GCONF_CFLAGS@
+GCONF_LIBS = @GCONF_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GNOME_VFS_CFLAGS = @GNOME_VFS_CFLAGS@
+GNOME_VFS_LIBS = @GNOME_VFS_LIBS@
+GTKDOC = @GTKDOC@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_VERSION = @GTK_VERSION@
+HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@
+HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@
+HTML_DIR = @HTML_DIR@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJEXT = @OBJEXT@
+OUTO_CFLAGS = @OUTO_CFLAGS@
+OUTO_LIBS = @OUTO_LIBS@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+docdir = @docdir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+outomoduledir = @outomoduledir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+
+# The name of the module, e.g. 'glib'.
+DOC_MODULE = hildon-libs
+
+# The top-level SGML file. Change it if you want.
+DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.xml
+
+# The directory containing the source code. Relative to $(srcdir).
+# gtk-doc will search all .c & .h files beneath here for inline comments
+# documenting functions and macros.
+DOC_SOURCE_DIR = ../hildon-widgets
+
+# Extra options to pass to gtkdoc-scanobj or gtkdoc-scangobj.
+SCANOBJ_OPTIONS = --type-init-func="gtk_type_init(0)"
+
+# Extra options to supply to gtkdoc-scan.
+SCAN_OPTIONS = 
+
+# Header files to ignore when scanning.
+IGNORE_HFILES = *private* config.h ut md5.h hildon-volumebar-range.h hildon-volumebar-private.h \
+               hildon-app-private.h
+
+
+# Files to ignore when making the DB.
+IGNORE_FILES = $(IGNORE_HFILES)
+
+# Extra options to supply to gtkdoc-mkdb.
+MKDB_OPTIONS = --ignore-files="$(IGNORE_FILES)" --sgml-mode --output-format=xml
+
+# Extra options to supply to gtkdoc-fixref.
+FIXXREF_OPTIONS = 
+
+# Used for dependencies.
+HFILE_GLOB = $(top_srcdir)/hildon-widgets/*.h
+CFILE_GLOB = $(top_srcdir)/hildon-widgets/*.c
+
+# Images to copy into HTML directory.
+HTML_IMAGES = 
+
+# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
+content_files = 
+
+# Other files to distribute.
+extra_files = 
+
+# CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
+# contains GtkObjects/GObjects and you want to document signals and properties.
+GTKDOC_CFLAGS = $(GTK_CFLAGS) -I$(top_srcdir) $(GNOME_VFS_CFLAGS)
+GTKDOC_LIBS = $(GTK_LIBS) ../hildon-widgets/libhildonwidgets.la 
+
+GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC)
+GTKDOC_LD = $(LIBTOOL) --mode=link $(CC)
+
+# If you need to override some of the declarations, place them in the
+# $(DOC_MODULE)-overrides.txt file and uncomment the second line here.
+DOC_OVERRIDES = 
+
+#DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
+
+###########################################################################
+# Everything below here is generic and you shouldn't need to change it.
+###########################################################################
+TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE)
+
+EXTRA_DIST = \
+       $(content_files)                \
+       $(extra_files)                  \
+       $(HTML_IMAGES)                  \
+       $(DOC_MAIN_SGML_FILE)           \
+       $(DOC_MODULE).types             \
+       $(DOC_OVERRIDES)
+
+
+DOC_STAMPS = scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
+          $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
+
+
+SCANOBJ_FILES = \
+       $(DOC_MODULE).args       \
+       $(DOC_MODULE).hierarchy  \
+       $(DOC_MODULE).interfaces \
+       $(DOC_MODULE).prerequisites \
+       $(DOC_MODULE).signals
+
+
+gtkdocdir = $(docdir)
+gtkdochtmldir = $(gtkdocdir)/html
+gtkdocpackagedir = $(gtkdochtmldir)/$(DOC_MODULE)
+
+gtkdocpackage_DATA = $(wildcard $(srcdir)/html/*.html)
+subdir = doc
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+DIST_SOURCES =
+DATA = $(gtkdocpackage_DATA)
+
+DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --foreign  doc/Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+
+distclean-libtool:
+       -rm -f libtool
+uninstall-info-am:
+gtkdocpackageDATA_INSTALL = $(INSTALL_DATA)
+install-gtkdocpackageDATA: $(gtkdocpackage_DATA)
+       @$(NORMAL_INSTALL)
+       $(mkinstalldirs) $(DESTDIR)$(gtkdocpackagedir)
+       @list='$(gtkdocpackage_DATA)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         f="`echo $$p | sed -e 's|^.*/||'`"; \
+         echo " $(gtkdocpackageDATA_INSTALL) $$d$$p $(DESTDIR)$(gtkdocpackagedir)/$$f"; \
+         $(gtkdocpackageDATA_INSTALL) $$d$$p $(DESTDIR)$(gtkdocpackagedir)/$$f; \
+       done
+
+uninstall-gtkdocpackageDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(gtkdocpackage_DATA)'; for p in $$list; do \
+         f="`echo $$p | sed -e 's|^.*/||'`"; \
+         echo " rm -f $(DESTDIR)$(gtkdocpackagedir)/$$f"; \
+         rm -f $(DESTDIR)$(gtkdocpackagedir)/$$f; \
+       done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkinstalldirs) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$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
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA) all-local
+
+installdirs:
+       $(mkinstalldirs) $(DESTDIR)$(gtkdocpackagedir)
+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:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-gtkdocpackageDATA
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic \
+       maintainer-clean-local
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-gtkdocpackageDATA uninstall-info-am
+
+.PHONY: all all-am all-local check check-am clean clean-generic \
+       clean-libtool clean-local distclean distclean-generic \
+       distclean-libtool distdir dvi dvi-am info info-am install \
+       install-am install-data install-data-am install-exec \
+       install-exec-am install-gtkdocpackageDATA install-info \
+       install-info-am install-man install-strip installcheck \
+       installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic maintainer-clean-local mostlyclean \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       uninstall uninstall-am uninstall-gtkdocpackageDATA \
+       uninstall-info-am
+
+
+@ENABLE_GTK_DOC_TRUE@all-local: html-build.stamp
+
+#### scan ####
+
+@ENABLE_GTK_DOC_TRUE@scan-build.stamp: $(HFILE_GLOB)
+@ENABLE_GTK_DOC_TRUE@  @echo '*** Scanning header files ***'
+@ENABLE_GTK_DOC_TRUE@  if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
+@ENABLE_GTK_DOC_TRUE@      CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
+@ENABLE_GTK_DOC_TRUE@  else \
+@ENABLE_GTK_DOC_TRUE@      cd $(srcdir) ; \
+@ENABLE_GTK_DOC_TRUE@      for i in $(SCANOBJ_FILES) ; do \
+@ENABLE_GTK_DOC_TRUE@               test -f $$i || touch $$i ; \
+@ENABLE_GTK_DOC_TRUE@      done \
+@ENABLE_GTK_DOC_TRUE@  fi
+@ENABLE_GTK_DOC_TRUE@  cd $(srcdir) && \
+@ENABLE_GTK_DOC_TRUE@    gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
+@ENABLE_GTK_DOC_TRUE@  touch scan-build.stamp
+
+@ENABLE_GTK_DOC_TRUE@$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
+@ENABLE_GTK_DOC_TRUE@  @true
+
+#### templates ####
+
+@ENABLE_GTK_DOC_TRUE@tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
+@ENABLE_GTK_DOC_TRUE@  @echo '*** Rebuilding template files ***'
+@ENABLE_GTK_DOC_TRUE@  cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
+@ENABLE_GTK_DOC_TRUE@  touch tmpl-build.stamp
+
+@ENABLE_GTK_DOC_TRUE@tmpl.stamp: tmpl-build.stamp
+@ENABLE_GTK_DOC_TRUE@  @true
+
+#### xml ####
+
+@ENABLE_GTK_DOC_TRUE@sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
+@ENABLE_GTK_DOC_TRUE@  @echo '*** Building XML ***'
+@ENABLE_GTK_DOC_TRUE@  cd $(srcdir) && \
+@ENABLE_GTK_DOC_TRUE@  gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
+@ENABLE_GTK_DOC_TRUE@  touch sgml-build.stamp
+
+@ENABLE_GTK_DOC_TRUE@sgml.stamp: sgml-build.stamp
+@ENABLE_GTK_DOC_TRUE@  @true
+
+#### html ####
+
+@ENABLE_GTK_DOC_TRUE@html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
+@ENABLE_GTK_DOC_TRUE@  @echo '*** Building HTML ***'
+@ENABLE_GTK_DOC_TRUE@  rm -rf $(srcdir)/html
+@ENABLE_GTK_DOC_TRUE@  mkdir $(srcdir)/html
+@ENABLE_GTK_DOC_TRUE@  cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
+@ENABLE_GTK_DOC_TRUE@  test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
+@ENABLE_GTK_DOC_TRUE@  @echo '-- Fixing Crossreferences' 
+@ENABLE_GTK_DOC_TRUE@  cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
+@ENABLE_GTK_DOC_TRUE@  touch html-build.stamp
+
+##############
+
+clean-local:
+       rm -rf *~ *.bak $(SCANOBJ_FILES) .libs *-unused.txt $(DOC_STAMPS)
+
+maintainer-clean-local: clean
+       cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+
+#install-data-local:
+#      $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
+#      (installfiles=`echo $(srcdir)/html/*.html`; \
+#      if test "$$installfiles" = '$(srcdir)/html/*.html'; \
+#      then echo '-- Nothing to install' ; \
+#      else \
+#        for i in $$installfiles; do \
+#          echo '-- Installing '$$i ; \
+#          $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
+#        done; \
+#        echo '-- Installing $(srcdir)/html/index.sgml' ; \
+#        $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
+#      fi)
+
+#
+# Require gtk-doc when making dist
+#
+@ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc:
+@ENABLE_GTK_DOC_FALSE@dist-check-gtkdoc:
+@ENABLE_GTK_DOC_FALSE@ @echo "*** gtk-doc must be installed and enabled in order to make dist"
+@ENABLE_GTK_DOC_FALSE@ @false
+
+dist-hook: dist-check-gtkdoc dist-hook-local
+       mkdir $(distdir)/tmpl
+       mkdir $(distdir)/sgml
+       mkdir $(distdir)/html
+       -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
+       -cp $(srcdir)/xml/*.xml $(distdir)/xml
+       -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
+
+       images=$(HTML_IMAGES) ;               \
+       for i in $$images ; do                \
+         cp $(srcdir)/$$i $(distdir)/html ;  \
+       done
+
+.PHONY : dist-hook-local
+# 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/doc/hildon-libs-docs.xml b/doc/hildon-libs-docs.xml
new file mode 100644 (file)
index 0000000..69cfa0c
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
+               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<book id="index" xmlns:xi="http://www.w3.org/2001/XInclude">
+  <bookinfo>
+    <title>hildon-libs Reference Manual</title>
+  </bookinfo>
+
+  <chapter>
+    <title>Object Hierarchy</title>
+      <xi:include href="xml/tree_index.sgml"/>
+  </chapter>
+
+  <chapter>
+    <title>Hildon Widgets</title>
+      <xi:include href="xml/hildon-calendar-popup.xml"/>
+      <xi:include href="xml/hildon-color-button.xml"/>
+      <xi:include href="xml/hildon-color-selector.xml"/>
+      <xi:include href="xml/hildon-controlbar.xml"/>
+      <xi:include href="xml/hildon-date-editor.xml"/>
+      <xi:include href="xml/hildon-find-object-dialog.xml"/>
+      <xi:include href="xml/hildon-font-selection-dialog.xml"/>
+      <xi:include href="xml/hildon-get-password-dialog.xml"/>
+      <xi:include href="xml/hildon-hvolumebar.xml"/>
+      <xi:include href="xml/hildon-insert-object-dialog.xml"/>
+      <xi:include href="xml/hildon-note.xml"/>
+      <xi:include href="xml/hildon-number-editor.xml"/>
+      <xi:include href="xml/hildon-range-editor.xml"/>
+      <xi:include href="xml/hildon-search.xml"/>
+      <xi:include href="xml/hildon-seekbar.xml"/>
+      <xi:include href="xml/hildon-set-password-dialog.xml"/>
+      <xi:include href="xml/hildon-sort-dialog.xml"/>
+      <xi:include href="xml/hildon-name-password-dialog.xml"/>
+      <xi:include href="xml/hildon-telephone-editor.xml"/>
+      <xi:include href="xml/hildon-time-editor.xml"/>
+      <xi:include href="xml/hildon-time-picker.xml"/>
+      <xi:include href="xml/hildon-volumebar.xml"/>
+      <xi:include href="xml/hildon-vvolumebar.xml"/>
+      <xi:include href="xml/hildon-weekday-picker.xml"/>
+      <xi:include href="xml/hildon-file-details-dialog.xml"/>
+      <xi:include href="xml/hildon-file-handling-note.xml"/>
+      <xi:include href="xml/hildon-grid-item.xml"/>
+      <xi:include href="xml/hildon-grid.xml"/>
+      <xi:include href="xml/hildon-dialoghelp.xml"/>
+      <xi:include href="xml/hildon-scroll-area.xml"/>
+  </chapter>
+</book>
diff --git a/doc/hildon-libs.types b/doc/hildon-libs.types
new file mode 100644 (file)
index 0000000..082a9a5
--- /dev/null
@@ -0,0 +1,66 @@
+#include <hildon-widgets/hildon-calendar-popup.h>
+#include <hildon-widgets/hildon-search.h>
+#include <hildon-widgets/hildon-seekbar.h>
+#include <hildon-widgets/hildon-hvolumebar.h>
+#include <hildon-widgets/hildon-vvolumebar.h>
+#include <hildon-widgets/hildon-volumebar-range.h>
+#include <hildon-widgets/hildon-date-editor.h>
+#include <hildon-widgets/hildon-calendar-popup.h>
+#include <hildon-widgets/hildon-time-editor.h>
+#include <hildon-widgets/hildon-grid-item.h>
+#include <hildon-widgets/hildon-grid.h>
+#include <hildon-widgets/hildon-name-password-dialog.h>
+#include <hildon-widgets/hildon-color-selector.h>
+#include <hildon-widgets/hildon-controlbar.h>
+#include <hildon-widgets/hildon-find-object-dialog.h>
+#include <hildon-widgets/hildon-find-replace-dialog.h>
+#include <hildon-widgets/hildon-font-selection-dialog.h>
+#include <hildon-widgets/hildon-get-password-dialog.h>
+#include <hildon-widgets/hildon-add-home-dialog.h>
+#include <hildon-widgets/hildon-insert-object-dialog.h>
+#include <hildon-widgets/hildon-note.h>
+#include <hildon-widgets/hildon-number-editor.h>
+#include <hildon-widgets/hildon-range-editor.h>
+#include <hildon-widgets/hildon-set-password-dialog.h>
+#include <hildon-widgets/hildon-sort-dialog.h>
+#include <hildon-widgets/hildon-telephone-editor.h>
+#include <hildon-widgets/hildon-time-editor.h>
+#include <hildon-widgets/hildon-time-picker.h>
+#include <hildon-widgets/hildon-weekday-picker.h>
+#include <hildon-widgets/hildon-file-details-dialog.h>
+#include <hildon-widgets/hildon-file-handling-note.h>
+
+hildon_color_selector_get_type
+hildon_controlbar_get_type
+hildon_find_object_dialog_get_type
+hildon_find_replace_dialog_get_type
+hildon_font_selection_dialog_get_type
+hildon_get_password_dialog_get_type
+
+hildon_add_home_dialog_get_type
+hildon_insert_object_dialog_get_type
+hildon_note_get_type
+hildon_number_editor_get_type
+hildon_range_editor_get_type
+hildon_set_password_dialog_get_type
+hildon_sort_dialog_get_type
+hildon_telephone_editor_get_type
+hildon_time_editor_get_type
+hildon_time_picker_get_type
+hildon_weekday_picker_get_type
+hildon_file_details_dialog_get_type
+hildon_file_handling_note_get_type
+
+hildon_calendar_popup_get_type
+hildon_search_get_type
+hildon_seekbar_get_type
+hildon_hvolumebar_get_type
+hildon_vvolumebar_get_type
+hildon_volumebar_get_type
+hildon_volumebar_range_get_type
+hildon_date_editor_get_type
+hildon_calendar_popup_get_type
+hildon_time_editor_get_type
+hildon_grid_item_get_type
+hildon_grid_get_type
+hildon_name_password_dialog_get_type
diff --git a/doc/tmpl/hildon-calendar-popup.sgml b/doc/tmpl/hildon-calendar-popup.sgml
new file mode 100644 (file)
index 0000000..022b1de
--- /dev/null
@@ -0,0 +1,97 @@
+<!-- ##### SECTION Title ##### -->
+HildonCalendarPopup
+
+<!-- ##### SECTION Short_Description ##### -->
+#HildonCalendarPopup is a dialog which contains a GtkCalendar.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+#HildonCalendarPopup is a dialog which contains a GtkCalendar.
+It also contains arrow buttons for changing month/year. The
+earliest possible date is 1/1/1980 and the latest date 31/12/2100.
+If navigating with keyboard to a date that is not in the current
+month the calendar moves to the corresponding month. If the new
+date would be unallowed then an information banner will be shown.
+
+The usage of CalendarPopup is shown in the following code. This function
+should be connect to eg. button-press-event.
+<informalexample>
+<programlisting>
+...
+  gint y, m, d;
+  GtkWidget *parent, *popup;
+  
+  /* get current date 
+     into &amp;y, &amp;m, &amp;d... */
+  
+  gtk_widget_get_ancestor(GTK_WIDGET(data), GTK_TYPE_WINDOW);
+  popup = hildon_calendar_popup_new(GTK_WINDOW (parent), y, m, d);
+  
+  result = gtk_dialog_run(GTK_DIALOG(popup));
+  switch(result)
+  {
+    case GTK_RESPONSE_OK:
+    case GTK_RESPONSE_ACCEPT:
+  
+    hildon_calendar_popup_get_date(HILDON_CALENDAR_POPUP(popup), &amp;y, &amp;m, &amp;d);
+
+    /* here set the new date*/
+  }
+  gtk_widget_destroy(popup);
+...
+</programlisting>
+</informalexample>
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+#GtkCalendar
+</para>
+
+<!-- ##### STRUCT HildonCalendarPopup ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO HILDON_CALENDAR_POPUP_TYPE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION hildon_calendar_popup_new ##### -->
+<para>
+
+</para>
+
+@parent: 
+@year: 
+@month: 
+@day: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_calendar_popup_set_date ##### -->
+<para>
+
+</para>
+
+@cal: 
+@year: 
+@month: 
+@day: 
+
+
+<!-- ##### FUNCTION hildon_calendar_popup_get_date ##### -->
+<para>
+
+</para>
+
+@cal: 
+@year: 
+@month: 
+@day: 
+
+
diff --git a/doc/tmpl/hildon-color-button.sgml b/doc/tmpl/hildon-color-button.sgml
new file mode 100644 (file)
index 0000000..7fb412c
--- /dev/null
@@ -0,0 +1,78 @@
+<!-- ##### SECTION Title ##### -->
+HildonColorButton
+
+<!-- ##### SECTION Short_Description ##### -->
+HildonColorButton is a widget to open HildonColorSelector.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+HildonColorButton is a widget to open HildonColorSelector.
+The color field in the button shows the selected color.
+The current color is set as a property to the button.
+The property name is "color" and it's type is GtkColor.
+
+<informalexample>
+<programlisting>
+HildonColorButton *cbutton;
+GtkColor *color;
+
+cbutton = hildon_color_button_new();
+gtk_object_get( GTK_OBJECT(cbutton), "color", color );
+</programlisting>
+</informalexample>
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT HildonColorButtonPrivate ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT HildonColorButton ##### -->
+<para>
+
+</para>
+
+@button: 
+@priv: 
+
+<!-- ##### FUNCTION hildon_color_button_new ##### -->
+<para>
+
+</para>
+
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_color_button_new_with_color ##### -->
+<para>
+
+</para>
+
+@color: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_color_button_set_color ##### -->
+<para>
+
+</para>
+
+@button: 
+@color: 
+
+
+<!-- ##### FUNCTION hildon_color_button_get_color ##### -->
+<para>
+
+</para>
+
+@button: 
+@Returns: 
+
+
diff --git a/doc/tmpl/hildon-color-selector.sgml b/doc/tmpl/hildon-color-selector.sgml
new file mode 100644 (file)
index 0000000..03eea2d
--- /dev/null
@@ -0,0 +1,85 @@
+<!-- ##### SECTION Title ##### -->
+HildonColorSelector
+
+<!-- ##### SECTION Short_Description ##### -->
+A widget for selecting a color.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+#HildonColorSelector allows a selection of a color. #HildonColorSelector
+consists of a control that displays the default palette of 16 colors and
+a control that can be opened to select a custom color from a 16M color
+palette.
+</para>
+
+<para>
+Here's a simple example for using a color selector.
+
+<informalexample>
+<programlisting>
+
+GtkWidget *selector;
+GdkColor *color;
+gint result;
+
+selector = hildon_color_selector_new( GTK_WINDOW(gtk_widget_get_toplevel( data ) ));
+
+result = gtk_dialog_run( GTK_DIALOG ( selector ) );
+switch (result)
+  {
+    case GTK_RESPONSE_OK:
+      color = hildon_color_selector_get_color( HILDON_COLOR_SELECTOR( selector ) );
+      break;
+    default:
+      break;
+  }
+
+gtk_widget_destroy( selector );
+</programlisting>
+</informalexample>
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT HildonColorSelectorPriv ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT HildonColorSelector ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION hildon_color_selector_new ##### -->
+<para>
+
+</para>
+
+@parent: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_color_selector_get_color ##### -->
+<para>
+
+</para>
+
+@selector: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_color_selector_set_color ##### -->
+<para>
+
+</para>
+
+@selector: 
+@color: 
+
+
diff --git a/doc/tmpl/hildon-controlbar.sgml b/doc/tmpl/hildon-controlbar.sgml
new file mode 100644 (file)
index 0000000..54578ff
--- /dev/null
@@ -0,0 +1,114 @@
+<!-- ##### SECTION Title ##### -->
+HildonControlbar
+
+<!-- ##### SECTION Short_Description ##### -->
+A widget that allows increasing or decreasing a value within a pre-defined
+range.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+#HildonControlbar is a horizontally positioned widget that allows increasing
+or decreasing a value within a pre-defined range. The amount of steps in a
+#HildonControlbar can be changed.
+</para>
+
+<para>
+Here's a simple example that creates a control bar and initializes it.
+
+<informalexample>
+<programlisting>
+GtkWidget *cbar = hildon_controlbar_new();
+hildon_controlbar_set_max( HILDON_CONTROLBAR(cbar), 12 );
+hildon_controlbar_set_value( HILDON_CONTROLBAR(cbar), 6 );
+</programlisting>
+</informalexample>
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT HildonControlbar ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION hildon_controlbar_new ##### -->
+<para>
+
+</para>
+
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_controlbar_set_value ##### -->
+<para>
+
+</para>
+
+@self: 
+@value: 
+
+
+<!-- ##### FUNCTION hildon_controlbar_get_value ##### -->
+<para>
+
+</para>
+
+@self: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_controlbar_get_max ##### -->
+<para>
+
+</para>
+
+@self: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_controlbar_get_min ##### -->
+<para>
+
+</para>
+
+@self: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_controlbar_set_max ##### -->
+<para>
+
+</para>
+
+@self: 
+@max: 
+
+
+<!-- ##### FUNCTION hildon_controlbar_set_min ##### -->
+<para>
+
+</para>
+
+@self: 
+@min: 
+
+
+<!-- ##### FUNCTION hildon_controlbar_set_range ##### -->
+<para>
+
+</para>
+
+@self: 
+@min: 
+@max: 
+
+
+<!-- ##### ARG HildonControlbar:inner-border-width ##### -->
+<para>
+
+</para>
+
diff --git a/doc/tmpl/hildon-date-editor.sgml b/doc/tmpl/hildon-date-editor.sgml
new file mode 100644 (file)
index 0000000..8fc5022
--- /dev/null
@@ -0,0 +1,81 @@
+<!-- ##### SECTION Title ##### -->
+HildonDateEditor
+
+<!-- ##### SECTION Short_Description ##### -->
+HildonDateEditor is a simple widget with three entry field (day, month,
+year) and a icon (eventbox) the clicking of which opens up a
+HildonCalendarPopup.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+HildonDateEditor is a simple widget with three entry field (day, month,
+year) and a icon (eventbox) the clicking of which opens up a
+HildonCalendarPopup.
+
+<informalexample>
+<programlisting>
+gint y, m, d;
+..
+date_editor = hildon_date_editor_new();
+..
+hildon_date_editor_get_date(date_editor, &amp;y, &amp;m, &amp;d);
+..
+</programlisting>
+</informalexample>
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### MACRO HILDON_DATE_EDITOR_TYPE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### STRUCT HildonDateEditor ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION hildon_date_editor_new ##### -->
+<para>
+
+</para>
+
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_date_editor_set_date ##### -->
+<para>
+
+</para>
+
+@date: 
+@year: 
+@month: 
+@day: 
+
+
+<!-- ##### FUNCTION hildon_date_editor_get_date ##### -->
+<para>
+
+</para>
+
+@date: 
+@year: 
+@month: 
+@day: 
+
+
+<!-- ##### SIGNAL HildonDateEditor::activate ##### -->
+<para>
+
+</para>
+
+@hildondateeditor: the object which received the signal.
+
diff --git a/doc/tmpl/hildon-dialoghelp.sgml b/doc/tmpl/hildon-dialoghelp.sgml
new file mode 100644 (file)
index 0000000..cd09282
--- /dev/null
@@ -0,0 +1,24 @@
+<!-- ##### SECTION Title ##### -->
+hildon-dialoghelp
+
+<!-- ##### SECTION Short_Description ##### -->
+HildonDialogHelp is used to show a normal dialog which contains a button to open a help if so is needed.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+HildonDialogHelp is used to show a normal dialog which contains a button to open a help if so is needed.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### FUNCTION gtk_dialog_help_enable ##### -->
+<para>
+
+</para>
+
+@dialog: 
+
+
diff --git a/doc/tmpl/hildon-file-details-dialog.sgml b/doc/tmpl/hildon-file-details-dialog.sgml
new file mode 100644 (file)
index 0000000..be4b571
--- /dev/null
@@ -0,0 +1,99 @@
+<!-- ##### SECTION Title ##### -->
+HildonFileDetailsDialog
+
+<!-- ##### SECTION Short_Description ##### -->
+#HildonFileDetailsDialog is used to show details of a file.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+#HildonFileDetailsDialog is used to show details of a file.
+
+Here's a simple example that creates and opens a #HildonFileDetailsDialog.
+
+<informalexample>
+<programlisting>
+  GtkWidget *hfdd;
+  gchar *filename = "/bogus/path/to/file";
+  hfdd = hildon_file_details_dialog_new( NULL, filename );
+  gtk_dialog_run(GTK_DIALOG(hfdd));
+  gtk_widget_destroy(hfdd);
+</programlisting>
+</informalexample>
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT HildonFileDetailsDialogPrivate ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT HildonFileDetailsDialog ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION hildon_file_details_dialog_new ##### -->
+<para>
+
+</para>
+
+@parent: 
+@filename: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_file_details_dialog_new_with_model ##### -->
+<para>
+
+</para>
+
+@parent: 
+@model: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_file_details_dialog_set_file_iter ##### -->
+<para>
+
+</para>
+
+@self: 
+@iter: 
+
+
+<!-- ##### FUNCTION hildon_file_details_dialog_get_file_iter ##### -->
+<para>
+
+</para>
+
+@self: 
+@iter: 
+@Returns: 
+
+
+<!-- ##### ARG HildonFileDetailsDialog:additional-tab ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG HildonFileDetailsDialog:additional-tab-label ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG HildonFileDetailsDialog:model ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG HildonFileDetailsDialog:show-tabs ##### -->
+<para>
+
+</para>
+
diff --git a/doc/tmpl/hildon-file-handling-note.sgml b/doc/tmpl/hildon-file-handling-note.sgml
new file mode 100644 (file)
index 0000000..0cfe1a9
--- /dev/null
@@ -0,0 +1,110 @@
+<!-- ##### SECTION Title ##### -->
+HildonFileHandlingNote
+
+<!-- ##### SECTION Short_Description ##### -->
+Notification presented when a move operation is in progress.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+Notification presented when a move operation is in progress.
+The notification uses a progress bar to indicate the progress of the operation.
+For operation containing multiple items, a separator progress bar is shown
+for each item. The notification has single button, which allowes to stop
+the action.
+
+<informalexample>
+<programlisting>
+
+GtkWidget *file_note;
+file_note = hildon_file_handling_note_new_moving (GTK_WINDOW (parent));
+
+hildon_file_handling_note_set_fraction( 
+                                               HILDON_FILE_HANDLING_NOTE (file_note), 0.7);
+hildon_file_handling_note_set_counter_and_name (
+                                               HILDON_FILE_HANDLING_NOTE (file_note), 1, 2, "bar.txt");
+
+gtk_dialog_run( GTK_DIALOG( file_note ));
+gtk_widget_destroy( GTK_WIDGET( file_note ));
+
+</programlisting>
+</informalexample>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT HildonFileHandlingNote ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION hildon_file_handling_note_new_moving ##### -->
+<para>
+
+</para>
+
+@parent: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_file_handling_note_new_deleting ##### -->
+<para>
+
+</para>
+
+@parent: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_file_handling_note_new_opening ##### -->
+<para>
+
+</para>
+
+@parent: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_file_handling_note_new_saving ##### -->
+<para>
+
+</para>
+
+@parent: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_file_handling_note_set_fraction ##### -->
+<para>
+
+</para>
+
+@note: 
+@frac: 
+
+
+<!-- ##### FUNCTION hildon_file_handling_note_set_counter_and_name ##### -->
+<para>
+
+</para>
+
+@note: 
+@current: 
+@maximum: 
+@name: 
+
+
+<!-- ##### FUNCTION hildon_file_handling_note_set_name ##### -->
+<para>
+
+</para>
+
+@note: 
+@name: 
+
+
diff --git a/doc/tmpl/hildon-find-object-dialog.sgml b/doc/tmpl/hildon-find-object-dialog.sgml
new file mode 100644 (file)
index 0000000..8f4b7d3
--- /dev/null
@@ -0,0 +1,74 @@
+<!-- ##### SECTION Title ##### -->
+HildonFindObjectDialog
+
+<!-- ##### SECTION Short_Description ##### -->
+#HildonFindObjectDialog is a widget to query a string from the user.
+This string is ment to be searched from a selected content of text.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+#HildonFindObjectDialog is a widget to query a string from the user.
+This string is ment to be searched from a selected content of text.
+There's a two kind of dialogs, one with different search options and
+another with only one field to enter the searched parameter.
+
+<informalexample>
+<programlisting>
+
+FindDialog = hildon_find_object_dialog_new (grand_parent);
+...
+findDialogOptions = hildon_find_object_dialog_new_with_options (
+                                       grand_parent,GTK_DIALOG(dialog));
+
+</programlisting>
+</informalexample>
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT HildonFindObjectDialog ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION hildon_find_object_dialog_new ##### -->
+<para>
+
+</para>
+
+@parent: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_find_object_dialog_new_with_options ##### -->
+<para>
+
+</para>
+
+@parent: 
+@dialog: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_find_object_dialog_get_text ##### -->
+<para>
+
+</para>
+
+@dialog: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_find_object_dialog_set_label ##### -->
+<para>
+
+</para>
+
+@dialog: 
+@label: 
+
+
diff --git a/doc/tmpl/hildon-font-selection-dialog.sgml b/doc/tmpl/hildon-font-selection-dialog.sgml
new file mode 100644 (file)
index 0000000..448a487
--- /dev/null
@@ -0,0 +1,101 @@
+<!-- ##### SECTION Title ##### -->
+HildonFontSelectionDialog
+
+<!-- ##### SECTION Short_Description ##### -->
+A widget is used to select a font. (Selection is made by user)
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+Font selection can be made using this widget. User can select e.g.
+font name, size, style, etc. User can also preview his/her selection.
+
+<informalexample>
+<programlisting>
+
+HildonFontSelectionDialog *hfsd = hildon_font_selection_dialog_new( NULL, NULL );
+  gtk_widget_show_all(hfsd);
+
+response = gtk_dialog_run(GTK_DIALOG(hfsd));
+
+if(response == -5)
+{
+  if(list)
+  pango_attr_list_unref( list );i
+  list = hildon_font_selection_dialog_get_font(
+                                                                                       HILDON_FONT_SELECTION_DIALOG(hfsd) );
+  gtk_label_set_attributes( GTK_LABEL(label), list );
+}
+gtk_widget_destroy(hfsd);
+
+</programlisting>
+</informalexample>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### ENUM HildonPositioning ##### -->
+<para>
+
+</para>
+
+@HILDON_POSITIONING_NORMAL: 
+@HILDON_POSITIONING_SUPER: 
+@HILDON_POSITIONING_SUB: 
+
+<!-- ##### ENUM HildonFontFaceType ##### -->
+<para>
+
+</para>
+
+@HILDON_FONT_FACE_NORMAL: 
+@HILDON_FONT_FACE_ITALIC: 
+@HILDON_FONT_FACE_BOLD: 
+@HILDON_FONT_FACE_BOLD_ITALIC: 
+
+<!-- ##### STRUCT HildonFontSelectionDialog ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION hildon_font_selection_dialog_new ##### -->
+<para>
+
+</para>
+
+@parent: 
+@title: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_font_selection_dialog_set_font ##### -->
+<para>
+
+</para>
+
+@fsd: 
+@list: 
+
+
+<!-- ##### FUNCTION hildon_font_selection_dialog_get_preview_text ##### -->
+<para>
+
+</para>
+
+@fsd: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_font_selection_dialog_set_preview_text ##### -->
+<para>
+
+</para>
+
+@fsd: 
+@text: 
+
+
diff --git a/doc/tmpl/hildon-get-password-dialog.sgml b/doc/tmpl/hildon-get-password-dialog.sgml
new file mode 100644 (file)
index 0000000..18da1d7
--- /dev/null
@@ -0,0 +1,67 @@
+<!-- ##### SECTION Title ##### -->
+HildonGetPasswordDialog
+
+<!-- ##### SECTION Short_Description ##### -->
+HildonGetPasswordDialog is used to get a password.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+HildonGetPasswordDialog is used to get a password.
+
+<informalexample>
+<programlisting>
+       get_dialog =  HILDON_GET_PASSWORD_DIALOG(
+                       hildon_get_password_dialog_new (parent, FALSE));
+
+       gtk_widget_show (GTK_WIDGET (get_dialog));
+
+       i = gtk_dialog_run (GTK_DIALOG (get_dialog));
+
+       pass = hildon_get_password_dialog_get_password (get_dialog);
+
+       if (i == GTK_RESPONSE_OK &amp;&amp; (strcmp (pass, dialog.current_password) != 0))
+       {
+               gtk_infoprint (GTK_WINDOW (parent), STR_PASSWORD_INCORRECT);
+               gtk_widget_set_sensitive (GTK_WIDGET (dialog.button2), FALSE);
+               gtk_widget_set_sensitive (GTK_WIDGET (dialog.button3), FALSE);
+               gtk_widget_set_sensitive (GTK_WIDGET (dialog.button4), FALSE);
+       }
+
+       else if (i == GTK_RESPONSE_OK)
+       {   
+               gtk_widget_set_sensitive( GTK_WIDGET( dialog.button2 ), TRUE);
+       }
+
+       else
+       {
+               gtk_widget_set_sensitive (GTK_WIDGET (dialog.button2), FALSE);
+               gtk_widget_set_sensitive (GTK_WIDGET (dialog.button3), FALSE);
+               gtk_widget_set_sensitive (GTK_WIDGET (dialog.button4), FALSE);
+       }
+       gtk_widget_destroy (GTK_WIDGET (get_dialog));
+}
+</programlisting>
+</informalexample>
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT HildonGetPasswordDialog ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION hildon_get_password_dialog_new ##### -->
+<para>
+
+</para>
+
+@parent: 
+@get_old_password_title: 
+@Returns: 
+
+
diff --git a/doc/tmpl/hildon-grid-item-private.sgml b/doc/tmpl/hildon-grid-item-private.sgml
new file mode 100644 (file)
index 0000000..0e413e1
--- /dev/null
@@ -0,0 +1,16 @@
+<!-- ##### SECTION Title ##### -->
+hildon-grid-item-private
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
diff --git a/doc/tmpl/hildon-grid-item.sgml b/doc/tmpl/hildon-grid-item.sgml
new file mode 100644 (file)
index 0000000..60c3fd3
--- /dev/null
@@ -0,0 +1,105 @@
+<!-- ##### SECTION Title ##### -->
+HildonGridItem
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<para>
+<informalexample>
+Example
+<programlisting>
+<!-- hildon-tests/wt/hildon-widgets-combo/testgrid.c -->
+##include &lt;hildon-widgets/hildon-grid-item.h&gt;
+...
+static void
+create_basic_icons (HildonGrid *grid)
+{
+       w_add_one = hildon_grid_item_new_with_label (
+                       "Calendar", _("Add one"));
+       w_add_eight = hildon_grid_item_new_with_label (
+                       "Clock", _("Add eight"));
+       w_disable_next = hildon_grid_item_new_with_label (
+                       "Calculator", _("Disable next"));
+       w_emblem_next = hildon_grid_item_new_with_label (
+                       "Paint", _("Set emblem"));
+       emblem_this (w_emblem_next);
+
+       gtk_container_add (GTK_CONTAINER (grid), w_add_one);
+       gtk_container_add (GTK_CONTAINER (grid), w_add_eight);
+       gtk_container_add (GTK_CONTAINER (grid), w_disable_next);
+       gtk_container_add (GTK_CONTAINER (grid), w_emblem_next);
+}
+...
+</programlisting>
+</informalexample>
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT HildonGridItem ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ENUM HildonGridPositionType ##### -->
+<para>
+
+</para>
+
+@HILDON_GRID_ITEM_LABEL_POS_BOTTOM: 
+@HILDON_GRID_ITEM_LABEL_POS_RIGHT: 
+
+<!-- ##### ENUM HildonGridItemIconSizeType ##### -->
+<para>
+
+</para>
+
+@HILDON_GRID_ITEM_ICON_27x27: 
+@HILDON_GRID_ITEM_ICON_128x128: 
+
+<!-- ##### FUNCTION hildon_grid_item_new ##### -->
+<para>
+
+</para>
+
+@icon_basename: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_grid_item_new_with_label ##### -->
+<para>
+
+</para>
+
+@icon_basename: 
+@label: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_grid_item_set_emblem_type ##### -->
+<para>
+
+</para>
+
+@item: 
+@emblem_basename: 
+
+
+<!-- ##### FUNCTION hildon_grid_item_get_emblem_type ##### -->
+<para>
+
+</para>
+
+@item: 
+@Returns: 
+
+
diff --git a/doc/tmpl/hildon-grid.sgml b/doc/tmpl/hildon-grid.sgml
new file mode 100644 (file)
index 0000000..f0af958
--- /dev/null
@@ -0,0 +1,499 @@
+<!-- ##### SECTION Title ##### -->
+HildonGrid
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<para>
+<informalexample>
+Example:
+<programlisting>
+<!-- hildon-tests/wt/hildon-widgets-combo/testgrid.c -->
+##include &lt;hildon-widgets/hildon-app.h&gt;
+##include &lt;hildon-widgets/hildon-appview.h&gt;
+##include &lt;hildon-widgets/hildon-grid.h&gt;
+##include &lt;hildon-widgets/hildon-grid-item.h&gt;
+##include &lt;gtk/gtk.h&gt;
+##include &lt;pango/pango.h&gt;
+##include &lt;libintl.h&gt;
+##include &lt;locale.h&gt;
+##include &lt;string.h&gt;
+##include &lt;gtk/gtktoolbar.h&gt;
+##include &lt;gtk/gtkwidget.h&gt;
+
+##ifdef HAVE_CONFIG_H
+##include &lt;config.h&gt;
+##endif
+
+##include &lt;stdio.h&gt;
+##include &lt;stdlib.h&gt;
+
+##define _(String) gettext (String)
+
+##define ICONFILE    "Help"
+
+enum {
+       ACTIVATE,
+       DISABLE_NEXT,
+       EMBLEM_NEXT
+};
+
+static int action = ACTIVATE;
+
+
+static GtkWidget    *w_add_one = NULL;
+static GtkWidget    *w_add_eight = NULL;
+static GtkWidget    *w_disable_next = NULL;
+static GtkWidget    *w_emblem_next = NULL;
+
+static GtkWidget    *menu_small_icons;
+static GtkWidget    *menu_big_icons;
+
+static GtkWidget    *standard_icons;
+static GtkWidget    *alt_empty_label;
+static GtkWidget    *dim_selected;
+static GtkWidget    *undim_all;
+
+
+GtkWidget *create_layout(void);
+static void activate (HildonGrid *grid, HildonGridItem *item, gpointer data);
+static void generate_name (char *target, size_t len);
+static void update_dim (HildonGrid *grid);
+
+static void add_one (HildonGrid *grid);
+static void add_eight (HildonGrid *grid);
+static void disable_this (GtkWidget *widget);
+static void emblem_this (GtkWidget *widget);
+
+static void create_basic_icons (HildonGrid *grid);
+static void remove_all_icons (HildonGrid *grid);
+static void show_standard_icons_signal (GtkMenuItem *widget, gpointer data);
+static void set_empty_label_signal (GtkMenuItem *widget, gpointer data);
+static void dim_selected_signal (GtkMenuItem *widget, gpointer data);
+static void undim_all_signal (GtkMenuItem *widget, gpointer data);
+static void set_icon_size (GtkMenuItem *item, gpointer data);
+
+void _testGrid(GtkWidget *parent, gchar **help);
+
+void
+_testGrid(GtkWidget *parent, gchar **help)
+{
+
+       GtkIconTheme *icon_theme;
+       GtkWidget *grid;
+       GtkWidget *popup;
+       GtkMenu *menu;
+       GSList *group = NULL;
+
+       icon_theme = gtk_icon_theme_get_default ();
+
+       grid = create_layout ();
+       gtk_container_add (GTK_CONTAINER (parent), grid);
+
+       g_signal_connect (grid, "activate-child", G_CALLBACK (activate), NULL);
+
+       /* Create context menu. */
+       popup = gtk_menu_new ();
+       menu_small_icons = gtk_radio_menu_item_new_with_label (group,
+                       _("Small icons"));
+       menu_big_icons = gtk_radio_menu_item_new_with_label (
+                       gtk_radio_menu_item_get_group (
+                               GTK_RADIO_MENU_ITEM (menu_small_icons)),
+                       _("Big icons"));
+       gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_big_icons),
+                       TRUE);
+
+       gtk_widget_show (menu_small_icons);
+       gtk_widget_show (menu_big_icons);
+       gtk_menu_shell_append (GTK_MENU_SHELL (popup), menu_small_icons);
+       gtk_menu_shell_append (GTK_MENU_SHELL (popup), menu_big_icons);
+       gtk_widget_tap_and_hold_setup (grid, popup, NULL, TRUE);
+
+       g_signal_connect (G_OBJECT (menu_small_icons), "activate",
+                       G_CALLBACK (set_icon_size), HILDON_GRID (grid));
+       g_signal_connect (G_OBJECT (menu_big_icons), "activate",
+                       G_CALLBACK (set_icon_size), HILDON_GRID (grid));
+
+       /* Add menuitem for showing/hiding standard icons. */
+       menu = hildon_appview_get_menu (HILDON_APPVIEW (
+                               gtk_widget_get_ancestor (parent, HILDON_TYPE_APPVIEW)));
+       standard_icons = gtk_check_menu_item_new_with_label (
+                       _("Show standard icons"));
+       gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (standard_icons), TRUE);
+       alt_empty_label = gtk_check_menu_item_new_with_label (
+                       _("Alternative empty label"));
+       gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (alt_empty_label),
+                       FALSE);
+
+       dim_selected = gtk_menu_item_new_with_label (_("Dim current"));
+       undim_all = gtk_menu_item_new_with_label (_("Undim all"));
+
+
+       gtk_menu_shell_append (GTK_MENU_SHELL (menu), standard_icons);
+       gtk_widget_show (standard_icons);
+       gtk_menu_shell_append (GTK_MENU_SHELL (menu), alt_empty_label);
+       gtk_widget_show (alt_empty_label);
+       gtk_menu_shell_append (GTK_MENU_SHELL (menu), dim_selected);
+       gtk_widget_show (dim_selected);
+       gtk_menu_shell_append (GTK_MENU_SHELL (menu), undim_all);
+       gtk_widget_show (undim_all);
+
+       g_signal_connect (G_OBJECT (standard_icons), "toggled",
+                       G_CALLBACK (show_standard_icons_signal),
+                       (gpointer) grid);
+       g_signal_connect (G_OBJECT (alt_empty_label), "toggled",
+                       G_CALLBACK (set_empty_label_signal),
+                       (gpointer) grid);
+       g_signal_connect (G_OBJECT (dim_selected), "activate",
+                       G_CALLBACK (dim_selected_signal),
+                       (gpointer) grid);
+       g_signal_connect (G_OBJECT (undim_all), "activate",
+                       G_CALLBACK (undim_all_signal),
+                       (gpointer) grid);
+
+       create_basic_icons (HILDON_GRID (grid));
+       update_dim (HILDON_GRID (grid));
+
+       hildon_grid_set_style (HILDON_GRID (grid), "bigicons");
+       gtk_widget_show (GTK_WIDGET (grid));
+
+}
+
+static void
+show_standard_icons_signal (GtkMenuItem *widget,
+                            gpointer    data)
+{
+       HildonGrid *grid;
+       grid = HILDON_GRID (data);
+
+       if (gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (widget)))
+               create_basic_icons (grid);
+       else
+               remove_all_icons (grid);
+
+       update_dim (grid);
+}
+
+static void
+set_empty_label_signal (GtkMenuItem *widget,
+                        gpointer    data)
+{
+       GValue val = {0, };
+       HildonGrid *grid;
+       grid = HILDON_GRID (data);
+
+       g_value_init (&amp;val, G_TYPE_STRING);
+
+       if (gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (widget)))
+               g_value_set_string (&amp;val, _("Alternative empty label here"));
+       else
+               g_value_set_string (&amp;val, _("No icons"));
+
+       g_object_set_property (G_OBJECT (grid), "empty_label", &amp;val);
+}
+
+static void
+create_basic_icons (HildonGrid *grid)
+{
+       w_add_one = hildon_grid_item_new_with_label (
+                       "Calendar", _("Add one"));
+       w_add_eight = hildon_grid_item_new_with_label (
+                       "Clock", _("Add eight"));
+       w_disable_next = hildon_grid_item_new_with_label (
+                       "Calculator", _("Disable next"));
+       w_emblem_next = hildon_grid_item_new_with_label (
+                       "Paint", _("Set emblem"));
+       emblem_this (w_emblem_next);
+
+       gtk_container_add (GTK_CONTAINER (grid), w_add_one);
+       gtk_container_add (GTK_CONTAINER (grid), w_add_eight);
+       gtk_container_add (GTK_CONTAINER (grid), w_disable_next);
+       gtk_container_add (GTK_CONTAINER (grid), w_emblem_next);
+}
+
+static void
+remove_all_icons (HildonGrid *grid)
+{
+       gtk_container_remove (GTK_CONTAINER (grid), w_add_one);
+       gtk_container_remove (GTK_CONTAINER (grid), w_add_eight);
+       gtk_container_remove (GTK_CONTAINER (grid), w_disable_next);
+       gtk_container_remove (GTK_CONTAINER (grid), w_emblem_next);
+}
+
+static void
+generate_name (gchar *target, size_t len)
+{
+       int i;
+       target[len] = '\0';
+       for (i = 0; i &lt; len; i++)
+               target[i] = (rand() &amp; 0x0f) + 'a';
+}
+
+
+GtkWidget *
+create_layout (void)
+{
+       GtkWidget *grid;
+       grid = hildon_grid_new ();
+       return GTK_WIDGET (grid);
+}
+
+static void
+activate (HildonGrid *grid, HildonGridItem *item, gpointer data)
+{
+       GtkWidget *widget;
+       widget = GTK_WIDGET (item);
+
+       switch (action)
+       {
+               case ACTIVATE:
+                       if (widget == w_add_one)
+                               add_one (grid);
+                       else if (widget == w_add_eight)
+                               add_eight (grid);
+                       else if (widget == w_disable_next)
+                               action = DISABLE_NEXT;
+                       else if (widget == w_emblem_next)
+                               action = EMBLEM_NEXT;
+                       else
+                       {
+                               gtk_container_remove (GTK_CONTAINER (grid), widget);
+                               update_dim (grid);
+                       }
+                       break;
+
+               case DISABLE_NEXT:
+                       disable_this (widget);
+                       action = ACTIVATE;
+                       break;
+
+               case EMBLEM_NEXT:
+                       emblem_this (widget);
+                       action = ACTIVATE;
+                       break;
+       }
+}
+
+static void
+add_one (HildonGrid *grid)
+{
+#define LABEL_WIDTH 64
+       static gchar foo[LABEL_WIDTH];
+       GtkWidget *t;
+       generate_name (foo, rand () % (LABEL_WIDTH - 1) + 1);
+       t = hildon_grid_item_new_with_label (ICONFILE, foo);
+       gtk_container_add (GTK_CONTAINER (grid), t);
+       gtk_widget_show (t);
+
+       update_dim (grid);
+}
+
+static void
+add_eight (HildonGrid *grid)
+{
+       int i;
+       for (i = 0; i &lt; 8; i++)
+               add_one (grid);
+}
+
+static void
+emblem_this (GtkWidget *widget)
+{
+       const char *emblem;
+       emblem = hildon_grid_item_get_emblem_type (HILDON_GRID_ITEM (widget));
+
+       hildon_grid_item_set_emblem_type (HILDON_GRID_ITEM (widget),
+                       emblem == NULL ? "gnome-mime-image-png" : NULL);
+}
+       
+static void
+disable_this (GtkWidget *widget)
+{
+       gtk_widget_set_sensitive (widget, FALSE);
+}
+
+static void
+dim_selected_signal (GtkMenuItem    *widget,
+                     gpointer       data)
+{
+       GtkWidget *selected;
+
+       selected = GTK_CONTAINER (data)-&gt;focus_child;
+       gtk_widget_set_sensitive (selected, FALSE);
+}
+
+static void
+undim_all_signal (GtkMenuItem   *widget,
+                  gpointer      data)
+{
+       gtk_container_foreach (GTK_CONTAINER (data),
+                       (GtkCallback) gtk_widget_set_sensitive,
+                       (gpointer) TRUE);
+}
+
+static void
+update_dim (HildonGrid *grid)
+{
+       GtkWidget *selected;
+       selected = GTK_CONTAINER (grid)-&gt;focus_child;
+       gtk_widget_set_sensitive (dim_selected, selected != NULL);
+}
+
+static void
+set_icon_size (GtkMenuItem *item, gpointer data)
+{
+       HildonGrid *grid;
+       grid = HILDON_GRID (data);
+
+       if (GTK_WIDGET (item) == menu_small_icons)
+               hildon_grid_set_style (grid, "smallicons");
+       else if (GTK_WIDGET (item) == menu_big_icons)
+               hildon_grid_set_style (grid, "bigicons");
+} 
+</programlisting>
+</informalexample>
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT HildonGrid ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION hildon_grid_new ##### -->
+<para>
+
+</para>
+
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_grid_set_style ##### -->
+<para>
+
+</para>
+
+@grid: 
+@style_name: 
+
+
+<!-- ##### FUNCTION hildon_grid_get_style ##### -->
+<para>
+
+</para>
+
+@grid: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_grid_set_scrollbar_pos ##### -->
+<para>
+
+</para>
+
+@grid: 
+@scrollbar_pos: 
+
+
+<!-- ##### FUNCTION hildon_grid_get_scrollbar_pos ##### -->
+<para>
+
+</para>
+
+@grid: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_grid_activate_child ##### -->
+<para>
+
+</para>
+
+@grid: 
+@item: 
+
+
+<!-- ##### SIGNAL HildonGrid::activate-child ##### -->
+<para>
+
+</para>
+
+@hildongrid: the object which received the signal.
+@arg1: 
+
+<!-- ##### SIGNAL HildonGrid::popup-context-menu ##### -->
+<para>
+
+</para>
+
+@hildongrid: the object which received the signal.
+@arg1: 
+@arg2: 
+@arg3: 
+@Returns: 
+
+<!-- ##### ARG HildonGrid:empty-label ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG HildonGrid:emblem-size ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG HildonGrid:icon-size ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG HildonGrid:item-height ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG HildonGrid:item-hspacing ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG HildonGrid:item-vspacing ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG HildonGrid:item-width ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG HildonGrid:label-hspacing ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG HildonGrid:label-pos ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG HildonGrid:label-vspacing ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG HildonGrid:n-columns ##### -->
+<para>
+
+</para>
+
diff --git a/doc/tmpl/hildon-hvolumebar.sgml b/doc/tmpl/hildon-hvolumebar.sgml
new file mode 100644 (file)
index 0000000..e680412
--- /dev/null
@@ -0,0 +1,45 @@
+<!-- ##### SECTION Title ##### -->
+HildonHVolumebar
+
+<!-- ##### SECTION Short_Description ##### -->
+A widget that displays a horizontal volume bar.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+The #HildonHVolumebar widget displays a horizontal volume bar that allows
+increasing or decreasing volume within a pre-defined range, and muting
+the volume by clicking on a specific mute icon.
+</para>
+
+<para>
+Here's a simple example that creates a horizontal volume bar and connects
+both its signals:
+
+<informalexample>
+<programlisting>
+GtkWidget *volbar = hildon_hvolumebar_new ();
+g_signal_connect( G_OBJECT(volbar), "mute_toggled", G_CALLBACK(mute_toggle), NULL );
+g_signal_connect( G_OBJECT(volbar), "level_changed", G_CALLBACK(level_change), NULL );
+</programlisting>
+</informalexample>
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+#HildonVVolumebar
+</para>
+
+<!-- ##### STRUCT HildonHVolumebar ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION hildon_hvolumebar_new ##### -->
+<para>
+
+</para>
+
+@Returns: 
+
+
diff --git a/doc/tmpl/hildon-hwr-area.sgml b/doc/tmpl/hildon-hwr-area.sgml
new file mode 100644 (file)
index 0000000..95240d6
--- /dev/null
@@ -0,0 +1,93 @@
+<!-- ##### SECTION Title ##### -->
+HildonHWRArea
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### MACRO HILDON_FILE_CHOOSER_DIALOG_CLASS ##### -->
+<para>
+
+</para>
+
+@klass: 
+
+
+<!-- ##### STRUCT HildonHWRAreaPrivate ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ENUM HildonHWRAreaMode ##### -->
+<para>
+
+</para>
+
+@HILDON_HWR_AREA_MODE_NORMAL: 
+@HILDON_HWR_AREA_MODE_SECRET: 
+@HILDON_HWR_AREA_MODE_TRAINING: 
+
+<!-- ##### FUNCTION hildon_hwr_area_new ##### -->
+<para>
+
+</para>
+
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_hwr_area_clear ##### -->
+<para>
+
+</para>
+
+@area: 
+
+
+<!-- ##### FUNCTION hildon_hwr_area_send_text ##### -->
+<para>
+
+</para>
+
+@area: 
+@data: 
+@position: 
+@replace: 
+
+
+<!-- ##### FUNCTION hildon_hwr_area_get_text ##### -->
+<para>
+
+</para>
+
+@area: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_hwr_area_start_training ##### -->
+<para>
+
+</para>
+
+@area: 
+
+
+<!-- ##### FUNCTION hildon_hwr_area_finish_training ##### -->
+<para>
+
+</para>
+
+@area: 
+@ch: 
+@Returns: 
+
+
diff --git a/doc/tmpl/hildon-insert-object-dialog.sgml b/doc/tmpl/hildon-insert-object-dialog.sgml
new file mode 100644 (file)
index 0000000..d3ab8b2
--- /dev/null
@@ -0,0 +1,81 @@
+<!-- ##### SECTION Title ##### -->
+HildonInsertObjectDialog
+
+<!-- ##### SECTION Short_Description ##### -->
+A dialog that enables the user to embed an object into rich text.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+#HildonInsertObjectDialog is a dialog that enables the user to insert a
+new or existing object into a Multi-line (Rich Text) Editor as an
+embedded object.
+</para>
+
+<para>
+Here's a simple example for using #HildonInsertObjectDialog:
+
+<informalexample>
+<programlisting>
+  GtkWidget *dialog;
+  gint result;
+  gchar *name, *mime_type;
+
+  dialog = hildon_insert_object_dialog_new(parent);
+  g_signal_connect(G_OBJECT(dialog), "response",
+                   G_CALLBACK(response_cb), NULL);
+  result = gtk_dialog_run(GTK_DIALOG(dialog));
+
+  switch (result)
+    {
+    case GTK_RESPONSE_OK:
+      name = hildon_insert_object_dialog_get_name( HILDON_INSERT_OBJECT_DIALOG(dialog) );
+      mime_type = hildon_insert_object_dialog_get_mime_type( HILDON_INSERT_OBJECT_DIALOG(dialog) );
+      hildon_insert_object_dialog_set_file( HILDON_INSERT_OBJECT_DIALOG(dialog) );
+      break;
+    case HILDON_RESPONSE_INSERT_EXISTING:
+      break;
+    default:
+      break;
+    }
+
+  gtk_widget_destroy(dialog);
+</programlisting>
+</informalexample>
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### MACRO HILDON_RESPONSE_INSERT_EXISTING ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### STRUCT HildonInsertObjectDialog ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION hildon_insert_object_dialog_new ##### -->
+<para>
+
+</para>
+
+@parent: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_insert_object_dialog_get_name ##### -->
+<para>
+
+</para>
+
+@dialog: 
+@Returns: 
+
+
diff --git a/doc/tmpl/hildon-libs-unused.sgml b/doc/tmpl/hildon-libs-unused.sgml
new file mode 100644 (file)
index 0000000..7e0f662
--- /dev/null
@@ -0,0 +1,873 @@
+<!-- ##### SECTION ./tmpl/hildon-hwr-area.sgml:Long_Description ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION ./tmpl/hildon-hwr-area.sgml:See_Also ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SECTION ./tmpl/hildon-hwr-area.sgml:Short_Description ##### -->
+
+
+
+<!-- ##### SECTION ./tmpl/hildon-hwr-area.sgml:Title ##### -->
+HildonHWRArea
+
+
+<!-- ##### MACRO GTK_FILE_SYSTEM_ENABLE_UNSUPPORTED ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO HILDON_FILE_CHOOSER_DIALOG_CLASS ##### -->
+<para>
+
+</para>
+
+@klass: 
+
+<!-- ##### SIGNAL HildonApp::topmost-status-acquire ##### -->
+<para>
+
+</para>
+
+@hildonapp: the object which received the signal.
+
+<!-- ##### SIGNAL HildonApp::topmost-status-lose ##### -->
+<para>
+
+</para>
+
+@hildonapp: the object which received the signal.
+
+<!-- ##### SIGNAL HildonAppView::fullscreen-state-change ##### -->
+<para>
+
+</para>
+
+@hildonappview: the object which received the signal.
+@arg1: 
+
+<!-- ##### SIGNAL HildonAppView::switched-from ##### -->
+<para>
+
+</para>
+
+@hildonappview: the object which received the signal.
+
+<!-- ##### SIGNAL HildonAppView::switched-to ##### -->
+<para>
+
+</para>
+
+@hildonappview: the object which received the signal.
+
+<!-- ##### SIGNAL HildonAppView::title-change ##### -->
+<para>
+
+</para>
+
+@hildonappview: the object which received the signal.
+
+<!-- ##### SIGNAL HildonAppView::toolbar-changed ##### -->
+<para>
+
+</para>
+
+@hildonappview: the object which received the signal.
+
+<!-- ##### SIGNAL HildonAppView::toolbar-toggle-request ##### -->
+<para>
+
+</para>
+
+@hildonappview: the object which received the signal.
+
+<!-- ##### STRUCT HildonAppViewPrivate ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT HildonFileChooserDialogPrivate ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ENUM HildonFileSelectionMode ##### -->
+<para>
+
+</para>
+
+@HILDON_FILE_SELECTION_MODE_LIST: 
+@HILDON_FILE_SELECTION_MODE_THUMBNAILS: 
+
+<!-- ##### STRUCT HildonFileSelectionPrivate ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ENUM HildonFileSelectionSortKey ##### -->
+<para>
+
+</para>
+
+@HILDON_FILE_SELECTION_SORT_NAME: 
+@HILDON_FILE_SELECTION_SORT_TYPE: 
+@HILDON_FILE_SELECTION_SORT_MODIFIED: 
+@HILDON_FILE_SELECTION_SORT_SIZE: 
+
+<!-- ##### ENUM HildonFileSystemModelColumns ##### -->
+<para>
+
+</para>
+
+@HILDON_FILE_SYSTEM_MODEL_COLUMN_GTK_PATH: 
+@HILDON_FILE_SYSTEM_MODEL_COLUMN_LOCAL_PATH: 
+@HILDON_FILE_SYSTEM_MODEL_COLUMN_URI: 
+@HILDON_FILE_SYSTEM_MODEL_COLUMN_FILE_NAME: 
+@HILDON_FILE_SYSTEM_MODEL_COLUMN_DISPLAY_NAME: 
+@HILDON_FILE_SYSTEM_MODEL_COLUMN_MIME_TYPE: 
+@HILDON_FILE_SYSTEM_MODEL_COLUMN_FILE_SIZE: 
+@HILDON_FILE_SYSTEM_MODEL_COLUMN_FILE_TIME: 
+@HILDON_FILE_SYSTEM_MODEL_COLUMN_IS_FOLDER: 
+@HILDON_FILE_SYSTEM_MODEL_COLUMN_HAS_LOCAL_PATH: 
+@HILDON_FILE_SYSTEM_MODEL_COLUMN_TYPE: 
+@HILDON_FILE_SYSTEM_MODEL_COLUMN_ICON: 
+@HILDON_FILE_SYSTEM_MODEL_COLUMN_ICON_EXPANDED: 
+@HILDON_FILE_SYSTEM_MODEL_COLUMN_ICON_COLLAPSED: 
+@HILDON_FILE_SYSTEM_MODEL_COLUMN_THUMBNAIL: 
+@HILDON_FILE_SYSTEM_MODEL_NUM_COLUMNS: 
+
+<!-- ##### ENUM HildonFileSystemModelItemType ##### -->
+<para>
+
+</para>
+
+@HILDON_FILE_SYSTEM_MODEL_UNKNOWN: 
+@HILDON_FILE_SYSTEM_MODEL_FILE: 
+@HILDON_FILE_SYSTEM_MODEL_FOLDER: 
+@HILDON_FILE_SYSTEM_MODEL_SAFE_FOLDER_IMAGES: 
+@HILDON_FILE_SYSTEM_MODEL_SAFE_FOLDER_VIDEOS: 
+@HILDON_FILE_SYSTEM_MODEL_SAFE_FOLDER_SOUNDS: 
+@HILDON_FILE_SYSTEM_MODEL_SAFE_FOLDER_DOCUMENTS: 
+@HILDON_FILE_SYSTEM_MODEL_MMC: 
+@HILDON_FILE_SYSTEM_MODEL_GATEWAY: 
+@HILDON_FILE_SYSTEM_MODEL_SPUTNIK: 
+
+<!-- ##### STRUCT HildonFileSystemModelPrivate ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### USER_FUNCTION HildonFileSystemModelThumbnailCallback ##### -->
+<para>
+
+</para>
+
+@uri: 
+@path: 
+@thumbnail_file: 
+@Returns: 
+
+<!-- ##### ENUM HildonHWRAreaMode ##### -->
+<para>
+
+</para>
+
+@HILDON_HWR_AREA_MODE_NORMAL: 
+@HILDON_HWR_AREA_MODE_SECRET: 
+@HILDON_HWR_AREA_MODE_TRAINING: 
+
+<!-- ##### STRUCT HildonHWRAreaPrivate ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT HildonInsertObjectDialogPrivate ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SIGNAL HildonVolumebar::level-changed ##### -->
+<para>
+
+</para>
+
+@hildonvolumebar: the object which received the signal.
+
+<!-- ##### SIGNAL HildonVolumebar::mute-toggled ##### -->
+<para>
+
+</para>
+
+@hildonvolumebar: the object which received the signal.
+
+<!-- ##### ENUM HildonZoomLevel ##### -->
+<para>
+
+</para>
+
+@HILDON_ZOOM_SMALL: 
+@HILDON_ZOOM_MEDIUM: 
+@HILDON_ZOOM_LARGE: 
+
+<!-- ##### FUNCTION gtk_banner_close ##### -->
+<para>
+
+</para>
+
+@parent: 
+
+<!-- ##### FUNCTION gtk_banner_set_fraction ##### -->
+<para>
+
+</para>
+
+@parent: 
+@fraction: 
+
+<!-- ##### FUNCTION gtk_banner_set_text ##### -->
+<para>
+
+</para>
+
+@parent: 
+@text: 
+
+<!-- ##### FUNCTION gtk_banner_show_animation ##### -->
+<para>
+
+</para>
+
+@parent: 
+@text: 
+
+<!-- ##### FUNCTION gtk_banner_show_bar ##### -->
+<para>
+
+</para>
+
+@parent: 
+@text: 
+
+<!-- ##### FUNCTION gtk_banner_temporarily_disable_wrap ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION gtk_confirmation_banner ##### -->
+<para>
+
+</para>
+
+@parent: 
+@text: 
+@stock_id: 
+
+<!-- ##### FUNCTION gtk_infoprint ##### -->
+<para>
+
+</para>
+
+@parent: 
+@text: 
+
+<!-- ##### FUNCTION gtk_infoprint_temporarily_disable_wrap ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION gtk_infoprint_with_icon_stock ##### -->
+<para>
+
+</para>
+
+@parent: 
+@text: 
+@stock_id: 
+
+<!-- ##### FUNCTION gtk_infoprintf ##### -->
+<para>
+
+</para>
+
+@parent: 
+@format: 
+@Varargs: 
+
+<!-- ##### FUNCTION hildon_app_get_appview ##### -->
+<para>
+
+</para>
+
+@self: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_app_get_default_font ##### -->
+<para>
+
+</para>
+
+@self: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_app_get_title ##### -->
+<para>
+
+</para>
+
+@self: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_app_get_two_part_title ##### -->
+<para>
+
+</para>
+
+@self: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_app_get_zoom ##### -->
+<para>
+
+</para>
+
+@self: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_app_get_zoom_font ##### -->
+<para>
+
+</para>
+
+@self: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_app_new ##### -->
+<para>
+
+</para>
+
+@Returns: 
+
+<!-- ##### FUNCTION hildon_app_new_with_appview ##### -->
+<para>
+
+</para>
+
+@appview: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_app_set_appview ##### -->
+<para>
+
+</para>
+
+@self: 
+@appview: 
+
+<!-- ##### FUNCTION hildon_app_set_title ##### -->
+<para>
+
+</para>
+
+@self: 
+@newtitle: 
+
+<!-- ##### FUNCTION hildon_app_set_two_part_title ##### -->
+<para>
+
+</para>
+
+@self: 
+@istwoparttitle: 
+
+<!-- ##### FUNCTION hildon_app_set_zoom ##### -->
+<para>
+
+</para>
+
+@self: 
+@newzoom: 
+
+<!-- ##### FUNCTION hildon_appview_add_with_scrollbar ##### -->
+<para>
+
+</para>
+
+@self: 
+@child: 
+
+<!-- ##### FUNCTION hildon_appview_get_fullscreen ##### -->
+<para>
+
+</para>
+
+@self: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_appview_get_fullscreen_key_allowed ##### -->
+<para>
+
+</para>
+
+@self: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_appview_get_menu ##### -->
+<para>
+
+</para>
+
+@self: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_appview_get_title ##### -->
+<para>
+
+</para>
+
+@self: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_appview_get_toolbar ##### -->
+<para>
+
+</para>
+
+@self: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_appview_new ##### -->
+<para>
+
+</para>
+
+@title: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_appview_set_fullscreen ##### -->
+<para>
+
+</para>
+
+@self: 
+@fullscreen: 
+
+<!-- ##### FUNCTION hildon_appview_set_fullscreen_key_allowed ##### -->
+<para>
+
+</para>
+
+@self: 
+@allow: 
+
+<!-- ##### FUNCTION hildon_appview_set_title ##### -->
+<para>
+
+</para>
+
+@self: 
+@newname: 
+
+<!-- ##### FUNCTION hildon_appview_set_toolbar ##### -->
+<para>
+
+</para>
+
+@self: 
+@toolbar: 
+
+<!-- ##### FUNCTION hildon_file_chooser_dialog_new ##### -->
+<para>
+
+</para>
+
+@parent: 
+@action: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_file_chooser_dialog_new_with_properties ##### -->
+<para>
+
+</para>
+
+@parent: 
+@first_property: 
+@Varargs: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_file_selection_get_current_content_iter ##### -->
+<para>
+
+</para>
+
+@self: 
+@iter: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_file_selection_get_current_folder ##### -->
+<para>
+
+</para>
+
+@self: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_file_selection_get_current_folder_iter ##### -->
+<para>
+
+</para>
+
+@self: 
+@iter: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_file_selection_get_filter ##### -->
+<para>
+
+</para>
+
+@self: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_file_selection_get_mode ##### -->
+<para>
+
+</para>
+
+@self: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_file_selection_get_select_multiple ##### -->
+<para>
+
+</para>
+
+@self: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_file_selection_get_selected_paths ##### -->
+<para>
+
+</para>
+
+@self: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_file_selection_get_sort_key ##### -->
+<para>
+
+</para>
+
+@self: 
+@key: 
+@order: 
+
+<!-- ##### FUNCTION hildon_file_selection_hide_content_pane ##### -->
+<para>
+
+</para>
+
+@self: 
+
+<!-- ##### FUNCTION hildon_file_selection_new_with_model ##### -->
+<para>
+
+</para>
+
+@model: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_file_selection_select_all ##### -->
+<para>
+
+</para>
+
+@self: 
+
+<!-- ##### FUNCTION hildon_file_selection_select_path ##### -->
+<para>
+
+</para>
+
+@self: 
+@path: 
+@error: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_file_selection_set_current_folder ##### -->
+<para>
+
+</para>
+
+@self: 
+@folder: 
+@error: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_file_selection_set_filter ##### -->
+<para>
+
+</para>
+
+@self: 
+@filter: 
+
+<!-- ##### FUNCTION hildon_file_selection_set_mode ##### -->
+<para>
+
+</para>
+
+@self: 
+@mode: 
+
+<!-- ##### FUNCTION hildon_file_selection_set_select_multiple ##### -->
+<para>
+
+</para>
+
+@self: 
+@select_multiple: 
+
+<!-- ##### FUNCTION hildon_file_selection_set_sort_key ##### -->
+<para>
+
+</para>
+
+@self: 
+@key: 
+@order: 
+
+<!-- ##### FUNCTION hildon_file_selection_show_content_pane ##### -->
+<para>
+
+</para>
+
+@self: 
+
+<!-- ##### FUNCTION hildon_file_selection_unselect_all ##### -->
+<para>
+
+</para>
+
+@self: 
+
+<!-- ##### FUNCTION hildon_file_selection_unselect_path ##### -->
+<para>
+
+</para>
+
+@self: 
+@path: 
+
+<!-- ##### FUNCTION hildon_file_system_model_load_path ##### -->
+<para>
+
+</para>
+
+@model: 
+@path: 
+@iter: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_file_system_model_new_item ##### -->
+<para>
+
+</para>
+
+@model: 
+@parent: 
+@stub_name: 
+@extension: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_file_system_model_search_local_path ##### -->
+<para>
+
+</para>
+
+@model: 
+@path: 
+@iter: 
+@start_iter: 
+@recursive: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_file_system_model_search_path ##### -->
+<para>
+
+</para>
+
+@model: 
+@path: 
+@iter: 
+@start_iter: 
+@recursive: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_file_system_model_search_uri ##### -->
+<para>
+
+</para>
+
+@model: 
+@uri: 
+@iter: 
+@start_iter: 
+@recursive: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_find_replace_dialog_get_new_text ##### -->
+<para>
+
+</para>
+
+@dialog: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_font_selection_dialog_get_color ##### -->
+<para>
+
+</para>
+
+@fsd: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_font_selection_dialog_get_font ##### -->
+<para>
+
+</para>
+
+@fsd: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_font_selection_dialog_set_color ##### -->
+<para>
+
+</para>
+
+@fsd: 
+@color: 
+
+<!-- ##### FUNCTION hildon_get_password_dialog_get_password ##### -->
+<para>
+
+</para>
+
+@dialog: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_hwr_area_clear ##### -->
+<para>
+
+</para>
+
+@area: 
+
+<!-- ##### FUNCTION hildon_hwr_area_finish_training ##### -->
+<para>
+
+</para>
+
+@area: 
+@ch: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_hwr_area_get_text ##### -->
+<para>
+
+</para>
+
+@area: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_hwr_area_new ##### -->
+<para>
+
+</para>
+
+@Returns: 
+
+<!-- ##### FUNCTION hildon_hwr_area_send_text ##### -->
+<para>
+
+</para>
+
+@area: 
+@data: 
+@position: 
+@replace: 
+
+<!-- ##### FUNCTION hildon_hwr_area_start_training ##### -->
+<para>
+
+</para>
+
+@area: 
+
+<!-- ##### FUNCTION hildon_insert_object_dialog_get_mime_type ##### -->
+<para>
+
+</para>
+
+@dialog: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_insert_object_dialog_set_file ##### -->
+<para>
+
+</para>
+
+@dialog: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_note_new_cancel ##### -->
+<para>
+
+</para>
+
+@parent: 
+@description: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_set_password_dialog_get_password ##### -->
+<para>
+
+</para>
+
+@dialog: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_shorten_names_dialog_get_model ##### -->
+<para>
+
+</para>
+
+@dialog: 
+@Returns: 
+
+<!-- ##### FUNCTION hildon_telephone_editor_new_with_strings ##### -->
+<para>
+
+</para>
+
+@format: 
+@country: 
+@area: 
+@number: 
+@Returns: 
+
diff --git a/doc/tmpl/hildon-name-password-dialog.sgml b/doc/tmpl/hildon-name-password-dialog.sgml
new file mode 100644 (file)
index 0000000..08815a9
--- /dev/null
@@ -0,0 +1,78 @@
+<!-- ##### SECTION Title ##### -->
+HildonNamePasswordDialog
+
+<!-- ##### SECTION Short_Description ##### -->
+A widget which allows a user to enter username and password
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+Used to enter a username and password when accessing a password protected function.
+</para>
+
+<para>
+<informalexample>
+Example:
+<programlisting>
+void _new_name_password_dialog(GtkDialog *options)
+{
+   gtk_widget_destroy(GTK_WIDGET(nameDialog));
+   nameDialog = HILDON_NAME_PASSWORD_DIALOG(hildon_name_password_dialog_new(grand_parent));
+   gtk_dialog_run(GTK_DIALOG(nameDialog));
+   gtk_widget_hide(GTK_WIDGET(nameDialog));
+}
+      
+void _testNamePasswordDialog(GtkWidget *parent, gchar **help)
+{
+   GtkWidget *button;
+   GtkWidget *vbox = gtk_vbox_new(FALSE, 0);
+   grand_parent = GTK_WINDOW(gtk_widget_get_ancestor(parent,GTK_TYPE_WINDOW));
+   normalDialog = gtk_dialog_new_with_buttons(``dialog'',grand_parent,GTK_DIALOG_MODAL, GTK_STOCK_OK, GTK_RESPONSE_OK,NULL);
+   nameDialog = HILDON_NAME_PASSWORD_DIALOG(hildon_name_password_dialog_new(grand_parent));
+   gtk_container_add(GTK_CONTAINER(parent), vbox);
+   button = gtk_button_new_with_label(_(``Name and Password Dialog''));
+   gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0);
+   g_signal_connect(G_OBJECT(button), ``clicked'', G_CALLBACK(_new_name_password_dialog), NULL);
+   gtk_widget_show_all(vbox);
+}
+</programlisting>
+</informalexample>
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT HildonNamePasswordDialog ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION hildon_name_password_dialog_new ##### -->
+<para>
+
+</para>
+
+@parent: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_name_password_dialog_get_name ##### -->
+<para>
+
+</para>
+
+@dialog: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_name_password_dialog_get_password ##### -->
+<para>
+
+</para>
+
+@dialog: 
+@Returns: 
+
+
diff --git a/doc/tmpl/hildon-note.sgml b/doc/tmpl/hildon-note.sgml
new file mode 100644 (file)
index 0000000..e7cc8f5
--- /dev/null
@@ -0,0 +1,146 @@
+<!-- ##### SECTION Title ##### -->
+HildonNote
+
+<!-- ##### SECTION Short_Description ##### -->
+A widget to ask confirmation from the user.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+Notes are used to have a confirmation (Ok/Cancel/etc.) from the user.
+A simple note contains an information text and an Ok-button to be pressed.
+Additional features can be e.g. progressbars or animations.
+
+<informalexample>
+<programlisting>
+
+hildon_note_new_confirmation( window, "You are forced to format your drives" );
+
+i = gtk_dialog_run (GTK_DIALOG (note));
+gtk_widget_destroy (GTK_WIDGET (note));
+
+if (i == GTK_RESPONSE_OK)
+   gtk_infoprint( window, "Your pathetic files has been erased, MUAHAH!" );
+else
+   gtk_infoprint( window, "No, you cant change your destiny, MUAHAH!" );
+
+</programlisting>
+</informalexample>
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT HildonNote ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG HildonNote:description ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG HildonNote:icon ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG HildonNote:note-type ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG HildonNote:progressbar ##### -->
+<para>
+
+</para>
+
+<!-- ##### FUNCTION hildon_note_new_confirmation ##### -->
+<para>
+
+</para>
+
+@parent: 
+@description: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_note_new_confirmation_add_buttons ##### -->
+<para>
+
+</para>
+
+@parent: 
+@description: 
+@Varargs: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_note_new_confirmation_with_icon_stock ##### -->
+<para>
+
+</para>
+
+@parent: 
+@description: 
+@stock_id: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_note_new_cancel_with_progress_bar ##### -->
+<para>
+
+</para>
+
+@parent: 
+@description: 
+@progressbar: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_note_new_information ##### -->
+<para>
+
+</para>
+
+@parent: 
+@description: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_note_new_information_with_icon_stock ##### -->
+<para>
+
+</para>
+
+@parent: 
+@description: 
+@stock_id: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_note_new_information_with_icon_theme ##### -->
+<para>
+
+</para>
+
+@parent: 
+@description: 
+@icon: 
+@Returns: 
+<!-- # Unused Parameters # -->
+@stock_id: 
+
+
+<!-- ##### FUNCTION hildon_note_set_button_text ##### -->
+<para>
+
+</para>
+
+@note: 
+@text: 
+
+
diff --git a/doc/tmpl/hildon-number-editor.sgml b/doc/tmpl/hildon-number-editor.sgml
new file mode 100644 (file)
index 0000000..292498f
--- /dev/null
@@ -0,0 +1,74 @@
+<!-- ##### SECTION Title ##### -->
+HildonNumberEditor
+
+<!-- ##### SECTION Short_Description ##### -->
+HildonNumberEditor is used to set a number.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+HildonNumberEditor is used to set a number from a specific range. There's two buttons to scroll the value in number field, also manual input is possible.
+
+<informalexample>
+<programlisting>
+  number_editor = hildon_number_editor_new (-250, 500);
+  hildon_number_editor_set_range (number_editor, 0, 100);
+</programlisting>
+</informalexample>
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT HildonNumberEditor ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION hildon_number_editor_new ##### -->
+<para>
+
+</para>
+
+@min: 
+@max: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_number_editor_set_range ##### -->
+<para>
+
+</para>
+
+@editor: 
+@min: 
+@max: 
+
+
+<!-- ##### FUNCTION hildon_number_editor_get_value ##### -->
+<para>
+
+</para>
+
+@editor: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_number_editor_set_value ##### -->
+<para>
+
+</para>
+
+@editor: 
+@value: 
+
+
+<!-- ##### SIGNAL HildonNumberEditor::activate ##### -->
+<para>
+
+</para>
+
+@hildonnumbereditor: the object which received the signal.
+
diff --git a/doc/tmpl/hildon-range-editor.sgml b/doc/tmpl/hildon-range-editor.sgml
new file mode 100644 (file)
index 0000000..b8ea2f7
--- /dev/null
@@ -0,0 +1,102 @@
+<!-- ##### SECTION Title ##### -->
+HildonRangeEditor
+
+<!-- ##### SECTION Short_Description ##### -->
+HildonRangeEditor is used to ask a value from a specific limits.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+HildonRangeEditor is used to ask a value from a specific limits.
+
+<informalexample>
+
+<programlisting>
+       range_editor = hildon_range_editor_new();
+  hildon_range_editor_set_limits( editor, start, end );
+       hildon_range_editor_get_range( editor, &amp;start, &amp;end );
+</programlisting>
+</informalexample>
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### MACRO HILDON_RANGE_EDITOR_TYPE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### STRUCT HildonRangeEditor ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION hildon_range_editor_new_with_separator ##### -->
+<para>
+
+</para>
+
+@separator: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_range_editor_new ##### -->
+<para>
+
+</para>
+
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_range_editor_set_range ##### -->
+<para>
+
+</para>
+
+@editor: 
+@start: 
+@end: 
+
+
+<!-- ##### FUNCTION hildon_range_editor_get_range ##### -->
+<para>
+
+</para>
+
+@editor: 
+@start: 
+@end: 
+
+
+<!-- ##### FUNCTION hildon_range_editor_set_limits ##### -->
+<para>
+
+</para>
+
+@editor: 
+@start: 
+@end: 
+
+
+<!-- ##### SIGNAL HildonRangeEditor::activate ##### -->
+<para>
+
+</para>
+
+@hildonrangeeditor: the object which received the signal.
+
+<!-- ##### ARG HildonRangeEditor:hildon-range-editor-entry-alignment ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG HildonRangeEditor:hildon-range-editor-separator-padding ##### -->
+<para>
+
+</para>
+
diff --git a/doc/tmpl/hildon-scroll-area.sgml b/doc/tmpl/hildon-scroll-area.sgml
new file mode 100644 (file)
index 0000000..6f43147
--- /dev/null
@@ -0,0 +1,26 @@
+<!-- ##### SECTION Title ##### -->
+hildon-scroll-area
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### FUNCTION hildon_scroll_area_new ##### -->
+<para>
+
+</para>
+
+@sw: 
+@child: 
+@Returns: 
+
+
diff --git a/doc/tmpl/hildon-search.sgml b/doc/tmpl/hildon-search.sgml
new file mode 100644 (file)
index 0000000..f9204c3
--- /dev/null
@@ -0,0 +1,53 @@
+<!-- ##### SECTION Title ##### -->
+HildonSearch
+
+<!-- ##### SECTION Short_Description ##### -->
+HildonSearch is a widget to ask details to a comming search operation.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+HildonSearch is a widget to ask details to a comming search operation.
+It's possible to set an image to inform ongoing search operation.
+
+<informalexample>
+<programlisting>
+  GtkWidget *search = hildon_search_new( "hildon-search");
+       hildon_search_set_image_stock( HILDON_SEARCH(search), ICON_NAME[counter] );
+</programlisting>
+</informalexample>
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT HildonSearch ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION hildon_search_new ##### -->
+<para>
+
+</para>
+
+@image: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_search_set_image_stock ##### -->
+<para>
+
+</para>
+
+@search: 
+@stock_icon: 
+
+
+<!-- ##### ARG HildonSearch:stock-icon-name ##### -->
+<para>
+
+</para>
+
diff --git a/doc/tmpl/hildon-seekbar.sgml b/doc/tmpl/hildon-seekbar.sgml
new file mode 100644 (file)
index 0000000..0190908
--- /dev/null
@@ -0,0 +1,124 @@
+<!-- ##### SECTION Title ##### -->
+HildonSeekbar
+
+<!-- ##### SECTION Short_Description ##### -->
+HildonSeekbar is used to seek a place from a content. Can be used eg. to browse a mp3 track.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+HildonSeekbar is used to seek a place from a content. Can be used eg. to browse a mp3 track. 
+
+<informalexample>
+<programlisting>
+       GtkWidget *seekbar = hildon_seekbar_new();
+       hildon_seekbar_set_total_time (GTK_WIDGET(seekbar), 600);
+       hildon_seekbar_set_position (GTK_WIDGET(seekbar), 300);
+
+
+static void seekbar_set_tot (GtkWidget *spin, GtkWidget *seek)
+{
+       hildon_seekbar_set_total_time (seek,
+                       (gint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(spin)));
+}
+
+static void seekbar_set_pos (GtkWidget *spin, GtkWidget *seek)
+{
+       hildon_seekbar_set_position (seek,
+                       (gint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(spin)));
+}
+
+static gint update_spin_button (GtkWidget *seek, GtkWidget *spin)
+{
+       gtk_spin_button_set_value (GTK_SPIN_BUTTON(spin),
+                       hildon_seekbar_get_position(seek));
+       return TRUE;
+}
+</programlisting>
+</informalexample>
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT HildonSeekbar ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### ARG HildonSeekbar:position ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG HildonSeekbar:total-time ##### -->
+<para>
+
+</para>
+
+<!-- ##### FUNCTION hildon_seekbar_new ##### -->
+<para>
+
+</para>
+
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_seekbar_get_total_time ##### -->
+<para>
+
+</para>
+
+@seekbar: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_seekbar_set_total_time ##### -->
+<para>
+
+</para>
+
+@seekbar: 
+@time: 
+
+
+<!-- ##### FUNCTION hildon_seekbar_get_position ##### -->
+<para>
+
+</para>
+
+@seekbar: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_seekbar_set_position ##### -->
+<para>
+
+</para>
+
+@seekbar: 
+@time: 
+
+
+<!-- ##### FUNCTION hildon_seekbar_set_fraction ##### -->
+<para>
+
+</para>
+
+@seekbar: 
+@fraction: 
+<!-- # Unused Parameters # -->
+@fract: 
+
+
+<!-- ##### FUNCTION hildon_seekbar_get_fraction ##### -->
+<para>
+
+</para>
+
+@seekbar: 
+@Returns: 
+
+
diff --git a/doc/tmpl/hildon-set-password-dialog.sgml b/doc/tmpl/hildon-set-password-dialog.sgml
new file mode 100644 (file)
index 0000000..943b452
--- /dev/null
@@ -0,0 +1,80 @@
+<!-- ##### SECTION Title ##### -->
+HildonSetPasswordDialog
+
+<!-- ##### SECTION Short_Description ##### -->
+HildonSetPasswordDialog is used to receive a new password from user. (User sets the password)
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+HildonSetPasswordDialog is used to receive a new password from user. (User sets the password)
+
+<informalexample>
+Example:
+<programlisting>
+       HildonGetPasswordDialog *get_dialog =  HILDON_GET_PASSWORD_DIALOG(
+                       hildon_get_password_dialog_new (parent, FALSE));
+
+       gtk_widget_show (GTK_WIDGET (get_dialog));
+
+       i = gtk_dialog_run (GTK_DIALOG (get_dialog));
+
+       pass = hildon_get_password_dialog_get_password (get_dialog);
+
+       if (i == GTK_RESPONSE_OK &amp;&amp; (strcmp (pass, dialog.current_password) != 0))
+       {
+               gtk_infoprint (GTK_WINDOW (parent), STR_PASSWORD_INCORRECT);
+               gtk_widget_set_sensitive (GTK_WIDGET (dialog.button2), FALSE);
+               gtk_widget_set_sensitive (GTK_WIDGET (dialog.button3), FALSE);
+               gtk_widget_set_sensitive (GTK_WIDGET (dialog.button4), FALSE);
+       }
+
+       else if (i == GTK_RESPONSE_OK)
+       {
+               gtk_widget_set_sensitive( GTK_WIDGET( dialog.button2 ), TRUE);
+       }
+
+       else
+       {
+               gtk_widget_set_sensitive (GTK_WIDGET (dialog.button2), FALSE);
+               gtk_widget_set_sensitive (GTK_WIDGET (dialog.button3), FALSE);
+               gtk_widget_set_sensitive (GTK_WIDGET (dialog.button4), FALSE);
+       }
+</programlisting>
+</informalexample>
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT HildonSetPasswordDialog ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION hildon_set_password_dialog_new ##### -->
+<para>
+
+</para>
+
+@parent: 
+@modify_protection: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_set_password_dialog_get_protected ##### -->
+<para>
+
+</para>
+
+@dialog: 
+@Returns: 
+
+
+<!-- ##### ARG HildonSetPasswordDialog:modify-protection ##### -->
+<para>
+
+</para>
+
diff --git a/doc/tmpl/hildon-sort-dialog.sgml b/doc/tmpl/hildon-sort-dialog.sgml
new file mode 100644 (file)
index 0000000..4d54de1
--- /dev/null
@@ -0,0 +1,136 @@
+<!-- ##### SECTION Title ##### -->
+HildonSortDialog
+
+<!-- ##### SECTION Short_Description ##### -->
+A widget for defining sorting order of items.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+Sort Dialog is used to define the order in which items are shown in a list.
+</para>
+
+<para>
+<informalexample>
+Example:
+<programlisting>
+       HildonSortDialog *sort_dialog = HILDON_SORT_DIALOG(
+                       hildon_sort_dialog_new( parent ));
+
+       gint response_id, add_sort_index;
+
+       sort_by[0] = STR_SORT_BY_DATE;
+       sort_by[1] = STR_SORT_BY_NAME;
+       sort_by[2] = STR_SORT_BY_SIZE;
+       sort_by[3] = NULL;
+
+       sorting_order[0] = STR_SORTING_ORDER_ASCENDING;
+       sorting_order[1] = STR_SORTING_ORDER_DESCENDING;
+       sorting_order[2] = NULL;
+
+       add_sort_index = hildon_sort_dialog_add_sort_key (sort_dialog,
+                       STR_SORT_BY_DATE);
+
+       hildon_sort_dialog_add_sort_key (sort_dialog, STR_SORT_BY_NAME);
+
+       hildon_sort_dialog_add_sort_key (sort_dialog, STR_SORT_BY_SIZE);
+
+       if (dialog.first_time_clicked == TRUE)
+       {
+               hildon_sort_dialog_set_sort_key (sort_dialog, add_sort_index);
+       }
+
+       if (dialog.first_time_clicked == FALSE)
+       {
+               hildon_sort_dialog_set_sort_key (sort_dialog, dialog.sort_key);
+               hildon_sort_dialog_set_sort_order (sort_dialog, dialog.sort_order);
+       }
+
+       gtk_widget_show (GTK_WIDGET (sort_dialog));
+
+       response_id = gtk_dialog_run (GTK_DIALOG (sort_dialog));
+
+       if (response_id == GTK_RESPONSE_OK)
+       {
+               dialog.sort_key = hildon_sort_dialog_get_sort_key (sort_dialog);
+
+               gtk_label_set_text (GTK_LABEL ( dialog.label1),
+                               sort_by [dialog.sort_key]);
+
+
+               dialog.sort_order = hildon_sort_dialog_get_sort_order (sort_dialog);
+
+               gtk_label_set_text (GTK_LABEL (dialog.label2),
+                               sorting_order [dialog.sort_order]);
+
+               dialog.first_time_clicked = FALSE;
+       }
+</programlisting>
+</informalexample>
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT HildonSortDialog ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION hildon_sort_dialog_new ##### -->
+<para>
+
+</para>
+
+@parent: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_sort_dialog_get_sort_key ##### -->
+<para>
+
+</para>
+
+@dialog: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_sort_dialog_get_sort_order ##### -->
+<para>
+
+</para>
+
+@dialog: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_sort_dialog_set_sort_key ##### -->
+<para>
+
+</para>
+
+@dialog: 
+@key: 
+
+
+<!-- ##### FUNCTION hildon_sort_dialog_set_sort_order ##### -->
+<para>
+
+</para>
+
+@dialog: 
+@order: 
+
+
+<!-- ##### FUNCTION hildon_sort_dialog_add_sort_key ##### -->
+<para>
+
+</para>
+
+@dialog: 
+@sort_key: 
+@Returns: 
+
+
diff --git a/doc/tmpl/hildon-telephone-editor.sgml b/doc/tmpl/hildon-telephone-editor.sgml
new file mode 100644 (file)
index 0000000..4819027
--- /dev/null
@@ -0,0 +1,200 @@
+<!-- ##### SECTION Title ##### -->
+HildonTelephoneEditor
+
+<!-- ##### SECTION Short_Description ##### -->
+A widget which allows a user to enter a telephone number
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+A Single Line Editor widget which allows user to enter a telephone number. There are two modes to choose from (corce/free format). Coerce format has three fields which are placed horizontally. Fields are country code, area code and number. When nothing is inputted to the fields assisting text is displayed in a field. Tapping on the field highlights the field and allows user to input numbers.
+</para>
+
+<para>
+The widget is used where a user should enter a phone number. Free format should be used wherever possible as it enables the user to enter the phone number in the format she likes in addition to entering DTMF strings as a part of the phone number. The format can not be changed at runtime.
+</para>
+
+<para>
+<informalexample>
+<programlisting>
+       editor[0] =
+               hildon_telephone_editor_new( HILDON_TELEPHONE_EDITOR_FORMAT_COERCE );
+</programlisting>
+</informalexample>
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### MACRO HILDON_TELEPHONE_EDITOR_TYPE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### ENUM HildonTelephoneEditorFormat ##### -->
+<para>
+
+</para>
+
+@HILDON_TELEPHONE_EDITOR_FORMAT_FREE: 
+@HILDON_TELEPHONE_EDITOR_FORMAT_COERCE: 
+@HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY: 
+@HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA: 
+
+<!-- ##### STRUCT HildonTelephoneEditor ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION hildon_telephone_editor_new ##### -->
+<para>
+
+</para>
+
+@format: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_telephone_editor_set_editable ##### -->
+<para>
+
+</para>
+
+@hte: 
+@country: 
+@area: 
+@number: 
+
+
+<!-- ##### FUNCTION hildon_telephone_editor_set_show_plus ##### -->
+<para>
+
+</para>
+
+@hte: 
+@show: 
+
+
+<!-- ##### FUNCTION hildon_telephone_editor_get_show_plus ##### -->
+<para>
+
+</para>
+
+@hte: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_telephone_editor_set_show_border ##### -->
+<para>
+
+</para>
+
+@hte: 
+@show: 
+
+
+<!-- ##### FUNCTION hildon_telephone_editor_get_show_border ##### -->
+<para>
+
+</para>
+
+@hte: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_telephone_editor_set_widths ##### -->
+<para>
+
+</para>
+
+@hte: 
+@country: 
+@area: 
+@number: 
+
+
+<!-- ##### FUNCTION hildon_telephone_editor_get_country ##### -->
+<para>
+
+</para>
+
+@hte: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_telephone_editor_set_country ##### -->
+<para>
+
+</para>
+
+@hte: 
+@country: 
+
+
+<!-- ##### FUNCTION hildon_telephone_editor_get_area ##### -->
+<para>
+
+</para>
+
+@hte: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_telephone_editor_set_area ##### -->
+<para>
+
+</para>
+
+@hte: 
+@area: 
+
+
+<!-- ##### FUNCTION hildon_telephone_editor_get_number ##### -->
+<para>
+
+</para>
+
+@hte: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_telephone_editor_set_number ##### -->
+<para>
+
+</para>
+
+@hte: 
+@number: 
+
+
+<!-- ##### SIGNAL HildonTelephoneEditor::activate ##### -->
+<para>
+
+</para>
+
+@hildontelephoneeditor: the object which received the signal.
+
+<!-- ##### ARG HildonTelephoneEditor:set-area ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG HildonTelephoneEditor:set-country ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG HildonTelephoneEditor:set-format ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG HildonTelephoneEditor:set-number ##### -->
+<para>
+
+</para>
+
diff --git a/doc/tmpl/hildon-time-editor.sgml b/doc/tmpl/hildon-time-editor.sgml
new file mode 100644 (file)
index 0000000..fc821ff
--- /dev/null
@@ -0,0 +1,140 @@
+<!-- ##### SECTION Title ##### -->
+HildonTimeEditor
+
+<!-- ##### SECTION Short_Description ##### -->
+#HildonTimeEditor is a simple widget with entries for hours and minutes and a 
+pm/am indicator as well as a button which pops up a #HildonTimePicker dialog
+window.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+#HildonTimeEditor is a simple widget with entries for hours and minutes and a 
+pm/am indicator as well as a button which pops up a #HildonTimePicker dialog
+window.
+
+<informalexample>
+<programlisting>
+...
+editor = hildon_time_editor_new();
+hildon_time_editor_set_time( editor, h, m, s );
+...
+gtk_box_pack_start ( ..., editor )
+...
+hildon_time_editor_get_time( editor, &amp;h, &amp;m, &amp;s );
+...
+</programlisting>
+</informalexample>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT HildonTimeEditor ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SIGNAL HildonTimeEditor::activate ##### -->
+<para>
+
+</para>
+
+@hildontimeeditor: the object which received the signal.
+
+<!-- ##### SIGNAL HildonTimeEditor::activate ##### -->
+<para>
+
+</para>
+
+@hildontimeeditor: the object which received the signal.
+
+<!-- ##### ENUM HildonTimeEditorField ##### -->
+<para>
+
+</para>
+
+@HILDON_TIME_EDITOR_HOUR_FIELD: 
+@HILDON_TIME_EDITOR_MINUTE_FIELD: 
+@HILDON_TIME_EDITOR_SECOND_FIELD: 
+
+<!-- ##### FUNCTION hildon_time_editor_new ##### -->
+<para>
+
+</para>
+
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_time_editor_set_time ##### -->
+<para>
+
+</para>
+
+@editor: 
+@hours: 
+@minutes: 
+@seconds: 
+
+
+<!-- ##### FUNCTION hildon_time_editor_get_time ##### -->
+<para>
+
+</para>
+
+@editor: 
+@hours: 
+@minutes: 
+@seconds: 
+
+
+<!-- ##### FUNCTION hildon_time_editor_show_seconds ##### -->
+<para>
+
+</para>
+
+@editor: 
+@enable: 
+
+
+<!-- ##### FUNCTION hildon_time_editor_enable_duration_mode ##### -->
+<para>
+
+</para>
+
+@editor: 
+@enable: 
+
+
+<!-- ##### FUNCTION hildon_time_editor_set_duration_range ##### -->
+<para>
+
+</para>
+
+@editor: 
+@min_seconds: 
+@max_seconds: 
+
+
+<!-- ##### FUNCTION hildon_time_editor_get_duration_range ##### -->
+<para>
+
+</para>
+
+@editor: 
+@min_seconds: 
+@max_seconds: 
+
+
+<!-- ##### FUNCTION hildon_time_editor_highlight_field ##### -->
+<para>
+
+</para>
+
+@editor: 
+@field: 
+
+
diff --git a/doc/tmpl/hildon-time-picker.sgml b/doc/tmpl/hildon-time-picker.sgml
new file mode 100644 (file)
index 0000000..c216c22
--- /dev/null
@@ -0,0 +1,82 @@
+<!-- ##### SECTION Title ##### -->
+HildonTimePicker
+
+<!-- ##### SECTION Short_Description ##### -->
+#HildonTimePicker is a dialog popup widget which lets the user set a time.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+#HildonTimePicker is a dialog popup widget which lets the user set a time.
+using up/down arrows on hours and minutes. There are two arrows for minutes,
+so that minutes can be added also in 10min steps.
+
+The following code shows how the widget is used.
+
+<informalexample>
+<programlisting>
+...
+parent = gtk_widget_get_ancestor (GTK_WIDGET (editor), GTK_TYPE_WINDOW);
+picker = hildon_time_picker_new (GTK_WINDOW (parent));
+
+hildon_time_editor_get_time (editor, &amp;h, &amp;m, &amp;s);
+hildon_time_picker_set_time( HILDON_TIME_PICKER( picker ), h, m );
+
+result = gtk_dialog_run( GTK_DIALOG ( picker ) );
+switch (result)
+{
+case GTK_RESPONSE_OK:
+case GTK_RESPONSE_ACCEPT:
+    hildon_time_picker_get_time(HILDON_TIME_PICKER( picker ), &amp;h, &amp;m );
+    foo_set_time(h,m);
+break;
+default:
+break;
+}
+
+gtk_widget_destroy( picker );
+...
+</programlisting>
+</informalexample>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+#HildonTimeEditor
+</para>
+
+<!-- ##### STRUCT HildonTimePicker ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION hildon_time_picker_new ##### -->
+<para>
+
+</para>
+
+@parent: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_time_picker_set_time ##### -->
+<para>
+
+</para>
+
+@picker: 
+@hours: 
+@minutes: 
+
+
+<!-- ##### FUNCTION hildon_time_picker_get_time ##### -->
+<para>
+
+</para>
+
+@picker: 
+@hours: 
+@minutes: 
+
+
diff --git a/doc/tmpl/hildon-volumebar.sgml b/doc/tmpl/hildon-volumebar.sgml
new file mode 100644 (file)
index 0000000..3af97a0
--- /dev/null
@@ -0,0 +1,105 @@
+<!-- ##### SECTION Title ##### -->
+HildonVolumebar
+
+<!-- ##### SECTION Short_Description ##### -->
+Base class for widgets that display a volume bar.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+#HildonVolumebar is a base class for widgets that display a volume bar that
+allows increasing or decreasing volume within a pre-defined range, and muting
+the volume by clicking on a specific mute icon.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+#HildonHVolumebar,#HildonVVolumebar
+</para>
+
+<!-- ##### STRUCT HildonVolumebar ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT HildonVolumebarClass ##### -->
+<para>
+
+</para>
+
+@parent_class: 
+@mute_toggled: 
+@level_changed: 
+
+<!-- ##### FUNCTION hildon_volumebar_set_level ##### -->
+<para>
+
+</para>
+
+@self: 
+@level: 
+
+
+<!-- ##### FUNCTION hildon_volumebar_get_level ##### -->
+<para>
+
+</para>
+
+@self: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_volumebar_set_mute ##### -->
+<para>
+
+</para>
+
+@self: 
+@mute: 
+
+
+<!-- ##### FUNCTION hildon_volumebar_get_mute ##### -->
+<para>
+
+</para>
+
+@self: 
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_volumebar_level_change ##### -->
+<para>
+
+</para>
+
+@self: 
+
+
+<!-- ##### FUNCTION hildon_volumebar_get_adjustment ##### -->
+<para>
+
+</para>
+
+@self: 
+@Returns: 
+
+
+<!-- ##### SIGNAL HildonVolumebar::level-changed ##### -->
+<para>
+
+</para>
+
+@hildonvolumebar: the object which received the signal.
+
+<!-- ##### SIGNAL HildonVolumebar::mute-toggled ##### -->
+<para>
+
+</para>
+
+@hildonvolumebar: the object which received the signal.
+
+<!-- ##### ARG HildonVolumebar:has-mute ##### -->
+<para>
+
+</para>
+
diff --git a/doc/tmpl/hildon-vvolumebar.sgml b/doc/tmpl/hildon-vvolumebar.sgml
new file mode 100644 (file)
index 0000000..5b9dd65
--- /dev/null
@@ -0,0 +1,45 @@
+<!-- ##### SECTION Title ##### -->
+HildonVVolumebar
+
+<!-- ##### SECTION Short_Description ##### -->
+A widget that displays a vertical volume bar.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+The #HildonVVolumebar widget displays a vertical volume bar that allows
+increasing or decreasing volume within a pre-defined range, and muting
+the volume by clicking on a specific mute icon.
+</para>
+
+<para>
+Here's a simple example that creates a vertical volume bar and connects
+both its signals:
+
+<informalexample>
+<programlisting>
+GtkWidget *volbar = hildon_vvolumebar_new ();
+g_signal_connect( G_OBJECT(volbar), "mute_toggled", G_CALLBACK(mute_toggle), NULL );
+g_signal_connect( G_OBJECT(volbar), "level_changed", G_CALLBACK(level_change), NULL );
+</programlisting>
+</informalexample>
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+#HildonHVolumebar
+</para>
+
+<!-- ##### STRUCT HildonVVolumebar ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION hildon_vvolumebar_new ##### -->
+<para>
+
+</para>
+
+@Returns: 
+
+
diff --git a/doc/tmpl/hildon-weekday-picker.sgml b/doc/tmpl/hildon-weekday-picker.sgml
new file mode 100644 (file)
index 0000000..229b02d
--- /dev/null
@@ -0,0 +1,124 @@
+<!-- ##### SECTION Title ##### -->
+HildonWeekdayPicker
+
+<!-- ##### SECTION Short_Description ##### -->
+A widget for selecting weekday(s)
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+Weekday picker supports non-mutually exclusive selection of days of the week. Selected days of the week are shown with a pushed-in effect.
+</para>
+
+<para>
+Weekday picker is used where users are required to pick days on which a certain event should take place, for example, which days a Calendar event should be repeated on. It is used in Calendar in the Repeat dialog, in Tasks in the Repeat dialog and in the Email set-up wizard.
+</para>
+
+<para>
+<informalexample>
+Example function calls:
+<programlisting>
+       gint i;
+       HildonWeekdayPicker *picker = hildon_weekday_picker_new();
+
+       hildon_weekday_picker_set_day( picker, i );
+       hildon_weekday_picker_unset_day( picker, i );
+       hildon_weekday_picker_toggle_day( picker, i );
+       hildon_weekday_picker_set_all( picker );
+  hildon_weekday_picker_unset_all( picker );
+</programlisting>
+</informalexample>
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### MACRO HILDON_WEEKDAY_PICKER_TYPE ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### STRUCT HildonWeekdayPicker ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### SIGNAL HildonWeekdayPicker::activate ##### -->
+<para>
+
+</para>
+
+@hildonweekdaypicker: the object which received the signal.
+
+<!-- ##### SIGNAL HildonWeekdayPicker::selection-changed ##### -->
+<para>
+
+</para>
+
+@hildonweekdaypicker: the object which received the signal.
+@arg1: 
+
+<!-- ##### FUNCTION hildon_weekday_picker_new ##### -->
+<para>
+</para>
+
+@Returns: 
+
+
+<!-- ##### FUNCTION hildon_weekday_picker_set_day ##### -->
+<para>
+
+</para>
+
+@picker: 
+@day: 
+
+
+<!-- ##### FUNCTION hildon_weekday_picker_unset_day ##### -->
+<para>
+
+</para>
+
+@picker: 
+@day: 
+
+
+<!-- ##### FUNCTION hildon_weekday_picker_toggle_day ##### -->
+<para>
+
+</para>
+
+@picker: 
+@day: 
+
+
+<!-- ##### FUNCTION hildon_weekday_picker_set_all ##### -->
+<para>
+
+</para>
+
+@picker: 
+
+
+<!-- ##### FUNCTION hildon_weekday_picker_unset_all ##### -->
+<para>
+
+</para>
+
+@picker: 
+
+
+<!-- ##### FUNCTION hildon_weekday_picker_isset_day ##### -->
+<para>
+
+</para>
+
+@picker: 
+@day: 
+@Returns: 
+
+
diff --git a/doc/tmpl/hildon-wizard-dialog.sgml b/doc/tmpl/hildon-wizard-dialog.sgml
new file mode 100644 (file)
index 0000000..81ab358
--- /dev/null
@@ -0,0 +1,61 @@
+<!-- ##### SECTION Title ##### -->
+HildonWizardDialog
+
+<!-- ##### SECTION Short_Description ##### -->
+#HildonWizardDialog is a widget to create eg. a guided installation
+process.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+#HildonWizardDialog is a widget to create eg. a guided installation
+process. The dialog has four buttons to be used. It's parameters are
+the dialogs parent, the wizard dialog name, which is a part of title.
+Last parameter is a #GtkNotebook, which contains the content of wizard.
+This content is created by the application developer.
+
+<informalexample>
+<programlisting>
+
+hildon_wizard_dialog_new (parent, wizard_name, notebook);
+
+</informalexample>
+</programexample>
+
+Using of the API is very simple, it has only one function to create it
+and the rest of it is handled by developers notebook.
+Also the response is returned, either cancel or finnish.
+Next and previous buttons are handled by the wizard dialog it self, by
+switching the page either forward or backward in the notebook.
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT HildonWizardDialogPrivate ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT HildonWizardDialog ##### -->
+<para>
+
+</para>
+
+@parent: 
+@priv: 
+
+<!-- ##### FUNCTION hildon_wizard_dialog_new ##### -->
+<para>
+
+</para>
+
+@parent: 
+@wizard_name: 
+@notebook: 
+@Returns: 
+
+
diff --git a/hildon-libs.pc.in b/hildon-libs.pc.in
new file mode 100644 (file)
index 0000000..17dcd03
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: hildon-libs
+Description: Teema Hildon framework and widget libraries
+Requires: hildon-lgpl hildon-fm
+Version: @VERSION@
+Libs: -L${libdir} -lhildonwidgets
+Cflags: -I${includedir}
diff --git a/hildon-widgets/Makefile.am b/hildon-widgets/Makefile.am
new file mode 100644 (file)
index 0000000..8e642b7
--- /dev/null
@@ -0,0 +1,122 @@
+INCLUDES = $(GTK_CFLAGS) $(GNOME_VFS_CFLAGS) $(GCONF_CFLAGS) $(DBUS_CFLAGS) \
+       -DLOCALEDIR=\"$(localedir)\" -I$(srcdir)/..
+
+lib_LTLIBRARIES = libhildonwidgets.la
+
+EXTRA_DIST = 
+
+libhildonwidgets_la_LIBADD = $(GTK_LIBS) $(GNOME_VFS_LIBS) $(GCONF_LIBS) \
+       $(DBUS_LIBS)
+libhildonwidgets_la_LDFLAGS = -version-info 3:0:3
+libhildonwidgets_la_SOURCES = \
+  hildon-composite-widget.c \
+       hildon-composite-widget.h \
+  hildon-controlbar.c \
+       hildon-controlbar.h \
+       hildon-seekbar.c \
+       hildon-seekbar.h \
+       hildon-color-selector.c \
+       hildon-color-selector.h \
+       hildon-note.c \
+       hildon-note.h \
+       hildon-search.c \
+       hildon-search.h \
+       hildon-volumebar.c \
+       hildon-volumebar.h \
+       hildon-volumebar-range.c \
+       hildon-volumebar-range.h \
+       hildon-volumebar-private.h \
+       hildon-hvolumebar.c \
+       hildon-hvolumebar.h \
+       hildon-vvolumebar.c \
+       hildon-vvolumebar.h \
+       hildon-dialoghelp.c \
+       hildon-dialoghelp.h \
+       hildon-calendar-popup.c \
+       hildon-calendar-popup.h \
+       hildon-date-editor.c \
+       hildon-date-editor.h \
+       hildon-time-editor.c \
+       hildon-time-editor.h \
+       hildon-time-picker.c \
+       hildon-time-picker.h \
+       hildon-weekday-picker.c \
+       hildon-weekday-picker.h \
+       hildon-telephone-editor.c \
+       hildon-telephone-editor.h \
+       hildon-number-editor.c \
+       hildon-number-editor.h \
+       hildon-range-editor.c \
+       hildon-range-editor.h \
+       hildon-get-password-dialog.c \
+       hildon-get-password-dialog.h \
+       hildon-set-password-dialog.c \
+       hildon-set-password-dialog.h \
+       hildon-sort-dialog.c \
+       hildon-sort-dialog.h \
+       hildon-add-home-dialog.c \
+       hildon-add-home-dialog.h \
+       hildon-find-object-dialog.c \
+       hildon-find-object-dialog.h \
+       hildon-font-selection-dialog.c \
+       hildon-font-selection-dialog.h \
+       hildon-insert-object-dialog.c \
+       hildon-insert-object-dialog.h \
+    hildon-file-details-dialog.c \
+       hildon-file-details-dialog.h \
+    hildon-grid.c \
+    hildon-grid.h \
+       hildon-grid-item.c \
+       hildon-grid-item.h \
+       hildon-grid-item-private.h \
+       hildon-file-handling-note.c \
+       hildon-file-handling-note.h \
+       hildon-name-password-dialog.c \
+    hildon-name-password-dialog.h \
+    hildon-find-replace-dialog.c \
+       hildon-find-replace-dialog.h \
+       hildon-scroll-area.c \
+       hildon-scroll-area.h \
+       hildon-wizard-dialog.c \
+       hildon-wizard-dialog.h \
+       hildon-color-popup.c \
+       hildon-color-popup.h \
+       hildon-color-button.c \
+       hildon-color-button.h
+
+hildonwidgetsincludeinstdir=$(includedir)/hildon-widgets
+hildonwidgetsincludeinst_DATA = \
+       hildon-controlbar.h \
+       hildon-note.h \
+       hildon-seekbar.h \
+       hildon-color-selector.h \
+       hildon-search.h \
+       hildon-volumebar.h \
+       hildon-hvolumebar.h \
+       hildon-vvolumebar.h \
+       hildon-dialoghelp.h \
+       hildon-calendar-popup.h \
+       hildon-date-editor.h \
+       hildon-time-editor.h \
+       hildon-time-picker.h \
+       hildon-weekday-picker.h \
+       hildon-telephone-editor.h \
+       hildon-number-editor.h \
+       hildon-range-editor.h \
+       hildon-get-password-dialog.h \
+       hildon-set-password-dialog.h \
+       hildon-sort-dialog.h \
+       hildon-add-home-dialog.h \
+       hildon-find-object-dialog.h \
+       hildon-font-selection-dialog.h \
+       hildon-insert-object-dialog.h \
+       hildon-file-details-dialog.h \
+       hildon-grid.h \
+       hildon-grid-item.h \
+       hildon-file-handling-note.h \
+    hildon-name-password-dialog.h \
+       hildon-find-replace-dialog.h \
+       hildon-scroll-area.h \
+       hildon-wizard-dialog.h \
+       hildon-color-popup.h \
+       hildon-color-button.h
diff --git a/hildon-widgets/Makefile.in b/hildon-widgets/Makefile.in
new file mode 100644 (file)
index 0000000..c12f218
--- /dev/null
@@ -0,0 +1,702 @@
+# Makefile.in generated by automake 1.7.9 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+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 = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DOXYGEN_FOUND = @DOXYGEN_FOUND@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_GTK_DOC_FALSE = @ENABLE_GTK_DOC_FALSE@
+ENABLE_GTK_DOC_TRUE = @ENABLE_GTK_DOC_TRUE@
+ESD_CFLAGS = @ESD_CFLAGS@
+ESD_LIBS = @ESD_LIBS@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GCONF_CFLAGS = @GCONF_CFLAGS@
+GCONF_LIBS = @GCONF_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GNOME_VFS_CFLAGS = @GNOME_VFS_CFLAGS@
+GNOME_VFS_LIBS = @GNOME_VFS_LIBS@
+GTKDOC = @GTKDOC@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_VERSION = @GTK_VERSION@
+HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@
+HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@
+HTML_DIR = @HTML_DIR@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJEXT = @OBJEXT@
+OUTO_CFLAGS = @OUTO_CFLAGS@
+OUTO_LIBS = @OUTO_LIBS@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+docdir = @docdir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+outomoduledir = @outomoduledir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+INCLUDES = $(GTK_CFLAGS) $(GNOME_VFS_CFLAGS) $(GCONF_CFLAGS) $(DBUS_CFLAGS) \
+       -DLOCALEDIR=\"$(localedir)\" -I$(srcdir)/..
+
+
+lib_LTLIBRARIES = libhildonwidgets.la
+
+EXTRA_DIST = 
+
+libhildonwidgets_la_LIBADD = $(GTK_LIBS) $(GNOME_VFS_LIBS) $(GCONF_LIBS) \
+       $(DBUS_LIBS)
+
+libhildonwidgets_la_LDFLAGS = -version-info 3:0:3
+libhildonwidgets_la_SOURCES = \
+  hildon-composite-widget.c \
+       hildon-composite-widget.h \
+  hildon-controlbar.c \
+       hildon-controlbar.h \
+       hildon-seekbar.c \
+       hildon-seekbar.h \
+       hildon-color-selector.c \
+       hildon-color-selector.h \
+       hildon-note.c \
+       hildon-note.h \
+       hildon-search.c \
+       hildon-search.h \
+       hildon-volumebar.c \
+       hildon-volumebar.h \
+       hildon-volumebar-range.c \
+       hildon-volumebar-range.h \
+       hildon-volumebar-private.h \
+       hildon-hvolumebar.c \
+       hildon-hvolumebar.h \
+       hildon-vvolumebar.c \
+       hildon-vvolumebar.h \
+       hildon-dialoghelp.c \
+       hildon-dialoghelp.h \
+       hildon-calendar-popup.c \
+       hildon-calendar-popup.h \
+       hildon-date-editor.c \
+       hildon-date-editor.h \
+       hildon-time-editor.c \
+       hildon-time-editor.h \
+       hildon-time-picker.c \
+       hildon-time-picker.h \
+       hildon-weekday-picker.c \
+       hildon-weekday-picker.h \
+       hildon-telephone-editor.c \
+       hildon-telephone-editor.h \
+       hildon-number-editor.c \
+       hildon-number-editor.h \
+       hildon-range-editor.c \
+       hildon-range-editor.h \
+       hildon-get-password-dialog.c \
+       hildon-get-password-dialog.h \
+       hildon-set-password-dialog.c \
+       hildon-set-password-dialog.h \
+       hildon-sort-dialog.c \
+       hildon-sort-dialog.h \
+       hildon-add-home-dialog.c \
+       hildon-add-home-dialog.h \
+       hildon-find-object-dialog.c \
+       hildon-find-object-dialog.h \
+       hildon-font-selection-dialog.c \
+       hildon-font-selection-dialog.h \
+       hildon-insert-object-dialog.c \
+       hildon-insert-object-dialog.h \
+    hildon-file-details-dialog.c \
+       hildon-file-details-dialog.h \
+    hildon-grid.c \
+    hildon-grid.h \
+       hildon-grid-item.c \
+       hildon-grid-item.h \
+       hildon-grid-item-private.h \
+       hildon-file-handling-note.c \
+       hildon-file-handling-note.h \
+       hildon-name-password-dialog.c \
+    hildon-name-password-dialog.h \
+    hildon-find-replace-dialog.c \
+       hildon-find-replace-dialog.h \
+       hildon-scroll-area.c \
+       hildon-scroll-area.h \
+       hildon-wizard-dialog.c \
+       hildon-wizard-dialog.h \
+       hildon-color-popup.c \
+       hildon-color-popup.h \
+       hildon-color-button.c \
+       hildon-color-button.h
+
+
+hildonwidgetsincludeinstdir = $(includedir)/hildon-widgets
+hildonwidgetsincludeinst_DATA = \
+       hildon-controlbar.h \
+       hildon-note.h \
+       hildon-seekbar.h \
+       hildon-color-selector.h \
+       hildon-search.h \
+       hildon-volumebar.h \
+       hildon-hvolumebar.h \
+       hildon-vvolumebar.h \
+       hildon-dialoghelp.h \
+       hildon-calendar-popup.h \
+       hildon-date-editor.h \
+       hildon-time-editor.h \
+       hildon-time-picker.h \
+       hildon-weekday-picker.h \
+       hildon-telephone-editor.h \
+       hildon-number-editor.h \
+       hildon-range-editor.h \
+       hildon-get-password-dialog.h \
+       hildon-set-password-dialog.h \
+       hildon-sort-dialog.h \
+       hildon-add-home-dialog.h \
+       hildon-find-object-dialog.h \
+       hildon-font-selection-dialog.h \
+       hildon-insert-object-dialog.h \
+       hildon-file-details-dialog.h \
+       hildon-grid.h \
+       hildon-grid-item.h \
+       hildon-file-handling-note.h \
+    hildon-name-password-dialog.h \
+       hildon-find-replace-dialog.h \
+       hildon-scroll-area.h \
+       hildon-wizard-dialog.h \
+       hildon-color-popup.h \
+       hildon-color-button.h
+
+subdir = hildon-widgets
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(lib_LTLIBRARIES)
+
+libhildonwidgets_la_DEPENDENCIES =
+am_libhildonwidgets_la_OBJECTS = hildon-composite-widget.lo \
+       hildon-controlbar.lo hildon-seekbar.lo hildon-color-selector.lo \
+       hildon-note.lo hildon-search.lo hildon-volumebar.lo \
+       hildon-volumebar-range.lo hildon-hvolumebar.lo \
+       hildon-vvolumebar.lo hildon-dialoghelp.lo \
+       hildon-calendar-popup.lo hildon-date-editor.lo \
+       hildon-time-editor.lo hildon-time-picker.lo \
+       hildon-weekday-picker.lo hildon-telephone-editor.lo \
+       hildon-number-editor.lo hildon-range-editor.lo \
+       hildon-get-password-dialog.lo hildon-set-password-dialog.lo \
+       hildon-sort-dialog.lo hildon-add-home-dialog.lo \
+       hildon-find-object-dialog.lo hildon-font-selection-dialog.lo \
+       hildon-insert-object-dialog.lo hildon-file-details-dialog.lo \
+       hildon-grid.lo hildon-grid-item.lo hildon-file-handling-note.lo \
+       hildon-name-password-dialog.lo hildon-find-replace-dialog.lo \
+       hildon-scroll-area.lo hildon-wizard-dialog.lo \
+       hildon-color-popup.lo hildon-color-button.lo
+libhildonwidgets_la_OBJECTS = $(am_libhildonwidgets_la_OBJECTS)
+
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/hildon-add-home-dialog.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-calendar-popup.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-color-button.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-color-popup.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-color-selector.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-composite-widget.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-controlbar.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-date-editor.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-dialoghelp.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-file-details-dialog.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-file-handling-note.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-find-object-dialog.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-find-replace-dialog.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-font-selection-dialog.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-get-password-dialog.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-grid-item.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-grid.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-hvolumebar.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-insert-object-dialog.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-name-password-dialog.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-note.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-number-editor.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-range-editor.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-scroll-area.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-search.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-seekbar.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-set-password-dialog.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-sort-dialog.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-telephone-editor.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-time-editor.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-time-picker.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-volumebar-range.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-volumebar.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-vvolumebar.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-weekday-picker.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-wizard-dialog.Plo
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
+       $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(libhildonwidgets_la_SOURCES)
+DATA = $(hildonwidgetsincludeinst_DATA)
+
+DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
+SOURCES = $(libhildonwidgets_la_SOURCES)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --foreign  hildon-widgets/Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+libLTLIBRARIES_INSTALL = $(INSTALL)
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+       @$(NORMAL_INSTALL)
+       $(mkinstalldirs) $(DESTDIR)$(libdir)
+       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+         if test -f $$p; then \
+           f="`echo $$p | sed -e 's|^.*/||'`"; \
+           echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f"; \
+           $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f; \
+         else :; fi; \
+       done
+
+uninstall-libLTLIBRARIES:
+       @$(NORMAL_UNINSTALL)
+       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+           p="`echo $$p | sed -e 's|^.*/||'`"; \
+         echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p"; \
+         $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \
+       done
+
+clean-libLTLIBRARIES:
+       -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+         test "$$dir" = "$$p" && dir=.; \
+         echo "rm -f \"$${dir}/so_locations\""; \
+         rm -f "$${dir}/so_locations"; \
+       done
+libhildonwidgets.la: $(libhildonwidgets_la_OBJECTS) $(libhildonwidgets_la_DEPENDENCIES) 
+       $(LINK) -rpath $(libdir) $(libhildonwidgets_la_LDFLAGS) $(libhildonwidgets_la_OBJECTS) $(libhildonwidgets_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-add-home-dialog.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-calendar-popup.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-color-button.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-color-popup.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-color-selector.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-composite-widget.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-controlbar.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-date-editor.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-dialoghelp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-file-details-dialog.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-file-handling-note.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-find-object-dialog.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-find-replace-dialog.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-font-selection-dialog.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-get-password-dialog.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-grid-item.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-grid.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-hvolumebar.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-insert-object-dialog.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-name-password-dialog.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-note.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-number-editor.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-range-editor.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-scroll-area.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-search.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-seekbar.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-set-password-dialog.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-sort-dialog.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-telephone-editor.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-time-editor.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-time-picker.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-volumebar-range.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-volumebar.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-vvolumebar.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-weekday-picker.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-wizard-dialog.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@     -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@   else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@   fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
+
+.c.obj:
+@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@     -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@   else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@   fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+
+.c.lo:
+@am__fastdepCC_TRUE@   if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@     -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \
+@am__fastdepCC_TRUE@   else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@   fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+
+distclean-libtool:
+       -rm -f libtool
+uninstall-info-am:
+hildonwidgetsincludeinstDATA_INSTALL = $(INSTALL_DATA)
+install-hildonwidgetsincludeinstDATA: $(hildonwidgetsincludeinst_DATA)
+       @$(NORMAL_INSTALL)
+       $(mkinstalldirs) $(DESTDIR)$(hildonwidgetsincludeinstdir)
+       @list='$(hildonwidgetsincludeinst_DATA)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         f="`echo $$p | sed -e 's|^.*/||'`"; \
+         echo " $(hildonwidgetsincludeinstDATA_INSTALL) $$d$$p $(DESTDIR)$(hildonwidgetsincludeinstdir)/$$f"; \
+         $(hildonwidgetsincludeinstDATA_INSTALL) $$d$$p $(DESTDIR)$(hildonwidgetsincludeinstdir)/$$f; \
+       done
+
+uninstall-hildonwidgetsincludeinstDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(hildonwidgetsincludeinst_DATA)'; for p in $$list; do \
+         f="`echo $$p | sed -e 's|^.*/||'`"; \
+         echo " rm -f $(DESTDIR)$(hildonwidgetsincludeinstdir)/$$f"; \
+         rm -f $(DESTDIR)$(hildonwidgetsincludeinstdir)/$$f; \
+       done
+
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       mkid -fID $$unique
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(ETAGS_ARGS)$$tags$$unique" \
+         || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+            $$tags $$unique
+
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkinstalldirs) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(DATA)
+
+installdirs:
+       $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(hildonwidgetsincludeinstdir)
+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:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+       mostlyclean-am
+
+distclean: distclean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-hildonwidgetsincludeinstDATA
+
+install-exec-am: install-libLTLIBRARIES
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -rf ./$(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-hildonwidgetsincludeinstDATA uninstall-info-am \
+       uninstall-libLTLIBRARIES
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+       clean-libLTLIBRARIES clean-libtool ctags distclean \
+       distclean-compile distclean-generic distclean-libtool \
+       distclean-tags distdir dvi dvi-am info info-am install \
+       install-am install-data install-data-am install-exec \
+       install-exec-am install-hildonwidgetsincludeinstDATA \
+       install-info install-info-am install-libLTLIBRARIES install-man \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-compile mostlyclean-generic mostlyclean-libtool pdf \
+       pdf-am ps ps-am tags uninstall uninstall-am \
+       uninstall-hildonwidgetsincludeinstDATA uninstall-info-am \
+       uninstall-libLTLIBRARIES
+
+# 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/hildon-widgets/hildon-add-home-dialog.c b/hildon-widgets/hildon-add-home-dialog.c
new file mode 100644 (file)
index 0000000..2437d45
--- /dev/null
@@ -0,0 +1,246 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <glib.h>
+#include <gtk/gtk.h>
+#include <gdk/gdkkeysyms.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <stdio.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <libintl.h>
+
+#include "hildon-add-home-dialog.h"
+#include <hildon-widgets/hildon-caption.h>
+
+#define _(String) dgettext(PACKAGE, String)
+#define MAX_ERR_MSG 256
+#define HILDON_ADD_HOME_DIALOG_WIDTH 370
+#define HILDON_ADD_HOME_DIALOG_HEIGHT 100
+#define HILDON_MAX_TITLE_LENGTH 256
+#define HILDON_HOME_MAX_SHORTCUT_LEN 255
+
+#define HILDON_ADD_HOME_DIALOG_GET_PRIVATE(obj) \
+  (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
+                               HILDON_TYPE_ADD_HOME_DIALOG, \
+                               HildonAddHomeDialogPrivate));
+
+typedef struct _HildonAddHomeDialogPrivate HildonAddHomeDialogPrivate;
+
+static GtkDialogClass *parent_class;
+
+static void
+hildon_add_home_dialog_class_init(HildonAddHomeDialogClass * class);
+static void hildon_add_home_dialog_init(HildonAddHomeDialog * dialog);
+
+/* private struct */
+
+struct _HildonAddHomeDialogPrivate {
+    GtkWidget *desc_label;
+    GtkWidget *name_entry;
+    GtkWidget *new_name_entry;
+    GtkWidget *okButton;
+    GtkWidget *cancelButton;
+    gboolean isrename;
+};
+
+/* Private functions */
+
+static void
+hildon_add_home_dialog_class_init(HildonAddHomeDialogClass * class)
+{
+    parent_class = g_type_class_peek_parent(class);
+    g_type_class_add_private(class, sizeof(HildonAddHomeDialogPrivate));
+}
+
+static void hildon_add_home_dialog_init(HildonAddHomeDialog * dialog)
+{
+    HildonAddHomeDialogPrivate *priv;
+
+    gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
+
+    priv = HILDON_ADD_HOME_DIALOG_GET_PRIVATE(dialog);
+    priv->name_entry = NULL;
+    priv->new_name_entry = NULL;
+    priv->isrename = FALSE;
+
+    priv->okButton = gtk_dialog_add_button(GTK_DIALOG(dialog),
+                                           _("addtoHome_button_ok"),
+                                           GTK_RESPONSE_OK);
+    priv->cancelButton = gtk_dialog_add_button(GTK_DIALOG(dialog),
+                                               _("addtoHome_button_cancel"),
+                                               GTK_RESPONSE_CANCEL);
+
+    gtk_window_resize(GTK_WINDOW(dialog),
+                      HILDON_ADD_HOME_DIALOG_WIDTH,
+                      HILDON_ADD_HOME_DIALOG_HEIGHT);
+
+    gtk_widget_show_all(GTK_DIALOG(dialog)->vbox);
+    gtk_widget_show_all(GTK_DIALOG(dialog)->action_area);
+}
+
+/* Public functions */
+
+GType hildon_add_home_dialog_get_type(void)
+{
+    static GType dialog_type = 0;
+
+    if (!dialog_type) {
+        static const GTypeInfo dialog_info = {
+            sizeof(HildonAddHomeDialogClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_add_home_dialog_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonAddHomeDialog),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_add_home_dialog_init
+        };
+
+        dialog_type = g_type_register_static(GTK_TYPE_DIALOG,
+                                             "HildonAddHomeDialog",
+                                             &dialog_info, 0);
+    }
+    return dialog_type;
+}
+
+/**
+ * hildon_add_home_dialog_new:
+ * @parent: Parent window for the dialog.
+ * @name: Name to show in the entry (or label, if @new_name is not NULL)
+ * @new_name: Name to show in the new name entry. If this is not NULL
+ * the widget acts as a RenameShortcutDialog.
+ *
+ * Creates a new Add to Home dialog or Rename Shortcut dialog.
+ *
+ * Returns the new dialog.
+ */
+GtkWidget *hildon_add_home_dialog_new(GtkWindow * parent,
+                                      const gchar * name,
+                                      const gchar * new_name)
+{
+    HildonAddHomeDialog *dialog;
+    HildonAddHomeDialogPrivate *priv;
+    GtkWidget *caption;
+    GtkSizeGroup *size_group =
+        gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+
+    dialog =
+        HILDON_ADD_HOME_DIALOG(g_object_new
+                               (HILDON_TYPE_ADD_HOME_DIALOG, NULL));
+    priv = HILDON_ADD_HOME_DIALOG_GET_PRIVATE(dialog);
+
+    if (parent)
+        gtk_window_set_transient_for(GTK_WINDOW(dialog), parent);
+
+    /* Set up the window title */
+    if (new_name != NULL) {
+        priv->isrename = TRUE;
+        gtk_window_set_title(GTK_WINDOW(dialog), _("ckdg_ti_rename_link"));
+    } else {
+        priv->isrename = FALSE;
+        gtk_window_set_title(GTK_WINDOW(dialog), _("addtoHome_dialog_title"));
+    }
+
+    /* add description text */
+    if (priv->isrename) {
+        priv->desc_label =
+            gtk_label_new(_("ckdg_ib_link_exists"));
+        gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),
+                           priv->desc_label, FALSE, FALSE, 0);
+    }
+
+    /* add name entry (or label ) */
+    if (priv->isrename) {
+        GtkWidget *label = gtk_label_new((name) ? name : "");
+
+        priv->name_entry = gtk_hbox_new(FALSE, 0);
+        gtk_box_pack_start(GTK_BOX(priv->name_entry), label, FALSE, FALSE,
+                           0);
+    } else {
+        priv->name_entry = gtk_entry_new();
+        gtk_entry_set_text(GTK_ENTRY(priv->name_entry),
+                           (name) ? name : "");
+    }
+    caption = hildon_caption_new(size_group, _("addtoHome_editor_caption"),
+                                 priv->name_entry, NULL,
+                                 HILDON_CAPTION_OPTIONAL);
+    gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), caption,
+                       FALSE, FALSE, 0);
+
+    /* add new name entry */
+    if (priv->isrename) {
+        priv->new_name_entry = gtk_entry_new();
+        gtk_entry_set_text(GTK_ENTRY(priv->new_name_entry), new_name);
+        caption = hildon_caption_new(size_group, _("ckdg_fi_rename_name"),
+                                     priv->new_name_entry, NULL,
+                                     HILDON_CAPTION_OPTIONAL);
+        gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), caption,
+                           FALSE, FALSE, 0);
+    }
+
+    /* highlight proper entry */
+    if (priv->isrename) {
+        gtk_widget_grab_focus(priv->new_name_entry);
+        gtk_editable_select_region(GTK_EDITABLE(priv->new_name_entry), 0,
+                                   -1);
+    } else {
+        gtk_widget_grab_focus(priv->name_entry);
+        gtk_editable_select_region(GTK_EDITABLE(priv->name_entry), 0, -1);
+    }
+
+    gtk_widget_show_all(GTK_DIALOG(dialog)->vbox);
+    gtk_widget_show_all(GTK_DIALOG(dialog)->action_area);
+
+    return GTK_WIDGET(dialog);
+}
+
+/**
+ * hildon_add_home_dialog_get_name:
+ * @dialog: The dialog.
+ *
+ * Returns the name the user has entered in the entry.
+ *
+ * Returns a string the user has entered.
+ */
+const gchar *hildon_add_home_dialog_get_name(HildonAddHomeDialog * dialog)
+{
+    HildonAddHomeDialogPrivate *priv;
+
+    g_return_val_if_fail(HILDON_IS_ADD_HOME_DIALOG(dialog), NULL);
+    priv = HILDON_ADD_HOME_DIALOG_GET_PRIVATE(dialog);
+
+    if (priv->isrename)
+        return gtk_entry_get_text(GTK_ENTRY(priv->new_name_entry));
+    else
+        return gtk_entry_get_text(GTK_ENTRY(priv->name_entry));
+}
diff --git a/hildon-widgets/hildon-add-home-dialog.h b/hildon-widgets/hildon-add-home-dialog.h
new file mode 100644 (file)
index 0000000..397b24f
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __HILDON_ADD_HOME_DIALOG_H__
+#define __HILDON_ADD_HOME_DIALOG_H__
+
+#include <gtk/gtkdialog.h>
+
+G_BEGIN_DECLS
+#define HILDON_TYPE_ADD_HOME_DIALOG \
+  ( hildon_add_home_dialog_get_type() )
+#define HILDON_ADD_HOME_DIALOG(obj) \
+  (GTK_CHECK_CAST (obj, HILDON_TYPE_ADD_HOME_DIALOG, HildonAddHomeDialog))
+#define HILDON_ADD_HOME_DIALOG_CLASS(klass) \
+  (GTK_CHECK_CLASS_CAST ((klass), HILDON_TYPE_ADD_HOME_DIALOG, \
+  HildonAddHomeDialogClass))
+#define HILDON_IS_ADD_HOME_DIALOG(obj) \
+  (GTK_CHECK_TYPE (obj, HILDON_TYPE_ADD_HOME_DIALOG))
+#define HILDON_IS_ADD_HOME_DIALOG_CLASS(klass) \
+  (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_ADD_HOME_DIALOG))
+typedef struct _HildonAddHomeDialog HildonAddHomeDialog;
+typedef struct _HildonAddHomeDialogClass HildonAddHomeDialogClass;
+
+struct _HildonAddHomeDialog {
+    GtkDialog parent;
+};
+
+struct _HildonAddHomeDialogClass {
+    GtkDialogClass parent_class;
+};
+
+GType hildon_add_home_dialog_get_type(void);
+
+GtkWidget *hildon_add_home_dialog_new(GtkWindow * parent,
+                                      const gchar * name,
+                                      const gchar * new_name);
+const gchar *hildon_add_home_dialog_get_name(HildonAddHomeDialog * dialog);
+
+G_END_DECLS
+#endif
diff --git a/hildon-widgets/hildon-calendar-popup.c b/hildon-widgets/hildon-calendar-popup.c
new file mode 100644 (file)
index 0000000..866015a
--- /dev/null
@@ -0,0 +1,366 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/* HILDON DOC
+ * @shortdesc: CalendarPopup allows choosing a date from a popup calendar.
+ * @longdesc: The Calendar popup is a dialog that contains a GtkCalendar 
+ * widget. The pop-up is cancelled by
+ * either a mouse click outside of the dialog or pressing the ESC
+ * key.
+ * </para><para>
+ * 
+ * @seealso: #HildonDateEditor, #HildonTimeEditor
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <gtk/gtkcalendar.h>
+#include <gdk/gdk.h>
+#include <gdk/gdkkeysyms.h>
+#include <langinfo.h>
+#include <time.h>
+#include <libintl.h>
+#include <hildon-widgets/hildon-calendar-popup.h>
+#include <hildon-widgets/gtk-infoprint.h>
+
+#define _(String) dgettext(PACKAGE, String)
+
+#define HILDON_CALENDAR_POPUP_GET_PRIVATE(obj) \
+        (G_TYPE_INSTANCE_GET_PRIVATE\
+        ((obj), HILDON_CALENDAR_POPUP_TYPE, HildonCalendarPopupPrivate));
+
+static GtkDialog *parent_class;
+
+typedef struct _HildonCalendarPopupPrivate HildonCalendarPopupPrivate;
+
+static void init_dmy(guint year, guint month, guint day, guint * d,
+                     guint * m, guint * y);
+
+static void
+hildon_calendar_popup_class_init(HildonCalendarPopupClass * cal_class);
+
+static void hildon_calendar_popup_init(HildonCalendarPopup * cal);
+
+static gboolean hildon_calendar_day_selected(GtkWidget * widget,
+                                             gpointer data);
+
+static void hildon_calendar_allow_exit(GtkWidget * self, gpointer data);
+
+static gboolean hildon_calendar_deny_exit(GtkWidget * self);
+
+static gboolean
+hildon_calendar_erroneous_date(GtkWidget * widget, gpointer data);
+static gboolean hildon_key_pressed(GtkWidget * widget, GdkEventKey * event,
+                                   gpointer data);
+
+struct _HildonCalendarPopupPrivate {
+    GtkWidget *cal;
+    gboolean can_exit;
+};
+
+GType hildon_calendar_popup_get_type(void)
+{
+    static GType popup_type = 0;
+
+    if (!popup_type) {
+        static const GTypeInfo popup_info = {
+            sizeof(HildonCalendarPopupClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_calendar_popup_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonCalendarPopup),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_calendar_popup_init,
+        };
+        popup_type = g_type_register_static(GTK_TYPE_DIALOG,
+                                            "HildonCalendarPopup",
+                                            &popup_info, 0);
+    }
+
+    return popup_type;
+}
+
+/**
+ * hildon_calendar_popup_new:
+ * @parent: parent window for dialog
+ * @year: initial year
+ * @month: initial month
+ * @day: initial day
+ *
+ * This function returns a new HildonCalendarPopup. The initially
+ * selected date is specified by the parameters (year, month, day).
+ * If the specified date is invalid, the current date is used. 
+ *
+ * Return value: Pointer to a new @HildonCalendarPopup widget.
+ **/
+GtkWidget *hildon_calendar_popup_new(GtkWindow * parent, guint year,
+                                     guint month, guint day)
+{
+    HildonCalendarPopup *cal = NULL;
+    HildonCalendarPopupPrivate *priv;
+    guint dtmp, mtmp, ytmp;
+
+    init_dmy(year, month, day, &dtmp, &mtmp, &ytmp);
+
+    cal = HILDON_CALENDAR_POPUP(g_object_new(HILDON_CALENDAR_POPUP_TYPE,
+                                             NULL));
+    priv = HILDON_CALENDAR_POPUP_GET_PRIVATE(cal);
+
+    if (parent) {
+        gtk_window_set_transient_for(GTK_WINDOW(cal), parent);
+    }
+
+    /* Select day, month, year */
+    gtk_calendar_select_month(GTK_CALENDAR(priv->cal), mtmp - 1, ytmp);
+    gtk_calendar_select_day(GTK_CALENDAR(priv->cal), dtmp);
+
+    return GTK_WIDGET(cal);
+}
+
+/**
+ * hildon_calendar_popup_set_date:
+ * @cal: the @HildonCalendarPopup widget
+ * @year: year
+ * @month: month
+ * @day: day
+ *
+ * This function activates a new date on the calendar popup.
+ **/
+
+
+void
+hildon_calendar_popup_set_date(HildonCalendarPopup * cal,
+                               guint year, guint month, guint day)
+{
+    HildonCalendarPopupPrivate *priv;
+
+    g_return_if_fail(HILDON_IS_CALENDAR_POPUP(cal));
+
+    priv = HILDON_CALENDAR_POPUP_GET_PRIVATE(cal);
+    gtk_calendar_clear_marks(GTK_CALENDAR(priv->cal));
+
+    gtk_calendar_select_month(GTK_CALENDAR(priv->cal), month - 1, year);
+    gtk_calendar_select_day(GTK_CALENDAR(priv->cal), day);
+}
+
+/**
+ * hildon_calendar_popup_get_date:
+ * @cal: the @HildonCalendarPopup widget
+ * @year: year
+ * @month: month
+ * @day: day
+ *
+ * This function is used to get the currently selected year, month,
+ * and day. 
+ **/
+
+void
+hildon_calendar_popup_get_date(HildonCalendarPopup * cal,
+                               guint * year, guint * month, guint * day)
+{
+    HildonCalendarPopupPrivate *priv;
+
+    g_return_if_fail(HILDON_IS_CALENDAR_POPUP(cal));
+
+    priv = HILDON_CALENDAR_POPUP_GET_PRIVATE(cal);
+    gtk_calendar_get_date(GTK_CALENDAR(priv->cal), year, month, day);
+    *month = *month + 1;
+
+    if (!g_date_valid_dmy(*day, *month, *year)) {
+        *day = g_date_get_days_in_month(*month, *year);
+    }
+}
+
+static void
+hildon_calendar_popup_class_init(HildonCalendarPopupClass * cal_class)
+{
+    parent_class = g_type_class_peek_parent(cal_class);
+    g_type_class_add_private(cal_class,
+                             sizeof(HildonCalendarPopupPrivate));
+}
+
+static void hildon_calendar_popup_init(HildonCalendarPopup * cal)
+{
+    HildonCalendarPopupPrivate *priv;
+    static int set_domain = 1;
+
+    priv = HILDON_CALENDAR_POPUP_GET_PRIVATE(cal);
+
+    if (set_domain) {
+        (void) bindtextdomain(PACKAGE, LOCALEDIR);
+        set_domain = 0;
+    }
+
+    priv->can_exit = FALSE;
+    priv->cal = gtk_calendar_new();
+
+    gtk_calendar_set_display_options(GTK_CALENDAR(priv->cal),
+                                     GTK_CALENDAR_SHOW_HEADING |
+                                     GTK_CALENDAR_SHOW_DAY_NAMES |
+                                     GTK_CALENDAR_SHOW_WEEK_NUMBERS);
+
+    gtk_box_pack_start(GTK_BOX(GTK_DIALOG(cal)->vbox), priv->cal,
+                       TRUE, TRUE, 0);
+    gtk_dialog_set_has_separator(GTK_DIALOG(cal), FALSE);
+    gtk_dialog_add_button(GTK_DIALOG(cal), _("Ecdg_bd_calendar_popout_done"),
+                            GTK_RESPONSE_OK);
+    gtk_widget_show(priv->cal);
+
+    /* Connect signals */
+    g_signal_connect(G_OBJECT(priv->cal), "day-selected",
+                     G_CALLBACK(hildon_calendar_day_selected), cal);
+
+    g_signal_connect(G_OBJECT(priv->cal), "key-press-event",
+                     G_CALLBACK(hildon_key_pressed), cal);
+    g_signal_connect_swapped(G_OBJECT(priv->cal), "button-release-event",
+                             G_CALLBACK(hildon_calendar_deny_exit), cal);
+    g_signal_connect_swapped(G_OBJECT(priv->cal), "month-changed",
+                             G_CALLBACK(hildon_calendar_deny_exit), cal);
+    g_signal_connect_swapped(G_OBJECT(priv->cal), "button-press-event",
+                             G_CALLBACK(hildon_calendar_deny_exit), cal);
+
+    g_signal_connect(G_OBJECT(priv->cal), "erroneous_date",
+                     G_CALLBACK(hildon_calendar_erroneous_date), cal);
+    
+    g_signal_connect(G_OBJECT(priv->cal), "selected_date",
+                     G_CALLBACK(hildon_calendar_allow_exit), cal);
+
+    gtk_widget_realize(GTK_WIDGET(cal));
+    gdk_window_set_decorations(GTK_WIDGET(cal)->window, GDK_DECOR_BORDER);
+    gtk_widget_grab_focus(priv->cal);
+}
+
+static gboolean hildon_calendar_erroneous_date(GtkWidget * widget,
+                                               gpointer data)
+{
+    gtk_infoprint(GTK_WINDOW(gtk_widget_get_ancestor(GTK_WIDGET(widget),
+                                                     GTK_TYPE_WINDOW)),
+                  _("Date should be between 01/01/1980 and 12/31/2100."));
+    return TRUE;
+}
+
+static gboolean
+hildon_calendar_day_selected(GtkWidget * widget, gpointer data)
+{
+    HildonCalendarPopup *cal;
+    HildonCalendarPopupPrivate *priv;
+
+    cal = HILDON_CALENDAR_POPUP(data);
+    priv = HILDON_CALENDAR_POPUP_GET_PRIVATE(cal);
+
+    if (priv->can_exit) {
+        gtk_dialog_response(GTK_DIALOG(data), GTK_RESPONSE_ACCEPT);
+        return TRUE;
+    }
+    return FALSE;
+}
+
+static gboolean
+hildon_key_pressed(GtkWidget * widget, GdkEventKey * event, gpointer data)
+{
+    HildonCalendarPopup *cal;
+    HildonCalendarPopupPrivate *priv;
+
+    g_return_val_if_fail(data, FALSE);
+
+    cal = HILDON_CALENDAR_POPUP(data);
+    priv = HILDON_CALENDAR_POPUP_GET_PRIVATE(cal);
+
+    if (event->keyval == GDK_Return) {
+        priv->can_exit = TRUE;
+        gtk_dialog_response(GTK_DIALOG(cal), GTK_RESPONSE_OK);
+        return TRUE;
+    }
+
+    if ((event->keyval == GDK_Escape) || (event->keyval == GDK_F1) ||
+        (event->keyval == GDK_F2) || (event->keyval == GDK_F3) ||
+        (event->keyval == GDK_F4) || (event->keyval == GDK_F5) ||
+        (event->keyval == GDK_F6) || (event->keyval == GDK_F7) ||
+        (event->keyval == GDK_F8)) {
+        gtk_dialog_response(GTK_DIALOG(cal), GTK_RESPONSE_CANCEL);
+        return TRUE;
+    }
+
+    return FALSE;
+}
+
+static void
+init_dmy(guint year, guint month, guint day, guint * d, guint * m,
+         guint * y)
+{
+    GDate date;
+
+    if (year > 2100) {
+        *d = 31;
+        *m = 12;
+        *y = 2100;
+    } else if (year < 1980) {
+        *d = 1;
+        *m = 1;
+        *y = 1980;
+    } else if (!g_date_valid_dmy(day, month, year)) {
+        g_date_clear(&date, 1);
+        g_date_set_time(&date, time(NULL));
+
+        *d = g_date_get_day(&date);
+        *m = g_date_get_month(&date);
+        *y = g_date_get_year(&date);
+    } else {
+        *d = day;
+        *m = month;
+        *y = year;
+    }
+}
+
+static void
+hildon_calendar_allow_exit(GtkWidget * self, gpointer data)
+{
+    HildonCalendarPopup *cal;
+    HildonCalendarPopupPrivate *priv;
+
+    g_return_if_fail (GTK_IS_WIDGET (self));
+    g_return_if_fail (HILDON_IS_CALENDAR_POPUP (data)); 
+    
+    cal = HILDON_CALENDAR_POPUP(data);
+    priv = HILDON_CALENDAR_POPUP_GET_PRIVATE(cal);
+  
+    gtk_dialog_response(GTK_DIALOG(cal), GTK_RESPONSE_OK);
+}
+
+static gboolean hildon_calendar_deny_exit(GtkWidget * self)
+{
+    HildonCalendarPopup *cal;
+    HildonCalendarPopupPrivate *priv;
+
+    cal = HILDON_CALENDAR_POPUP(self);
+    priv = HILDON_CALENDAR_POPUP_GET_PRIVATE(cal);
+
+    priv->can_exit = FALSE;
+    return FALSE;
+}
diff --git a/hildon-widgets/hildon-calendar-popup.h b/hildon-widgets/hildon-calendar-popup.h
new file mode 100644 (file)
index 0000000..84989e3
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __HILDON_CALENDAR_POPUP_H__
+#define __HILDON_CALENDAR_POPUP_H__
+
+#include <gtk/gtkdialog.h>
+
+G_BEGIN_DECLS
+/**
+ * HILDON_CALENDAR_POPUP_TYPE:
+ *
+ * Macro for getting type of calendar popup.
+ */
+#define HILDON_CALENDAR_POPUP_TYPE ( hildon_calendar_popup_get_type() )
+#define HILDON_CALENDAR_POPUP(obj) (GTK_CHECK_CAST (obj,\
+  HILDON_CALENDAR_POPUP_TYPE, HildonCalendarPopup))
+#define HILDON_CALENDAR_POPUP_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass),\
+  HILDON_CALENDAR_POPUP_TYPE, HildonCalendarPopupClass))
+#define HILDON_IS_CALENDAR_POPUP(obj) (GTK_CHECK_TYPE (obj,\
+  HILDON_CALENDAR_POPUP_TYPE))
+#define HILDON_IS_CALENDAR_POPUP_CLASS(klass) \
+  (GTK_CHECK_CLASS_TYPE ((klass), HILDON_CALENDAR_POPUP_TYPE))
+
+/**
+ * HildonCalendarPopup:
+ *
+ * Internal struct for calendar popup.
+ */
+typedef struct _HildonCalendarPopup HildonCalendarPopup;
+typedef struct _HildonCalendarPopupClass HildonCalendarPopupClass;
+
+/* Note: CalendarPopup is no longer derived from GtkWindow
+   but from GtkDialog */
+
+struct _HildonCalendarPopup {
+    GtkDialog par;
+};
+
+struct _HildonCalendarPopupClass {
+    GtkDialogClass parent_class;
+};
+
+GType hildon_calendar_popup_get_type(void);
+
+GtkWidget *hildon_calendar_popup_new(GtkWindow * parent, guint year,
+                                     guint month, guint day);
+
+void hildon_calendar_popup_set_date(HildonCalendarPopup * cal,
+                                    guint year, guint month, guint day);
+
+void hildon_calendar_popup_get_date(HildonCalendarPopup * cal,
+                                    guint * year, guint * month,
+                                    guint * day);
+
+G_END_DECLS
+#endif
diff --git a/hildon-widgets/hildon-color-button.c b/hildon-widgets/hildon-color-button.c
new file mode 100644 (file)
index 0000000..30b8d17
--- /dev/null
@@ -0,0 +1,401 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <config.h>
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gtk/gtkbutton.h>
+#include <gtk/gtkalignment.h>
+#include <gtk/gtkdrawingarea.h>
+#include <gtk/gtksignal.h>
+
+#include "hildon-color-button.h"
+#include "hildon-color-selector.h"
+
+#include <libintl.h>
+#define _(String) dgettext(PACKAGE, String)
+
+#define HILDON_COLOR_BUTTON_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE\
+              ((obj), HILDON_TYPE_COLOR_BUTTON, HildonColorButtonPrivate))
+
+#define COLOR_FIELD_HEIGHT 26
+#define COLOR_FIELD_WIDTH 26
+#define COLOR_BUTTON_WIDTH 48
+#define COLOR_BUTTON_HEIGHT 40
+
+struct _HildonColorButtonPrivate 
+{
+  GtkWidget *dialog;
+
+  GtkWidget *drawing_area;
+  GdkPixbuf *pixbuf;
+  GdkColor color;
+  GdkGC *gc;
+};
+
+enum 
+{
+  PROP_NONE,
+  PROP_COLOR
+};
+
+static void
+hildon_color_button_class_init(HildonColorButtonClass *klass);
+static void
+hildon_color_button_init(HildonColorButton *color_button);
+
+static void
+hildon_color_button_finalize(GObject *object);
+static void
+hildon_color_button_set_property(GObject *object, guint param_id,
+                                                          const GValue *value, GParamSpec *pspec);
+static void
+hildon_color_button_get_property(GObject *object, guint param_id,
+                                                          GValue *value, GParamSpec *pspec);
+static void
+hildon_color_button_realize(GtkWidget *widget);
+static void
+hildon_color_button_clicked(GtkButton *button);
+static gint
+hildon_color_field_expose_event(GtkWidget *widget, GdkEventExpose *event,
+                                HildonColorButton *cb);
+
+static gboolean
+hildon_color_button_mnemonic_activate( GtkWidget *widget,
+                                       gboolean group_cycling );
+static void
+hildon_color_button_recolor_pixbuf(HildonColorButton *cb);
+
+
+static gpointer parent_class = NULL;
+
+GType
+hildon_color_button_get_type(void)
+{
+  static GType color_button_type = 0;
+  
+  if (!color_button_type)
+    {
+      static const GTypeInfo color_button_info =
+      {
+        sizeof (HildonColorButtonClass),
+        NULL,           /* base_init */
+        NULL,           /* base_finalize */
+        (GClassInitFunc) hildon_color_button_class_init,
+        NULL,           /* class_finalize */
+        NULL,           /* class_data */
+        sizeof (HildonColorButton),
+        0,              /* n_preallocs */
+        (GInstanceInitFunc) hildon_color_button_init,
+      };
+      
+      color_button_type =
+        g_type_register_static (GTK_TYPE_BUTTON, "HildonColorButton",
+                                &color_button_info, 0);
+    }
+  
+  return color_button_type;
+}
+
+static void
+hildon_color_button_class_init(HildonColorButtonClass *klass)
+{
+  GObjectClass *gobject_class;
+  GtkButtonClass *button_class;
+  GtkWidgetClass *widget_class;
+  
+  gobject_class = G_OBJECT_CLASS (klass);
+  button_class = GTK_BUTTON_CLASS (klass);
+  widget_class = GTK_WIDGET_CLASS (klass);
+  
+  parent_class = g_type_class_peek_parent (klass);
+
+  gobject_class->get_property = hildon_color_button_get_property;
+  gobject_class->set_property = hildon_color_button_set_property;
+  gobject_class->finalize = hildon_color_button_finalize;
+  widget_class->realize = hildon_color_button_realize;
+  button_class->clicked = hildon_color_button_clicked;
+  widget_class->mnemonic_activate = hildon_color_button_mnemonic_activate;
+  
+  /**
+   * HildonColorButton:color:
+   *
+   * The selected color.
+   */
+  g_object_class_install_property (gobject_class, PROP_COLOR,
+                                   g_param_spec_boxed ("color",
+                                     "Current Color",
+                                     "The selected color",
+                                     GDK_TYPE_COLOR, G_PARAM_READABLE | 
+                                     G_PARAM_WRITABLE));
+
+  g_type_class_add_private (gobject_class, sizeof (HildonColorButtonPrivate));
+}
+
+/* Handle exposure events for the color picker's drawing area */
+static gint
+hildon_color_field_expose_event(GtkWidget *widget, GdkEventExpose *event,
+                                HildonColorButton *cb)
+{
+  gdk_draw_pixbuf(widget->window, cb->priv->gc,
+                  cb->priv->pixbuf, event->area.x,
+                  event->area.y, event->area.x,
+                  event->area.y, event->area.width,
+                  event->area.height, GDK_RGB_DITHER_MAX,
+                  event->area.x, event->area.y);
+  return FALSE;
+}
+
+static void
+hildon_color_button_init(HildonColorButton *cb)
+{
+  GtkWidget *align;
+  
+  cb->priv = HILDON_COLOR_BUTTON_GET_PRIVATE(cb);
+
+  cb->priv->dialog = NULL;
+  cb->priv->gc = NULL;
+
+  gtk_widget_push_composite_child();
+  
+  align = gtk_alignment_new(0.5, 0.5, 0, 0);
+
+  cb->priv->pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8,
+                                    COLOR_FIELD_WIDTH, COLOR_FIELD_HEIGHT);
+
+  cb->priv->drawing_area = gtk_drawing_area_new();
+
+  gtk_widget_set_size_request(GTK_WIDGET(cb), COLOR_BUTTON_WIDTH,
+                              COLOR_BUTTON_HEIGHT);
+  gtk_widget_set_size_request(GTK_WIDGET(cb->priv->drawing_area),
+                              COLOR_FIELD_WIDTH, COLOR_FIELD_HEIGHT);
+
+  g_signal_connect(G_OBJECT(cb->priv->drawing_area), "expose-event",
+                   G_CALLBACK(hildon_color_field_expose_event), cb);
+
+  gtk_container_add(GTK_CONTAINER(align), cb->priv->drawing_area);
+  gtk_container_add(GTK_CONTAINER(cb), align);
+  
+  hildon_color_button_recolor_pixbuf(cb);
+  
+  gtk_widget_show_all(align);
+  
+  gtk_widget_pop_composite_child();
+}
+
+static void
+hildon_color_button_finalize(GObject *object)
+{
+  HildonColorButton *cb = HILDON_COLOR_BUTTON(object);
+
+  if (cb->priv->dialog)
+  {
+    gtk_widget_destroy(cb->priv->dialog);
+    cb->priv->dialog = NULL;
+  }
+
+  if (cb->priv->pixbuf)
+  {
+    g_object_unref(G_OBJECT(cb->priv->pixbuf));
+    cb->priv->pixbuf = NULL;
+  }
+
+  if (cb->priv->gc)
+  {
+    g_object_unref(G_OBJECT(cb->priv->gc));
+    cb->priv->gc = NULL;
+  }
+  if( G_OBJECT_CLASS(parent_class)->finalize )
+    G_OBJECT_CLASS(parent_class)->finalize(object);
+}
+
+static void
+hildon_color_button_realize(GtkWidget *widget)
+{
+  HildonColorButton *cb = HILDON_COLOR_BUTTON(widget);
+
+  GTK_WIDGET_CLASS(parent_class)->realize(widget);
+
+  if (!cb->priv->gc)
+    cb->priv->gc = gdk_gc_new(widget->window);
+
+  hildon_color_button_recolor_pixbuf(cb);
+}
+
+static gboolean
+hildon_color_button_mnemonic_activate( GtkWidget *widget,
+                                       gboolean group_cycling )
+{
+  gtk_widget_grab_focus( widget );
+  return TRUE;
+}
+
+static void
+hildon_color_button_recolor_pixbuf(HildonColorButton *cb)
+{
+  gint i, j, rowstride;
+  guchar *pixels;
+  guint8 r, g, b;
+  GdkPixbuf *pb = cb->priv->pixbuf;
+  GdkColor *color = &cb->priv->color;
+  
+  r = (color->red >> 8);
+  g = (color->green >> 8);
+  b = (color->blue >> 8);
+  
+  pixels = gdk_pixbuf_get_pixels(pb);
+  rowstride = gdk_pixbuf_get_rowstride(pb);
+  
+  for (j=0; j<COLOR_FIELD_HEIGHT; j++)
+    for (i=0; i<COLOR_FIELD_WIDTH; i++)
+    {
+      *(j * rowstride + pixels + i * 3)     = r;
+      *(j * rowstride + pixels + i * 3 + 1) = g;
+      *(j * rowstride + pixels + i * 3 + 2) = b;
+    }
+  gtk_widget_queue_draw(GTK_WIDGET(cb));
+}
+
+static void
+hildon_color_button_clicked(GtkButton *button)
+{
+  gint result;
+  HildonColorButton *cb = HILDON_COLOR_BUTTON(button);
+  HildonColorSelector *csd = HILDON_COLOR_SELECTOR(cb->priv->dialog);
+
+  if (!csd)
+  {
+    GtkWidget *parent = gtk_widget_get_toplevel(GTK_WIDGET(cb));
+    cb->priv->dialog = hildon_color_selector_new(GTK_WINDOW(parent));
+    csd = HILDON_COLOR_SELECTOR(cb->priv->dialog);
+    
+    if (parent)
+      gtk_window_set_transient_for(GTK_WINDOW(csd), GTK_WINDOW(parent));
+  }
+  
+  hildon_color_selector_set_color(csd, &cb->priv->color);
+  
+  result = gtk_dialog_run(GTK_DIALOG(csd));
+  if (result == GTK_RESPONSE_OK)
+  {
+    cb->priv->color = *hildon_color_selector_get_color(csd);
+    g_object_set( G_OBJECT(cb), "color", &cb->priv->color, NULL );
+  }
+  gtk_widget_hide(GTK_WIDGET(csd));
+}
+
+static void
+hildon_color_button_set_property(GObject *object, guint param_id,
+                                                  const GValue *value, GParamSpec *pspec)
+{
+  HildonColorButton *cb = HILDON_COLOR_BUTTON(object);
+
+  switch (param_id) 
+    {
+    case PROP_COLOR:
+      cb->priv->color = *(GdkColor*)g_value_get_boxed(value);
+      hildon_color_button_recolor_pixbuf(cb);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID(object, param_id, pspec);
+      break;
+    }
+}
+
+static void
+hildon_color_button_get_property(GObject *object, guint param_id,
+                                                  GValue *value, GParamSpec *pspec)
+{
+  HildonColorButton *cb = HILDON_COLOR_BUTTON(object);
+
+  switch (param_id) 
+    {
+    case PROP_COLOR:
+      g_value_set_boxed(value, &cb->priv->color);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID(object, param_id, pspec);
+      break;
+    }
+}
+
+/**
+ * hildon_color_button_new:
+ *
+ * Creates a new color button. This returns a widget in the form of
+ * a small button containing a swatch representing the current selected 
+ * color. When the button is clicked, a color-selection dialog will open, 
+ * allowing the user to select a color. The swatch will be updated to reflect 
+ * the new color when the user finishes.
+ *
+ * Return value: a new color button.
+ */
+GtkWidget *
+hildon_color_button_new(void)
+{
+  return g_object_new( HILDON_TYPE_COLOR_BUTTON, NULL );
+}
+
+/**
+ * hildon_color_button_new_with_color:
+ * @color: A #GdkColor to set the current color with.
+ *
+ * Creates a new color button. 
+ *
+ * Return value: a new color button.
+ */
+GtkWidget *
+hildon_color_button_new_with_color(const GdkColor *color)
+{
+  return g_object_new( HILDON_TYPE_COLOR_BUTTON, "color", color, NULL );
+}
+
+/**
+ * hildon_color_button_set_color:
+ * @button: A #HildonColorButton
+ * @color: A color to be set
+ *
+ * Sets a color to the button.
+ */
+void
+hildon_color_button_set_color( HildonColorButton *button, GdkColor *color )
+{
+  g_object_set( G_OBJECT(button), "color", color, NULL );
+}
+
+/**
+ * hildon_color_button_get_color:
+ * @button: A #HildonColorButton
+ *
+ * Gets a color from the button.
+ *
+ * Return value: The color set to a current button.
+ */
+GdkColor *
+hildon_color_button_get_color( HildonColorButton *button )
+{
+  GdkColor *color = NULL;
+  g_object_get( G_OBJECT(button), "color", &color, NULL );
+  return color;
+}
diff --git a/hildon-widgets/hildon-color-button.h b/hildon-widgets/hildon-color-button.h
new file mode 100644 (file)
index 0000000..7727efe
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __HILDON_COLOR_BUTTON_H__
+#define __HILDON_COLOR_BUTTON_H__
+
+#include <gtk/gtkbutton.h>
+
+G_BEGIN_DECLS
+
+#define HILDON_TYPE_COLOR_BUTTON             (hildon_color_button_get_type ())
+#define HILDON_COLOR_BUTTON(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), HILDON_TYPE_COLOR_BUTTON, HildonColorButton))
+#define HILDON_COLOR_BUTTON_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_COLOR_BUTTON, HildonColorButtonClass))
+#define HILDON_IS_COLOR_BUTTON(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HILDON_TYPE_COLOR_BUTTON))
+#define HILDON_IS_COLOR_BUTTON_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_COLOR_BUTTON))
+#define HILDON_COLOR_BUTTON_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), HILDON_TYPE_COLOR_BUTTON, HildonColorButtonClass))
+
+typedef struct _HildonColorButton          HildonColorButton;
+typedef struct _HildonColorButtonClass     HildonColorButtonClass;
+typedef struct _HildonColorButtonPrivate   HildonColorButtonPrivate;
+
+struct _HildonColorButton
+{
+  GtkButton button;
+  HildonColorButtonPrivate *priv;
+};
+
+struct _HildonColorButtonClass
+{
+  GtkButtonClass parent_class;
+
+  /* Padding for future expansion */
+  void (*_gtk_reserved1) (void);
+  void (*_gtk_reserved2) (void);
+  void (*_gtk_reserved3) (void);
+  void (*_gtk_reserved4) (void);
+};
+
+
+GType      
+hildon_color_button_get_type( void ) G_GNUC_CONST;
+
+GtkWidget *
+hildon_color_button_new( void );
+
+GtkWidget *
+hildon_color_button_new_with_color( const GdkColor *color );
+
+GdkColor *
+hildon_color_button_get_color( HildonColorButton *button );
+
+void
+hildon_color_button_set_color( HildonColorButton *button, GdkColor *color );
+
+G_END_DECLS
+
+#endif  /* __GTK_COLOR_BUTTON_H__ */
+
+
+
+
diff --git a/hildon-widgets/hildon-color-popup.c b/hildon-widgets/hildon-color-popup.c
new file mode 100644 (file)
index 0000000..8879865
--- /dev/null
@@ -0,0 +1,229 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/*
+ * @file hildon-color-popup.c
+ *
+ * This file contains the implementation of Hildon Color Selector Popup
+ * widget containing the custom color palette selector popup for selecting 
+ * different colors based on RGB values.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gtk/gtkbox.h>
+#include <gtk/gtktable.h>
+#include <gtk/gtklabel.h>
+#include <gtk/gtkdrawingarea.h>
+
+#include "hildon-color-selector.h"
+#include "hildon-color-popup.h"
+#include "hildon-controlbar.h"
+
+#include <libintl.h>
+#define _(String) dgettext(PACKAGE, String)
+
+/* Pixel sizes */
+#define HILDON_COLOR_PALETTE_SIZE        120
+#define HILDON_COLOR_CONTROLBAR_MAX       31
+#define HILDON_COLOR_CONTROLBAR_MIN        0 
+#define HILDON_COLOR_LABELS_LEFT_PAD      35
+#define HILDON_COLOR_PALETTE_POS_PAD      45
+#define HILDON_COLOR_BAR_WIDTH 449
+
+/* 
+ * Private function prototype definitions 
+ */
+
+static gboolean 
+hildon_popup_palette_expose (GtkWidget * widget,
+                             GdkEventExpose * event,
+                             gpointer data);
+/**
+ * hildon_color_popup_new:
+ * @parent: the parent window of the dialog.
+ * @initial_color: a #GdkColor with the initial values to be used.
+ * @popup_data: a #HildonColorPopup.
+ *
+ * This function creates a new popup dialog with three controlbars
+ * (red, green, blue) and a drawing area with the current color.
+ *
+ * Used as normal GtkDialog (run with gtk_dialog_run() and read 
+ * stardard responses (GTK_RESPONSE_OK, GTK_RESPONSE_CANCEL). 
+ *
+ * Returns: the newly created popup dialog. 
+ */
+
+GtkWidget *
+hildon_color_popup_new(GtkWindow *parent, GdkColor *initial_color, 
+               HildonColorPopup *popup_data)
+{
+  GtkWidget *popup;
+  GtkTable *layout;
+  GtkWidget *area;
+  GtkWidget *l_red, *l_green, *l_blue;
+  GdkColor  *current_color;
+
+  current_color = initial_color;
+
+  popup_data->ctrlbar_red   = hildon_controlbar_new (); 
+  popup_data->ctrlbar_green = hildon_controlbar_new ();
+  popup_data->ctrlbar_blue  = hildon_controlbar_new ();
+  area = gtk_drawing_area_new();
+  layout = GTK_TABLE(gtk_table_new(12, 2, FALSE));
+
+  gtk_widget_set_size_request (area, 
+                               HILDON_COLOR_PALETTE_SIZE, 
+                               HILDON_COLOR_PALETTE_SIZE);
+  gtk_widget_set_size_request(popup_data->ctrlbar_red,
+                               HILDON_COLOR_BAR_WIDTH, -1); 
+  gtk_widget_set_size_request(popup_data->ctrlbar_green,
+                               HILDON_COLOR_BAR_WIDTH, -1); 
+  gtk_widget_set_size_request(popup_data->ctrlbar_blue,
+                               HILDON_COLOR_BAR_WIDTH, -1); 
+
+  l_red = gtk_label_new( _("Ecdg_fi_5bit_colour_selector_red"));
+  l_green = gtk_label_new(_("Ecdg_fi_5bit_colour_selector_green"));
+  l_blue = gtk_label_new(_("Ecdg_fi_5bit_colour_selector_blue"));
+  
+  /* Position the labels to start about the same label as the controlbars */
+  gtk_misc_set_alignment(GTK_MISC(l_red), 0.08f, 0.5f);
+  gtk_misc_set_alignment(GTK_MISC(l_green), 0.08f, 0.5f);  
+  gtk_misc_set_alignment(GTK_MISC(l_blue), 0.08f, 0.5f);
+
+  gtk_table_attach_defaults(layout, l_red, 0, 1, 0, 2);
+  gtk_table_attach_defaults(layout, popup_data->ctrlbar_red, 0, 1, 2, 4);
+  gtk_table_attach_defaults(layout, l_green, 0, 1, 4, 6);
+  gtk_table_attach_defaults(layout, popup_data->ctrlbar_green, 0, 1, 6, 8);
+  gtk_table_attach_defaults(layout, l_blue, 0, 1, 8, 10);
+  gtk_table_attach_defaults(layout, popup_data->ctrlbar_blue, 0, 1, 10, 12);
+  gtk_table_attach(layout, area, 1, 2, 3, 11, GTK_SHRINK, GTK_SHRINK, 0, 0);
+
+  /* control bars */
+  hildon_controlbar_set_range (HILDON_CONTROLBAR(popup_data->ctrlbar_red),
+                                 HILDON_COLOR_CONTROLBAR_MIN, 
+                                 HILDON_COLOR_CONTROLBAR_MAX);
+  hildon_controlbar_set_range (HILDON_CONTROLBAR(popup_data->ctrlbar_green), 
+                                 HILDON_COLOR_CONTROLBAR_MIN, 
+                                 HILDON_COLOR_CONTROLBAR_MAX);
+  hildon_controlbar_set_range (HILDON_CONTROLBAR(popup_data->ctrlbar_blue), 
+                                 HILDON_COLOR_CONTROLBAR_MIN, 
+                                 HILDON_COLOR_CONTROLBAR_MAX);
+
+  hildon_controlbar_set_value (HILDON_CONTROLBAR(popup_data->ctrlbar_red),   
+                                 (current_color->red >> 11)&0x1F);
+  hildon_controlbar_set_value (HILDON_CONTROLBAR(popup_data->ctrlbar_green),
+                                 (current_color->green >> 11)&0x1F);
+  hildon_controlbar_set_value (HILDON_CONTROLBAR(popup_data->ctrlbar_blue),
+                                 (current_color->blue >> 11)&0x1F);
+
+  /* controlbars callbacks */
+  g_signal_connect_swapped(popup_data->ctrlbar_red, "value-changed",
+                      G_CALLBACK(gtk_widget_queue_draw), area);
+  g_signal_connect_swapped(popup_data->ctrlbar_green, "value-changed",
+                      G_CALLBACK(gtk_widget_queue_draw), area);
+  g_signal_connect_swapped(popup_data->ctrlbar_blue, "value-changed",
+                      G_CALLBACK(gtk_widget_queue_draw), area);
+
+  g_signal_connect (area,  "expose_event",
+                      G_CALLBACK(hildon_popup_palette_expose), 
+                      popup_data);
+  
+  popup = gtk_dialog_new_with_buttons (_("ecdg_ti_colour_selector"), 
+                                       GTK_WINDOW(parent),
+                                       GTK_DIALOG_DESTROY_WITH_PARENT |
+                                       GTK_DIALOG_NO_SEPARATOR,
+                                       _("ecdg_bd_colour_selector_ok"), GTK_RESPONSE_OK,
+                                       _("ecdg_bd_colour_selector_cancel"),
+                                       GTK_RESPONSE_CANCEL,
+                                       NULL);
+
+  gtk_dialog_set_default_response(GTK_DIALOG(popup), GTK_RESPONSE_OK);
+  gtk_box_pack_start (GTK_BOX(GTK_DIALOG(popup)->vbox), 
+                        GTK_WIDGET(layout), TRUE, TRUE, 0);
+  gtk_widget_show_all(GTK_DIALOG(popup)->vbox);             
+
+  return popup;
+}
+
+/**
+ * hildon_color_popup_set_color_from_sliders:
+ * @color: a pointer to #GdkColor to which the new values will be put.
+ * @popup_data: a #HildonColorPopup.
+ *
+ * This function sets the values of the given #GdkColor to the values
+ * in the sliders of controlbars.
+ * 
+ * Returns: void. 
+ */
+
+void
+hildon_color_popup_set_color_from_sliders(GdkColor *color,
+  HildonColorPopup *popup_data)
+{
+  color->pixel = 0;
+  color->red = hildon_controlbar_get_value (
+        HILDON_CONTROLBAR(popup_data->ctrlbar_red)) <<  11;
+  color->green = hildon_controlbar_get_value (
+        HILDON_CONTROLBAR(popup_data->ctrlbar_green)) <<  11;
+  color->blue = hildon_controlbar_get_value (
+        HILDON_CONTROLBAR(popup_data->ctrlbar_blue)) <<  11;
+}
+
+static gboolean 
+hildon_popup_palette_expose (GtkWidget * widget,
+                             GdkEventExpose *event, gpointer data)
+{
+  GTimer *timer = g_timer_new();
+  g_timer_start(timer);
+  if (GTK_WIDGET_DRAWABLE(widget))
+  {
+    GdkColor color;
+    GdkGC * gc = gdk_gc_new (widget->window); 
+
+    hildon_color_popup_set_color_from_sliders(&color, data);
+    gdk_gc_set_rgb_fg_color(gc, &color);
+                         
+    /* draw the color */
+    gdk_draw_rectangle( widget->window, gc, TRUE /* filled */,  
+                        1, 1, widget->allocation.width - 2, 
+                        widget->allocation.height - 2);    
+
+    color.pixel = color.red = color.green = color.blue = 0;
+    gdk_gc_set_rgb_fg_color(gc, &color);
+
+    /* frames on color box */
+    gdk_draw_rectangle( widget->window, gc, FALSE, 
+                        0, 0, widget->allocation.width - 1, 
+                        widget->allocation.height - 1); 
+
+    g_object_unref(gc);
+  }
+  g_timer_stop(timer);
+  g_print("---%f---\n",g_timer_elapsed(timer,NULL));
+  g_timer_destroy(timer);
+  return TRUE;
+}
diff --git a/hildon-widgets/hildon-color-popup.h b/hildon-widgets/hildon-color-popup.h
new file mode 100644 (file)
index 0000000..9d3a4da
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __HILDON_COLOR_POPUP_H__
+#define __HILDON_COLOR_POPUP_H__
+
+#include <gtk/gtkcontainer.h>
+#include <gtk/gtkwindow.h>
+#include <gtk/gtkdialog.h>
+
+typedef struct
+{
+         GtkWidget *ctrlbar_red, *ctrlbar_green, *ctrlbar_blue;
+} HildonColorPopup;
+
+GtkWidget *hildon_color_popup_new(GtkWindow * parent, GdkColor *initial_color, HildonColorPopup *popupdata);
+
+void hildon_color_popup_set_color_from_sliders(GdkColor *color, HildonColorPopup *popupdata);
+#endif
diff --git a/hildon-widgets/hildon-color-selector.c b/hildon-widgets/hildon-color-selector.c
new file mode 100644 (file)
index 0000000..c0a1bd4
--- /dev/null
@@ -0,0 +1,701 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/*
+ * @file hildon-color-selector.c
+ *
+ * This file contains the implementation of Hildon Color Selector
+ * widget containing the base color and custom color palette selector 
+ * and popup for selecting different colors based on RGB values.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gtk/gtktable.h>
+#include <gtk/gtkhbox.h>
+#include <gtk/gtklabel.h>
+#include <gtk/gtkdrawingarea.h>
+#include <gdk/gdkkeysyms.h>
+#include <gconf/gconf-client.h> 
+
+#include "hildon-color-selector.h"
+#include "hildon-color-popup.h"
+
+#include <libintl.h>
+#define _(String) dgettext(PACKAGE, String)
+
+/* Color amounts */
+#define HILDON_BASE_COLOR_NUM             16
+#define HILDON_CUSTOM_COLOR_NUM            8
+#define HILDON_TOTAL_COLOR_NUM \
+  (HILDON_BASE_COLOR_NUM + HILDON_CUSTOM_COLOR_NUM)
+#define BLACKIND                           0
+#define GREYIND                            6
+#define WHITEIND                           9
+
+/* Pixel sizes */
+#define HILDON_COLOR_SELECTOR_BOX_W       27
+#define HILDON_COLOR_SELECTOR_BOX_H       27
+#define HILDON_COLOR_SELECTOR_BOX_BORDER   2
+#define HILDON_COLOR_SELECTOR_COLS         8
+#define HILDON_COLOR_SELECTOR_ROWS         3
+#define HILDON_COLOR_PALETTE_SIZE        120
+#define HILDON_COLOR_CONTROLBAR_MAX       31
+#define HILDON_COLOR_CONTROLBAR_MIN        0 
+#define HILDON_COLOR_LABELS_LEFT_PAD      35
+#define HILDON_COLOR_PALETTE_POS_PAD      45
+#define HILDON_COLOR_BAR_WIDTH 449
+
+#define HILDON_MORE_BUTTON_RESPONSE     1234
+
+/* gconf definitions */
+#define HILDON_COLOR_GCONF_PATH  "/system/osso/af/color_selector"
+#define HILDON_COLOR_GCONF_KEYS  "/system/osso/af/color_selector/custom_colors"
+/*
+ * Pointer parent class 
+ */
+static GtkDialogClass *parent_class;
+
+struct _HildonColorSelectorPriv 
+{
+    GConfClient *client;
+    GtkWidget *drawing_area;
+    gint index;
+    guint notify_id;
+
+    /* one extra place for the modified base color */
+    GdkColor color[HILDON_TOTAL_COLOR_NUM + 1];
+};
+
+/* 
+ * Private function prototype definitions 
+ */
+static void
+hildon_color_selector_class_init (HildonColorSelectorClass * selector_class);
+
+static void 
+hildon_color_selector_init (HildonColorSelector * selector);
+
+static gboolean
+hildon_color_selector_expose (GtkWidget * widget,
+                              GdkEventExpose * event, 
+                              gpointer data);
+
+static void 
+hildon_color_selector_response (GtkWidget * widget,
+                               gint response_id, 
+                               gpointer data);
+
+static gboolean 
+key_pressed (GtkWidget * widget, 
+             GdkEventKey * event, 
+             gpointer user_data);
+
+static gboolean 
+color_pressed (GtkWidget * widget, 
+               GdkEventButton * event, 
+               gpointer user_data);
+
+static void
+select_color (HildonColorSelector * selector, 
+              int event_x, 
+              int event_y);   
+
+static gboolean
+color_moved (GtkWidget * widget, 
+             GdkEventMotion * event, 
+             gpointer data);
+
+GType 
+hildon_color_selector_get_type(void)
+{
+    static GType selector_type = 0;
+
+    if (!selector_type) 
+    {
+        static const GTypeInfo selector_info = 
+            {
+                sizeof(HildonColorSelectorClass),
+                NULL,       /* base_init */
+                NULL,       /* base_finalize */
+                (GClassInitFunc) hildon_color_selector_class_init,
+                NULL,       /* class_finalize */
+                NULL,       /* class_data */
+                sizeof(HildonColorSelector),
+                0,  /* n_preallocs */
+                (GInstanceInitFunc) hildon_color_selector_init,
+            };
+        selector_type = g_type_register_static(GTK_TYPE_DIALOG,
+                                               "HildonColorSelector",
+                                               &selector_info, 0);
+    }
+    return selector_type;
+}
+
+static void
+hildon_color_selector_destroy(GtkObject *obj)
+{
+  HildonColorSelectorPriv *priv = HILDON_COLOR_SELECTOR(obj)->priv;
+
+  if (priv->client)
+  {
+    gconf_client_notify_remove(priv->client, priv->notify_id);
+    g_object_unref(priv->client);
+    priv->client = NULL;
+  }
+
+  GTK_OBJECT_CLASS(parent_class)->destroy(obj);
+}
+
+static void
+hildon_color_selector_class_init(HildonColorSelectorClass * selector_class)
+{
+    parent_class = g_type_class_peek_parent(selector_class);
+    
+    g_type_class_add_private(selector_class,
+                             sizeof(HildonColorSelectorPriv));
+
+    GTK_OBJECT_CLASS(selector_class)->destroy = hildon_color_selector_destroy;
+}
+
+
+/**
+ * hildon_color_selector_new:
+ * @parent:  The parent window. The X window ID of the parent window
+ *           has to be the same as the X window ID of the application.
+ * @returns: new #HildonColorSelector.
+ *
+ * Creates a new #HildonColorSelector dialog with 3x8 layout of 
+ * Windows base colors and 'OK', 'More..' and 'Cancel' buttons.
+ **/
+GtkWidget *hildon_color_selector_new(GtkWindow * parent)
+{
+    GtkWidget *dialog = g_object_new(HILDON_TYPE_COLOR_SELECTOR, NULL);
+
+    g_assert(dialog);
+
+    if (parent) 
+    {
+        gtk_window_set_transient_for(GTK_WINDOW(dialog), parent);
+    }
+
+    return dialog;
+}
+
+static void
+hildon_color_selector_set_custom_colors(
+  HildonColorSelector *selector,
+  GConfValue *value)
+{
+  GSList *list;
+  int i;
+
+  g_assert(HILDON_IS_COLOR_SELECTOR(selector));
+
+  /* We have to be really carefull. At least gconftool's
+     stress test can generate pretty ugly value setups */
+  if (value == NULL || value->type != GCONF_VALUE_LIST ||
+    gconf_value_get_list_type(value) != GCONF_VALUE_STRING)
+    list = NULL;
+  else
+    list = gconf_value_get_list(value);
+
+  for ( i = 0; i < HILDON_CUSTOM_COLOR_NUM; ++i)
+  {
+    const gchar *color_string = NULL;
+
+    if (list) {
+      color_string = gconf_value_get_string(list->data);
+      list = list->next;
+    } else {
+      color_string = "#FFFFFF";
+    }
+
+/*    g_print("custom_color: %s\n", color_string);  */
+
+    selector->priv->color[i].pixel = 0;
+    gdk_color_parse (color_string, 
+       &(selector->priv->color[HILDON_BASE_COLOR_NUM+i]));
+  }
+}
+
+static void
+gconf_notify_func(GConfClient *client,
+                             guint cnxn_id,
+                             GConfEntry *entry,
+                             gpointer data)
+{
+  hildon_color_selector_set_custom_colors(HILDON_COLOR_SELECTOR(data), 
+    gconf_entry_get_value(entry));
+  gtk_widget_queue_draw(GTK_WIDGET(data));
+}
+
+static void 
+hildon_color_selector_init(HildonColorSelector * selector)
+{
+    guint i;
+    GtkWidget *hbox;
+    GConfValue *value;
+
+    /* 16 standard Windows colors */
+    static char *base_colours[HILDON_BASE_COLOR_NUM] = {
+        "#000000", "#FFFFFF", "#FF0000", "#660000", "#0000FF", "#000066",
+        "#FF33FF", "#660066", "#33CC33", "#006600", "#FFCC00", "#CC9900",
+        "#999999", "#666666", "#00CCCC", "#006666"
+    };
+
+    selector->priv =
+        G_TYPE_INSTANCE_GET_PRIVATE(selector,
+                                    HILDON_TYPE_COLOR_SELECTOR,
+                                    HildonColorSelectorPriv);
+    
+    /*  ***********test GConf***********   */
+    selector->priv->client = gconf_client_get_default ();
+    gconf_client_set_error_handling (selector->priv->client, 
+      GCONF_CLIENT_HANDLE_UNRETURNED);
+    
+    /* Add our directory to the list of directories the GConfClient will
+       watch. */
+    gconf_client_add_dir (selector->priv->client, HILDON_COLOR_GCONF_PATH,
+                              GCONF_CLIENT_PRELOAD_NONE,
+                              NULL);
+    
+    value = gconf_client_get(selector->priv->client, 
+      HILDON_COLOR_GCONF_KEYS, NULL);    
+
+    hildon_color_selector_set_custom_colors(selector, value);    
+
+    if (value) {
+      gconf_value_free(value);
+    }
+    
+    /* Listen to changes to our key. */
+    selector->priv->notify_id = gconf_client_notify_add (selector->priv->client, 
+        HILDON_COLOR_GCONF_KEYS, gconf_notify_func, selector, NULL, NULL); 
+
+    /* ************************************  */
+
+    selector->priv->index = GREYIND;
+    
+    /* init base colors for color boxes */
+    for (i = 0; i < HILDON_BASE_COLOR_NUM; ++i) 
+    {
+        selector->priv->color[i].pixel = 0;
+        gdk_color_parse (base_colours[i], &(selector->priv->color[i]));
+    }
+    
+    gtk_dialog_set_has_separator(GTK_DIALOG(selector), FALSE);
+
+    /* create drawing area */
+    hbox = gtk_hbox_new(TRUE, 0);
+    selector->priv->drawing_area = gtk_drawing_area_new();
+    
+    /* receive focus from dialog buttons */
+    GTK_WIDGET_SET_FLAGS (selector->priv->drawing_area, GTK_CAN_FOCUS);
+
+    gtk_widget_add_events (selector->priv->drawing_area,
+                          GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK);
+
+    gtk_widget_set_size_request (selector->priv->drawing_area,
+                                 (HILDON_COLOR_SELECTOR_BOX_W *
+                                  HILDON_COLOR_SELECTOR_COLS) +
+                                 (HILDON_COLOR_SELECTOR_BOX_BORDER *
+                                  2*HILDON_COLOR_SELECTOR_COLS),
+                                 (HILDON_COLOR_SELECTOR_BOX_H *
+                                  HILDON_COLOR_SELECTOR_ROWS) +
+                                 HILDON_COLOR_SELECTOR_BOX_BORDER *
+                                 2 * HILDON_COLOR_SELECTOR_ROWS);
+
+    gtk_box_pack_start (GTK_BOX(GTK_DIALOG(selector)->vbox), 
+                       hbox, FALSE, FALSE, 0);
+    gtk_box_pack_start (GTK_BOX(hbox), selector->priv->drawing_area,
+                       FALSE, FALSE, 0);
+
+    g_signal_connect (selector->priv->drawing_area, "expose_event",
+                      G_CALLBACK(hildon_color_selector_expose), selector);
+    g_signal_connect (selector->priv->drawing_area, "button_press_event", 
+                      G_CALLBACK(color_pressed), selector);
+    g_signal_connect (selector->priv->drawing_area, "motion-notify-event", 
+                      G_CALLBACK(color_moved), selector);
+    g_signal_connect (selector, "key-press-event",
+                      G_CALLBACK(key_pressed), selector);
+
+
+    gtk_dialog_add_button (GTK_DIALOG(selector), 
+                           _("ecdg_bd_colour_selector_ok"), GTK_RESPONSE_OK);
+    gtk_dialog_add_button (GTK_DIALOG(selector),
+                           _("ecdg_ti_5bit_colour_selector"),
+                           HILDON_MORE_BUTTON_RESPONSE);
+    gtk_dialog_add_button (GTK_DIALOG(selector),
+                           _("ecdg_bd_colour_selector_cancel"),
+                           GTK_RESPONSE_CANCEL);
+
+    gtk_dialog_set_default_response (GTK_DIALOG(selector), GTK_RESPONSE_OK);
+    
+    g_signal_connect (G_OBJECT(selector), "response",
+                      G_CALLBACK(hildon_color_selector_response), selector);
+
+    gtk_window_set_title ( GTK_WINDOW(selector),  
+                          _("ecdg_ti_colour_selector") );
+    gtk_widget_show_all (GTK_DIALOG(selector)->vbox);
+}
+
+static gboolean 
+hildon_color_selector_expose(GtkWidget * widget,
+                             GdkEventExpose * event,
+                             gpointer data)
+{
+    HildonColorSelector *selector;
+    GdkColor color;
+    GdkGC *gc;
+    gint x, y;
+
+    g_return_val_if_fail (GTK_IS_WIDGET(widget), FALSE);
+    g_return_val_if_fail (event, FALSE);
+    g_return_val_if_fail (HILDON_IS_COLOR_SELECTOR(data), FALSE);
+
+    if (!GTK_WIDGET_DRAWABLE(widget))
+      return FALSE;
+
+    selector = HILDON_COLOR_SELECTOR(data);
+    gc = gdk_gc_new (widget->window); 
+
+    /* draw the color boxes and a focus for one of them */
+    for (x = 0; x < HILDON_COLOR_SELECTOR_COLS; ++x) 
+    {
+        for (y = 0; y < HILDON_COLOR_SELECTOR_ROWS; ++y) 
+        {
+            color.pixel = color.red = color.green = color.blue = 0;
+            gdk_gc_set_rgb_fg_color(gc, &color);
+
+            /* focus around the selected color box */
+            if ( (y * HILDON_COLOR_SELECTOR_COLS + x) ==
+                 selector->priv->index) 
+            {
+                /* focus box */
+                gdk_draw_rectangle(widget->window, gc, TRUE,
+                                   (HILDON_COLOR_SELECTOR_BOX_BORDER * 2 +
+                                    HILDON_COLOR_SELECTOR_BOX_W) * x,
+                                   (HILDON_COLOR_SELECTOR_BOX_BORDER * 2 +
+                                    HILDON_COLOR_SELECTOR_BOX_H) * y,
+                                   HILDON_COLOR_SELECTOR_BOX_W +
+                                   HILDON_COLOR_SELECTOR_BOX_BORDER * 2,
+                                   HILDON_COLOR_SELECTOR_BOX_H +
+                                   HILDON_COLOR_SELECTOR_BOX_BORDER * 2); 
+            }
+            
+            /* frames on color box */
+            gdk_draw_rectangle(widget->window, gc, FALSE,
+                               (HILDON_COLOR_SELECTOR_BOX_BORDER * 2 +
+                                HILDON_COLOR_SELECTOR_BOX_W) * x + 1,
+                               (HILDON_COLOR_SELECTOR_BOX_BORDER * 2 +
+                                HILDON_COLOR_SELECTOR_BOX_H) * y + 1,
+                               HILDON_COLOR_SELECTOR_BOX_W + 1,
+                               HILDON_COLOR_SELECTOR_BOX_H + 1);
+            
+            gdk_gc_set_rgb_fg_color(gc, 
+              &(selector->priv->color[y * HILDON_COLOR_SELECTOR_COLS + x]));
+
+            /* color box */
+            gdk_draw_rectangle(widget->window, gc,
+                               TRUE,    /* filled */
+                               HILDON_COLOR_SELECTOR_BOX_BORDER +
+                               (HILDON_COLOR_SELECTOR_BOX_BORDER * 2 +
+                                HILDON_COLOR_SELECTOR_BOX_W) * x,
+                               HILDON_COLOR_SELECTOR_BOX_BORDER +
+                               (HILDON_COLOR_SELECTOR_BOX_BORDER * 2 +
+                                HILDON_COLOR_SELECTOR_BOX_H) * y,
+                               HILDON_COLOR_SELECTOR_BOX_W,
+                               HILDON_COLOR_SELECTOR_BOX_H);
+        }
+    }
+
+    g_object_unref(gc);
+    return TRUE;
+}
+
+/**
+ * hildon_color_selector_get_color:
+ * @selector: a #HildonColorSelector
+ * 
+ * Gets the currently selected base color as #GdkColor.
+ * 
+ * Returns: A copy of the currently selected #GdkColor.
+ */
+GdkColor *hildon_color_selector_get_color(HildonColorSelector * selector)
+{
+    g_return_val_if_fail(HILDON_IS_COLOR_SELECTOR(selector), NULL);    
+    return &(selector->priv->color[selector->priv->index]);
+}
+
+/**
+ * hildon_color_selector_set_color:
+ * @selector: #HildonColorSelector
+ * @color: #Gdkcolor to set.
+ * 
+ * Select the color specified. Does nothing if the color does not 
+ * exists among the standard colors.
+ */
+void hildon_color_selector_set_color(HildonColorSelector * selector,
+                                     GdkColor * color)
+{
+    gint i;
+
+    g_return_if_fail(HILDON_IS_COLOR_SELECTOR(selector));
+    g_return_if_fail(color);
+
+    for (i = 0; 
+         i < (HILDON_BASE_COLOR_NUM + HILDON_CUSTOM_COLOR_NUM);
+         ++i) 
+    {
+        if (selector->priv->color[i].red   == color->red &&
+            selector->priv->color[i].green == color->green &&
+            selector->priv->color[i].blue  == color->blue) 
+        {
+            selector->priv->index = i;
+            gtk_widget_queue_draw(selector->priv->drawing_area);
+            break;
+        }
+    }
+}
+
+static gboolean
+color_pressed(GtkWidget * widget, GdkEventButton * event,
+              gpointer user_data)
+{
+    select_color(HILDON_COLOR_SELECTOR(user_data), event->x, event->y);
+    return TRUE;
+}
+
+static gboolean key_pressed(GtkWidget * widget,
+                            GdkEventKey * event, gpointer user_data)
+{
+    HildonColorSelector *selector;
+    gint index;
+
+    g_return_val_if_fail(widget, FALSE);
+    g_return_val_if_fail(user_data, FALSE);
+
+    selector = HILDON_COLOR_SELECTOR(user_data);
+    index = selector->priv->index;
+
+    /* if dialog buttons has the focus */
+    if (GTK_WIDGET_HAS_FOCUS(selector->priv->drawing_area) == FALSE)
+        return FALSE;
+
+    /* go for if available index otherwise stop keypress handler because
+       wrapping around is not allowed. */
+    switch (event->keyval) {
+    case GDK_KP_Right:
+    case GDK_Right:
+        if (index == (HILDON_BASE_COLOR_NUM + HILDON_CUSTOM_COLOR_NUM - 1)
+            || index == (HILDON_CUSTOM_COLOR_NUM - 1)
+            || index == (2*HILDON_CUSTOM_COLOR_NUM - 1)) 
+        {
+            return TRUE;
+        }
+        index++;
+        break;
+    case GDK_KP_Left:
+    case GDK_Left:
+        if (index == 0 
+            || index == (HILDON_CUSTOM_COLOR_NUM)
+            || index == (2*HILDON_CUSTOM_COLOR_NUM)) 
+        {
+            return TRUE;
+        }
+        index--;
+        break;
+    case GDK_KP_Up:
+    case GDK_Up:
+        if (index > (HILDON_COLOR_SELECTOR_COLS - 1)) 
+        {
+            index -= HILDON_COLOR_SELECTOR_COLS;
+        } 
+        else 
+        {
+            return FALSE;
+        }
+        break;
+    case GDK_KP_Down:
+    case GDK_Down:
+        if (index < (HILDON_COLOR_SELECTOR_COLS + HILDON_CUSTOM_COLOR_NUM)) 
+        {
+            index += HILDON_COLOR_SELECTOR_COLS;  
+        } 
+        else 
+        {
+            return FALSE;
+        }
+        break;
+    default:
+        return FALSE;
+    }
+
+    if (index < (HILDON_BASE_COLOR_NUM + HILDON_CUSTOM_COLOR_NUM)) 
+    {
+        selector->priv->index = index;
+    } 
+    else 
+    {
+        selector->priv->index = 
+            HILDON_BASE_COLOR_NUM + HILDON_CUSTOM_COLOR_NUM - 1;
+    }
+    
+    gtk_widget_queue_draw(selector->priv->drawing_area);
+    
+    return TRUE;
+}
+
+static void
+select_color(HildonColorSelector * selector, int event_x, int event_y)
+{
+    gint x, y;
+
+    g_return_if_fail(HILDON_IS_COLOR_SELECTOR(selector));
+
+    x = ( (event_x - HILDON_COLOR_SELECTOR_BOX_BORDER) /
+          (HILDON_COLOR_SELECTOR_BOX_BORDER * 2 +
+           HILDON_COLOR_SELECTOR_BOX_W)
+        );
+    y = ( (event_y -
+           HILDON_COLOR_SELECTOR_BOX_BORDER) /
+          (HILDON_COLOR_SELECTOR_BOX_BORDER * 2 +
+           HILDON_COLOR_SELECTOR_BOX_H)
+        );
+
+    if (x > (HILDON_COLOR_SELECTOR_COLS + HILDON_CUSTOM_COLOR_NUM - 1)) 
+    {
+        x = HILDON_COLOR_SELECTOR_COLS + HILDON_CUSTOM_COLOR_NUM - 1;
+    } 
+    else if (x < 0) 
+    {
+        x = 0;
+    }
+    if (y > (HILDON_COLOR_SELECTOR_ROWS - 1)) 
+    {
+        y = HILDON_COLOR_SELECTOR_ROWS - 1;
+    } 
+    else if (y < 0) 
+    {
+        y = 0;
+    }
+    
+    selector->priv->index = (x + y * HILDON_COLOR_SELECTOR_COLS);
+    
+    gtk_widget_queue_draw(selector->priv->drawing_area);
+}
+
+static gboolean
+color_moved(GtkWidget * widget, GdkEventMotion * event, gpointer data)
+{
+    if ( event->state &
+         (GDK_BUTTON1_MASK | GDK_BUTTON2_MASK | GDK_BUTTON3_MASK) ) 
+    {
+        select_color(HILDON_COLOR_SELECTOR(data), event->x, event->y);
+        return TRUE;
+    }
+    return FALSE;
+}
+
+static void 
+hildon_color_selector_response(GtkWidget * widget,
+                               gint response_id, 
+                               gpointer data)
+{
+    HildonColorSelector * colselector;
+    HildonColorPopup popupdata;
+    GtkWidget *popup;
+
+    g_return_if_fail (HILDON_IS_COLOR_SELECTOR(data));
+
+    if (response_id != HILDON_MORE_BUTTON_RESPONSE)
+        return;
+
+    g_signal_stop_emission_by_name (widget, "response");
+    colselector = HILDON_COLOR_SELECTOR(data);
+
+    popup = hildon_color_popup_new(GTK_WINDOW(GTK_WIDGET(colselector)->window), 
+                   hildon_color_selector_get_color(colselector), &popupdata);
+    
+    if ( gtk_dialog_run(GTK_DIALOG(popup) ) == GTK_RESPONSE_OK) 
+    {        
+      GdkColor *color;
+
+      /* We cannot modify a base color */
+      if (colselector->priv->index < HILDON_BASE_COLOR_NUM)
+      {
+        colselector->priv->color[HILDON_TOTAL_COLOR_NUM] = 
+          colselector->priv->color[colselector->priv->index];
+        colselector->priv->index = HILDON_TOTAL_COLOR_NUM;
+      }
+
+      color = hildon_color_selector_get_color(colselector);
+      hildon_color_popup_set_color_from_sliders(color, &popupdata);
+
+      /* If we modified a base color we just accept the dialog */      
+      if( colselector->priv->index >=  HILDON_TOTAL_COLOR_NUM)
+      {          
+        gtk_dialog_response(GTK_DIALOG(colselector), GTK_RESPONSE_OK); 
+      }
+      else /* If we mofied custom colors we have to save to gconf */
+      {
+        GConfValue *value;
+        GSList * list;
+        int i;  
+
+        value = gconf_value_new(GCONF_VALUE_LIST);
+        gconf_value_set_list_type(value, GCONF_VALUE_STRING);
+        list = NULL;
+
+        for ( i = HILDON_BASE_COLOR_NUM; i < HILDON_TOTAL_COLOR_NUM; i++) 
+        {
+            GConfValue *item;
+            char buffer[32];
+                  
+            g_snprintf(buffer, sizeof(buffer), "#%.2X%.2X%.2X",
+                            (colselector->priv->color[i].red>>8)&0xFF,
+                            (colselector->priv->color[i].green>>8)&0xFF,
+                            (colselector->priv->color[i].blue>>8)&0xFF ); 
+  
+            item = gconf_value_new(GCONF_VALUE_STRING);
+            gconf_value_set_string(item, buffer);
+            list = g_slist_append (list, item);
+        } 
+        
+        gconf_value_set_list_nocopy(value, list);
+
+        /* gconf client handles the possible error */
+        gconf_client_set(colselector->priv->client, 
+          HILDON_COLOR_GCONF_KEYS, value, NULL);
+    
+        gconf_value_free(value);
+      }  
+    }
+
+    gtk_widget_destroy (popup); 
+    gtk_window_present (GTK_WINDOW(colselector));
+}
diff --git a/hildon-widgets/hildon-color-selector.h b/hildon-widgets/hildon-color-selector.h
new file mode 100644 (file)
index 0000000..6777148
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __HILDON_COLOR_SELECTOR_H__
+#define __HILDON_COLOR_SELECTOR_H__
+
+#include <gtk/gtkcontainer.h>
+#include <gtk/gtkwindow.h>
+#include <gtk/gtkdialog.h>
+
+G_BEGIN_DECLS
+#define HILDON_TYPE_COLOR_SELECTOR \
+  ( hildon_color_selector_get_type() )
+#define HILDON_COLOR_SELECTOR(obj) \
+  (GTK_CHECK_CAST (obj, HILDON_TYPE_COLOR_SELECTOR, HildonColorSelector))
+#define HILDON_COLOR_SELECTOR_CLASS(klass) \
+  (GTK_CHECK_CLASS_CAST ((klass), HILDON_TYPE_COLOR_SELECTOR,\
+   HildonColorSelectorClass))
+#define HILDON_IS_COLOR_SELECTOR(obj) \
+  (GTK_CHECK_TYPE (obj, HILDON_TYPE_COLOR_SELECTOR))
+#define HILDON_IS_COLOR_SELECTOR_CLASS(klass) \
+  (GTK_CHECK_CLASS_TYPE ((klass), HILDON_COLOR_SELECTOR_CLASS))
+    GType hildon_color_selector_get_type(void);
+
+typedef struct _HildonColorSelector HildonColorSelector;
+typedef struct _HildonColorSelectorClass HildonColorSelectorClass;
+
+/**
+ * HildonColorSelectorPriv:
+ *
+ * Internal struct for color selector.
+ */
+typedef struct _HildonColorSelectorPriv HildonColorSelectorPriv;
+
+struct _HildonColorSelector {
+    GtkDialog parent;
+    HildonColorSelectorPriv *priv;
+};
+
+struct _HildonColorSelectorClass {
+    GtkDialogClass parent_class;
+};
+
+GtkWidget *hildon_color_selector_new(GtkWindow * parent);
+GdkColor *hildon_color_selector_get_color(HildonColorSelector * selector);
+void hildon_color_selector_set_color(HildonColorSelector * selector,
+                                     GdkColor * color);
+
+G_END_DECLS
+#endif
diff --git a/hildon-widgets/hildon-composite-widget.c b/hildon-widgets/hildon-composite-widget.c
new file mode 100644 (file)
index 0000000..b4cb5ce
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+#include <gtk/gtkwidget.h>
+#include <gtk/gtkwindow.h>
+#include "hildon-composite-widget.h"
+
+gboolean
+hildon_composite_widget_focus( GtkWidget *widget, GtkDirectionType direction )
+{
+  GtkWidget *toplevel = NULL;
+  GtkWidget *focus_widget = NULL;
+  
+  toplevel = gtk_widget_get_toplevel(widget);
+  if( !GTK_IS_WINDOW(toplevel) )
+    return GTK_WIDGET_CLASS(g_type_class_peek_parent(
+                     GTK_WIDGET_GET_CLASS(widget)))->focus( widget, direction );
+
+  focus_widget = GTK_WINDOW(toplevel)->focus_widget;  
+
+  if( !gtk_widget_is_ancestor( focus_widget, widget ) )
+    /* Containers grab_focus grabs the focus to the correct widget */
+    gtk_widget_grab_focus( widget );
+  else
+    return GTK_WIDGET_CLASS(g_type_class_peek_parent(
+                     GTK_WIDGET_GET_CLASS(widget)))->focus( widget, direction );
+
+  return TRUE;
+}
diff --git a/hildon-widgets/hildon-composite-widget.h b/hildon-widgets/hildon-composite-widget.h
new file mode 100644 (file)
index 0000000..363cd12
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/**
+ * @file
+ *
+ * Hildon composite widget includes all features which were not fitting into
+ * the any current class. A new, separate widget was not created because of the 
+ * amount of current features is low. Need for this kind of class was not known 
+ * when the building of the class hierarchy began. When a new feature is added, 
+ * need for a new class should be re-considered. To make this decision one 
+ * should really consider all the common features which are needed in the 
+ * hildon composite widgets. Class position (for hildon-composite-widget)
+ * in the class hierarchy is between GtkContainer and any composite widget.
+ *
+ */
+
+#ifndef __HILDON_COMPOSITE_WIDGET__
+#define __HILDON_COMPOSITE_WIDGET__
+
+
+G_BEGIN_DECLS
+
+
+gboolean
+hildon_composite_widget_focus( GtkWidget *widget, GtkDirectionType direction );
+       
+
+G_END_DECLS
+
+
+#endif /*__HILDON_COMPOSITE_WIDGET__*/
diff --git a/hildon-widgets/hildon-controlbar.c b/hildon-widgets/hildon-controlbar.c
new file mode 100644 (file)
index 0000000..e243d90
--- /dev/null
@@ -0,0 +1,638 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/*
+ * @file hildon-caption-control.c
+ *
+ * This file contains the implementation of Hildon Caption Control
+ *
+ */
+
+#include <math.h>
+#include <gdk/gdk.h>
+#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
+#include "hildon-controlbar.h"
+
+#include <libintl.h>
+#define _(String) gettext(String)
+
+#define HILDON_CONTROLBAR_GET_PRIVATE(obj) \
+    (G_TYPE_INSTANCE_GET_PRIVATE ((obj),\
+     HILDON_TYPE_CONTROLBAR, HildonControlbarPrivate));
+
+#define DEFAULT_WIDTH 234
+#define DEFAULT_HEIGHT 30
+#define DEFAULT_BORDER_WIDTH 2
+
+#define HILDON_CONTROLBAR_STEP_INCREMENT 1
+#define HILDON_CONTROLBAR_PAGE_INCREMENT 1
+#define HILDON_CONTROLBAR_PAGE_SIZE 0
+#define HILDON_CONTROLBAR_UPPER_VALUE  10
+#define HILDON_CONTROLBAR_LOWER_VALUE 0.0
+#define HILDON_CONTROLBAR_INITIAL_VALUE 0
+
+static GtkScaleClass *parent_class;
+
+typedef struct _HildonControlbarPrivate HildonControlbarPrivate;
+
+static void
+hildon_controlbar_class_init(HildonControlbarClass * controlbar_class);
+static void hildon_controlbar_init(HildonControlbar * controlbar);
+static GObject *
+hildon_controlbar_constructor(GType type, guint n_construct_properties, 
+  GObjectConstructParam *construct_properties);
+
+static gint hildon_controlbar_button_press_event(GtkWidget * widget,
+                                                 GdkEventButton * event);
+static gint hildon_controlbar_button_release_event(GtkWidget * widget,
+                                                   GdkEventButton * event);
+static gint
+hildon_controlbar_expose_event(GtkWidget * widget, GdkEventExpose * event);
+static void
+hildon_controlbar_size_request(GtkWidget * self, GtkRequisition * req);
+static void
+hildon_controlbar_paint(HildonControlbar * self, GdkRectangle * area);
+static gboolean
+hildon_controlbar_keypress(GtkWidget * widget, GdkEventKey * event);
+
+static void
+hildon_controlbar_value_changed( GtkAdjustment *adj, GtkRange *range );
+
+GType hildon_controlbar_get_type(void)
+{
+    static GType controlbar_type = 0;
+
+    if (!controlbar_type) {
+        static const GTypeInfo controlbar_info = {
+            sizeof(HildonControlbarClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_controlbar_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonControlbar),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_controlbar_init,
+        };
+        controlbar_type = g_type_register_static(GTK_TYPE_SCALE,
+                                                 "HildonControlbar",
+                                                 &controlbar_info, 0);
+    }
+    return controlbar_type;
+}
+
+struct _HildonControlbarPrivate {
+    gboolean button_press;
+    gint old_value;
+};
+
+static void
+hildon_controlbar_class_init(HildonControlbarClass * controlbar_class)
+{
+  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(controlbar_class);
+
+  parent_class = g_type_class_peek_parent(controlbar_class);
+
+  g_type_class_add_private(controlbar_class,
+                           sizeof(HildonControlbarPrivate));
+
+  widget_class->size_request = hildon_controlbar_size_request;
+  widget_class->button_press_event = hildon_controlbar_button_press_event;
+  widget_class->button_release_event = hildon_controlbar_button_release_event;
+  widget_class->expose_event = hildon_controlbar_expose_event;
+  widget_class->key_press_event = hildon_controlbar_keypress;
+  G_OBJECT_CLASS(controlbar_class)->constructor = hildon_controlbar_constructor;
+
+  gtk_widget_class_install_style_property(widget_class,
+                                 g_param_spec_uint("inner_border_width",
+                                                   "Inner border width",
+                                                   "The border spacing between the controlbar border and controlbar blocks.",
+                                                   0, G_MAXINT,
+                                                   DEFAULT_BORDER_WIDTH,
+                                                   G_PARAM_READABLE));
+}
+
+static void hildon_controlbar_init(HildonControlbar * controlbar)
+{
+    GtkRange *range;
+    HildonControlbarPrivate *priv;
+
+    priv = HILDON_CONTROLBAR_GET_PRIVATE(controlbar);
+    priv->button_press = FALSE;
+    priv->old_value = 0;
+    range = GTK_RANGE(controlbar);
+
+    range->has_stepper_a = TRUE;
+    range->has_stepper_d = TRUE;
+    range->round_digits = -1;
+    
+    gtk_widget_set_size_request( GTK_WIDGET(controlbar), DEFAULT_WIDTH,
+                                 DEFAULT_HEIGHT );
+}
+
+static GObject *hildon_controlbar_constructor(GType type, 
+  guint n_construct_properties, GObjectConstructParam *construct_properties)
+{
+  GObject *obj;
+  GtkAdjustment *adj;  
+
+  obj = G_OBJECT_CLASS(parent_class)->constructor(type, 
+    n_construct_properties, construct_properties);
+   
+  gtk_scale_set_draw_value (GTK_SCALE (obj), FALSE);
+
+  adj = GTK_RANGE(obj)->adjustment;
+  adj->step_increment = HILDON_CONTROLBAR_STEP_INCREMENT;
+  adj->page_increment = HILDON_CONTROLBAR_PAGE_INCREMENT;
+  adj->page_size = HILDON_CONTROLBAR_PAGE_SIZE;
+  adj->upper = HILDON_CONTROLBAR_UPPER_VALUE;
+  adj->lower = HILDON_CONTROLBAR_LOWER_VALUE;
+  adj->value = HILDON_CONTROLBAR_INITIAL_VALUE;
+  g_signal_connect( adj, "value-changed", 
+                    G_CALLBACK(hildon_controlbar_value_changed), obj );
+  return obj;
+}
+
+static void
+hildon_controlbar_value_changed( GtkAdjustment *adj, GtkRange *range )
+{
+  HildonControlbarPrivate *priv = HILDON_CONTROLBAR_GET_PRIVATE(range);
+
+  if( ABS(ceil(range->adjustment->value) - priv->old_value) >= 1 )
+  {
+    priv->old_value = ceil(range->adjustment->value);
+    range->adjustment->value = priv->old_value;
+  }
+  else
+    g_signal_stop_emission_by_name( range->adjustment, "value-changed" );
+  gtk_adjustment_set_value( range->adjustment, priv->old_value );
+}
+
+/**
+ * hildon_controlbar_new:
+ * 
+ * Creates a new #HildonControlbar widget.
+ *
+ * Return value: A #GtkWidget pointer of newly created #HildonControlbar
+ * widget.
+ */
+GtkWidget *hildon_controlbar_new(void)
+{
+    return GTK_WIDGET(g_object_new(HILDON_TYPE_CONTROLBAR, NULL));
+}
+
+static gboolean
+hildon_controlbar_keypress(GtkWidget * widget, GdkEventKey * event)
+{
+    if (event->keyval == GDK_Up || event->keyval == GDK_Down)
+        return FALSE;
+    return ((GTK_WIDGET_CLASS(parent_class)->key_press_event) (widget, event));
+}
+
+static void
+hildon_controlbar_size_request(GtkWidget * self, GtkRequisition * req)
+{
+    if (GTK_WIDGET_CLASS(parent_class)->size_request)
+        GTK_WIDGET_CLASS(parent_class)->size_request(self, req);
+
+    req->width = DEFAULT_WIDTH;
+    req->height = DEFAULT_HEIGHT;
+}
+
+/**
+ * hildon_controlbar_set_value:
+ * @self: Pointer to #HildonControlbar
+ * @value: Value in range of >= 0 && < G_MAX_INT
+ *
+ * This method will change #HildonControlbar current value
+ * to the given value.
+ */
+void hildon_controlbar_set_value(HildonControlbar * self, gint value)
+{
+    GtkAdjustment *adj;
+    g_return_if_fail (HILDON_IS_CONTROLBAR (self));
+    adj = GTK_RANGE(self)->adjustment;
+    g_return_if_fail(value >= 0);
+
+    if (value >= adj->upper)
+        value = adj->upper;
+    else if (value <= adj->lower)
+        value = adj->lower;
+
+    adj->value = value;
+    gtk_adjustment_value_changed(adj);
+}
+
+/**
+ * hildon_controlbar_get_value:
+ * @self: Pointer to #HildonControlbar
+ *
+ * Accessor method for getting controlbars current value
+ *
+ * Return value: Current value as gint.
+ */
+gint hildon_controlbar_get_value(HildonControlbar * self)
+{
+    GtkAdjustment *adj;
+    g_return_val_if_fail (HILDON_IS_CONTROLBAR (self), 0);
+    adj = GTK_RANGE(self)->adjustment;
+  
+    return (gint) ceil(adj->value);
+}
+
+/**
+ * hildon_controlbar_set_max:
+ * @self: Pointer to #HildonControlbar
+ * @max: Maximum value to set. The value needs to be
+ * in range of > 0 && <= G_MAX_INT.
+ * If the new maximum is smaller than current value,
+ * the value will be adjusted so that
+ * it equals the new maximum.
+ *
+ * Accessor method for setting #HildonControlbar maximum to the
+ * given value.
+ **/
+void hildon_controlbar_set_max(HildonControlbar * self, gint max)
+{
+    GtkAdjustment *adj;
+    g_return_if_fail (HILDON_IS_CONTROLBAR (self));
+    adj = GTK_RANGE(self)->adjustment;
+
+    if (max < adj->lower)
+        return;
+    else if( max == adj->lower )
+      gtk_widget_set_sensitive( GTK_WIDGET(self), FALSE );
+    else
+      gtk_widget_set_sensitive( GTK_WIDGET(self), TRUE );
+    
+    if (adj->value > max)
+        adj->value = max;
+
+    adj->upper = max;
+    gtk_adjustment_changed(adj);
+}
+
+/**
+ * hildon_controlbar_set_min:
+ * @self: Pointer to #HildonControlbar
+ * @min: Minimum value to set. The value needs to be
+ * in range of => 0 && <= G_MAX_INT.
+ * If the new minimum is smaller than current value,
+ * the value will be adjusted so that
+ * it equals the new minimum.
+ *
+ * Accessor method for setting #HildonControlbar minimum to the
+ * given value.
+ **/
+void hildon_controlbar_set_min(HildonControlbar * self, gint min)
+{
+    GtkAdjustment *adj;
+    g_return_if_fail (HILDON_IS_CONTROLBAR (self));
+    adj = GTK_RANGE(self)->adjustment;
+
+    if (min < 0 || min >= adj->upper)
+        return;
+    else if( min == adj->upper )
+      gtk_widget_set_sensitive( GTK_WIDGET(self), FALSE );
+    else
+      gtk_widget_set_sensitive( GTK_WIDGET(self), TRUE );
+    
+    if (adj->value > min)
+        adj->value = min;
+
+    adj->lower = min;
+    gtk_adjustment_changed(adj);
+}
+
+/**
+ * hildon_controlbar_set_range:
+ * @self: Pointer to #HildonControlbar
+ * @max: Maximum value to set. The value needs to be
+ * in range of > 0 && <= G_MAX_INT.
+ * @min: Minimum value to set. The value needs to be
+ * in range of => 0 && <= G_MAX_INT.
+ * If the new maximum is smaller than current value,
+ * the value will be adjusted so that
+ * it equals the new maximum.
+ * If the new minimum is smaller than current value,
+ * the value will be adjusted so that
+ * it equals the new minimum.
+ *
+ * Accessor method for setting #HildonControlbar maximum to the
+ * given value.
+ **/
+void hildon_controlbar_set_range(HildonControlbar * self, gint min,
+                                 gint max)
+{
+    GtkAdjustment *adj;
+    g_return_if_fail (HILDON_IS_CONTROLBAR (self));
+    adj = GTK_RANGE(self)->adjustment;
+
+    if (min < 0 || min >= max)
+        return;
+
+    if (adj->value > max)
+        adj->value = max;
+
+    adj->upper = max;
+    adj->lower = min;
+    
+    if( adj->upper == adj->lower )
+       gtk_widget_set_sensitive( GTK_WIDGET(self), FALSE );
+    else
+      gtk_widget_set_sensitive( GTK_WIDGET(self), TRUE );
+
+    gtk_adjustment_changed(adj);
+}
+
+/**
+ * hildon_controlbar_get_max:
+ * @self: A pointer to #HildonControlbar
+ *
+ * Accessor method for getting controlbars current maximum value
+ *
+ * Return value: Maximum value as gint
+ */
+gint hildon_controlbar_get_max(HildonControlbar * self)
+{
+    GtkAdjustment *adj;
+    g_return_val_if_fail (HILDON_IS_CONTROLBAR (self), 0);
+    adj = GTK_RANGE(self)->adjustment;
+
+    return (gint) adj->upper;
+}
+
+/**
+ * hildon_controlbar_get_min:
+ * @self: A pointer to #HildonControlbar
+ *
+ * Accessor method for getting controlbars current minimum value
+ *
+ * Return value: Minimum value as gint
+ */
+gint hildon_controlbar_get_min(HildonControlbar * self)
+{
+    GtkAdjustment *adj = GTK_RANGE(self)->adjustment;
+    return (gint) adj->lower;
+}
+
+/*
+ * Event handler for button press
+ * Need to change button1 to button2 before passing this event to
+ * parent handler. (see specs)
+ * Also updates button_press variable so that we can draw hilites
+ * correctly
+ */
+static gint hildon_controlbar_button_press_event(GtkWidget * widget,
+                                                 GdkEventButton * event)
+{
+    HildonControlbar *self;
+    HildonControlbarPrivate *priv;
+    gboolean result = FALSE;
+
+    g_return_val_if_fail(widget, FALSE);
+    g_return_val_if_fail(event, FALSE);
+
+    self = HILDON_CONTROLBAR(widget);
+    priv = HILDON_CONTROLBAR_GET_PRIVATE(self);
+
+    priv->button_press = TRUE;
+    event->button = event->button == 1 ? 2 : event->button;
+
+    /* Ugh dirty hack. We manipulate the mouse event location to
+       compensate for centering the widget in case it is taller than the
+       default height. */
+    if (widget->allocation.height > DEFAULT_HEIGHT) {
+        gint difference = widget->allocation.height - DEFAULT_HEIGHT;
+
+        if (difference & 1)
+            difference += 1;
+        difference = difference / 2;
+
+        event->y -= difference;
+    }
+
+
+    /* call the parent handler */
+    if (GTK_WIDGET_CLASS(parent_class)->button_press_event)
+        result =
+            GTK_WIDGET_CLASS(parent_class)->button_press_event(widget, event);
+
+    return result;
+}
+
+/*
+ * Event handler for button release
+ * Need to change button1 to button2 before passing this event to
+ * parent handler. (see specs)
+ * Also updates button_press variable so that we can draw hilites
+ * correctly
+ */
+static gint hildon_controlbar_button_release_event(GtkWidget * widget,
+                                                   GdkEventButton * event)
+{
+    HildonControlbar *self;
+    HildonControlbarPrivate *priv;
+    gboolean result = FALSE;
+
+    g_return_val_if_fail(widget, FALSE);
+    g_return_val_if_fail(event, FALSE);
+
+    self = HILDON_CONTROLBAR(widget);
+    priv = HILDON_CONTROLBAR_GET_PRIVATE(self);
+
+    priv->button_press = FALSE;
+    event->button = event->button == 1 ? 2 : event->button;
+
+    /* call the parent handler */
+    if (GTK_WIDGET_CLASS(parent_class)->button_release_event)
+        result =
+            GTK_WIDGET_CLASS(parent_class)->button_release_event(widget, event);
+    return result;
+}
+
+/*
+ * Event handler for expose event
+ */
+static gint hildon_controlbar_expose_event(GtkWidget * widget,
+                                           GdkEventExpose * event)
+{
+    HildonControlbar *self = NULL;
+
+    gboolean result = FALSE;
+    gint old_height = -1;
+    gint old_y = -1;
+
+    g_return_val_if_fail(widget, FALSE);
+    g_return_val_if_fail(event, FALSE);
+    g_return_val_if_fail(HILDON_IS_CONTROLBAR(widget), FALSE);
+
+    self = HILDON_CONTROLBAR(widget);
+
+    old_height = widget->allocation.height;
+    old_y = widget->allocation.y;
+
+    if (widget->allocation.height > DEFAULT_HEIGHT) {
+        int difference = widget->allocation.height - DEFAULT_HEIGHT;
+
+        if (difference & 1)
+            difference += 1;
+        difference = difference / 2;
+
+        widget->allocation.y += difference;
+        widget->allocation.height = DEFAULT_HEIGHT;
+    }
+
+    /* call the parent handler */
+    if (GTK_WIDGET_CLASS(parent_class)->expose_event)
+        result = GTK_WIDGET_CLASS(parent_class)->expose_event(widget, event);
+    hildon_controlbar_paint(self, &event->area);
+
+    widget->allocation.height = old_height;
+    widget->allocation.y = old_y;
+
+    return TRUE;
+}
+
+/*
+ * Paint method.
+ * This is where all the work is actually done...
+ */
+static void hildon_controlbar_paint(HildonControlbar * self,
+                                    GdkRectangle * area)
+{
+    HildonControlbarPrivate *priv;
+    GtkWidget *widget = GTK_WIDGET(self);
+    gint x = widget->allocation.x;
+    gint y = widget->allocation.y;
+    gint h = widget->allocation.height;
+    gint w = widget->allocation.width;
+    gint max = 0;
+    gint stepper_size = 0;
+    gint stepper_spacing = 0;
+    gint inner_border_width = 0;
+    gint block_area = 0, block_width = 0, block_x = 0, block_max = 0, block_height,block_y;
+    gint block_count = 0;
+    gint selected_blocks = 0;
+    gint separatingpixels = 2;
+    gint block_remains = 0;
+    gint i, start_x, end_x, current_width;
+    gint minimum_visible_bars = 0;
+    GtkStateType state = GTK_STATE_NORMAL;
+
+    g_return_if_fail(area);
+
+    priv = HILDON_CONTROLBAR_GET_PRIVATE(self);
+    if (GTK_WIDGET_SENSITIVE(self) == FALSE)
+        state = GTK_STATE_INSENSITIVE;
+
+    gtk_widget_style_get(GTK_WIDGET(self),
+                         "stepper-size", &stepper_size,
+                         "stepper-spacing", &stepper_spacing,
+                        "inner_border_width", &inner_border_width, NULL);
+    g_object_get(G_OBJECT(self), "minimum_visible_bars", &minimum_visible_bars, NULL);
+
+    block_area = (w - 2 * stepper_size - 2 * stepper_spacing - 2 * inner_border_width);
+    if (block_area <= 0)
+        return;
+
+    max = hildon_controlbar_get_max(self);
+    block_max = max - GTK_RANGE(self)->adjustment->lower + minimum_visible_bars; 
+    selected_blocks = priv->old_value - GTK_RANGE(self)->adjustment->lower;
+    /* We check border width and maximum value and adjust
+     * separating pixels for block width here. If the block size would
+     * become too small, we make the separators smaller. Graceful fallback.
+     */
+    if( max == 0 )
+    {
+      separatingpixels = 3;
+    }
+    else if ((block_area - ((max - 1) * 3)) / max >= 4) {
+        separatingpixels = 3;
+    } else if ((block_area - ((max - 1) * 2)) / max >= 4) {
+        separatingpixels = 2;
+    } else if ((block_area - ((max - 1) * 1)) / max >= 4) {
+        separatingpixels = 1;
+    } else
+        separatingpixels = 0;
+
+    if( block_max == 0 )
+    {
+      /* If block max is 0 then we dim the whole control. */
+      state = GTK_STATE_INSENSITIVE;
+      block_width = block_area;
+      block_remains = 0;
+      block_max = 1;
+    }
+    else
+    {
+      block_width =
+          (block_area - (separatingpixels * (block_max - 1))) / block_max;
+      block_remains =
+          (block_area - (separatingpixels * (block_max - 1))) % block_max;
+    }
+
+    block_x = x + stepper_size + stepper_spacing + inner_border_width;
+    block_y = y + inner_border_width;
+    block_height = h - 2 * inner_border_width;
+
+    block_count = hildon_controlbar_get_value(self)/* - GTK_RANGE(self)->adjustment->lower*/;
+    if (minimum_visible_bars == 0) block_count=block_count - GTK_RANGE(self)->adjustment->lower;
+
+    /* Without this there is vertical block corruption when block_height = 
+       1. This should work from 0 up to whatever */
+
+    if (block_height < 2)
+        block_height = 2;
+
+    /* 
+     * Changed the drawing of the blocks completely,
+     * because of "do-not-resize-when-changing-max"-specs.
+     * Now the code calculates from the block_remains when
+     * it should add one pixel to the block and when not.
+     */
+
+    for (i = 1; i <= block_max; i++) {
+
+        /* Here we calculate whether we add one pixel to current_width or
+           not. */
+        start_x = block_width * (i - 1) + ((i - 1) * block_remains) / block_max;
+        end_x = block_width * i + (i * block_remains) / block_max;
+        current_width = end_x - start_x;
+
+        gtk_paint_box(widget->style, widget->window, state,
+                      (i <= block_count) ? GTK_SHADOW_IN : GTK_SHADOW_OUT,
+                     NULL, widget, "hildon_block",
+                      block_x, block_y, current_width,
+                      block_height);
+
+        /* We keep the block_x separate because of the
+           'separatingpixels' */
+        block_x += current_width + separatingpixels;
+    }
+
+}
diff --git a/hildon-widgets/hildon-controlbar.h b/hildon-widgets/hildon-controlbar.h
new file mode 100644 (file)
index 0000000..a1ef5ca
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __HILDON_CONTROLBAR_H__
+#define __HILDON_CONTROLBAR_H__
+
+#include <gtk/gtkscale.h>
+
+G_BEGIN_DECLS
+#define HILDON_TYPE_CONTROLBAR ( hildon_controlbar_get_type() )
+#define HILDON_CONTROLBAR(obj) (GTK_CHECK_CAST (obj,\
+  HILDON_TYPE_CONTROLBAR, HildonControlbar))
+#define HILDON_CONTROLBAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass),\
+  HILDON_TYPE_CONTROLBAR, HildonControlbarClass))
+#define HILDON_IS_CONTROLBAR(obj) \
+  (GTK_CHECK_TYPE (obj, HILDON_TYPE_CONTROLBAR))
+#define HILDON_IS_CONTROLBAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass),\
+  HILDON_TYPE_CONTROLBAR))
+
+/**
+ * HildonControlbar:
+ *
+ * Contains gboolean variable named 'button_press' whether a button
+ * has been pressed.
+ */
+typedef struct _HildonControlbar HildonControlbar;
+typedef struct _HildonControlbarClass HildonControlbarClass;
+
+struct _HildonControlbar {
+    GtkScale scale;
+};
+
+struct _HildonControlbarClass {
+    GtkScaleClass parent_class;
+};
+
+GType hildon_controlbar_get_type(void);
+GtkWidget *hildon_controlbar_new(void);
+void hildon_controlbar_set_value(HildonControlbar * self, gint value);
+gint hildon_controlbar_get_value(HildonControlbar * self);
+gint hildon_controlbar_get_max(HildonControlbar * self);
+gint hildon_controlbar_get_min(HildonControlbar * self);
+void hildon_controlbar_set_max(HildonControlbar * self, gint max);
+void hildon_controlbar_set_min(HildonControlbar * self, gint min);
+void hildon_controlbar_set_range(HildonControlbar * self, gint min,
+                                 gint max);
+
+G_END_DECLS
+#endif
diff --git a/hildon-widgets/hildon-date-editor.c b/hildon-widgets/hildon-date-editor.c
new file mode 100644 (file)
index 0000000..d5f839a
--- /dev/null
@@ -0,0 +1,1267 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/* HILDON DOC
+ * @shortdesc: DateEditor is a widget for setting, getting and showing a
+ * date.
+ * @longdesc: The date editor consists of a GtkLabel that shows the current
+ * date in localized form and an icon. Clicking on either the label or the
+ * icon opens the #HildonCalendarPopup used for selecting the date.
+ * Similarly, if the editor has the focus, and space or enter key is
+ * pressed, the #HildonCalendarPopup will open. 
+ * 
+ * @seealso: #HildonTimeEditor, #HildonCalendarPopup
+ */
+
+#include <glib.h>
+#include <gtk/gtk.h>
+#include <gdk/gdkkeysyms.h>
+#include <time.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <langinfo.h>
+
+#include <hildon-widgets/hildon-date-editor.h>
+#include <hildon-widgets/hildon-calendar-popup.h>
+#include <hildon-widgets/gtk-infoprint.h>
+#include <hildon-widgets/hildon-defines.h>
+#include "hildon-composite-widget.h"
+
+#ifdef HAVE_CONFIG_H
+#include<config.h>
+#endif
+
+#include<libintl.h>
+#define _(string) dgettext(PACKAGE, string)
+
+#define MAX_DATE_LEN 256
+#define ENTRY_BORDERS 11
+#define DATE_EDITOR_HEIGHT 30
+
+#define DAY_ENTRY_WIDTH 2
+#define MONTH_ENTRY_WIDTH 2
+#define YEAR_ENTRY_WIDTH 4
+
+#define HILDON_DATE_EDITOR_GET_PRIVATE(obj) \
+        (G_TYPE_INSTANCE_GET_PRIVATE((obj),\
+        HILDON_DATE_EDITOR_TYPE, HildonDateEditorPrivate));
+
+static GtkContainerClass *parent_class;
+
+typedef struct _HildonDateEditorPrivate HildonDateEditorPrivate;
+
+static int hildon_date_editor_get_font_width(GtkWidget * widget);
+
+static void
+hildon_date_editor_class_init(HildonDateEditorClass * editor_class);
+
+static void hildon_date_editor_init(HildonDateEditor * editor);
+
+static gboolean
+hildon_date_editor_icon_press(GtkWidget * widget, GdkEventButton * event,
+                              gpointer data);
+
+static gboolean
+hildon_date_editor_entry_released(GtkWidget * widget,
+                                  GdkEventButton * event, gpointer data);
+
+static gboolean
+hildon_date_editor_released(GtkWidget * widget, GdkEventButton * event,
+                            gpointer data);
+
+static gboolean
+hildon_date_editor_keypress(GtkWidget * widget, GdkEventKey * event,
+                            gpointer data);
+
+static gboolean
+hildon_date_editor_keyrelease(GtkWidget * widget, GdkEventKey * event,
+                              gpointer data);
+
+static gboolean
+hildon_date_editor_focus_out(GtkWidget * widget, GdkEventFocus * event,
+                             gpointer data);
+static gboolean
+hildon_date_editor_mnemonic_activate(GtkWidget *widget, gboolean group_cycling);
+
+static void
+hildon_child_forall(GtkContainer * container,
+                    gboolean include_internals,
+                    GtkCallback callback, gpointer callback_data);
+static void hildon_date_editor_destroy(GtkObject * self);
+static void
+hildon_date_editor_size_allocate(GtkWidget * widget,
+                                 GtkAllocation * allocation);
+
+static void
+hildon_date_editor_size_request(GtkWidget * widget,
+                                GtkRequisition * requisition);
+
+static guint
+hildon_date_editor_check_locale_settings(HildonDateEditor * editor);
+
+static void hildon_date_editor_finalize(GObject * object);
+
+struct _HildonDateEditorPrivate {
+    guint year; /* current year in the entry */
+    guint month;        /* current month in the entry */
+    guint day;  /* current day in the entry */
+
+    guint y_orig;       /* roll back value for year (if entry has illegal
+                           value) */
+    guint m_orig;       /* roll back value for month */
+    guint d_orig;       /* roll back value for day */
+
+    gint button_press;  /* wheter to show pressed image */
+
+    gboolean editor_pressed;
+    gboolean valid_value;
+
+    GtkWidget *frame;   /* borders around the date */
+    GtkWidget *d_event_box_image;       /* icon */
+    GtkWidget *d_box_date;      /* hbox for date */
+
+    GtkWidget *d_entry; /* GtkEntry for day */
+    GtkWidget *m_entry; /* GtkEntry for month */
+    GtkWidget *y_entry; /* GtkEntry for year */
+
+    GtkWidget *dm_delim;  /* Delimeter between day and month entries */
+    GtkWidget *my_delim;  /* Delimeter between month and year entries */
+
+    GtkWidget *d_image; /* normal icon image */
+    GtkWidget *d_image_pressed;
+    guint locale_type;
+};
+
+enum {
+    MONTH_DAY_YEAR,
+    DAY_MONTH_YEAR,
+    YEAR_MONTH_DAY
+};
+
+GType hildon_date_editor_get_type(void)
+{
+    static GType editor_type = 0;
+
+    if (!editor_type) {
+        static const GTypeInfo editor_info = {
+            sizeof(HildonDateEditorClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_date_editor_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonDateEditor),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_date_editor_init,
+        };
+        editor_type = g_type_register_static(GTK_TYPE_CONTAINER,
+                                             "HildonDateEditor",
+                                             &editor_info, 0);
+    }
+    return editor_type;
+}
+
+static void
+hildon_date_editor_class_init(HildonDateEditorClass * editor_class)
+{
+    GtkContainerClass *container_class = GTK_CONTAINER_CLASS(editor_class);
+    GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(editor_class);
+
+    parent_class = g_type_class_peek_parent(editor_class);
+
+    g_type_class_add_private(editor_class,
+                             sizeof(HildonDateEditorPrivate));
+
+    widget_class->mnemonic_activate = hildon_date_editor_mnemonic_activate;
+    widget_class->size_request = hildon_date_editor_size_request;
+    widget_class->size_allocate = hildon_date_editor_size_allocate;
+    widget_class->focus = hildon_composite_widget_focus;
+
+    container_class->forall = hildon_child_forall;
+    GTK_OBJECT_CLASS(editor_class)->destroy = hildon_date_editor_destroy;
+    G_OBJECT_CLASS(editor_class)->finalize = hildon_date_editor_finalize;
+}
+
+static void hildon_date_editor_init(HildonDateEditor * editor)
+{
+    HildonDateEditorPrivate *priv;
+    GDate cur_date;
+    guint locale_type;
+
+    priv = HILDON_DATE_EDITOR_GET_PRIVATE(editor);
+
+    GTK_WIDGET_SET_FLAGS(GTK_WIDGET(editor), GTK_NO_WINDOW);
+
+    gtk_widget_push_composite_child();
+
+    /* initialize values */
+    g_date_clear(&cur_date, 1);
+    g_date_set_time(&cur_date, time(NULL));
+
+    priv->day = g_date_get_day(&cur_date);
+    priv->month = g_date_get_month(&cur_date);
+    priv->year = g_date_get_year(&cur_date);
+
+    priv->y_orig = 0;
+    priv->m_orig = 0;
+    priv->d_orig = 0;
+    priv->button_press = FALSE;
+    priv->valid_value = TRUE;
+
+    /* make widgets */
+    priv->frame = gtk_frame_new(NULL);
+
+    priv->d_entry = gtk_entry_new();
+    priv->m_entry = gtk_entry_new();
+    priv->y_entry = gtk_entry_new();
+    priv->editor_pressed = FALSE;
+
+    
+    /* set entry look */
+    gtk_entry_set_width_chars(GTK_ENTRY(priv->d_entry), DAY_ENTRY_WIDTH);
+    gtk_entry_set_width_chars(GTK_ENTRY(priv->m_entry), MONTH_ENTRY_WIDTH);
+    gtk_entry_set_width_chars(GTK_ENTRY(priv->y_entry), YEAR_ENTRY_WIDTH);
+
+    gtk_entry_set_max_length(GTK_ENTRY(priv->d_entry), DAY_ENTRY_WIDTH);
+    gtk_entry_set_max_length(GTK_ENTRY(priv->m_entry), MONTH_ENTRY_WIDTH);
+    gtk_entry_set_max_length(GTK_ENTRY(priv->y_entry), YEAR_ENTRY_WIDTH);
+
+    gtk_entry_set_has_frame(GTK_ENTRY(priv->d_entry), FALSE);
+    gtk_entry_set_has_frame(GTK_ENTRY(priv->m_entry), FALSE);
+    gtk_entry_set_has_frame(GTK_ENTRY(priv->y_entry), FALSE);
+
+    priv->dm_delim = gtk_label_new("/");
+    priv->my_delim = gtk_label_new("/");
+
+    priv->d_box_date = gtk_hbox_new(FALSE, 0);
+
+    priv->d_event_box_image = gtk_event_box_new();
+
+    priv->d_image = gtk_image_new_from_icon_name("qgn_widg_datedit",
+                                             HILDON_ICON_SIZE_WIDG);
+    priv->d_image_pressed = gtk_image_new_from_icon_name("qgn_widg_datedit_pr",
+                                                     HILDON_ICON_SIZE_WIDG);
+    g_object_ref(G_OBJECT(priv->d_image));
+    g_object_ref(G_OBJECT(priv->d_image_pressed));
+    gtk_object_sink(GTK_OBJECT(priv->d_image));
+    gtk_object_sink(GTK_OBJECT(priv->d_image_pressed));
+    /* packing */
+    /* Packing day, month and year entries depend on locale settings */
+    priv->locale_type = locale_type =
+        hildon_date_editor_check_locale_settings(editor);
+
+    if (locale_type == DAY_MONTH_YEAR)
+        gtk_box_pack_start(GTK_BOX(priv->d_box_date),
+                           priv->d_entry, FALSE, FALSE, 0);
+    else if (locale_type == MONTH_DAY_YEAR)
+        gtk_box_pack_start(GTK_BOX(priv->d_box_date),
+                           priv->m_entry, FALSE, FALSE, 0);
+    else
+        gtk_box_pack_start(GTK_BOX(priv->d_box_date),
+                           priv->y_entry, FALSE, FALSE, 0);
+    gtk_box_pack_start(GTK_BOX(priv->d_box_date),
+                       priv->dm_delim, FALSE, FALSE, 0);
+    if (locale_type == DAY_MONTH_YEAR)
+        gtk_box_pack_start(GTK_BOX(priv->d_box_date),
+                           priv->m_entry, FALSE, FALSE, 0);
+    else if (locale_type == MONTH_DAY_YEAR)
+        gtk_box_pack_start(GTK_BOX(priv->d_box_date),
+                           priv->d_entry, FALSE, FALSE, 0);
+    else
+        gtk_box_pack_start(GTK_BOX(priv->d_box_date),
+                           priv->m_entry, FALSE, FALSE, 0);
+    gtk_box_pack_start(GTK_BOX(priv->d_box_date),
+                       priv->my_delim, FALSE, FALSE, 0);
+    if (locale_type == DAY_MONTH_YEAR)
+        gtk_box_pack_start(GTK_BOX(priv->d_box_date),
+                           priv->y_entry, FALSE, FALSE, 0);
+    else if (locale_type == MONTH_DAY_YEAR)
+        gtk_box_pack_start(GTK_BOX(priv->d_box_date),
+                           priv->y_entry, FALSE, FALSE, 0);
+    else
+        gtk_box_pack_start(GTK_BOX(priv->d_box_date),
+                           priv->d_entry, FALSE, FALSE, 0);
+
+    gtk_container_add(GTK_CONTAINER(priv->frame), priv->d_box_date);
+    gtk_container_add(GTK_CONTAINER(priv->d_event_box_image), priv->d_image);
+
+    gtk_widget_set_parent(priv->frame, GTK_WIDGET(editor));
+    gtk_widget_set_parent(priv->d_event_box_image, GTK_WIDGET(editor));
+    gtk_widget_show_all(priv->frame);
+    gtk_widget_show_all(priv->d_event_box_image);
+
+    /* set signals */
+    g_signal_connect(GTK_OBJECT(priv->d_event_box_image), "button_press_event",
+                     G_CALLBACK(hildon_date_editor_icon_press), editor);
+
+    g_signal_connect(GTK_OBJECT(priv->d_event_box_image),
+                     "button_release_event",
+                     G_CALLBACK(hildon_date_editor_released), editor);
+
+    g_signal_connect(GTK_OBJECT(priv->d_entry), "button_release_event",
+                     G_CALLBACK(hildon_date_editor_entry_released), editor);
+
+    g_signal_connect(GTK_OBJECT(priv->m_entry), "button_release_event",
+                     G_CALLBACK(hildon_date_editor_entry_released), editor);
+
+    g_signal_connect(GTK_OBJECT(priv->y_entry), "button_release_event",
+                     G_CALLBACK(hildon_date_editor_entry_released), editor);
+
+    g_signal_connect(GTK_OBJECT(priv->d_entry), "focus-out-event",
+                     G_CALLBACK(hildon_date_editor_focus_out), editor);
+
+    g_signal_connect(GTK_OBJECT(priv->m_entry), "focus-out-event",
+                     G_CALLBACK(hildon_date_editor_focus_out), editor);
+
+    g_signal_connect(GTK_OBJECT(priv->y_entry), "focus-out-event",
+                     G_CALLBACK(hildon_date_editor_focus_out), editor);
+
+    g_signal_connect(GTK_OBJECT(priv->d_entry), "key-press-event",
+                     G_CALLBACK(hildon_date_editor_keypress), editor);
+
+    g_signal_connect(GTK_OBJECT(priv->m_entry), "key-press-event",
+                     G_CALLBACK(hildon_date_editor_keypress), editor);
+
+    g_signal_connect(GTK_OBJECT(priv->y_entry), "key-press-event",
+                     G_CALLBACK(hildon_date_editor_keypress), editor);
+
+    g_signal_connect(GTK_OBJECT(priv->d_entry), "key-release-event",
+                     G_CALLBACK(hildon_date_editor_keyrelease), editor);
+
+    g_signal_connect(GTK_OBJECT(priv->m_entry), "key-release-event",
+                     G_CALLBACK(hildon_date_editor_keyrelease), editor);
+
+    g_signal_connect(GTK_OBJECT(priv->y_entry), "key-release-event",
+                     G_CALLBACK(hildon_date_editor_keyrelease), editor);
+
+    g_signal_connect(GTK_OBJECT(priv->d_event_box_image), "key-press-event",
+                     G_CALLBACK(hildon_date_editor_keypress), editor);
+
+    g_signal_connect(GTK_OBJECT(priv->d_image), "key-press-event",
+                     G_CALLBACK(hildon_date_editor_keypress), editor);
+
+    hildon_date_editor_set_date(editor, priv->year, priv->month, priv->day);
+
+    gtk_widget_pop_composite_child();
+}
+
+static gboolean
+hildon_date_editor_mnemonic_activate(GtkWidget *widget, gboolean group_cycling)
+
+{
+  GtkWidget *entry;
+  HildonDateEditorPrivate *priv = HILDON_DATE_EDITOR_GET_PRIVATE(widget);
+
+  if( priv->locale_type == MONTH_DAY_YEAR )
+    entry = priv->m_entry;
+  else
+    entry = priv->d_entry;
+
+  gtk_widget_grab_focus( entry );
+  gtk_editable_select_region(GTK_EDITABLE(entry), 0, -1);
+  return TRUE;
+}
+
+static void hildon_date_editor_finalize(GObject * object)
+{
+    HildonDateEditorPrivate *priv = HILDON_DATE_EDITOR_GET_PRIVATE(object);
+
+    g_object_unref(G_OBJECT(priv->d_image));
+    g_object_unref(G_OBJECT(priv->d_image_pressed));
+    if( G_OBJECT_CLASS(parent_class)->finalize )
+      G_OBJECT_CLASS(parent_class)->finalize(object);
+}
+
+static guint
+hildon_date_editor_check_locale_settings(HildonDateEditor * editor)
+{
+    gchar *dfmt;
+
+    dfmt = nl_langinfo(D_FMT);
+
+    if (!strncmp(dfmt, "%d", 2))
+        return DAY_MONTH_YEAR;
+    else if (!strncmp(dfmt, "%m", 2))
+        return MONTH_DAY_YEAR;
+    else
+        return YEAR_MONTH_DAY;
+}
+
+static void hildon_child_forall(GtkContainer * container,
+                                gboolean include_internals,
+                                GtkCallback callback,
+                                gpointer callback_data)
+{
+    HildonDateEditor *editor;
+    HildonDateEditorPrivate *priv;
+
+    g_return_if_fail(container);
+    g_return_if_fail(callback);
+
+    editor = HILDON_DATE_EDITOR(container);
+    priv = HILDON_DATE_EDITOR_GET_PRIVATE(editor);
+
+    if (include_internals) {
+        (*callback) (priv->frame, callback_data);
+        (*callback) (priv->d_event_box_image, callback_data);
+    }
+}
+
+static void hildon_date_editor_destroy(GtkObject * self)
+{
+    HildonDateEditorPrivate *priv;
+
+    priv = HILDON_DATE_EDITOR_GET_PRIVATE(self);
+
+    if (priv->frame) {
+        gtk_widget_unparent(priv->frame);
+        priv->frame = NULL;
+    }
+    if (priv->d_event_box_image) {
+        gtk_widget_unparent(priv->d_event_box_image);
+        priv->d_event_box_image = NULL;
+    }
+
+    if (GTK_OBJECT_CLASS(parent_class)->destroy)
+        GTK_OBJECT_CLASS(parent_class)->destroy(self);
+}
+
+/**
+ * hildon_date_editor_new:
+ *
+ * This function creates a new time editor. The current system date
+ * is shown in the editor.
+ *
+ * Return value: Pointer to a new @HildonDateEditor widget.
+ **/
+GtkWidget *hildon_date_editor_new(void)
+{
+    return GTK_WIDGET(g_object_new(HILDON_DATE_EDITOR_TYPE, NULL));
+}
+
+/**
+ * hildon_date_editor_set_date:
+ * @date: the @HildonDateEditor widget
+ * @year: year
+ * @month: month
+ * @day: day
+ *
+ * This function sets the date shown in the editor. The function returns 
+ * if the date specified by the arguments is not valid, the
+ * function returns.
+ **/
+
+void hildon_date_editor_set_date(HildonDateEditor * date,
+                                 guint year, guint month, guint day)
+{
+    HildonDateEditorPrivate *priv;
+    gchar date_str[MAX_DATE_LEN + 1];
+    GDate cur_date;
+
+    g_return_if_fail(date);
+    g_return_if_fail(HILDON_IS_DATE_EDITOR(date));
+
+    priv = HILDON_DATE_EDITOR_GET_PRIVATE(date);
+    g_date_clear(&cur_date, 1);
+
+    /* validate given date */
+    if (g_date_valid_dmy(day, month, year)) {
+        if (priv->y_orig == 0) {
+            priv->y_orig = year;
+            priv->m_orig = month;
+            priv->d_orig = day;
+        }
+
+        g_date_set_dmy(&cur_date, day, month, year);
+        priv->day = day;
+        priv->month = month;
+        priv->year = year;
+
+        /* write date to entries */
+        g_date_strftime(date_str, MAX_DATE_LEN, "%d", &cur_date);
+        gtk_entry_set_text(GTK_ENTRY(priv->d_entry), date_str);
+
+        g_date_strftime(date_str, MAX_DATE_LEN, "%m", &cur_date);
+        gtk_entry_set_text(GTK_ENTRY(priv->m_entry), date_str);
+
+        g_date_strftime(date_str, MAX_DATE_LEN, "%EY", &cur_date);
+        gtk_entry_set_text(GTK_ENTRY(priv->y_entry), date_str);
+    }
+}
+
+/**
+ * hildon_date_editor_get_date:
+ * @date: the @HildonDateEditor widget
+ * @year: year
+ * @month: month
+ * @day: day
+ *
+ * This function returns the year, month, and day currently on the
+ * date editor.
+ **/
+
+void hildon_date_editor_get_date(HildonDateEditor * date,
+                                 guint * year, guint * month, guint * day)
+{
+    HildonDateEditorPrivate *priv;
+
+    g_return_if_fail(date);
+    g_return_if_fail(HILDON_IS_DATE_EDITOR(date));
+    g_return_if_fail(year);
+    g_return_if_fail(month);
+    g_return_if_fail(day);
+
+    priv = HILDON_DATE_EDITOR_GET_PRIVATE(date);
+
+    *year = priv->year;
+    *month = priv->month;
+    *day = priv->day;
+}
+
+static gboolean hildon_date_editor_icon_press(GtkWidget * widget,
+                                              GdkEventButton * event,
+                                              gpointer data)
+{
+    HildonDateEditor *ed;
+    HildonDateEditorPrivate *priv;
+
+    g_return_val_if_fail(widget, FALSE);
+    g_return_val_if_fail(event, FALSE);
+    g_return_val_if_fail(data, FALSE);
+
+    ed = HILDON_DATE_EDITOR(data);
+    priv = HILDON_DATE_EDITOR_GET_PRIVATE(ed);
+
+    if (event->button == 1 && !priv->button_press) {
+        gtk_container_remove(GTK_CONTAINER(priv->d_event_box_image),
+                             priv->d_image);
+        gtk_container_add(GTK_CONTAINER(priv->d_event_box_image),
+                          priv->d_image_pressed);
+        gtk_widget_show_all(priv->d_event_box_image);
+        priv->button_press = TRUE;
+    }
+    return FALSE;
+}
+
+static gboolean hildon_date_editor_entry_released(GtkWidget * widget,
+                                                  GdkEventButton * event,
+                                                  gpointer data)
+{
+    HildonDateEditor *ed;
+    HildonDateEditorPrivate *priv;
+
+    g_return_val_if_fail(widget, FALSE);
+    g_return_val_if_fail(event, FALSE);
+    g_return_val_if_fail(data, FALSE);
+
+    ed = HILDON_DATE_EDITOR(data);
+    priv = HILDON_DATE_EDITOR_GET_PRIVATE(ed);
+
+    if (priv->valid_value && event->button == 1) {
+        GtkEntry *e = GTK_ENTRY(widget);
+        gint start = 0, end = gtk_entry_get_max_length(e);
+
+        /* We might not get focus because unvalid values in entries */
+        if (GTK_WIDGET_HAS_FOCUS(widget))
+            gtk_editable_select_region(GTK_EDITABLE(e), start, end);
+    } else
+        priv->valid_value = TRUE;
+    return FALSE;
+}
+
+/* This handler is called from mainloop
+   after button exposes are processed */
+static gboolean idle_popup(gpointer data)
+{
+    guint y = 0, m = 0, d = 0;
+    HildonDateEditor *ed;
+    GtkWidget *popup;
+    GtkWidget *parent;
+    guint result;
+
+    ed = HILDON_DATE_EDITOR(data);
+
+    hildon_date_editor_get_date(ed, &y, &m, &d);
+
+    parent = gtk_widget_get_ancestor(GTK_WIDGET(ed), GTK_TYPE_WINDOW);
+    popup = hildon_calendar_popup_new(GTK_WINDOW(parent), y, m, d);
+
+    result = gtk_dialog_run(GTK_DIALOG(popup));
+    switch (result) {
+    case GTK_RESPONSE_OK:
+    case GTK_RESPONSE_ACCEPT:
+        hildon_calendar_popup_get_date(HILDON_CALENDAR_POPUP(popup), &y,
+                                       &m, &d);
+        hildon_date_editor_set_date(ed, y, m, d);
+    }
+
+    gtk_widget_destroy(popup);
+
+    return FALSE;
+}
+
+/* button released */
+static gboolean hildon_date_editor_released(GtkWidget * widget,
+                                            GdkEventButton * event,
+                                            gpointer data)
+{
+    HildonDateEditor *ed;
+    HildonDateEditorPrivate *priv;
+
+    g_return_val_if_fail(widget, FALSE);
+    g_return_val_if_fail(event, FALSE);
+    g_return_val_if_fail(data, FALSE);
+
+    ed = HILDON_DATE_EDITOR(data);
+    priv = HILDON_DATE_EDITOR_GET_PRIVATE(ed);
+
+    if (!priv->button_press)
+        return FALSE;
+
+    /* change the icon image back to normal */
+    gtk_container_remove(GTK_CONTAINER(priv->d_event_box_image),
+                         priv->d_image_pressed);
+    gtk_container_add(GTK_CONTAINER(priv->d_event_box_image),
+                      priv->d_image);
+    gtk_widget_show_all(priv->d_event_box_image);
+
+    /* Wait until exposes are ready */
+    g_idle_add(idle_popup, ed);
+
+    priv->button_press = FALSE;
+
+    return FALSE;
+}
+
+static gboolean hildon_date_editor_keyrelease(GtkWidget * widget,
+                                              GdkEventKey * event,
+                                              gpointer data)
+{
+    HildonDateEditor *ed;
+    HildonDateEditorPrivate *priv;
+
+    g_return_val_if_fail(data, FALSE);
+    g_return_val_if_fail(widget, FALSE);
+
+    ed = HILDON_DATE_EDITOR(data);
+    priv = HILDON_DATE_EDITOR_GET_PRIVATE(ed);
+
+    if (event->keyval == GDK_KP_Enter || event->keyval == GDK_Return ||
+        event->keyval == GDK_ISO_Enter) {
+        if (priv->editor_pressed) {
+            gtk_container_remove(GTK_CONTAINER(priv->d_event_box_image),
+                                 priv->d_image_pressed);
+            gtk_container_add(GTK_CONTAINER(priv->d_event_box_image),
+                              priv->d_image);
+            gtk_widget_show_all(priv->d_event_box_image);
+            g_idle_add(idle_popup, ed);
+            priv->editor_pressed = FALSE;
+            return TRUE;
+        }
+    }
+    return FALSE;
+}
+
+/* keyboard handling */
+static gboolean hildon_date_editor_keypress(GtkWidget * widget,
+                                            GdkEventKey * event,
+                                            gpointer data)
+{
+    HildonDateEditor *ed;
+    HildonDateEditorPrivate *priv;
+    gint pos;
+
+    g_return_val_if_fail(data, FALSE);
+    g_return_val_if_fail(widget, FALSE);
+
+    ed = HILDON_DATE_EDITOR(data);
+    priv = HILDON_DATE_EDITOR_GET_PRIVATE(ed);
+    pos = gtk_editable_get_position(GTK_EDITABLE(widget));
+
+    if (event->keyval == GDK_KP_Enter ||
+        event->keyval == GDK_Return || event->keyval == GDK_ISO_Enter) {
+        if (!priv->editor_pressed) {
+            gtk_container_remove(GTK_CONTAINER(priv->d_event_box_image),
+                                 priv->d_image);
+            gtk_container_add(GTK_CONTAINER(priv->d_event_box_image),
+                              priv->d_image_pressed);
+            gtk_widget_show_all(priv->d_event_box_image);
+            priv->editor_pressed = TRUE;
+            return TRUE;
+        }
+        return FALSE;
+    }
+
+    /* We don't want wrap */
+    if (event->keyval == GDK_KP_Left || event->keyval == GDK_Left)
+        if (pos == 0) {
+            if (priv->locale_type == DAY_MONTH_YEAR) {
+                if (widget == priv->d_entry)
+                    return TRUE;
+            } else {
+                if (widget == priv->m_entry)
+                    return TRUE;
+            }
+        }
+
+    if (event->keyval == GDK_KP_Right || event->keyval == GDK_Right)
+        if (widget == priv->y_entry
+            && pos >= strlen(GTK_ENTRY(widget)->text))
+            return TRUE;
+
+    switch (event->keyval) {
+    case GDK_Left:
+        /* left on day entry */
+        if (widget == priv->d_entry) {
+            gint pos =
+                gtk_editable_get_position(GTK_EDITABLE(priv->d_entry));
+            if (pos == 0) {
+                gtk_editable_select_region(GTK_EDITABLE(priv->d_entry), 0,
+                                           0);
+                if (priv->locale_type == DAY_MONTH_YEAR) {
+                    gtk_widget_grab_focus(priv->y_entry);
+                    gtk_editable_set_position(GTK_EDITABLE(priv->y_entry),
+                                              -1);
+                } else {
+                    gtk_widget_grab_focus(priv->m_entry);
+                    gtk_editable_set_position(GTK_EDITABLE(priv->m_entry),
+                                              -1);
+                }
+                return TRUE;
+            }
+        }
+        /* left on month entry */
+        else if (widget == priv->m_entry) {
+            gint pos =
+                gtk_editable_get_position(GTK_EDITABLE(priv->m_entry));
+
+            /* switch to day entry */
+            if (pos == 0) {
+                gtk_editable_select_region(GTK_EDITABLE(priv->m_entry), 0,
+                                           0);
+                if (priv->locale_type == DAY_MONTH_YEAR) {
+                    gtk_widget_grab_focus(priv->d_entry);
+                    gtk_editable_set_position(GTK_EDITABLE(priv->d_entry),
+                                              -1);
+                } else {
+                    gtk_widget_grab_focus(priv->y_entry);
+                }
+                gtk_editable_set_position(GTK_EDITABLE(priv->y_entry), -1);
+                return TRUE;
+            }
+        }
+        /* left on year entry */
+        else if (widget == priv->y_entry) {
+            gint pos =
+                gtk_editable_get_position(GTK_EDITABLE(priv->y_entry));
+
+            /* switch to month entry */
+            if (pos == 0) {
+                gtk_editable_select_region(GTK_EDITABLE(priv->y_entry), 0,
+                                           0);
+                if (priv->locale_type == DAY_MONTH_YEAR) {
+                    gtk_widget_grab_focus(priv->m_entry);
+                    gtk_editable_set_position(GTK_EDITABLE(priv->m_entry),
+                                              -1);
+                } else {
+                    gtk_widget_grab_focus(priv->d_entry);
+                    gtk_editable_set_position(GTK_EDITABLE(priv->d_entry),
+                                              -1);
+                }
+                return TRUE;
+            }
+        }
+        return FALSE;
+
+    case GDK_Right:
+        /* right on day entry */
+        if (widget == priv->d_entry) {
+            gint pos =
+                gtk_editable_get_position(GTK_EDITABLE(priv->d_entry));
+            gint len = gtk_entry_get_max_length(GTK_ENTRY(priv->d_entry));
+            gint chars =
+                g_utf8_strlen(gtk_entry_get_text(GTK_ENTRY(priv->d_entry)),
+                              len);
+
+            /* switch to month entry */
+            if ((pos == len) || (pos > chars)) {
+                gtk_editable_select_region(GTK_EDITABLE(priv->d_entry), 0,
+                                           0);
+                if (priv->locale_type == DAY_MONTH_YEAR) {
+                    gtk_widget_grab_focus(priv->m_entry);
+                    gtk_editable_set_position(GTK_EDITABLE(priv->m_entry),
+                                              0);
+                } else {
+                    gtk_widget_grab_focus(priv->y_entry);
+                    gtk_editable_set_position(GTK_EDITABLE(priv->y_entry),
+                                              0);
+                }
+                return TRUE;
+            }
+        }
+        /* right on month entry */
+        else if (widget == priv->m_entry) {
+            gint pos =
+                gtk_editable_get_position(GTK_EDITABLE(priv->m_entry));
+            gint len = gtk_entry_get_max_length(GTK_ENTRY(priv->m_entry));
+            gint chars =
+                g_utf8_strlen(gtk_entry_get_text(GTK_ENTRY(priv->m_entry)),
+                              len);
+
+            /* switch to year entry */
+            if ((pos == len) || (pos > chars)) {
+                gtk_editable_select_region(GTK_EDITABLE(priv->m_entry), 0,
+                                           0);
+                if (priv->locale_type == DAY_MONTH_YEAR) {
+                    gtk_widget_grab_focus(priv->y_entry);
+                    gtk_editable_set_position(GTK_EDITABLE(priv->y_entry),
+                                              0);
+                } else {
+                    gtk_widget_grab_focus(priv->d_entry);
+                    gtk_editable_set_position(GTK_EDITABLE(priv->d_entry),
+                                              0);
+                }
+                return TRUE;
+            }
+        }
+        /* right on year entry */
+        else if (widget == priv->y_entry) {
+            gint pos =
+                gtk_editable_get_position(GTK_EDITABLE(priv->y_entry));
+            gint len = gtk_entry_get_max_length(GTK_ENTRY(priv->y_entry));
+            gint chars =
+                g_utf8_strlen(gtk_entry_get_text(GTK_ENTRY(priv->y_entry)),
+                              len);
+
+            /* switch to day entry */
+            if ((pos == len) || (pos > chars)) {
+                gtk_editable_select_region(GTK_EDITABLE(priv->y_entry), 0,
+                                           0);
+                if (priv->locale_type == DAY_MONTH_YEAR) {
+                    gtk_widget_grab_focus(priv->d_entry);
+                    gtk_editable_set_position(GTK_EDITABLE(priv->d_entry),
+                                              0);
+                } else {
+                    gtk_widget_grab_focus(priv->y_entry);
+                    gtk_editable_set_position(GTK_EDITABLE(priv->y_entry),
+                                              0);
+                }
+                return TRUE;
+            }
+        }
+        return FALSE;
+
+        /* all digit keys */
+    case GDK_0:
+    case GDK_1:
+    case GDK_2:
+    case GDK_3:
+    case GDK_4:
+    case GDK_5:
+    case GDK_6:
+    case GDK_7:
+    case GDK_8:
+    case GDK_9:
+      {
+        if ((widget == priv->d_entry) || (widget == priv->m_entry) ||
+            (widget == priv->y_entry)) {
+            GtkWidgetClass *cl = GTK_WIDGET_GET_CLASS(widget);
+
+            cl->key_press_event(widget, event);
+        } else
+            return TRUE;
+      }
+      return TRUE;
+
+        /* accepts these as is */
+    case GDK_Tab:
+    case GDK_Shift_L:
+    case GDK_Shift_R:
+    case GDK_BackSpace:
+    case GDK_Delete:
+    case GDK_Up:
+    case GDK_Down:
+        return FALSE;
+
+        /* select date */
+    default:
+        return TRUE;
+    }
+}
+
+/* Entry looses focus. Validate the date */
+static gboolean hildon_date_editor_focus_out(GtkWidget * widget,
+                                             GdkEventFocus * event,
+                                             gpointer data)
+{
+    gint d, m, y;
+    HildonDateEditor *ed;
+    HildonDateEditorPrivate *priv;
+    gchar new_val[5];
+    GDate gd;
+
+    g_return_val_if_fail(widget, FALSE);
+    g_return_val_if_fail(data, FALSE);
+
+    ed = HILDON_DATE_EDITOR(data);
+    priv = HILDON_DATE_EDITOR_GET_PRIVATE(ed);
+
+    /* deselect the entry */
+    if (widget == priv->d_entry)
+        gtk_editable_select_region(GTK_EDITABLE(priv->d_entry), 0, 0);
+
+    if (widget == priv->m_entry)
+        gtk_editable_select_region(GTK_EDITABLE(priv->m_entry), 0, 0);
+
+    if (widget == priv->y_entry)
+        gtk_editable_select_region(GTK_EDITABLE(priv->y_entry), 0, 0);
+
+    g_date_clear(&gd, 1);
+    g_date_set_time(&gd, time(NULL));
+
+    /* get texts */
+    d = atoi(gtk_entry_get_text(GTK_ENTRY(priv->d_entry)));
+    m = atoi(gtk_entry_get_text(GTK_ENTRY(priv->m_entry)));
+    y = atoi(gtk_entry_get_text(GTK_ENTRY(priv->y_entry)));
+
+    /* if date is not valid, fix it */
+    if (!g_date_valid_dmy(d, m, y)) {
+        /* Year is illegal, year 0 is not allowed by this code */
+        if ((g_utf8_strlen(gtk_entry_get_text(GTK_ENTRY(priv->y_entry)),
+                           -1) == 0) || (y == 0)) {
+            gint end = gtk_entry_get_max_length(GTK_ENTRY(priv->y_entry));
+
+            gtk_infoprint(NULL, "Set a value");
+
+            /* set year to current year or to orignal value, if one exists 
+             */
+            if (priv->y_orig == 0)
+                y = g_date_get_year(&gd);
+            else
+                y = priv->y_orig;
+
+            sprintf(new_val, "%02d", y);
+            gtk_entry_set_text(GTK_ENTRY(priv->y_entry), new_val);
+            gtk_widget_grab_focus(priv->y_entry);
+
+            gtk_editable_select_region(GTK_EDITABLE(priv->y_entry),
+                                       0, end);
+            priv->valid_value = FALSE;
+        }
+
+        /* month is illegal */
+        else if ((g_utf8_strlen
+             (gtk_entry_get_text(GTK_ENTRY(priv->m_entry)), -1) == 0)
+            || (m == 0)) {
+            gint end = gtk_entry_get_max_length(GTK_ENTRY(priv->m_entry));
+
+            gtk_infoprintf(NULL, _("Ckct_ib_set_a_value_within_range"), 1, 12);
+
+            /* set month to current month or to orignal value, if one
+               exists */
+            if (priv->m_orig == 0)
+                m = g_date_get_month(&gd);
+            else
+                m = priv->m_orig;
+
+            sprintf(new_val, "%02d", m);
+            gtk_entry_set_text(GTK_ENTRY(priv->m_entry), new_val);
+            gtk_widget_grab_focus(priv->m_entry);
+
+            gtk_editable_select_region(GTK_EDITABLE(priv->m_entry), 0,
+                                       end);
+            priv-> valid_value = FALSE;
+        }
+
+        /* day is illegal */
+        else if ((g_utf8_strlen
+             (gtk_entry_get_text(GTK_ENTRY(priv->d_entry)), -1) == 0)
+            || (d == 0)) {
+            gint end = gtk_entry_get_max_length(GTK_ENTRY(priv->d_entry));
+
+            gtk_infoprintf(NULL, _("Ckct_ib_set_a_value_within_range"), 1,  31);
+
+            /* set day to current day or to orginal value, if one exists */
+            if (priv->d_orig == 0)
+                d = g_date_get_day(&gd);
+            else
+                d = priv->d_orig;
+
+            sprintf(new_val, "%02d", d);
+            gtk_entry_set_text(GTK_ENTRY(priv->d_entry), new_val);
+            gtk_widget_grab_focus(priv->d_entry);
+
+            gtk_editable_select_region(GTK_EDITABLE(priv->d_entry), 0,
+                                       end);
+            priv->valid_value = FALSE;
+        }
+
+        else {
+           /* date is not valid. Check what's wrong and correct it */
+           /* day entry was edited */
+           if (widget == priv->d_entry) {
+              gint l =
+                  gtk_entry_get_max_length(GTK_ENTRY(priv->d_entry));
+              gint c;
+
+              /* set day to 1 */
+              if (d < 1) {
+                  d = 1;
+                  gtk_infoprint(NULL, "Minimum value is 1");
+
+                  sprintf(new_val, "%02d", d);
+                  gtk_entry_set_text(GTK_ENTRY(priv->d_entry),
+                                     new_val);
+                  c = g_utf8_strlen(gtk_entry_get_text
+                                    (GTK_ENTRY(priv->d_entry)), l);
+                  gtk_widget_grab_focus (priv->d_entry);
+                  gtk_editable_select_region(GTK_EDITABLE
+                                             (priv->d_entry), 0, c);
+                  priv->valid_value = FALSE;
+              }
+              /* set day to max number of days in this month */
+              else if (d > g_date_get_days_in_month(m,y)) {
+                  gchar info[256];
+
+                  d = g_date_get_days_in_month(m, y);
+                  g_snprintf(info,256,  "Maximum value is %d", d);
+                  gtk_infoprint(NULL, info);
+
+                  sprintf(new_val, "%02d", d);
+                  gtk_entry_set_text(GTK_ENTRY(priv->d_entry),
+                                     new_val);
+                  c = g_utf8_strlen(gtk_entry_get_text
+                                    (GTK_ENTRY(priv->d_entry)), l);
+                  gtk_widget_grab_focus (priv->d_entry);
+                  gtk_editable_select_region(GTK_EDITABLE
+                                             (priv->d_entry), 0, c);
+                  priv->valid_value = FALSE;
+              }
+          }
+
+          /* month entry was edited */
+          else if (widget == priv->m_entry) {
+              gint l =
+                  gtk_entry_get_max_length(GTK_ENTRY(priv->m_entry));
+              gint c;
+
+              /* set month to 1 */
+              if (m < 1) {
+                  gchar info[256];
+
+                  m = 1;
+                  g_snprintf(info,256,  "Minimum value is 1");
+                  gtk_infoprint(NULL, info);
+
+                  sprintf(new_val, "%02d", m);
+                  gtk_entry_set_text(GTK_ENTRY(priv->m_entry),
+                                     new_val);
+                  c = g_utf8_strlen(gtk_entry_get_text
+                                    (GTK_ENTRY(priv->m_entry)), l);
+                  gtk_widget_grab_focus (priv->m_entry);
+                  gtk_editable_select_region(GTK_EDITABLE
+                                            (priv->m_entry), 0, c);
+                  priv->valid_value = FALSE;
+              }
+              /* set month to 12 */
+              else if (m > 12) {
+                  gchar info[256];
+
+                  m = 12;
+                  g_snprintf(info, 256, "Maximum value is %d", m);
+                  gtk_infoprint(NULL, info);
+                  sprintf(new_val, "%02d", m);
+                  gtk_entry_set_text(GTK_ENTRY(priv->m_entry),
+                                      new_val);
+                  c = g_utf8_strlen(gtk_entry_get_text
+                                    (GTK_ENTRY(priv->m_entry)), l);
+                  gtk_widget_grab_focus (priv->m_entry);
+                  gtk_editable_select_region(GTK_EDITABLE
+                                             (priv->m_entry), 0, c);
+                  priv->valid_value = FALSE;
+              }
+              else if (d > g_date_get_days_in_month(m,y)) {
+                  gchar info[256];
+
+                  d = g_date_get_days_in_month(m, y);
+                  g_snprintf(info,256,  "Maximum value is %d", d);
+                  gtk_infoprint(NULL, info);
+
+                  sprintf(new_val, "%02d", d);
+                  gtk_entry_set_text(GTK_ENTRY(priv->d_entry),
+                          new_val);
+                  c = g_utf8_strlen(gtk_entry_get_text
+                          (GTK_ENTRY(priv->d_entry)), l);
+                  gtk_widget_grab_focus (priv->d_entry);
+                  gtk_editable_select_region(GTK_EDITABLE
+                          (priv->d_entry), 0, c);
+                  priv->valid_value = FALSE;
+              }
+          }
+        }
+    }
+
+    priv->day = d;
+    priv->month = m;
+    priv->year = y;
+
+    /* if month entry has only one character, prepend it with 0 */
+    if (g_utf8_strlen(gtk_entry_get_text(GTK_ENTRY(priv->m_entry)), -1) ==
+        1) {
+        sprintf(new_val, "%02d", m);
+        gtk_entry_set_text(GTK_ENTRY(priv->m_entry), new_val);
+    }
+
+    /* if day entry has only one character, prepend it with 0 */
+    if (g_utf8_strlen(gtk_entry_get_text(GTK_ENTRY(priv->d_entry)), -1) ==
+        1) {
+        sprintf(new_val, "%02d", d);
+        gtk_entry_set_text(GTK_ENTRY(priv->d_entry), new_val);
+    }
+
+    return FALSE;
+}
+
+static void hildon_date_editor_size_request(GtkWidget * widget,
+                                            GtkRequisition * requisition)
+{
+    HildonDateEditor *ed;
+    HildonDateEditorPrivate *priv;
+    GtkRequisition d_req, m_req, y_req, f_req, img_req;
+
+    g_return_if_fail(widget);
+    g_return_if_fail(requisition);
+
+    ed = HILDON_DATE_EDITOR(widget);
+    priv = HILDON_DATE_EDITOR_GET_PRIVATE(ed);
+
+    /* call size request for entries */
+    gtk_widget_size_request(priv->d_entry, &d_req);
+    gtk_widget_size_request(priv->m_entry, &m_req);
+    gtk_widget_size_request(priv->y_entry, &y_req);
+
+    /* set entry widths to width_of_digit * 2 + border */
+    d_req.width = (hildon_date_editor_get_font_width(priv->d_entry) << 1)
+        + ENTRY_BORDERS;
+    m_req.width = (hildon_date_editor_get_font_width(priv->m_entry) << 1)
+        + ENTRY_BORDERS;
+    y_req.width = (hildon_date_editor_get_font_width(priv->y_entry) << 2)
+        + ENTRY_BORDERS;
+
+    gtk_widget_set_size_request(priv->d_entry, d_req.width, d_req.height);
+    gtk_widget_set_size_request(priv->m_entry, m_req.width, m_req.height);
+    gtk_widget_set_size_request(priv->y_entry, y_req.width, y_req.height);
+
+
+    gtk_widget_size_request(priv->frame, &f_req);
+    gtk_widget_size_request(priv->d_event_box_image, &img_req);
+
+    /* calculate our size */
+    requisition->width = f_req.width + img_req.width +
+        widget->style->xthickness * 2;
+    requisition->height = DATE_EDITOR_HEIGHT;
+}
+
+static void hildon_date_editor_size_allocate(GtkWidget * widget,
+                                             GtkAllocation * allocation)
+{
+    HildonDateEditor *ed;
+    HildonDateEditorPrivate *priv;
+    GtkAllocation f_alloc, img_alloc;
+    GtkRequisition req;
+    GtkRequisition max_req;
+
+    g_return_if_fail(widget);
+    g_return_if_fail(allocation);
+
+    ed = HILDON_DATE_EDITOR(widget);
+    priv = HILDON_DATE_EDITOR_GET_PRIVATE(ed);
+
+    widget->allocation = *allocation;
+
+    gtk_widget_size_request(widget, &max_req);
+
+    if (allocation->height > max_req.height)
+        f_alloc.y = img_alloc.y = allocation->y +
+            (allocation->height - max_req.height) / 2;
+    else
+        f_alloc.y = img_alloc.y = allocation->y;
+
+    if (allocation->width > max_req.width)
+        f_alloc.x = img_alloc.x = allocation->x +
+            (allocation->width - max_req.width) / 2;
+    else
+        f_alloc.x = img_alloc.x = allocation->x;
+
+    /* allocate frame */
+    if (priv->frame)
+        if (GTK_WIDGET_VISIBLE(priv->frame)) {
+            gtk_widget_get_child_requisition(priv->frame, &req);
+
+            f_alloc.width = req.width;
+            f_alloc.height = max_req.height;
+            gtk_widget_size_allocate(priv->frame, &f_alloc);
+        }
+
+    /* allocate entry box */
+    if (priv->d_event_box_image)
+        if (GTK_WIDGET_VISIBLE(priv->d_event_box_image)) {
+            gtk_widget_get_child_requisition(priv->d_event_box_image,
+                                             &req);
+
+            img_alloc.x += f_alloc.width;
+            img_alloc.width = req.width;
+            img_alloc.height = max_req.height;
+            gtk_widget_size_allocate(priv->d_event_box_image, &img_alloc);
+        }
+
+/* -1 just to make it look nice -- Hildon --
+ * Same y -value for the label, just does not look good enough.
+ */
+    priv->my_delim->allocation.y =
+        priv->dm_delim->allocation.y = f_alloc.y - 1;
+    gtk_widget_size_allocate(priv->dm_delim, &priv->dm_delim->allocation);
+    gtk_widget_size_allocate(priv->my_delim, &priv->my_delim->allocation);
+}
+
+/* calculate approximate width of a digit */
+static int hildon_date_editor_get_font_width(GtkWidget * widget)
+{
+    PangoContext *context;
+    PangoFontMetrics *metrics;
+    gint digit_width;
+
+    context = gtk_widget_get_pango_context(widget);
+    metrics = pango_context_get_metrics(context, widget->style->font_desc,
+                                        pango_context_get_language
+                                        (context));
+
+    digit_width = pango_font_metrics_get_approximate_digit_width(metrics);
+    digit_width = PANGO_PIXELS(digit_width);
+
+    pango_font_metrics_unref(metrics);
+
+    return digit_width;
+}
diff --git a/hildon-widgets/hildon-date-editor.h b/hildon-widgets/hildon-date-editor.h
new file mode 100644 (file)
index 0000000..ba72c55
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __HILDON_DATE_EDITOR_H__
+#define __HILDON_DATE_EDITOR_H__
+
+#include <gtk/gtkcontainer.h>
+
+G_BEGIN_DECLS
+/**
+ * HILDON_DATE_EDITOR_TYPE:
+ *
+ * Macro for getting type of date editor.
+ */
+#define HILDON_DATE_EDITOR_TYPE ( hildon_date_editor_get_type() )
+#define HILDON_DATE_EDITOR(obj) (GTK_CHECK_CAST (obj,\
+  HILDON_DATE_EDITOR_TYPE, HildonDateEditor))
+#define HILDON_DATE_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass),\
+  HILDON_DATE_EDITOR_TYPE, HildonDateEditorClass))
+#define HILDON_IS_DATE_EDITOR(obj) (GTK_CHECK_TYPE (obj,\
+  HILDON_DATE_EDITOR_TYPE))
+#define HILDON_IS_DATE_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass),\
+  HILDON_DATE_EDITOR_TYPE))
+
+/**
+ * HildonDateEditor:
+ *
+ * Internal struct for date editor.
+ */
+typedef struct _HildonDateEditor HildonDateEditor;
+typedef struct _HildonDateEditorClass HildonDateEditorClass;
+
+struct _HildonDateEditor {
+    GtkContainer par;
+};
+
+struct _HildonDateEditorClass {
+    GtkContainerClass parent_class;
+};
+
+GType hildon_date_editor_get_type(void);
+
+GtkWidget *hildon_date_editor_new(void);
+
+void hildon_date_editor_set_date(HildonDateEditor * date,
+                                 guint year, guint month, guint day);
+
+void hildon_date_editor_get_date(HildonDateEditor * date,
+                                 guint * year, guint * month, guint * day);
+
+
+G_END_DECLS
+#endif
diff --git a/hildon-widgets/hildon-dialoghelp.c b/hildon-widgets/hildon-dialoghelp.c
new file mode 100644 (file)
index 0000000..a3a9738
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/*
+   @file hildon-dialoghelp.c
+
+   This file provides API for the help dialog with
+   the optional icon.
+*/
+
+#include <gdk/gdkx.h>
+#include "hildon-dialoghelp.h"
+
+static guint help_signal = 0;
+
+static GdkFilterReturn
+handle_xevent(GdkXEvent * xevent, GdkEvent * event, gpointer data)
+{
+    XAnyEvent *eventti = xevent;
+
+    if (eventti->type == ClientMessage) {
+        Atom help_atom, wm_atom;
+        Display *disp;
+        XClientMessageEvent *cm;
+
+        disp = GDK_DISPLAY();
+        cm = xevent;
+
+        help_atom = XInternAtom(disp, "_NET_WM_CONTEXT_HELP", True);
+        wm_atom = XInternAtom(disp, "WM_PROTOCOLS", True);
+
+        if (cm->message_type == wm_atom && cm->data.l[0] == help_atom) {
+            /* XClientMessageEvent *cm = xevent; */
+            g_signal_emit(G_OBJECT(data), help_signal, 0);
+        }
+
+        return GDK_FILTER_REMOVE;       /* Event handled, don't process
+                                           further */
+    }
+
+    return GDK_FILTER_CONTINUE; /* Event not handled */
+}
+
+/**
+ * gtk_dialog_help_enable:
+ * @dialog: The dialog of which help is to be enabled.
+ *
+ * Enables context help button for given dialog. The signal "help" can be
+ * connected to handler by normal gtk methods. Note that this function
+ * has to be called before the dialog is shown.
+ **/
+void gtk_dialog_help_enable(GtkDialog * dialog)
+{
+    Atom help_atom;
+    Display *disp;
+    GdkWindow *window;
+
+    if (help_signal == 0) {
+        help_signal = g_signal_new("help",
+                                   G_TYPE_FROM_INSTANCE(GTK_OBJECT
+                                                        (dialog)),
+                                   G_SIGNAL_ACTION, (guint) - 1, NULL,
+                                   NULL, g_cclosure_marshal_VOID__VOID,
+                                   G_TYPE_NONE, 0);
+    }
+
+    g_return_if_fail(GTK_IS_DIALOG(dialog));
+
+    gtk_widget_realize(GTK_WIDGET(dialog));
+    window = GTK_WIDGET(dialog)->window;
+    disp = GDK_WINDOW_XDISPLAY(window);
+
+    help_atom = XInternAtom(disp, "_NET_WM_CONTEXT_HELP", False);
+    XSetWMProtocols(disp, GDK_WINDOW_XID(window), &help_atom, 1);
+    gdk_window_add_filter(window, handle_xevent, dialog);
+}
diff --git a/hildon-widgets/hildon-dialoghelp.h b/hildon-widgets/hildon-dialoghelp.h
new file mode 100644 (file)
index 0000000..dfe455c
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __HILDON_DIALOG_HELP_H__
+#define __HILDON_DIALOG_HELP_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/*#include <gtk/gtk.h>*/
+#include <gtk/gtkdialog.h>
+
+void gtk_dialog_help_enable(GtkDialog * dialog);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* __DIALOG_HELP_H__ */
diff --git a/hildon-widgets/hildon-file-details-dialog.c b/hildon-widgets/hildon-file-details-dialog.c
new file mode 100644 (file)
index 0000000..32686ba
--- /dev/null
@@ -0,0 +1,722 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/* @file hildon-file-details-dialog.c 
+ * 
+ * This file contains API for Hildon File Details dialog.
+ * 
+*/
+
+#include <gtk/gtkbox.h>
+#include <gtk/gtkcheckbutton.h>
+#include <gtk/gtklabel.h>
+#include <gtk/gtknotebook.h>
+#include <gtk/gtktable.h>
+#include <gtk/gtkhbox.h>
+#include <gtk/gtkimage.h>
+#include <time.h>
+#include <libintl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include <hildon-widgets/hildon-caption.h>
+#include <hildon-widgets/hildon-file-system-model.h>
+#include <hildon-widgets/gtk-infoprint.h>
+#include "hildon-file-details-dialog.h"
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#define _(String) dgettext(PACKAGE, String)
+#define HILDON_MARGIN_DEFAULT 6
+#define HILDON_MARGIN_DOUBLE 12
+
+enum
+{
+  PROP_SHOW_TABS = 1,
+  PROP_ADDITIONAL_TAB,
+  PROP_ADDITIONAL_TAB_LABEL,
+  PROP_MODEL
+};
+
+struct _HildonFileDetailsDialogPrivate {
+    GtkNotebook *notebook;
+
+    GtkWidget *file_location, *file_name;
+    GtkWidget *file_type, *file_size;
+    GtkWidget *file_date, *file_time;
+    GtkWidget *file_readonly, *file_device;
+    GtkWidget *file_location_image, *file_device_image;
+    GtkWidget *ok_button;
+
+    GtkTreeRowReference *active_file;
+    gboolean checkbox_original_state;
+    gulong toggle_handler;
+
+    /* Properties */
+    HildonFileSystemModel *model;
+    GtkWidget *tab_label;
+};
+
+static void
+hildon_file_details_dialog_class_init(HildonFileDetailsDialogClass *
+                                      klass);
+static void hildon_file_details_dialog_init(HildonFileDetailsDialog *
+                                            filedetailsdialog);
+static void hildon_file_details_dialog_finalize(GObject * object);
+
+static void
+hildon_file_details_dialog_set_property( GObject *object, guint param_id,
+                                                          const GValue *value,
+                                         GParamSpec *pspec );
+static void
+hildon_file_details_dialog_get_property( GObject *object, guint param_id,
+                                                          GValue *value, GParamSpec *pspec );
+
+static GtkDialogClass *file_details_dialog_parent_class = NULL;
+
+GType hildon_file_details_dialog_get_type(void)
+{
+    static GType file_details_dialog_type = 0;
+
+    if (!file_details_dialog_type) {
+        static const GTypeInfo file_details_dialog_info = {
+            sizeof(HildonFileDetailsDialogClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_file_details_dialog_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonFileDetailsDialog),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_file_details_dialog_init,
+        };
+
+        file_details_dialog_type =
+            g_type_register_static(GTK_TYPE_DIALOG,
+                                   "HildonFileDetailsDialog",
+                                   &file_details_dialog_info,
+                                   0);
+    }
+
+    return file_details_dialog_type;
+}
+
+static void change_state(HildonFileDetailsDialog *self, gboolean readonly)
+{
+  GtkTreeIter iter;
+
+  g_return_if_fail(HILDON_IS_FILE_DETAILS_DIALOG(self));
+
+  if (hildon_file_details_dialog_get_file_iter(self, &iter))
+  {  
+    gchar *path;
+    struct stat buf;
+
+    gtk_tree_model_get(GTK_TREE_MODEL(self->priv->model), &iter, 
+      HILDON_FILE_SYSTEM_MODEL_COLUMN_LOCAL_PATH, &path, -1);    
+
+    /* Here we should set the read only state */
+    if (stat(path, &buf) == 0)
+    {
+      mode_t perm = (readonly ? 
+                        buf.st_mode & ~(S_IWUSR | S_IWGRP | S_IWOTH) : 
+                        buf.st_mode | (S_IWUSR | S_IWGRP));
+
+      (void) chmod(path, perm);
+    }
+
+    /* No errors are defined in the specs, but the previous operations can still fail */
+    if (errno)
+      gtk_infoprint(GTK_WINDOW(self), g_strerror(errno));
+    
+    g_free(path);
+  }
+  else
+    g_assert_not_reached();
+}
+
+/* Cancel changes if read-only is changed */
+static void 
+hildon_file_details_dialog_response(GtkWidget *widget, gint response_id, gpointer data)
+{
+    if (response_id == GTK_RESPONSE_CANCEL)
+    {
+      HildonFileDetailsDialog *self;
+      gboolean state;
+
+      self = HILDON_FILE_DETAILS_DIALOG(widget);  
+      state = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(self->priv->file_readonly));
+
+      if (state != self->priv->checkbox_original_state)
+        change_state(self, self->priv->checkbox_original_state);
+    }
+}
+
+static void
+hildon_file_details_dialog_read_only_toggled(GtkWidget *widget, gpointer data)
+{
+  change_state(HILDON_FILE_DETAILS_DIALOG(data), 
+    gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)));
+}
+
+static void 
+hildon_file_details_dialog_map(GtkWidget *widget)
+{
+  GTK_WIDGET_CLASS(file_details_dialog_parent_class)->map(widget);
+  gtk_widget_grab_focus(HILDON_FILE_DETAILS_DIALOG(widget)->priv->ok_button);
+}
+
+static void
+hildon_file_details_dialog_class_init(HildonFileDetailsDialogClass * klass)
+{
+    GObjectClass *gobject_class;
+
+    file_details_dialog_parent_class = g_type_class_peek_parent(klass);
+    gobject_class = G_OBJECT_CLASS(klass);
+    gobject_class->finalize = hildon_file_details_dialog_finalize;
+    gobject_class->get_property = hildon_file_details_dialog_get_property;
+    gobject_class->set_property = hildon_file_details_dialog_set_property;
+    GTK_WIDGET_CLASS(klass)->map = hildon_file_details_dialog_map;
+    g_type_class_add_private(klass, sizeof(HildonFileDetailsDialogPrivate));
+
+  /**
+   * HildonFileDetailsDialog:additional_tab:
+   *
+   * This is a place for an additional tab.
+   */
+  g_object_class_install_property( gobject_class, PROP_ADDITIONAL_TAB,
+                                   g_param_spec_object("additional-tab",
+                                   "Additional tab",
+                                   "Tab to show additinal information",
+                                   GTK_TYPE_WIDGET, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+  /**
+   * HildonFileDetailsDialog:show_tabs:
+   *
+   * Do we want to show the tab labels.
+   */
+  g_object_class_install_property( gobject_class, PROP_SHOW_TABS,
+                                   g_param_spec_boolean("show-tabs",
+                                   "Show tab labels",
+                                   "Do we want to show the tab label.",
+                                   FALSE, G_PARAM_READWRITE));
+  /**
+   * HildonFileDetailsDialog:additional_tab_label:
+   *
+   * 
+   */
+  g_object_class_install_property( gobject_class, PROP_ADDITIONAL_TAB_LABEL,
+                                   g_param_spec_string("additional-tab-label",
+                                   "Additional tab label",
+                                   "Label to the additional tab",
+                                   NULL, G_PARAM_READWRITE));
+
+  g_object_class_install_property( gobject_class, PROP_MODEL,
+                 g_param_spec_object("model", "Model", 
+                 "HildonFileSystemModel to use when fetching information",
+                 HILDON_TYPE_FILE_SYSTEM_MODEL, G_PARAM_READWRITE));
+}
+
+
+static void
+hildon_file_details_dialog_init(HildonFileDetailsDialog *self)
+{
+    GtkWidget *caption_location, *caption_name, *caption_type;
+    GtkWidget *caption_date, *caption_size, *caption_time;
+    GtkWidget *caption_read, *caption_device;
+    GtkWidget *hbox_location, *hbox_device;
+    GtkTable *table;
+    GtkSizeGroup *group;
+    GdkGeometry geometry;
+
+    HildonFileDetailsDialogPrivate *priv;
+
+    self->priv = priv =
+      G_TYPE_INSTANCE_GET_PRIVATE(self, \
+          HILDON_TYPE_FILE_DETAILS_DIALOG, HildonFileDetailsDialogPrivate);
+
+    priv->notebook = GTK_NOTEBOOK(gtk_notebook_new());
+    table = GTK_TABLE(gtk_table_new(6, 4, FALSE));
+    group = gtk_size_group_new(GTK_SIZE_GROUP_BOTH);
+    
+    priv->tab_label = gtk_label_new(_("sfil_ti_notebook_file"));
+    g_object_ref(priv->tab_label);
+    gtk_object_sink(GTK_OBJECT(priv->tab_label));
+    gtk_widget_show(priv->tab_label);
+
+    gtk_container_set_border_width(GTK_CONTAINER(table), 
+        HILDON_MARGIN_DEFAULT);
+    gtk_table_set_col_spacings(table, HILDON_MARGIN_DOUBLE);
+
+    /* Tab one */
+    caption_device = g_object_new(GTK_TYPE_LABEL, 
+        "label", _("sfil_fi_properties_device_prompt"), "xalign", 1.0f, NULL);
+    caption_location = g_object_new(GTK_TYPE_LABEL,
+        "label", _("sfil_fi_properties_location_prompt"), "xalign", 1.0f, NULL);
+    caption_name = g_object_new(GTK_TYPE_LABEL,
+        "label", _("ckdg_fi_properties_name_prompt"), "xalign", 1.0f, NULL);
+    caption_type = g_object_new(GTK_TYPE_LABEL, 
+        "label", _("ckdg_fi_properties_type_prompt"), "xalign", 1.0f, NULL);
+    caption_date = g_object_new(GTK_TYPE_LABEL,
+        "label", _("ckdg_fi_properties_date_prompt"), "xalign", 1.0f, NULL);
+    caption_time = g_object_new(GTK_TYPE_LABEL, 
+        "label", _("ckdg_fi_properties_time_prompt"), "xalign", 1.0f, NULL);
+
+    priv->file_device = g_object_new(GTK_TYPE_LABEL, "xalign", 0.0f, NULL);
+    priv->file_location = g_object_new(GTK_TYPE_LABEL, "xalign", 0.0f, NULL);
+    priv->file_name = g_object_new(GTK_TYPE_LABEL, "xalign", 0.0f, NULL);
+    priv->file_type = g_object_new(GTK_TYPE_LABEL, "xalign", 0.0f, NULL);
+    priv->file_size = g_object_new(GTK_TYPE_LABEL, "xalign", 0.0f, NULL);
+    priv->file_date = g_object_new(GTK_TYPE_LABEL,"xalign", 0.0f, NULL);
+    priv->file_time = g_object_new(GTK_TYPE_LABEL, "xalign", 0.0f, NULL);
+    priv->file_readonly = gtk_check_button_new();
+
+    /* We have to use caption control also for non-editable object, 
+        because sizings will fail otherwise */
+    caption_size = hildon_caption_new(group, _("ckdg_fi_properties_size_prompt"), 
+      priv->file_size, NULL, HILDON_CAPTION_OPTIONAL);
+    caption_read = hildon_caption_new(group, _("ckdg_fi_properties_read_only"), 
+      priv->file_readonly, NULL, HILDON_CAPTION_OPTIONAL);
+    g_object_unref(group);
+
+    hbox_location = gtk_hbox_new(FALSE, HILDON_MARGIN_DEFAULT);
+    hbox_device = gtk_hbox_new(FALSE, HILDON_MARGIN_DEFAULT);
+
+    priv->file_location_image = gtk_image_new();
+    priv->file_device_image = gtk_image_new();
+
+    gtk_box_pack_start(GTK_BOX(hbox_location), priv->file_location_image, FALSE, TRUE, 0);
+    gtk_box_pack_start(GTK_BOX(hbox_location), priv->file_location, TRUE, TRUE, 0);
+    gtk_box_pack_start(GTK_BOX(hbox_device), priv->file_device_image, FALSE, TRUE, 0);
+    gtk_box_pack_start(GTK_BOX(hbox_device), priv->file_device, TRUE, TRUE, 0);
+
+    /* Labels */
+    gtk_table_attach(table, caption_name, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
+    gtk_table_attach(table, caption_type, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
+    gtk_table_attach(table, caption_location, 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0);
+    gtk_table_attach(table, caption_device, 0, 1, 3, 4, GTK_FILL, GTK_FILL, 0, 0); 
+    gtk_table_attach(table, caption_date, 0, 1, 4, 5, GTK_FILL, GTK_FILL, 0, 0);
+    gtk_table_attach(table, caption_time, 0, 1, 5, 6, GTK_FILL, GTK_FILL, 0, 0);
+    gtk_table_attach(table, caption_size, 2, 3, 4, 5, GTK_SHRINK | GTK_FILL, GTK_FILL, 0, 0);
+    gtk_table_attach(table, caption_read, 2, 4, 5, 6, GTK_SHRINK | GTK_FILL, GTK_FILL, 0, 0);
+
+    /* Data */
+    gtk_table_attach(table, priv->file_name, 1, 4, 0, 1, GTK_SHRINK | GTK_FILL, GTK_FILL, 0, 0);
+    gtk_table_attach(table, priv->file_type, 1, 4, 1, 2, GTK_SHRINK | GTK_FILL, GTK_FILL, 0, 0);
+    gtk_table_attach(table, hbox_location, 1, 4, 2, 3, GTK_SHRINK | GTK_FILL, GTK_FILL, 0, 0);
+    gtk_table_attach(table, hbox_device, 1, 4, 3, 4, GTK_SHRINK | GTK_FILL, GTK_FILL, 0, 0); 
+    gtk_table_attach(table, priv->file_date, 1, 2, 4, 5, GTK_SHRINK | GTK_FILL, GTK_FILL, 0, 0);
+    gtk_table_attach(table, priv->file_time, 1, 2, 5, 6, GTK_SHRINK | GTK_FILL, GTK_FILL, 0, 0);
+
+    /* Populate dialog */
+    gtk_notebook_append_page(priv->notebook, GTK_WIDGET(table), 
+      gtk_label_new(_("sfil_ti_notebook_common")));
+
+    gtk_box_pack_start(GTK_BOX(GTK_DIALOG(self)->vbox),
+                       GTK_WIDGET(priv->notebook), FALSE, TRUE, 0);
+
+    /* From widget specs, generic dialog size */
+    geometry.min_width = 133;
+    geometry.max_width = 602;
+    geometry.min_height = 120;
+    geometry.max_height = 240;
+
+    gtk_window_set_geometry_hints(GTK_WINDOW(self),
+                        GTK_WIDGET(priv->notebook), &geometry,
+                        GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE);
+
+    gtk_widget_show_all(GTK_WIDGET(priv->notebook));
+    priv->ok_button = gtk_dialog_add_button(GTK_DIALOG(self),
+                          _("sfil_bd_filetype_details_dialog_ok"),
+                          GTK_RESPONSE_OK);
+    gtk_dialog_add_button(GTK_DIALOG(self),
+                          _("sfil_bd_filetype_details_dialog_cancel"),
+                          GTK_RESPONSE_CANCEL);
+    gtk_dialog_set_default_response(GTK_DIALOG(self),
+                          GTK_RESPONSE_OK);
+
+    g_signal_connect(self, "response", 
+      G_CALLBACK(hildon_file_details_dialog_response), NULL);
+    priv->toggle_handler = g_signal_connect(priv->file_readonly, "toggled", 
+      G_CALLBACK(hildon_file_details_dialog_read_only_toggled), 
+      self);
+}
+
+static void
+hildon_file_details_dialog_set_property( GObject *object, guint param_id,
+                                                          const GValue *value,
+                                         GParamSpec *pspec )
+{
+  HildonFileDetailsDialogPrivate *priv;
+  GtkNotebook *notebook;
+  GtkLabel *label;
+
+  priv = HILDON_FILE_DETAILS_DIALOG(object)->priv;
+  notebook = priv->notebook;
+  label = GTK_LABEL(priv->tab_label);
+
+  switch( param_id ) 
+  {
+    case PROP_SHOW_TABS:
+    {
+      gtk_notebook_set_show_tabs(notebook, g_value_get_boolean(value));
+      gtk_notebook_set_show_border(notebook, g_value_get_boolean(value));
+/*      g_assert(gtk_notebook_get_n_pages(notebook) == 2);*/
+      break;
+    }
+    case PROP_ADDITIONAL_TAB:
+    {
+      GtkWidget *widget = g_value_get_object(value);
+
+      if (gtk_notebook_get_n_pages(notebook) == 2)
+        gtk_notebook_remove_page(notebook, 1);
+
+      if (widget == NULL)
+      {
+        widget = gtk_label_new(_("sfil_ia_filetype_no_details"));
+        gtk_widget_show(widget);
+      }
+
+      gtk_notebook_append_page(notebook, widget, priv->tab_label);
+      gtk_notebook_set_current_page(notebook, 0);
+      break;
+    }
+    case PROP_ADDITIONAL_TAB_LABEL:
+      gtk_label_set_text(label, g_value_get_string(value));
+      break;
+    case PROP_MODEL:
+    {
+      HildonFileSystemModel *new_model = g_value_get_object(value);
+      if (new_model != priv->model)
+      {
+        if (priv->model)
+          g_object_unref(priv->model);
+        priv->model = new_model;
+        if (new_model)
+          g_object_ref(new_model);
+      }  
+      break;
+    }
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID(object, param_id, pspec);
+      break;
+  }
+}
+
+static void
+hildon_file_details_dialog_get_property( GObject *object, guint param_id,
+                                                          GValue *value, GParamSpec *pspec )
+{
+  HildonFileDetailsDialogPrivate *priv;
+
+  priv = HILDON_FILE_DETAILS_DIALOG(object)->priv;
+
+  switch (param_id) 
+  {
+    case PROP_SHOW_TABS:
+      g_value_set_boolean(value, gtk_notebook_get_show_tabs(priv->notebook));
+      break;
+    case PROP_ADDITIONAL_TAB:
+      g_assert(gtk_notebook_get_n_pages(priv->notebook) == 2);        
+      g_value_set_object(value, gtk_notebook_get_nth_page(priv->notebook, 1));
+      break;
+    case PROP_ADDITIONAL_TAB_LABEL:
+      g_value_set_string(value, gtk_label_get_text(GTK_LABEL(priv->tab_label)));
+      break;
+    case PROP_MODEL:
+      g_value_set_object(value, priv->model);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID(object, param_id, pspec);
+      break;
+  }
+}
+
+static void hildon_file_details_dialog_finalize(GObject * object)
+{
+  HildonFileDetailsDialogPrivate *priv;
+
+  g_return_if_fail(HILDON_IS_FILE_DETAILS_DIALOG(object));
+
+  priv = HILDON_FILE_DETAILS_DIALOG(object)->priv;
+  g_object_unref(priv->model);
+  g_object_unref(priv->tab_label);
+  gtk_tree_row_reference_free(priv->active_file);
+    
+  G_OBJECT_CLASS(file_details_dialog_parent_class)->finalize(object);
+}
+
+/*******************/
+/* Public functions */
+/*******************/
+
+/**
+ * hildon_file_details_dialog_new:
+ * @parent: the parent window.
+ * @filename: the filename.
+ *
+ * Creates a new #hildon_file_details_dialog AND new underlying 
+ * HildonFileSystemModel. Be carefull with #filename
+ * parameter: You don't get any notification if something fails.
+ * THIS FUNCTION IS DEPRICATED AND PROVIDED ONLY FOR
+ * BACKWARDS COMPABILITY.
+ *
+ * Returns: a new #HildonFileDetailsDialog.
+ */
+GtkWidget *hildon_file_details_dialog_new(GtkWindow * parent,
+                                          const gchar * filename)
+{
+  HildonFileDetailsDialog *dialog;
+  HildonFileSystemModel *model;
+  GtkTreeIter iter;
+
+  model = g_object_new(HILDON_TYPE_FILE_SYSTEM_MODEL, NULL);
+
+  dialog =
+        g_object_new(HILDON_TYPE_FILE_DETAILS_DIALOG, 
+          "has-separator", FALSE, "title", _("sfil_ti_file_details"), 
+          "model", model, NULL);
+
+  if (filename && filename[0] && 
+    hildon_file_system_model_load_local_path(dialog->priv->model, filename, &iter))
+      hildon_file_details_dialog_set_file_iter(dialog, &iter);
+
+  if (parent)
+    gtk_window_set_transient_for(GTK_WINDOW(dialog), parent);
+
+  return GTK_WIDGET(dialog);
+}
+
+/**
+ * hildon_file_details_dialog_new_with_model:
+ * @parent: the parent window.
+ * @model: a #HildonFileSystemModel object used to fetch data.
+ *
+ * This is the preferred way to create #HildonFileDetailsDialog.
+ * You can use a shared model structure to save loading times
+ * (because you probably already have one at your disposal).
+ *
+ * Returns: a new #HildonFileDetailsDialog.
+ */
+GtkWidget *hildon_file_details_dialog_new_with_model(GtkWindow *parent,
+  HildonFileSystemModel *model)
+{
+  GtkWidget *dialog;
+
+  dialog = g_object_new(HILDON_TYPE_FILE_DETAILS_DIALOG,
+    "has-separator", FALSE, "title", _("sfil_ti_file_details"), 
+    "model", model, NULL);
+
+  if (parent)
+    gtk_window_set_transient_for(GTK_WINDOW(dialog), parent);
+
+  return dialog;
+}
+
+/**
+ * hildon_file_details_dialog_set_file_iter:
+ * @self: a #HildonFileDetailsDialog.
+ * @iter: a #GtkTreeIter pointing to desired file.
+ *
+ * Sets the dialog to display information about a file defined by
+ * given iterator.
+ */
+void hildon_file_details_dialog_set_file_iter(HildonFileDetailsDialog *self, GtkTreeIter *iter)
+{
+  GtkTreeModel *model;
+  GtkTreePath *path;
+  GtkTreeIter temp_iter, parent_iter;
+  gchar *name, *mime, *local_path;
+  const gchar *fmt;
+  gint64 time_stamp, size;
+  gchar buffer[256];
+  struct tm *time_struct;
+  time_t time_val;
+  gint type;
+  gboolean location_readonly = TRUE;
+
+  g_return_if_fail(HILDON_IS_FILE_DETAILS_DIALOG(self));
+
+  model = GTK_TREE_MODEL(self->priv->model);
+
+  /* Save iterator to priv struct as row reference */
+  gtk_tree_row_reference_free(self->priv->active_file);
+  path = gtk_tree_model_get_path(model, iter);
+  self->priv->active_file = gtk_tree_row_reference_new(model, path);
+  gtk_tree_path_free(path);
+
+  /* Setup the view */
+  gtk_tree_model_get(model, iter,
+    HILDON_FILE_SYSTEM_MODEL_COLUMN_DISPLAY_NAME, &name,
+    HILDON_FILE_SYSTEM_MODEL_COLUMN_MIME_TYPE, &mime,
+    HILDON_FILE_SYSTEM_MODEL_COLUMN_LOCAL_PATH, &local_path,
+    HILDON_FILE_SYSTEM_MODEL_COLUMN_FILE_SIZE, &size,
+    HILDON_FILE_SYSTEM_MODEL_COLUMN_FILE_TIME, &time_stamp,
+    -1);
+
+  g_object_set(self->priv->file_name, "label", name, NULL);
+  g_object_set(self->priv->file_type, "label", mime, NULL);
+
+  if (size < 1024)
+    g_snprintf(buffer, sizeof(buffer),
+               _("ckdg_va_properties_size_bytes"), (gint) size);
+  else
+    g_snprintf(buffer, sizeof(buffer),
+               _("ckdg_va_properties_size_kb"), (gint) size / 1024);
+
+  g_object_set(self->priv->file_size, "label", buffer, NULL);
+
+  /* Too bad. We cannot use GDate function, because it doesn't handle
+      time, just dates */
+  time_val = (time_t) time_stamp;
+  time_struct = localtime(&time_val);
+
+  /* There are no more logical names for these. We are allowed
+      to hardcode */
+  strftime(buffer, sizeof(buffer), "%X", time_struct);
+  g_object_set(self->priv->file_time, "label", buffer, NULL);
+  
+  /* If format is passed directly to strftime, gcc complains about
+      that some locales use only 2 digit year numbers. Using
+      a temporary disable this warning (from strftime man page) */
+  fmt = "%x";
+  strftime(buffer, sizeof(buffer), fmt, time_struct);
+  g_object_set(self->priv->file_date, "label", buffer, NULL);
+
+  /* Parent information */
+  if (gtk_tree_model_iter_parent(model, &parent_iter, iter))
+  {
+    gchar *location_name, *parent_path;
+    GdkPixbuf *location_icon;
+
+    gtk_tree_model_get(model, &parent_iter,
+      HILDON_FILE_SYSTEM_MODEL_COLUMN_DISPLAY_NAME, &location_name,
+      HILDON_FILE_SYSTEM_MODEL_COLUMN_LOCAL_PATH, &parent_path,
+      HILDON_FILE_SYSTEM_MODEL_COLUMN_ICON, &location_icon, -1);      
+
+    if (parent_path)
+      location_readonly = access(parent_path, W_OK)  != 0;
+
+    gtk_label_set_text(GTK_LABEL(self->priv->file_location), location_name);
+    gtk_image_set_from_pixbuf(GTK_IMAGE(self->priv->file_location_image), 
+      location_icon);
+
+    g_object_unref(location_icon);
+    g_free(location_name);
+
+    /* Go upwards in model until we find a device node */
+    while (TRUE)
+    {
+      gtk_tree_model_get(model, &parent_iter,
+        HILDON_FILE_SYSTEM_MODEL_COLUMN_TYPE, &type, -1);
+
+      if (type >= HILDON_FILE_SYSTEM_MODEL_MMC)
+        break;
+
+      if (gtk_tree_model_iter_parent(model, &temp_iter, &parent_iter))
+        parent_iter = temp_iter;
+      else 
+        break;
+    }   
+
+    gtk_tree_model_get(model, &parent_iter,
+      HILDON_FILE_SYSTEM_MODEL_COLUMN_DISPLAY_NAME, &location_name, 
+      HILDON_FILE_SYSTEM_MODEL_COLUMN_ICON, &location_icon, 
+      -1);
+
+    gtk_label_set_text(GTK_LABEL(self->priv->file_device), location_name);
+    gtk_image_set_from_pixbuf(GTK_IMAGE(self->priv->file_device_image), 
+      location_icon);
+
+    g_object_unref(location_icon);
+    g_free(location_name);
+    g_free(parent_path);
+  }
+  else 
+  {   /* We really should not come here */
+      gtk_label_set_text(GTK_LABEL(self->priv->file_location), "");
+      gtk_image_set_from_pixbuf(GTK_IMAGE(self->priv->file_location_image), NULL);
+      gtk_label_set_text(GTK_LABEL(self->priv->file_device), "");
+      gtk_image_set_from_pixbuf(GTK_IMAGE(self->priv->file_device_image), NULL);
+  }
+
+  /* We do not want initial setting to cause any action */
+  g_signal_handler_block(self->priv->file_readonly, self->priv->toggle_handler);
+
+  if (local_path)
+  {
+    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(self->priv->file_readonly), 
+      location_readonly || access(local_path, W_OK)  != 0);
+    gtk_widget_set_sensitive(self->priv->file_readonly, !location_readonly);
+  }
+  else  
+  {
+      /* Backend do not support setting permissions, so we 
+          cannot do anything for paths that are not local */
+    gtk_toggle_button_set_inconsistent(
+        GTK_TOGGLE_BUTTON(self->priv->file_readonly), TRUE);
+    gtk_widget_set_sensitive(self->priv->file_readonly, FALSE);
+  }
+
+  self->priv->checkbox_original_state = gtk_toggle_button_get_active(
+        GTK_TOGGLE_BUTTON(self->priv->file_readonly));
+
+  g_signal_handler_unblock(self->priv->file_readonly, self->priv->toggle_handler);
+
+  g_free(local_path);
+  g_free(name);
+  g_free(mime);
+}
+
+/**
+ * hildon_file_details_dialog_get_file_iter:
+ * @self: a #HildonFileDetailsDialog.
+ * @iter: a #GtkTreeIter to be filled.
+ *
+ * Gets an iterator pointing to displayed file.
+ *
+ * Returns: %TRUE, if dialog is displaying some information.
+ */
+gboolean 
+hildon_file_details_dialog_get_file_iter(HildonFileDetailsDialog *self, GtkTreeIter *iter)
+{
+  GtkTreePath *path;
+  gboolean result;
+
+  g_return_val_if_fail(HILDON_IS_FILE_DETAILS_DIALOG(self), FALSE);
+
+  if (!self->priv->active_file)
+    return FALSE;
+  path = gtk_tree_row_reference_get_path(self->priv->active_file);
+  if (!path)
+    return FALSE;
+  
+  result = gtk_tree_model_get_iter(GTK_TREE_MODEL(self->priv->model), iter, path);
+  gtk_tree_path_free(path);  
+
+  return result;
+}
diff --git a/hildon-widgets/hildon-file-details-dialog.h b/hildon-widgets/hildon-file-details-dialog.h
new file mode 100644 (file)
index 0000000..bc724fd
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __HILDON_FILE_DETAILS_DIALOG_H__
+#define __HILDON_FILE_DETAILS_DIALOG_H__
+
+#include <gtk/gtkdialog.h>
+#include <gtk/gtktreemodel.h>
+#include <hildon-widgets/hildon-file-system-model.h>
+
+G_BEGIN_DECLS
+
+#define HILDON_TYPE_FILE_DETAILS_DIALOG \
+  (hildon_file_details_dialog_get_type ())
+#define HILDON_FILE_DETAILS_DIALOG(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST ((obj), HILDON_TYPE_FILE_DETAILS_DIALOG,\
+   HildonFileDetailsDialog))
+#define HILDON_FILE_DETAILS_DIALOG_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST ((klass), HILDON_TYPE_FILE_DETAILS_DIALOG,\
+   HildonFileDetailsDialogClass))
+#define HILDON_IS_FILE_DETAILS_DIALOG(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HILDON_TYPE_FILE_DETAILS_DIALOG))
+#define HILDON_IS_FILE_DETAILS_DIALOG_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_FILE_DETAILS_DIALOG))
+#define HILDON_FILE_DETAILS_DIALOG_GET_CLASS(obj) \
+  (G_TYPE_INSTANCE_GET_CLASS ((obj), HILDON_TYPE_FILE_DETAILS_DIALOG,\
+   HildonFileDetailsDialogClass))
+
+typedef struct _HildonFileDetailsDialog HildonFileDetailsDialog;
+typedef struct _HildonFileDetailsDialogPrivate HildonFileDetailsDialogPrivate;
+typedef struct _HildonFileDetailsDialogClass HildonFileDetailsDialogClass;
+
+struct _HildonFileDetailsDialog {
+  GtkDialog parent;
+  HildonFileDetailsDialogPrivate *priv;
+};
+
+struct _HildonFileDetailsDialogClass {
+  GtkDialogClass parent_class;
+};
+
+GType hildon_file_details_dialog_get_type(void) G_GNUC_CONST;
+
+/* Depricated constructor... */
+GtkWidget *hildon_file_details_dialog_new(GtkWindow * parent,
+  const gchar * filename);
+
+/* New API inspired by GtkComboBox */
+GtkWidget *hildon_file_details_dialog_new_with_model(GtkWindow *parent,
+  HildonFileSystemModel *model);
+
+void hildon_file_details_dialog_set_file_iter(HildonFileDetailsDialog *self, GtkTreeIter *iter);
+gboolean hildon_file_details_dialog_get_file_iter(HildonFileDetailsDialog *self, GtkTreeIter *iter);
+
+G_END_DECLS
+
+#endif /* __HILDON_FILEDETAILS_H__ */
diff --git a/hildon-widgets/hildon-file-handling-note.c b/hildon-widgets/hildon-file-handling-note.c
new file mode 100644 (file)
index 0000000..eac79d4
--- /dev/null
@@ -0,0 +1,350 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include "hildon-note.h"
+#include "hildon-file-handling-note.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <gtk/gtk.h>
+#include <libintl.h>
+#include <glib.h>
+#include <glib-object.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+/* Note types */
+#define MOVING_TYPE 0
+#define DELETING_TYPE 1
+#define OPENING_TYPE 2
+#define SAVING_TYPE 3
+
+#define _(String) dgettext(PACKAGE, String)
+
+#define HILDON_FILE_HANDLING_NOTE_GET_PRIVATE(obj)\
+        (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
+        HILDON_TYPE_FILE_HANDLING_NOTE, HildonFileHandlingNotePrivate));
+
+static HildonNote *parent_class;
+
+typedef struct _HildonFileHandlingNotePrivate
+    HildonFileHandlingNotePrivate;
+
+
+static void
+hildon_file_handling_note_class_init(HildonFileHandlingNoteClass * class);
+
+static void hildon_file_handling_note_init(HildonFileHandlingNote *
+                                           dialog);
+
+static void hildon_file_handling_note_finalize(GObject * obj_self);
+
+
+struct _HildonFileHandlingNotePrivate {
+    guint note_type;
+};
+
+
+GType hildon_file_handling_note_get_type()
+{
+    static GType dialog_type = 0;
+
+    if (!dialog_type) {
+        static const GTypeInfo dialog_info = {
+            sizeof(HildonFileHandlingNoteClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_file_handling_note_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonFileHandlingNote),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_file_handling_note_init
+        };
+
+        dialog_type = g_type_register_static(HILDON_TYPE_NOTE,
+                                             "HildonFileHandlingNote",
+                                             &dialog_info, 0);
+    }
+    return dialog_type;
+}
+
+static void
+hildon_file_handling_note_class_init(HildonFileHandlingNoteClass * class)
+{
+    GObjectClass *object_class = G_OBJECT_CLASS(class);
+
+    parent_class = g_type_class_peek_parent(class);
+    g_type_class_add_private(class, sizeof(HildonFileHandlingNotePrivate));
+    object_class->finalize = hildon_file_handling_note_finalize;
+}
+
+static void hildon_file_handling_note_init(HildonFileHandlingNote * dialog)
+{
+    HildonFileHandlingNotePrivate *priv;
+
+    priv = HILDON_FILE_HANDLING_NOTE_GET_PRIVATE(dialog);
+    priv->note_type = OPENING_TYPE;
+}
+
+static void hildon_file_handling_note_finalize(GObject * obj_self)
+{
+    if (G_OBJECT_CLASS(parent_class)->finalize)
+        G_OBJECT_CLASS(parent_class)->finalize(obj_self);
+}
+
+/**
+ * hildon_file_handling_note_set_counter_and_name:
+ * @note: the #HildonFileHandlingNote widget
+ * @current: Current item
+ * @maximum: Maximum value for counter
+ * @name: Filename
+ *
+ * This function sets current counter value, maximum
+ * counter value and filename for dialog
+ */
+void hildon_file_handling_note_set_counter_and_name(HildonFileHandlingNote
+                                                    * note, guint current,
+                                                    guint maximum,
+                                                    const gchar * name)
+{
+    gchar str[255];
+    HildonNote *p_note = HILDON_NOTE(note);
+    HildonFileHandlingNotePrivate *priv;
+
+    priv = HILDON_FILE_HANDLING_NOTE_GET_PRIVATE(note);
+
+    if (priv->note_type == MOVING_TYPE) {
+      if (maximum == 1)
+        {
+          g_snprintf(str, 255, _("sfil_nw_moving_file"), name);
+          hildon_note_set_button_text(p_note, _("sfil_bd_moving_file"));
+        } else {
+          g_snprintf(str, 255, _("docm_nw_moving_files"),
+                     current, maximum, name);
+          hildon_note_set_button_text(p_note, _("docm_bd_moving_files"));
+        }
+    } else if (priv->note_type == SAVING_TYPE) {
+      if (maximum == 1)
+        {
+          g_snprintf(str, 255, _("docm_nw_saving_file"), name);
+          hildon_note_set_button_text(p_note, _("docm_bd_saving_file"));
+        } else {
+          g_snprintf(str, 255, _("docm_nw_saving_files"),
+                   current, maximum, name);
+          hildon_note_set_button_text(p_note, _("docm_bd_saving_files"));
+        }
+    } else if (priv->note_type == OPENING_TYPE) {
+      if (maximum == 1)
+        {
+          g_snprintf(str, 255, _("docm_nw_opening_file"), name);
+          hildon_note_set_button_text(p_note, _("docm_bd_opening_file"));
+        } else {
+          g_snprintf(str, 255, _("docm_nw_opening_files"),
+                     current, maximum, name);
+          hildon_note_set_button_text(p_note, _("docm_bd_opening_files"));
+        }
+    } else if (priv->note_type == DELETING_TYPE) {
+      if (maximum == 1)
+        {
+          g_snprintf(str, 255, _("docm_nw_deleting_file"), name);
+          hildon_note_set_button_text(p_note, _("docm_bd_deleting_file"));
+        } else {
+          g_snprintf(str, 255, _("docm_nw_deleting_files"),
+                     current, maximum, name);
+          hildon_note_set_button_text(p_note, _("docm_bd_deleting_files"));
+        }
+    }
+
+    g_object_set(p_note, "description", str, NULL);
+}
+
+/**
+ * hildon_file_handling_note_set_name:
+ * @note: the @HildonFileHandlingNote widget
+ * @name: Filename
+ *
+ * This function sets filename for dialog
+ */
+void hildon_file_handling_note_set_name(HildonFileHandlingNote * note,
+                                        const gchar * name)
+{
+    gchar str[255];
+    HildonNote *p_note = HILDON_NOTE(note);
+    HildonFileHandlingNotePrivate *priv =
+        HILDON_FILE_HANDLING_NOTE_GET_PRIVATE(note);
+
+    if (priv->note_type == MOVING_TYPE) {
+        g_snprintf(str, 255, _("sfil_nw_moving_file"), name);
+    } else if (priv->note_type == SAVING_TYPE) {
+        g_snprintf(str, 255, _("docm_nw_saving_file"), name);
+    } else if (priv->note_type == OPENING_TYPE) {
+        g_snprintf(str, 255, _("docm_nw_opening_file"), name);
+    } else if (priv->note_type == DELETING_TYPE) {
+        g_snprintf(str, 255, _("docm_nw_deleting_file"), name);
+    }
+
+    g_object_set(p_note, "description", str, NULL);
+}
+
+/**
+ * hildon_file_handling_note_set_fraction:
+ * @note: the @HildonFileHandlingNote widget
+ * @frac: value for progress bar
+
+ * This function sets fraction value for
+ * progress bar.
+ */
+void hildon_file_handling_note_set_fraction(HildonFileHandlingNote * note,
+                                            gfloat frac)
+{
+    GtkWidget *progbar;
+
+    g_object_get(note, "progressbar", &progbar, NULL);
+    gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progbar), frac);
+}
+
+/**
+ * hildon_file_handling_note_new_moving:
+ * @parent: parent GtkWindow 
+ *
+ * This function creates new dialog
+ * which is "moving" type.
+ *
+ * Return value: a new #HildonFileHandlingNote.
+ */
+GtkWidget *hildon_file_handling_note_new_moving(GtkWindow * parent)
+{
+    GtkWidget *progbar;
+    HildonFileHandlingNote *file_note;
+    HildonFileHandlingNotePrivate *priv;
+
+    progbar = gtk_progress_bar_new();
+
+    file_note = g_object_new(HILDON_TYPE_FILE_HANDLING_NOTE,
+                             "note_type", HILDON_NOTE_PROGRESSBAR_TYPE,
+                             "description", _("Moving..."),
+                             "progressbar", progbar, NULL);
+
+    priv = HILDON_FILE_HANDLING_NOTE_GET_PRIVATE(file_note);
+    priv->note_type = MOVING_TYPE;
+
+    if (parent != NULL)
+        gtk_window_set_transient_for(GTK_WINDOW(file_note), parent);
+
+    return GTK_WIDGET(file_note);
+}
+
+/**
+ * hildon_file_handling_note_new_deleting:
+ * @parent: parent GtkWindow 
+ *
+ * This function creates new dialog
+ * which is "deleting" type.
+ *
+ * Return value: a new #HildonFileHandlingNote.
+ */
+GtkWidget *hildon_file_handling_note_new_deleting(GtkWindow * parent)
+{
+    GtkWidget *progbar;
+    HildonFileHandlingNote *file_note;
+    HildonFileHandlingNotePrivate *priv;
+
+    progbar = gtk_progress_bar_new();
+
+    file_note = g_object_new(HILDON_TYPE_FILE_HANDLING_NOTE,
+                             "note_type", HILDON_NOTE_PROGRESSBAR_TYPE,
+                             "description", _("Deleting..."),
+                             "progressbar", progbar, NULL);
+
+    priv = HILDON_FILE_HANDLING_NOTE_GET_PRIVATE(file_note);
+    priv->note_type = DELETING_TYPE;
+
+    if (parent != NULL)
+        gtk_window_set_transient_for(GTK_WINDOW(file_note), parent);
+
+    return GTK_WIDGET(file_note);
+}
+
+/**
+ * hildon_file_handling_note_new_opening:
+ * @parent: parent GtkWindow 
+ *
+ * This function creates new dialog
+ * which is "opening" type
+ *
+ * Return value: a new #HildonFileHandlingNote.
+ */
+GtkWidget *hildon_file_handling_note_new_opening(GtkWindow * parent)
+{
+    GtkWidget *progbar;
+    HildonFileHandlingNote *file_note;
+    HildonFileHandlingNotePrivate *priv;
+
+    progbar = gtk_progress_bar_new();
+
+    file_note = g_object_new(HILDON_TYPE_FILE_HANDLING_NOTE,
+                             "note_type", HILDON_NOTE_PROGRESSBAR_TYPE,
+                             "description", _("Opening..."),
+                             "progressbar", progbar, NULL);
+
+    priv = HILDON_FILE_HANDLING_NOTE_GET_PRIVATE(file_note);
+    priv->note_type = OPENING_TYPE;
+
+    if (parent != NULL)
+        gtk_window_set_transient_for(GTK_WINDOW(file_note), parent);
+
+    return GTK_WIDGET(file_note);
+}
+
+/**
+ * hildon_file_handling_note_new_saving:
+ * @parent: parent GtkWindow 
+ *
+ * This function creates new dialog
+ * which is "saving" type.
+ *
+ * Return value: a new #HildonFileHandlingNote.
+ */
+GtkWidget *hildon_file_handling_note_new_saving(GtkWindow * parent)
+{
+    GtkWidget *progbar;
+    HildonFileHandlingNote *file_note;
+    HildonFileHandlingNotePrivate *priv;
+
+    progbar = gtk_progress_bar_new();
+    file_note = g_object_new(HILDON_TYPE_FILE_HANDLING_NOTE,
+                             "note_type", HILDON_NOTE_PROGRESSBAR_TYPE,
+                             "description", _("Saving..."),
+                             "progressbar", progbar, NULL);
+
+    priv = HILDON_FILE_HANDLING_NOTE_GET_PRIVATE(file_note);
+    priv->note_type = SAVING_TYPE;
+
+    if (parent != NULL)
+        gtk_window_set_transient_for(GTK_WINDOW(file_note), parent);
+
+    return GTK_WIDGET(file_note);
+}
diff --git a/hildon-widgets/hildon-file-handling-note.h b/hildon-widgets/hildon-file-handling-note.h
new file mode 100644 (file)
index 0000000..29d3fd0
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+#ifndef __HILDON_FILE_HANDLING_NOTE_H__
+#define __HILDON_FILE_HANDLING_NOTE_H__
+
+#include "hildon-note.h"
+
+G_BEGIN_DECLS
+#define HILDON_TYPE_FILE_HANDLING_NOTE \
+  ( hildon_file_handling_note_get_type() )
+#define HILDON_FILE_HANDLING_NOTE(obj) \
+  (GTK_CHECK_CAST (obj, HILDON_TYPE_FILE_HANDLING_NOTE,\
+   HildonFileHandlingNote))
+#define HILDON_FILE_HANDLING_NOTE_CLASS(klass) \
+  (GTK_CHECK_CLASS_CAST ((klass), HILDON_TYPE_FILE_HANDLING_NOTE,\
+   HildonFileHandlingNoteClass))
+#define HILDON_IS_FILE_HANDLING_NOTE(obj) (GTK_CHECK_TYPE (obj,\
+  HILDON_TYPE_FILE_HANDLING_NOTE))
+#define HILDON_IS_FILE_HANDLING_NOTE_CLASS(klass) \
+  (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_FILE_HANDLING_NOTE))
+typedef struct _HildonFileHandlingNote HildonFileHandlingNote;
+typedef struct _HildonFileHandlingNoteClass HildonFileHandlingNoteClass;
+
+struct _HildonFileHandlingNote {
+    HildonNote parent;
+};
+
+struct _HildonFileHandlingNoteClass {
+    HildonNoteClass parent_class;
+};
+
+/* Note creation functions */
+GtkWidget *hildon_file_handling_note_new_moving(GtkWindow * parent);
+GtkWidget *hildon_file_handling_note_new_deleting(GtkWindow * parent);
+GtkWidget *hildon_file_handling_note_new_opening(GtkWindow * parent);
+GtkWidget *hildon_file_handling_note_new_saving(GtkWindow * parent);
+
+/* Function for progressbar status setting */
+void hildon_file_handling_note_set_fraction(HildonFileHandlingNote * note,
+                                            gfloat frac);
+void hildon_file_handling_note_set_counter_and_name(HildonFileHandlingNote
+                                                    * note, guint current,
+                                                    guint maximum,
+                                                    const gchar * name);
+void hildon_file_handling_note_set_name(HildonFileHandlingNote * note,
+                                        const gchar * name);
+
+GType hildon_file_handling_note_get_type(void);
+
+G_END_DECLS
+#endif /* __HILDON_NOTE_H__ */
diff --git a/hildon-widgets/hildon-find-object-dialog.c b/hildon-widgets/hildon-find-object-dialog.c
new file mode 100644 (file)
index 0000000..63e1947
--- /dev/null
@@ -0,0 +1,355 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <glib.h>
+#include <gtk/gtk.h>
+#include <errno.h>
+#include <string.h>
+#include <strings.h>
+#include <unistd.h>
+#include <stdio.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <libintl.h>
+
+#include <hildon-find-object-dialog.h>
+#include <hildon-search.h>
+
+#define _(String) dgettext(PACKAGE, String)
+#define MAX_ERR_MSG 256
+
+#define HILDON_FIND_OBJECT_DIALOG_WIDTH 370
+#define HILDON_FIND_OBJECT_DIALOG_HEIGHT 100
+
+static GtkDialogClass *parent_class;
+
+typedef struct _HildonFindObjectDialogPrivate
+    HildonFindObjectDialogPrivate;
+struct _HildonFindObjectDialogPrivate {
+    GtkButton *findButton;
+    GtkButton *closeButton;
+    GtkButton *optionsButton;
+    GtkLabel *label;
+    HildonSearch *search;
+    GtkComboBoxEntry *combo;
+    GtkDialog *optionsDialog;
+};
+
+#define HILDON_FIND_OBJECT_DIALOG_GET_PRIVATE(o)  \
+   (G_TYPE_INSTANCE_GET_PRIVATE ((o), HILDON_TYPE_FIND_OBJECT_DIALOG,\
+    HildonFindObjectDialogPrivate))
+
+static void
+hildon_find_object_dialog_class_init(HildonFindObjectDialogClass * class);
+static void hildon_find_object_dialog_init(HildonFindObjectDialog *
+                                           widget);
+static void hildon_find_object_dialog_finalize(GObject * obj_self);
+static void open_options_dialog(GtkWidget * widget,
+                                HildonFindObjectDialog * dialog);
+static void hildon_find_object_dialog_response_cb(HildonFindObjectDialog *
+                                                  dialog, gint response,
+                                                  gpointer data);
+static void hildon_find_object_options_dialog_response_cb(GtkDialog *
+                                                          dialog,
+                                                          gint response,
+                                                          gpointer data);
+
+static void
+hildon_find_object_dialog_class_init(HildonFindObjectDialogClass * class)
+{
+    GObjectClass *object_class = G_OBJECT_CLASS(class);
+
+    parent_class = g_type_class_peek_parent(class);
+    object_class->finalize = hildon_find_object_dialog_finalize;
+
+    g_type_class_add_private(class, sizeof(HildonFindObjectDialogPrivate));
+}
+
+static void hildon_find_object_dialog_finalize(GObject * obj_self)
+{
+    HildonFindObjectDialog *self;
+    g_return_if_fail(HILDON_IS_FIND_OBJECT_DIALOG(obj_self));
+    self = HILDON_FIND_OBJECT_DIALOG(obj_self);
+
+    if (G_OBJECT_CLASS(parent_class)->finalize)
+        G_OBJECT_CLASS(parent_class)->finalize(obj_self);
+}
+
+static void
+add_to_history(GtkEntry * entry, HildonFindObjectDialog * dialog)
+{
+
+    GtkTreeModel *model;
+    GtkTreeIter iter;
+    gchar *new_text;
+    gchar *str_data;
+    gint string_pos = 0;
+    gboolean string_found = FALSE;
+    gint count = 0;
+    gboolean has_next;
+    HildonFindObjectDialogPrivate *priv =
+        HILDON_FIND_OBJECT_DIALOG_GET_PRIVATE(dialog);
+
+    new_text = g_strdup((gchar *) gtk_entry_get_text(GTK_ENTRY(entry)));
+    model = gtk_combo_box_get_model(GTK_COMBO_BOX(priv->combo));
+
+    if (strlen(new_text) == 0) {
+
+    } else {
+        has_next = gtk_tree_model_get_iter_first(model, &iter);
+        while (has_next) {
+            gtk_tree_model_get(model, &iter, 0, &str_data, -1);
+            count++;
+            if (strcasecmp(new_text, str_data) == 0) {
+                string_found = TRUE;
+                string_pos = count;
+            }
+            has_next = gtk_tree_model_iter_next(model, &iter);
+            g_free(str_data);
+        }
+        if ((string_found)) {
+            gtk_combo_box_remove_text(GTK_COMBO_BOX(priv->combo),
+                                      string_pos - 1);
+        } else if (count >= 4) {
+            gtk_combo_box_remove_text(GTK_COMBO_BOX(priv->combo), count - 1);
+        }
+    }
+
+    /* This has to be done like this, because otherwise gtkcombobox will
+       return wrong value to the user when getting the currently selected
+       item. */
+    gtk_combo_box_prepend_text(GTK_COMBO_BOX(priv->combo), new_text);
+    gtk_entry_set_text(GTK_ENTRY(entry), new_text);
+    g_free(new_text);
+}
+
+
+static void hildon_find_object_dialog_init(HildonFindObjectDialog * dialog)
+{
+
+    HildonFindObjectDialogPrivate *priv =
+        HILDON_FIND_OBJECT_DIALOG_GET_PRIVATE(dialog);
+
+    gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
+
+    gtk_window_set_title(GTK_WINDOW(dialog), _("Find"));
+
+    priv->findButton = GTK_BUTTON(gtk_dialog_add_button(GTK_DIALOG(dialog),
+                                                        _("Find"),
+                                                        GTK_RESPONSE_OK));
+
+    priv->optionsButton =
+        GTK_BUTTON(gtk_button_new_with_label(_("Options")));
+    gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->action_area),
+                       GTK_WIDGET(priv->optionsButton), FALSE, TRUE, 0);
+
+    priv->closeButton =
+        GTK_BUTTON(gtk_dialog_add_button
+                   (GTK_DIALOG(dialog), _("Close"), GTK_RESPONSE_CANCEL));
+
+    priv->search = HILDON_SEARCH(hildon_search_new("gtk-find"));
+    priv->combo = GTK_COMBO_BOX_ENTRY(gtk_combo_box_entry_new_text());
+
+    gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),
+                       GTK_WIDGET(priv->search), FALSE, FALSE, 0);
+    gtk_container_add(GTK_CONTAINER(priv->search), GTK_WIDGET(priv->combo));
+
+    priv->label = GTK_LABEL(gtk_label_new(NULL));
+    gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),
+                       GTK_WIDGET(priv->label), FALSE, FALSE, 0);
+
+    gtk_window_resize(GTK_WINDOW(dialog),
+                      HILDON_FIND_OBJECT_DIALOG_WIDTH,
+                      HILDON_FIND_OBJECT_DIALOG_HEIGHT);
+
+    gtk_widget_show_all(GTK_DIALOG(dialog)->vbox);
+    gtk_widget_show_all(GTK_DIALOG(dialog)->action_area);
+
+}
+
+static void
+open_options_dialog(GtkWidget * widget, HildonFindObjectDialog * dialog)
+{
+
+    HildonFindObjectDialogPrivate *priv;
+    priv = HILDON_FIND_OBJECT_DIALOG_GET_PRIVATE(dialog);
+    g_return_if_fail(GTK_IS_DIALOG(priv->optionsDialog));
+
+    g_signal_connect(G_OBJECT(priv->optionsDialog), "response",
+                     G_CALLBACK(hildon_find_object_options_dialog_response_cb),
+                     dialog);
+
+    gtk_dialog_run(priv->optionsDialog);
+}
+static void
+hildon_find_object_dialog_response_cb(HildonFindObjectDialog * dialog,
+                                      gint response, gpointer data)
+{
+
+    HildonFindObjectDialogPrivate *priv =
+        HILDON_FIND_OBJECT_DIALOG_GET_PRIVATE(dialog);
+
+    if (response == GTK_RESPONSE_OK)
+        add_to_history(GTK_ENTRY(GTK_BIN(priv->combo)->child), dialog);
+}
+
+static void
+hildon_find_object_options_dialog_response_cb(GtkDialog * dialog,
+                                              gint response, gpointer data)
+{
+    gtk_widget_hide(GTK_WIDGET(dialog));
+    gtk_window_present(GTK_WINDOW(data));
+}
+
+/* Public functions */
+
+/**
+ * hildon_find_object_dialog_set_label:
+ * @dialog: the #HildonFindObjectDialog which label wants to be changed
+ * @label: gchar pointer to a string 
+ *
+ * Sets the label beneath the combobox in a #HildonFindObjectDialog widget.
+ */
+void
+hildon_find_object_dialog_set_label(HildonFindObjectDialog * dialog,
+                                    const gchar * label)
+{
+    HildonFindObjectDialogPrivate *priv;
+
+    g_return_if_fail(HILDON_IS_FIND_OBJECT_DIALOG(dialog));
+    priv = HILDON_FIND_OBJECT_DIALOG_GET_PRIVATE(dialog);
+    gtk_label_set_text(priv->label, label);
+}
+
+GType hildon_find_object_dialog_get_type(void)
+{
+    static GType dialog_type = 0;
+
+    if (!dialog_type) {
+        static const GTypeInfo dialog_info = {
+            sizeof(HildonFindObjectDialogClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_find_object_dialog_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonFindObjectDialog),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_find_object_dialog_init
+        };
+
+        dialog_type = g_type_register_static(GTK_TYPE_DIALOG,
+                                             "HildonFindObjectDialog",
+                                             &dialog_info, 0);
+    }
+    return dialog_type;
+}
+
+/**
+ * hildon_find_object_dialog_new:
+ * @parent: the parent window of the dialog.
+ *
+ * Creates a new #HildonFindObjectDialog widget with Find and Close
+ * buttons.
+ *
+ * Return value: the newly created #HildonFindObjectDialog
+ */
+GtkWidget *hildon_find_object_dialog_new(GtkWindow * parent)
+{
+    HildonFindObjectDialog *self =
+        HILDON_FIND_OBJECT_DIALOG(g_object_new
+                                  (HILDON_TYPE_FIND_OBJECT_DIALOG, NULL));
+
+    HildonFindObjectDialogPrivate *priv =
+        HILDON_FIND_OBJECT_DIALOG_GET_PRIVATE(self);
+
+    g_signal_connect(G_OBJECT(self), "response",
+                     G_CALLBACK(hildon_find_object_dialog_response_cb), NULL);
+
+    gtk_container_remove(GTK_CONTAINER(GTK_DIALOG(self)->action_area),
+                         GTK_WIDGET(priv->optionsButton));
+
+    if (parent)
+        gtk_window_set_transient_for(GTK_WINDOW(self), parent);
+
+    return GTK_WIDGET(self);
+}
+
+/**
+ * hildon_find_object_dialog_new_with_options:
+ * @parent: the parent window of the dialog.
+ * @dialog: the options dialog to be shown on press on the options button.
+ *
+ * Creates a new #HildonFindObjectDialog widget with Find, Options and 
+ * Close buttons. Sets the options dialog to be transient for the find 
+ * object dialog.
+ *
+ * Return value: the newly created #HildonFindObjectDialog
+ */
+
+GtkWidget *hildon_find_object_dialog_new_with_options(GtkWindow * parent,
+                                                      GtkDialog * dialog)
+{
+    HildonFindObjectDialog *self =
+        HILDON_FIND_OBJECT_DIALOG(g_object_new
+                                  (HILDON_TYPE_FIND_OBJECT_DIALOG, NULL));
+    HildonFindObjectDialogPrivate *priv =
+        HILDON_FIND_OBJECT_DIALOG_GET_PRIVATE(self);
+
+    g_signal_connect(G_OBJECT(self), "response",
+                     G_CALLBACK(hildon_find_object_dialog_response_cb), NULL);
+
+    priv->optionsDialog = GTK_DIALOG(dialog);
+
+    g_signal_connect(G_OBJECT(priv->optionsButton), "clicked",
+                     G_CALLBACK(open_options_dialog), self);
+
+    if (parent)
+        gtk_window_set_transient_for(GTK_WINDOW(self), parent);
+
+    if (dialog)
+        gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(self));
+
+    return GTK_WIDGET(self);
+}
+
+/**
+ * hildon_find_object_dialog_get_text:
+ * @dialog: the dialog.
+ *
+ * Gets the text that's active in the combobox (i.e. the find string).
+ *
+ * Return value: a pointer to the find string.
+ */
+
+const gchar *hildon_find_object_dialog_get_text(HildonFindObjectDialog *
+                                                dialog)
+{
+    HildonFindObjectDialogPrivate *priv =
+        HILDON_FIND_OBJECT_DIALOG_GET_PRIVATE(dialog);
+    return gtk_entry_get_text(GTK_ENTRY(GTK_BIN(priv->combo)->child));
+}
diff --git a/hildon-widgets/hildon-find-object-dialog.h b/hildon-widgets/hildon-find-object-dialog.h
new file mode 100644 (file)
index 0000000..2aca946
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __HILDON_FIND_OBJECT_DIALOG_H__
+#define __HILDON_FIND_OBJECT_DIALOG_H__
+
+#ifndef __DEPRACATED__
+#define __DEPRACATED__
+#endif
+
+#include <gtk/gtkdialog.h>
+
+G_BEGIN_DECLS
+#define HILDON_TYPE_FIND_OBJECT_DIALOG \
+  ( hildon_find_object_dialog_get_type() )
+#define HILDON_FIND_OBJECT_DIALOG(obj) \
+  (GTK_CHECK_CAST (obj, HILDON_TYPE_FIND_OBJECT_DIALOG,\
+   HildonFindObjectDialog))
+#define HILDON_FIND_OBJECT_DIALOG_CLASS(klass) \
+  (GTK_CHECK_CLASS_CAST ((klass), HILDON_TYPE_FIND_OBJECT_DIALOG, \
+  HildonFindObjectDialogClass))
+#define HILDON_IS_FIND_OBJECT_DIALOG(obj) \
+  (GTK_CHECK_TYPE (obj, HILDON_TYPE_FIND_OBJECT_DIALOG))
+#define HILDON_IS_FIND_OBJECT_DIALOG_CLASS(klass) \
+  (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_FIND_OBJECT_DIALOG))
+typedef struct _HildonFindObjectDialog HildonFindObjectDialog;
+typedef struct _HildonFindObjectDialogClass HildonFindObjectDialogClass;
+
+struct _HildonFindObjectDialog {
+    GtkDialog parent;
+};
+
+struct _HildonFindObjectDialogClass {
+    GtkDialogClass parent_class;
+};
+
+GType hildon_find_object_dialog_get_type(void);
+
+GtkWidget *hildon_find_object_dialog_new(GtkWindow * parent);
+GtkWidget *hildon_find_object_dialog_new_with_options(GtkWindow * parent,
+                                                      GtkDialog * dialog);
+const gchar *hildon_find_object_dialog_get_text(HildonFindObjectDialog *
+                                                dialog);
+void hildon_find_object_dialog_set_label(HildonFindObjectDialog * dialog,
+                                         const gchar * label);
+
+G_END_DECLS
+#endif
diff --git a/hildon-widgets/hildon-find-replace-dialog.c b/hildon-widgets/hildon-find-replace-dialog.c
new file mode 100644 (file)
index 0000000..33e78fb
--- /dev/null
@@ -0,0 +1,384 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/* HILDON DOC
+ * @shortdesc: FindReplaceDialog is a dialog for setting options for
+ * search/replace functionality in an application.
+ * @longdesc: FindReplaceDialog is a dialog for setting options for
+ * search/replace functionality in an application.
+ * The dialog has three modes depending on what kind of data the search is
+ * being made to (normal, read-only, immutable).
+ * Also a options dialog for different search options can be added (will be
+ * implemented later).
+ */
+
+#include <glib.h>
+#include <gtk/gtk.h>
+#include <errno.h>
+#include <string.h>
+#include <strings.h>
+#include <unistd.h>
+#include <stdio.h>
+
+#include <hildon-find-replace-dialog.h>
+#include <hildon-search.h>
+#include <hildon-widgets/hildon-caption.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <libintl.h>
+#define _(String) dgettext(PACKAGE, String)
+
+static GtkDialogClass *parent_class;
+static gboolean show_replace_entry = TRUE;
+
+typedef struct _HildonFindReplaceDialogPrivate
+    HildonFindReplaceDialogPrivate;
+struct _HildonFindReplaceDialogPrivate {
+    GtkButton *findButton;
+    GtkButton *closeButton;
+    GtkButton *replaceButton;
+    GtkButton *optionsButton;
+
+    HildonCaption *findEntry;
+    HildonCaption *replaceEntry;
+
+    HildonReplaceType mode;
+
+    GtkDialog *optionsDialog;
+};
+
+#define HILDON_FIND_REPLACE_DIALOG_GET_PRIVATE(o)\
+        (G_TYPE_INSTANCE_GET_PRIVATE ((o),\
+         HILDON_TYPE_FIND_REPLACE_DIALOG,\
+         HildonFindReplaceDialogPrivate))
+
+static void
+hildon_find_replace_dialog_class_init(HildonFindReplaceDialogClass *class);
+static void hildon_find_replace_dialog_init(HildonFindReplaceDialog *widget);
+static void toggle_replace(GtkButton *button, gpointer data);
+static void
+open_options_dialog(GtkWidget *widget, HildonFindReplaceDialog *dialog);
+static void hildon_find_replace_dialog_response_cb(GtkDialog *dialog,
+                                                   gint response,
+                                                   gpointer data);
+static void hildon_find_replace_options_dialog_response_cb(GtkDialog *dialog,
+                                                           gint response,
+                                                           gpointer data);
+
+static void hildon_find_replace_dialog_response_cb(GtkDialog *dialog,
+                                                   gint response,
+                                                   gpointer data)
+{
+    g_signal_stop_emission_by_name(G_OBJECT(dialog), "response");
+    if (response == GTK_RESPONSE_OK)
+        g_print("user clicked ok in find/replace dialog\n");
+
+    gtk_widget_hide(GTK_WIDGET(dialog));
+}
+static void hildon_find_replace_options_dialog_response_cb(GtkDialog *dialog,
+                                                           gint response,
+                                                           gpointer data)
+{
+    g_signal_stop_emission_by_name(G_OBJECT(dialog), "response");
+    if (response == GTK_RESPONSE_OK)
+        g_print("user clicked ok in find/replace-options dialog\n");
+
+    gtk_widget_hide(GTK_WIDGET(dialog));
+    gtk_window_present(GTK_WINDOW(data));
+}
+
+static void
+open_options_dialog(GtkWidget *widget, HildonFindReplaceDialog *dialog)
+{
+    HildonFindReplaceDialogPrivate *priv;
+
+    priv = HILDON_FIND_REPLACE_DIALOG_GET_PRIVATE(dialog);
+
+    g_return_if_fail(GTK_IS_DIALOG(priv->optionsDialog));
+    g_signal_connect(G_OBJECT(priv->optionsDialog), "response",
+                     G_CALLBACK
+                     (hildon_find_replace_options_dialog_response_cb),
+                     dialog);
+    gtk_dialog_run(priv->optionsDialog);
+}
+
+static void toggle_replace(GtkButton *button, gpointer self)
+{
+    HildonFindReplaceDialog *dialog;
+    HildonFindReplaceDialogPrivate *priv;
+
+    g_return_if_fail(HILDON_IS_FIND_REPLACE_DIALOG(self));
+
+    dialog = HILDON_FIND_REPLACE_DIALOG(self);
+    priv = HILDON_FIND_REPLACE_DIALOG_GET_PRIVATE(dialog);
+
+    if (show_replace_entry)
+    {
+        g_object_ref(priv->replaceEntry);
+        gtk_widget_hide(GTK_WIDGET(priv->replaceEntry));
+        show_replace_entry = FALSE;
+    }
+    else
+    {
+        gtk_widget_show(GTK_WIDGET(priv->replaceEntry));
+        show_replace_entry = TRUE;
+    }
+
+}
+
+static void
+hildon_find_replace_dialog_class_init(HildonFindReplaceDialogClass *class)
+{
+    parent_class = g_type_class_peek_parent(class);
+    g_type_class_add_private(class,
+                             sizeof(HildonFindReplaceDialogPrivate));
+}
+
+static void
+hildon_find_replace_dialog_init(HildonFindReplaceDialog *dialog)
+{
+    HildonFindReplaceDialogPrivate *priv =
+        HILDON_FIND_REPLACE_DIALOG_GET_PRIVATE(dialog);
+    GtkSizeGroup *group =
+        GTK_SIZE_GROUP(gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL));
+    GtkWidget *control;
+
+    gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
+    gtk_window_set_title(GTK_WINDOW(dialog), _("Find and Replace"));
+
+    priv->findButton = GTK_BUTTON(gtk_dialog_add_button(GTK_DIALOG(dialog),
+                                                        _("Find"),
+                                                        GTK_RESPONSE_OK));
+
+    priv->replaceButton =
+        GTK_BUTTON(
+    gtk_dialog_add_button(GTK_DIALOG(dialog),_("Replace"), GTK_RESPONSE_NONE));
+    g_signal_connect(priv->replaceButton, "clicked",
+                     G_CALLBACK(toggle_replace), dialog);
+
+    priv->optionsButton =
+        GTK_BUTTON(
+    gtk_dialog_add_button(GTK_DIALOG(dialog),
+                       _("Options"), GTK_RESPONSE_NONE));
+
+    priv->closeButton =
+        GTK_BUTTON(gtk_dialog_add_button
+                   (GTK_DIALOG(dialog), _("Close"), GTK_RESPONSE_CANCEL));
+
+    control = gtk_entry_new();
+    priv->findEntry = HILDON_CAPTION(hildon_caption_new(GTK_SIZE_GROUP(group),
+                                     _("Find"), GTK_WIDGET(control), NULL,
+                                     HILDON_CAPTION_OPTIONAL));
+
+    control = gtk_entry_new();
+    priv->replaceEntry = HILDON_CAPTION(hildon_caption_new(group,
+                                        _("Replace with"), control, NULL,
+                                        HILDON_CAPTION_OPTIONAL));
+
+    gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),
+                       GTK_WIDGET(priv->findEntry), FALSE, FALSE, 0);
+    gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),
+                       GTK_WIDGET(priv->replaceEntry), FALSE, FALSE, 0);
+
+    priv->optionsDialog = GTK_DIALOG(dialog);
+
+    gtk_widget_show_all(GTK_DIALOG(dialog)->vbox);
+    gtk_widget_show_all(GTK_DIALOG(dialog)->action_area);
+
+    gtk_widget_hide(GTK_WIDGET(priv->replaceEntry));
+    show_replace_entry = FALSE;
+}
+
+GType hildon_find_replace_dialog_get_type(void)
+{
+    static GType dialog_type = 0;
+
+    if (!dialog_type) {
+        static const GTypeInfo dialog_info = {
+            sizeof(HildonFindReplaceDialogClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_find_replace_dialog_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonFindReplaceDialog),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_find_replace_dialog_init
+        };
+        dialog_type = g_type_register_static(GTK_TYPE_DIALOG,
+                                             "HildonFindReplaceDialog",
+                                             &dialog_info, 0);
+    }
+
+    return dialog_type;
+}
+
+/**
+ * hildon_find_replace_dialog_new:
+ * @parent: the parent window of the dialog.
+ * @type: type (HildonReplaceType) of replace dialog, can be one of: 
+ * HILDON_REPLACE_IMMUTABLE, HILDON_REPLACE_READ_ONLY,
+ * HILDON_REPLACE_NORMAL.
+ * 
+ * Creates a new #HildonFindReplaceDialog widget with Find and Close
+ * buttons. This is the only thing that the dialog will do (plus a find
+ * entry) if the mode is
+ * HILDON_REPLACE_IMMUTABLE. Otherwise, if the parameter type
+ * (HildonReplaceType) is 
+ * HILDON_REPLACE_NORMAL or HILDON_REPLACE_READ_ONLY then a Replace button
+ * fill be added. 
+ * Pressing replace button will add a 'Replace with' field into the dialog.
+ * If dialog is 
+ * of type HILDON_REPLACE_READ_ONLY then the replace button will be
+ * insensitive. 
+ *
+ * Return value: the newly created #HildonFindReplaceDialog
+ */
+GtkWidget *hildon_find_replace_dialog_new(GtkWindow *parent,
+                                          HildonReplaceType type)
+{
+    HildonFindReplaceDialog *self =
+        HILDON_FIND_REPLACE_DIALOG(g_object_new(
+                                   HILDON_TYPE_FIND_REPLACE_DIALOG, NULL));
+
+    HildonFindReplaceDialogPrivate *priv =
+        HILDON_FIND_REPLACE_DIALOG_GET_PRIVATE(self);
+
+    priv->mode = type;
+    g_signal_connect(G_OBJECT(self), "response",
+                     G_CALLBACK(hildon_find_replace_dialog_response_cb),
+                     NULL);
+
+    gtk_widget_hide(GTK_WIDGET(priv->optionsButton));
+    if (priv->mode == HILDON_REPLACE_IMMUTABLE)
+        gtk_widget_hide(GTK_WIDGET(priv->replaceButton));
+    else if (priv->mode == HILDON_REPLACE_READ_ONLY)
+        gtk_widget_set_sensitive(GTK_WIDGET(priv->replaceButton), FALSE);
+
+    if (parent)
+        gtk_window_set_transient_for(GTK_WINDOW(self), parent);
+
+    return GTK_WIDGET(self);
+}
+
+/**
+ * hildon_find_replace_dialog_new_with_options:
+ * @parent: the parent window of the dialog.
+ * @dialog: the options dialog.
+ * @type: HildonReplaceType for mode.
+ *
+ * Creates a new #HildonFindReplaceDialog widget with Find,
+ * Options and Close buttons.
+ * This is the only thing that the dialog will do (plus a find entry)
+ * if the mode is
+ * HILDON_REPLACE_IMMUTABLE. Otherwise, if the parameter type
+ * (HildonReplaceType) is 
+ * HILDON_REPLACE_NORMAL or HILDON_REPLACE_READ_ONLY then a Replace button
+ * fill be added. 
+ * Pressing replace button will add a 'Replace with' field into the dialog.
+ * If dialog is 
+ * of type HILDON_REPLACE_READ_ONLY then the replace button will be
+ * insensitive. 
+ *
+ * Options Dialog is a feature that will be implemented later. 
+ * 
+ * Return value: the newly created #HildonFindReplaceDialog
+ */
+GtkWidget *hildon_find_replace_dialog_new_with_options(GtkWindow *parent,
+                                                       GtkDialog *dialog,
+                                                       HildonReplaceType type)
+{
+    HildonFindReplaceDialog *self = HILDON_FIND_REPLACE_DIALOG(g_object_new(
+                                    HILDON_TYPE_FIND_REPLACE_DIALOG, NULL));
+    HildonFindReplaceDialogPrivate *priv =
+        HILDON_FIND_REPLACE_DIALOG_GET_PRIVATE(self);
+
+    g_signal_connect(G_OBJECT(self), "response",
+                     G_CALLBACK(hildon_find_replace_dialog_response_cb), NULL);
+
+    priv->optionsDialog = GTK_DIALOG(dialog);
+    priv->mode = type;
+
+    if (priv->optionsDialog != NULL)
+        g_signal_connect(G_OBJECT(priv->optionsButton), "clicked",
+                         G_CALLBACK(open_options_dialog), self);
+    else
+        gtk_widget_hide(GTK_WIDGET(priv->optionsButton));
+
+    if (priv->mode == HILDON_REPLACE_IMMUTABLE)
+    {
+        gtk_widget_hide(GTK_WIDGET(priv->replaceEntry));
+        gtk_widget_hide(GTK_WIDGET(priv->replaceButton));
+    }
+    else if (priv->mode == HILDON_REPLACE_READ_ONLY)
+    {
+        gtk_widget_hide(GTK_WIDGET(priv->replaceEntry));
+        gtk_widget_set_sensitive(GTK_WIDGET(priv->replaceButton), FALSE);
+    }
+
+    if (parent)
+        gtk_window_set_transient_for(GTK_WINDOW(self), parent);
+
+    if (dialog)
+        gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(self));
+
+    return GTK_WIDGET(self);
+}
+
+/**
+ * hildon_find_replace_dialog_get_text:
+ * @dialog: the dialog.
+ *
+ * Gets the text that's in the find entry.
+ *
+ * Return value: a pointer to the find string.
+ */
+const gchar *
+hildon_find_replace_dialog_get_text(HildonFindReplaceDialog *dialog)
+{
+    HildonFindReplaceDialogPrivate *priv =
+        HILDON_FIND_REPLACE_DIALOG_GET_PRIVATE(dialog);
+    return gtk_entry_get_text(GTK_ENTRY(
+                              hildon_caption_get_control(priv->findEntry)));
+}
+
+/**
+ * hildon_find_replace_dialog_get_new_text:
+ * @dialog: the dialog.
+ * 
+ * Gets the text that's in the replace entry.
+ * 
+ * Return value: a pointer to the replace string.
+ */
+const gchar*
+hildon_find_replace_dialog_get_new_text(HildonFindReplaceDialog *dialog)
+{
+    HildonFindReplaceDialogPrivate *priv =
+        HILDON_FIND_REPLACE_DIALOG_GET_PRIVATE(dialog);
+    return gtk_entry_get_text(GTK_ENTRY(hildon_caption_get_control(
+                              priv->replaceEntry)));
+}
diff --git a/hildon-widgets/hildon-find-replace-dialog.h b/hildon-widgets/hildon-find-replace-dialog.h
new file mode 100644 (file)
index 0000000..1727ed4
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __HILDON_FIND_REPLACE_DIALOG_H__
+#define __HILDON_FIND_REPLACE_DIALOG_H__
+
+#include <gtk/gtkdialog.h>
+
+G_BEGIN_DECLS
+#define HILDON_TYPE_FIND_REPLACE_DIALOG \
+  ( hildon_find_replace_dialog_get_type() )
+#define HILDON_FIND_REPLACE_DIALOG(obj) \
+  (GTK_CHECK_CAST (obj, HILDON_TYPE_FIND_REPLACE_DIALOG,\
+   HildonFindReplaceDialog))
+#define HILDON_FIND_REPLACE_DIALOG_CLASS(klass) \
+  (GTK_CHECK_CLASS_CAST ((klass), HILDON_TYPE_FIND_REPLACE_DIALOG, \
+  HildonFindReplaceDialogClass))
+#define HILDON_IS_FIND_REPLACE_DIALOG(obj) \
+  (GTK_CHECK_TYPE (obj, HILDON_TYPE_FIND_REPLACE_DIALOG))
+#define HILDON_IS_FIND_REPLACE_DIALOG_CLASS(klass) \
+  (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_FIND_REPLACE_DIALOG))
+typedef struct _HildonFindReplaceDialog HildonFindReplaceDialog;
+typedef struct _HildonFindReplaceDialogClass HildonFindReplaceDialogClass;
+
+/**
+ * HildonReplaceType:
+ * @HILDON_REPLACE_NORMAL: Replace mode is available.
+ * @HILDON_REPLACE_READ_ONLY: Replace button is inactive. This is used when
+ * content is read only.
+ * @HILDON_REPLACE_IMMUTABLE: There is no replace button at all. This is
+ * used (for example) for web pages.
+ *
+ * These values defines if replace button in dialog is available.
+ */
+typedef enum {
+    HILDON_REPLACE_NORMAL = 0,
+    HILDON_REPLACE_READ_ONLY,
+    HILDON_REPLACE_IMMUTABLE
+} HildonReplaceType;
+
+struct _HildonFindReplaceDialog {
+    GtkDialog parent;
+};
+
+struct _HildonFindReplaceDialogClass {
+    GtkDialogClass parent_class;
+};
+
+GType hildon_find_replace_dialog_get_type(void);
+
+GtkWidget *hildon_find_replace_dialog_new(GtkWindow * parent,
+                                          HildonReplaceType type);
+GtkWidget *hildon_find_replace_dialog_new_with_options(GtkWindow * parent,
+                                                       GtkDialog * dialog,
+                                                       HildonReplaceType type);
+
+const gchar *hildon_find_replace_dialog_get_text(HildonFindReplaceDialog *
+                                                 dialog);
+const gchar
+    *hildon_find_replace_dialog_get_new_text(HildonFindReplaceDialog *
+                                             dialog);
+
+void hildon_find_replace_dialog_set_text(HildonFindReplaceDialog * dialog,
+                                         const gchar * text);
+void hildon_find_replace_dialog_set_new_text(HildonFindReplaceDialog *
+                                             dialog,
+                                             const gchar * new_text);
+
+G_END_DECLS
+#endif
diff --git a/hildon-widgets/hildon-font-selection-dialog.c b/hildon-widgets/hildon-font-selection-dialog.c
new file mode 100644 (file)
index 0000000..e9a9260
--- /dev/null
@@ -0,0 +1,1651 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/*
+ * @file hildon-font-selection-dialog.c
+ *
+ * This file implements the HildonFontSelectionDialog widget
+ *
+ * A modification from the gtk_font_selection_dialog
+*/
+
+#include <stdlib.h>
+#include <string.h>
+
+#include <gtk/gtkstock.h>
+#include <gtk/gtkcombobox.h>
+#include <gtk/gtktogglebutton.h>
+#include <gtk/gtkcheckbutton.h>
+#include <gtk/gtklabel.h>
+#include <gtk/gtkvbox.h>
+#include <gtk/gtkliststore.h>
+#include <gtk/gtknotebook.h>
+#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
+
+#include "hildon-font-selection-dialog.h"
+#include <hildon-widgets/hildon-caption.h>
+#include <hildon-widgets/hildon-color-selector.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <libintl.h>
+#define _(String) dgettext(PACKAGE, String)
+
+#define PREVIEW_RESPONSE_ID 12345
+
+/*
+ * These are what we use as the standard font sizes, for the size list.
+ */
+static const guint16 font_sizes[] = {
+    8, 9, 10, 11, 12, 13, 14, 16, 18, 20, 22, 24, 26, 28,
+    32, 36, 40, 48, 56, 64, 72
+};
+
+#define HILDON_FONT_SELECTION_DIALOG_GET_PRIVATE(obj) \
+        (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
+        HILDON_TYPE_FONT_SELECTION_DIALOG, HildonFontSelectionDialogPrivate))
+
+typedef struct
+_HildonFontSelectionDialogPrivate HildonFontSelectionDialogPrivate;
+struct _HildonFontSelectionDialogPrivate {
+    GtkNotebook *notebook;
+    GtkWidget *vbox_tab[3];
+    GtkWidget *caption_control;
+    GtkSizeGroup *group;
+
+    gchar *preview_text;
+    guint keysnooper;
+
+/*Tab one*/
+    GtkWidget *cbx_font_type;
+    GtkWidget *cbx_font_size;
+    GtkWidget *font_color_box;
+    GtkWidget *font_color_button;
+    GdkColor c_table;
+    GtkWidget *e_table;
+
+/*Tab two*/
+    GtkWidget *chk_bold;
+    GtkWidget *chk_italic;
+    GtkWidget *chk_underline;
+
+/*Tab three*/
+    GtkWidget *chk_strikethrough;
+    GtkWidget *cbx_positioning;
+
+    gboolean both;      /* Most of the fonts has a bold-italic font type.
+                           (Not just Bold and Italic BUT --> Bold-italic) */
+/*     gboolean auto_resize;*/
+/*     gint dialog_width;*/
+
+    HildonPositioning positioning;      /* Current positioning */
+    PangoFontFamily *family;    /* Current family */
+    HildonFontFaceType face;    /* Current face number */
+    gint size;  /* Current size */
+
+/*Components for the preview dialog*/
+    GtkWidget *dlg_preview;
+    GtkWidget *lbl_preview;
+
+/*Every family*/
+    PangoFontFamily **families;
+    gint n_families;
+/*The faces for current family*/
+    PangoFontFace **faces;
+/*There's different names for the faces (Bold == Demi, etc.) -
+  So we have "a layer" to determine the correct one*/
+    HildonFontFaceType facetypes[4];
+};
+
+static void hildon_font_preview_dialog_close(GtkDialog * dialog,
+                                             gint response, gpointer data);
+static gboolean
+hildon_font_selection_dialog_preview_key_press(GtkWidget * widget,
+                                               GdkEventKey * event,
+                                               gpointer data);
+
+/*Some tools from gtk_font_selection*/
+static int cmp_families(const void *a, const void *b);
+static int faces_sort_func(const void *a, const void *b);
+static int compare_font_descriptions(const PangoFontDescription * a,
+                                     const PangoFontDescription * b); 
+                                    
+
+static void 
+hildon_font_selection_dialog_check_button_clicked(GtkToggleButton *chk,
+               gpointer data);
+static void
+hildon_font_selection_dialog_show_preview(HildonFontSelectionDialog *
+                                          fontsel);
+static void
+hildon_font_selection_dialog_set_font_for_preview(HildonFontSelectionDialog
+                                                  * fontsel);
+static PangoAttrList
+    *hildon_font_selection_dialog_create_font(HildonFontSelectionDialog *
+                                              fontsel);
+
+static void
+hildon_font_selection_dialog_show_available_positionings
+(HildonFontSelectionDialog * fontsel);
+static void
+hildon_font_selection_dialog_show_available_fonts(HildonFontSelectionDialog
+                                                  * fontseldiag);
+static void
+hildon_font_selection_dialog_show_available_styles
+(HildonFontSelectionDialog * fontsel);
+static void
+hildon_font_selection_dialog_show_available_sizes(HildonFontSelectionDialog
+                                                  * fontsel,
+                                                  gboolean first_time);
+static void
+hildon_font_selection_dialog_class_init(HildonFontSelectionDialogClass *
+                                        klass);
+static void hildon_font_selection_dialog_init(HildonFontSelectionDialog *
+                                              fontseldiag);
+static void hildon_font_selection_dialog_finalize(GObject * object);
+
+static void hildon_font_selection_dialog_preview_click(GtkDialog * dialog,
+                                                       gint response,
+                                                       gpointer data);
+static void hildon_font_selection_dialog_font_type_changed(GtkComboBox *
+                                                           cbox,
+                                                           gpointer
+                                                           userdata);
+static void
+hildon_font_selection_dialog_check_button_toggled(GtkToggleButton * chk,
+                                                  gpointer user_data);
+
+static void show_selector(GtkWidget * widget, GtkButton * b,
+                          gpointer data);
+static void set_event_box_color(GtkWidget * b, GdkColor * color);
+static gboolean color_key_press(GtkWidget * widget, GdkEventKey * event,
+                                gpointer data);
+static gint hildon_font_selection_dialog_key_snooper(GtkWidget * swidget,
+                                                     GdkEventKey * event,
+                                                     GtkWidget * widget);
+
+static GtkDialogClass *font_selection_dialog_parent_class = NULL;
+
+/* property setter and getter */
+static void hildon_font_selection_dialog_set_property(GObject * object,
+               guint property_id,
+               const GValue * value,
+               GParamSpec * pspec);
+static void hildon_font_selection_dialog_get_property(GObject * object,
+               guint property_id,
+               GValue * value,
+               GParamSpec * pspec);
+
+enum {
+       PROP_SELECTOR_BOLD = 1,
+       PROP_SELECTOR_ITALIC,   /* add all needed properties here */
+       PROP_SELECTOR_UNDERLINE,
+       PROP_SELECTOR_STRIKETHROUGH
+};
+
+enum {
+       PROP_SET,
+       PROP_INTERMEDIATE,
+       PROP_DIMMED,
+       PROP_UNSET
+};
+
+
+GType hildon_font_selection_dialog_get_type(void)
+{
+    static GType font_selection_dialog_type = 0;
+
+    if (!font_selection_dialog_type) {
+        static const GTypeInfo fontsel_diag_info = {
+            sizeof(HildonFontSelectionDialogClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_font_selection_dialog_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonFontSelectionDialog),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_font_selection_dialog_init,
+        };
+
+        font_selection_dialog_type =
+            g_type_register_static(GTK_TYPE_DIALOG,
+                                   "HildonFontSelectionDialog",
+                                   &fontsel_diag_info, 0);
+    }
+
+    return font_selection_dialog_type;
+}
+
+static void
+hildon_font_selection_dialog_class_init(HildonFontSelectionDialogClass *
+                                        klass)
+{
+    GObjectClass *gobject_class;
+
+    font_selection_dialog_parent_class = g_type_class_peek_parent(klass);
+    gobject_class = G_OBJECT_CLASS(klass);
+    gobject_class->finalize = hildon_font_selection_dialog_finalize;
+
+    /* property stuff */
+    gobject_class->set_property = hildon_font_selection_dialog_set_property;
+    gobject_class->get_property = hildon_font_selection_dialog_get_property;
+
+    g_object_class_install_property (gobject_class, PROP_SELECTOR_BOLD, 
+                   g_param_spec_boolean ("is_bold_face", "BoldFace", 
+                                    "Whether the text is boldface or not",
+                           FALSE, G_PARAM_CONSTRUCT|G_PARAM_READWRITE));
+
+    g_type_class_add_private(klass,
+        sizeof(struct _HildonFontSelectionDialogPrivate));
+}
+
+
+static void hildon_font_selection_dialog_init(HildonFontSelectionDialog *
+                                              fontseldiag)
+{
+    HildonFontSelectionDialogPrivate *priv =
+        HILDON_FONT_SELECTION_DIALOG_GET_PRIVATE(fontseldiag);
+    int i;
+    for (i = 0; i < 4; ++i){
+           priv->facetypes[i] = -1;
+    }
+    
+    priv->positioning = HILDON_POSITIONING_NORMAL;
+    priv->size = 10;
+    priv->face = 0;
+    priv->families = NULL;
+    priv->notebook = GTK_NOTEBOOK(gtk_notebook_new());
+
+    for (i = 0; i < 3; i++)
+        priv->vbox_tab[i] = gtk_vbox_new(FALSE, 0);
+
+    priv->group =
+        GTK_SIZE_GROUP(gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL));
+
+/*Tab one*/
+    priv->cbx_font_type = gtk_combo_box_new_text();
+    hildon_font_selection_dialog_show_available_fonts(fontseldiag);
+    priv->caption_control = hildon_caption_new(priv->group,
+                                               _("ecdg_fi_font_font"),
+                                               priv->cbx_font_type,
+                                               NULL,
+                                               HILDON_CAPTION_OPTIONAL);
+    gtk_box_pack_start(GTK_BOX(priv->vbox_tab[0]), priv->caption_control,
+                       FALSE, FALSE, 0);
+
+    priv->cbx_font_size = gtk_combo_box_new_text();
+    hildon_font_selection_dialog_show_available_sizes(fontseldiag, TRUE);
+    priv->caption_control = hildon_caption_new(priv->group,
+                                               _("ecdg_fi_font_size"),
+                                               priv->cbx_font_size,
+                                               NULL,
+                                               HILDON_CAPTION_OPTIONAL);
+    gtk_box_pack_start(GTK_BOX(priv->vbox_tab[0]), priv->caption_control,
+                       FALSE, FALSE, 0);
+
+    priv->font_color_box = gtk_hbox_new(FALSE, 0);
+    g_object_set(G_OBJECT(priv->font_color_box), "can-focus", TRUE, NULL);
+    priv->font_color_button = gtk_event_box_new();
+    g_object_set(G_OBJECT(priv->font_color_button), "can-focus", TRUE,
+                 NULL);
+    g_signal_connect_swapped(GTK_WIDGET(priv->font_color_button),
+                             "button-release-event",
+                             G_CALLBACK(show_selector),
+                             (HildonFontSelectionDialog *) fontseldiag);
+    g_signal_connect_swapped(GTK_WIDGET(priv->font_color_box),
+                             "key-press-event",
+                             G_CALLBACK(color_key_press), fontseldiag);
+    gtk_box_pack_start(GTK_BOX(priv->font_color_box),
+                       priv->font_color_button, FALSE, FALSE, 0);
+    gtk_box_pack_start(GTK_BOX(priv->font_color_box), gtk_label_new(""),
+                       TRUE, TRUE, 0);
+
+    gtk_widget_set_size_request(GTK_WIDGET(priv->font_color_button), 20,
+                                20);
+    priv->c_table.red = 0;      /* (0,0,0) is black */
+    priv->c_table.green = 0;
+    priv->c_table.blue = 0;
+    set_event_box_color(GTK_WIDGET(priv->font_color_button),
+                        &priv->c_table);
+    priv->caption_control =
+        hildon_caption_new(priv->group, _("ecdg_fi_font_color_selector"),
+                           priv->font_color_box,
+                           NULL, HILDON_CAPTION_OPTIONAL);
+    gtk_box_pack_start(GTK_BOX(priv->vbox_tab[0]), priv->caption_control,
+                       FALSE, FALSE, 0);
+
+/*Tab two*/
+    priv->chk_bold = gtk_check_button_new();
+    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->chk_bold), FALSE);
+    priv->caption_control = hildon_caption_new(priv->group,
+                                               _("ecdg_fi_font_bold"),
+                                               priv->chk_bold,
+                                               NULL,
+                                               HILDON_CAPTION_OPTIONAL);
+    gtk_box_pack_start(GTK_BOX(priv->vbox_tab[1]), priv->caption_control,
+                       FALSE, FALSE, 0);
+
+    priv->chk_italic = gtk_check_button_new();
+    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->chk_italic),
+                                 FALSE);
+    priv->caption_control =
+        hildon_caption_new(priv->group, _("ecdg_fi_font_italic"),
+                           priv->chk_italic,
+                           NULL, HILDON_CAPTION_OPTIONAL);
+    gtk_box_pack_start(GTK_BOX(priv->vbox_tab[1]), priv->caption_control,
+                       FALSE, FALSE, 0);
+
+    priv->chk_underline = gtk_check_button_new();
+    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->chk_underline),
+                                 FALSE);
+    priv->caption_control =
+        hildon_caption_new(priv->group, _("ecdg_fi_font_underline"),
+                           priv->chk_underline, NULL,
+                           HILDON_CAPTION_OPTIONAL);
+    gtk_box_pack_start(GTK_BOX(priv->vbox_tab[1]), priv->caption_control,
+                       FALSE, FALSE, 0);
+
+    /* Sets bold and italic checkboxes */
+    hildon_font_selection_dialog_show_available_styles(fontseldiag);
+
+/*Tab three*/
+    priv->chk_strikethrough = gtk_check_button_new();
+    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+                                 (priv->chk_strikethrough), FALSE);
+    priv->caption_control =
+        hildon_caption_new(priv->group, _("ecdg_fi_font_strikethrough"),
+                           priv->chk_strikethrough, NULL,
+                           HILDON_CAPTION_OPTIONAL);
+    gtk_box_pack_start(GTK_BOX(priv->vbox_tab[2]), priv->caption_control,
+                       FALSE, FALSE, 0);
+
+    priv->cbx_positioning = gtk_combo_box_new_text();
+    hildon_font_selection_dialog_show_available_positionings(fontseldiag);
+    priv->caption_control =
+        hildon_caption_new(priv->group, _("ecdg_fi_font_special"),
+                           priv->cbx_positioning, NULL,
+                           HILDON_CAPTION_OPTIONAL);
+    gtk_box_pack_start(GTK_BOX(priv->vbox_tab[2]), priv->caption_control,
+                       FALSE, FALSE, 0);
+
+    /* Populate notebook */
+    gtk_notebook_insert_page(priv->notebook, priv->vbox_tab[0], NULL, 0);
+    gtk_notebook_insert_page(priv->notebook, priv->vbox_tab[1], NULL, 1);
+    gtk_notebook_insert_page(priv->notebook, priv->vbox_tab[2], NULL, 2);
+    gtk_notebook_set_tab_label_text(priv->notebook, priv->vbox_tab[0],
+                                    _("ecdg_ti_font_dialog_style"));
+    gtk_notebook_set_tab_label_text(priv->notebook, priv->vbox_tab[1],
+                                    _("ecdg_ti_font_dialog_format"));
+    gtk_notebook_set_tab_label_text(priv->notebook, priv->vbox_tab[2],
+                                    _("ecdg_ti_font_dialog_other"));
+    gtk_box_pack_start(GTK_BOX(GTK_DIALOG(fontseldiag)->vbox),
+                       GTK_WIDGET(priv->notebook), TRUE, TRUE, 0);
+    gtk_widget_show(GTK_WIDGET(priv->notebook));
+
+    /* Add dialog buttons */
+    gtk_dialog_add_button(GTK_DIALOG(fontseldiag),
+                          _("ecdg_bd_font_dialog_ok"),
+                          GTK_RESPONSE_OK);
+    gtk_dialog_add_button(GTK_DIALOG(fontseldiag),
+                          _("ecdg_bd_font_dialog_preview"),
+                          PREVIEW_RESPONSE_ID);
+    gtk_dialog_add_button(GTK_DIALOG(fontseldiag),
+                          _("ecdg_bd_font_dialog_cancel"),
+                          GTK_RESPONSE_CANCEL);
+
+/*Set default preview text*/
+    priv->preview_text = g_strdup(_("ecdg_fi_preview_font_preview_text"));
+
+/*Set response-handler*/
+    g_signal_connect(G_OBJECT(fontseldiag), "response",
+                     G_CALLBACK
+                     (hildon_font_selection_dialog_preview_click), NULL);
+
+/*If we change the font, we have to check all the possible styles for it
+  --> connecting signal*/
+    g_signal_connect(G_OBJECT(priv->cbx_font_type), "changed",
+                     G_CALLBACK
+                     (hildon_font_selection_dialog_font_type_changed),
+                     NULL);
+
+/*If we have a font, where is Bold and italic styles,
+  BUT the font does NOT have Bold-Italic style --> connecting signals*/
+    g_signal_connect(G_OBJECT(priv->chk_bold), "clicked",
+                     G_CALLBACK
+                     (hildon_font_selection_dialog_check_button_clicked),
+                     NULL);
+    g_signal_connect(G_OBJECT(priv->chk_italic), "clicked",
+                     G_CALLBACK
+                     (hildon_font_selection_dialog_check_button_clicked),
+                     NULL);
+
+    g_signal_connect(G_OBJECT(priv->chk_underline), "clicked",
+                     G_CALLBACK
+                     (hildon_font_selection_dialog_check_button_clicked),
+                     NULL);
+    g_signal_connect(G_OBJECT(priv->chk_strikethrough), "clicked",
+                     G_CALLBACK
+                     (hildon_font_selection_dialog_check_button_clicked),
+                     NULL);
+
+    
+    g_signal_connect(G_OBJECT(priv->chk_bold), "toggled",
+                     G_CALLBACK
+                     (hildon_font_selection_dialog_check_button_toggled),
+                     NULL);
+    g_signal_connect(G_OBJECT(priv->chk_italic), "toggled",
+                     G_CALLBACK
+                     (hildon_font_selection_dialog_check_button_toggled),
+                     NULL);
+
+/*Preview dialog init*/
+    priv->dlg_preview =
+        gtk_dialog_new_with_buttons(_("ecdg_ti_preview_font"), NULL,
+                                    GTK_DIALOG_MODAL |
+                                    GTK_DIALOG_DESTROY_WITH_PARENT,
+                                    GTK_STOCK_OK,
+                                    GTK_RESPONSE_ACCEPT,
+                                    NULL);
+    priv->lbl_preview = gtk_label_new(priv->preview_text);
+
+    gtk_container_add(GTK_CONTAINER(GTK_DIALOG(priv->dlg_preview)->vbox),
+                      priv->lbl_preview);
+    gtk_dialog_set_has_separator(GTK_DIALOG(priv->dlg_preview), FALSE);
+    gtk_label_set_use_markup(GTK_LABEL(priv->lbl_preview), FALSE);
+    gtk_label_set_use_underline(GTK_LABEL(priv->lbl_preview), FALSE);
+
+/*Connect a signal to hide the preview dialog*/
+    g_signal_connect(G_OBJECT(priv->dlg_preview), "response",
+                     G_CALLBACK(hildon_font_preview_dialog_close),
+                     fontseldiag);
+/* set keypress handler (ESC hardkey) */
+    g_signal_connect(G_OBJECT(priv->dlg_preview), "key-press-event",
+                     G_CALLBACK
+                     (hildon_font_selection_dialog_preview_key_press),
+                     NULL);
+
+    gtk_window_set_title(GTK_WINDOW(fontseldiag), _("ecdg_ti_font"));
+
+
+    priv->keysnooper =
+        (guint) (gtk_key_snooper_install(
+            (GtkKeySnoopFunc) (hildon_font_selection_dialog_key_snooper),
+            GTK_WIDGET (fontseldiag)));
+    
+    
+    
+    
+    
+    for (i = 0; i < 3; i++)
+        gtk_widget_show_all(GTK_WIDGET(priv->vbox_tab[i]));
+}
+
+static void hildon_font_selection_dialog_set_property(GObject * object,
+               guint property_id,
+               const GValue * value,
+               GParamSpec * pspec)
+{
+       gboolean bold;
+       switch (property_id){
+               case PROP_SELECTOR_BOLD: /* add other cases and handling of them */
+                       bold = g_value_get_boolean (value);     
+                       break;
+               default:
+                       G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
+                       break;
+       }
+}
+
+static void hildon_font_selection_dialog_get_property(GObject * object,
+               guint property_id,
+               GValue * value,
+               GParamSpec * pspec)
+{
+       switch (property_id){
+               case PROP_SELECTOR_BOLD:
+                       g_value_set_boolean(value, g_value_get_boolean(value)); 
+                       /* should set priv->bold? */
+                       break;
+               default:
+                       G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
+       }
+}
+
+static void hildon_font_preview_dialog_close(GtkDialog * dialog,
+                                             gint response, gpointer data)
+{
+    HildonFontSelectionDialog *d;
+    HildonFontSelectionDialogPrivate *priv;
+
+    g_return_if_fail(HILDON_IS_FONT_SELECTION_DIALOG(data));
+    d = HILDON_FONT_SELECTION_DIALOG(data);
+    priv = HILDON_FONT_SELECTION_DIALOG_GET_PRIVATE(d);
+    gtk_widget_hide(GTK_WIDGET(dialog));
+    gtk_window_present(GTK_WINDOW(data));
+}
+
+static void set_event_box_color(GtkWidget * b, GdkColor * color)
+{
+    GdkColor c = { 0, 32000, 32000, 32000 };
+
+    g_return_if_fail(b);
+
+    if (!color) {
+        color = &c;
+    }
+
+    gtk_widget_modify_bg(b, GTK_STATE_NORMAL, color);
+    gtk_widget_modify_bg(b, GTK_STATE_ACTIVE, color);
+    gtk_widget_modify_bg(b, GTK_STATE_PRELIGHT, color);
+    gtk_widget_modify_bg(b, GTK_STATE_SELECTED, color);
+    gtk_widget_modify_bg(b, GTK_STATE_INSENSITIVE, color);
+}
+
+static gboolean color_key_press(GtkWidget * widget,
+                                GdkEventKey * event, gpointer data)
+{
+    if (event->keyval == GDK_Return || event->keyval == GDK_KP_Enter)
+        show_selector(widget, NULL, NULL);
+    return FALSE;
+}
+
+static void show_selector(GtkWidget * widget, GtkButton * b, gpointer data)
+{
+    GtkWidget *selector;
+
+    gint result;
+    HildonFontSelectionDialogPrivate *priv;
+    HildonFontSelectionDialog *fontseldiag;
+    GdkColor *color;
+
+    g_return_if_fail(widget);
+
+    selector = hildon_color_selector_new(NULL);
+
+    fontseldiag = HILDON_FONT_SELECTION_DIALOG(widget);
+    priv = HILDON_FONT_SELECTION_DIALOG_GET_PRIVATE(fontseldiag);
+    hildon_color_selector_set_color(HILDON_COLOR_SELECTOR(selector),
+                                    &priv->c_table);
+    result = gtk_dialog_run(GTK_DIALOG(selector));
+
+    color =
+        hildon_color_selector_get_color(HILDON_COLOR_SELECTOR(selector));
+
+    gtk_widget_destroy(selector);
+    gtk_window_present(GTK_WINDOW(fontseldiag));
+
+    if (result != GTK_RESPONSE_OK)
+        return;
+
+    priv->c_table = *color;
+    set_event_box_color(GTK_WIDGET(priv->font_color_button),
+                        &priv->c_table);
+    gtk_widget_modify_fg(priv->lbl_preview, GTK_STATE_NORMAL,
+                         &priv->c_table);
+    gtk_widget_modify_fg(priv->lbl_preview, GTK_STATE_ACTIVE,
+                         &priv->c_table);
+    gtk_widget_modify_fg(priv->lbl_preview, GTK_STATE_PRELIGHT,
+                         &priv->c_table);
+    gtk_widget_modify_fg(priv->lbl_preview, GTK_STATE_SELECTED,
+                         &priv->c_table);
+    gtk_widget_modify_fg(priv->lbl_preview, GTK_STATE_INSENSITIVE,
+                         &priv->c_table);
+
+}
+
+static void hildon_font_selection_dialog_finalize(GObject * object)
+{
+    HildonFontSelectionDialogPrivate *priv;
+    HildonFontSelectionDialog *fontsel;
+
+    g_return_if_fail(HILDON_IS_FONT_SELECTION_DIALOG(object));
+    fontsel = HILDON_FONT_SELECTION_DIALOG(object);
+
+    priv = HILDON_FONT_SELECTION_DIALOG_GET_PRIVATE(fontsel);
+
+    gtk_key_snooper_remove(priv->keysnooper);
+
+    if (priv->faces)
+        g_free(priv->faces);
+    if (priv->preview_text)
+        g_free(priv->preview_text);
+    if (priv->families)
+        g_free(priv->families);
+
+    if (G_OBJECT_CLASS(font_selection_dialog_parent_class)->finalize)
+        G_OBJECT_CLASS(font_selection_dialog_parent_class)->
+            finalize(object);
+}
+
+static void 
+hildon_font_selection_dialog_check_button_clicked(GtkToggleButton *chk,
+               gpointer data){
+
+       gboolean inconsistent = FALSE;
+
+       g_object_get(G_OBJECT(chk), "inconsistent", &inconsistent, NULL);
+       if (inconsistent)
+               g_object_set(G_OBJECT(chk), "active", TRUE, "inconsistent", FALSE, NULL);
+}
+
+/*When we toggle either the bold or the italic togglebutton*/
+static void
+hildon_font_selection_dialog_check_button_toggled(GtkToggleButton * chk,
+                                                  gpointer user_data)
+{
+    HildonFontSelectionDialog *fontsel;
+    HildonFontSelectionDialogPrivate *priv;
+    gboolean bold, italic;
+
+    bold = italic = TRUE;
+
+    fontsel =
+        HILDON_FONT_SELECTION_DIALOG(gtk_widget_get_ancestor
+                                     (GTK_WIDGET(chk),
+                                      HILDON_TYPE_FONT_SELECTION_DIALOG));
+    priv = HILDON_FONT_SELECTION_DIALOG_GET_PRIVATE(fontsel);
+       
+    if (priv->facetypes[HILDON_FONT_FACE_BOLD] == -1)
+           bold = FALSE;
+    if (priv->facetypes[HILDON_FONT_FACE_ITALIC] == -1)
+           italic = FALSE;
+    
+    if (!priv->both) {
+        if (GTK_WIDGET(chk) == priv->chk_bold) {
+            if (gtk_toggle_button_get_active(chk)) {
+                priv->face = HILDON_FONT_FACE_BOLD;
+               gtk_widget_set_sensitive(priv->chk_italic, FALSE);
+            } else {
+                priv->face = HILDON_FONT_FACE_NORMAL;
+               if (italic){
+                       gtk_widget_set_sensitive(priv->chk_italic, TRUE);
+               }
+            }
+        } else {
+            if (gtk_toggle_button_get_active(chk)) {
+                priv->face = HILDON_FONT_FACE_ITALIC;
+                gtk_widget_set_sensitive(priv->chk_bold, FALSE);
+            } else {
+                priv->face = HILDON_FONT_FACE_NORMAL;
+                if (bold){
+                       gtk_widget_set_sensitive(priv->chk_bold, TRUE);
+               }
+            }
+        }
+
+    } else
+        if (gtk_toggle_button_get_active
+            (GTK_TOGGLE_BUTTON(priv->chk_bold)))
+        if (gtk_toggle_button_get_active
+            (GTK_TOGGLE_BUTTON(priv->chk_italic)))
+            priv->face = HILDON_FONT_FACE_BOLD_ITALIC;
+        else
+            priv->face = HILDON_FONT_FACE_BOLD;
+    else if (gtk_toggle_button_get_active
+             (GTK_TOGGLE_BUTTON(priv->chk_italic)))
+        priv->face = HILDON_FONT_FACE_ITALIC;
+    else
+        priv->face = HILDON_FONT_FACE_NORMAL;
+}
+
+/*Some gtk_fontsel general pango functions -- BEGIN*/
+
+static int compare_font_descriptions(const PangoFontDescription * a,
+                                     const PangoFontDescription * b)
+{
+    int val = strcmp(pango_font_description_get_family(a),
+                     pango_font_description_get_family(b));
+
+    if (val != 0)
+        return val;
+
+    if (pango_font_description_get_weight(a) !=
+        pango_font_description_get_weight(b))
+        return pango_font_description_get_weight(a) -
+            pango_font_description_get_weight(b);
+
+    if (pango_font_description_get_style(a) !=
+        pango_font_description_get_style(b))
+        return pango_font_description_get_style(a) -
+            pango_font_description_get_style(b);
+
+    if (pango_font_description_get_stretch(a) !=
+        pango_font_description_get_stretch(b))
+        return pango_font_description_get_stretch(a) -
+            pango_font_description_get_stretch(b);
+
+    if (pango_font_description_get_variant(a) !=
+        pango_font_description_get_variant(b))
+        return pango_font_description_get_variant(a) -
+            pango_font_description_get_variant(b);
+
+    return 0;
+}
+static int faces_sort_func(const void *a, const void *b)
+{
+    PangoFontDescription *desc_a;
+    PangoFontDescription *desc_b;
+    int ord;
+
+    desc_a = pango_font_face_describe(*(PangoFontFace **) a);
+    desc_b = pango_font_face_describe(*(PangoFontFace **) b);
+    ord = compare_font_descriptions(desc_a, desc_b);
+
+    pango_font_description_free(desc_a);
+    pango_font_description_free(desc_b);
+
+    return ord;
+}
+static int cmp_families(const void *a, const void *b)
+{
+    const char *a_name =
+        pango_font_family_get_name(*(PangoFontFamily **) a);
+    const char *b_name =
+        pango_font_family_get_name(*(PangoFontFamily **) b);
+
+    return g_utf8_collate(a_name, b_name);
+}
+
+/*The general pango functions -- END*/
+
+/*Run only once in the init*/
+static void hildon_font_selection_dialog_preview_click(GtkDialog * dialog,
+                                                       gint response,
+                                                       gpointer data)
+{
+    if (response == PREVIEW_RESPONSE_ID) {
+        g_signal_stop_emission_by_name(G_OBJECT(dialog), "response");
+        hildon_font_selection_dialog_show_preview
+            (HILDON_FONT_SELECTION_DIALOG(dialog));
+    }
+}
+
+static gboolean
+hildon_font_selection_dialog_preview_key_press(GtkWidget * widget,
+                                               GdkEventKey * event,
+                                               gpointer data)
+{
+    g_return_val_if_fail(widget, FALSE);
+    g_return_val_if_fail(event, FALSE);
+
+    if (event->keyval == GDK_Escape) {
+        gtk_dialog_response(GTK_DIALOG(widget), GTK_RESPONSE_CANCEL);
+        return TRUE;
+    }
+
+    return FALSE;
+}
+
+/*If the font type is changed -> update the components
+  (... We may not have a sensitive bold or/and italic toggle button)*/
+static void hildon_font_selection_dialog_font_type_changed(GtkComboBox *
+                                                           cbox,
+                                                           gpointer
+                                                           userdata)
+{
+    gint i;
+    GtkWidget *fontsel =
+        gtk_widget_get_ancestor(GTK_WIDGET(cbox),
+                                HILDON_TYPE_FONT_SELECTION_DIALOG);
+    HildonFontSelectionDialogPrivate *priv =
+        HILDON_FONT_SELECTION_DIALOG_GET_PRIVATE
+        (HILDON_FONT_SELECTION_DIALOG(fontsel));
+    priv->family = priv->families[gtk_combo_box_get_active(cbox)];
+    for (i = 0; i < 4; ++i) {
+           priv->facetypes[i] = -1;
+    }
+    hildon_font_selection_dialog_show_available_styles
+        (HILDON_FONT_SELECTION_DIALOG(fontsel));
+}
+
+
+static PangoAttrList
+    *hildon_font_selection_dialog_create_font(HildonFontSelectionDialog *
+                                              fontsel)
+{
+    PangoFontDescription *font_desc;
+    PangoAttrList *list;
+    PangoAttribute *attr;
+    int len;
+    HildonFontSelectionDialogPrivate *priv =
+        HILDON_FONT_SELECTION_DIALOG_GET_PRIVATE(fontsel);
+
+/*Setting size to a temporar variable*/
+    priv->size =
+        font_sizes[gtk_combo_box_get_active
+                   (GTK_COMBO_BOX(priv->cbx_font_size))];
+
+    list = pango_attr_list_new();
+    gtk_label_set_text(GTK_LABEL(priv->lbl_preview), priv->preview_text);
+    len = strlen(priv->preview_text);
+
+/*Create a font_desc attribute for the font*/
+
+    font_desc = pango_font_face_describe(priv->faces[priv->facetypes[priv->face]]);
+    pango_font_description_set_size(font_desc, priv->size * PANGO_SCALE);
+    pango_font_description_set_family(font_desc,
+                                      pango_font_family_get_name(priv->
+                                                                 family));
+
+    attr = pango_attr_font_desc_new(font_desc);
+    attr->start_index = 0;
+    attr->end_index = len;
+    pango_attr_list_insert(list, attr);
+
+/*Create an underline attribute for the font*/
+    if (gtk_toggle_button_get_active
+        (GTK_TOGGLE_BUTTON(priv->chk_underline))) {
+        attr = pango_attr_underline_new(PANGO_UNDERLINE_SINGLE);
+        attr->start_index = 0;
+        attr->end_index = len;
+        pango_attr_list_insert(list, attr);
+    }
+
+/*Create a striketrough attribute for the font*/
+    if (gtk_toggle_button_get_active
+        (GTK_TOGGLE_BUTTON(priv->chk_strikethrough))) {
+        attr = pango_attr_strikethrough_new(TRUE);
+        attr->start_index = 0;
+        attr->end_index = len;
+        pango_attr_list_insert(list, attr);
+    }
+
+/*Create a positioning attribute for the font*/
+    attr = NULL;
+    switch (gtk_combo_box_get_active
+            (GTK_COMBO_BOX(priv->cbx_positioning))) {
+    case HILDON_POSITIONING_SUPER:
+        attr = pango_attr_rise_new(priv->size * (PANGO_SCALE / 2));
+        break;
+    case HILDON_POSITIONING_SUB:
+        attr = pango_attr_rise_new(-priv->size * (PANGO_SCALE / 2));
+        break;
+    };
+
+    if (attr) {
+        attr->start_index = 0;
+        attr->end_index = len;
+        pango_attr_list_insert(list, attr);
+    }
+/*Create a color attribute for the font*/
+    attr =
+        pango_attr_foreground_new(priv->c_table.red, priv->c_table.green,
+                                  priv->c_table.blue);
+    attr->start_index = 0;
+    attr->end_index = len;
+    pango_attr_list_insert(list, attr);
+
+    return list;
+}
+
+static void
+hildon_font_selection_dialog_set_font_for_preview(HildonFontSelectionDialog
+                                                  * fsd)
+{
+/*set the attribute list for the preview label*/
+    HildonFontSelectionDialogPrivate *priv;
+    PangoAttrList *attr = hildon_font_selection_dialog_create_font(fsd);
+
+    priv = HILDON_FONT_SELECTION_DIALOG_GET_PRIVATE(fsd);
+    gtk_label_set_attributes(GTK_LABEL(priv->lbl_preview), attr);
+    pango_attr_list_unref(attr);
+}
+
+/*When the user clicks the preview button*/
+static void
+hildon_font_selection_dialog_show_preview(HildonFontSelectionDialog *
+                                          fontsel)
+{
+    HildonFontSelectionDialogPrivate *priv =
+        HILDON_FONT_SELECTION_DIALOG_GET_PRIVATE(fontsel);
+
+/*Set the font*/
+    hildon_font_selection_dialog_set_font_for_preview(fontsel);
+
+/*Set a correct size for the label and for the window*/
+/*First we minimize the window, if we resize from larger font to smaller*/
+    gtk_window_resize(GTK_WINDOW(priv->dlg_preview), 1, 1);
+    gtk_widget_set_size_request(priv->lbl_preview, -1, priv->size*4);
+
+/*And show the dialog*/
+    gtk_widget_show_all(priv->dlg_preview);
+    gtk_dialog_run(GTK_DIALOG(priv->dlg_preview));
+    gtk_widget_hide(priv->dlg_preview);
+}
+
+
+/*Run only once in the init --> Collect all the available fonts*/
+static void
+hildon_font_selection_dialog_show_available_fonts(HildonFontSelectionDialog
+                                                  * fontsel)
+{
+    PangoFontFamily *match_family = NULL;
+    gint i, match_row;
+    HildonFontSelectionDialogPrivate *priv =
+        HILDON_FONT_SELECTION_DIALOG_GET_PRIVATE(fontsel);
+    match_row = 0;
+
+    pango_context_list_families(gtk_widget_get_pango_context
+                                (GTK_WIDGET(fontsel)), &priv->families,
+                                &priv->n_families);
+    qsort(priv->families, priv->n_families, sizeof(PangoFontFamily *),
+          cmp_families);
+
+
+    for (i = 0; i < priv->n_families; i++) {
+        const gchar *name = pango_font_family_get_name(priv->families[i]);
+
+        gtk_combo_box_append_text(GTK_COMBO_BOX(priv->cbx_font_type),
+                                  name);
+
+        if (i == 0 || !g_ascii_strcasecmp(name, "sans")) {
+            match_family = priv->families[i];
+            match_row = i;
+        }
+    }
+
+    priv->family = match_family;
+    gtk_combo_box_set_active(GTK_COMBO_BOX(priv->cbx_font_type),
+                             match_row);
+}
+
+
+static void
+hildon_font_selection_dialog_show_available_positionings
+(HildonFontSelectionDialog * fontsel)
+{
+    HildonFontSelectionDialogPrivate *priv =
+        HILDON_FONT_SELECTION_DIALOG_GET_PRIVATE(fontsel);
+
+    gtk_combo_box_append_text(GTK_COMBO_BOX(priv->cbx_positioning),
+                              _("ecdg_va_font_printpos_1"));
+    gtk_combo_box_append_text(GTK_COMBO_BOX(priv->cbx_positioning),
+                              _("ecdg_va_font_printpos_2"));
+    gtk_combo_box_append_text(GTK_COMBO_BOX(priv->cbx_positioning),
+                              _("ecdg_va_font_printpos_3"));
+    gtk_combo_box_set_active(GTK_COMBO_BOX(priv->cbx_positioning), 0);
+}
+
+
+/*Run after the hildon_font_selection_dialog_show_available_fonts
+  -function*/
+static void
+hildon_font_selection_dialog_show_available_styles
+(HildonFontSelectionDialog * fontsel)
+{
+    gint n_faces, i;
+    PangoFontFace **faces;
+    gchar *familyname;
+    HildonFontSelectionDialogPrivate *priv =
+        HILDON_FONT_SELECTION_DIALOG_GET_PRIVATE(fontsel);
+    faces = priv->faces;
+
+    if (faces)
+        g_free(faces);
+
+    familyname = (gchar *)pango_font_family_get_name (priv->family);
+           
+/*Fetch and sort faces*/
+    pango_font_family_list_faces(priv->family, &faces, &n_faces);
+
+    qsort(faces, n_faces, sizeof(PangoFontFace *), faces_sort_func); 
+
+    priv->faces = faces;
+
+/*Set the checkbuttons to false ->
+  If we have italic or/and bold, we'll set that to true*/
+    gtk_widget_set_sensitive(priv->chk_bold, FALSE);
+    gtk_widget_set_sensitive(priv->chk_italic, FALSE);
+
+    priv->both = FALSE;
+
+/*Check all the faces we have for the selected font type*/
+    for (i = 0; i < n_faces; i++) {
+        const gchar *str = pango_font_face_get_face_name(faces[i]);
+       
+        
+       if (!(strcmp(str, "Bold Italic")) || !(strcmp(str, "Demi Italic"))
+            || !(strcmp(str, "Bold Oblique"))
+            || !(strcmp(str, "Demi Bold Italic"))) {
+            priv->facetypes[HILDON_FONT_FACE_BOLD_ITALIC] = i;
+            gtk_widget_set_sensitive(priv->chk_bold, TRUE);
+            gtk_widget_set_sensitive(priv->chk_italic, TRUE);
+            priv->both = TRUE;
+            i = n_faces;        /* IHOPE -- Regular/Normal (what ever name 
+                                   it has) is assumed to be first one */
+        } else if (g_str_has_prefix(str, "Bold")
+                   || g_str_has_prefix(str, "Demi")) {
+            priv->facetypes[HILDON_FONT_FACE_BOLD] = i;
+            gtk_widget_set_sensitive(priv->chk_bold, TRUE);
+        } else if (g_str_has_suffix(str, "Italic") ||
+                   g_str_has_suffix(str, "Oblique"))
+        {
+            priv->facetypes[HILDON_FONT_FACE_ITALIC] = i;
+            gtk_widget_set_sensitive(priv->chk_italic, TRUE);
+        }      
+       else if (i == 0)  {    /* First one is Regular, Normal, etc. */
+            priv->facetypes[HILDON_FONT_FACE_NORMAL] = i;
+       }
+    }
+
+/*If we had only one legal face (Regular), both are same ->
+  change both to TRUE*/
+    if (i == 1)
+        priv->both = TRUE;
+
+/*And then.. If a chk_button is not sensitive -> un_check it*/
+    if (!GTK_WIDGET_IS_SENSITIVE(priv->chk_bold))
+        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->chk_bold),
+                                     FALSE);
+
+    if (!GTK_WIDGET_IS_SENSITIVE(priv->chk_italic))
+        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->chk_italic),
+                                     FALSE);
+
+    if (priv->both) {
+        if (!GTK_WIDGET_IS_SENSITIVE(priv->chk_bold))
+            gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+                                         (priv->chk_italic), FALSE);
+        else if (!GTK_WIDGET_IS_SENSITIVE(priv->chk_italic))
+            gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->chk_bold),
+                                         FALSE);
+    }
+}
+
+
+/*Loads the sizes from a pre-allocated table*/
+static void
+hildon_font_selection_dialog_show_available_sizes(HildonFontSelectionDialog
+                                                  * fontsel,
+                                                  gboolean first_time)
+{
+    gint i;
+    GtkListStore *model;
+    HildonFontSelectionDialogPrivate *priv =
+        HILDON_FONT_SELECTION_DIALOG_GET_PRIVATE(fontsel);
+
+    if (first_time) {
+        model = gtk_list_store_new(1, G_TYPE_INT);
+        gtk_combo_box_set_model(GTK_COMBO_BOX(priv->cbx_font_size),
+                                GTK_TREE_MODEL(model));
+        for (i = 0; i < G_N_ELEMENTS(font_sizes); i++) {
+            GtkTreeIter iter;
+
+            gtk_list_store_append(model, &iter);
+            /* 0 == First column in the combobox */
+            gtk_list_store_set(model, &iter, 0, font_sizes[i], -1);
+
+            if (i == 0 || font_sizes[i] * PANGO_SCALE == priv->size)
+                gtk_combo_box_set_active_iter(GTK_COMBO_BOX
+                                              (priv->cbx_font_size),
+                                              &iter);
+        }
+    }
+}
+
+/*******************/
+/*Public functions*/
+/*******************/
+
+/**
+ * hildon_font_selection_dialog_new:
+ * @parent: the parent window.
+ * @title: the title of font selection dialog.
+ *
+ * if the title is left to %NULL, the title will be left
+ * to DEFAULT == "Font".
+ *
+ * Return value: a new #HildonFontSelectionDialog.
+ */
+GtkWidget *hildon_font_selection_dialog_new(GtkWindow * parent,
+                                            const gchar * title)
+{
+    HildonFontSelectionDialog *fontseldiag;
+
+    fontseldiag = g_object_new(HILDON_TYPE_FONT_SELECTION_DIALOG,
+                               "has-separator", FALSE, NULL);
+
+    if (title)
+        gtk_window_set_title(GTK_WINDOW(fontseldiag), title);
+
+    if (parent)
+        gtk_window_set_transient_for(GTK_WINDOW(fontseldiag), parent);
+
+    return GTK_WIDGET(fontseldiag);
+}
+
+/**
+ * hildon_font_selection_dialog_get_preview_text:
+ * @fsd: the font selection dialog.
+ *
+ * Gets the text in preview dialog.
+ * The returned string must be freed by the user.
+ *
+ * Returns: a string pointer.
+ */
+gchar *
+hildon_font_selection_dialog_get_preview_text(HildonFontSelectionDialog * fsd)
+{
+    HildonFontSelectionDialogPrivate *priv;
+
+    g_return_val_if_fail(HILDON_IS_FONT_SELECTION_DIALOG(fsd), FALSE);
+    priv = HILDON_FONT_SELECTION_DIALOG_GET_PRIVATE(fsd);
+    return g_strdup(priv->preview_text);
+}
+
+/**
+ * hildon_font_selection_dialog_set_preview_text:
+ * @fsd: the font selection dialog.
+ * @text: the text to be set to the preview dialog.
+ *
+ * Sets the text to the preview dialog.
+ * DEFAULT == "The quick brown fox jumped over the lazy dogs"
+ */
+void
+hildon_font_selection_dialog_set_preview_text(HildonFontSelectionDialog *
+                                              fsd, const gchar * text)
+{
+    if (HILDON_IS_FONT_SELECTION_DIALOG(fsd)) ;
+    {
+        HildonFontSelectionDialogPrivate *priv =
+            HILDON_FONT_SELECTION_DIALOG_GET_PRIVATE(fsd);
+        g_free(priv->preview_text);
+        priv->preview_text = g_strdup(text);
+    }
+}
+
+/**
+ * hildon_font_selection_dialog_get_text_tag:
+ * @fsd: the font selection dialog.
+ *
+ * Get the #GtkTextTag for selections.
+ * 
+ * Returns: a #GtkTextTag representing the choises selected (eg. font name, font size, bolding, italic, underlinening etc.)
+ */ 
+GtkTextTag * hildon_font_selection_dialog_get_text_tag (
+               HildonFontSelectionDialog *fsd)
+{
+       GtkTextTag *tag = NULL;
+       gboolean bold, italic, strikethrough, underline;
+       gint i=-1, fontsize = 0, rise=0;
+       gchar *fontname;
+       HildonFontSelectionDialogPrivate *priv = HILDON_FONT_SELECTION_DIALOG_GET_PRIVATE(fsd);
+       bold=italic=strikethrough=underline=FALSE;
+
+       g_object_get(G_OBJECT(priv->chk_bold), "active", &bold, NULL);
+       g_object_get(G_OBJECT(priv->chk_italic), "active", &italic, NULL);
+       g_object_get(G_OBJECT(priv->chk_underline), "active", &underline, NULL);
+       g_object_get(G_OBJECT(priv->chk_strikethrough), "active", &strikethrough, NULL);
+       
+       i = gtk_combo_box_get_active(GTK_COMBO_BOX(priv->cbx_font_type));
+       fontname = (gchar *) pango_font_family_get_name(priv->families[i]);
+       
+       fontsize = font_sizes[gtk_combo_box_get_active (GTK_COMBO_BOX(priv->cbx_font_size))];
+
+       switch (gtk_combo_box_get_active (GTK_COMBO_BOX(priv->cbx_positioning))) {
+               case HILDON_POSITIONING_SUPER:
+                    rise = (priv->size * (PANGO_SCALE / 2));
+                    break;
+               case HILDON_POSITIONING_SUB:
+                    rise = (-priv->size * (PANGO_SCALE / 2));
+                    break;
+               case HILDON_POSITIONING_NORMAL:
+                    rise = 0; break;
+       }; 
+       
+        tag = gtk_text_tag_new(NULL);
+       if (fontname)
+               g_object_set(G_OBJECT(tag), "font", fontname, NULL);                    
+       g_object_set(G_OBJECT(tag), "size", fontsize*PANGO_SCALE, NULL);                
+       if (bold)
+               g_object_set(G_OBJECT(tag), "weight", PANGO_WEIGHT_BOLD, NULL);
+       if (italic)
+               g_object_set(G_OBJECT(tag), "style", PANGO_STYLE_ITALIC, NULL);
+       if (underline)
+               g_object_set(G_OBJECT(tag), "underline", TRUE, NULL);
+       if (strikethrough)
+               g_object_set(G_OBJECT(tag), "strikethrough", TRUE, NULL);
+       if (rise)
+               g_object_set(G_OBJECT(tag), "rise", rise, NULL);
+       
+       g_object_set(G_OBJECT(tag), "foreground-gdk", &priv->c_table, NULL);
+       return tag;
+}
+
+/** 
+ * hildon_font_selection_dialog_set_buffer:
+ * @fsd: the font selection dialog.
+ * @buffer: a #GtkTextBuffer containing the text to which the selections will be applied. Applying is responsibility of application.
+ *
+ * Sets the textbuffer under editing. The dialog will look what selections (bolding/italic/font/fontsize etc.) are present in the 
+ * buffer text and make these selections be default in the dialog.
+ * 
+ */
+void hildon_font_selection_dialog_set_buffer (          
+               HildonFontSelectionDialog *fsd,
+               GtkTextBuffer *buffer)
+{
+       GtkTextIter begin, end;
+       GtkStyle *wstyle = NULL; 
+       gint size = 0, i;
+       gchar *font = NULL;     
+       gboolean bold_on, bold_off, italic_on, italic_off, underline_on, underline_off, 
+                strike_through_off, strike_through_on, superscript_on, superscript_off, subscript_on, subscript_off;
+       HildonFontSelectionDialogPrivate *priv;
+
+       priv = HILDON_FONT_SELECTION_DIALOG_GET_PRIVATE(fsd);
+       
+       /* bold_on and bold_off and the likes are used to recognize conflicts so that the checkbuttons can be put to 'inconsistent' state 
+        * NOTE: they are set initially to TRUE! */
+       bold_on = bold_off = italic_on = italic_off = underline_on = underline_off = TRUE;
+       strike_through_off = strike_through_on = superscript_on = superscript_off = subscript_on = subscript_off = TRUE;
+
+       /* go through the selection */
+       gtk_text_buffer_get_selection_bounds (buffer, &begin, &end);
+       priv->preview_text = gtk_text_buffer_get_slice(buffer, &begin, &end, FALSE);
+
+       if (!gtk_text_iter_equal(&begin, &end)) /* this fails if no selection */
+       {
+               gboolean tags_found = FALSE; /* this is needed so we know we need to get the default font */
+               GtkTextIter iter = begin;
+               
+               /* loop letter by letter */
+               while (!gtk_text_iter_equal(&iter, &end))
+               {
+                       GSList *tags;
+                       gboolean bset, iset, stset, ulset, rset, sset, fgset; /* these are flags for whether the property is set or not */
+                       
+                       gboolean strike_through, underline; /* these are the */
+                       gint weight=0, rise=0;              /* values of the */
+                       PangoStyle style;                   /* properties of one tag */
+                       
+                       gboolean b, i, st, ul, r, l, s, c; /* these booleans tell whether or not there was at least one tags in the
+                                                                 tags list with the corresponding property set */
+                       
+                       GdkColor *color;
+                       b = i = st = ul = r = l =s= c=FALSE;
+                       size = 0;
+                       bset=iset=strike_through=underline=stset=ulset=rset=FALSE; /* all are assumed to FALSE */
+                       
+                       tags = gtk_text_iter_get_tags(&iter); /* TODO: free the list! */
+                       if (tags) tags_found=TRUE;
+                       while (tags){
+                               /* TODO: positioning?? foreground color?? */
+
+                               g_object_get(G_OBJECT(tags->data), 
+                                               "weight-set", &bset, 
+                                               "style-set", &iset,
+                                               "strikethrough-set", &stset,
+                                               "underline-set", &ulset,
+                                               "rise-set", &rset,
+                                               "family", &font,
+                                               "foreground-set", &fgset, 
+                                               "size-set", &sset, 
+                                               NULL);
+                               
+                               if (bset){
+                                       g_object_get(G_OBJECT(tags->data), "weight", &weight, NULL);
+                                       if (weight > PANGO_WEIGHT_NORMAL)       
+                                               b = TRUE;
+                               }
+                               if (iset){
+                                       g_object_get(G_OBJECT(tags->data), "style", &style, NULL);
+                                       if (style == PANGO_STYLE_ITALIC)
+                                               i = TRUE;
+                               }
+                               if (stset){
+                                       g_object_get(G_OBJECT(tags->data), "strikethrough", &strike_through, NULL);
+                                       if (strike_through)
+                                               st = TRUE;
+                               }
+                               if (ulset){
+                                       g_object_get(G_OBJECT(tags->data), "underline", &underline, NULL);
+                                       if (underline)
+                                               ul = TRUE;
+                               }
+                               if (rset){
+                                       g_object_get(G_OBJECT(tags->data), "rise", &rise, NULL);
+                                       if (rise > 0) r=TRUE; 
+                                       else if (rise<0) l=TRUE; 
+                               }                       
+                               if (sset){
+                                       g_object_get(G_OBJECT(tags->data), "size", &size, NULL);
+                                       s = TRUE;
+                               }
+                               if (fgset){
+                                       g_object_get(G_OBJECT(tags->data), "foreground-gdk", &color, NULL);
+                                       c = TRUE;
+                               }
+                                                               
+                               tags = tags->next;
+                       }
+                       if (!b) bold_on = FALSE; /* if no tag in the tag list for this letter had bolding then bold_on should be false
+                                                   the idea is that if the next (or some letter later has bolding the we have
+                                                   bold_on = bolf_off = FALSE and thus we're in inconsistent state */
+                       else bold_off = FALSE;
+                       if (!i) italic_on = FALSE;
+                       else italic_off = FALSE;
+                       if (!st) strike_through_on = FALSE;
+                       else strike_through_off = FALSE;
+                       if (!ul) underline_on = FALSE;
+                       else underline_off = FALSE;
+                       if (!r) superscript_on = FALSE;
+                       else superscript_off = FALSE;
+                       if (!l) subscript_on = FALSE;
+                       else subscript_off = FALSE;
+                       
+                       if (!bold_on && !bold_off){
+                               g_object_set(GTK_TOGGLE_BUTTON(priv->chk_bold), 
+                                               "inconsistent", TRUE, 
+                                               NULL);
+                       }
+                       else {
+                               g_object_set(GTK_TOGGLE_BUTTON(priv->chk_bold), 
+                                               "inconsistent", FALSE,
+                                               "active", bold_on, 
+                                               NULL);
+                               if (!priv->both) gtk_widget_set_sensitive (GTK_WIDGET(priv->chk_italic), FALSE);
+                       }
+                       if (!italic_on && !italic_off){
+                               g_object_set(GTK_TOGGLE_BUTTON(priv->chk_italic), 
+                                               "inconsistent", TRUE, 
+                                               NULL);
+                       }
+                       else {
+                               g_object_set(GTK_TOGGLE_BUTTON(priv->chk_italic), 
+                                               "inconsistent", FALSE,
+                                               "active", italic_on, 
+                                               NULL);
+                               if (!priv->both) gtk_widget_set_sensitive (GTK_WIDGET(priv->chk_bold), FALSE);
+                       }
+                       if (!underline_on && !underline_off){
+                               g_object_set(GTK_TOGGLE_BUTTON(priv->chk_underline), 
+                                               "inconsistent", TRUE, 
+                                               NULL);
+                       }
+                       else {
+                               g_object_set(GTK_TOGGLE_BUTTON(priv->chk_underline), 
+                                               "inconsistent", FALSE,
+                                               "active", underline_on,                                 
+                                               NULL);
+                       }
+                       if (!strike_through_on && !strike_through_off) {
+                               g_object_set(GTK_TOGGLE_BUTTON(priv->chk_strikethrough),
+                                               "inconsistent", TRUE,
+                                               NULL);
+                       }
+                       else{
+                               g_object_set(GTK_TOGGLE_BUTTON(priv->chk_strikethrough),
+                                               "inconsistent", FALSE,
+                                               "active", strike_through_on,
+                                               NULL);
+                       }
+                       if ((!superscript_on && !superscript_off)||(!subscript_on && !subscript_off));
+                       else{
+                               if (superscript_on)
+                                       g_object_set(G_OBJECT(priv->cbx_positioning), "active", 1, NULL);
+                               else if (subscript_on)
+                                       g_object_set(G_OBJECT(priv->cbx_positioning), "active", 2, NULL);
+                               else 
+                                       g_object_set(G_OBJECT(priv->cbx_positioning), "active", 0, NULL);
+                       }
+                       if (c){
+                               priv->c_table = *color;
+                               set_event_box_color(priv->font_color_button, color);
+                       }
+                       if (!s){
+                               wstyle = gtk_rc_get_style_by_paths(gtk_settings_get_default(), NULL, NULL, GTK_TYPE_TEXT_VIEW);
+                               size = pango_font_description_get_size(wstyle->font_desc);
+                               wstyle = NULL;
+                       }
+                       gtk_text_iter_forward_cursor_position(&iter);
+                       
+               }
+               if (!tags_found){
+                       wstyle = gtk_rc_get_style_by_paths(gtk_settings_get_default(), NULL, NULL, GTK_TYPE_TEXT_VIEW);
+               }
+       }
+       else wstyle = gtk_rc_get_style_by_paths(gtk_settings_get_default(), NULL, NULL, GTK_TYPE_TEXT_VIEW);
+       if (wstyle)                                                                     
+       {                                                                                       
+               font = (gchar *) pango_font_description_get_family(wstyle->font_desc);  
+               size = pango_font_description_get_size(wstyle->font_desc);      
+       }
+
+       for (i = 0; i < G_N_ELEMENTS(font_sizes); i++) {
+               if ((font_sizes[i]*PANGO_SCALE)==size)
+                       gtk_combo_box_set_active(GTK_COMBO_BOX(priv->cbx_font_size), i);
+       }
+       for (i = 0; i < priv->n_families; i++) {
+               const gchar *name = pango_font_family_get_name(priv->families[i]);
+               if (font && name && !strcmp(font, name))
+                       gtk_combo_box_set_active(GTK_COMBO_BOX(priv->cbx_font_type), i);
+       }
+
+}              
+
+/**
+ * hildon_font_selection_dialog_get_font:
+ * @fsd: the font selection dialog.
+ *
+ * Gets the font from the dialog.
+ *
+ * Return value: pointer to @PangoAttrList.
+ */
+PangoAttrList
+    *hildon_font_selection_dialog_get_font(HildonFontSelectionDialog * fsd)
+{
+    g_return_val_if_fail(HILDON_IS_FONT_SELECTION_DIALOG(fsd), FALSE);
+    return hildon_font_selection_dialog_create_font(fsd);
+}
+
+/**
+ * hildon_font_selection_dialog_set_font:
+ * @fsd: the font selection dialog.
+ * @list: the pango attribute list.
+ *
+ * Sets the font to the dialog.
+ */
+void hildon_font_selection_dialog_set_font(HildonFontSelectionDialog * fsd,
+                                           PangoAttrList * list)
+{
+    if (HILDON_IS_FONT_SELECTION_DIALOG(fsd)) {
+        gint i, tmp;
+        gchar *str;
+        PangoAttribute *attr;
+        PangoFontDescription *desc;
+        gboolean is_italic, is_bold;
+        PangoAttrIterator *iter;
+        HildonFontSelectionDialogPrivate *priv =
+            HILDON_FONT_SELECTION_DIALOG_GET_PRIVATE(fsd);
+        iter = pango_attr_list_get_iterator(list);
+        attr = pango_attr_iterator_get(iter, PANGO_ATTR_FONT_DESC);
+        desc = ((PangoAttrFontDesc *) attr)->desc;
+        str = (gchar *) g_strdup(pango_font_description_get_family(desc));
+
+        /* Set family */
+        for (i = 0; i < priv->n_families; i++) {
+            if (g_ascii_strcasecmp
+                (pango_font_family_get_name(priv->families[i]), str) == 0) {
+                priv->family = priv->families[i];
+                gtk_combo_box_set_active(GTK_COMBO_BOX
+                                         (priv->cbx_font_type), i);
+                i = priv->n_families;
+            }
+        }
+
+        is_italic = is_bold = FALSE;
+
+        /* If it's not normal -> it's italic */
+        if (pango_font_description_get_style(desc) != PANGO_STYLE_NORMAL) {
+            is_italic = TRUE;
+            gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+                                         (priv->chk_italic), TRUE);
+        } else
+            gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+                                         (priv->chk_italic), FALSE);
+
+        if (pango_font_description_get_weight(desc) > PANGO_WEIGHT_NORMAL) {
+            is_bold = TRUE;
+            gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->chk_bold),
+                                         TRUE);
+        } else
+            gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->chk_bold),
+                                         FALSE);
+
+        if (is_bold) {
+            if (is_italic)
+                priv->face = HILDON_FONT_FACE_BOLD_ITALIC;
+            else
+                priv->face = HILDON_FONT_FACE_BOLD;
+        } else if (is_italic)
+            priv->face = HILDON_FONT_FACE_ITALIC;
+        else
+            priv->face = HILDON_FONT_FACE_NORMAL;
+
+        /* Set size */
+        priv->size = pango_font_description_get_size(desc);
+        tmp = priv->size / PANGO_SCALE;
+        for (i = 0; i < G_N_ELEMENTS(font_sizes); i++) {
+            if (tmp == font_sizes[i]) {
+                gtk_combo_box_set_active(GTK_COMBO_BOX
+                                         (priv->cbx_font_size), i);
+                i = G_N_ELEMENTS(font_sizes) + 1;
+            }
+        }
+        /* If we went trough the whole for-loop -> set the size to 10 */
+        if (i == G_N_ELEMENTS(font_sizes))
+            gtk_combo_box_set_active(GTK_COMBO_BOX(priv->cbx_font_size),
+                                     10);
+
+        /* Set underline */
+        attr = pango_attr_iterator_get(iter, PANGO_ATTR_UNDERLINE);
+        if (attr) {
+            if (((PangoAttrInt *) attr)->value)
+                gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+                                             (priv->chk_underline), TRUE);
+            else
+                gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+                                             (priv->chk_underline), FALSE);
+        }
+        /* Set striketrought */
+        attr = pango_attr_iterator_get(iter, PANGO_ATTR_STRIKETHROUGH);
+        if (attr) {
+            if (((PangoAttrInt *) attr)->value)
+                gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+                                             (priv->chk_strikethrough),
+                                             TRUE);
+            else
+                gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+                                             (priv->chk_strikethrough),
+                                             FALSE);
+        }
+
+        /* Set positioning */
+        attr = pango_attr_iterator_get(iter, PANGO_ATTR_RISE);
+        if (attr) {
+            if (((PangoAttrInt *) attr)->value > 0)
+                gtk_combo_box_set_active(GTK_COMBO_BOX
+                                         (priv->cbx_positioning),
+                                         HILDON_POSITIONING_SUPER);
+            else if (((PangoAttrInt *)
+                      pango_attr_iterator_get(iter,
+                                              PANGO_ATTR_RISE))->value < 0)
+                gtk_combo_box_set_active(GTK_COMBO_BOX
+                                         (priv->cbx_positioning),
+                                         HILDON_POSITIONING_SUB);
+        }
+
+        /* Set color */
+        attr = pango_attr_iterator_get(iter, PANGO_ATTR_FOREGROUND);
+        if (attr) {
+            priv->c_table.red =
+                (guint) (((PangoAttrColor *) attr)->color).red;
+            priv->c_table.green =
+                (guint) (((PangoAttrColor *) attr)->color).green;
+            priv->c_table.blue =
+                (guint) (((PangoAttrColor *) attr)->color).blue;
+            set_event_box_color(GTK_WIDGET(priv->font_color_button),
+                                &priv->c_table);
+        }
+        pango_attr_iterator_destroy(iter);
+    }
+}
+
+static gint hildon_font_selection_dialog_key_snooper(GtkWidget * swidget,
+                                                     GdkEventKey * event,
+                                                     GtkWidget * widget)
+{
+    HildonFontSelectionDialog *dialog =
+        HILDON_FONT_SELECTION_DIALOG(widget);
+    HildonFontSelectionDialogPrivate *priv =
+        HILDON_FONT_SELECTION_DIALOG_GET_PRIVATE(dialog);
+    if (event->type == GDK_KEY_RELEASE)
+        switch (event->keyval) {
+        case GDK_P:
+        case GDK_p:
+            gtk_dialog_response(GTK_DIALOG(widget), PREVIEW_RESPONSE_ID);
+            break;
+        case GDK_B:
+        case GDK_b:
+        {
+            gboolean state =
+                gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+                                             (priv->chk_bold));
+            if (GTK_WIDGET_IS_SENSITIVE (priv->chk_bold))
+              gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->chk_bold),
+                                           state ? FALSE : TRUE);
+            break;
+        }
+        case GDK_I:
+        case GDK_i:
+        {
+            gboolean state =
+                gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+                                             (priv->chk_italic));
+            if (GTK_WIDGET_IS_SENSITIVE (priv->chk_italic))
+              gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+                                           (priv->chk_italic),
+                                           state ? FALSE : TRUE);
+            break;
+        }
+        case GDK_U:
+        case GDK_u:
+        {
+            gboolean state =
+                gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+                                             (priv->chk_underline));
+            if (GTK_WIDGET_IS_SENSITIVE (priv->chk_underline))
+              gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+                                           (priv->chk_underline),
+                                           state ? FALSE : TRUE);
+            break;
+        }
+        }
+    return FALSE;
+}
diff --git a/hildon-widgets/hildon-font-selection-dialog.h b/hildon-widgets/hildon-font-selection-dialog.h
new file mode 100644 (file)
index 0000000..ff8edc3
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+#ifndef __HILDON_FONT_SELECTION_DIALOG_H__
+#define __HILDON_FONT_SELECTION_DIALOG_H__
+
+#include <gtk/gtkdialog.h>
+#include <gtk/gtktextbuffer.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#define HILDON_TYPE_FONT_SELECTION_DIALOG \
+        (hildon_font_selection_dialog_get_type ())
+#define HILDON_FONT_SELECTION_DIALOG(obj) \
+        (G_TYPE_CHECK_INSTANCE_CAST ((obj),\
+         HILDON_TYPE_FONT_SELECTION_DIALOG, HildonFontSelectionDialog))
+#define HILDON_FONT_SELECTION_DIALOG_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_CAST ((klass),\
+         HILDON_TYPE_FONT_SELECTION_DIALOG,\
+         HildonFontSelectionDialogClass))
+#define HILDON_IS_FONT_SELECTION_DIALOG(obj) \
+        (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\
+         HILDON_TYPE_FONT_SELECTION_DIALOG))
+#define HILDON_IS_FONT_SELECTION_DIALOG_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_TYPE ((klass),\
+         HILDON_TYPE_FONT_SELECTION_DIALOG))
+#define HILDON_FONT_SELECTION_DIALOG_GET_CLASS(obj) \
+        (G_TYPE_INSTANCE_GET_CLASS ((obj),\
+         HILDON_TYPE_FONT_SELECTION_DIALOG,\
+         HildonFontSelectionDialogClass))
+
+typedef struct _HildonFontSelectionDialog HildonFontSelectionDialog;
+typedef struct _HildonFontSelectionDialogClass
+ HildonFontSelectionDialogClass;
+
+typedef enum {
+    HILDON_POSITIONING_NORMAL,
+    HILDON_POSITIONING_SUPER,
+    HILDON_POSITIONING_SUB
+} HildonPositioning;
+
+typedef enum {
+    HILDON_FONT_FACE_NORMAL,
+    HILDON_FONT_FACE_ITALIC,
+    HILDON_FONT_FACE_BOLD,
+    HILDON_FONT_FACE_BOLD_ITALIC
+} HildonFontFaceType;
+
+
+struct _HildonFontSelectionDialog {
+    GtkDialog parent;
+};
+
+struct _HildonFontSelectionDialogClass {
+    GtkDialogClass parent_class;
+
+    /* Padding for future expansion */
+    void (*_gtk_reserved1) (void);
+    void (*_gtk_reserved2) (void);
+    void (*_gtk_reserved3) (void);
+    void (*_gtk_reserved4) (void);
+};
+
+
+GType hildon_font_selection_dialog_get_type(void) G_GNUC_CONST;
+GtkWidget *hildon_font_selection_dialog_new(GtkWindow * parent,
+                                            const gchar * title);
+
+/*To set and to get a font, use these functions*/
+PangoAttrList
+    * hildon_font_selection_dialog_get_font(HildonFontSelectionDialog *
+                                            fsd);
+void hildon_font_selection_dialog_set_font(HildonFontSelectionDialog *
+                                           fsd, PangoAttrList * list);
+
+void hildon_font_selection_dialog_set_buffer(HildonFontSelectionDialog *fsd, GtkTextBuffer *buffer);
+GtkTextTag * hildon_font_selection_dialog_get_text_tag (HildonFontSelectionDialog *fsd);
+
+
+
+/* This returns the text in the lbl_preview. You should copy the returned
+   text if you need it. */
+gchar*
+hildon_font_selection_dialog_get_preview_text(HildonFontSelectionDialog * fsd);
+
+/* This sets the text in the lbl_preview.*/
+void hildon_font_selection_dialog_set_preview_text
+    (HildonFontSelectionDialog * fsd, const gchar * text);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* __HILDON_FONTSEL_H__ */
diff --git a/hildon-widgets/hildon-get-password-dialog.c b/hildon-widgets/hildon-get-password-dialog.c
new file mode 100644 (file)
index 0000000..166cc35
--- /dev/null
@@ -0,0 +1,368 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/*
+ * @file hildon-get-password-dialog.c
+ *
+ * This file contains the API implementation for Hildon Get Password
+ * dialog.
+ *  Get password dialog:
+ *   @desc: Get Password Dialog is used to enter a password when accessing
+ *   a password protected function 
+ * 
+ * Get old password dialog:
+ *   @desc: Get Old Password is used to enter the current password 
+ *          in order to either change or remove the existing password.
+ *
+ *  @seealso: #HildonSetPasswordDialog
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gtk/gtkentry.h>
+#include <gtk/gtkbox.h>
+#include <gtk/gtkeditable.h>
+#include <gtk/gtksignal.h>
+#include <gdk/gdkkeysyms.h>
+
+#include <hildon-widgets/hildon-caption.h>
+#include "hildon-get-password-dialog.h"
+
+#include <libintl.h>
+#define _(String) dgettext(PACKAGE, String)
+
+static GtkDialogClass *parent_class;
+
+
+#define PASSWORD_DIALOG_WIDTH       370
+#define PASSWORD_DIALOG_HEIGHT      100
+
+#define ENTER_PASSWORD_CHAR         _("ecdg_fi_verify_pwd_enter_pwd")
+#define OK_CHAR                     _("ecdg_bd_verify_password_dialog_ok")
+#define CANCEL_CHAR                 _("ecdg_bd_verify_password_dialog_cancel")
+#define PASSWORD_PROTECTED_CHAR     _("ecdg_bd_verify_password")
+#define ENTER_CURRENT_PASSWORD_CHAR _("ecdg_ti_get_old_password")
+
+#define HILDON_GET_PASSWORD_DIALOG_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
+  HILDON_TYPE_GET_PASSWORD_DIALOG, HildonGetPasswordDialogPrivate));
+
+typedef struct _HildonGetPasswordDialogPrivate
+    HildonGetPasswordDialogPrivate;
+
+static void
+hildon_get_password_dialog_class_init(HildonGetPasswordDialogClass *
+                                      class);
+static void hildon_get_password_dialog_init(HildonGetPasswordDialog *
+                                            widget);
+static gboolean hildon_get_password_dialog_released(GtkWidget * widget,
+                                                    GdkEventButton * event,
+                                                    gpointer user_data);
+static gboolean special_key_listener(GtkWidget * widget,
+                                     GdkEventKey * event,
+                                     gpointer user_data);
+
+static void hildon_get_password_set_property(GObject * object,
+                                             guint prop_id,
+                                             const GValue * value,
+                                             GParamSpec * pspec);
+static void hildon_get_password_get_property(GObject * object,
+                                             guint prop_id, GValue * value,
+                                             GParamSpec * pspec);
+
+/* private struct */
+struct _HildonGetPasswordDialogPrivate {
+    /* Tab one */
+    GtkWidget *entry1;
+    GtkWidget *caption1;
+
+    /* OK/Cancel buttons */
+    GtkWidget *okButton;
+    GtkWidget *cancelButton;
+};
+
+enum{
+    PROP_NONE = 0,
+    PROP_PASSWORD
+};
+
+/* Private functions */
+static void
+hildon_get_password_set_property(GObject * object,
+                                 guint prop_id,
+                                 const GValue * value, GParamSpec * pspec)
+{
+    HildonGetPasswordDialog *dialog = HILDON_GET_PASSWORD_DIALOG(object);
+    HildonGetPasswordDialogPrivate *priv;
+
+    priv = HILDON_GET_PASSWORD_DIALOG_GET_PRIVATE(dialog);
+    
+    switch (prop_id) {
+    case PROP_PASSWORD:
+        gtk_entry_set_text(GTK_ENTRY(priv->entry1), g_value_get_string(value));
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+        break;
+    }
+}
+
+static void
+hildon_get_password_get_property(GObject * object,
+                                 guint prop_id,
+                                 GValue * value, GParamSpec * pspec)
+{
+    HildonGetPasswordDialog *dialog = HILDON_GET_PASSWORD_DIALOG(object);
+    HildonGetPasswordDialogPrivate *priv;
+    const gchar *string;
+
+    priv = HILDON_GET_PASSWORD_DIALOG_GET_PRIVATE(dialog);
+    
+    switch (prop_id) {
+    case PROP_PASSWORD:
+        string = gtk_entry_get_text(GTK_ENTRY(priv->entry1));
+        g_value_set_string(value, string);
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+        break;
+    }
+}
+static void
+hildon_get_password_dialog_class_init(HildonGetPasswordDialogClass * class)
+{
+    GParamSpec *pspec1;
+    GObjectClass *object_class = G_OBJECT_CLASS(class);
+  
+    parent_class = g_type_class_peek_parent(class);
+
+    object_class->set_property = hildon_get_password_set_property;
+    object_class->get_property = hildon_get_password_get_property;
+
+    pspec1 = g_param_spec_string("password",
+                                "Password content",
+                                "Set content to dialog",
+                                "DEFAULT",
+                                G_PARAM_READWRITE);
+
+    g_object_class_install_property (object_class,
+                                    PROP_PASSWORD,pspec1);
+    
+    g_type_class_add_private(class,
+                             sizeof(HildonGetPasswordDialogPrivate));
+}
+
+static void
+hildon_get_password_dialog_init(HildonGetPasswordDialog * dialog)
+{
+    HildonGetPasswordDialogPrivate *priv;
+    GtkSizeGroup *group;
+
+    priv = HILDON_GET_PASSWORD_DIALOG_GET_PRIVATE(dialog);
+
+    group = GTK_SIZE_GROUP(gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL));
+
+    gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
+
+    gtk_window_set_modal(GTK_WINDOW(dialog), TRUE);
+
+    /* create tab */
+    priv->entry1 = gtk_entry_new();
+    gtk_widget_show(priv->entry1);
+
+    priv->caption1 = hildon_caption_new(group,
+                                        ENTER_PASSWORD_CHAR,
+                                        priv->entry1,
+                                        NULL, HILDON_CAPTION_OPTIONAL);
+
+    gtk_entry_set_visibility(GTK_ENTRY(priv->entry1), FALSE);
+
+    gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),
+                       priv->caption1, TRUE, TRUE, 0);
+    gtk_widget_show(priv->caption1);
+
+    /* Callback functions */
+    g_signal_connect(G_OBJECT(priv->entry1), "key-press-event",
+                     G_CALLBACK(special_key_listener), dialog);
+
+    g_signal_connect(priv->entry1, "button-release-event",
+                     G_CALLBACK(hildon_get_password_dialog_released),
+                     NULL);
+
+    /* Create the OK/CANCEL buttons */
+    priv->okButton = gtk_dialog_add_button(GTK_DIALOG(dialog),
+                                           OK_CHAR, GTK_RESPONSE_OK);
+    priv->cancelButton = gtk_dialog_add_button(GTK_DIALOG(dialog),
+                                               CANCEL_CHAR,
+                                               GTK_RESPONSE_CANCEL);
+    gtk_window_resize(GTK_WINDOW(dialog),
+                      PASSWORD_DIALOG_WIDTH, PASSWORD_DIALOG_HEIGHT);
+}
+
+static gboolean
+hildon_get_password_dialog_released(GtkWidget * widget,
+                                    GdkEventButton * event,
+                                    gpointer user_data)
+{
+    GtkEditable *editable = GTK_EDITABLE(widget);
+
+    gtk_editable_select_region(GTK_EDITABLE(editable), 0, -1);
+    gtk_widget_grab_focus(GTK_WIDGET(editable));
+
+    return FALSE;
+}
+
+static gboolean
+special_key_listener(GtkWidget * widget,
+                     GdkEventKey * event, gpointer user_data)
+{
+    HildonGetPasswordDialog *dialog =
+        HILDON_GET_PASSWORD_DIALOG(user_data);
+
+    if ((event->keyval == GDK_Return) || (event->keyval == GDK_KP_Enter)) {
+        gtk_dialog_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
+    }
+
+    return FALSE;
+}
+
+/* Public functions */
+
+/**
+ * hildon_get_password_dialog_get_type:
+ *
+ * Returns GType for HildonGetPasswordDialog as produced by
+ * g_type_register_static().
+ *
+ * Return value: HildonGetPasswordDialog type
+ **/
+GType hildon_get_password_dialog_get_type()
+{
+    static GType dialog_type = 0;
+
+    if (!dialog_type) {
+        static const GTypeInfo dialog_info = {
+            sizeof(HildonGetPasswordDialogClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_get_password_dialog_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonGetPasswordDialog),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_get_password_dialog_init
+        };
+
+        dialog_type = g_type_register_static(GTK_TYPE_DIALOG,
+                                             "HildonGetPasswordDialog",
+                                             &dialog_info, 0);
+    }
+    return dialog_type;
+}
+
+/**
+ * hildon_get_password_dialog_new:
+ * @parent: parent window; can be NULL
+ * @get_old_password_title: FALSE creates a new get password dialog and
+ *                     TRUE creates a new get old password dialog 
+ * 
+ * Construct a new HildonGetPasswordDialog.
+ *
+ * Return value: a new #GtkWidget of type HildonGetPasswordDialog
+ **/
+GtkWidget *hildon_get_password_dialog_new(GtkWindow * parent,
+                                          gboolean get_old_password_title)
+{
+    HildonGetPasswordDialog *dialog = g_object_new
+        (HILDON_TYPE_GET_PASSWORD_DIALOG,
+         NULL);
+
+    if (get_old_password_title == FALSE) {
+        gtk_window_set_title(GTK_WINDOW(dialog), PASSWORD_PROTECTED_CHAR);
+    } else {
+        gtk_window_set_title(GTK_WINDOW(dialog),
+                             ENTER_CURRENT_PASSWORD_CHAR);
+    }
+
+    if (parent != NULL) {
+        gtk_window_set_transient_for(GTK_WINDOW(dialog), parent);
+    }
+
+    return GTK_WIDGET(dialog);
+}
+
+/**
+ * hildon_get_password_dialog_new:
+ * @parent: parent window; can be NULL
+ * @password: a default password to be shown in password field.
+ * @get_old_password_title: FALSE creates a new get password dialog and
+ *                     TRUE creates a new get old password dialog 
+ * 
+ * Same as #hildon_get_password_dialog_new but with a default password
+ * in password field.
+ *
+ * Return value: a new #GtkWidget of type HildonGetPasswordDialog
+ **/
+GtkWidget *hildon_get_password_dialog_new_with_default (GtkWindow * parent,
+                                                       gchar *password,
+                                               gboolean get_old_password_title)
+{
+    GtkWidget *dialog;
+
+    dialog = hildon_get_password_dialog_new(parent, get_old_password_title);
+    if(password != NULL)
+        g_object_set(G_OBJECT(dialog), "password", password, NULL);
+
+    return GTK_WIDGET(dialog);
+}
+
+/**
+ * hildon_get_password_dialog_get_password:
+ * @dialog: pointer to HildonSetPasswordDialog
+ * 
+ * Gets the currently inputted password.
+ *
+ * Return value: current password ( if the dialog is successfully 
+ * accepted with 'OK'  )
+ **/
+const gchar
+    *hildon_get_password_dialog_get_password(HildonGetPasswordDialog *
+                                             dialog)
+{
+    GtkEntry *entry1;
+    gchar *text1;
+
+    HildonGetPasswordDialogPrivate *priv;
+
+    priv = HILDON_GET_PASSWORD_DIALOG_GET_PRIVATE(dialog);
+
+    entry1 = GTK_ENTRY(hildon_caption_get_control
+                       (HILDON_CAPTION(priv->caption1)));
+
+    text1 = GTK_ENTRY(entry1)->text;
+
+    return text1;
+}
diff --git a/hildon-widgets/hildon-get-password-dialog.h b/hildon-widgets/hildon-get-password-dialog.h
new file mode 100644 (file)
index 0000000..4dfd051
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __HILDON_GET_PASSWORD_DIALOG_H__
+#define __HILDON_GET_PASSWORD_DIALOG_H__
+
+#include <gtk/gtkdialog.h>
+
+G_BEGIN_DECLS
+#define HILDON_TYPE_GET_PASSWORD_DIALOG \
+  ( hildon_get_password_dialog_get_type() )
+#define HILDON_GET_PASSWORD_DIALOG(obj) \
+  (GTK_CHECK_CAST (obj, HILDON_TYPE_GET_PASSWORD_DIALOG,\
+   HildonGetPasswordDialog))
+#define HILDON_GET_PASSWORD_DIALOG_CLASS(klass) \
+  (GTK_CHECK_CLASS_CAST ((klass), HILDON_TYPE_GET_PASSWORD_DIALOG, \
+  HildonGetPasswordDialogClass))
+#define HILDON_IS_GET_PASSWORD_DIALOG(obj) \
+  (GTK_CHECK_TYPE (obj, HILDON_TYPE_GET_PASSWORD_DIALOG))
+#define HILDON_IS_GET_PASSWORD_DIALOG_CLASS(klass) \
+  (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_GET_PASSWORD_DIALOG))
+typedef struct _HildonGetPasswordDialog HildonGetPasswordDialog;
+typedef struct _HildonGetPasswordDialogClass HildonGetPasswordDialogClass;
+
+struct _HildonGetPasswordDialog {
+    GtkDialog parent;
+};
+
+struct _HildonGetPasswordDialogClass {
+    GtkDialogClass parent_class;
+};
+
+GType hildon_get_password_dialog_get_type(void);
+
+GtkWidget *hildon_get_password_dialog_new(GtkWindow * parent,
+                                          gboolean get_old_password_title);
+
+GtkWidget *hildon_get_password_dialog_new_with_default(GtkWindow *parent,
+                                                      gchar *password,
+                                         gboolean get_old_password_title);
+
+const gchar
+    *hildon_get_password_dialog_get_password(HildonGetPasswordDialog *
+                                             dialog);
+
+G_END_DECLS
+#endif
diff --git a/hildon-widgets/hildon-grid-item-private.h b/hildon-widgets/hildon-grid-item-private.h
new file mode 100644 (file)
index 0000000..fded86a
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/*
+ * @file hildon-grid-item-private.h
+ *
+ * This file is a private header file for he implementation of
+ * HildonGridItem. HildonGridItem is an item mainly used in HildonGrid. It
+ * has an icon, emblem and a label. This private header file exists so that
+ * grid can call semi-public functions of an item.
+ */
+
+#ifndef HILDON_GRID_ITEM_PRIVATE_H_
+#define HILDON_GRID_ITEM_PRIVATE_H_
+
+#include <hildon-widgets/hildon-grid-item.h>
+
+G_BEGIN_DECLS
+    void _hildon_grid_item_set_label(HildonGridItem * item,
+                                     const gchar * label);
+
+void _hildon_grid_item_set_icon_size(HildonGridItem * item,
+                                     HildonGridItemIconSizeType icon_size);
+
+void _hildon_grid_item_set_label_pos(HildonGridItem * item,
+                                     HildonGridPositionType label_pos);
+void _hildon_grid_item_set_emblem_size(HildonGridItem * item,
+                                       const gint emblem_size);
+
+void _hildon_grid_item_set_label_spacing(HildonGridItem * item,
+                                         const gint hspacing,
+                                         const gint vspacing);
+
+/*
+ * These are not needed...
+ *
+const gchar *_hildon_grid_item_get_label    (HildonGridItem *item);
+
+const HildonGridItemIconSizeType _hildon_grid_item_get_icon_size
+                                            (HildonGridItem *item);
+
+const HildonGridPositionType _hildon_grid_item_set_label_pos
+                                            (HildonGridItem *item);
+
+const gint _hildon_grid_item_set_emblem_size    (HildonGridItem *item);
+
+const gint _hildon_grid_item_get_label_spacing  (HildonGridItem *item,
+                                                 gint           *hspacing,
+                                                 gint           *vspacing);
+ *
+ */
+
+G_END_DECLS
+#endif /* ifndef HILDON_GRID_ITEM_PRIVATE_H_ */
diff --git a/hildon-widgets/hildon-grid-item.c b/hildon-widgets/hildon-grid-item.c
new file mode 100644 (file)
index 0000000..a0918b7
--- /dev/null
@@ -0,0 +1,780 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/*
+ * @file hildon-grid-item.c
+ *
+ * This file contains the implementation of HildonGridItem.
+ * HildonGridItem is an item mainly used in HildonGrid. It has an icon,
+ * emblem and a label. 
+ *
+ */
+/*
+ * TODO:
+ * - play with libtool to get _-functions private but accesable from grid
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <gtk/gtklabel.h>
+#include <gtk/gtkicontheme.h>
+#include <gtk/gtkimage.h>
+#include <gtk/gtkmisc.h>
+#include <gtk/gtkwidget.h>
+#include <gtk/gtkenums.h>
+#include <pango/pango.h>
+
+#include "hildon-grid-item-private.h"
+#include <hildon-widgets/hildon-grid-item.h>
+
+#include <libintl.h>
+#define _(String) dgettext(PACKAGE, String)
+
+#define HILDON_GRID_ITEM_GET_PRIVATE(obj) \
+        (G_TYPE_INSTANCE_GET_PRIVATE ((obj), HILDON_TYPE_GRID_ITEM, \
+                                      HildonGridItemPrivate))
+
+typedef struct _HildonGridItemPrivate HildonGridItemPrivate;
+
+
+/* Default icon. */
+#define DEFAULT_ICON_BASENAME   "Unknown"
+#define HILDON_GRID_ICON_SIZE         26
+#define HILDON_GRID_EMBLEM_SIZE       16
+
+/* Use somewhat dirty alpha-thing for emblems. */
+#define USE_DIRTY_ALPHA
+
+struct _HildonGridItemPrivate {
+    gchar *icon_basename;
+    gint icon_size;
+    GtkWidget *icon;
+    gint icon_width;
+    gint icon_height;
+
+    gchar *emblem_basename;
+    gint emblem_size;
+
+    GtkWidget *label;   /* TODO use pango! */
+    HildonGridPositionType label_pos;
+
+    gint label_hspacing;
+    gint label_vspacing;
+
+    gboolean selected;
+};
+
+
+
+/* Prototypes. */
+static void hildon_grid_item_class_init(HildonGridItemClass * klass);
+static void hildon_grid_item_init(HildonGridItem * item);
+static gboolean hildon_grid_item_expose(GtkWidget * widget,
+                                        GdkEventExpose * event);
+static void hildon_grid_item_size_request(GtkWidget * widget,
+                                          GtkRequisition * requisition);
+static void hildon_grid_item_size_allocate(GtkWidget * widget,
+                                           GtkAllocation * allocation);
+static void hildon_grid_item_forall(GtkContainer * container,
+                                    gboolean include_int,
+                                    GtkCallback callback,
+                                    gpointer callback_data);
+static void hildon_grid_item_remove(GtkContainer * container,
+                                    GtkWidget * child);
+
+static void hildon_grid_item_finalize(GObject * object);
+
+static void update_icon(HildonGridItem * item);
+static void set_label_justify(HildonGridItem * item);
+
+
+static GtkContainerClass *parent_class = NULL;
+
+
+GType
+hildon_grid_item_get_type(void)
+{
+    static GType grid_item_type = 0;
+
+    if (!grid_item_type) {
+        static const GTypeInfo grid_item_info = {
+            sizeof(HildonGridItemClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_grid_item_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonGridItem),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_grid_item_init,
+        };
+        grid_item_type = g_type_register_static(GTK_TYPE_CONTAINER,
+                                                "HildonGridItem",
+                                                &grid_item_info, 0);
+    }
+
+    return grid_item_type;
+}
+
+static void
+hildon_grid_item_class_init(HildonGridItemClass *klass)
+{
+    GtkWidgetClass *widget_class;
+    GtkContainerClass *container_class;
+    GObjectClass *gobject_class;
+
+/* g_message ("hildon_grid_item_class_init (%d)\n", (int) klass); */
+
+    widget_class = GTK_WIDGET_CLASS(klass);
+    gobject_class = G_OBJECT_CLASS(klass);
+    container_class = GTK_CONTAINER_CLASS(klass);
+
+    parent_class = g_type_class_peek_parent(klass);
+
+    g_type_class_add_private(klass, sizeof(HildonGridItemPrivate));
+
+    gobject_class->finalize = hildon_grid_item_finalize;
+
+    widget_class->expose_event = hildon_grid_item_expose;
+    widget_class->size_request = hildon_grid_item_size_request;
+    widget_class->size_allocate = hildon_grid_item_size_allocate;
+
+    container_class->forall = hildon_grid_item_forall;
+    container_class->remove = hildon_grid_item_remove;
+}
+
+static void
+hildon_grid_item_init(HildonGridItem *item)
+{
+    HildonGridItemPrivate *priv;
+
+    priv = HILDON_GRID_ITEM_GET_PRIVATE(item);
+
+    priv->icon_basename = NULL;
+    priv->icon_size = HILDON_GRID_ICON_SIZE;
+    priv->icon = NULL;
+
+    priv->emblem_basename = NULL;
+    priv->emblem_size = HILDON_GRID_EMBLEM_SIZE;
+
+    priv->label = NULL;
+    priv->label_pos = HILDON_GRID_ITEM_LABEL_POS_BOTTOM;
+    priv->label_hspacing = 0;
+    priv->label_vspacing = 0;
+
+    priv->selected = FALSE;
+
+}
+
+/**
+ * hildon_grid_item_new:
+ * @icon_basename:  Icon base name
+ *
+ * Creates a new #HildonGridItem.
+ *
+ * Return value: A new #HildonGridItem
+ */
+GtkWidget *
+hildon_grid_item_new(const gchar *icon_basename)
+{
+    HildonGridItem *item;
+    HildonGridItemPrivate *priv;
+
+    item = g_object_new(HILDON_TYPE_GRID_ITEM, NULL);
+    GTK_WIDGET_SET_FLAGS(GTK_WIDGET(item), GTK_CAN_FOCUS);
+
+    priv = HILDON_GRID_ITEM_GET_PRIVATE(item);
+    priv->icon_basename = g_strdup(icon_basename);
+
+    priv->label = gtk_label_new("");
+    gtk_widget_set_parent(priv->label, GTK_WIDGET(item));
+    gtk_widget_set_name(priv->label, "hildon-grid-item-label");
+
+    update_icon(item);
+    set_label_justify(item);
+
+    gtk_widget_show(priv->label);
+
+    return GTK_WIDGET(item);
+}
+
+/**
+ * hildon_grid_item_new_with_label:
+ * @icon_basename:  Icon base name
+ * @label:          Text label for icon
+ *
+ * Creates a new #HildonGridItem.
+ *
+ * Return value: A new #HildonGridItem
+ */
+GtkWidget *
+hildon_grid_item_new_with_label(const gchar *icon_basename,
+                                const gchar *label)
+{
+    HildonGridItem *item;
+    HildonGridItemPrivate *priv;
+
+
+    item = g_object_new(HILDON_TYPE_GRID_ITEM, NULL);
+    GTK_WIDGET_SET_FLAGS(GTK_WIDGET(item), GTK_CAN_FOCUS);
+
+    priv = HILDON_GRID_ITEM_GET_PRIVATE(item);
+    priv->icon_basename = g_strdup(icon_basename);
+
+    priv->label = gtk_label_new(label != NULL ? label : "");
+    gtk_widget_set_name(priv->label, "hildon-grid-item-label");
+    gtk_widget_set_parent(priv->label, GTK_WIDGET(item));
+
+    update_icon(item);
+    set_label_justify(item);
+
+    gtk_widget_show(priv->label);
+
+    return GTK_WIDGET(item);
+}
+
+
+static void
+update_icon(HildonGridItem *item)
+{
+    GtkIconTheme *icon_theme;
+    GdkPixbuf *icon;
+    GdkPixbuf *emblem_icon;
+    HildonGridItemPrivate *priv;
+    GError *error;
+
+    priv = HILDON_GRID_ITEM_GET_PRIVATE(item);
+
+    if (priv->icon != NULL) {
+        if (GTK_WIDGET_VISIBLE(priv->icon))
+            gtk_widget_hide(priv->icon);
+        gtk_widget_unparent(priv->icon);
+    }
+
+    icon_theme = gtk_icon_theme_get_default();
+
+    /* Load icon. Fall to default it loading fails. */
+    error = NULL;
+    icon = gtk_icon_theme_load_icon(icon_theme,
+                                    priv->icon_basename,
+                                    priv->icon_size, 0, &error);
+    if (icon == NULL) {
+        g_warning("Couldn't load icon \"%s\": %s", priv->icon_basename,
+                  error->message);
+        g_error_free(error);
+
+        error = NULL;
+        icon = gtk_icon_theme_load_icon(icon_theme,
+                                        DEFAULT_ICON_BASENAME,
+                                        priv->icon_size, 0, &error);
+        if (icon == NULL) {
+            g_warning("Couldn't load default icon: %s!\n", error->message);
+            g_error_free(error);
+        }
+    }
+    priv->icon_width = gdk_pixbuf_get_width(icon);
+    priv->icon_height = gdk_pixbuf_get_height(icon);
+
+
+    /* Load and merge emblem if one is specified. */
+    if (priv->emblem_basename != NULL) {
+        error = NULL;
+        emblem_icon = gtk_icon_theme_load_icon(icon_theme,
+                                               priv->emblem_basename,
+                                               priv->emblem_size,
+                                               0, &error);
+        if (emblem_icon == NULL) {
+            g_warning("Couldn't load emblem \"%s\": %s",
+                      priv->emblem_basename, error->message);
+            g_error_free(error);
+        } else {
+            gint icon_height;
+            gint width, height, y;
+
+#ifdef USE_DIRTY_ALPHA
+            GdkPixbuf *tmp;
+#endif
+
+            icon_height = gdk_pixbuf_get_height(icon);
+            width = MIN(gdk_pixbuf_get_width(emblem_icon),
+                        gdk_pixbuf_get_width(icon));
+            height = MIN(gdk_pixbuf_get_height(emblem_icon), icon_height);
+            y = icon_height - height;
+#ifndef USE_DIRTY_ALPHA
+            gdk_pixbuf_copy_area(emblem_icon, 0, 0, width, height,
+                                 icon, 0, y);
+#else
+            /* 
+             * Using composite to copy emblem to lower left corner creates
+             * some garbage on top of emblem. This way it can be avoided.
+             */
+            tmp = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE,
+                                 8, width, icon_height);
+            gdk_pixbuf_fill(tmp, 0x00000000);
+            gdk_pixbuf_copy_area(emblem_icon, 0, 0, width, height,
+                                 tmp, 0, y);
+            gdk_pixbuf_composite(tmp, icon,
+                                 0, 0, width, icon_height,
+                                 0.0, 0.0, 1.0, 1.0,
+                                 GDK_INTERP_NEAREST, 255);
+            g_object_unref(tmp);
+#endif /* ifndef else USE_DIRTY_ALPHA */
+            g_object_unref(emblem_icon);
+        }
+    }
+
+    priv->icon = gtk_image_new_from_pixbuf(icon);
+    g_object_unref(icon);
+
+    gtk_widget_set_parent(priv->icon, GTK_WIDGET(item));
+    gtk_widget_show(priv->icon);
+
+    gtk_widget_queue_draw(priv->icon);
+}
+
+void
+_hildon_grid_item_set_label(HildonGridItem *item, const gchar *label)
+{
+    HildonGridItemPrivate *priv;
+
+    g_return_if_fail(HILDON_IS_GRID_ITEM(item));
+
+    priv = HILDON_GRID_ITEM_GET_PRIVATE(item);
+    if ((priv->label == NULL && label == NULL) ||
+        (priv->label != NULL && label != NULL &&
+         strcmp((char *) priv->label, (char *) label) == 0)) {
+        return;
+    }
+    gtk_label_set_label(GTK_LABEL(priv->label), label);
+}
+
+void
+_hildon_grid_item_set_icon_size(HildonGridItem              *item,
+                                HildonGridItemIconSizeType  icon_size)
+{
+    HildonGridItemPrivate *priv;
+
+    g_return_if_fail(HILDON_IS_GRID_ITEM(item));
+
+    priv = HILDON_GRID_ITEM_GET_PRIVATE(item);
+    if (priv->icon_size == icon_size) {
+        return;
+    }
+    HILDON_GRID_ITEM_GET_PRIVATE(item)->icon_size = icon_size;
+    update_icon(HILDON_GRID_ITEM(item));
+}
+
+
+void
+_hildon_grid_item_set_label_pos(HildonGridItem          *item,
+                                HildonGridPositionType  label_pos)
+{
+    HildonGridItemPrivate *priv;
+
+    g_return_if_fail(HILDON_IS_GRID_ITEM(item));
+
+    priv = HILDON_GRID_ITEM_GET_PRIVATE(item);
+    if (priv->label_pos == label_pos) {
+        return;
+    }
+    priv->label_pos = label_pos;
+    set_label_justify(item);
+    /* No refresh here, grid will do it. */
+}
+
+void
+_hildon_grid_item_set_label_spacing(HildonGridItem  *item,
+                                    const gint      hspacing,
+                                    const gint      vspacing)
+{
+    HildonGridItemPrivate *priv;
+
+    g_return_if_fail(HILDON_IS_GRID_ITEM(item));
+
+    priv = HILDON_GRID_ITEM_GET_PRIVATE(item);
+
+    priv->label_hspacing = hspacing;
+    priv->label_vspacing = vspacing;
+}
+
+
+void
+_hildon_grid_item_set_emblem_size(HildonGridItem *item, gint emblem_size)
+{
+    HildonGridItemPrivate *priv;
+
+    g_return_if_fail(HILDON_IS_GRID_ITEM(item));
+
+    priv = HILDON_GRID_ITEM_GET_PRIVATE(item);
+    if (priv->emblem_size == emblem_size) {
+        return;
+    }
+    priv->emblem_size = emblem_size;
+    update_icon(HILDON_GRID_ITEM(item));
+}
+
+static void
+set_label_justify(HildonGridItem *item)
+{
+    HildonGridItemPrivate *priv;
+
+    priv = HILDON_GRID_ITEM_GET_PRIVATE(item);
+
+    if (priv->label != NULL) {
+        switch (priv->label_pos) {
+        case HILDON_GRID_ITEM_LABEL_POS_BOTTOM:
+            gtk_misc_set_alignment(GTK_MISC(priv->label), 0.5, 0.5);
+            break;
+
+        case HILDON_GRID_ITEM_LABEL_POS_RIGHT:
+            gtk_misc_set_alignment(GTK_MISC(priv->label), 0.0, 0.5);
+            break;
+
+        default:
+            g_warning("Invalid position!");
+            break;
+        }
+    }
+}
+
+static void
+hildon_grid_item_remove(GtkContainer *container, GtkWidget *child)
+{
+    HildonGridItem *item;
+    HildonGridItemPrivate *priv;
+
+    item = HILDON_GRID_ITEM(container);
+    priv = HILDON_GRID_ITEM_GET_PRIVATE(item);
+
+    g_return_if_fail(GTK_IS_WIDGET(child));
+    g_return_if_fail(child == priv->label || child == priv->icon);
+
+    if (child == priv->label) {
+        gtk_widget_unparent(child);
+        priv->label = NULL;
+    } else if (child == priv->icon) {
+        gtk_widget_unparent(child);
+        priv->icon = NULL;
+    }
+}
+
+static gboolean
+hildon_grid_item_expose(GtkWidget *widget, GdkEventExpose *event)
+{
+    HildonGridItem *item;
+    HildonGridItemPrivate *priv;
+    GdkRectangle clip;
+    GtkWidget *focused;
+
+    g_return_val_if_fail(widget, FALSE);
+    g_return_val_if_fail(HILDON_IS_GRID_ITEM(widget), FALSE);
+    g_return_val_if_fail(event, FALSE);
+
+    item = HILDON_GRID_ITEM(widget);
+    priv = HILDON_GRID_ITEM_GET_PRIVATE(item);
+
+    if (priv->label == NULL && priv->icon == NULL) {
+        return FALSE;
+    }
+    if (GTK_WIDGET_HAS_FOCUS(GTK_WIDGET(item))) {
+        if (priv->label != NULL) {
+            focused = priv->label;
+        } else {
+            focused = priv->icon;
+        }
+        clip.x = focused->allocation.x;
+        clip.y = focused->allocation.y;
+        clip.width = focused->allocation.width;
+        clip.height = focused->allocation.height;
+
+        gtk_paint_box(focused->style,
+                      gtk_widget_get_toplevel(focused)->window,
+                      GTK_STATE_SELECTED,
+                      GTK_SHADOW_NONE,
+                      &clip, focused, "selected",
+                      clip.x, clip.y, clip.width, clip.height);
+    }
+
+    /* 
+     * Items are not exposed unless they are visible.
+     * -> No need to "optimize" by checking if they need exposing.
+     */
+    gtk_container_propagate_expose(GTK_CONTAINER(widget),
+                                   priv->icon, event);
+    gtk_container_propagate_expose(GTK_CONTAINER(widget),
+                                   priv->label, event);
+    return TRUE;
+}
+
+
+static void
+hildon_grid_item_size_request(GtkWidget *widget, GtkRequisition *requisition)
+{
+    HildonGridItem *item;
+    HildonGridItemPrivate *priv;
+    GtkRequisition label_req;
+    gint label_margin;
+
+    item = HILDON_GRID_ITEM(widget);
+    priv = HILDON_GRID_ITEM_GET_PRIVATE(item);
+
+    switch (priv->label_pos) {
+    case HILDON_GRID_ITEM_LABEL_POS_BOTTOM:
+        label_margin = priv->label_vspacing;
+        break;
+
+    case HILDON_GRID_ITEM_LABEL_POS_RIGHT:
+        label_margin = priv->label_hspacing;
+        break;
+    default:
+        label_margin = 0;
+        break;
+    }
+
+    gtk_widget_size_request(priv->icon, requisition);
+    gtk_widget_size_request(priv->label, &label_req);
+
+    switch (priv->label_pos) {
+    case HILDON_GRID_ITEM_LABEL_POS_BOTTOM:
+        requisition->width = MAX(requisition->width, label_req.width);
+        requisition->height += label_req.height + label_margin;
+        break;
+
+    case HILDON_GRID_ITEM_LABEL_POS_RIGHT:
+        requisition->width += label_req.width + label_margin;
+        requisition->height = MAX(requisition->height, label_req.height);
+        break;
+    default:
+        g_warning("bad position");
+        return;
+        break;
+    }
+}
+
+static void
+hildon_grid_item_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
+{
+    HildonGridItem *item;
+    HildonGridItemPrivate *priv;
+    GtkRequisition l_req;
+    GtkAllocation i_alloc, l_alloc;
+    gint label_margin;
+    gint label_height;
+
+    g_return_if_fail(widget);
+    g_return_if_fail(allocation);
+
+    item = HILDON_GRID_ITEM(widget);
+    priv = HILDON_GRID_ITEM_GET_PRIVATE(item);
+    widget->allocation = *allocation;
+
+    /* If creating label and icon failed, don't show a thing... */
+    if (priv->label == NULL && priv->icon == NULL) {
+        return;
+    }
+    if (priv->label != NULL) {
+        gtk_widget_get_child_requisition(priv->label, &l_req);
+    } else {
+        l_req.width = l_req.height = 0;
+    }
+
+    label_height = l_req.height;
+    switch (priv->label_pos) {
+    case HILDON_GRID_ITEM_LABEL_POS_BOTTOM:
+        label_margin = priv->label_vspacing;
+
+        if (priv->icon_width > allocation->width) {
+            priv->icon_width = allocation->width;
+        }
+        if (priv->icon_height > allocation->height) {
+            priv->icon_height = allocation->height;
+        }
+        i_alloc.x = (allocation->width - priv->icon_width) /
+            2 + allocation->x;
+        i_alloc.y = (allocation->height - priv->icon_height -
+                     label_height - label_margin) / 2 + allocation->y;
+        i_alloc.width = priv->icon_width;
+        i_alloc.height = priv->icon_height;
+
+        if (label_height > 0) {
+            if (l_req.height > allocation->height) {
+                l_req.height = allocation->height;
+            }
+            l_alloc.x = allocation->x;
+            l_alloc.y = i_alloc.y + priv->icon_height + label_margin;
+            l_alloc.width = allocation->width;
+            l_alloc.height = l_req.height;
+        }
+        break;
+
+    case HILDON_GRID_ITEM_LABEL_POS_RIGHT:
+        label_margin = priv->label_hspacing;
+
+        if (priv->icon_width > allocation->width) {
+            priv->icon_width = allocation->width;
+        }
+        if (priv->icon_height > allocation->height) {
+            priv->icon_height = allocation->height;
+        }
+
+        i_alloc.x = allocation->x;
+        i_alloc.y = (allocation->height - priv->icon_height) /
+            2 + allocation->y;
+        i_alloc.width = priv->icon_width;
+        i_alloc.height = priv->icon_height;
+
+        if (label_height > 0) {
+            l_alloc.x = priv->icon_width + label_margin + allocation->x;
+            l_alloc.y = (allocation->height - label_height) / 2
+                + allocation->y;
+
+            l_alloc.width = allocation->width - priv->icon_width
+                - label_margin;
+            l_alloc.height = MIN(l_req.height, allocation->height);
+        }
+        break;
+    default:
+        g_warning("bad label position");
+        return;
+        break;
+    }
+
+    if (priv->label != NULL) {
+        gtk_widget_size_allocate(priv->label, &l_alloc);
+    }
+    if (priv->icon != NULL) {
+        gtk_widget_size_allocate(priv->icon, &i_alloc);
+    }
+}
+
+static void
+hildon_grid_item_forall(GtkContainer    *container,
+                        gboolean        include_int,
+                        GtkCallback     callback,
+                        gpointer        callback_data)
+{
+    HildonGridItem *item;
+    HildonGridItemPrivate *priv;
+
+    g_return_if_fail(container);
+    g_return_if_fail(callback);
+
+    item = HILDON_GRID_ITEM(container);
+    priv = HILDON_GRID_ITEM_GET_PRIVATE(item);
+
+    if (priv->icon != NULL) {
+        (*callback) (priv->icon, callback_data);
+    }
+    if (priv->label != NULL) {
+        (*callback) (priv->label, callback_data);
+    }
+}
+
+static void
+hildon_grid_item_finalize(GObject *object)
+{
+    HildonGridItem *item;
+    HildonGridItemPrivate *priv;
+
+    item = HILDON_GRID_ITEM(object);
+    priv = HILDON_GRID_ITEM_GET_PRIVATE(item);
+
+    g_free(priv->icon_basename);
+    if (priv->emblem_basename != NULL) {
+        g_free(priv->emblem_basename);
+    }
+
+    G_OBJECT_CLASS(parent_class)->finalize(object);
+}
+
+#if 0
+static int hildon_time_get_font_width(GtkWidget * widget)
+{
+    PangoContext *context;
+    PangoFontMetrics *metrics;
+    gint digit_width;
+
+    context = gtk_widget_get_pango_context(widget);
+    metrics = pango_context_get_metrics(context,
+                                        widget->style->font_desc,
+                                        pango_context_get_language
+                                        (context));
+
+    digit_width = pango_font_metrics_get_approximate_digit_width(metrics);
+    digit_width = PANGO_PIXELS(digit_width);
+
+    pango_font_metrics_unref(metrics);
+
+    return digit_width;
+}
+#endif
+
+
+/**
+ * hildon_grid_item_set_emblem_type:
+ * @item:               #HildonGridItem
+ * @emblem_basename:    Emblem's basename
+ *
+ * Sets item emblem type.
+ */
+void
+hildon_grid_item_set_emblem_type(HildonGridItem *item,
+                                 const gchar *emblem_basename)
+{
+    HildonGridItemPrivate *priv;
+
+    g_return_if_fail(HILDON_IS_GRID_ITEM(item));
+
+    priv = HILDON_GRID_ITEM_GET_PRIVATE(item);
+
+    if (priv->emblem_basename != NULL) {
+        g_free(priv->emblem_basename);
+    }
+
+    priv->emblem_basename = g_strdup(emblem_basename);
+
+    update_icon(item);
+}
+
+/**
+ * hildon_grid_item_get_emblem_type:
+ * @item:   #HildonGridItem
+ *
+ * Returns emblem's basename. Must not be changed or freed.
+ *
+ * Return value: Emblem's basename
+ */
+const gchar *
+hildon_grid_item_get_emblem_type(HildonGridItem *item)
+{
+    g_return_val_if_fail(HILDON_IS_GRID_ITEM(item), NULL);
+
+    return HILDON_GRID_ITEM_GET_PRIVATE(item)->emblem_basename;
+}
diff --git a/hildon-widgets/hildon-grid-item.h b/hildon-widgets/hildon-grid-item.h
new file mode 100644 (file)
index 0000000..a6ff3bf
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/**
+ * @file hildon-grid-item.h
+ *
+ * This file is a header file for he implementation of HildonGridItem.
+ * HildonGridItem is an item mainly used in HildonGrid. It has an icon,
+ * emblem and a label.
+ */
+
+#ifndef HILDON_GRID_ITEM_H_
+#define HILDON_GRID_ITEM_H_
+
+#include <gtk/gtkcontainer.h>
+#include <gtk/gtkitem.h>
+
+G_BEGIN_DECLS
+#define HILDON_TYPE_GRID_ITEM       (hildon_grid_item_get_type ())
+#define HILDON_GRID_ITEM(obj)       (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
+                                            HILDON_TYPE_GRID_ITEM, \
+                                            HildonGridItem))
+#define HILDON_GRID_ITEM_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass),\
+                                                HILDON_TYPE_GRID_ITEM, \
+                                                HildonGridItemClass))
+#define HILDON_IS_GRID_ITEM(obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
+                                            HILDON_TYPE_GRID_ITEM))
+#define HILDON_IS_GRID_ITEM_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_GRID_ITEM))
+#define HILDON_GRID_ITEM_GET_CLASS(obj) \
+        (G_TYPE_INSTANCE_GET_CLASS ((obj), \
+         HILDON_TYPE_GRID_ITEM, HildonGridItemClass))
+
+typedef enum {
+    HILDON_GRID_ITEM_LABEL_POS_BOTTOM = 1,
+    HILDON_GRID_ITEM_LABEL_POS_RIGHT
+} HildonGridPositionType;
+
+typedef enum {
+    HILDON_GRID_ITEM_ICON_27x27 = 1,
+    HILDON_GRID_ITEM_ICON_128x128
+} HildonGridItemIconSizeType;
+
+
+typedef struct _HildonGridItem HildonGridItem;
+typedef struct _HildonGridItemClass HildonGridItemClass;
+
+
+struct _HildonGridItem {
+    GtkContainer parent;
+};
+
+struct _HildonGridItemClass {
+    GtkContainerClass parent_class;
+};
+
+
+
+GType hildon_grid_item_get_type(void);
+GtkWidget *hildon_grid_item_new(const gchar * icon_basename);
+GtkWidget *hildon_grid_item_new_with_label(const gchar * icon_basename,
+                                           const gchar * label);
+
+void hildon_grid_item_set_emblem_type(HildonGridItem * item,
+                                      const gchar * emblem_basename);
+const gchar *hildon_grid_item_get_emblem_type(HildonGridItem * item);
+
+
+G_END_DECLS
+#endif /* ifndef HILDON_GRID_ITEM_H_ */
diff --git a/hildon-widgets/hildon-grid.c b/hildon-widgets/hildon-grid.c
new file mode 100644 (file)
index 0000000..fc526f0
--- /dev/null
@@ -0,0 +1,2373 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/*
+ * @file hildon-grid.c
+ *
+ * This file contains the implementation of HildonGrid. HildonGrid is used
+ * in views like Home and Control Panel which have single-tap activated
+ * items.
+ */
+
+/*
+ * TODO
+ * - there must be a predefined place for the "no items" -label...
+ * - performance :-)
+ * - dimmed items & scrolling by scrollbar
+ */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <gtk/gtklabel.h>
+#include <gtk/gtkrange.h>
+#include <gtk/gtkvscrollbar.h>
+#include <gtk/gtkmain.h>
+#include <gtk/gtkwidget.h>
+#include <gtk/gtkenums.h>
+#include <gdk/gdkkeysyms.h>
+
+#include "hildon-grid-item-private.h"
+#include <hildon-widgets/hildon-grid.h>
+#include <hildon-widgets/hildon-grid-item.h>
+
+#include <libintl.h>
+#define _(String) dgettext(PACKAGE, String)
+
+#define HILDON_GRID_GET_PRIVATE(obj) \
+        (G_TYPE_INSTANCE_GET_PRIVATE ((obj), HILDON_TYPE_GRID, \
+                                      HildonGridPrivate))
+
+
+#define DEFAULT_STYLE   "largeicons-home"
+
+#define DEFAULT_WIDTH         128
+#define DEFAULT_HEIGHT         96
+#define DEFAULT_HSPACING        8
+#define DEFAULT_VSPACING        8
+#define DEFAULT_LABEL_HSPACING  4
+#define DEFAULT_LABEL_VSPACING  0
+
+#define DEFAULT_EMBLEM_SIZE    25
+#define DEFAULT_ICON_SIZE      64
+#define DEFAULT_N_COLUMNS       3
+#define DEFAULT_LABEL_POS       1
+#define GRID_LABEL_POS_PAD     16
+
+#define DRAG_SENSITIVITY        6
+
+
+enum {
+    ACTIVATE_CHILD,
+    POPUP_CONTEXT,
+    LAST_SIGNAL
+};
+
+enum {
+    PROP_0,
+    PROP_EMPTY_LABEL
+};
+
+
+typedef struct _HildonGridChild HildonGridChild;
+typedef struct _HildonGridPrivate HildonGridPrivate;
+
+
+struct _HildonGridChild {
+    GtkWidget *widget;
+};
+
+
+struct _HildonGridPrivate {
+    GList *children;
+    GtkWidget *scrollbar;
+    gint old_sb_pos;
+    GdkWindow *event_window;
+
+    gchar *style;
+    /* We don't want to fetch style properties every single time. */
+    guint icon_size;
+    guint emblem_size;
+    guint num_columns;
+    HildonGridPositionType label_pos;
+    gint label_hspacing;
+    gint label_vspacing;
+    GtkWidget *empty_label;
+
+    guint widget_width;
+    guint widget_height;
+    guint widget_hspacing;
+    guint widget_vspacing;
+
+    guint saved_width;
+    guint saved_height;
+    guint saved_hspacing;
+    guint saved_vspacing;
+
+
+    gint focus_index;
+    guint click_x;
+    guint click_y;
+
+    /* Handy variables outsize _allocate. */
+    gint area_height;
+    gint area_rows;
+    gint scrollbar_width;
+    gint visible_cols;
+
+    gint first_index;
+    GdkEventType last_button_event;
+};
+
+
+
+/* Prototypes. */
+static void hildon_grid_class_init(HildonGridClass * klass);
+static void hildon_grid_init(HildonGrid * grid);
+static void hildon_grid_realize(GtkWidget * widget);
+static void hildon_grid_unrealize(GtkWidget * widget);
+static void hildon_grid_map(GtkWidget * widget);
+static void hildon_grid_unmap(GtkWidget * widget);
+static gboolean hildon_grid_expose(GtkWidget * widget,
+                                   GdkEventExpose * event);
+static void hildon_grid_size_request(GtkWidget * widget,
+                                     GtkRequisition * requisition);
+static void hildon_grid_size_allocate(GtkWidget * widget,
+                                      GtkAllocation * allocation);
+static void hildon_grid_add(GtkContainer * container, GtkWidget * widget);
+static void hildon_grid_remove(GtkContainer * container,
+                               GtkWidget * widget);
+static void hildon_grid_set_focus_child(GtkContainer * container,
+                                        GtkWidget * widget);
+static void hildon_grid_forall(GtkContainer * container,
+                               gboolean include_internals,
+                               GtkCallback callback,
+                               gpointer callback_data);
+static void hildon_grid_tap_and_hold_setup(GtkWidget * widget,
+                                           GtkWidget * menu,
+                                           GtkCallback func,
+                                           GtkWidgetTapAndHoldFlags flags);
+
+static GType hildon_grid_child_type(GtkContainer * container);
+
+
+static void hildon_grid_set_property(GObject * object,
+                                     guint prop_id,
+                                     const GValue * value,
+                                     GParamSpec * pspec);
+static void hildon_grid_get_property(GObject * object,
+                                     guint prop_id,
+                                     GValue * value, GParamSpec * pspec);
+
+static void _hildon_grid_set_empty_label(HildonGrid * grid,
+                                         const gchar * empty_label);
+static const gchar *_hildon_grid_get_empty_label(HildonGrid * grid);
+static void _hildon_grid_set_n_columns(HildonGrid * grid, gint num_cols);
+static void _hildon_grid_set_label_pos(HildonGrid * grid,
+                                       HildonGridPositionType label_pos);
+static void _hildon_grid_set_label_hspacing(HildonGrid * grid,
+                                            gint hspacing);
+static void _hildon_grid_set_label_vspacing(HildonGrid * grid,
+                                            gint vspacing);
+static void _hildon_grid_set_icon_size(HildonGrid * grid, gint icon_size);
+static void _hildon_grid_set_emblem_size(HildonGrid * grid,
+                                         gint emblem_size);
+static void hildon_grid_destroy(GtkObject * self);
+static void hildon_grid_finalize(GObject * object);
+
+/* Signal handlers. */
+static gboolean hildon_grid_button_pressed(GtkWidget * widget,
+                                           GdkEventButton * event,
+                                           gpointer data);
+static gboolean hildon_grid_button_released(GtkWidget * widget,
+                                            GdkEventButton * event,
+                                            gpointer data);
+static gboolean hildon_grid_key_pressed(GtkWidget * widget,
+                                        GdkEventKey * event,
+                                        gpointer data);
+static gboolean hildon_grid_scrollbar_moved(GtkWidget * widget,
+                                            gpointer data);
+static gboolean hildon_grid_state_changed(GtkWidget * widget,
+                                          GtkStateType state,
+                                          gpointer data);
+
+/* Other internal functions. */
+static void get_style_properties(HildonGrid * grid);
+static gint get_child_index(HildonGridPrivate * priv, GtkWidget * child);
+static gint get_child_index_by_coord(HildonGridPrivate * priv,
+                                     gint x, gint y);
+static GtkWidget *get_child_by_index(HildonGridPrivate * priv, gint index);
+
+static gboolean jump_scrollbar_to_focused(HildonGrid * grid);
+static gboolean adjust_scrollbar_height(HildonGrid * grid);
+static gboolean update_contents(HildonGrid * grid);
+static void set_focus(HildonGrid * grid,
+                      GtkWidget * widget, gboolean refresh_view);
+
+/* Our fancy little marshaler. */
+static void marshal_BOOLEAN__INT_INT_INT(GClosure * closure,
+                                         GValue * return_value,
+                                         guint n_param_values,
+                                         const GValue * param_values,
+                                         gpointer invocation_hint,
+                                         gpointer marshal_data);
+
+
+static GtkContainerClass *parent_class = NULL;
+static guint grid_signals[LAST_SIGNAL] = { 0 };
+
+
+GType hildon_grid_get_type(void)
+{
+    static GType grid_type = 0;
+
+    if (!grid_type) {
+        static const GTypeInfo grid_info = {
+            sizeof(HildonGridClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_grid_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonGrid),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_grid_init,
+        };
+        grid_type = g_type_register_static(GTK_TYPE_CONTAINER,
+                                           "HildonGrid", &grid_info, 0);
+    }
+
+    return grid_type;
+}
+
+
+
+static void hildon_grid_class_init(HildonGridClass * klass)
+{
+    GObjectClass *gobject_class;
+    GtkWidgetClass *widget_class;
+    GtkContainerClass *container_class;
+
+    widget_class = GTK_WIDGET_CLASS(klass);
+    container_class = GTK_CONTAINER_CLASS(klass);
+    gobject_class = G_OBJECT_CLASS(klass);
+
+    parent_class = g_type_class_peek_parent(klass);
+
+    g_type_class_add_private(klass, sizeof(HildonGridPrivate));
+
+    GTK_OBJECT_CLASS(klass)->destroy = hildon_grid_destroy;
+    gobject_class->finalize = hildon_grid_finalize;
+    gobject_class->set_property = hildon_grid_set_property;
+    gobject_class->get_property = hildon_grid_get_property;
+
+    widget_class->realize = hildon_grid_realize;
+    widget_class->unrealize = hildon_grid_unrealize;
+    widget_class->map = hildon_grid_map;
+    widget_class->unmap = hildon_grid_unmap;
+    widget_class->expose_event = hildon_grid_expose;
+    widget_class->size_request = hildon_grid_size_request;
+    widget_class->size_allocate = hildon_grid_size_allocate;
+    widget_class->tap_and_hold_setup = hildon_grid_tap_and_hold_setup;
+
+    container_class->add = hildon_grid_add;
+    container_class->remove = hildon_grid_remove;
+    container_class->forall = hildon_grid_forall;
+    container_class->child_type = hildon_grid_child_type;
+    container_class->set_focus_child = hildon_grid_set_focus_child;
+
+    g_object_class_install_property(gobject_class, PROP_EMPTY_LABEL,
+        g_param_spec_string("empty_label",
+                            "Empty label",
+                            "Label to show when grid has no items",
+                            _("No icons"),
+                            G_PARAM_READWRITE));
+
+    gtk_widget_class_install_style_property(widget_class,
+        g_param_spec_uint("item_width",
+                          "Item width",
+                          "Total width of an item",
+                          1, G_MAXINT,
+                          DEFAULT_WIDTH,
+                          G_PARAM_READABLE));
+
+    gtk_widget_class_install_style_property(widget_class,
+        g_param_spec_uint("item_height",
+                          "Item height",
+                          "Total height of an item",
+                          1, G_MAXINT, DEFAULT_HEIGHT,
+                          G_PARAM_READABLE));
+
+    gtk_widget_class_install_style_property(widget_class,
+        g_param_spec_uint("item_hspacing",
+                          "Item horizontal spacing",
+                          "Horizontal space between items",
+                          0, G_MAXINT, DEFAULT_HSPACING,
+                          G_PARAM_READABLE));
+
+    gtk_widget_class_install_style_property(widget_class,
+        g_param_spec_uint("item_vspacing",
+                          "Item vertical spacing",
+                          "Vertical space between items",
+                          0, G_MAXINT, DEFAULT_VSPACING,
+                          G_PARAM_READABLE));
+
+    gtk_widget_class_install_style_property(widget_class,
+        g_param_spec_uint("label_hspacing",
+                          "Horizontal label spacing",
+                          "Horizontal margin between item and label",
+                          0, G_MAXINT,
+                          DEFAULT_LABEL_HSPACING,
+                          G_PARAM_READABLE));
+
+    gtk_widget_class_install_style_property(widget_class,
+        g_param_spec_uint("label_vspacing",
+                          "Vertical label spacing",
+                          "Vertical margin between item and label",
+                          0, G_MAXINT,
+                          DEFAULT_LABEL_VSPACING,
+                          G_PARAM_READABLE));
+
+    gtk_widget_class_install_style_property(widget_class,
+        g_param_spec_uint("n_columns",
+                          "Columns",
+                          "Number of columns",
+                          0, G_MAXINT,
+                          DEFAULT_N_COLUMNS,
+                          G_PARAM_READABLE));
+
+    gtk_widget_class_install_style_property(widget_class,
+        g_param_spec_uint("label_pos",
+                          "Label position",
+                          "Position of label related to the icon",
+                          1, 2,
+                          DEFAULT_LABEL_POS,
+                          G_PARAM_READABLE));
+
+    gtk_widget_class_install_style_property(widget_class,
+        g_param_spec_uint("icon_size",
+                          "Icon size",
+                          "Size of the icon in pixels",
+                          1, G_MAXINT,
+                          DEFAULT_ICON_SIZE,
+                          G_PARAM_READABLE));
+
+    gtk_widget_class_install_style_property(widget_class,
+        g_param_spec_uint("emblem_size",
+                          "Emblem size",
+                          "Size of the emblem in pixels",
+                          1, G_MAXINT,
+                          DEFAULT_EMBLEM_SIZE,
+                          G_PARAM_READABLE));
+
+    /**
+     * HildonGrid::activate-child:
+     *
+     * Emitted when a child (@HildonGridItem) is activated either by
+     * tapping on it or by pressing enter.
+     */
+    grid_signals[ACTIVATE_CHILD] =
+        g_signal_new("activate-child",
+                     G_OBJECT_CLASS_TYPE(gobject_class),
+                     G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+                     G_STRUCT_OFFSET(HildonGridClass, activate_child),
+                     NULL, NULL,
+                     g_cclosure_marshal_VOID__OBJECT,
+                     G_TYPE_NONE, 1, HILDON_TYPE_GRID_ITEM);
+
+    /**
+     * HildonGrid::popup-context-menu:
+     *
+     * Emitted when popup-menu is supposed to open. Used for tap-and-hold.
+     */
+    grid_signals[POPUP_CONTEXT] =
+        g_signal_new("popup-context-menu",
+                     G_OBJECT_CLASS_TYPE(gobject_class),
+                     G_SIGNAL_RUN_LAST,
+                     G_STRUCT_OFFSET(HildonGridClass, popup_context_menu),
+                     g_signal_accumulator_true_handled, NULL,
+                     marshal_BOOLEAN__INT_INT_INT,
+                     G_TYPE_BOOLEAN, 3,
+                     G_TYPE_INT, G_TYPE_INT, G_TYPE_INT);
+}
+
+
+
+/*
+ * _hildon_grid_set_empty_label:
+ * @grid:           #HildonGrid
+ * @empty_label:    New label
+ *
+ * Sets empty label.
+ */
+static void
+_hildon_grid_set_empty_label(HildonGrid * grid, const gchar * empty_label)
+{
+    /* No need to worry about update -- label receives a signal for it. */
+    gtk_label_set_label(GTK_LABEL(HILDON_GRID_GET_PRIVATE
+                                  (grid)->empty_label),
+                        empty_label == NULL ? "" : empty_label);
+}
+
+/*
+ * _hildon_grid_get_empty_label:
+ * @grid:   #HildonGrid
+ *
+ * Returns empty label. Label must not be modified nor freed.
+ *
+ * Return value: Label
+ */
+static const gchar *_hildon_grid_get_empty_label(HildonGrid * grid)
+{
+    return gtk_label_get_label(GTK_LABEL(HILDON_GRID_GET_PRIVATE
+                                         (grid)->empty_label));
+}
+
+/*
+ * _hildon_grid_set_n_columns:
+ * @grid:       #HildonGrid
+ * @columsn:    Number of columns
+ *
+ * Sets number of columns.
+ */
+static void _hildon_grid_set_n_columns(HildonGrid * grid, gint columns)
+{
+    GtkWidget *focus;
+    HildonGridPrivate *priv;
+
+    g_return_if_fail(HILDON_IS_GRID(grid));
+
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+
+    if (priv->num_columns == columns) {
+        return;
+    }
+
+    priv->num_columns = columns;
+
+    /* If number of columns is defined (non-zero), use it immediately. */
+    if (columns != 0) {
+        priv->visible_cols = columns;
+    }
+    focus = GTK_CONTAINER(grid)->focus_child;
+    gtk_widget_queue_resize(GTK_WIDGET(grid));
+}
+
+/*
+ * _hildon_grid_set_label_pos:
+ * @grid:       #HildonGrid
+ * @label_pos:  Label position
+ *
+ * Sets icon label position.
+ */
+static void
+_hildon_grid_set_label_pos(HildonGrid * grid,
+                           HildonGridPositionType label_pos)
+{
+    GtkRequisition req;
+    HildonGridPrivate *priv;
+    GList *list;
+    GtkWidget *child;
+
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+
+    if (label_pos == priv->label_pos)
+        return;
+
+    /* gtknotebook doesn't check if we use valid values -- why should
+       we?-) */
+
+    priv->label_pos = label_pos;
+
+    for (list = priv->children; list != NULL; list = list->next) {
+        child = ((HildonGridChild *) list->data)->widget;
+
+        _hildon_grid_item_set_label_pos(HILDON_GRID_ITEM(child),
+                                        label_pos);
+        gtk_widget_size_request(child, &req);
+        gtk_widget_queue_resize(child);
+    }
+}
+
+/*
+ * _hildon_grid_set_label_hspacing:
+ * @grid:       #HildonGrid
+ * @hspacing:   Horizontal spacing
+ *
+ * Sets horizontal spacing for label.
+ */
+static void
+_hildon_grid_set_label_hspacing(HildonGrid * grid, gint hspacing)
+{
+    HildonGridPrivate *priv;
+    GList *list;
+    GtkWidget *child;
+
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+    if (hspacing == priv->label_hspacing)
+        return;
+
+    priv->label_hspacing = hspacing;
+
+    /* Update children. */
+    for (list = priv->children; list != NULL; list = list->next) {
+        child = ((HildonGridChild *) list->data)->widget;
+
+        _hildon_grid_item_set_label_spacing(HILDON_GRID_ITEM(child),
+                                            priv->label_hspacing,
+                                            priv->label_vspacing);
+        if (priv->label_pos == HILDON_GRID_ITEM_LABEL_POS_RIGHT) {
+            gtk_widget_queue_resize(child);
+        }
+    }
+}
+
+
+/*
+ * _hildon_grid_set_label_vspacing:
+ * @grid:       #HildonGrid
+ * @hspacing:   Vertical spacing
+ *
+ * Sets vertical spacing for label.
+ */
+static void
+_hildon_grid_set_label_vspacing(HildonGrid * grid, gint vspacing)
+{
+    HildonGridPrivate *priv;
+    GList *list;
+    GtkWidget *child;
+
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+    if (vspacing == priv->label_vspacing)
+        return;
+
+    priv->label_vspacing = vspacing;
+
+    /* Update children. */
+    for (list = priv->children; list != NULL; list = list->next) {
+        child = ((HildonGridChild *) list->data)->widget;
+
+        _hildon_grid_item_set_label_spacing(HILDON_GRID_ITEM(child),
+                                            priv->label_hspacing,
+                                            priv->label_vspacing);
+        if (priv->label_pos == HILDON_GRID_ITEM_LABEL_POS_BOTTOM) {
+            gtk_widget_queue_resize(child);
+        }
+    }
+}
+
+/*
+ * _hildon_grid_set_icon_size:
+ * @grid:       #HildonGrid
+ * @icon_size:  Icon size
+ *
+ * Sets icon size (in pixels).
+ */
+static void _hildon_grid_set_icon_size(HildonGrid * grid, gint icon_size)
+{
+    HildonGridPrivate *priv;
+    GList *list;
+    GtkWidget *child;
+
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+
+    if (icon_size == priv->icon_size)
+        return;
+
+    priv->icon_size = icon_size;
+
+    for (list = priv->children; list != NULL; list = list->next) {
+        child = ((HildonGridChild *) list->data)->widget;
+
+        _hildon_grid_item_set_icon_size(HILDON_GRID_ITEM(child),
+                                        icon_size);
+        gtk_widget_queue_resize(child);
+    }
+}
+
+
+/*
+ * _hildon_grid_set_emblem_size:
+ * @grid:           #HildonGrid
+ * @emblem_size:    Emblem size
+ *
+ * Sets emblem size (in pixels).
+ */
+static void
+_hildon_grid_set_emblem_size(HildonGrid * grid, gint emblem_size)
+{
+    HildonGridPrivate *priv;
+    GList *list;
+    GtkWidget *child;
+
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+
+    if (emblem_size == priv->emblem_size)
+        return;
+
+    priv->emblem_size = emblem_size;
+
+    for (list = priv->children; list != NULL; list = list->next) {
+        child = ((HildonGridChild *) list->data)->widget;
+
+        _hildon_grid_item_set_emblem_size(HILDON_GRID_ITEM(child),
+                                          emblem_size);
+        gtk_widget_queue_draw(child);
+    }
+}
+
+static GType hildon_grid_child_type(GtkContainer * container)
+{
+    return GTK_TYPE_WIDGET;
+}
+
+static void hildon_grid_init(HildonGrid * grid)
+{
+    HildonGridPrivate *priv;
+
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+
+    GTK_CONTAINER(grid)->focus_child = NULL;
+    priv->focus_index = -1;
+
+    priv->scrollbar = gtk_vscrollbar_new(NULL);
+    priv->empty_label = gtk_label_new(_("No items"));
+    priv->style = NULL;
+
+    priv->area_height = 1;
+    priv->area_rows = 1;
+    priv->children = NULL;
+
+    priv->first_index = 0;
+    priv->click_x = 0;
+    priv->click_y = 0;
+
+    priv->visible_cols = DEFAULT_N_COLUMNS;
+    priv->widget_width = 1;
+    priv->widget_hspacing = 0;
+    priv->widget_height = 1;
+    priv->widget_vspacing = 0;
+
+    priv->old_sb_pos = -1;
+
+    gtk_widget_set_parent(priv->scrollbar, GTK_WIDGET(grid));
+    gtk_widget_set_parent(priv->empty_label, GTK_WIDGET(grid));
+
+    priv->last_button_event = GDK_NOTHING;
+
+    GTK_WIDGET_SET_FLAGS(grid, GTK_NO_WINDOW);
+
+    /* Signal for scrollbar. */
+    g_signal_connect(G_OBJECT(priv->scrollbar), "value-changed",
+                     G_CALLBACK(hildon_grid_scrollbar_moved), grid);
+
+    /* Signal for key press. */
+    GTK_WIDGET_SET_FLAGS(GTK_WIDGET(grid), GTK_CAN_FOCUS);
+    gtk_widget_set_events(GTK_WIDGET(grid), GDK_KEY_PRESS_MASK);
+    g_signal_connect(G_OBJECT(grid), "key-press-event",
+                     G_CALLBACK(hildon_grid_key_pressed), grid);
+
+    GTK_WIDGET_UNSET_FLAGS(priv->scrollbar, GTK_CAN_FOCUS);
+    hildon_grid_set_style(grid, DEFAULT_STYLE);
+}
+
+/**
+ * hildon_grid_new:
+ *
+ * Creates a new #HildonGrid.
+ *
+ * Return value: A new #HildonGrid
+ */
+GtkWidget *hildon_grid_new(void)
+{
+
+    HildonGrid *grid;
+
+    grid = g_object_new(HILDON_TYPE_GRID, NULL);
+
+    return GTK_WIDGET(grid);
+}
+
+
+static void hildon_grid_realize(GtkWidget * widget)
+{
+    HildonGrid *grid;
+    HildonGridPrivate *priv;
+    GdkWindowAttr attr;
+    gint attr_mask;
+
+
+    GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED);
+
+    grid = HILDON_GRID(widget);
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+
+    /* Create GdkWindow for catching events. */
+    attr.x = widget->allocation.x;
+    attr.y = widget->allocation.y;
+    attr.width = widget->allocation.width - priv->scrollbar_width;
+    attr.height = widget->allocation.height;
+    attr.window_type = GDK_WINDOW_CHILD;
+    attr.event_mask = gtk_widget_get_events(widget)
+        | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK;
+
+    widget->window = gtk_widget_get_parent_window(widget);
+    g_object_ref(widget->window);
+
+    attr.wclass = GDK_INPUT_ONLY;
+    attr_mask = GDK_WA_X | GDK_WA_Y;
+
+    priv->event_window = gdk_window_new(widget->window, &attr, attr_mask);
+    gdk_window_set_user_data(priv->event_window, widget);
+
+    widget->style = gtk_style_attach(widget->style, widget->window);
+
+    gtk_style_set_background(widget->style,
+                             widget->window, GTK_STATE_NORMAL);
+
+    g_signal_connect(G_OBJECT(widget),
+                     "button-press-event",
+                     G_CALLBACK(hildon_grid_button_pressed), grid);
+    g_signal_connect(G_OBJECT(widget),
+                     "button-release-event",
+                     G_CALLBACK(hildon_grid_button_released), grid);
+}
+
+
+static void hildon_grid_unrealize(GtkWidget * widget)
+{
+    HildonGridPrivate *priv;
+
+    priv = HILDON_GRID_GET_PRIVATE(HILDON_GRID(widget));
+
+    if (priv->event_window != NULL) {
+        gdk_window_set_user_data(priv->event_window, NULL);
+        gdk_window_destroy(priv->event_window);
+        priv->event_window = NULL;
+    }
+
+    if (GTK_WIDGET_CLASS(parent_class)->unrealize) {
+        (*GTK_WIDGET_CLASS(parent_class)->unrealize) (widget);
+    }
+}
+
+
+
+static void hildon_grid_map(GtkWidget * widget)
+{
+    HildonGrid *grid;
+    HildonGridPrivate *priv;
+    GList *list;
+    GtkWidget *child;
+
+    g_return_if_fail(HILDON_IS_GRID(widget));
+
+    if (!GTK_WIDGET_VISIBLE(widget))
+        return;
+
+    grid = HILDON_GRID(widget);
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+
+    (*GTK_WIDGET_CLASS(parent_class)->map) (widget);
+
+    /* We don't really need the following... They never do anything I
+       think. */
+    if (priv->scrollbar != NULL && GTK_WIDGET_VISIBLE(priv->scrollbar)) {
+        if (!GTK_WIDGET_MAPPED(priv->scrollbar)) {
+            gtk_widget_map(priv->scrollbar);
+        }
+    }
+
+    if (priv->empty_label != NULL &&
+        GTK_WIDGET_VISIBLE(priv->empty_label)) {
+        if (!GTK_WIDGET_MAPPED(priv->empty_label)) {
+            gtk_widget_map(priv->empty_label);
+        }
+    }
+
+    for (list = priv->children; list != NULL; list = list->next) {
+        child = ((HildonGridChild *) list->data)->widget;
+
+        if (GTK_WIDGET_VISIBLE(child)) {
+            if (!GTK_WIDGET_MAPPED(child)) {
+                gtk_widget_map(child);
+            }
+        }
+    }
+    /* END OF don't really need */
+
+    /* Also make event window visible. */
+    gdk_window_show(priv->event_window);
+}
+
+
+
+static void hildon_grid_unmap(GtkWidget * widget)
+{
+    HildonGridPrivate *priv;
+
+    priv = HILDON_GRID_GET_PRIVATE(HILDON_GRID(widget));
+
+    if (priv->event_window != NULL) {
+        gdk_window_hide(priv->event_window);
+    }
+
+    (*GTK_WIDGET_CLASS(parent_class)->unmap) (widget);
+}
+
+
+
+static gboolean
+hildon_grid_expose(GtkWidget * widget, GdkEventExpose * event)
+{
+    HildonGrid *grid;
+    HildonGridPrivate *priv;
+    GtkContainer *container;
+    GList *list;
+    gint child_no;
+
+    g_return_val_if_fail(widget, FALSE);
+    g_return_val_if_fail(HILDON_IS_GRID(widget), FALSE);
+    g_return_val_if_fail(event, FALSE);
+
+    grid = HILDON_GRID(widget);
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+    container = GTK_CONTAINER(grid);
+
+    if (priv->children == NULL || g_list_length(priv->children) == 0) {
+        if (priv->empty_label != NULL) {
+            gtk_container_propagate_expose(container,
+                                           priv->empty_label, event);
+        }
+        return FALSE;
+    }
+
+    /* Only expose visible children. */
+
+    /* Jump over invisible. */
+    for (list = priv->children, child_no = 0;
+         list != NULL && child_no < priv->first_index;
+         list = list->next, child_no++) {
+        ;       /* Nothing here. */
+    }
+
+    for (; list != NULL && child_no < priv->first_index
+         + priv->visible_cols * priv->area_rows; list = list->next) {
+        gtk_container_propagate_expose(container,
+                                       ((HildonGridChild *) list->data)
+                                       ->widget, event);
+    }
+
+    /* Kludge to keep focused item focused. Enjoy. */
+    if (container->focus_child != NULL
+        && !GTK_WIDGET_HAS_FOCUS(container->focus_child)) {
+        set_focus(grid, container->focus_child, FALSE);
+    }
+    if (priv->scrollbar_width > 0 && priv->scrollbar != NULL) {
+        gtk_container_propagate_expose(container, priv->scrollbar, event);
+    }
+
+    return FALSE;
+}
+
+
+static void
+hildon_grid_size_request(GtkWidget * widget, GtkRequisition * requisition)
+{
+    HildonGrid *grid;
+    HildonGridPrivate *priv;
+    GList *list;
+    GtkWidget *child;
+    GtkRequisition req;
+
+    g_return_if_fail(widget);
+    g_return_if_fail(requisition);
+
+    grid = HILDON_GRID(widget);
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+
+    /* Want as big as possible. */
+    requisition->width = 0x7fff;        /* Largest possible gint16 */
+    requisition->height = 0x7fff;       /* Largest possible gint16 */
+
+    if (priv->children == NULL) {
+        if (priv->empty_label != NULL &&
+            GTK_WIDGET_VISIBLE(priv->empty_label)) {
+            gtk_widget_size_request(priv->empty_label, &req);
+        }
+    }
+
+    if (priv->scrollbar != NULL && GTK_WIDGET_VISIBLE(priv->scrollbar)) {
+        gtk_widget_size_request(priv->scrollbar, &req);
+    }
+
+    for (list = priv->children; list != NULL; list = list->next) {
+        child = ((HildonGridChild *) list->data)->widget;
+
+        gtk_widget_size_request(child, &req);
+    }
+}
+
+/*
+ * hildon_grid_size_allocate:
+ *
+ * Supposedly called when size of grid changes and after view have moved so
+ * that items need to be relocated.
+ */
+static void
+hildon_grid_size_allocate(GtkWidget * widget, GtkAllocation * allocation)
+{
+    HildonGrid *grid;
+    HildonGridPrivate *priv;
+    GList *list;
+    GtkWidget *child;
+    gint child_no;
+    gint y_offset;
+
+    GtkAllocation alloc;
+    GtkRequisition req;
+    GtkRequisition c_req;
+    gint item_width, item_height;
+
+    g_return_if_fail(widget);
+    g_return_if_fail(allocation);
+
+    grid = HILDON_GRID(widget);
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+    widget->allocation = *allocation;
+
+
+    get_style_properties(grid);
+
+    /* First of all, make sure GdkWindow is over our widget. */
+    if (priv->event_window != NULL) {
+        gdk_window_move_resize(priv->event_window,
+                               widget->allocation.x,
+                               widget->allocation.y,
+                               widget->allocation.width
+                               - priv->scrollbar_width,
+                               widget->allocation.height);
+    }
+    /* Show the label if there are no items. */
+    if (priv->children == NULL) {
+        /* 
+         * We probably don't need this as scrollbar should be hidden when
+         * removing items, but one can never be too sure...
+         */
+        if (priv->scrollbar != NULL &&
+            GTK_WIDGET_VISIBLE(priv->scrollbar)) {
+            priv->scrollbar_width = 0;
+            gtk_widget_hide(priv->scrollbar);
+        }
+
+        /* Show label if creating one actually worked. */
+        if (priv->empty_label != NULL) {
+            gtk_widget_get_child_requisition(priv->empty_label, &req);
+
+            /* ...for sure we must have a position for the label here... */
+            alloc.x = allocation->x + GRID_LABEL_POS_PAD;
+            alloc.y = allocation->y + GRID_LABEL_POS_PAD;
+            alloc.width = MIN(req.width, allocation->width -
+                              GRID_LABEL_POS_PAD);
+            alloc.height = MIN(req.height, allocation->height -
+                               GRID_LABEL_POS_PAD);
+
+            /* Make sure we don't use negative values. */
+            if (alloc.width < 0) {
+                alloc.width = 0;
+            }
+            if (alloc.height < 0) {
+                alloc.height = 0;
+            }
+
+            gtk_widget_size_allocate(priv->empty_label, &alloc);
+
+            if (!GTK_WIDGET_VISIBLE(priv->empty_label)) {
+                gtk_widget_show(priv->empty_label);
+            }
+        }
+
+        return;
+    }
+
+    /* As we have some items, hide label if it was visible. */
+    if (priv->empty_label != NULL &&
+        GTK_WIDGET_VISIBLE(priv->empty_label)) {
+        gtk_widget_hide(priv->empty_label);
+    }
+
+    /* Get item size. */
+    item_width = priv->widget_width + priv->widget_hspacing;
+    item_height = priv->widget_height + priv->widget_vspacing;
+
+    priv->area_height = allocation->height;
+    priv->area_rows = allocation->height / item_height;
+
+
+    /* Adjust/show/hide scrollbar. */
+    adjust_scrollbar_height(grid);
+
+
+    /* Only one column? Lets use all the space we have. */
+    if (priv->visible_cols == 1) {
+        if (priv->scrollbar != NULL &&
+            GTK_WIDGET_VISIBLE(priv->scrollbar)) {
+            gtk_widget_get_child_requisition(priv->scrollbar, &req);
+        } else {
+            req.width = 0;
+        }
+
+        item_width = allocation->width - priv->scrollbar_width
+            - priv->widget_hspacing - req.width;
+        priv->widget_width = item_width;
+    } else {
+        priv->widget_width = priv->saved_width;
+        priv->widget_hspacing = priv->saved_hspacing;
+        item_width = priv->widget_width + priv->widget_hspacing;
+    }
+
+    priv->first_index =
+        (int) gtk_range_get_value(GTK_RANGE(priv->scrollbar))
+        / item_height * priv->visible_cols;
+
+    /* Hide items before visible ones. */
+    for (list = priv->children, child_no = 0;
+         list != NULL && child_no < priv->first_index;
+         list = list->next, child_no++) {
+        child = ((HildonGridChild *) list->data)->widget;
+
+        if (GTK_WIDGET_VISIBLE(child)) {
+            gtk_widget_hide(child);
+        }
+    }
+
+    /* Allocate visible items. */
+    for (y_offset = priv->first_index / priv->visible_cols * item_height;
+         list != NULL && child_no < priv->first_index
+         + priv->area_rows * priv->visible_cols;
+         list = list->next, child_no++) {
+        child = ((HildonGridChild *) list->data)->widget;
+
+        if (!GTK_WIDGET_VISIBLE(child)) {
+            gtk_widget_show(child);
+        }
+        gtk_widget_get_child_requisition(child, &c_req);
+
+        /* Don't update icons which are not visible... */
+        alloc.y = (child_no / priv->visible_cols) * item_height +
+            allocation->y - y_offset + priv->widget_vspacing;
+        alloc.x = (child_no % priv->visible_cols) * item_width
+            + allocation->x + priv->widget_hspacing;
+        alloc.width = priv->widget_width;
+        alloc.height = priv->widget_height;
+
+        gtk_widget_size_allocate(child, &alloc);
+    }
+
+    /* Hide items after visible items. */
+    for (; list != NULL; list = list->next) {
+        child = ((HildonGridChild *) list->data)->widget;
+
+        if (GTK_WIDGET_VISIBLE(child)) {
+            gtk_widget_hide(child);
+        }
+    }
+}
+
+
+
+/**
+ * hildon_grid_add:
+ * @container:  Container (#HildonGrid) to add HildonGridItem into.
+ * @widget:     #GtkWidget (#HildonGridItem) to add.
+ *
+ * Adds a new HildonGridItem into HildonGrid.
+ */
+static void hildon_grid_add(GtkContainer * container, GtkWidget * widget)
+{
+    HildonGrid *grid;
+    HildonGridPrivate *priv;
+    HildonGridChild *child;
+
+
+    g_return_if_fail(HILDON_IS_GRID(container));
+    g_return_if_fail(HILDON_IS_GRID_ITEM(widget));
+
+    grid = HILDON_GRID(container);
+    priv = HILDON_GRID_GET_PRIVATE(HILDON_GRID(grid));
+    GTK_WIDGET_SET_FLAGS(widget, GTK_NO_WINDOW);
+
+    child = g_new(HildonGridChild, 1);
+    if (child == NULL) {
+        g_critical("no memory for child - not adding");
+        return;
+    }
+    child->widget = widget;
+
+    _hildon_grid_item_set_label_pos(HILDON_GRID_ITEM(widget),
+                                    priv->label_pos);
+    _hildon_grid_item_set_label_spacing(HILDON_GRID_ITEM(widget),
+                                        priv->label_hspacing,
+                                        priv->label_vspacing);
+    _hildon_grid_item_set_icon_size(HILDON_GRID_ITEM(widget),
+                                    priv->icon_size);
+    _hildon_grid_item_set_emblem_size(HILDON_GRID_ITEM(widget),
+                                      priv->emblem_size);
+    priv->children = g_list_append(priv->children, child);
+    gtk_widget_set_parent(widget, GTK_WIDGET(grid));
+
+    /* Property changes (child's set_sensitive) */
+    g_signal_connect_after(G_OBJECT(widget), "state-changed",
+                           G_CALLBACK(hildon_grid_state_changed), grid);
+
+    /* Matches both empty grid and all-dimmed grid. */
+    if (GTK_CONTAINER(grid)->focus_child == NULL)
+        set_focus(grid, widget, TRUE);
+
+    /* 
+     * If item was added in visible area, relocate items. Otherwise update
+     * scrollbar and see if items need relocating.
+     */
+    if (g_list_length(priv->children) < priv->first_index
+        + priv->area_rows * priv->visible_cols) {
+        gtk_widget_queue_resize(GTK_WIDGET(grid));
+    } else {
+        gboolean updated;
+
+        updated = adjust_scrollbar_height(grid);
+        /* Basically this other test is useless -- shouldn't need to jump. 
+         */
+        updated |= jump_scrollbar_to_focused(grid);
+
+        if (updated) {
+            gtk_widget_queue_resize(GTK_WIDGET(grid));
+        }
+    }
+}
+
+/**
+ * hildon_grid_remove:
+ * @container:  Container (#HildonGrid) to remove #HildonGridItem from.
+ * @widget:     Widget (#HildonGridItem) to be removed.
+ *
+ * Removes HildonGridItem from HildonGrid.
+ */
+static void
+hildon_grid_remove(GtkContainer * container, GtkWidget * widget)
+{
+    HildonGrid *grid;
+    HildonGridPrivate *priv;
+    HildonGridChild *child;
+    GtkWidget *child_widget;
+    GList *list;
+    gint index, old_index;
+    gboolean deleted;
+    gboolean updated;
+
+    g_return_if_fail(HILDON_IS_GRID(container));
+    g_return_if_fail(HILDON_IS_GRID_ITEM(widget));
+
+    grid = HILDON_GRID(container);
+    priv = HILDON_GRID_GET_PRIVATE(container);
+
+    old_index = priv->focus_index;
+    updated = GTK_WIDGET_VISIBLE(widget);
+
+    for (list = priv->children, index = 0, deleted = FALSE;
+         list != NULL; list = list->next, index++) {
+        child = (HildonGridChild *) list->data;
+        child_widget = child->widget;
+        if (child_widget == widget) {
+            gtk_widget_unparent(child_widget);
+            priv->children = g_list_remove_link(priv->children, list);
+            g_list_free(list);
+            g_free(child);
+
+            deleted = TRUE;
+
+            break;
+        }
+    }
+
+    if (!deleted) {
+        g_warning("tried to remove unexisting item");
+        return;
+    }
+
+    /* Move focus somewhere. */
+    if (old_index == index) {
+        if (old_index == g_list_length(priv->children)) {
+            if (index == 0) {
+                set_focus(grid, NULL, TRUE);
+            } else {
+                set_focus(grid,
+                          get_child_by_index(priv, old_index - 1), TRUE);
+            }
+        } else {
+            set_focus(grid, get_child_by_index(priv, old_index), TRUE);
+        }
+    } else {
+        set_focus(grid, GTK_CONTAINER(grid)->focus_child, TRUE);
+    }
+
+    updated |= adjust_scrollbar_height(grid);
+    updated |= jump_scrollbar_to_focused(grid);
+
+    if (updated) {
+        gtk_widget_queue_resize(GTK_WIDGET(grid));
+    }
+}
+
+/**
+ * hildon_grid_set_focus_child:
+ * @container:  HildonGrid
+ * @widget:     HildonGridItem
+ *
+ * Sets focus.
+ */
+static void
+hildon_grid_set_focus_child(GtkContainer * container, GtkWidget * widget)
+{
+    HildonGrid *grid;
+    HildonGridPrivate *priv;
+
+    g_return_if_fail(HILDON_IS_GRID(container));
+    g_return_if_fail(HILDON_IS_GRID_ITEM(widget) || widget == NULL);
+
+    grid = HILDON_GRID(container);
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+
+    if (GTK_CONTAINER(grid)->focus_child == widget || widget == NULL)
+        return;
+
+    set_focus(grid, widget, TRUE);
+}
+
+
+
+static void
+set_focus(HildonGrid * grid, GtkWidget * widget, gboolean refresh_view)
+{
+    HildonGridPrivate *priv;
+    GtkContainer *container;
+    gboolean view_updated;
+
+
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+    container = GTK_CONTAINER(grid);
+
+    if (widget == NULL && container->focus_child != NULL)
+        GTK_WIDGET_UNSET_FLAGS(container->focus_child, GTK_HAS_FOCUS);
+
+    GTK_CONTAINER(grid)->focus_child = widget;
+    if (widget == NULL) {
+        priv->focus_index = -1;
+        return;
+    }
+
+    priv->focus_index = get_child_index(priv, widget);
+
+    gtk_widget_grab_focus(widget);
+
+    if (refresh_view) {
+        view_updated = jump_scrollbar_to_focused(grid);
+    } else {
+        view_updated = FALSE;
+    }
+
+    if (view_updated) {
+        /* Don't just queue it, let's do it now! */
+        hildon_grid_size_allocate(GTK_WIDGET(grid),
+                                  &GTK_WIDGET(grid)->allocation);
+    }
+}
+
+static void
+hildon_grid_forall(GtkContainer * container,
+                   gboolean include_internals,
+                   GtkCallback callback, gpointer callback_data)
+{
+    HildonGrid *grid;
+    HildonGridPrivate *priv;
+    GList *list;
+
+    g_return_if_fail(container);
+    g_return_if_fail(callback);
+
+    grid = HILDON_GRID(container);
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+
+    if (include_internals) {
+        if (priv->scrollbar != NULL) {
+            (*callback) (priv->scrollbar, callback_data);
+        }
+        if (priv->empty_label != NULL) {
+            (*callback) (priv->empty_label, callback_data);
+        }
+    }
+
+    for (list = priv->children; list != NULL; list = list->next) {
+        (*callback) (((HildonGridChild *) list->data)->widget,
+                     callback_data);
+    }
+}
+
+static void hildon_grid_destroy(GtkObject * self)
+{
+    HildonGridPrivate *priv;
+
+    g_return_if_fail(self != NULL);
+    g_return_if_fail(HILDON_IS_GRID(self));
+
+    priv = HILDON_GRID_GET_PRIVATE(self);
+
+    if (GTK_WIDGET(self)->window != NULL) {
+        g_object_unref(G_OBJECT(GTK_WIDGET(self)->window));
+    }
+
+    gtk_container_forall(GTK_CONTAINER(self),
+                         (GtkCallback) gtk_object_ref, NULL);
+    gtk_container_forall(GTK_CONTAINER(self),
+                         (GtkCallback) gtk_widget_unparent, NULL);
+
+    GTK_OBJECT_CLASS(parent_class)->destroy(self);
+}
+
+static void hildon_grid_finalize(GObject * object)
+{
+    HildonGrid *grid;
+    HildonGridPrivate *priv;
+
+    grid = HILDON_GRID(object);
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+
+    gtk_container_forall(GTK_CONTAINER(object),
+                         (GtkCallback) gtk_object_unref, NULL);
+
+    if (priv->style != NULL) {
+        g_free(priv->style);
+    }
+    if (G_OBJECT_CLASS(parent_class)->finalize) {
+        G_OBJECT_CLASS(parent_class)->finalize(object);
+    }
+}
+
+/*
+ * hildon_grid_key_pressed:
+ * @widget: Widget where we get the signal from
+ * @event:  EventKey
+ * @data:   #HildonGrid
+ *
+ * Handle user key press (keyboard navigation).
+ *
+ * And here's how it works if some items are dimmed (moving to right):
+ * . . . .      . . # .     . 2 # .     . # . .
+ * . 1 # 2      . 1 # #     1 # # #     1 # # #
+ * . . .        . . 2       . . .       . 2 .
+ *
+ * '.' = item, '#' = dimmed item, 
+ * '1' = starting position, '2' = final position
+ *
+ * ...although only the first example is implemented right now.
+ *
+ * Return value: Signal handled
+ */
+static gboolean
+hildon_grid_key_pressed(GtkWidget * widget,
+                        GdkEventKey * event, gpointer data)
+{
+    GtkAdjustment *adjustment;
+    GtkContainer *container;
+    GtkWidget *new_focus;
+    HildonGrid *grid;
+    HildonGridPrivate *priv;
+    gboolean shift;
+    gint keyval;
+    gint x, y;
+    gint focus_index;
+    gint child_count, child_rows;
+    gint t;
+    gint addition, max_add;
+
+    g_return_val_if_fail(widget, FALSE);
+
+    grid = HILDON_GRID(data);
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+
+    /* 
+     * If focus was never lost (which is supposedly a bug), we could just
+     * see if an item is focused - if not, there's nothing else to focus...
+     */
+
+    /* No items? */
+    if (priv->children == NULL || g_list_length(priv->children) == 0)
+        return FALSE;
+
+    /* Focused item is dimmed? */
+    /* If we have no focus, allow non-existing focus to move... */
+    container = GTK_CONTAINER(grid);
+    if (container->focus_child != NULL
+        && !GTK_WIDGET_IS_SENSITIVE(container->focus_child)) {
+        return FALSE;
+    }
+    /* At the moment we don't want to do anything here if alt or control
+       or MODX is pressed, so return now. Shift + TAB are accepted (from
+       hildon-table-grid) And right now modifiers do not make any
+       difference... */
+
+    /* Said somewhere that "foo = a == b" is not desirable. */
+    if (event->state & GDK_SHIFT_MASK) {
+        shift = TRUE;
+    } else {
+        shift = FALSE;
+    }
+
+    keyval = event->keyval;
+    if (gtk_widget_get_default_direction() == GTK_TEXT_DIR_RTL) {
+        switch (event->keyval) {
+        case GDK_Left:
+            keyval = GDK_Right;
+            break;
+        case GDK_KP_Left:
+            keyval = GDK_KP_Right;
+            break;
+        case GDK_Right:
+            keyval = GDK_Left;
+            break;
+        case GDK_KP_Right:
+            keyval = GDK_KP_Left;
+            break;
+        }
+    }
+
+    child_count = g_list_length(priv->children);
+    child_rows = (child_count - 1) / priv->visible_cols + 1;
+
+    if (priv->focus_index != -1) {
+        x = priv->focus_index % priv->visible_cols;
+        y = priv->focus_index / priv->visible_cols;
+    } else {
+        x = y = 0;
+    }
+
+    switch (keyval) {
+    case GDK_KP_Page_Up:
+    case GDK_Page_Up:
+        if (priv->first_index == 0) {
+            if (priv->focus_index == 0) {
+                return TRUE;
+            }
+            set_focus(grid, get_child_by_index(priv, 0), TRUE);
+            return TRUE;
+        }
+
+        t = MAX(priv->first_index / priv->visible_cols
+                - priv->area_rows, 0);
+        adjustment = gtk_range_get_adjustment(GTK_RANGE(priv->scrollbar));
+        adjustment->value = (gdouble) (t * (priv->widget_height
+                                            + priv->widget_vspacing));
+        gtk_range_set_adjustment(GTK_RANGE(priv->scrollbar), adjustment);
+        gtk_widget_queue_draw(priv->scrollbar);
+        update_contents(grid);
+
+        /* Want to update now. */
+        hildon_grid_size_allocate(GTK_WIDGET(grid),
+                                  &GTK_WIDGET(grid)->allocation);
+
+        return TRUE;
+        break;
+
+    case GDK_KP_Page_Down:
+    case GDK_Page_Down:
+        if (priv->first_index / priv->visible_cols
+            == child_rows - priv->area_rows) {
+            if (priv->focus_index == child_count - 1) {
+                return TRUE;
+            }
+            set_focus(grid, get_child_by_index(priv, child_count - 1),
+                      TRUE);
+            return TRUE;
+        }
+
+        t = MIN(priv->first_index / priv->visible_cols
+                + priv->area_rows, child_rows - priv->area_rows);
+        adjustment = gtk_range_get_adjustment(GTK_RANGE(priv->scrollbar));
+        adjustment->value = (gdouble) (t * (priv->widget_height
+                                            + priv->widget_vspacing));
+        gtk_range_set_adjustment(GTK_RANGE(priv->scrollbar), adjustment);
+        gtk_widget_queue_draw(priv->scrollbar);
+        update_contents(grid);
+
+        /* Want to update now. */
+        hildon_grid_size_allocate(GTK_WIDGET(grid),
+                                  &GTK_WIDGET(grid)->allocation);
+
+        return TRUE;
+        break;
+
+    case GDK_KP_Up:
+    case GDK_Up:
+        if (y <= 0) {
+            return TRUE;
+        }
+        addition = -priv->visible_cols;
+        max_add = y;
+        y--;
+        break;
+
+    case GDK_KP_Down:
+    case GDK_Down:
+        if (y >= (child_count - 1) / priv->visible_cols) {
+            return TRUE;
+        }
+        t = child_count % priv->visible_cols;
+        if (t == 0) {
+            t = priv->visible_cols;
+        }
+        if (y == (child_count - 1) / priv->visible_cols - 1 && x >= t) {
+            x = t - 1;
+        }
+        y++;
+        addition = priv->visible_cols;
+        max_add = child_rows - y;
+        break;
+
+    case GDK_KP_Left:
+    case GDK_Left:
+        if (x <= 0) {
+            return TRUE;
+        }
+        addition = -1;
+        max_add = x;
+        x--;
+        break;
+
+    case GDK_KP_Right:
+    case GDK_Right:
+        if (x >= priv->visible_cols - 1) {
+            return TRUE;
+        }
+        if (y == 0 && x >= child_count - 1) {
+            return TRUE;
+        }
+        x++;
+        addition = 1;
+        max_add = priv->visible_cols - x;
+        if (y * priv->visible_cols + x == child_count) {
+            y--;
+        }
+        break;
+    case GDK_KP_Enter:
+    case GDK_Return:
+        hildon_grid_activate_child(grid,
+                                   HILDON_GRID_ITEM
+                                   (GTK_CONTAINER(grid)->focus_child));
+        return TRUE;
+        break;
+    default:
+        return FALSE;
+        break;
+    }
+
+    focus_index = y * priv->visible_cols + x;
+    new_focus = get_child_by_index(priv, focus_index);
+
+    while (new_focus != NULL &&
+           focus_index < child_count && !GTK_WIDGET_SENSITIVE(new_focus)) {
+        max_add--;
+
+        if (max_add == 0) {
+            return TRUE;
+        }
+        focus_index += addition;
+        new_focus = get_child_by_index(priv, focus_index);
+    }
+
+    if (new_focus != NULL) {
+        set_focus(grid, new_focus, TRUE);
+    }
+    return TRUE;
+}
+
+
+/*
+ * hildon_grid_button_pressed:
+ * @widget: Widget where signal is coming from
+ * @event:  #EventButton
+ * @data:   #HildonGrid
+ *
+ * Handle mouse button press.
+ *
+ * Return value: Signal handled
+ */
+static gboolean
+hildon_grid_button_pressed(GtkWidget * widget,
+                           GdkEventButton * event, gpointer data)
+{
+    HildonGrid *grid;
+    HildonGridPrivate *priv;
+    GtkWidget *child;
+    int child_no;
+
+/* Watch out for double/triple click press events */
+
+    if (event->type == GDK_2BUTTON_PRESS ||
+        event->type == GDK_3BUTTON_PRESS) {
+        grid = HILDON_GRID(data);
+        priv = HILDON_GRID_GET_PRIVATE(grid);
+        priv->last_button_event = event->type;
+        return FALSE;
+    }
+
+    grid = HILDON_GRID(data);
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+
+    priv->last_button_event = event->type;
+
+    if (event->type != GDK_BUTTON_PRESS)
+        return FALSE;
+
+
+    child_no = get_child_index_by_coord(priv, event->x, event->y);
+
+    if (child_no == -1 || child_no >= g_list_length(priv->children))
+        return FALSE;
+
+    child = get_child_by_index(priv, child_no);
+    if (!GTK_WIDGET_IS_SENSITIVE(child))
+        return FALSE;
+
+    set_focus(grid, child, TRUE);
+
+    priv->click_x = event->x;
+    priv->click_y = event->y;
+
+    return FALSE;
+}
+
+/*
+ * hildon_grid_button_released:
+ * @widget: Widget the signal is coming from
+ * @event:  #EventButton
+ * @data:   #HildonGrid
+ *
+ * Handle mouse button release.
+ *
+ * Return value: Signal handled
+ */
+static gboolean
+hildon_grid_button_released(GtkWidget * widget,
+                            GdkEventButton * event, gpointer data)
+{
+    HildonGrid *grid;
+    HildonGridPrivate *priv;
+    GtkWidget *child;
+    int child_no;
+
+    grid = HILDON_GRID(data);
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+
+/* In case of double/triple click, silently ignore the release event */
+
+    if (priv->last_button_event == GDK_2BUTTON_PRESS ||
+        priv->last_button_event == GDK_3BUTTON_PRESS) {
+        priv->last_button_event = event->type;
+        return FALSE;
+    }
+
+    child_no = get_child_index_by_coord(priv, event->x, event->y);
+
+    if (child_no == -1 || child_no >= g_list_length(priv->children)) {
+        return FALSE;
+    }
+    child = get_child_by_index(priv, child_no);
+    if (!GTK_WIDGET_IS_SENSITIVE(child)) {
+        return FALSE;
+    }
+    if (abs(priv->click_x - event->x) >= DRAG_SENSITIVITY
+        && abs(priv->click_y - event->y) >= DRAG_SENSITIVITY) {
+        return FALSE;
+    }
+    set_focus(grid, child, TRUE);
+    priv->last_button_event = event->type;
+    hildon_grid_activate_child(grid, HILDON_GRID_ITEM(child));
+
+    return FALSE;
+}
+
+/*
+ * hildon_grid_scrollbar_moved:
+ * @widget: Widget which sent the signal
+ * @data:   #HildonGrid
+ *
+ * Update HildonGrid contents when scrollbar is moved.
+ *
+ * Return value: Signal handeld
+ */
+static gboolean
+hildon_grid_scrollbar_moved(GtkWidget * widget, gpointer data)
+{
+    HildonGrid *grid;
+    HildonGridPrivate *priv;
+    gboolean updated = FALSE;
+
+    grid = HILDON_GRID(data);
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+    updated = update_contents(grid);
+
+    /* 
+     * Kludge-time!
+     *
+     * If grid changes focus while dragging scrollbar and pointer leaves
+     * scrollbar, focus is moved to prev_focus... This prevents that.
+     */
+    gtk_window_set_prev_focus_widget(GTK_WINDOW
+                                     (gtk_widget_get_toplevel(widget)),
+                                     GTK_CONTAINER(grid)->focus_child);
+
+    if (updated)
+        /* Don't just queue it, let's do it now! */
+        hildon_grid_size_allocate(GTK_WIDGET(grid),
+                                  &GTK_WIDGET(grid)->allocation);
+
+    return TRUE;
+}
+
+
+/*
+ * update_contents:
+ * @grid:   #HildonGrid
+ *
+ * Update the view if scrollbar has moved so that first visible row
+ * should've changed. Returns true if location actually changed.
+ *
+ * Return value: Content changed
+ */
+static gboolean update_contents(HildonGrid * grid)
+{
+    HildonGridPrivate *priv;
+    gint new_row;
+
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+    new_row = (int) gtk_range_get_value(GTK_RANGE(priv->scrollbar))
+        / (priv->widget_height + priv->widget_vspacing);
+
+    if (new_row != priv->old_sb_pos) {
+        priv->old_sb_pos = new_row;
+        priv->first_index = new_row * priv->visible_cols;
+
+        return TRUE;
+    }
+    return FALSE;
+}
+
+/*
+ * jump_scrollbar_to_focused:
+ * @grid:   #HildonGrid
+ *
+ * Moves scrollbar position so that focused item will be shown 
+ * in visible area.
+ * Returns TRUE if visible position of widgets have changed.
+ *
+ * Return value: Content changed
+ */
+static gboolean jump_scrollbar_to_focused(HildonGrid * grid)
+{
+    HildonGridPrivate *priv;
+    GtkAdjustment *adjustment;
+    gint child_count;
+    gint empty_grids;
+    gint new_row;
+
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+    /* If we don't have scrollbar, let the focus be broken, too. */
+    g_return_val_if_fail(priv->scrollbar != NULL, FALSE);
+
+    /* Make sure "first widget" is something sensible. */
+    priv->first_index = priv->first_index / priv->visible_cols
+        * priv->visible_cols;
+
+    child_count = g_list_length(priv->children);
+    empty_grids = priv->visible_cols * priv->area_rows - child_count
+        + priv->first_index;
+
+    if (priv->focus_index < priv->first_index) {
+        new_row = priv->focus_index / priv->visible_cols;
+    } else if (priv->focus_index >= priv->first_index
+               + priv->area_rows * priv->visible_cols) {
+        new_row = priv->focus_index / priv->visible_cols -
+            priv->area_rows + 1;
+    } else if (empty_grids >= priv->visible_cols) {
+        new_row = ((child_count - 1) / priv->visible_cols + 1)
+            - priv->area_rows;
+        if (new_row < 0) {
+            new_row = 0;
+        }
+    } else {
+        return FALSE;
+    }
+
+    /* Move scrollbar accordingly. */
+    adjustment = gtk_range_get_adjustment(GTK_RANGE(priv->scrollbar));
+    adjustment->value = (gdouble) (new_row * (priv->widget_height
+                                              + priv->widget_vspacing));
+    gtk_range_set_adjustment(GTK_RANGE(priv->scrollbar), adjustment);
+    priv->first_index = new_row * priv->visible_cols;
+    priv->old_sb_pos = new_row;
+
+    gtk_widget_queue_draw(priv->scrollbar);
+
+    return TRUE;
+}
+
+
+/*
+ * adjust_scrollbar_height:
+ * @grid:   HildonGridPrivate
+ *
+ * Return value: View should change
+ *
+ * Adjust scrollbar according the #HildonGrid contents. 
+ * Show/hide scrollbar if
+ * appropriate. Also sets priv->first_index.
+ */
+static gboolean adjust_scrollbar_height(HildonGrid * grid)
+{
+    HildonGridPrivate *priv;
+    GtkRequisition req;
+    GtkAdjustment *adj;
+    GtkAllocation alloc;
+    GtkAllocation *gridalloc;
+    gint old_upper;
+    gint need_rows;
+    gint need_pixels;
+    gboolean updated;
+
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+    g_return_val_if_fail(priv->scrollbar != NULL, FALSE);
+
+    updated = FALSE;
+    gridalloc = &GTK_WIDGET(grid)->allocation;
+
+    /* See if we need scrollbar at all. */
+    if (priv->num_columns == 0) {
+        priv->visible_cols = MAX(1,
+                                 gridalloc->width /
+                                 (priv->widget_width +
+                                  priv->widget_hspacing));
+    } else {
+        priv->visible_cols = MAX(1, priv->num_columns);
+    }
+
+    if (g_list_length(priv->children) != 0) {
+        need_rows = (g_list_length(priv->children) - 1)
+            / priv->visible_cols + 1;
+    } else {
+        need_rows = 0;
+    }
+
+    if (need_rows <= priv->area_rows) {
+        updated = priv->first_index != 0;
+
+        priv->first_index = 0;
+        if (GTK_WIDGET_VISIBLE(priv->scrollbar)) {
+            gtk_widget_hide(priv->scrollbar);
+            updated = TRUE;
+        }
+
+        return updated;
+    }
+
+    /* All right then, we need scrollbar. Place scrollbar on the screen. */
+    gtk_widget_get_child_requisition(priv->scrollbar, &req);
+    priv->scrollbar_width = req.width;
+
+    alloc.width = req.width;
+    alloc.height = gridalloc->height;
+    alloc.x = gridalloc->width - req.width + gridalloc->x;
+    alloc.y = gridalloc->y;
+    gtk_widget_size_allocate(priv->scrollbar, &alloc);
+
+    if (!GTK_WIDGET_VISIBLE(priv->scrollbar)) {
+        gtk_widget_show(priv->scrollbar);
+        updated = TRUE;
+    }
+
+
+    /* 
+     * If we're fitting as many columns as possible, 
+     * recount number of visible
+     * columns and recalculate number of needed rows accordingly.
+     */
+    if (priv->num_columns == 0) {
+        priv->visible_cols = MAX(1,
+                                 (gridalloc->width -
+                                  priv->scrollbar_width) /
+                                 (priv->widget_width +
+                                  priv->widget_hspacing));
+        need_rows = (g_list_length(priv->children) - 1) /
+            priv->visible_cols + 1;
+    }
+
+    need_pixels =
+        need_rows * (priv->widget_height + priv->widget_vspacing);
+
+    /* Once we know how much space we need, update the scrollbar. */
+    adj = gtk_range_get_adjustment(GTK_RANGE(priv->scrollbar));
+    old_upper = (int) adj->upper;
+    adj->lower = 0.0;
+    adj->upper = (gdouble) need_pixels;
+    adj->step_increment = (gdouble) (priv->widget_height
+                                     + priv->widget_vspacing);
+    adj->page_increment =
+        (gdouble) (priv->area_rows *
+                   (priv->widget_height + priv->widget_vspacing));
+    adj->page_size =
+        (gdouble) (priv->area_height /
+                   (priv->widget_height +
+                    priv->widget_vspacing) * (priv->widget_height +
+                                              priv->widget_vspacing));
+
+    /* Also update position if needed to show focused item. */
+
+    gtk_range_set_adjustment(GTK_RANGE(priv->scrollbar), adj);
+
+    /* Then set first_index. */
+    priv->first_index = (int) adj->value / (priv->widget_height +
+                                            priv->widget_vspacing) *
+        priv->visible_cols;
+
+    /* Finally, ask Gtk to redraw the scrollbar. */
+    if (old_upper != (int) adj->upper) {
+        gtk_widget_queue_draw(priv->scrollbar);
+    }
+    return updated;
+}
+
+/*
+ * get_child_index_by_coord:
+ * @priv:   HildonGridPrivate
+ * @x:      X-coordinate
+ * @y:      Y-coordinate
+ *
+ * Returns index of child at given coordinates, -1 if no child.
+ *
+ * Return value: Index
+ */
+static gint
+get_child_index_by_coord(HildonGridPrivate * priv, gint x, gint y)
+{
+    int t;
+
+    if (x >
+        priv->visible_cols * (priv->widget_width + priv->widget_hspacing)
+        || x % (priv->widget_width + priv->widget_hspacing)
+        < priv->widget_hspacing
+        || y % (priv->widget_height + priv->widget_vspacing)
+        < priv->widget_vspacing) {
+        return -1;
+    }
+
+    t = y / (priv->widget_height + priv->widget_vspacing) *
+        priv->visible_cols
+        + x / (priv->widget_width + priv->widget_hspacing)
+        + priv->first_index;
+
+    if (t >= priv->first_index + priv->area_rows * priv->visible_cols
+        || t >= g_list_length(priv->children) || t < 0) {
+        return -1;
+    }
+    return t;
+}
+
+/*
+ * get_child_by_index:
+ * @priv:   HildonGridPrivate
+ * @index:  Index of child
+ *
+ * Returns child that is #th in HildonGrid or NULL if child was not found
+ * among the children.
+ *
+ * Return value: GtkWidget
+ */
+static GtkWidget *get_child_by_index(HildonGridPrivate * priv, gint index)
+{
+    GList *list;
+    int i = 0;
+
+    if (index >= g_list_length(priv->children) || index < 0) {
+        return NULL;
+    }
+    for (list = priv->children, i = 0; list != NULL;
+         list = list->next, i++) {
+        if (index == i) {
+            return ((HildonGridChild *) list->data)->widget;
+        }
+    }
+
+    g_warning("no such child");
+    return NULL;
+}
+
+/*
+ * get_child_index:
+ * @priv:   HildonGridPrivate
+ * @child:  #GtkWidget to look for
+ *
+ * Returns index of a child or -1 if child was not found among the
+ * children.
+ *
+ * Return value: Index
+ */
+static gint get_child_index(HildonGridPrivate * priv, GtkWidget * child)
+{
+    GList *list;
+    gint index;
+
+    if (child == NULL)
+        return -1;
+
+    for (list = priv->children, index = 0;
+         list != NULL; list = list->next, index++) {
+        if (((HildonGridChild *) list->data)->widget == child) {
+            return index;
+        }
+    }
+
+    g_warning("no such child");
+    return -1;
+}
+
+
+/**
+ * hildon_grid_activate_child:
+ * @grid:   #HildonGrid
+ * @item:   #HildonGridItem
+ *
+ * Emits a signal to tell HildonGridItem was actiavated.
+ */
+void hildon_grid_activate_child(HildonGrid * grid, HildonGridItem * item)
+{
+    g_return_if_fail(HILDON_IS_GRID(grid));
+
+    g_signal_emit(grid, grid_signals[ACTIVATE_CHILD], 0, item);
+}
+
+
+
+/**
+ * hildon_grid_set_style:
+ * @grid:       #HildonGrid
+ * @style_name: Style name
+ *
+ * Sets style. Setting style sets widget size, spacing, label position,
+ * number of columns, and icon size.
+ */
+void hildon_grid_set_style(HildonGrid * grid, const gchar * style_name)
+{
+    HildonGridPrivate *priv;
+
+    g_return_if_fail(HILDON_IS_GRID(grid));
+
+
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+    if (priv->style != NULL) {
+        g_free((gpointer) priv->style);
+    }
+    if (style_name != NULL) {
+        priv->style = g_strdup(style_name);
+    } else {
+        priv->style = NULL;
+    }
+
+    gtk_widget_set_name(GTK_WIDGET(grid), style_name);
+    get_style_properties(grid);
+
+    gtk_widget_queue_resize(GTK_WIDGET(grid));
+}
+
+/**
+ * hildon_grid_get_style:
+ * @grid:   #HildonGrid
+ *
+ * Returns the name of style currently used in HildonGrid.
+ *
+ * Return value: Style name
+ */
+const gchar *hildon_grid_get_style(HildonGrid * grid)
+{
+    g_return_val_if_fail(HILDON_IS_GRID(grid), NULL);
+
+    return gtk_widget_get_name(GTK_WIDGET(grid));
+}
+
+/*
+ * For registering signal handler...
+ */
+static void
+marshal_BOOLEAN__INT_INT_INT(GClosure * closure,
+                             GValue * return_value,
+                             guint n_param_values,
+                             const GValue * param_values,
+                             gpointer invocation_hint,
+                             gpointer marshal_data)
+{
+    typedef gboolean(*marshal_func_BOOLEAN__INT_INT_INT)
+     (gpointer data1, gint arg_1, gint arg_2, gint arg_3, gpointer data2);
+    register marshal_func_BOOLEAN__INT_INT_INT callback;
+    register GCClosure *cc = (GCClosure *) closure;
+    register gpointer data1, data2;
+    gboolean v_return;
+
+    g_return_if_fail(return_value != NULL);
+    g_return_if_fail(n_param_values == 4);
+
+    if (G_CCLOSURE_SWAP_DATA(closure)) {
+        data1 = closure->data;
+        data2 = g_value_peek_pointer(param_values + 0);
+    } else {
+        data1 = g_value_peek_pointer(param_values + 0);
+        data2 = closure->data;
+    }
+    callback = (marshal_func_BOOLEAN__INT_INT_INT)
+        (marshal_data ? marshal_data : cc->callback);
+
+    /* Doing this is somewhat ugly but it works. */
+    v_return = callback(data1,
+                        (int) (param_values + 1)->data[0].v_pointer,
+                        (int) (param_values + 2)->data[0].v_pointer,
+                        (int) (param_values + 3)->data[0].v_pointer,
+                        data2);
+    /* 
+     * And here's the original code from gtkmarshal.c:
+     * 
+     v_return = callback (data1,
+     g_marshal_value_peek_int (param_values + 1),
+     g_marshal_value_peek_int (param_values + 2),
+     g_marshal_value_peek_int (param_values + 3),
+     data2);
+     */
+
+    g_value_set_boolean(return_value, v_return);
+}
+
+/*
+ * get_style_properties:
+ * @grid:   #HildonGrid
+ *
+ * Gets widget size and other stuff from gtkrc. If some stuff changed, let
+ * children know this, too.
+ */
+static void get_style_properties(HildonGrid * grid)
+{
+    gint icon_size;
+    gint num_columns;
+    HildonGridPositionType label_pos;
+    gint label_hspacing;
+    gint label_vspacing;
+    gint emblem_size;
+
+    HildonGridPrivate *priv;
+
+    g_return_if_fail(HILDON_IS_GRID(grid));
+
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+    gtk_widget_style_get(GTK_WIDGET(grid),
+                         "item_width", &priv->widget_width,
+                         "item_hspacing", &priv->widget_hspacing,
+                         "item_height", &priv->widget_height,
+                         "item_vspacing", &priv->widget_vspacing,
+                         "icon_size", &icon_size,
+                         "n_columns", &num_columns,
+                         "label_pos", &label_pos,
+                         "label_hspacing", &label_hspacing,
+                         "label_vspacing", &label_vspacing,
+                         "emblem_size", &emblem_size, NULL);
+
+    priv->saved_width = priv->widget_width;
+    priv->saved_height = priv->widget_height;
+    priv->saved_hspacing = priv->widget_hspacing;
+    priv->saved_vspacing = priv->widget_vspacing;
+
+    _hildon_grid_set_icon_size(grid, icon_size);
+    _hildon_grid_set_n_columns(grid, num_columns);
+    _hildon_grid_set_label_pos(grid, label_pos);
+    _hildon_grid_set_label_hspacing(grid, label_hspacing);
+    _hildon_grid_set_label_vspacing(grid, label_vspacing);
+    _hildon_grid_set_emblem_size(grid, emblem_size);
+}
+
+
+
+/**
+ * hildon_grid_set_scrollbar_pos:
+ * @grid:           #HildonGrid
+ * @scrollbar_pos:  new position (in pixels)
+ *
+ * Sets view (scrollbar) to specified position.
+ */
+void hildon_grid_set_scrollbar_pos(HildonGrid * grid, gint scrollbar_pos)
+{
+    HildonGridPrivate *priv;
+    GtkAdjustment *adjustment;
+
+    g_return_if_fail(HILDON_IS_GRID(grid));
+
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+    adjustment = gtk_range_get_adjustment(GTK_RANGE(priv->scrollbar));
+    adjustment->value = (gdouble) scrollbar_pos;
+
+    gtk_range_set_adjustment(GTK_RANGE(priv->scrollbar), adjustment);
+
+    /* If grid isn't drawable, updating anything could mess up focus. */
+    if (!GTK_WIDGET_DRAWABLE(GTK_WIDGET(grid)))
+        return;
+
+    update_contents(grid);
+}
+
+/**
+ * hildon_grid_get_scrollbar_pos:
+ * @grid:   #HildonGrid
+ *
+ * Returns position of scrollbar (in pixels).
+ *
+ * Return value: Scrollbar position
+ */
+gint hildon_grid_get_scrollbar_pos(HildonGrid * grid)
+{
+    GtkAdjustment *adjustment;
+
+    g_return_val_if_fail(HILDON_IS_GRID(grid), -1);
+
+    adjustment = gtk_range_get_adjustment(GTK_RANGE
+                                          (HILDON_GRID_GET_PRIVATE
+                                           (grid)->scrollbar));
+    return (int) adjustment->value;
+}
+
+static void
+hildon_grid_set_property(GObject * object,
+                         guint prop_id,
+                         const GValue * value, GParamSpec * pspec)
+{
+    HildonGrid *grid;
+
+    grid = HILDON_GRID(object);
+
+    switch (prop_id) {
+    case PROP_EMPTY_LABEL:
+        _hildon_grid_set_empty_label(grid, g_value_get_string(value));
+        break;
+
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+        break;
+    }
+}
+
+static void
+hildon_grid_get_property(GObject * object,
+                         guint prop_id, GValue * value, GParamSpec * pspec)
+{
+    switch (prop_id) {
+    case PROP_EMPTY_LABEL:
+        g_value_set_string(value,
+                           _hildon_grid_get_empty_label(HILDON_GRID
+                                                        (object)));
+        break;
+
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+        break;
+    }
+}
+
+static gboolean
+hildon_grid_state_changed(GtkWidget * widget,
+                          GtkStateType state, gpointer data)
+{
+    HildonGrid *grid;
+    HildonGridPrivate *priv;
+    GList *list;
+    GtkWidget *current;
+    GtkWidget *prev_focusable, *next_focusable;
+    gboolean found_old;
+
+    g_return_val_if_fail(HILDON_IS_GRID(data), FALSE);
+    g_return_val_if_fail(HILDON_IS_GRID_ITEM(widget), FALSE);
+
+    grid = HILDON_GRID(data);
+    priv = HILDON_GRID_GET_PRIVATE(grid);
+
+
+    if (GTK_WIDGET_IS_SENSITIVE(widget))
+        return FALSE;
+
+    prev_focusable = next_focusable = NULL;
+    found_old = FALSE;
+
+    for (list = priv->children; list != NULL; list = list->next) {
+        current = ((HildonGridChild *) list->data)->widget;
+
+        if (GTK_WIDGET_IS_SENSITIVE(current)) {
+            if (found_old) {
+                next_focusable = current;
+                break;
+            } else {
+                prev_focusable = current;
+            }
+        } else if (current == widget) {
+            found_old = TRUE;
+        }
+    }
+
+    if (next_focusable == NULL) {
+        next_focusable = prev_focusable;
+    }
+
+    gtk_container_set_focus_child(GTK_CONTAINER(grid), next_focusable);
+
+    return FALSE;
+}
+
+
+
+static void
+hildon_grid_tap_and_hold_setup(GtkWidget * widget,
+                               GtkWidget * menu,
+                               GtkCallback func,
+                               GtkWidgetTapAndHoldFlags flags)
+{
+    g_return_if_fail(HILDON_IS_GRID(widget) && GTK_IS_MENU(menu));
+
+    parent_class->parent_class.tap_and_hold_setup
+        (widget, menu, func, flags | GTK_TAP_AND_HOLD_NO_INTERNALS);
+}
diff --git a/hildon-widgets/hildon-grid.h b/hildon-widgets/hildon-grid.h
new file mode 100644 (file)
index 0000000..41764c9
--- /dev/null
@@ -0,0 +1,107 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/**
+ * @file hildon-grid.h
+ *
+ * This file is a header file for hildon-grid.c, the implementation of
+ * #HildonGrid. #HildonGrid is used in views like Home and Control Panel
+ * which have single-tap activated items.
+ */
+
+#ifndef HILDON_GRID_H_
+#define HILDON_GRID_H_
+
+#include <gtk/gtkcontainer.h>
+#include <hildon-widgets/hildon-grid-item.h>
+
+G_BEGIN_DECLS
+#define HILDON_TYPE_GRID            (hildon_grid_get_type ())
+#define HILDON_GRID(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
+                                            HILDON_TYPE_GRID, \
+                                            HildonGrid))
+#define HILDON_GRID_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), \
+                                            HILDON_TYPE_GRID, \
+                                            HildonGridClass))
+#define HILDON_IS_GRID(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
+                                            HILDON_TYPE_GRID))
+#define HILDON_IS_GRID_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
+                                            HILDON_TYPE_GRID))
+#define HILDON_GRID_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), \
+                                            HILDON_TYPE_GRID, \
+                                            HildonGridClass))
+typedef struct _HildonGrid HildonGrid;
+typedef struct _HildonGridClass HildonGridClass;
+
+
+
+struct _HildonGrid {
+    GtkContainer parent;
+};
+
+struct _HildonGridClass {
+    GtkContainerClass parent_class;
+
+    void (*activate_child) (HildonGrid * grid, HildonGridItem * item);
+    void (*popup_context_menu) (HildonGrid * grid, HildonGridItem * item);
+};
+
+GType hildon_grid_get_type(void);
+GtkWidget *hildon_grid_new(void);
+
+/*
+ * Use GtkContainer API:
+ *
+ * void        gtk_container_set_focus_child   (GtkContainer    *container,
+ *                                              GtkWidget       *child);
+ *
+ * GTK_CONTAINER (grid)->focus_child can be used to get focused child.
+ */
+
+void hildon_grid_set_style(HildonGrid * grid, const gchar * style_name);
+const gchar *hildon_grid_get_style(HildonGrid * grid);
+
+void hildon_grid_set_scrollbar_pos(HildonGrid * grid, gint scrollbar_pos);
+gint hildon_grid_get_scrollbar_pos(HildonGrid * grid);
+
+
+/*
+ * We are going to use gtk_container_add/remove, so these are internal.
+ * If GridView is not visible, it won't update the view, so it should be
+ * hidden when doing massive modifications.
+ *
+ * 
+ * Use GtkContainer API:
+ *
+ * void        gtk_container_add               (GtkContainer    *container,
+ *                                              GtkWidget       *widget);
+ *
+ * void        gtk_container_remove            (GtkContainer    *container,
+ *                                              GtkWidget       *widget);
+ */
+
+void hildon_grid_activate_child(HildonGrid * grid, HildonGridItem * item);
+
+G_END_DECLS
+#endif /* ifndef HILDON_GRID_H_ */
diff --git a/hildon-widgets/hildon-hvolumebar.c b/hildon-widgets/hildon-hvolumebar.c
new file mode 100644 (file)
index 0000000..6de08ee
--- /dev/null
@@ -0,0 +1,317 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/*
+ * @file hildon-hvolumebar.c
+ *
+ * This file contains API implementation for Hildon horizontal volumebar.
+ */
+
+
+/* Horizontal volumebar subclass */
+
+#include <gtk/gtktoolbar.h>
+#include "hildon-hvolumebar.h"
+#include "hildon-volumebar.h"
+#include "hildon-volumebar-range.h"
+#include "hildon-volumebar-private.h"
+
+/* Defines for normal version of HVolumebar */
+#define DEFAULT_TBUTTON_WIDTH  26
+#define DEFAULT_TBUTTON_HEIGHT 26
+#define MINIMUM_BAR_WIDTH     147
+#define DEFAULT_BAR_HEIGHT     58
+#define DEFAULT_ENDING_SIZE    20
+
+#define VERTICAL_MUTE_GAP      16
+#define HORIZONTAL_MUTE_GAP     6
+
+#define TOOL_DEFAULT_TBUTTON_WIDTH  26
+#define TOOL_DEFAULT_TBUTTON_HEIGHT 26
+#define TOOL_MINIMUM_BAR_WIDTH     121
+#define TOOL_DEFAULT_BAR_HEIGHT     40
+#define TOOL_DEFAULT_ENDING_SIZE     0
+#define TOOL_VERTICAL_MUTE_GAP ((TOOL_DEFAULT_BAR_HEIGHT - TOOL_DEFAULT_TBUTTON_HEIGHT) / 2)
+
+static HildonVolumebarClass *parent_class;
+static void hvolumebar_class_init(HildonHVolumebarClass * klass);
+static void hvolumebar_init(HildonHVolumebar * hvolumebar);
+static void
+hildon_hvolumebar_mute(GtkWidget * widget, HildonHVolumebar * self);
+
+/* new */
+static gboolean hildon_hvolumebar_expose(GtkWidget * widget,
+                                         GdkEventExpose * event);
+static void hildon_hvolumebar_size_request(GtkWidget * widget,
+                                           GtkRequisition * requisition);
+static void hildon_hvolumebar_size_allocate(GtkWidget * widget,
+                                            GtkAllocation * allocation);
+static void hildon_hvolumebar_map(GtkWidget * widget);
+
+
+GType hildon_hvolumebar_get_type(void)
+{
+    static GType type = 0;
+
+    if (!type) {
+        static const GTypeInfo info = {
+            sizeof(HildonHVolumebarClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hvolumebar_class_init,     /* class_init */
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonHVolumebar),
+            0,
+            (GInstanceInitFunc) hvolumebar_init,
+        };
+        type = g_type_register_static(HILDON_TYPE_VOLUMEBAR,
+                                      "HildonHVolumebar", &info, 0);
+    }
+    return type;
+}
+
+
+static void hvolumebar_class_init(HildonHVolumebarClass * klass)
+{
+    GtkWidgetClass *volumebar_class = GTK_WIDGET_CLASS(klass);
+
+    parent_class = g_type_class_peek_parent(klass);
+
+    volumebar_class->size_request = hildon_hvolumebar_size_request;
+    volumebar_class->size_allocate = hildon_hvolumebar_size_allocate;
+    volumebar_class->map = hildon_hvolumebar_map;
+    volumebar_class->expose_event = hildon_hvolumebar_expose;
+}
+
+
+static void hvolumebar_init(HildonHVolumebar * hvolumebar)
+{
+    HildonVolumebar *v_ptr = HILDON_VOLUMEBAR(hvolumebar);
+    HildonVolumebarPrivate *priv;
+
+    priv = HILDON_VOLUMEBAR_GET_PRIVATE(hvolumebar);
+
+    priv->ownorientation = GTK_ORIENTATION_HORIZONTAL;
+    priv->orientation = GTK_ORIENTATION_HORIZONTAL;
+
+    priv->volumebar =
+        HILDON_VOLUMEBAR_RANGE(hildon_volumebar_range_new
+                               (GTK_ORIENTATION_HORIZONTAL));
+
+    GTK_WIDGET_UNSET_FLAGS(GTK_WIDGET(hvolumebar), GTK_CAN_FOCUS);
+
+    gtk_widget_set_parent(GTK_WIDGET(priv->tbutton), GTK_WIDGET(v_ptr));
+    gtk_widget_set_parent(GTK_WIDGET(priv->volumebar), GTK_WIDGET(v_ptr));
+
+    gtk_scale_set_draw_value(GTK_SCALE(priv->volumebar), FALSE);
+
+    /* Signals */
+    g_signal_connect_swapped(G_OBJECT(priv->volumebar), "value-changed",
+                             G_CALLBACK(hildon_volumebar_level_change),
+                             hvolumebar);
+    g_signal_connect(G_OBJECT(priv->tbutton), "toggled",
+                     G_CALLBACK(hildon_hvolumebar_mute), hvolumebar);
+
+    /*gtk_widget_show(GTK_WIDGET(priv->tbutton));*/
+    gtk_widget_show(GTK_WIDGET(priv->volumebar));
+}
+
+/**
+ * hildon_hvolumebar_new:
+ *
+ * Creates a new #HildonHVolumebar widget.
+ *
+ * Returns: a new #HildonHVolumebar.
+ */
+GtkWidget *hildon_hvolumebar_new()
+{
+    return GTK_WIDGET(g_object_new(HILDON_TYPE_HVOLUMEBAR, NULL));
+}
+
+static void hildon_hvolumebar_map(GtkWidget * widget)
+{
+    HildonVolumebar *vbar;
+    HildonVolumebarPrivate *priv;
+    GtkWidget *parent;
+
+    vbar = HILDON_VOLUMEBAR(widget);
+    priv = HILDON_VOLUMEBAR_GET_PRIVATE(vbar);
+
+    parent = gtk_widget_get_ancestor(GTK_WIDGET(widget), GTK_TYPE_TOOLBAR);
+
+    if (parent)
+        priv->is_toolbar = TRUE;
+
+    GTK_WIDGET_CLASS(parent_class)->map(widget);
+}
+
+static gboolean hildon_hvolumebar_expose(GtkWidget * widget,
+                                         GdkEventExpose * event)
+{
+    if (GTK_WIDGET_DRAWABLE(widget)) {
+        gtk_paint_box(widget->style, widget->window,
+                      GTK_WIDGET_STATE(widget), GTK_SHADOW_OUT,
+                      NULL, widget, "background",
+                      widget->allocation.x,
+                      widget->allocation.y,
+                      widget->allocation.width,
+                      widget->allocation.height);
+
+        (*GTK_WIDGET_CLASS(parent_class)->expose_event) (widget, event);
+    }
+
+    return FALSE;
+}
+
+static void
+hildon_hvolumebar_size_request(GtkWidget * widget,
+                               GtkRequisition * requisition)
+{
+    HildonVolumebarPrivate *priv;
+
+    priv = HILDON_VOLUMEBAR_GET_PRIVATE(HILDON_VOLUMEBAR(widget));
+
+    requisition->width = (priv->is_toolbar
+                          ? TOOL_MINIMUM_BAR_WIDTH
+                          : MINIMUM_BAR_WIDTH);
+    requisition->height = (priv->is_toolbar
+                           ? TOOL_DEFAULT_BAR_HEIGHT
+                           : DEFAULT_BAR_HEIGHT);
+}
+
+static void
+hildon_hvolumebar_size_allocate(GtkWidget * widget,
+                                GtkAllocation * allocation)
+{
+    HildonVolumebar *vbar;
+    HildonVolumebarPrivate *priv;
+    GtkAllocation button_allocation, range_allocation;
+
+    vbar = HILDON_VOLUMEBAR(widget);
+    priv = HILDON_VOLUMEBAR_GET_PRIVATE(vbar);
+    
+    button_allocation.x = 0;
+    button_allocation.width = 0;
+    
+    if (priv->is_toolbar && allocation->height > TOOL_DEFAULT_BAR_HEIGHT) {
+        allocation->y += (allocation->height - TOOL_DEFAULT_BAR_HEIGHT) / 2;
+        allocation->height = TOOL_DEFAULT_BAR_HEIGHT;
+    }
+
+    if (!priv->is_toolbar && allocation->height > DEFAULT_BAR_HEIGHT) {
+        allocation->y += (allocation->height - DEFAULT_BAR_HEIGHT) / 2;
+        allocation->height = DEFAULT_BAR_HEIGHT;
+    }
+
+    widget->allocation = *allocation;
+
+    if (priv->tbutton && GTK_WIDGET_VISIBLE(priv->tbutton)) {
+
+        if (priv->is_toolbar) {
+            button_allocation.x = allocation->x;
+            button_allocation.y = allocation->y + TOOL_VERTICAL_MUTE_GAP;
+            button_allocation.width = TOOL_DEFAULT_TBUTTON_WIDTH;
+            button_allocation.height = TOOL_DEFAULT_TBUTTON_HEIGHT;
+        } else {
+            button_allocation.x = allocation->x + DEFAULT_ENDING_SIZE;
+            button_allocation.y = allocation->y + VERTICAL_MUTE_GAP;
+            button_allocation.width = DEFAULT_TBUTTON_WIDTH;
+            button_allocation.height = DEFAULT_TBUTTON_HEIGHT;
+        }
+        gtk_widget_size_allocate(GTK_WIDGET(priv->tbutton),
+                                 &button_allocation);
+    }
+    if (priv->volumebar && GTK_WIDGET_VISIBLE(priv->volumebar)) {
+
+        range_allocation.y = allocation->y;
+        
+        if (priv->tbutton && GTK_WIDGET_VISIBLE(priv->tbutton))
+        {
+            range_allocation.x = button_allocation.x
+                                 + button_allocation.width
+                                 + HORIZONTAL_MUTE_GAP;
+        
+            if (priv->is_toolbar) 
+            {
+                range_allocation.width = MAX(0,
+                                           allocation->width
+                                           - 2 * TOOL_DEFAULT_ENDING_SIZE
+                                           - TOOL_DEFAULT_TBUTTON_WIDTH
+                                           - HORIZONTAL_MUTE_GAP);
+                                         
+                range_allocation.height = TOOL_DEFAULT_BAR_HEIGHT;
+            
+            } 
+            
+            else 
+            {
+                range_allocation.width = MAX(0,
+                                             allocation->width
+                                             - 2 * DEFAULT_ENDING_SIZE
+                                             - DEFAULT_TBUTTON_WIDTH
+                                             - HORIZONTAL_MUTE_GAP);
+
+                range_allocation.height = DEFAULT_BAR_HEIGHT;
+            }
+        
+        }
+        
+        else
+        {
+            if (priv->is_toolbar) 
+            {
+                range_allocation.x = allocation->x;
+                
+                range_allocation.width = MAX(0,
+                                        allocation->width
+                                        - 2 * TOOL_DEFAULT_ENDING_SIZE );
+                                         
+                range_allocation.height = TOOL_DEFAULT_BAR_HEIGHT;
+            
+            } 
+            
+            else 
+            {
+                
+                range_allocation.x = allocation->x + DEFAULT_ENDING_SIZE;
+                
+                range_allocation.width = MAX(0,
+                                             allocation->width
+                                             - 2 * DEFAULT_ENDING_SIZE );
+
+                range_allocation.height = DEFAULT_BAR_HEIGHT;
+            }
+        }
+
+        gtk_widget_size_allocate(GTK_WIDGET(priv->volumebar),
+                                 &range_allocation);
+    }
+}
+
+static void
+hildon_hvolumebar_mute(GtkWidget * widget, HildonHVolumebar * self)
+{
+    g_signal_emit_by_name(GTK_WIDGET(self), "mute_toggled");
+}
diff --git a/hildon-widgets/hildon-hvolumebar.h b/hildon-widgets/hildon-hvolumebar.h
new file mode 100644 (file)
index 0000000..766bab7
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef HILDON_HVOLUMEBAR_H
+#define HILDON_HVOLUMEBAR_H
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gtk/gtkalignment.h>
+#include <gtk/gtkframe.h>
+#include <gtk/gtktogglebutton.h>
+#include <hildon-widgets/hildon-volumebar.h>
+
+G_BEGIN_DECLS
+#define HILDON_TYPE_HVOLUMEBAR ( hildon_hvolumebar_get_type() )
+#define HILDON_HVOLUMEBAR(obj) (GTK_CHECK_CAST (obj,\
+        HILDON_TYPE_HVOLUMEBAR, HildonHVolumebar))
+#define HILDON_HVOLUMEBAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass),\
+        HILDON_TYPE_HVOLUMEBAR, HildonHVolumebarClass))
+#define HILDON_IS_HVOLUMEBAR(obj) (GTK_CHECK_TYPE (obj,\
+        HILDON_TYPE_HVOLUMEBAR))
+#define HILDON_IS_HVOLUMEBAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass),\
+        HILDON_TYPE_HVOLUMEBAR))
+typedef struct _HildonHVolumebar HildonHVolumebar;
+typedef struct _HildonHVolumebarClass HildonHVolumebarClass;
+
+struct _HildonHVolumebar {
+    /* This is our parent class */
+    HildonVolumebar volumebar;
+};
+
+struct _HildonHVolumebarClass {
+    HildonVolumebarClass parent_class;
+};
+
+GType hildon_hvolumebar_get_type(void);
+GtkWidget *hildon_hvolumebar_new(void);
+
+G_END_DECLS
+#endif /* HILDON_HVOLUMEBAR */
diff --git a/hildon-widgets/hildon-insert-object-dialog.c b/hildon-widgets/hildon-insert-object-dialog.c
new file mode 100644 (file)
index 0000000..7b50789
--- /dev/null
@@ -0,0 +1,414 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gtk/gtkmain.h>
+#include <gdk/gdkkeysyms.h>
+#include <gtk/gtkdialog.h>
+#include <gtk/gtkbutton.h>
+#include <gtk/gtklabel.h>
+#include <gtk/gtkentry.h>
+#include <gtk/gtkcombobox.h>
+#include <gtk/gtksizegroup.h>
+#include <gtk/gtkbox.h>
+#include <string.h>
+
+#include <libintl.h>
+
+#include <hildon-insert-object-dialog.h>
+#include <hildon-widgets/hildon-caption.h>
+
+#define _(String) dgettext(PACKAGE, String)
+
+#define MAX_ERR_MSG 256
+
+#define HILDON_INSERT_OBJECT_DIALOG_WIDTH 300
+#define HILDON_INSERT_OBJECT_DIALOG_HEIGHT 100
+
+#define PROJECT_TEMPLATE_DIR "/tmp"
+#define RUN_AT_TERMINATION 0
+
+
+static GtkDialogClass *parent_class;
+
+struct _HildonInsertObjectDialogPrivate {
+    GtkButton *insertBtn;
+    GtkButton *existingBtn;
+    GtkButton *cancelBtn;
+    GtkEntry *entry;
+    GtkLabel *label;
+    GtkComboBox *combo;
+    GtkSizeGroup *group;
+
+    HildonCaption *comboCap;
+    HildonCaption *entryCap;
+    HildonCaption *locationCap;
+
+    GnomeVFSDirectoryHandle *dir;
+    char *mimetype;
+
+    guint keysnooper;
+};
+
+#define HILDON_INSERT_OBJECT_DIALOG_GET_PRIVATE(o)  \
+   (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
+      HILDON_TYPE_INSERT_OBJECT_DIALOG, \
+      HildonInsertObjectDialogPrivate) )
+
+static void
+hildon_insert_object_dialog_class_init(HildonInsertObjectDialogClass *
+                                       class);
+static void hildon_insert_object_dialog_init(HildonInsertObjectDialog *
+                                             dialog);
+static void hildon_insert_object_dialog_finalize(GObject * obj_self);
+static gint hildon_insert_object_dialog_key_snooper(GtkWidget * gadget,
+                                                    GdkEventKey * event,
+                                                    GtkWidget * widget);
+static gboolean hildon_insert_object_foo(gpointer data)
+{
+    gnome_vfs_shutdown();
+    g_message("GnomeVFS shutdown succeed!\n");
+    return FALSE;
+}
+
+/* Private functions */
+static void
+hildon_insert_object_dialog_class_init(HildonInsertObjectDialogClass *
+                                       class)
+{
+
+    GObjectClass *object_class = G_OBJECT_CLASS(class);
+
+    parent_class = g_type_class_peek_parent(class);
+    g_type_class_add_private(class,
+                             sizeof(HildonInsertObjectDialogPrivate));
+
+    object_class->finalize = hildon_insert_object_dialog_finalize;
+}
+
+static void hildon_insert_object_dialog_finalize(GObject * obj_self)
+{
+    HildonInsertObjectDialogPrivate *priv;
+    HildonInsertObjectDialog *dlg;
+
+    g_return_if_fail(HILDON_IS_INSERT_OBJECT_DIALOG(obj_self));
+
+    dlg = HILDON_INSERT_OBJECT_DIALOG(obj_self);
+    priv = HILDON_INSERT_OBJECT_DIALOG_GET_PRIVATE(dlg);
+
+    gtk_key_snooper_remove(priv->keysnooper);
+
+    if (G_OBJECT_CLASS(parent_class)->finalize)
+        G_OBJECT_CLASS(parent_class)->finalize(obj_self);
+}
+
+
+static void
+hildon_insert_object_dialog_init(HildonInsertObjectDialog * dialog)
+{
+
+    GnomeVFSResult result;
+    gchar *dir_path = "";
+    GnomeVFSFileInfo *file = gnome_vfs_file_info_new();
+    GList *mimelist = NULL;
+    GtkTreeModel *combo_tree = NULL;
+    GtkTreeIter combo_iter;
+    gboolean valid = FALSE;
+
+
+    dialog->priv = HILDON_INSERT_OBJECT_DIALOG_GET_PRIVATE(dialog);
+    gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
+
+    gtk_window_set_title(GTK_WINDOW(dialog), _("ckdg_ti_insert_insert_objec"));
+
+    dialog->priv->group =
+        GTK_SIZE_GROUP(gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL));
+
+    dialog->priv->insertBtn =
+        GTK_BUTTON(gtk_dialog_add_button(GTK_DIALOG(dialog),
+                                         _("ckdg_bd_insert_new"),
+                                         GTK_RESPONSE_OK));
+
+    dialog->priv->existingBtn =
+        GTK_BUTTON(gtk_dialog_add_button
+                   (GTK_DIALOG(dialog), _("ckdg_bd_insert_existing"),
+                    HILDON_RESPONSE_INSERT_EXISTING));
+
+    dialog->priv->cancelBtn =
+        GTK_BUTTON(gtk_dialog_add_button(GTK_DIALOG(dialog),
+                                         _("ckdg_bd_insert_cancel"),
+                                         GTK_RESPONSE_CANCEL));
+
+    dialog->priv->label = GTK_LABEL(gtk_label_new(NULL));
+    dialog->priv->locationCap =
+        HILDON_CAPTION(hildon_caption_new(dialog->priv->group,
+                                          _("Location"),
+                                          GTK_WIDGET(dialog->priv->label),
+                                          NULL, HILDON_CAPTION_OPTIONAL));
+    gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),
+                       GTK_WIDGET(dialog->priv->locationCap), FALSE, FALSE,
+                       0);
+
+    dialog->priv->entry = GTK_ENTRY(gtk_entry_new());
+    dialog->priv->entryCap =
+        HILDON_CAPTION(hildon_caption_new(dialog->priv->group,
+                                          _("Name"),
+                                          GTK_WIDGET(dialog->priv->entry),
+                                          NULL, HILDON_CAPTION_OPTIONAL));
+
+    gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),
+                       GTK_WIDGET(dialog->priv->entryCap), FALSE, FALSE,
+                       0);
+
+    dialog->priv->combo = GTK_COMBO_BOX(gtk_combo_box_new_text());
+
+    dialog->priv->comboCap =
+        HILDON_CAPTION(hildon_caption_new(dialog->priv->group,
+                                          _("Mime type"),
+                                          GTK_WIDGET(dialog->priv->combo),
+                                          NULL, HILDON_CAPTION_OPTIONAL));
+
+    gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),
+                       GTK_WIDGET(dialog->priv->comboCap), FALSE, FALSE,
+                       0);
+
+    dialog->priv->mimetype = (char *) GNOME_VFS_MIME_TYPE_UNKNOWN;
+
+    /* Initialize gnome-vfs */
+    if (gnome_vfs_initialized() == FALSE) {
+        gtk_quit_add(RUN_AT_TERMINATION, hildon_insert_object_foo, NULL);
+
+        if (gnome_vfs_init() == FALSE) {
+            g_error("GnomeVFS can not be run");
+            return;
+        } else
+            g_message("GnomeVFS init!");
+    } else
+        g_message("GnomeVFS initialized!");
+
+
+    /* Read registered mime types into combobox */
+    mimelist = gnome_vfs_get_registered_mime_types();
+
+    while (mimelist) {
+        if (gnome_vfs_mime_get_description((char *) (mimelist->data)) !=
+            NULL)
+            gtk_combo_box_append_text
+                (dialog->priv->combo,
+                 gnome_vfs_mime_get_description
+                     ((char *) (mimelist->data)));
+        else
+            gtk_combo_box_append_text(dialog->priv->combo,
+                                      (char *) (mimelist->data));
+
+        mimelist = mimelist->next;
+    }
+
+    gnome_vfs_mime_registered_mime_type_list_free(mimelist);
+
+    /* Read directory path into label and first file into entry */
+    /* dir_path = g_strconcat( (const char *)g_get_current_dir(),
+       PROJECT_TEMPLATE_DIR, NULL); */
+    dir_path = g_strconcat(g_getenv((const char *) "PWD"),
+                           PROJECT_TEMPLATE_DIR, NULL);
+
+    result = gnome_vfs_directory_open(&(dialog->priv->dir), dir_path,
+                                      GNOME_VFS_FILE_INFO_DEFAULT |
+                                      GNOME_VFS_FILE_INFO_GET_MIME_TYPE);
+    if (result != GNOME_VFS_OK) {
+        g_warning("Could not read project templates directory\n");
+        gtk_label_set_label(dialog->priv->label,
+                            "Could not read project templates directory");
+        return;
+    } else {
+        gtk_label_set_label(dialog->priv->label, (gchar *) dir_path);
+
+        while (gnome_vfs_directory_read_next(dialog->priv->dir, file) ==
+               GNOME_VFS_OK) {
+            if (file->name != NULL
+                && file->type == GNOME_VFS_FILE_TYPE_REGULAR) {
+                gtk_entry_set_text(dialog->priv->entry,
+                                   (gchar *) file->name);
+
+                combo_tree = gtk_combo_box_get_model(dialog->priv->combo);
+                valid =
+                    gtk_tree_model_get_iter_first(combo_tree, &combo_iter);
+
+                while (valid) {
+                    gchar *str_data;
+
+                    gtk_tree_model_get(combo_tree, &combo_iter, 0,
+                                       &str_data, -1);
+
+                    if (strcmp(str_data,
+                               gnome_vfs_mime_get_description
+                               ((char *) file->mime_type)) == 0) {
+                        dialog->priv->mimetype = (char *) file->mime_type;
+                        gtk_combo_box_set_active_iter(dialog->priv->combo,
+                                                      &combo_iter);
+                        g_free(str_data);
+                        break;
+                    }
+                    g_free(str_data);
+                    valid =
+                        gtk_tree_model_iter_next(combo_tree, &combo_iter);
+                }
+
+                break;
+            }
+
+        }
+    }
+
+
+    if (gnome_vfs_directory_close(dialog->priv->dir) != GNOME_VFS_OK)
+        g_warning("Could not close the project templates directory\n");
+    else
+        g_message("Gnome VFS dir closed \n");
+
+    g_free(dir_path);
+
+    dialog->priv->keysnooper =
+        (guint) (gtk_key_snooper_install
+                 ((GtkKeySnoopFunc)
+                  (hildon_insert_object_dialog_key_snooper),
+                  GTK_WIDGET(dialog)));
+
+    gtk_window_resize(GTK_WINDOW(dialog),
+                      HILDON_INSERT_OBJECT_DIALOG_WIDTH,
+                      HILDON_INSERT_OBJECT_DIALOG_HEIGHT);
+
+    gtk_widget_show_all(GTK_DIALOG(dialog)->vbox);
+    gtk_widget_show_all(GTK_DIALOG(dialog)->action_area);
+
+    gnome_vfs_file_info_unref(file);
+
+}
+
+static gint hildon_insert_object_dialog_key_snooper(GtkWidget * gadget,
+                                                    GdkEventKey * event,
+                                                    GtkWidget * widget)
+{
+    if (event->type == GDK_KEY_RELEASE) {
+        switch (event->keyval) {
+        case GDK_I:
+        case GDK_i:
+            gtk_dialog_response(GTK_DIALOG(widget),
+                                HILDON_RESPONSE_INSERT_EXISTING);
+            break;
+            /* case GDK_C: case GDK_c: gtk_dialog_response(
+               GTK_DIALOG(widget), GTK_RESPONSE_CANCEL ); break; */
+        }
+    }
+    return FALSE;
+}
+
+
+/* Public functions */
+GType hildon_insert_object_dialog_get_type(void)
+{
+    static GType dialog_type = 0;
+
+    if (!dialog_type) {
+        static const GTypeInfo dialog_info = {
+            sizeof(HildonInsertObjectDialogClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_insert_object_dialog_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonInsertObjectDialog),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_insert_object_dialog_init
+        };
+
+        dialog_type = g_type_register_static(GTK_TYPE_DIALOG,
+                                             "HildonInsertObjectDialog",
+                                             &dialog_info, 0);
+    }
+    return dialog_type;
+
+}
+
+/**
+ * hildon_insert_object_dialog_new:
+ * @parent: the parent window of the dialog.
+ *
+ * Creates a new #HildonInsertObjectDialog widget.
+ *
+ * Return value: the newly created #HildonInsertObjectDialog
+ */
+GtkWidget *hildon_insert_object_dialog_new(GtkWindow * parent)
+{
+    GtkWidget *self = g_object_new(HILDON_TYPE_INSERT_OBJECT_DIALOG, NULL);
+
+    if (parent)
+        gtk_window_set_transient_for(GTK_WINDOW(self), parent);
+
+    return GTK_WIDGET(self);
+}
+
+/**
+ * hildon_insert_object_dialog_get_name:
+ * @dialog: the dialog.
+ *
+ * Gets the text in name field.
+ *
+ * Return value: a pointer to the name string.
+ */
+const gchar *hildon_insert_object_dialog_get_name(HildonInsertObjectDialog
+                                                  * dialog)
+{
+
+    g_return_val_if_fail(HILDON_IS_INSERT_OBJECT_DIALOG(dialog), NULL);
+
+    return gtk_entry_get_text(dialog->priv->entry);
+}
+
+/**
+ * hildon_insert_object_dialog_get_mime_type:
+ * @dialog: the dialog.
+ *
+ * Gets the mime type selected in the combobox.
+ *
+ * Return value: a pointer to the mime type string.
+ */
+const gchar
+    *hildon_insert_object_dialog_get_mime_type(HildonInsertObjectDialog *
+                                               dialog)
+{
+    /* GtkTreeIter iter; gchar *return_string; GtkTreeModel *tree_model;
+
+       tree_model = gtk_combo_box_get_model(dialog->priv->combo);
+
+       if(gtk_combo_box_get_active_iter(dialog->priv->combo,&iter)){
+       gtk_tree_model_get (tree_model, &iter, 0, &return_string, -1);
+       return return_string; } else { return NULL; } */
+
+
+    return dialog->priv->mimetype;
+}
diff --git a/hildon-widgets/hildon-insert-object-dialog.h b/hildon-widgets/hildon-insert-object-dialog.h
new file mode 100644 (file)
index 0000000..5fa5b6d
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __HILDON_INSERT_OBJECT_DIALOG_H__
+#define __HILDON_INSERT_OBJECT_DIALOG_H__
+
+#include <gtk/gtkdialog.h>
+
+/*
+ * Headers for GnomeVFS used for mime types
+ *
+ */
+#include <libgnomevfs/gnome-vfs.h>
+#include <libgnomevfs/gnome-vfs-init.h>
+#include <libgnomevfs/gnome-vfs-ops.h>
+#include <libgnomevfs/gnome-vfs-mime-handlers.h>
+#include <libgnomevfs/gnome-vfs-mime.h>
+#include <libgnomevfs/gnome-vfs-utils.h>
+#include <libgnomevfs/gnome-vfs-mime-info.h>
+
+#define HILDON_RESPONSE_INSERT_EXISTING 12345
+
+
+G_BEGIN_DECLS
+#define HILDON_TYPE_INSERT_OBJECT_DIALOG \
+  ( hildon_insert_object_dialog_get_type() )
+#define HILDON_INSERT_OBJECT_DIALOG(obj) \
+  (GTK_CHECK_CAST (obj, HILDON_TYPE_INSERT_OBJECT_DIALOG,\
+   HildonInsertObjectDialog))
+#define HILDON_INSERT_OBJECT_DIALOG_CLASS(klass) \
+  (GTK_CHECK_CLASS_CAST ((klass), HILDON_TYPE_INSERT_OBJECT_DIALOG, \
+  HildonInsertObjectDialogClass))
+#define HILDON_IS_INSERT_OBJECT_DIALOG(obj) \
+  (GTK_CHECK_TYPE (obj, HILDON_TYPE_INSERT_OBJECT_DIALOG))
+#define HILDON_IS_INSERT_OBJECT_DIALOG_CLASS(klass) \
+  (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_INSERT_OBJECT_DIALOG))
+typedef struct _HildonInsertObjectDialog HildonInsertObjectDialog;
+typedef struct _HildonInsertObjectDialogClass
+    HildonInsertObjectDialogClass;
+
+/**
+ * HildonInsertObjectDialogPrivate:
+ *
+ * This structure contains just private data and should not be
+ * accessed directly.
+ */
+typedef struct _HildonInsertObjectDialogPrivate
+    HildonInsertObjectDialogPrivate;
+
+struct _HildonInsertObjectDialog {
+    GtkDialog parent;
+    HildonInsertObjectDialogPrivate *priv;
+};
+
+struct _HildonInsertObjectDialogClass {
+    GtkDialogClass parent_class;
+};
+
+GType hildon_insert_object_dialog_get_type(void);
+
+GtkWidget *hildon_insert_object_dialog_new(GtkWindow * parent);
+
+/* Use return value of gtk_dialog_run to decide
+   which one of the following to call */
+const gchar *hildon_insert_object_dialog_get_name(HildonInsertObjectDialog
+                                                  * dialog);
+const gchar
+    *hildon_insert_object_dialog_get_mime_type(HildonInsertObjectDialog *
+                                               dialog);
+
+G_END_DECLS
+#endif
diff --git a/hildon-widgets/hildon-name-password-dialog.c b/hildon-widgets/hildon-name-password-dialog.c
new file mode 100644 (file)
index 0000000..39b4bbb
--- /dev/null
@@ -0,0 +1,322 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/* HILDON DOC
+ * @shortdesc: NamePasswordDialog is a dialog for getting the user name
+ * and password.
+ * @longdesc: NamePasswordDialog is a simple dummy dialog for getting
+ * name&password from the user.
+ */
+
+#include <glib.h>
+#include <gtk/gtk.h>
+#include <errno.h>
+#include <string.h>
+#include <strings.h>
+#include <unistd.h>
+#include <stdio.h>
+
+#include <hildon-name-password-dialog.h>
+#include <hildon-widgets/hildon-caption.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <libintl.h>
+#define _(String) dgettext(PACKAGE, String)
+
+static GtkDialogClass *parent_class;
+
+typedef struct _HildonNamePasswordDialogPrivate
+    HildonNamePasswordDialogPrivate;
+
+struct _HildonNamePasswordDialogPrivate {
+    GtkButton *okButton;
+    GtkButton *closeButton;
+
+    HildonCaption *nameEntry;
+    HildonCaption *passwordEntry;
+};
+
+#define HILDON_NAME_PASSWORD_DIALOG_GET_PRIVATE(o)  \
+   (G_TYPE_INSTANCE_GET_PRIVATE ((o), HILDON_TYPE_NAME_PASSWORD_DIALOG,\
+    HildonNamePasswordDialogPrivate))
+
+enum{
+    PROP_NONE = 0,
+    PROP_NAME,
+    PROP_PASSWORD
+};
+
+static void
+hildon_name_password_dialog_class_init(HildonNamePasswordDialogClass *class);
+static void hildon_name_password_dialog_init(HildonNamePasswordDialog *widget);
+static void hildon_name_password_dialog_set_property(GObject * object,
+                                                     guint prop_id,
+                                                     const GValue * value, 
+                                                    GParamSpec * pspec);
+static void hildon_name_password_dialog_get_property(GObject * object,
+                                                     guint prop_id,
+                                                     GValue * value, 
+                                                    GParamSpec * pspec);
+static void
+hildon_name_password_dialog_set_property(GObject * object,
+                                         guint prop_id,
+                                         const GValue * value, GParamSpec * pspec)
+{
+    HildonNamePasswordDialog *dialog = HILDON_NAME_PASSWORD_DIALOG(object);
+    HildonNamePasswordDialogPrivate *priv;
+
+    priv = HILDON_NAME_PASSWORD_DIALOG_GET_PRIVATE(dialog);
+    
+    switch (prop_id) {
+    case PROP_NAME:
+        gtk_entry_set_text(GTK_ENTRY(
+                          hildon_caption_get_control(priv->nameEntry)), 
+                          g_value_get_string(value));
+       break;
+    case PROP_PASSWORD:
+        gtk_entry_set_text(GTK_ENTRY(
+                      hildon_caption_get_control(priv->passwordEntry)),
+                          g_value_get_string(value));
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+        break;
+    }
+}
+
+static void
+hildon_name_password_dialog_get_property(GObject * object,
+                                         guint prop_id,
+                                         GValue * value, GParamSpec * pspec)
+{
+    HildonNamePasswordDialog *dialog = HILDON_NAME_PASSWORD_DIALOG(object);
+    HildonNamePasswordDialogPrivate *priv;
+    const gchar *string;
+
+    priv = HILDON_NAME_PASSWORD_DIALOG_GET_PRIVATE(dialog);
+    
+    switch (prop_id) {
+    case PROP_NAME:
+        string = gtk_entry_get_text(GTK_ENTRY(
+               hildon_caption_get_control(priv->nameEntry)));
+       g_value_set_string(value, string);
+       break;
+    case PROP_PASSWORD:
+        string = gtk_entry_get_text(GTK_ENTRY(
+               hildon_caption_get_control(priv->passwordEntry)));
+        g_value_set_string(value, string);
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+        break;
+    }
+}
+static void
+hildon_name_password_dialog_class_init(HildonNamePasswordDialogClass *class)
+{
+    GParamSpec *pspec1, *pspec2;
+  
+    GObjectClass *object_class = G_OBJECT_CLASS(class);
+    
+    parent_class = g_type_class_peek_parent(class);
+    
+    object_class->set_property = hildon_name_password_dialog_set_property;
+    object_class->get_property = hildon_name_password_dialog_get_property;
+    
+    pspec1 = g_param_spec_string("name",
+                               "Name content",
+                               "Set content to dialog",
+                               "DEFAULT",
+                               G_PARAM_READWRITE);
+    
+    g_object_class_install_property(object_class,
+                                    PROP_NAME, pspec1);
+    
+    pspec2 = g_param_spec_string("password",
+                               "Pasword content",
+                               "Set content to dialog",
+                               "DEFAULT",
+                               G_PARAM_READWRITE);
+    
+    g_object_class_install_property(object_class,
+                                    PROP_PASSWORD, pspec2);
+    g_type_class_add_private(class,
+                             sizeof(HildonNamePasswordDialogPrivate));
+}
+
+static void
+hildon_name_password_dialog_init(HildonNamePasswordDialog * dialog)
+{
+    HildonNamePasswordDialogPrivate *priv =
+        HILDON_NAME_PASSWORD_DIALOG_GET_PRIVATE(dialog);
+    GtkSizeGroup *group =
+        GTK_SIZE_GROUP(gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL));
+    GtkWidget *control;
+
+    gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
+    gtk_window_set_title(GTK_WINDOW(dialog), _("frw_ti_get_user_name_and_pwd"));
+
+    priv->okButton =
+      GTK_BUTTON(gtk_dialog_add_button(GTK_DIALOG(dialog),
+                                       _("frw_bd_get_user_name_and_pwd_ok"),
+                                       GTK_RESPONSE_OK));
+    priv->closeButton =
+      GTK_BUTTON(gtk_dialog_add_button(GTK_DIALOG(dialog),
+                                       _("frw_bd_get_user_name_and_pwd_cancel"),
+                                       GTK_RESPONSE_CANCEL));
+
+    control = gtk_entry_new();
+    gtk_widget_show_all(control);
+    priv->nameEntry = HILDON_CAPTION(hildon_caption_new(group,
+                       _("frw_ti_get_user_name_and_pwd_enter_user_name"),
+                                                        control, NULL,
+                       HILDON_CAPTION_OPTIONAL));
+
+    control = gtk_entry_new();
+    gtk_widget_show_all(control);
+    gtk_entry_set_visibility(GTK_ENTRY(control), FALSE);
+    priv->passwordEntry =
+      HILDON_CAPTION(hildon_caption_new(group,
+                                        _("frw_ti_get_user_name_and_pwd_enter_pwd"),
+                                        control,
+                                        NULL,
+                                        HILDON_CAPTION_OPTIONAL));
+
+    gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), 
+                       GTK_WIDGET(priv->nameEntry), FALSE, FALSE, 0);
+    gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),
+                       GTK_WIDGET(priv->passwordEntry), FALSE, FALSE, 0);
+
+    gtk_widget_grab_focus(GTK_WIDGET(priv->nameEntry));
+    gtk_widget_show_all(GTK_DIALOG(dialog)->vbox);
+    gtk_widget_show_all(GTK_DIALOG(dialog)->action_area);
+    gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
+}
+
+GType hildon_name_password_dialog_get_type(void)
+{
+    static GType dialog_type = 0;
+
+    if (!dialog_type) {
+        static const GTypeInfo dialog_info = {
+            sizeof(HildonNamePasswordDialogClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_name_password_dialog_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonNamePasswordDialog),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_name_password_dialog_init
+        };
+        dialog_type = g_type_register_static(GTK_TYPE_DIALOG,
+                                             "HildonNamePasswordDialog",
+                                             &dialog_info, 0);
+    }
+
+    return dialog_type;
+}
+
+/**
+ * hildon_name_password_dialog_new:
+ * @parent: the parent window of the dialog.
+ *
+ * Creates a new #HildonNamePasswordDialog widget with Ok and Close
+ * buttons.
+ *
+ * Return value: the newly created #HildonNamePasswordDialog
+ */
+GtkWidget *hildon_name_password_dialog_new(GtkWindow * parent)
+{
+    GtkWidget *self = g_object_new(HILDON_TYPE_NAME_PASSWORD_DIALOG,NULL);
+
+    if (parent)
+        gtk_window_set_transient_for(GTK_WINDOW(self), parent);
+    return self;
+}
+
+/**
+ * hildon_name_password_dialog_new_with_default:
+ * @parent: the parent window of the dialog.
+ * @name: default name, nul-terminated string, if you want
+ * to leave it unset, pass a NULL pointer.
+ * @password: default password, nul-terminated string, 
+ * if you want to leave it unset, pass a NULL pointer.
+ * 
+ * Same as #hildon_name_password_dialog_new, but with a 
+ * default name and password.
+ *
+ * Return value: the newly created #HildonNamePasswordDialog
+ */
+GtkWidget *hildon_name_password_dialog_new_with_default
+                                          (GtkWindow * parent,
+                                          gchar *name,
+                                          gchar *password)
+{
+    GtkWidget *self = hildon_name_password_dialog_new(parent);
+
+    if(name != NULL)
+      g_object_set(G_OBJECT(self), "name", name, NULL);
+    if(password != NULL)
+      g_object_set(G_OBJECT(self), "password", password, NULL);
+    
+    return self;
+}
+
+/**
+ * hildon_name_password_dialog_get_name:
+ * @dialog: the dialog.
+ *
+ * Gets the text that's in the name entry.
+ *
+ * Return value: a pointer to the name string.
+ */
+const gchar *hildon_name_password_dialog_get_name(HildonNamePasswordDialog
+                                                  * dialog)
+{
+    HildonNamePasswordDialogPrivate *priv =
+        HILDON_NAME_PASSWORD_DIALOG_GET_PRIVATE(dialog);
+    return gtk_entry_get_text(GTK_ENTRY(
+                              hildon_caption_get_control(priv->nameEntry)));
+}
+
+/**
+ * hildon_name_password_dialog_get_password:
+ * @dialog: the dialog.
+ * 
+ * Gets the text that's in the password entry.
+ * 
+ * Return value: a pointer to the password string.
+ */
+const gchar *hildon_name_password_dialog_get_password(HildonNamePasswordDialog
+                                                      * dialog)
+{
+    HildonNamePasswordDialogPrivate *priv =
+        HILDON_NAME_PASSWORD_DIALOG_GET_PRIVATE(dialog);
+    return gtk_entry_get_text(GTK_ENTRY(hildon_caption_get_control(
+                              priv->passwordEntry)));
+}
diff --git a/hildon-widgets/hildon-name-password-dialog.h b/hildon-widgets/hildon-name-password-dialog.h
new file mode 100644 (file)
index 0000000..3fd8342
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __HILDON_NAME_PASSWORD_DIALOG_H__
+#define __HILDON_NAME_PASSWORD_DIALOG_H__
+
+#include <gtk/gtkdialog.h>
+
+G_BEGIN_DECLS
+#define HILDON_TYPE_NAME_PASSWORD_DIALOG \
+  ( hildon_name_password_dialog_get_type() )
+#define HILDON_NAME_PASSWORD_DIALOG(obj) \
+  (GTK_CHECK_CAST (obj, HILDON_TYPE_NAME_PASSWORD_DIALOG,\
+   HildonNamePasswordDialog))
+#define HILDON_NAME_PASSWORD_DIALOG_CLASS(klass) \
+  (GTK_CHECK_CLASS_CAST ((klass), HILDON_TYPE_NAME_PASSWORD_DIALOG, \
+  HildonNamePasswordDialogClass))
+#define HILDON_IS_NAME_PASSWORD_DIALOG(obj) \
+  (GTK_CHECK_TYPE (obj, HILDON_TYPE_NAME_PASSWORD_DIALOG))
+#define HILDON_IS_NAME_PASSWORD_DIALOG_CLASS(klass) \
+  (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_NAME_PASSWORD_DIALOG))
+  
+typedef struct _HildonNamePasswordDialog HildonNamePasswordDialog;
+typedef struct _HildonNamePasswordDialogClass
+    HildonNamePasswordDialogClass;
+
+struct _HildonNamePasswordDialog {
+    GtkDialog parent;
+};
+
+struct _HildonNamePasswordDialogClass {
+    GtkDialogClass parent_class;
+};
+
+GType hildon_name_password_dialog_get_type(void);
+
+GtkWidget *hildon_name_password_dialog_new(GtkWindow * parent);
+
+GtkWidget *hildon_name_password_dialog_new_with_default(GtkWindow *parent,
+                                                       gchar *name,
+                                                       gchar *pass);
+
+const gchar *hildon_name_password_dialog_get_name(HildonNamePasswordDialog 
+                                                  * dialog);
+                                                  
+const gchar *hildon_name_password_dialog_get_password(HildonNamePasswordDialog
+                                                      * dialog);
+
+G_END_DECLS
+#endif
diff --git a/hildon-widgets/hildon-note.c b/hildon-widgets/hildon-note.c
new file mode 100644 (file)
index 0000000..2fcbece
--- /dev/null
@@ -0,0 +1,1007 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/* 
+ * @file hildon-note.c
+ *
+ * This file contains API for conformation, information
+ * and cancel notes. 
+ *
+ * 9/2004 Removed animation type of cancel note as separate task.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "hildon-note.h"
+#include <gtk/gtklabel.h>
+#include <gtk/gtkimage.h>
+#include <gtk/gtkhbox.h>
+#include <gtk/gtkalignment.h>
+#include <gtk/gtkvbox.h>
+#include <gtk/gtkbutton.h>
+#include <libintl.h>
+#include <hildon-widgets/hildon-defines.h>
+
+/* For now, we use D-BUS directly to request sound playback. This
+   should later be replaced with calls to a wrapper API. */
+
+#define DBUS_API_SUBJECT_TO_CHANGE
+#include <dbus/dbus.h>
+
+/* Can these be included from somewhere? */
+
+#define OSSO_MEDIA_SERVICE "com.nokia.osso_media_server"
+#define OSSO_MEDIA_PATH "/com/nokia/osso_media_server"
+#define OSSO_MEDIA_INTERFACE "com.nokia.osso_media_server.sound"
+#define OSSO_MEDIA_PLAY_METHOD "play_sound"
+
+#define CONFIRMATION_SOUND_PATH "file:///usr/share/sounds/"\
+                                "ui-confirmation_note.wav"
+#define INFORMATION_SOUND_PATH "file:///usr/share/sounds/"\
+                               "ui-information_note.wav"
+
+#define HILDON_NOTE_CONFIRMATION_STOCK        "hildon-note-confirmation"
+#define HILDON_NOTE_INFORMATION_STOCK         "hildon-note-info"
+#define HILDON_NOTE_DELETE_CONFIRMATION_STOCK \
+        "hildon-note-delete-confirmation"
+
+#define _(String) dgettext(PACKAGE, String)
+
+static GtkDialogClass *parent_class;
+
+#define HILDON_NOTE_TITLE  _("note")
+
+#define HILDON_NOTE_GET_PRIVATE(obj)\
+ (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
+  HILDON_TYPE_NOTE, HildonNotePrivate));
+
+typedef struct _HildonNotePrivate HildonNotePrivate;
+
+static void hildon_note_class_init(HildonNoteClass * class);
+static void hildon_note_init(HildonNote * dialog);
+
+static void hildon_note_create_form(GtkDialog * dialog, GtkWidget * item,
+                                    gboolean IsHorizontal);
+static void hildon_note_finalize(GObject * obj_self);
+static void hildon_note_map_event(GtkWidget * widget);
+static GObject *hildon_note_constructor(GType type,
+                                        guint n_construct_properties,
+                                        GObjectConstructParam
+                                        * construct_properties);
+static void hildon_note_set_property(GObject * object,
+                                     guint prop_id,
+                                     const GValue * value,
+                                     GParamSpec * pspec);
+static void hildon_note_get_property(GObject * object,
+                                     guint prop_id,
+                                     GValue * value, GParamSpec * pspec);
+
+/* common measurement */
+const int _HILDON_NOTE_BORDER_WIDTH = 20;       /* for top and bottom
+                                                   border is height, for
+                                                   left and right is
+                                                   width */
+const int _HILDON_NOTE_TEXT_HEIGHT = 26;
+
+/* height, width for confirmation notes and information notes
+   button height 47, text height =24?
+*/
+const int _HILDON_NOTE_CONFIRMATION_TEXT_MIN_WIDTH = 180; /*270-20-20-50*/
+const int _HILDON_NOTE_CONFIRMATION_TEXT_MAX_WIDTH = 370; /*460-20-20-50*/
+const int _HILDON_NOTE_CONFIRMATION_NOTATION_SIDE = 50;
+
+/* height, width for cancel notes with progress bar
+ */
+const int _HILDON_NOTE_CANCEL_PROGRESS_HEIGHT = 153; /* 6+24+26+30+20+47 */
+const int _HILDON_NOTE_CANCEL_PROGRESS_WIDTH = 215;
+const int _HILDON_NOTE_PROGRESS_HEIGHT = 30;
+const int _HILDON_NOTE_PROGRESS_WIDTH = 215;
+
+/* height, width for cancel notes with animation
+ */
+const int _HILDON_NOTE_CANCEL_ANIME_HEIGHT = 177; /* 6+24+26+54+20+47 */
+ /* This is more than in the specifications -> the specification width is 
+    not enough for the button.. (nor the text) */
+const int _HILDON_NOTE_CANCEL_ANIME_WIDTH = 181;
+const int _HILDON_NOTE_ANIME_HEIGHT = 54;
+const int _HILDON_NOTE_ANIME_WIDTH = 26;
+
+struct _HildonNotePrivate {
+    GtkWidget *okButton;
+    GtkWidget *cancelButton;
+    GtkWidget *label;
+
+    gint note_n;
+    GtkWidget *progressbar;
+    gchar *icon;
+
+    gchar *original_description;
+};
+
+enum {
+    PROP_NONE = 0,
+    PROP_HILDON_NOTE_TYPE,
+    PROP_HILDON_NOTE_DESCRIPTION,
+    PROP_HILDON_NOTE_ICON,
+    PROP_HILDON_NOTE_PROGRESSBAR
+};
+
+/* This function is just a modified version of two_lines_truncate
+ * in gtk-infoprint.c */
+static void
+hildon_note_five_line_truncate(const HildonNote * note, const gchar * text)
+{
+    gchar *result = NULL;
+    PangoLayout *layout;
+    PangoContext *context;
+    gchar *str = NULL;
+    int max_width = _HILDON_NOTE_CONFIRMATION_TEXT_MAX_WIDTH;
+    HildonNotePrivate *priv;
+
+    priv = HILDON_NOTE_GET_PRIVATE(note);
+
+    if (priv->original_description != NULL)
+        g_free(priv->original_description);
+
+    priv->original_description = g_strdup(text);
+
+    if (text == NULL) {
+        str = g_strdup("");
+    } else {
+        str = g_strdup(text);
+    }
+
+    context = gtk_widget_get_pango_context(GTK_WIDGET(note));
+
+    {
+        gchar *lines[5] = { NULL, NULL, NULL, NULL, NULL };
+        guint current_line = 0;
+        guint last_line;
+
+        layout = pango_layout_new(context);
+        pango_layout_set_text(layout, str, -1);
+        pango_layout_set_width(layout, max_width * PANGO_SCALE);
+        pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);
+        last_line = MIN(4, pango_layout_get_line_count(layout) - 1);
+
+        for (current_line = 0;
+             current_line <= last_line;
+             current_line++) {
+            PangoLayoutLine *line = pango_layout_get_line(layout,
+                                                          current_line);
+
+            if (current_line == last_line)
+                lines[current_line] = g_strdup(str + line->start_index);
+            else
+                lines[current_line] = g_strndup(str + line->start_index,
+                                                line->length);
+
+            pango_layout_line_ref(line);
+            pango_layout_line_unref(line);
+        }
+
+        g_object_unref(layout);
+
+        layout = pango_layout_new(context);
+        pango_layout_set_text(layout, lines[last_line], -1);
+
+        {
+            PangoLayoutLine *line;
+            gint index = 0;
+
+            if (pango_layout_get_line_count(layout) > 5) {
+                gchar *templine = NULL;
+
+                line = pango_layout_get_line(layout, 0);
+                templine = g_strndup(lines[last_line], line->length);
+                g_free(lines[last_line]);
+                lines[last_line] = g_strconcat(templine, "\342\200\246", NULL);
+                g_free(templine);
+            }
+
+            if (pango_layout_xy_to_index(layout,
+                                         max_width * PANGO_SCALE, 0,
+                                         &index, NULL) == TRUE) {
+                gint ellipsiswidth;
+                gchar *tempresult;
+                PangoLayout *ellipsis = pango_layout_new(context);
+
+                pango_layout_set_text(ellipsis, "\342\200\246", -1);
+                pango_layout_get_size(ellipsis, &ellipsiswidth, NULL);
+                pango_layout_xy_to_index(layout,
+                                         max_width * PANGO_SCALE -
+                                         ellipsiswidth, 0, &index,
+                                         NULL);
+                g_object_unref(G_OBJECT(ellipsis));
+                tempresult = g_strndup(lines[last_line], index);
+                lines[last_line] = g_strconcat(tempresult,
+                                               "\342\200\246",
+                                               NULL);
+                g_free(tempresult);
+            }
+        }
+
+        for (current_line = 0; current_line <= last_line; current_line++)
+            g_strchomp(lines[current_line]);
+
+        result = g_strconcat(lines[0], "\n",
+                             lines[1], "\n",
+                             lines[2], "\n",
+                             lines[3], "\n",
+                             lines[4], "\n", NULL);
+
+        for (current_line = 0; current_line <= last_line; current_line++)
+            g_free(lines[current_line]);
+
+        g_object_unref(layout);
+
+    }
+
+    if (result == NULL)
+        result = g_strdup(str);
+
+    gtk_label_set_text(GTK_LABEL(priv->label), result);
+
+    g_free(str);
+    g_free(result);
+
+}
+
+static void
+hildon_note_one_line_truncate(const HildonNote * note, const gchar * text)
+{
+    PangoLayout *layout;
+    PangoContext *context;
+    gchar *str = NULL;
+    int max_width = _HILDON_NOTE_CONFIRMATION_TEXT_MAX_WIDTH;
+    HildonNotePrivate *priv;
+    PangoLayoutLine *line;
+    gint index = 0;
+
+    priv = HILDON_NOTE_GET_PRIVATE(note);
+
+    if (priv->original_description != NULL)
+        g_free(priv->original_description);
+
+    priv->original_description = g_strdup(text);
+
+    str = g_strdup(text == NULL ? "" : text);
+    context = gtk_widget_get_pango_context(GTK_WIDGET(note));
+
+    layout = pango_layout_new(context);
+    pango_layout_set_text(layout, str, -1);
+    pango_layout_set_width(layout, max_width * PANGO_SCALE);
+    pango_layout_set_wrap(layout, PANGO_WRAP_WORD_CHAR);
+
+    if (pango_layout_get_line_count(layout) > 1) {
+        gchar *templine = NULL;
+
+        line = pango_layout_get_line(layout, 0);
+        templine = g_strndup(str, line->length);
+        g_free(str);
+        str = g_strconcat(templine, "\342\200\246", NULL);
+        g_free(templine);
+    }
+
+    if (pango_layout_xy_to_index(layout,
+                                 max_width * PANGO_SCALE, 0,
+                                 &index, NULL) == TRUE) {
+        gint ellipsiswidth;
+        gchar *tempresult;
+        PangoLayout *ellipsis = pango_layout_new(context);
+
+        pango_layout_set_text(ellipsis, "\342\200\246", -1);
+        pango_layout_get_size(ellipsis, &ellipsiswidth, NULL);
+        pango_layout_xy_to_index(layout,
+                                 max_width * PANGO_SCALE -
+                                 ellipsiswidth, 0, &index,
+                                 NULL);
+        g_object_unref(G_OBJECT(ellipsis));
+        tempresult = g_strndup(str, index);
+        str = g_strconcat(tempresult,
+                          "\342\200\246",
+                          NULL);
+        g_free(tempresult);
+    }
+
+    g_object_unref(layout);
+    gtk_label_set_text(GTK_LABEL(priv->label), str);
+    g_free(str);
+}
+
+static void
+hildon_note_set_property(GObject * object,
+                         guint prop_id,
+                         const GValue * value, GParamSpec * pspec)
+{
+    HildonNote *note = HILDON_NOTE(object);
+    HildonNotePrivate *priv;
+
+    priv = HILDON_NOTE_GET_PRIVATE(note);
+
+    switch (prop_id) {
+    case PROP_HILDON_NOTE_TYPE:
+        priv->note_n = g_value_get_int(value);
+        break;
+    case PROP_HILDON_NOTE_DESCRIPTION:
+        if (priv->note_n == HILDON_NOTE_PROGRESSBAR_TYPE)
+            hildon_note_one_line_truncate(note, g_value_get_string(value));
+        else
+            hildon_note_five_line_truncate(note, g_value_get_string(value));
+        break;
+    case PROP_HILDON_NOTE_ICON:
+       if( priv->icon )
+           g_free(priv->icon);
+        priv->icon = g_value_dup_string(value);
+        break;
+    case PROP_HILDON_NOTE_PROGRESSBAR:
+        priv->progressbar = g_value_get_object(value);
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+        break;
+    }
+}
+
+static void
+hildon_note_get_property(GObject * object,
+                         guint prop_id, GValue * value, GParamSpec * pspec)
+{
+    HildonNote *note = HILDON_NOTE(object);
+    HildonNotePrivate *priv;
+
+    priv = HILDON_NOTE_GET_PRIVATE(note);
+
+    switch (prop_id) {
+    case PROP_HILDON_NOTE_TYPE:
+        g_value_set_int(value, g_value_get_int(value));
+        break;
+    case PROP_HILDON_NOTE_DESCRIPTION:
+        if (priv->original_description != NULL) {
+            g_value_set_string(value, priv->original_description);
+        } else {
+            g_value_set_string(value, "");
+        }
+        break;
+    case PROP_HILDON_NOTE_ICON:
+        g_value_set_string(value, priv->icon);
+        break;
+    case PROP_HILDON_NOTE_PROGRESSBAR:
+        g_value_set_object(value, priv->progressbar);
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+        break;
+    }
+}
+
+GType hildon_note_get_type()
+{
+    static GType dialog_type = 0;
+
+    if (!dialog_type) {
+        static const GTypeInfo dialog_info = {
+            sizeof(HildonNoteClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_note_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonNote),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_note_init
+        };
+
+        dialog_type = g_type_register_static(GTK_TYPE_DIALOG,
+                                             "HildonNote",
+                                             &dialog_info, 0);
+    }
+    return dialog_type;
+}
+
+static GObject *hildon_note_constructor(GType type,
+                                        guint n_construct_properties,
+                                        GObjectConstructParam *
+                                        construct_properties)
+{
+    GObject *dialog;
+    HildonNotePrivate *priv;
+    GtkWidget *item = NULL;
+    gboolean IsHorizontal = TRUE;
+
+
+    dialog = G_OBJECT_CLASS(parent_class)->constructor
+             (type, n_construct_properties, construct_properties);
+    priv = HILDON_NOTE_GET_PRIVATE(dialog);
+
+    if (priv->note_n == HILDON_NOTE_CONFIRMATION_TYPE ||
+        priv->note_n == HILDON_NOTE_CONFIRMATION_BUTTON_TYPE ||
+        priv->note_n == HILDON_NOTE_INFORMATION_THEME_TYPE ||
+        priv->note_n == HILDON_NOTE_INFORMATION_TYPE) {
+        if (priv->note_n == HILDON_NOTE_CONFIRMATION_TYPE) {
+            /* ok button clickable with mouse or whatever */
+            priv->okButton = 
+                gtk_dialog_add_button(GTK_DIALOG(dialog),
+                                      _("Ecdg_bd_confirmation_note_ok"),
+                                      GTK_RESPONSE_OK);
+            /* cancel button clickable with mouse or whatever */
+            priv->cancelButton =
+                gtk_dialog_add_button(GTK_DIALOG(dialog),
+                                      _("Ecdg_bd_confirmation_note_cancel"),
+                                      GTK_RESPONSE_CANCEL);
+
+        } else if (priv->note_n == HILDON_NOTE_INFORMATION_TYPE || 
+                  priv->note_n == HILDON_NOTE_INFORMATION_THEME_TYPE ) {
+            priv->okButton = NULL;
+            /* cancel button clickable with mouse or whatever */
+            priv->cancelButton =
+                gtk_dialog_add_button(GTK_DIALOG(dialog),
+                                      _("Ecdg_bd_information_note_ok"),
+                                      GTK_RESPONSE_CANCEL);
+        }
+
+        gtk_widget_realize(GTK_WIDGET(dialog));
+        gdk_window_set_decorations(GTK_WIDGET(dialog)->window,
+                                   GDK_DECOR_BORDER);
+
+        if ((priv->note_n == HILDON_NOTE_INFORMATION_TYPE || priv->note_n == HILDON_NOTE_INFORMATION_THEME_TYPE) && 
+           priv->icon) {
+            item = gtk_image_new_from_icon_name(priv->icon,
+                                            HILDON_ICON_SIZE_BIG_NOTE);
+       }
+       else {
+            if (priv->note_n == HILDON_NOTE_CONFIRMATION_TYPE ||
+                priv->note_n == HILDON_NOTE_CONFIRMATION_BUTTON_TYPE) {
+                    item = gtk_image_new_from_icon_name
+                        ("qgn_note_confirm", 
+                         HILDON_ICON_SIZE_50); 
+            } else {
+                    item =
+                        gtk_image_new_from_icon_name
+                        ("qgn_note_info", 
+                         HILDON_ICON_SIZE_50);
+            }
+        }
+
+    } else {
+        priv->cancelButton = 
+            gtk_dialog_add_button(GTK_DIALOG(dialog),
+                                  _("Ecdg_bd_cancel_note_cancel"),
+                                  GTK_RESPONSE_CANCEL);
+        IsHorizontal = FALSE;
+        priv->okButton = NULL;
+
+        item = priv->progressbar;
+
+        gtk_widget_realize(GTK_WIDGET(dialog));
+        gdk_window_set_decorations(GTK_WIDGET(dialog)->window,
+                                   GDK_DECOR_BORDER);
+    }
+
+    hildon_note_create_form(GTK_DIALOG(dialog), item, IsHorizontal);
+
+    return dialog;
+}
+
+static void hildon_note_class_init(HildonNoteClass * class)
+{
+    GObjectClass *object_class = G_OBJECT_CLASS(class);
+    GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(class);
+
+    /* set the global parent_class */
+    parent_class = g_type_class_peek_parent(class);
+
+    g_type_class_add_private(class, sizeof(HildonNotePrivate));
+
+    object_class->finalize = hildon_note_finalize;
+
+    widget_class->map = hildon_note_map_event;
+    object_class->set_property = hildon_note_set_property;
+    object_class->get_property = hildon_note_get_property;
+    object_class->constructor = hildon_note_constructor;
+
+    g_object_class_install_property(object_class,
+        PROP_HILDON_NOTE_TYPE,
+        g_param_spec_int("note_type",
+                         "note type",
+                         "Set type to dialog",
+                         0, 5, 5,
+                         G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
+
+    g_object_class_install_property(object_class,
+        PROP_HILDON_NOTE_DESCRIPTION,
+        g_param_spec_string("description",
+                            "note description",
+                            "Description for note",
+                            "",
+                            G_PARAM_READABLE | G_PARAM_WRITABLE));
+
+    g_object_class_install_property(object_class,
+        PROP_HILDON_NOTE_ICON,
+        g_param_spec_string("icon",
+                            "note icon",
+                            "Icon for note",
+                            "",
+                            G_PARAM_CONSTRUCT_ONLY
+                            | G_PARAM_READABLE
+                            | G_PARAM_WRITABLE));
+    g_object_class_install_property(object_class,
+        PROP_HILDON_NOTE_PROGRESSBAR,
+        g_param_spec_object("progressbar",
+                            "Progressbar widget",
+                            "The progressbar for note",
+                            GTK_TYPE_PROGRESS_BAR,
+                            G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
+}
+
+static void hildon_note_init(HildonNote * dialog)
+{
+    HildonNotePrivate *priv = HILDON_NOTE_GET_PRIVATE(dialog);
+
+    priv->label = gtk_label_new(NULL);
+    priv->original_description = NULL;
+    priv->icon = NULL;
+
+    gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
+    gtk_window_set_modal(GTK_WINDOW(dialog), TRUE);
+    gtk_window_set_title(GTK_WINDOW(dialog), HILDON_NOTE_TITLE);
+}
+
+static void hildon_note_map_event(GtkWidget * widget)
+{
+  DBusConnection *conn = NULL;
+  DBusMessage *msg = NULL;
+  DBusError err;
+  dbus_bool_t b;
+  HildonNotePrivate *priv = HILDON_NOTE_GET_PRIVATE(widget);
+
+  GTK_WIDGET_CLASS (parent_class)->map(widget);
+
+  /* Is the type of the note such that we will have to play a sound? */
+
+  if (priv->note_n != HILDON_NOTE_INFORMATION_TYPE &&
+      priv->note_n != HILDON_NOTE_INFORMATION_THEME_TYPE &&
+      priv->note_n != HILDON_NOTE_CONFIRMATION_TYPE &&
+      priv->note_n != HILDON_NOTE_CONFIRMATION_BUTTON_TYPE)
+    {
+      return;
+    }
+
+  dbus_error_init(&err);
+  conn = dbus_bus_get(DBUS_BUS_SESSION, &err);
+
+  if (conn == NULL)
+    {
+      dbus_error_free(&err);
+      return;
+    }
+
+  msg = dbus_message_new_method_call(OSSO_MEDIA_SERVICE, 
+                                    OSSO_MEDIA_PATH,
+                                    OSSO_MEDIA_INTERFACE, 
+                                    OSSO_MEDIA_PLAY_METHOD);
+  if (msg == NULL)
+    {
+      dbus_connection_unref(conn);
+      return;
+    }
+
+  dbus_message_set_auto_activation(msg, FALSE);
+  dbus_message_set_no_reply(msg, TRUE);
+
+  if (priv->note_n == HILDON_NOTE_INFORMATION_TYPE ||
+      priv->note_n == HILDON_NOTE_INFORMATION_THEME_TYPE)
+    {
+      dbus_message_append_args(msg, DBUS_TYPE_STRING, INFORMATION_SOUND_PATH,
+                              DBUS_TYPE_INT32, 1, DBUS_TYPE_INVALID);
+    }
+  else if (priv->note_n == HILDON_NOTE_CONFIRMATION_TYPE ||
+          priv->note_n ==  HILDON_NOTE_CONFIRMATION_BUTTON_TYPE)
+    {
+      dbus_message_append_args(msg, DBUS_TYPE_STRING,
+                              CONFIRMATION_SOUND_PATH,
+                              DBUS_TYPE_INT32, 1, DBUS_TYPE_INVALID);
+    }
+
+  b = dbus_connection_send(conn, msg, NULL);
+
+  if (!b)
+    {
+      dbus_message_unref(msg);
+      return;
+    }
+  dbus_connection_flush(conn);
+  dbus_message_unref(msg);
+  
+}
+
+static void hildon_note_finalize(GObject * obj_self)
+{
+    HildonNotePrivate *priv = HILDON_NOTE_GET_PRIVATE(obj_self);
+
+    if (G_OBJECT_CLASS(parent_class)->finalize)
+        G_OBJECT_CLASS(parent_class)->finalize(obj_self);
+
+    if(priv->icon)
+       g_free(priv->icon);
+
+    if (priv->original_description != NULL)
+        g_free(priv->original_description);
+}
+
+static void
+hildon_note_create_form(GtkDialog * dialog, GtkWidget * item,
+                        gboolean IsHorizontal)
+{
+    GtkWidget *box;
+    HildonNotePrivate *priv = HILDON_NOTE_GET_PRIVATE(dialog);
+
+    if (IsHorizontal) {
+        box = gtk_hbox_new(FALSE, 10);
+        gtk_container_add(GTK_CONTAINER(dialog->vbox), box);
+
+        if (item) {
+            GtkWidget *alignment = gtk_alignment_new(0, 0, 0, 0);
+
+            gtk_box_pack_start(GTK_BOX(box), alignment, FALSE, FALSE, 0);
+            gtk_container_add(GTK_CONTAINER(alignment), item);
+        }
+        gtk_box_pack_start(GTK_BOX(box), priv->label, FALSE, FALSE, 0);
+
+    } else {
+        box = gtk_vbox_new(FALSE, 10);
+        gtk_container_add(GTK_CONTAINER(dialog->vbox), box);
+        gtk_box_pack_start(GTK_BOX(box), priv->label, FALSE, FALSE, 0);
+
+        if (item) {
+            gtk_box_pack_start(GTK_BOX(box), item, FALSE, FALSE, 0);
+        }
+    }
+    
+    gtk_widget_show_all(box);
+}
+
+/**
+ * hildon_note_new_confirmation_add_buttons:
+ * @parent: The parent window. The X window ID of the parent window
+ *   has to be the same as the X window ID of the application. This is
+ *   important so that the window manager could handle the windows
+ *   correctly.
+ *   In GTK the X window ID can be checked with
+ *   GDK_WINDOW_XID(GTK_WIDGET(parent)->window).
+ * @description: The message to confirm.
+ * @Varargs: Arguments pairs for new buttons(label and return value)
+ * 
+ * Create a new confirmation note. Confirmation note has a text, 
+ * two buttons and infinite number of additional buttons and an icon.
+ *
+ * Return value: A #GtkWidget pointer of the note.
+ */
+GtkWidget *hildon_note_new_confirmation_add_buttons(GtkWindow * parent,
+                                                    const gchar *
+                                                    description, ...)
+{
+    va_list args;
+    char *message = " ";
+    int value;
+
+    GtkWidget *conf_note =
+        g_object_new(HILDON_TYPE_NOTE,
+                     "note_type", HILDON_NOTE_CONFIRMATION_BUTTON_TYPE,
+                     "description", description,
+                     "icon", "qgn_note_confirm", /*HILDON_NOTE_CONFIRMATION_STOCK, */
+                     NULL);
+
+    g_return_val_if_fail(conf_note, FALSE);
+
+    if (parent != NULL)
+        gtk_window_set_transient_for(GTK_WINDOW(conf_note), parent);
+
+    va_start(args, description);
+
+    while (TRUE) {
+        message = va_arg(args, char *);
+
+        if (!message) {
+            break;
+        }
+        value = va_arg(args, int);
+
+        gtk_dialog_add_button(GTK_DIALOG(conf_note), message, value);
+    }
+
+    va_end(args);
+
+    return conf_note;
+}
+
+
+/**
+ * hildon_note_new_confirmation:
+ * @parent: The parent window. The X window ID of the parent window
+ *   has to be the same as the X window ID of the application. This is
+ *   important so that the window manager could handle the windows
+ *   correctly. In GTK the X window ID can be checked with
+ *   GDK_WINDOW_XID(GTK_WIDGET(parent)->window).
+ * @description: The message to confirm.
+ * 
+ * Create a new confirmation note. Confirmation note has a text, 
+ * two buttons and an default confirmation stock icon.
+ *
+ * Return value: A #GtkWidget pointer of the note.
+ */
+GtkWidget *hildon_note_new_confirmation(GtkWindow * parent,
+                                        const gchar * description)
+{
+    return hildon_note_new_confirmation_with_icon_name
+        (parent, description, "qgn_note_confirm"); /*HILDON_NOTE_CONFIRMATION_STOCK);*/
+}
+
+
+/**
+ * hildon_note_new_confirmation_with_icon_stock:
+ * @parent: The parent window. The X window ID of the parent window
+ *   has to be the same as the X window ID of the application. This is
+ *   important so that the window manager could handle the windows
+ *   correctly. In GTK the X window ID can be checked with
+ *   GDK_WINDOW_XID(GTK_WIDGET(parent)->window).
+ * @description: The message to confirm.
+ * @stock_id: Icon to be displayed. If NULL, default icon is used.
+ * 
+ * Create a new confirmation note. Confirmation note has a text, 
+ * two buttons and an icon.
+ *
+ * Return value: A #GtkWidget pointer of the note.
+ */
+GtkWidget *hildon_note_new_confirmation_with_icon_stock(GtkWindow * parent,
+                                                        const gchar *
+                                                        description,
+                                                        const gchar *
+                                                        stock_id)
+{
+    GtkWidget *dialog = g_object_new(HILDON_TYPE_NOTE,
+                                     "note_type",
+                                     HILDON_NOTE_CONFIRMATION_TYPE,
+                                     "description", description, "icon",
+                                     stock_id, NULL);
+
+    if (parent != NULL)
+        gtk_window_set_transient_for(GTK_WINDOW(dialog), parent);
+
+    return dialog;
+}
+
+/**
+ * hildon_note_new_confirmation_with_icon_name:
+ * @parent: The parent window. The X window ID of the parent window
+ *   has to be the same as the X window ID of the application. This is
+ *   important so that the window manager could handle the windows
+ *   correctly. In GTK the X window ID can be checked with
+ *   GDK_WINDOW_XID(GTK_WIDGET(parent)->window).
+ * @description: The message to confirm.
+ * @icon_name: Icon to be displayed. If NULL, default icon is used.
+ * 
+ * Create a new confirmation note. Confirmation note has a text, 
+ * two buttons and an icon.
+ *
+ * Return value: A #GtkWidget pointer of the note.
+ */
+GtkWidget *hildon_note_new_confirmation_with_icon_name(GtkWindow * parent,
+                                                        const gchar *
+                                                        description,
+                                                        const gchar *
+                                                        icon_name)
+{
+    GtkWidget *dialog = g_object_new(HILDON_TYPE_NOTE,
+                                     "note_type",
+                                     HILDON_NOTE_CONFIRMATION_TYPE,
+                                     "description", description, "icon",
+                                     icon_name, NULL);
+
+    if (parent != NULL)
+        gtk_window_set_transient_for(GTK_WINDOW(dialog), parent);
+
+    return dialog;
+}
+
+/**
+ * hildon_note_new_information:
+ * @parent: The parent window. The X window ID of the parent window
+ *   has to be the same as the X window ID of the application. This is
+ *   important so that the window manager could handle the windows
+ *   correctly. In GTK the X window ID can be checked with
+ *   GDK_WINDOW_XID(GTK_WIDGET(parent)->window).
+ * @description: The message to confirm.
+ * 
+ * Create a new information note. Information note has a text,
+ * 'OK' labeled button and an icon.
+ * 
+ * Return value: A #GtkWidget pointer of the note.
+ */
+GtkWidget *hildon_note_new_information(GtkWindow * parent,
+                                       const gchar * description)
+{
+    return hildon_note_new_information_with_icon_stock
+        (parent, description, "qgn_note_info");
+}
+
+/**
+ * hildon_note_new_information_with_icon_stock:
+ * @parent: The parent window. The X window ID of the parent window
+ *   has to be the same as the X window ID of the application. This is
+ *   important so that the window manager could handle the windows
+ *   correctly. In GTK the X window ID can be checked with
+ *   GDK_WINDOW_XID(GTK_WIDGET(parent)->window).
+ * @description: The message to confirm.
+ * @stock_id: Icon to be displayed. If NULL, default icon is used.
+ * 
+ * Create a new information note. Information note has a text,
+ * 'OK' labeled button and an icon.
+ * 
+ * Return value: A #GtkWidget pointer of the note.
+ */
+GtkWidget *hildon_note_new_information_with_icon_stock(GtkWindow * parent,
+                                                       const gchar *
+                                                       description,
+                                                       const gchar *
+                                                       stock_id)
+{
+    GtkWidget *dialog = g_object_new(HILDON_TYPE_NOTE,
+                                     "note_type",
+                                     HILDON_NOTE_INFORMATION_TYPE,
+                                     "description", description,
+                                     "icon", stock_id, NULL);
+
+    if (parent != NULL)
+        gtk_window_set_transient_for(GTK_WINDOW(dialog), parent);
+
+    return dialog;
+}
+
+/**
+ * hildon_note_new_information_with_icon_name:
+ * @parent: The parent window. The X window ID of the parent window
+ *   has to be the same as the X window ID of the application. This is
+ *   important so that the window manager could handle the windows
+ *   correctly. In GTK the X window ID can be checked with
+ *   GDK_WINDOW_XID(GTK_WIDGET(parent)->window).
+ * @description: The message to confirm.
+ * @icon_name: Icon to be displayed. If NULL, default icon is used.
+ * 
+ * Create a new information note. Information note has a text,
+ * 'OK' labeled button and an icon.
+ * 
+ * Return value: A #GtkWidget pointer of the note.
+ */
+GtkWidget *hildon_note_new_information_with_icon_name(GtkWindow * parent,
+                                                       const gchar *
+                                                       description,
+                                                       const gchar *
+                                                       icon_name)
+{
+    GtkWidget *dialog = g_object_new(HILDON_TYPE_NOTE,
+                                     "note_type",
+                                     HILDON_NOTE_INFORMATION_THEME_TYPE,
+                                     "description", description,
+                                     "icon", icon_name, NULL);
+
+    if (parent != NULL)
+        gtk_window_set_transient_for(GTK_WINDOW(dialog), parent);
+
+    return dialog;
+}
+
+/**
+ * hildon_note_new_information_with_icon_theme:
+ * @parent: The parent window. The X window ID of the parent window
+ *   has to be the same as the X window ID of the application. This is
+ *   important so that the window manager could handle the windows
+ *   correctly. In GTK the X window ID can be checked with
+ *   GDK_WINDOW_XID(GTK_WIDGET(parent)->window).
+ * @description: The message to confirm.
+ * @icon: #GtkIconTheme icon to be displayed.
+ * 
+ * Create a new information note. Information note has a text,
+ * 'OK' labeled button and an icon.
+ * 
+ * Return value: A #GtkWidget pointer of the note. 
+ * If NULL, default icon is used.
+ */
+GtkWidget *hildon_note_new_information_with_icon_theme(GtkWindow *parent,
+                                                       const gchar *description,
+                                                       const gchar *icon)
+{
+    GtkWidget *dialog = g_object_new(HILDON_TYPE_NOTE,
+                                     "note_type",
+                                     HILDON_NOTE_INFORMATION_THEME_TYPE,
+                                     "description", description,
+                                     "icon", icon, NULL);
+
+    if (parent != NULL)
+        gtk_window_set_transient_for(GTK_WINDOW(dialog), parent);
+
+    return dialog;
+}
+
+/**
+ * hildon_note_new_cancel_with_progress_bar:
+ * @parent: The parent window. The X window ID of the parent window
+ *   has to be the same as the X window ID of the application. This is
+ *   important so that the window manager could handle the windows
+ *   correctly. In GTK the X window ID can be checked with
+ *   GDK_WINDOW_XID(GTK_WIDGET(parent)->window).
+ * @description: The action to cancel.
+ * @progressbar: A pointer to #GtkProgressBar to be filled with the
+ *   progressbar assigned to this note. Use this to set the fraction of
+ *   progressbar done.
+ *
+ * Create a new cancel note with a progress bar. The note has a text,
+ * 'Cancel' labeled button and a progress bar.
+ *
+ * Return value: A #GtkDialog. Use this to get rid of this note when you
+ *   no longer need it.
+ */
+GtkWidget *hildon_note_new_cancel_with_progress_bar(GtkWindow * parent,
+                                                    const gchar *
+                                                    description,
+                                                    GtkProgressBar *
+                                                    progressbar)
+{
+    GtkWidget *dialog = g_object_new(HILDON_TYPE_NOTE,
+                                     "note_type",
+                                     HILDON_NOTE_PROGRESSBAR_TYPE,
+                                     "description", description,
+                                     "progressbar",
+                                     progressbar, NULL);
+
+    if (parent != NULL)
+        gtk_window_set_transient_for(GTK_WINDOW(dialog), parent);
+
+    return dialog;
+}
+
+
+/**
+ * hildon_note_set_button_text:
+ * @note: A #HildonNote
+ * @text: Sets the button text and if there is two buttons in dialog, 
+ *   the button texts will be &lt;text&gt;, "Cancel".  
+ *
+ * Sets the button text to be used by this hildon_note widget.
+ */
+void hildon_note_set_button_text(HildonNote * note, const gchar * text)
+{
+    HildonNotePrivate *priv;
+
+    priv = HILDON_NOTE_GET_PRIVATE(HILDON_NOTE(note));
+    if (priv->okButton) {
+        gtk_button_set_label(GTK_BUTTON(priv->okButton), text);
+        gtk_button_set_label(GTK_BUTTON(priv->cancelButton),
+                             _("Ecdg_bd_confirmation_note_cancel"));
+    } else {
+        gtk_button_set_label(GTK_BUTTON(priv->cancelButton), text);
+    }
+}
diff --git a/hildon-widgets/hildon-note.h b/hildon-widgets/hildon-note.h
new file mode 100644 (file)
index 0000000..255875a
--- /dev/null
@@ -0,0 +1,111 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+#ifndef __HILDON_NOTE_H__
+#define __HILDON_NOTE_H__
+
+#include <gtk/gtkdialog.h>
+#include <gtk/gtkprogressbar.h>
+#include <gtk/gtkicontheme.h>
+
+G_BEGIN_DECLS
+#define HILDON_TYPE_NOTE ( hildon_note_get_type() )
+#define HILDON_NOTE(obj) \
+  (GTK_CHECK_CAST (obj, HILDON_TYPE_NOTE, HildonNote))
+#define HILDON_NOTE_CLASS(klass) \
+  (GTK_CHECK_CLASS_CAST ((klass), HILDON_TYPE_NOTE, HildonNoteClass))
+#define HILDON_IS_NOTE(obj) (GTK_CHECK_TYPE (obj, HILDON_TYPE_NOTE))
+#define HILDON_IS_NOTE_CLASS(klass) \
+  (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_NOTE))
+typedef struct _HildonNote HildonNote;
+typedef struct _HildonNoteClass HildonNoteClass;
+
+enum {
+    HILDON_NOTE_CONFIRMATION_TYPE = 0,
+    HILDON_NOTE_CONFIRMATION_BUTTON_TYPE,
+    HILDON_NOTE_INFORMATION_TYPE,
+    HILDON_NOTE_INFORMATION_THEME_TYPE,
+    HILDON_NOTE_PROGRESSBAR_TYPE
+};
+
+struct _HildonNote {
+    GtkDialog parent;
+};
+
+struct _HildonNoteClass {
+    GtkDialogClass parent_class;
+};
+
+GtkWidget *hildon_note_new_confirmation(GtkWindow * parent,
+                                        const gchar * description);
+
+GtkWidget *hildon_note_new_confirmation_add_buttons(GtkWindow * parent,
+                                                    const gchar *
+                                                    description, ...);
+
+GtkWidget *hildon_note_new_confirmation_with_icon_stock(GtkWindow * parent,
+                                                        const gchar *
+                                                        description,
+                                                        const gchar *
+                                                        stock_id);
+
+GtkWidget *hildon_note_new_confirmation_with_icon_name(GtkWindow * parent,
+                                                        const gchar *
+                                                        description,
+                                                        const gchar *
+                                                        icon_name);
+
+
+GtkWidget *hildon_note_new_cancel_with_progress_bar(GtkWindow * parent,
+                                                    const gchar *
+                                                    description,
+                                                    GtkProgressBar *
+                                                    progressbar);
+
+GtkWidget *hildon_note_new_information(GtkWindow * parent,
+                                       const gchar * description);
+                                       
+GtkWidget *hildon_note_new_information_with_icon_name(GtkWindow * parent,
+                                                       const gchar *
+                                                       description,
+                                                       const gchar *
+                                                       icon_name);
+
+GtkWidget *hildon_note_new_information_with_icon_stock(GtkWindow * parent,
+                                                       const gchar *
+                                                       description,
+                                                       const gchar *
+                                                       stock_id);
+                                                       
+GtkWidget *hildon_note_new_information_with_icon_theme(GtkWindow * parent,
+                                                       const gchar *
+                                                       description,
+                                                       const gchar *
+                                                       icon);
+                                                       
+void hildon_note_set_button_text(HildonNote * note, const gchar * text);
+
+GType hildon_note_get_type(void);
+
+G_END_DECLS
+#endif /* __HILDON_NOTE_H__ */
diff --git a/hildon-widgets/hildon-number-editor.c b/hildon-widgets/hildon-number-editor.c
new file mode 100644 (file)
index 0000000..0610c64
--- /dev/null
@@ -0,0 +1,949 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/*
+ * @file hildon-number-editor.c
+ *
+ * This file contains the implementation of Hildon Number Editor
+ *
+ */
+
+#include <gdk/gdkkeysyms.h>
+#include <glib.h>
+#include <gtk/gtk.h>
+#include <pango/pango.h>
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "hildon-number-editor.h"
+#include <hildon-widgets/gtk-infoprint.h>
+#include "hildon-composite-widget.h"
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <libintl.h>
+#define _(String) dgettext(PACKAGE, String)
+
+/*Pixel spec defines*/
+#define SPACE_BORDER 6
+#define NUMBER_EDITOR_HEIGHT 30
+
+#define BUTTON_HEIGHT 30
+#define BUTTON_WIDTH 30
+
+#define HILDON_NUMBER_EDITOR_GET_PRIVATE(obj) \
+        (G_TYPE_INSTANCE_GET_PRIVATE ((obj), HILDON_TYPE_NUMBER_EDITOR, \
+        HildonNumberEditorPrivate));
+
+enum
+{
+   MAXIMUM_VALUE_EXCEED,
+   MINIMUM_VALUE_EXCEED,
+   ERRONEOUS_VALUE
+};
+
+
+typedef struct _HildonNumberEditorPrivate HildonNumberEditorPrivate;
+
+static void
+hildon_number_editor_class_init (HildonNumberEditorClass *editor_class);
+
+static void
+hildon_number_editor_init (HildonNumberEditor *editor);
+
+static gboolean
+hildon_number_editor_entry_focusout (GtkWidget *widget, GdkEventFocus *event,
+                                     gpointer data);
+
+static void
+hildon_number_editor_entry_changed (GtkWidget *widget, gpointer data);
+
+static void
+hildon_number_editor_size_request (GtkWidget *widget,
+                                   GtkRequisition *requisition);
+
+static void
+set_widget_allocation (GtkWidget *widget, GtkAllocation *alloc,
+                       GtkAllocation *allocation);
+
+static int
+hildon_number_editor_get_font_width (GtkWidget *widget);
+
+static void
+hildon_number_editor_size_allocate (GtkWidget *widget,
+                                    GtkAllocation *allocation);
+
+static gboolean
+hildon_number_editor_entry_keypress (GtkWidget *widget, GdkEventKey *event,
+                                     gpointer data);
+
+static gboolean
+hildon_number_editor_button_pressed (GtkWidget *widget, GdkEventButton *event,
+                                     gpointer data);
+
+static gboolean
+hildon_number_editor_entry_button_released (GtkWidget *widget,
+                                           GdkEventButton *event,
+                                           gpointer data);
+static gboolean
+hildon_number_editor_button_released (GtkWidget *widget,
+                                      GdkEvent *event,
+                                      HildonNumberEditor *editor);
+static void
+construct_error_message (HildonNumberEditor *editor, gint type);
+
+static gboolean
+do_mouse_timeout (HildonNumberEditor *editor);
+
+static gboolean
+change_numbers (HildonNumberEditor *editor, gint type, gint cursor_pos);
+
+static gchar *
+integer_to_string (gint value);
+
+static void
+hildon_number_editor_forall (GtkContainer *container, gboolean include_internals,
+                     GtkCallback callback, gpointer callback_data);
+
+static void
+hildon_number_editor_destroy (GtkObject *self);
+
+static gboolean
+hildon_number_editor_start_timer (HildonNumberEditor *editor);
+
+static void
+hildon_number_editor_finalize (GObject *self);
+
+static gboolean
+hildon_number_editor_mnemonic_activate( GtkWidget *widget,
+                                        gboolean group_cycle );
+
+static GtkContainerClass *parent_class;
+
+
+struct _HildonNumberEditorPrivate
+{
+    GtkWidget *num_entry;
+    GtkWidget *plus;
+    GtkWidget *minus;
+
+    gint start;
+    gint end;
+    gint default_val;
+    gint button_type;
+    gint button_event_id;
+    gint entry_len;
+    gint entry_width;
+
+    gboolean rem_sign_space;
+    gboolean negative;
+};
+
+
+GType hildon_number_editor_get_type(void)
+{
+    static GType editor_type = 0;
+
+    if (!editor_type)
+      {
+        static const GTypeInfo editor_info =
+          {
+            sizeof(HildonNumberEditorClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_number_editor_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonNumberEditor),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_number_editor_init,
+          };
+        editor_type = g_type_register_static(GTK_TYPE_CONTAINER,
+                                             "HildonNumberEditor",
+                                             &editor_info, 0);
+      }
+    return editor_type;
+}
+
+static void
+hildon_number_editor_class_init(HildonNumberEditorClass * editor_class)
+{
+    GtkContainerClass *container_class = GTK_CONTAINER_CLASS(editor_class);
+    GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(editor_class);
+
+    g_type_class_add_private(editor_class,
+                             sizeof(HildonNumberEditorPrivate));
+
+    parent_class = g_type_class_peek_parent(editor_class);
+
+    widget_class->size_request = hildon_number_editor_size_request;
+    widget_class->size_allocate = hildon_number_editor_size_allocate;
+    widget_class->mnemonic_activate = hildon_number_editor_mnemonic_activate;
+    widget_class->focus = hildon_composite_widget_focus;
+
+    /* Because we derived our widget from GtkContainer, we should override 
+       forall method */
+    container_class->forall = hildon_number_editor_forall;
+    GTK_OBJECT_CLASS(editor_class)->destroy = hildon_number_editor_destroy;
+    G_OBJECT_CLASS(editor_class)->finalize = hildon_number_editor_finalize;
+}
+
+static void
+hildon_number_editor_forall(GtkContainer *container, gboolean include_internals,
+                            GtkCallback callback, gpointer callback_data)
+{
+    HildonNumberEditorPrivate *priv =
+        HILDON_NUMBER_EDITOR_GET_PRIVATE(container);
+
+    g_return_if_fail(callback != NULL);              
+
+    if (!include_internals)
+        return;
+
+    (*callback) (priv->minus, callback_data);
+    (*callback) (priv->num_entry, callback_data);
+    (*callback) (priv->plus, callback_data);
+}
+
+static void
+hildon_number_editor_destroy(GtkObject *self)
+{
+    HildonNumberEditorPrivate *priv;
+
+    priv = HILDON_NUMBER_EDITOR_GET_PRIVATE(self);
+
+    if (priv->minus)
+      {
+        gtk_widget_unparent(priv->minus);
+        priv->minus = NULL;
+      }
+    if (priv->num_entry)
+      {
+        gtk_widget_unparent(priv->num_entry);
+        priv->num_entry = NULL;
+      }
+    if (priv->plus)
+      {
+        gtk_widget_unparent(priv->plus);
+        priv->plus = NULL;
+      }
+
+    if (GTK_OBJECT_CLASS(parent_class)->destroy)
+        GTK_OBJECT_CLASS(parent_class)->destroy(self);
+}
+
+static void
+hildon_number_editor_finalize (GObject *self)
+{
+   HildonNumberEditorPrivate *priv;
+
+   priv = HILDON_NUMBER_EDITOR_GET_PRIVATE(self);
+
+   /* Free timer */
+   if (priv->button_event_id)
+     g_source_remove (priv->button_event_id);
+
+    /* Call parent class finalize, if have one */
+    if (G_OBJECT_CLASS (parent_class)->finalize)
+        G_OBJECT_CLASS (parent_class)->finalize(self);
+}
+
+static void
+hildon_number_editor_init (HildonNumberEditor *editor)
+{
+    HildonNumberEditorPrivate *priv;
+
+    priv = HILDON_NUMBER_EDITOR_GET_PRIVATE(editor);
+    GTK_WIDGET_SET_FLAGS(GTK_WIDGET(editor), GTK_NO_WINDOW);
+
+    priv->num_entry = gtk_entry_new();
+    priv->minus = gtk_button_new();
+    priv->plus = gtk_button_new();
+
+    gtk_widget_set_name( priv->minus, "minus-button" );
+    gtk_widget_set_name( priv->plus, "plus-button" );
+    gtk_widget_set_size_request( priv->minus, BUTTON_WIDTH, BUTTON_HEIGHT );
+    gtk_widget_set_size_request( priv->plus, BUTTON_WIDTH, BUTTON_HEIGHT );
+    gtk_entry_set_alignment (GTK_ENTRY(priv->num_entry), 1);
+    
+    GTK_WIDGET_UNSET_FLAGS( priv->minus, GTK_CAN_FOCUS );
+    GTK_WIDGET_UNSET_FLAGS( priv->plus, GTK_CAN_FOCUS );
+    
+    priv->entry_width = 0;
+    priv->button_event_id = -1;
+    priv->rem_sign_space = TRUE;
+
+    gtk_widget_set_parent(priv->minus, GTK_WIDGET(editor));
+    gtk_widget_set_parent(priv->num_entry, GTK_WIDGET(editor));
+    gtk_widget_set_parent(priv->plus, GTK_WIDGET(editor));
+
+    g_signal_connect(GTK_OBJECT(priv->num_entry), "changed",
+                     G_CALLBACK(hildon_number_editor_entry_changed),
+                     editor);
+
+    g_signal_connect(GTK_OBJECT(priv->num_entry), "focus-out-event",
+                     G_CALLBACK(hildon_number_editor_entry_focusout),
+                     editor);
+
+    g_signal_connect(GTK_OBJECT(priv->num_entry), "key-press-event",
+                     G_CALLBACK(hildon_number_editor_entry_keypress),
+                     editor);
+
+    g_signal_connect(GTK_OBJECT(priv->num_entry), "button-release-event",
+                     G_CALLBACK(hildon_number_editor_entry_button_released),
+                     NULL);
+
+    g_signal_connect(GTK_OBJECT(priv->minus), "button-press-event",
+                     G_CALLBACK(hildon_number_editor_button_pressed),
+                     editor);
+
+    g_signal_connect(GTK_OBJECT(priv->plus), "button-press-event",
+                     G_CALLBACK(hildon_number_editor_button_pressed),
+                     editor);
+                     
+    g_signal_connect(GTK_OBJECT(priv->minus), "button-release-event",
+                     G_CALLBACK(hildon_number_editor_button_released),
+                     editor);
+
+    g_signal_connect(GTK_OBJECT(priv->plus), "button-release-event",
+                     G_CALLBACK(hildon_number_editor_button_released),
+                     editor);
+
+    g_signal_connect(GTK_OBJECT(priv->minus), "leave-notify-event",
+                     G_CALLBACK(hildon_number_editor_button_released),
+                     editor);
+
+    g_signal_connect(GTK_OBJECT(priv->plus), "leave-notify-event",
+                     G_CALLBACK(hildon_number_editor_button_released),
+                     editor);
+
+    gtk_widget_show(priv->num_entry);
+    gtk_widget_show(priv->minus);
+    gtk_widget_show(priv->plus);
+
+    hildon_number_editor_set_range(editor, G_MININT, G_MAXINT);
+}
+
+static gboolean
+hildon_number_editor_mnemonic_activate (GtkWidget *widget,
+                                        gboolean group_cycle)
+{
+  HildonNumberEditorPrivate *priv = HILDON_NUMBER_EDITOR_GET_PRIVATE(widget);
+  gtk_widget_grab_focus(priv->num_entry);
+  gtk_editable_select_region(GTK_EDITABLE(priv->num_entry), 0, -1);
+  return TRUE;
+}
+
+static gboolean
+hildon_number_editor_entry_button_released (GtkWidget *widget,
+                                           GdkEventButton *event,
+                                           gpointer data)
+{
+  gtk_editable_select_region(GTK_EDITABLE(widget), 0, -1);
+  return FALSE;
+}
+
+static void
+construct_error_message (HildonNumberEditor *editor, gint type)
+{
+    gint min, max;
+    gchar *err_msg = NULL;
+    HildonNumberEditorPrivate *priv;
+
+    priv = HILDON_NUMBER_EDITOR_GET_PRIVATE(editor);
+    min = priv->start;
+    max = priv->end;
+
+    /* Construct different error message */
+    switch (type)
+      {
+        case MAXIMUM_VALUE_EXCEED:
+          err_msg = g_strdup_printf(_("Ckct_ib_maximum_value"), max, max);
+          break;
+        case MINIMUM_VALUE_EXCEED:
+          err_msg = g_strdup_printf(_("Ckct_ib_minimum_value"), min, min);
+          break;
+        case ERRONEOUS_VALUE:
+          err_msg =
+            g_strdup_printf(_("Ckct_ib_set_a_value_within_range"), min, max);
+          break;
+      }
+
+    if (err_msg)
+      {
+        gtk_infoprint(GTK_WINDOW(gtk_widget_get_ancestor(GTK_WIDGET(editor),
+                      GTK_TYPE_WINDOW)), err_msg);
+        g_free(err_msg);
+      }
+}
+
+static gboolean
+hildon_number_editor_button_released (GtkWidget *widget, GdkEvent *event,
+                                      HildonNumberEditor *editor)
+{
+    HildonNumberEditorPrivate *priv =
+        HILDON_NUMBER_EDITOR_GET_PRIVATE(editor);
+        
+    if (priv->button_event_id != -1)
+      {
+        g_source_remove(priv->button_event_id);
+        priv->button_event_id = -1;
+      }
+    return FALSE;
+}
+
+static gboolean
+hildon_number_editor_button_pressed (GtkWidget *widget, GdkEventButton *event,
+                                     gpointer data)
+{
+    /* Need to fetch current value from entry and increment or decrement
+       it */
+    HildonNumberEditor *editor;
+    HildonNumberEditorPrivate *priv;
+    GtkSettings *settings;
+    guint timeout;
+
+    editor = HILDON_NUMBER_EDITOR(data);
+    priv = HILDON_NUMBER_EDITOR_GET_PRIVATE(editor);
+    settings = gtk_settings_get_default();
+    g_object_get(settings, "gtk-initial-timeout", &timeout, NULL);
+
+    if (GTK_BUTTON(widget) == GTK_BUTTON(priv->plus))
+        priv->button_type = 1;
+    else
+        priv->button_type = -1;
+
+    if (priv->button_event_id == -1)
+      {
+        do_mouse_timeout(editor);
+        priv->button_event_id = g_timeout_add (timeout,
+                                (GSourceFunc) hildon_number_editor_start_timer,
+                                editor);
+      }
+
+    return FALSE;
+}
+
+static gboolean
+hildon_number_editor_start_timer (HildonNumberEditor *editor)
+{
+    HildonNumberEditorPrivate *priv;
+    GtkSettings *settings;
+    guint timeout;
+
+    priv = HILDON_NUMBER_EDITOR_GET_PRIVATE(editor);
+    settings = gtk_settings_get_default();
+    g_object_get(settings, "gtk-update-timeout", &timeout, NULL);
+
+    priv->button_event_id = g_timeout_add(timeout,
+                                          (GSourceFunc) do_mouse_timeout,
+                                          editor);
+    return FALSE;
+}
+
+static gboolean
+do_mouse_timeout (HildonNumberEditor *editor)
+{
+    HildonNumberEditorPrivate *priv;
+    gboolean success;
+
+    priv = HILDON_NUMBER_EDITOR_GET_PRIVATE(editor);
+    success = TRUE;
+
+    if (priv->button_type == 1)
+      {
+        if (change_numbers(editor, 1, -1) == FALSE)
+            success = FALSE;
+
+      }
+    else if (change_numbers(editor, 2, -1) == FALSE)
+        success = FALSE;
+
+    if (!success)
+      {
+        gtk_editable_select_region(GTK_EDITABLE(priv->num_entry), 0, -1);
+        return FALSE;
+      }
+    else
+        return TRUE;
+}
+
+static gboolean
+change_numbers (HildonNumberEditor *editor, gint type, gint cursor_pos)
+{
+    gint nvalue;
+    gchar *snvalue;
+    HildonNumberEditorPrivate *priv =
+        HILDON_NUMBER_EDITOR_GET_PRIVATE(editor);
+    nvalue = atoi(GTK_ENTRY(priv->num_entry)->text);
+
+    if (type == 1)
+      {
+        if (nvalue < priv->end)
+            nvalue += 1;
+        else
+          {
+            construct_error_message(editor, MAXIMUM_VALUE_EXCEED);
+            return FALSE;
+          }
+      }
+    else
+      {
+        if (nvalue > priv->start)
+            nvalue -= 1;
+
+        else
+          {
+            construct_error_message(editor, MINIMUM_VALUE_EXCEED);
+            return FALSE;
+          }
+      }
+
+    /* write value to num_entry */
+    snvalue = integer_to_string(nvalue);
+    gtk_entry_set_text(GTK_ENTRY(priv->num_entry), snvalue);
+
+    if (cursor_pos != -1)
+        gtk_editable_set_position(GTK_EDITABLE(priv->num_entry),
+                                  cursor_pos);
+
+    if (snvalue)
+        g_free(snvalue);
+
+    return TRUE;
+}
+
+static gchar *
+integer_to_string (gint nvalue)
+{
+    return g_strdup_printf("%d", nvalue);
+}
+
+static void
+hildon_number_editor_entry_changed (GtkWidget *widget, gpointer data)
+{
+    HildonNumberEditor *editor;
+    HildonNumberEditorPrivate *priv;
+    gchar *tmpstr;
+    gint value;
+    gchar *tail = NULL;
+
+    editor = HILDON_NUMBER_EDITOR(data);
+    priv = HILDON_NUMBER_EDITOR_GET_PRIVATE(editor);
+
+    tmpstr = GTK_ENTRY(priv->num_entry)->text;
+
+    if (strlen(tmpstr) > 0)
+      {
+        tmpstr = NULL;
+        value = strtol(GTK_ENTRY(priv->num_entry)->text, &tail, 10);
+        if (!strncmp(tail, "\0", 1) || !strncmp(tail, "-", 1))
+          {    
+            if (atoi(GTK_ENTRY(priv->num_entry)->text) > priv->end)
+              {
+                construct_error_message(editor, MAXIMUM_VALUE_EXCEED);
+                tmpstr = integer_to_string(priv->end);
+                gtk_entry_set_text(GTK_ENTRY(priv->num_entry), tmpstr);
+                if (tmpstr)
+                    g_free(tmpstr);
+              }
+            else if (atoi(GTK_ENTRY(priv->num_entry)->text) < priv->start) {
+                construct_error_message(editor, MINIMUM_VALUE_EXCEED);
+                tmpstr = integer_to_string(priv->start);
+                gtk_entry_set_text(GTK_ENTRY(priv->num_entry), tmpstr);
+                if (tmpstr)
+                    g_free(tmpstr);
+              }
+          }
+        else
+          {
+            construct_error_message(editor, ERRONEOUS_VALUE);
+            tmpstr = integer_to_string(priv->start);
+            gtk_entry_set_text(GTK_ENTRY(priv->num_entry), tmpstr);
+            if (tmpstr)
+                g_free(tmpstr);
+          }
+      }
+}
+
+static void
+hildon_number_editor_size_request (GtkWidget *widget,
+                                  GtkRequisition *requisition)
+{
+    HildonNumberEditor *editor;
+    HildonNumberEditorPrivate *priv;
+    GtkRequisition req;
+
+    editor = HILDON_NUMBER_EDITOR(widget);
+    priv = HILDON_NUMBER_EDITOR_GET_PRIVATE(editor);
+
+/* FIXME -- If it's needed to fix button sizes.. priv->minus and priv->plus
+ * requisitions are right places to do that.
+ */
+
+    gtk_widget_size_request(priv->minus, &req);
+    *requisition = req;
+
+    gtk_widget_size_request(priv->num_entry, &req);
+    requisition->width += req.width;
+
+    if (!priv->entry_width)
+      {
+        gint font_w = hildon_number_editor_get_font_width(priv->num_entry);
+
+        priv->entry_width = (priv->entry_len + 1) * font_w +
+            widget->style->xthickness * 2 -
+            (font_w / 2 * priv->rem_sign_space);
+        gtk_widget_set_size_request(priv->num_entry, priv->entry_width,
+                                    req.height);
+      }
+
+    gtk_widget_size_request(priv->plus, &req);
+    requisition->width += priv->entry_len;
+
+    requisition->width += SPACE_BORDER * 2;
+    requisition->height = NUMBER_EDITOR_HEIGHT;
+}
+
+static void
+set_widget_allocation (GtkWidget *widget, GtkAllocation *alloc,
+                      GtkAllocation *allocation)
+{
+    GtkRequisition child_requisition;
+
+    gtk_widget_get_child_requisition(widget, &child_requisition);
+
+    if (allocation->width + allocation->x >
+        alloc->x + child_requisition.width)
+        alloc->width = child_requisition.width;
+    else
+      {
+        alloc->width = allocation->width - (alloc->x - allocation->x);
+        if (alloc->width < 0)
+            alloc->width = 0;
+      }
+
+    gtk_widget_size_allocate(widget, alloc);
+    alloc->x += alloc->width;
+}
+
+static int
+hildon_number_editor_get_font_width (GtkWidget *widget)
+{
+    PangoContext *context;
+    PangoFontMetrics *metrics;
+    gint digit_width;
+
+    context = gtk_widget_get_pango_context(widget);
+    metrics = pango_context_get_metrics(context,
+                                        widget->style->font_desc,
+                                        pango_context_get_language
+                                        (context));
+
+    digit_width = pango_font_metrics_get_approximate_digit_width(metrics);
+    digit_width = PANGO_PIXELS(digit_width);
+
+    pango_font_metrics_unref(metrics);
+
+    return digit_width;
+}
+
+static void
+hildon_number_editor_size_allocate (GtkWidget *widget,
+                                    GtkAllocation *allocation)
+{
+  HildonNumberEditor *editor;
+  HildonNumberEditorPrivate *priv;
+  GtkAllocation alloc;
+
+  editor = HILDON_NUMBER_EDITOR(widget);
+  priv = HILDON_NUMBER_EDITOR_GET_PRIVATE(editor);
+
+  widget->allocation = *allocation;
+
+/*Init start values*/
+  alloc.y = widget->allocation.y + widget->style->ythickness;
+
+  if (widget->allocation.height > NUMBER_EDITOR_HEIGHT)
+    {
+      alloc.height = NUMBER_EDITOR_HEIGHT - widget->style->ythickness * 2;
+      alloc.y += (widget->allocation.height - NUMBER_EDITOR_HEIGHT) / 2;
+    }
+  else
+      alloc.height = widget->allocation.height - widget->style->ythickness * 2;
+
+
+  
+  if (alloc.height < 0)
+    alloc.height = 0;
+
+  alloc.x = allocation->x + widget->style->xthickness;
+
+  set_widget_allocation(priv->minus, &alloc, &widget->allocation);
+  alloc.x += SPACE_BORDER;
+
+  set_widget_allocation(priv->num_entry, &alloc, &widget->allocation);
+  alloc.x += SPACE_BORDER;
+
+  set_widget_allocation(priv->plus, &alloc, &widget->allocation);
+}
+
+static gboolean
+hildon_number_editor_entry_focusout (GtkWidget *widget, GdkEventFocus *event,
+                                     gpointer data)
+{
+    HildonNumberEditor *editor;
+    HildonNumberEditorPrivate *priv;
+    gchar *str;
+
+    editor = HILDON_NUMBER_EDITOR(data);
+    priv = HILDON_NUMBER_EDITOR_GET_PRIVATE(editor);
+    
+    /* empty entry, must infoprint error message */
+    if (!strlen(GTK_ENTRY(priv->num_entry)->text))
+      {
+        construct_error_message(editor, ERRONEOUS_VALUE);
+        /* Changing to default value */
+        str = integer_to_string(priv->default_val);
+        gtk_entry_set_text(GTK_ENTRY(priv->num_entry), str);
+        gtk_editable_select_region(GTK_EDITABLE(priv->num_entry), 0, -1);
+        if (str)
+            g_free(str);
+      }
+    return FALSE;
+}
+
+static gboolean
+hildon_number_editor_entry_keypress (GtkWidget *widget, GdkEventKey *event,
+                                     gpointer data)
+{
+    HildonNumberEditorPrivate *priv;
+    gint tmp_pos;
+    gchar *scnd_chr;
+    gboolean ret_val = FALSE;
+
+    priv = HILDON_NUMBER_EDITOR_GET_PRIVATE(data);
+    tmp_pos = gtk_editable_get_position( GTK_EDITABLE(priv->num_entry) );
+    
+    if( (event->keyval == GDK_Left) || (event->keyval == GDK_Right) )
+    {
+      if( ((event->keyval == GDK_Left) && tmp_pos == 0 ) ||
+           (event->keyval == GDK_Left && gtk_editable_get_selection_bounds 
+                                                (GTK_EDITABLE (priv->num_entry),
+                                                 0, NULL)) )
+      {
+        if (change_numbers(HILDON_NUMBER_EDITOR(data), 2, -1) == FALSE)
+        { 
+          gtk_editable_select_region(GTK_EDITABLE(priv->num_entry), 0, -1);
+          return TRUE;
+        }
+      }
+      else if ( (event->keyval == GDK_Right) )
+      {
+        gchar *str = gtk_editable_get_chars( GTK_EDITABLE(priv->num_entry),
+                                             0, -1 );
+        if( strlen(str) == tmp_pos )
+        {
+          if (change_numbers(HILDON_NUMBER_EDITOR(data), 1, tmp_pos) == FALSE)
+          { 
+            gtk_editable_select_region(GTK_EDITABLE(priv->num_entry), 0, -1);
+            g_free (str);
+            return TRUE;
+          }
+        }
+       g_free (str);
+      }
+      return FALSE;
+    }
+   
+    scnd_chr = gtk_editable_get_chars( GTK_EDITABLE(priv->num_entry),
+                                              0, 1 );
+    if (event->keyval == GDK_minus || event->keyval == GDK_KP_Subtract)
+    {
+      if (tmp_pos > 0)
+           ret_val = TRUE;
+      if (!strncmp (scnd_chr, "-", 1))
+           ret_val = TRUE;
+    }
+    else if ((event->keyval == GDK_Up) || (event->keyval == GDK_Down)
+        || (event->keyval == GDK_KP_Up) || (event->keyval == GDK_KP_Down))
+        ret_val = FALSE;
+    else if (((event->keyval >= GDK_0) && (event->keyval <= GDK_9)) ||
+             ((event->keyval >= GDK_KP_0) && (event->keyval <= GDK_KP_9))
+             || (event->keyval == GDK_BackSpace)
+             || (event->keyval == GDK_Delete)
+             || (event->keyval == GDK_Return)
+             || (((event->keyval == GDK_minus)
+             || (event->keyval == GDK_KP_Subtract))))
+        ret_val = FALSE;
+    else
+      ret_val = TRUE;
+
+   g_free (scnd_chr);
+   return ret_val;
+}
+
+
+/**
+ * hildon_number_editor_new:
+ * @min: Minimum accepted value
+ * @max: Maximum accepted value
+ * 
+ * This function creates new number editor
+ *
+ * Return value: a new #HildonNumberEditor widget.
+ */
+GtkWidget *
+hildon_number_editor_new (gint min, gint max)
+{
+    HildonNumberEditor *editor =
+        g_object_new(HILDON_TYPE_NUMBER_EDITOR, NULL);
+
+    /* Set user inputted range to editor */
+    hildon_number_editor_set_range(editor, min, max);
+
+    return GTK_WIDGET(editor);
+}
+
+/**
+ * hildon_number_editor_set_range:
+ * @editor: a #HildonNumberEditor widget
+ * @min: Minimum accepted value
+ * @max: Maximum accepted value
+ *
+ * This function set accepted number range for editor
+ */
+void
+hildon_number_editor_set_range (HildonNumberEditor *editor, gint min, gint max)
+{
+    HildonNumberEditorPrivate *priv;
+    gchar *str, *str2;
+    gint a, b;
+
+    g_return_if_fail(HILDON_IS_NUMBER_EDITOR(editor));
+
+    if (min > max)
+      {
+        gint temp = min;
+
+        min = max;
+        max = temp;
+      }
+
+    priv = HILDON_NUMBER_EDITOR_GET_PRIVATE(editor);
+
+    /* we need to store user inputted values */
+    priv->start = min;
+    priv->end = max;
+    priv->default_val = min;
+
+    priv->negative = min < 0 ? TRUE : FALSE;
+
+    str = integer_to_string(max);
+    str2 = integer_to_string(min);
+    a = strlen(str);
+    b = strlen(str2);
+
+    if (a >= b)
+      {
+        priv->entry_len = a;
+        priv->rem_sign_space = FALSE;
+      }
+    else
+      {
+        priv->entry_len = b;
+        priv->rem_sign_space = TRUE;
+      }
+    
+    /* reserving space for the minus sign */
+    if (priv->negative)
+        priv->entry_len++;
+
+/*  priv->entry_len = a >= b ? a : b;*/
+
+    priv->entry_width = 0;
+
+    gtk_entry_set_text(GTK_ENTRY(priv->num_entry), str);
+    gtk_widget_queue_resize(GTK_WIDGET(editor));
+
+    if (str)
+        g_free(str);
+    if (str2)
+        g_free(str2);
+}
+
+/**
+ * hildon_number_editor_get_value:
+ * @editor: pointer to #HildonNumberEditor
+ *
+ * This function returns current value of number editor
+ *
+ * Return value: Current NumberEditor value
+ */
+gint
+hildon_number_editor_get_value (HildonNumberEditor *editor)
+{
+    HildonNumberEditorPrivate *priv;
+    gint value;
+
+    g_return_val_if_fail(HILDON_IS_NUMBER_EDITOR(editor), 0);
+
+    priv = HILDON_NUMBER_EDITOR_GET_PRIVATE(editor);
+
+    value = atoi(GTK_ENTRY(priv->num_entry)->text);
+
+    return value;
+}
+
+/**
+ * hildon_number_editor_set_value:
+ * @editor: pointer to #HildonNumberEditor
+ * @value: numeric value for number editor
+ *
+ * This function sets numeric value to number editor
+ */
+void
+hildon_number_editor_set_value (HildonNumberEditor *editor, gint value)
+{
+    HildonNumberEditorPrivate *priv;
+    gchar *str;
+
+    g_return_if_fail(HILDON_IS_NUMBER_EDITOR(editor));
+
+    priv = HILDON_NUMBER_EDITOR_GET_PRIVATE(editor);
+
+    g_return_if_fail(value <= priv->end);
+    g_return_if_fail(value >= priv->start);
+
+    priv->default_val = value;
+        
+    str = integer_to_string(value);
+    gtk_entry_set_text(GTK_ENTRY(priv->num_entry), str);
+    if (str)
+        g_free(str);
+}
diff --git a/hildon-widgets/hildon-number-editor.h b/hildon-widgets/hildon-number-editor.h
new file mode 100644 (file)
index 0000000..f1ae4a0
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __HILDON_NUMBER_EDITOR_H__
+#define __HILDON_NUMBER_EDITOR_H__
+
+#include <gtk/gtkcontainer.h>
+
+G_BEGIN_DECLS
+#define HILDON_TYPE_NUMBER_EDITOR \
+  ( hildon_number_editor_get_type() )
+#define HILDON_NUMBER_EDITOR(obj) \
+  (GTK_CHECK_CAST (obj, HILDON_TYPE_NUMBER_EDITOR, HildonNumberEditor))
+#define HILDON_NUMBER_EDITOR_CLASS(klass) \
+  (GTK_CHECK_CLASS_CAST ((klass), HILDON_TYPE_NUMBER_EDITOR, \
+  HildonNumberEditorClass))
+#define HILDON_IS_NUMBER_EDITOR(obj) \
+  (GTK_CHECK_TYPE (obj, HILDON_TYPE_NUMBER_EDITOR))
+#define HILDON_IS_NUMBER_EDITOR_CLASS(klass) \
+  (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_NUMBER_EDITOR))
+typedef struct _HildonNumberEditor HildonNumberEditor;
+typedef struct _HildonNumberEditorClass HildonNumberEditorClass;
+
+struct _HildonNumberEditor {
+    GtkContainer parent;
+};
+
+struct _HildonNumberEditorClass {
+    GtkContainerClass parent_class;
+};
+
+/* Public API */
+
+GType hildon_number_editor_get_type(void);
+
+GtkWidget *hildon_number_editor_new(gint min, gint max);
+
+void hildon_number_editor_set_range(HildonNumberEditor *editor, gint min,
+                                    gint max);
+
+gint hildon_number_editor_get_value(HildonNumberEditor *editor);
+void hildon_number_editor_set_value(HildonNumberEditor *editor, gint value);
+
+G_END_DECLS
+#endif /* __HILDON_NUMBER_EDITOR_H__ */
diff --git a/hildon-widgets/hildon-range-editor.c b/hildon-widgets/hildon-range-editor.c
new file mode 100644 (file)
index 0000000..dc97d37
--- /dev/null
@@ -0,0 +1,681 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/*
+ * @file hildon-range-editor.c
+ * 
+ * This file implements the HildonRangeEditor widget.
+ *
+ */
+
+/* HILDON DOC
+ * @desc: Range Editor is used to define the range some attribute. Accepted
+ * number type is integer and '-' character is also acceptable. Range can
+ * be used in application area and in dialog.  
+ * 
+ */
+
+#include <pango/pango.h>
+#include <gtk/gtkbox.h>
+#include <gtk/gtkselection.h>
+#include <gtk/gtklabel.h>
+#include <gtk/gtkdnd.h>
+#include <gtk/gtksignal.h>
+#include <gtk/gtkentry.h>
+#include <gdk/gdkkeysyms.h>
+#include <stdio.h>
+#include <glib/gprintf.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <hildon-widgets/hildon-range-editor.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <libintl.h>
+#define _(String) gettext(String)
+
+/* Alignment in entry box ( 0 = left, 1 = right ) */
+#define DEFAULT_ALIGNMENT 1
+/* Amount of padding to add to each side of the separator */
+#define DEFAULT_PADDING 3
+
+#define DEFAULT_SEPARATOR _("-")
+#define DEFAULT_START -999 /*_("-999")*/
+#define DEFAULT_END 999 /*_("999")*/
+#define DEFAULT_LENGTH 4
+
+#define HILDON_RANGE_EDITOR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
+ HILDON_RANGE_EDITOR_TYPE, HildonRangeEditorPrivate));
+
+typedef struct _HildonRangeEditorPrivate HildonRangeEditorPrivate;
+
+/*our parent class*/
+static GtkContainerClass *parent_class = NULL;
+
+/*Init functions*/
+static void
+hildon_range_editor_class_init (HildonRangeEditorClass *editor_class);
+static void
+hildon_range_editor_init (HildonRangeEditor *editor);
+static void
+hildon_range_editor_forall (GtkContainer *container,
+                            gboolean include_internals, GtkCallback callback,
+                            gpointer callback_data);
+static void
+hildon_range_editor_destroy (GtkObject *self);
+
+/*size and font functions */
+static void
+hildon_range_editor_size_request (GtkWidget *widget,
+                                  GtkRequisition *requisition);
+static void
+hildon_range_editor_size_allocate (GtkWidget *widget,
+                                  GtkAllocation *allocation);
+static gboolean
+hildon_range_editor_entry_focus_in (GtkEditable *editable,
+                                    GdkEventFocus *event,
+                                    HildonRangeEditor *editor);
+static gboolean
+hildon_range_editor_entry_focus_out (GtkEditable *editable,
+                                    GdkEventFocus *event,
+                                    HildonRangeEditor *editor);
+static gboolean
+hildon_range_editor_entry_keypress (GtkWidget *widget, GdkEventKey *event,
+                                    HildonRangeEditor *editor);
+static gboolean
+hildon_range_editor_released (GtkEditable *editable, GdkEventButton *event,
+                              HildonRangeEditor *editor);
+static gboolean
+hildon_range_editor_press (GtkEditable *editable, GdkEventButton *event,
+                           HildonRangeEditor *editor);
+static gboolean
+hildon_range_editor_mnemonic_activate (GtkWidget *widget,
+                                       gboolean group_cycling);
+
+/* Private struct */
+struct _HildonRangeEditorPrivate
+{
+    GtkWidget *start_entry;
+    GtkWidget *end_entry;
+    GtkWidget *label;
+    gint range_limits_start;
+    gint range_limits_end;
+    gboolean bp;
+};
+
+/* Private functions */
+static void
+hildon_range_editor_class_init  (HildonRangeEditorClass *editor_class)
+{
+    GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(editor_class);
+    GtkContainerClass *container_class = GTK_CONTAINER_CLASS(editor_class);
+
+    /* set the global parent_class */
+    parent_class = g_type_class_peek_parent(editor_class);
+
+    /* now the object stuff */
+    g_type_class_add_private(editor_class,
+                             sizeof(HildonRangeEditorPrivate));
+
+    widget_class->size_request = hildon_range_editor_size_request;
+    widget_class->size_allocate = hildon_range_editor_size_allocate;
+
+    widget_class->mnemonic_activate = hildon_range_editor_mnemonic_activate;
+
+    container_class->forall = hildon_range_editor_forall;
+    GTK_OBJECT_CLASS(editor_class)->destroy = hildon_range_editor_destroy;
+
+    gtk_widget_class_install_style_property(widget_class,
+        g_param_spec_int("hildon_range_editor_entry_alignment",
+                         "Hildon RangeEditor entry alignment",
+                         "Hildon RangeEditor entry alignment", 0, 1,
+                         DEFAULT_ALIGNMENT,
+                         G_PARAM_READABLE));
+
+    gtk_widget_class_install_style_property(widget_class,
+        g_param_spec_int("hildon_range_editor_separator_padding",
+                         "Hildon RangeEditor separator padding",
+                         "Hildon RangeEditor separaror padding",
+                         G_MININT, G_MAXINT,
+                         DEFAULT_PADDING,
+                         G_PARAM_READABLE));
+
+    return;
+}
+
+static void
+hildon_range_editor_init (HildonRangeEditor *editor)
+{
+    HildonRangeEditorPrivate *priv;
+
+    gint range_editor_entry_alignment;
+    gint range_editor_separator_padding;
+
+    priv = HILDON_RANGE_EDITOR_GET_PRIVATE(editor);
+
+    GTK_WIDGET_SET_FLAGS(editor, GTK_NO_WINDOW);
+    
+    gtk_widget_push_composite_child();
+    
+    priv->start_entry = GTK_WIDGET(gtk_entry_new());
+    priv->end_entry = GTK_WIDGET(gtk_entry_new());
+    priv->label = GTK_WIDGET(gtk_label_new(DEFAULT_SEPARATOR));
+    priv->bp = FALSE;
+    
+    /* Get values from gtkrc (or use defaults) */
+    gtk_widget_style_get(GTK_WIDGET(editor),
+                         "hildon_range_editor_entry_alignment",
+                         &range_editor_entry_alignment,
+                         "hildon_range_editor_separator_padding",
+                         &range_editor_separator_padding, NULL);
+
+    /* Add padding to separator */
+    gtk_misc_set_padding (GTK_MISC(priv->label),
+                          range_editor_separator_padding, 0);
+
+    /* Align the text to right in entry box */
+    gtk_entry_set_alignment(GTK_ENTRY(priv->start_entry),
+                            range_editor_entry_alignment);
+    gtk_entry_set_alignment(GTK_ENTRY(priv->end_entry),
+                            range_editor_entry_alignment);
+
+/*    gtk_entry_set_text(GTK_ENTRY(priv->start_entry), DEFAULT_START);
+    gtk_entry_set_text(GTK_ENTRY(priv->end_entry), DEFAULT_END);
+    gtk_entry_set_max_length(GTK_ENTRY(priv->start_entry), DEFAULT_LENGTH);
+    gtk_entry_set_max_length(GTK_ENTRY(priv->end_entry), DEFAULT_LENGTH);
+    gtk_entry_set_width_chars(GTK_ENTRY(priv->start_entry), DEFAULT_LENGTH);
+    gtk_entry_set_width_chars(GTK_ENTRY(priv->end_entry), DEFAULT_LENGTH);
+  */  
+    gtk_widget_set_parent(priv->start_entry, GTK_WIDGET(editor));
+    gtk_widget_set_parent(priv->end_entry, GTK_WIDGET(editor));
+    gtk_widget_set_parent(priv->label, GTK_WIDGET(editor));
+    
+    g_signal_connect(G_OBJECT(priv->start_entry), "button-release-event",
+                     G_CALLBACK(hildon_range_editor_released), editor);
+    g_signal_connect(G_OBJECT(priv->end_entry), "button-release-event",
+                     G_CALLBACK(hildon_range_editor_released), editor);
+                     
+    g_signal_connect(G_OBJECT(priv->start_entry), "button-press-event",
+                     G_CALLBACK(hildon_range_editor_press), editor);
+    g_signal_connect(G_OBJECT(priv->end_entry), "button-press-event",
+                     G_CALLBACK(hildon_range_editor_press), editor);
+                     
+    g_signal_connect(G_OBJECT(priv->start_entry), "key-press-event",
+                       G_CALLBACK(hildon_range_editor_entry_keypress), editor);
+    g_signal_connect(G_OBJECT(priv->end_entry), "key-press-event",
+                       G_CALLBACK(hildon_range_editor_entry_keypress), editor);
+
+    g_signal_connect(G_OBJECT(priv->start_entry), "focus-in-event",
+                     G_CALLBACK(hildon_range_editor_entry_focus_in), editor);
+    g_signal_connect(G_OBJECT(priv->end_entry), "focus-in-event",
+                     G_CALLBACK(hildon_range_editor_entry_focus_in), editor);
+
+    g_signal_connect(G_OBJECT(priv->start_entry), "focus-out-event",
+                     G_CALLBACK(hildon_range_editor_entry_focus_out), editor);
+    g_signal_connect(G_OBJECT(priv->end_entry), "focus-out-event",
+                     G_CALLBACK(hildon_range_editor_entry_focus_out), editor);
+                       
+    gtk_widget_show(priv->start_entry);
+    gtk_widget_show(priv->end_entry);
+    gtk_widget_show(priv->label);
+
+    hildon_range_editor_set_limits(editor, DEFAULT_START, DEFAULT_END);
+    
+    gtk_widget_pop_composite_child();
+}
+
+static gboolean
+hildon_range_editor_entry_focus_in (GtkEditable *editable,
+                                    GdkEventFocus *event,
+                                    HildonRangeEditor *editor)
+{
+  HildonRangeEditorPrivate *priv = HILDON_RANGE_EDITOR_GET_PRIVATE(editor);
+  if(priv->bp)
+  {
+    priv->bp = FALSE;
+    return FALSE;
+  }
+  if (GTK_WIDGET(editable) == priv->start_entry)
+    gtk_editable_select_region(editable, -1, 0);
+  else
+    gtk_editable_select_region(editable, 0, -1);
+  return FALSE;
+}
+
+static gboolean
+hildon_range_editor_entry_focus_out (GtkEditable *editable,
+                                    GdkEventFocus *event,
+                                    HildonRangeEditor *editor)
+{
+  HildonRangeEditorPrivate *priv = HILDON_RANGE_EDITOR_GET_PRIVATE(editor);
+  hildon_range_editor_set_range( editor,
+                            g_strtod(GTK_ENTRY(priv->start_entry)->text, NULL),
+                            g_strtod(GTK_ENTRY(priv->end_entry)->text, NULL));
+  return FALSE;
+}
+
+static gboolean
+hildon_range_editor_press (GtkEditable *editable, GdkEventButton *event,
+                           HildonRangeEditor *editor)
+{
+  HildonRangeEditorPrivate *priv = HILDON_RANGE_EDITOR_GET_PRIVATE(editor);
+  priv->bp = TRUE;
+  return FALSE;
+}
+
+static gboolean
+hildon_range_editor_mnemonic_activate (GtkWidget *widget,
+                                       gboolean group_cycling)
+{
+  HildonRangeEditorPrivate *priv = HILDON_RANGE_EDITOR_GET_PRIVATE(widget);
+  gtk_widget_grab_focus( priv->start_entry );
+  return TRUE;
+}
+
+static void
+hildon_range_editor_forall (GtkContainer *container,
+                            gboolean include_internals,
+                            GtkCallback callback, gpointer callback_data)
+{
+    HildonRangeEditorPrivate *priv;
+
+    g_return_if_fail(container);
+    g_return_if_fail(callback);
+
+    priv = HILDON_RANGE_EDITOR_GET_PRIVATE(container);
+
+    if (!include_internals)
+      return;
+    
+    (*callback) (priv->start_entry, callback_data);
+    (*callback) (priv->end_entry, callback_data);
+    (*callback) (priv->label, callback_data);
+}
+
+static void
+hildon_range_editor_destroy(GtkObject *self)
+{
+    HildonRangeEditorPrivate *priv = HILDON_RANGE_EDITOR_GET_PRIVATE(self);
+
+    if (priv->start_entry)
+    {
+      gtk_widget_unparent(priv->start_entry);
+      priv->start_entry = NULL;
+    }
+    if (priv->end_entry)
+    {
+      gtk_widget_unparent(priv->end_entry);
+      priv->end_entry = NULL;
+    }
+    if (priv->label)
+    {
+      gtk_widget_unparent(priv->label);
+      priv->label = NULL;
+    }
+
+    if (GTK_OBJECT_CLASS(parent_class)->destroy)
+        GTK_OBJECT_CLASS(parent_class)->destroy(self);
+}
+
+
+static void
+hildon_range_editor_size_request(GtkWidget *widget,
+                                 GtkRequisition *requisition)
+{
+    HildonRangeEditorPrivate *priv = NULL;
+    GtkRequisition lab_req, mreq;
+    
+    priv = HILDON_RANGE_EDITOR_GET_PRIVATE(widget);
+
+    gtk_entry_get_width_chars(GTK_ENTRY(priv->end_entry));
+    
+    gtk_widget_size_request(priv->start_entry, &mreq);
+    gtk_widget_size_request(priv->end_entry, &mreq);
+    gtk_widget_size_request(priv->label, &lab_req);
+
+    requisition->width = mreq.width * 2 + lab_req.width +
+                         widget->style->xthickness * 2;
+    requisition->height = mreq.height + widget->style->ythickness * 2;
+    requisition->height = (requisition->height > lab_req.height) ?
+                           requisition->height : lab_req.height;
+}
+
+static void
+hildon_range_editor_size_allocate(GtkWidget *widget,
+                                  GtkAllocation *allocation)
+{
+    HildonRangeEditorPrivate *priv;
+    GtkAllocation child1_allocation, child2_allocation, child3_allocation;
+
+    priv = HILDON_RANGE_EDITOR_GET_PRIVATE(widget);
+
+    widget->allocation = *allocation;
+
+    if (priv->start_entry && GTK_WIDGET_VISIBLE(priv->start_entry))
+      {
+        GtkRequisition child_requisition;
+
+        gtk_widget_get_child_requisition(priv->start_entry,
+                                         &child_requisition);
+
+        child1_allocation.x = allocation->x;
+        child1_allocation.y = allocation->y;
+
+        child1_allocation.width = child_requisition.width;
+        child1_allocation.height = allocation->height;
+
+        gtk_widget_size_allocate(priv->start_entry, &child1_allocation);
+      }
+
+    if (priv->label && GTK_WIDGET_VISIBLE(priv->label))
+      {
+        GtkRequisition child_requisition;
+
+        gtk_widget_get_child_requisition(priv->label, &child_requisition);
+
+        child2_allocation.x = child1_allocation.x + child1_allocation.width;
+        child2_allocation.y = allocation->y;
+        child2_allocation.width = child_requisition.width + 4;
+        child2_allocation.height = allocation->height;
+
+        gtk_widget_size_allocate (priv->label, &child2_allocation);
+      }
+
+    if (priv->end_entry && GTK_WIDGET_VISIBLE(priv->end_entry))
+      {
+        GtkRequisition child_requisition;
+
+        gtk_widget_get_child_requisition (priv->end_entry, &child_requisition);
+
+        child3_allocation.x = child2_allocation.x + child2_allocation.width;
+        child3_allocation.y = allocation->y;
+
+        child3_allocation.width = child_requisition.width;
+        child3_allocation.height = allocation->height;
+
+        gtk_widget_size_allocate(priv->end_entry, &child3_allocation);
+      }
+}
+
+static gboolean
+hildon_range_editor_released(GtkEditable *editable, GdkEventButton *event,
+                             HildonRangeEditor *editor)
+{
+    HildonRangeEditorPrivate *priv = HILDON_RANGE_EDITOR_GET_PRIVATE(editor);
+    if (GTK_WIDGET(editable) == priv->start_entry)
+      gtk_editable_select_region(editable, -1, 0);
+    else
+      gtk_editable_select_region(editable, 0, -1); 
+    return FALSE;
+}
+
+static gboolean
+hildon_range_editor_entry_keypress(GtkWidget *widget, GdkEventKey *event,
+                                   HildonRangeEditor *editor)
+{
+    HildonRangeEditorPrivate *priv;
+    GtkWidget *wdgt;
+    gint pos;
+    gchar *str;
+
+    priv = HILDON_RANGE_EDITOR_GET_PRIVATE(editor);
+
+    wdgt = widget == priv->start_entry ? priv->end_entry : priv->start_entry;
+    str = GTK_ENTRY(widget)->text;
+    pos = gtk_editable_get_position(GTK_EDITABLE(widget));
+    if (pos > 0 && (event->keyval == GDK_minus ||
+                    event->keyval == GDK_KP_Subtract))
+       return TRUE;
+
+    if (strlen(str) == pos)
+      pos = -1;
+
+    if ((widget == priv->start_entry &&
+        (event->keyval == GDK_Tab || (pos == -1 &&
+        (event->keyval == GDK_Right || event->keyval == GDK_KP_Right)))) ||
+        (widget == priv->end_entry &&
+        (event->keyval == GDK_ISO_Left_Tab|| (pos == 0 &&
+        (event->keyval == GDK_Left || event->keyval == GDK_KP_Left)))))
+    {
+      gtk_widget_grab_focus(wdgt);
+      if (widget == priv->start_entry)
+      {
+        gtk_editable_set_position(GTK_EDITABLE(priv->end_entry), -1);
+        gtk_editable_select_region(GTK_EDITABLE(wdgt), 0, -1);
+      }
+      else
+      {
+        gtk_editable_set_position(GTK_EDITABLE(priv->end_entry), 0);
+        gtk_editable_select_region(GTK_EDITABLE(wdgt), -1, 0);
+      }
+    }
+    else if ((event->keyval >= GDK_0 && event->keyval <= GDK_9) ||
+             (event->keyval >= GDK_KP_0 && event->keyval <= GDK_KP_9) ||
+             (event->keyval == GDK_minus || event->keyval == GDK_KP_Subtract) ||
+             event->keyval == GDK_Up || event->keyval == GDK_Down ||
+             event->keyval == GDK_Right || event->keyval == GDK_KP_Right ||
+             event->keyval == GDK_Left || event->keyval == GDK_KP_Left ||
+             event->keyval == GDK_BackSpace || event->keyval == GDK_Delete)
+    {
+      return FALSE;
+    }
+    return TRUE;
+}
+
+/* Public functions */
+
+/**
+ * hildon_range_editor_get_type:
+ * @Returns : GType of #HildonRangeEditor.
+ *
+ * Initialises, and returns the type of a hildon range editor.
+ */
+GType
+hildon_range_editor_get_type (void)
+{
+    static GType editor_type = 0;
+
+    if (!editor_type)
+      {
+        static const GTypeInfo editor_info =
+          {
+            sizeof(HildonRangeEditorClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_range_editor_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonRangeEditor),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_range_editor_init,
+          };
+        editor_type = g_type_register_static(GTK_TYPE_CONTAINER,
+                                             "HildonRangeEditor",
+                                             &editor_info, 0);
+      }
+    return editor_type;
+}
+
+/**
+ * hildon_range_editor_new:
+ *
+ * HildonRangeEditor contains two GtkEntrys that accept numbers and minus. 
+ *
+ * Return value: pointer to a new @HildonRangeEditor widget.
+ **/
+GtkWidget *
+hildon_range_editor_new (void)
+{
+    return GTK_WIDGET(g_object_new(HILDON_RANGE_EDITOR_TYPE, NULL));
+}
+
+
+/**
+ * hildon_range_editor_new_with_separator:
+ * @separator: A string that is shown between the numbers.
+ *
+ * HildonRangeEditor contains two @GtkEntrys that accept numbers. 
+ * @separator is displayed between two entrys.
+ * CHECKME: Use '-' as a separator in the case of null separator?
+ *
+ * Return value: pointer to a new @HildonRangeEditor widget.
+ **/
+GtkWidget *
+hildon_range_editor_new_with_separator (gchar *separator)
+{
+    HildonRangeEditor *editor;
+    HildonRangeEditorPrivate *priv;
+
+    editor = g_object_new(HILDON_RANGE_EDITOR_TYPE, NULL);
+    priv = HILDON_RANGE_EDITOR_GET_PRIVATE(editor);
+
+    if (separator)
+      gtk_label_set_text(GTK_LABEL(priv->label), separator);
+
+    return GTK_WIDGET(editor);
+}
+
+
+/**
+ * hildon_range_editor_set_range:
+ * @editor: the #HildonRangeEditor widget.
+ * @start: range's start value. 
+ * @end: range's end value.
+ *
+ * Sets a range to the editor. (The current value)
+ *
+ * Sets the range of the @HildonRangeEditor widget.
+ **/
+void
+hildon_range_editor_set_range (HildonRangeEditor *editor, gint start, gint end)
+{
+    HildonRangeEditorPrivate *priv;
+    gchar start_range[12];
+    gchar end_range[12];
+
+    g_return_if_fail(editor);
+    g_return_if_fail(HILDON_IS_RANGE_EDITOR(editor));
+
+    priv = HILDON_RANGE_EDITOR_GET_PRIVATE(editor);
+
+    if (priv->range_limits_start <= start && priv->range_limits_end >= start)
+      g_sprintf(start_range, "%d", start);
+    else
+      g_sprintf(start_range, "%d", priv->range_limits_start);
+
+    gtk_entry_set_text(GTK_ENTRY(priv->start_entry), start_range);
+    
+    if (priv->range_limits_start <= end && priv->range_limits_end >= end)
+      g_sprintf(end_range, "%d", end);
+    else
+      g_sprintf(end_range, "%d", priv->range_limits_end);
+
+    gtk_entry_set_text(GTK_ENTRY(priv->end_entry), end_range);
+}
+
+
+/**
+ * hildon_range_editor_get_range:
+ * @editor: the #HildonRangeEditor widget.
+ * @start: ranges start value.
+ * @end: ranges end value.
+ *
+ * Gets the range of the @HildonRangeEditor widget.
+ **/
+void
+hildon_range_editor_get_range (HildonRangeEditor *editor, gint *start,
+                               gint *end)
+{
+    HildonRangeEditorPrivate *priv;
+    g_return_if_fail (HILDON_IS_RANGE_EDITOR(editor) || start || end);
+    priv = HILDON_RANGE_EDITOR_GET_PRIVATE(editor);
+
+    *start = g_strtod(GTK_ENTRY(priv->start_entry)->text, NULL);
+    *end = g_strtod(GTK_ENTRY(priv->end_entry)->text, NULL);
+}
+
+
+/**
+ * hildon_range_editor_set_limits:
+ * @editor: the #HildonRangeEditor widget.
+ * @start: minimum acceptable value (default: no limit).
+ * @end: maximum accecptable value (default: no limit).
+ *
+ * if start's or end's value is larger than maximum acceptable integer
+ * '999999999', function sets the maximum value for integer
+ *
+ * if start's or end's value is smaller than minimum acceptable integer
+ * '-99999999', function sets the minimum value for integer
+ * 
+ * Sets the range of the @HildonRangeEditor widget.
+ **/
+void
+hildon_range_editor_set_limits (HildonRangeEditor *editor, gint start,
+                                gint end)
+{
+    HildonRangeEditorPrivate *priv;
+    gchar start_range[12];
+    gchar end_range[12];
+    gint lenght = 0;
+    gint at, bt;
+    
+    g_return_if_fail(editor);
+    g_return_if_fail(HILDON_IS_RANGE_EDITOR(editor));
+
+    priv = HILDON_RANGE_EDITOR_GET_PRIVATE(editor);
+
+    if(start>end)
+    {
+      gint tmp = start;
+      start = end;
+      end = tmp;
+    }
+    
+    g_sprintf(start_range, "%d", start);
+    g_sprintf(end_range, "%d", end);
+    
+    at = strlen( start_range );
+    bt = strlen( end_range );
+    
+    if (at > bt)
+      lenght = at;
+    else
+      lenght = bt;
+    
+    gtk_entry_set_width_chars(GTK_ENTRY(priv->start_entry), lenght);
+    gtk_entry_set_max_length(GTK_ENTRY(priv->start_entry), lenght);
+    gtk_entry_set_text(GTK_ENTRY(priv->start_entry), start_range);
+
+    gtk_entry_set_width_chars(GTK_ENTRY(priv->end_entry), lenght);
+    gtk_entry_set_max_length(GTK_ENTRY(priv->end_entry), lenght);
+    gtk_entry_set_text(GTK_ENTRY(priv->end_entry), end_range);
+
+    priv->range_limits_start = start;
+    priv->range_limits_end = end;
+}
diff --git a/hildon-widgets/hildon-range-editor.h b/hildon-widgets/hildon-range-editor.h
new file mode 100644 (file)
index 0000000..b5a8d05
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef HILDON_RANGE_EDITOR_H
+#define HILDON_RANGE_EDITOR_H
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gtk/gtkcontainer.h>
+#include <gtk/gtkhbox.h>
+
+
+G_BEGIN_DECLS
+/**
+ * HILDON_RANGE_EDITOR_TYPE
+ *
+ * Macro for getting type of range editor.
+ */
+#define HILDON_RANGE_EDITOR_TYPE (hildon_range_editor_get_type())
+#define HILDON_RANGE_EDITOR(obj) \
+        (GTK_CHECK_CAST (obj, HILDON_RANGE_EDITOR_TYPE, HildonRangeEditor))
+#define HILDON_RANGE_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass),\
+         HILDON_RANGE_EDITOR_TYPE, HildonRangeEditorClass))
+#define HILDON_IS_RANGE_EDITOR(obj) \
+        (GTK_CHECK_TYPE (obj, HILDON_RANGE_EDITOR_TYPE))
+#define HILDON_IS_RANGE_EDITOR_CLASS(klass) \
+        (GTK_CHECK_CLASS_TYPE ((klass), HILDON_RANGE_EDITOR_TYPE))
+/**
+ * HildonRangeEditor:
+ *
+ * Internal struct for range editor.
+ */
+typedef struct _HildonRangeEditor HildonRangeEditor;
+typedef struct _HildonRangeEditorClass HildonRangeEditorClass;
+
+
+struct _HildonRangeEditor {
+    GtkContainer parent;
+};
+
+struct _HildonRangeEditorClass {
+    GtkContainerClass parent_class;
+};
+
+GType hildon_range_editor_get_type(void) G_GNUC_CONST;
+
+GtkWidget *hildon_range_editor_new_with_separator(gchar * separator);
+GtkWidget *hildon_range_editor_new(void);
+
+void hildon_range_editor_set_range(HildonRangeEditor * editor,
+                                   gint start, gint end);
+void hildon_range_editor_get_range(HildonRangeEditor * editor,
+                                   gint * start, gint * end);
+void hildon_range_editor_set_limits(HildonRangeEditor * editor,
+                                    gint start, gint end);
+
+G_END_DECLS
+#endif
diff --git a/hildon-widgets/hildon-scroll-area.c b/hildon-widgets/hildon-scroll-area.c
new file mode 100644 (file)
index 0000000..a697270
--- /dev/null
@@ -0,0 +1,676 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/* hildon-scroll-area.c
+ *
+ * The reason why this is not made as a widget:
+ *  We can not create a widget which could return the correct child.
+ *  (ie. by gtk_bin_get_child)
+ *
+ * There is a problem with signals. Signals are emited pretty requently
+ * and so these handlers are runned pretty often. That has made some problems.
+ * There is tons of different situations where the signals are emited
+ * and to make a code which works in every situation and does not break
+ * any other situation -> pretty crocky.
+ *
+*/
+
+
+#include "hildon-scroll-area.h"
+#include <gtk/gtkscrolledwindow.h>
+#include <gtk/gtkfixed.h>
+#include <gtk/gtkadjustment.h>
+#include <gtk/gtkwidget.h>
+#include <gtk/gtkeventbox.h>
+#include <string.h>
+
+#define DEBUG_TEXT 0
+
+typedef struct {
+    GtkWidget *swouter;
+    GtkWidget *fixed;
+    GtkWidget *swinner;
+    GtkWidget *child;
+    GtkWidget *ebox;
+
+    GtkAdjustment *outadj;
+    GtkAdjustment *inadj;
+
+    gdouble last_value_diff;
+    gdouble last_page_size;
+    gdouble last_upper;
+    gdouble last_value;
+    gdouble out_last_value;
+
+    gint inner_changed:1;
+    gint inner_value_changed:1;
+
+} HildonScrollArea;
+
+
+static void hildon_scroll_area_outer_value_changed(GtkAdjustment *adjustment,
+                                                   HildonScrollArea *sc);
+static void hildon_scroll_area_inner_changed(GtkAdjustment *adjustment,
+                                             HildonScrollArea *sc);
+static void hildon_scroll_area_inner_value_changed(GtkAdjustment *adjustment,
+                                                   HildonScrollArea *sc);
+static gboolean hildon_scroll_area_event_box_press(GtkWidget *ebox,
+                                                   GdkEvent *event,
+                                                   HildonScrollArea *sc);
+static void hildon_scroll_area_size_allocate(GtkWidget *widget,
+                                            GtkAllocation *allocation,
+                                            HildonScrollArea *sc);
+
+/**
+ * hildon_scroll_area_new:
+ * @sw: #GtkWidget - #GtkScrolledWindow
+ * @child: #GtkWidget - Child to be place inside the sw
+ *
+ * This is not a widget. It's a helper function to create
+ * hildon specified scrolling method for Device.
+ * Puts and connects the @child to the @sw.
+ *
+ * Returns: a @GtkFixed
+ */
+GtkWidget *hildon_scroll_area_new(GtkWidget *sw, GtkWidget *child)
+{
+    GtkWidget *swi;
+    GtkWidget *fixed;
+    HildonScrollArea *sc;
+
+    g_return_val_if_fail(GTK_IS_SCROLLED_WINDOW(sw)
+                         && GTK_IS_WIDGET(child), NULL);
+
+    swi = gtk_scrolled_window_new(NULL, NULL);
+    fixed = gtk_fixed_new();
+    sc = g_malloc(sizeof(HildonScrollArea));
+    memset(sc, 0, sizeof(HildonScrollArea));
+
+    sc->ebox = gtk_event_box_new();
+    gtk_widget_set_events(sc->ebox, GDK_BUTTON_PRESS_MASK);
+
+    gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(swi),
+                                   GTK_POLICY_NEVER, GTK_POLICY_NEVER);
+
+    gtk_container_add(GTK_CONTAINER(swi), child);
+    gtk_fixed_put(GTK_FIXED(fixed), sc->ebox, 0, 0);
+    gtk_fixed_put(GTK_FIXED(fixed), swi, 0, 0);
+
+    sc->swouter = sw;
+    sc->fixed = fixed;
+    sc->swinner = swi;
+    sc->child = child;
+    sc->outadj = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(sw));
+    sc->inadj = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(swi));
+
+    g_signal_connect(G_OBJECT(sc->outadj), "value_changed",
+                     G_CALLBACK(hildon_scroll_area_outer_value_changed), sc);
+    g_signal_connect(G_OBJECT(sc->inadj), "changed",
+                     G_CALLBACK(hildon_scroll_area_inner_changed), sc);
+    g_signal_connect(G_OBJECT(sc->inadj), "value_changed",
+                     G_CALLBACK(hildon_scroll_area_inner_value_changed), sc);
+    g_signal_connect(G_OBJECT(sc->ebox), "button-press-event",
+                     G_CALLBACK(hildon_scroll_area_event_box_press), sc);
+    g_signal_connect_after(G_OBJECT(sw), "size-allocate",
+                     G_CALLBACK(hildon_scroll_area_size_allocate), sc);
+
+    gtk_widget_show_all(sw);
+    
+    gtk_widget_queue_resize(sw);
+    gtk_widget_queue_draw(sw);
+
+    return fixed;
+}
+
+
+static void hildon_scroll_area_outer_value_changed(GtkAdjustment *adjustment,
+                                                   HildonScrollArea *sc)
+{
+    if ((adjustment->value + adjustment->page_size) >
+        sc->fixed->allocation.y
+        && (sc->fixed->allocation.y + sc->fixed->allocation.height) >
+        adjustment->value) {
+        /* If the fixed is on the screen, we have to update it */
+        gtk_adjustment_value_changed(sc->inadj);
+    }
+}
+
+
+static void hildon_scroll_area_inner_changed(GtkAdjustment *adjustment,
+                                             HildonScrollArea *sc)
+{
+    GtkRequisition req;
+    gboolean refress = FALSE;
+    gboolean mid = FALSE;
+
+    if (sc->inner_changed)
+    {
+      #if DEBUG_TEXT
+      g_print("A\n");
+      #endif
+      sc->inner_changed = FALSE;
+      return;
+    }
+
+    /* If child wants less space than we have allocated */
+    gtk_widget_size_request(sc->child, &req);
+    if (req.height < sc->swinner->allocation.height)
+    {
+      #if DEBUG_TEXT
+      g_print("B");
+      #endif
+      adjustment->upper = adjustment->page_size = (gdouble) req.height;
+    }
+
+
+    /* If the amount of content is changed */
+    if (sc->last_upper != adjustment->upper)
+    {
+      #if DEBUG_TEXT
+      g_print("C");
+      #endif
+      if (adjustment->upper < adjustment->page_size)
+      {
+        #if DEBUG_TEXT
+        g_print("D");
+        #endif
+        /* Content is getting smaller than our page -> Shrinking page */
+        adjustment->page_size = adjustment->upper;
+      }
+      sc->last_upper = adjustment->upper;
+      refress = TRUE;
+    }
+
+    /* If the page size is changed */
+    if (sc->last_page_size != adjustment->page_size)
+    {
+      #if DEBUG_TEXT
+      g_print("E");
+      #endif
+        if (sc->outadj->value <= sc->fixed->allocation.y)
+        {
+        #if DEBUG_TEXT
+        g_print("F");
+        #endif
+            /* We are before the start of fixed */
+            adjustment->value = 0;
+            adjustment->page_size = sc->outadj->page_size -
+                (sc->fixed->allocation.y - sc->outadj->value);
+
+            if ((sc->fixed->allocation.y + sc->fixed->allocation.height) <
+                (sc->outadj->value + sc->outadj->page_size))
+            {
+              #if DEBUG_TEXT
+              g_print("G");
+              #endif
+                /* The fixed is at the center of screen */
+                mid = TRUE;
+            }
+        }
+        else if (sc->outadj->value >= sc->fixed->allocation.y)
+        {
+          #if DEBUG_TEXT
+          g_print("H");
+          #endif
+            if ((sc->fixed->allocation.y + sc->fixed->allocation.height) <
+                (sc->outadj->value + sc->outadj->page_size) &&
+                (adjustment->page_size - sc->last_page_size) <
+                MAX(sc->last_value_diff, 0))
+            {
+              #if DEBUG_TEXT
+              g_print("I");
+              #endif
+                /* We are over the end of fixed */
+                adjustment->value =
+                    sc->outadj->value - sc->fixed->allocation.y;
+                adjustment->page_size =
+                    (sc->fixed->allocation.y +
+                     sc->fixed->allocation.height) - sc->outadj->value;
+            }
+            else
+            {
+              #if DEBUG_TEXT
+              g_print("J");
+              #endif
+                /* We are wondering to the middle (This should happen only 
+                   when "getting IN" to the fixed) */
+                adjustment->value =
+                    sc->outadj->value - sc->fixed->allocation.y;
+                adjustment->page_size = sc->outadj->page_size;
+            }
+        }
+        refress = TRUE;
+        sc->last_page_size = adjustment->page_size;
+    }
+
+
+    /* Last time checks ->
+       Yes, system is working so randomly that this is needed
+       This is a hack in a way.. But so it shall be. */
+    if (adjustment->page_size > adjustment->upper)
+    {
+      #if DEBUG_TEXT
+      g_print("K");
+      #endif
+      adjustment->page_size = adjustment->upper;
+    }
+
+    /* If we made changes -> Refress */
+    if (refress)
+    {
+        gint new_width;
+        #if DEBUG_TEXT
+        g_print("L");
+        #endif
+        sc->inner_changed = TRUE;
+
+        if (sc->swinner->allocation.width <= sc->fixed->allocation.width &&
+            sc->fixed->allocation.width != 1)
+        {
+          #if DEBUG_TEXT
+          g_print("M");
+          #endif
+            new_width = sc->fixed->allocation.width;
+            if( !GTK_WIDGET_REALIZED(sc->swinner) )
+              gtk_widget_realize(sc->swinner);
+        }
+        else
+            new_width = -1;
+
+        if (adjustment->page_size <= 0)
+        {
+          #if DEBUG_TEXT
+          g_print("N");
+          #endif
+            gtk_widget_set_size_request(sc->swinner, new_width, -1);
+        }
+        else if( mid )
+        {
+            gtk_widget_set_size_request( sc->swinner, new_width,
+                                         sc->fixed->allocation.height );
+        }
+        else
+        {
+          #if DEBUG_TEXT
+          g_print("O");
+          #endif
+            gtk_widget_set_size_request(sc->swinner, new_width,
+                                        (gint) adjustment->page_size);
+        }
+
+        if (adjustment->upper <= 0)
+        {
+          #if DEBUG_TEXT
+          g_print("P");
+          #endif
+            gtk_widget_set_size_request(sc->fixed, -1, -1);
+        }
+        else
+            gtk_widget_set_size_request(sc->fixed, -1,
+                                        (gint) adjustment->upper);
+
+        if (mid)
+        {
+          #if DEBUG_TEXT
+          g_print("Q");
+          #endif
+            gtk_widget_set_size_request(sc->ebox, new_width,
+                                        sc->fixed->allocation.height);
+        }
+
+        gtk_adjustment_changed(adjustment);
+        gtk_adjustment_value_changed(adjustment);
+    }
+  #if DEBUG_TEXT
+  g_print("\n");
+  #endif
+}
+
+
+static void hildon_scroll_area_inner_value_changed(GtkAdjustment *adjustment,
+                                                   HildonScrollArea *sc)
+{
+    gboolean refress = FALSE;
+
+    if (sc->inner_value_changed)
+    {
+        #if DEBUG_TEXT
+        g_print("1\n");
+        #endif
+        sc->inner_value_changed = FALSE;
+        return;
+    }
+
+    if (sc->out_last_value != sc->outadj->value)
+    {
+        #if DEBUG_TEXT
+        g_print("2");
+        #endif
+        /* Mouse movement comes here */
+        if (sc->outadj->value < sc->fixed->allocation.y)
+        {
+          #if DEBUG_TEXT
+          g_print("3");
+          #endif
+            /* We are before the top of fixed-> The value is 0 every time
+               But we may have to update the page size */
+            adjustment->value = 0;
+            if ((sc->outadj->value + sc->outadj->page_size) <
+                (sc->fixed->allocation.y + sc->fixed->allocation.height))
+            {
+              #if DEBUG_TEXT
+              g_print("4");
+              #endif
+
+                if ((sc->outadj->value + sc->outadj->page_size) <
+                    (sc->fixed->allocation.y))
+                {
+                  #if DEBUG_TEXT
+                  g_print("5");
+                  #endif
+                    /* The fixed is not on the screen -> go get it boy! */
+                    sc->outadj->value = sc->fixed->allocation.y +
+                        adjustment->value;
+                }
+
+
+                /* The top of fixed is positioned on the screen We have to 
+                   change the page size */
+                adjustment->page_size = sc->outadj->page_size -
+                    (sc->fixed->allocation.y - sc->outadj->value);
+            }
+            else
+            {
+              #if DEBUG_TEXT
+              g_print("6");
+              #endif
+                /* The fixed is small and it fits
+                   complitely on the screen */
+                adjustment->page_size = sc->outadj->page_size -
+                    ((sc->fixed->allocation.y - sc->outadj->value) +
+                     ((sc->outadj->value + sc->outadj->page_size) -
+                      (sc->fixed->allocation.y +
+                       sc->fixed->allocation.height)));
+            }
+        }
+        else if ((sc->outadj->value + sc->outadj->page_size) >
+                   (sc->fixed->allocation.y +
+                    sc->fixed->allocation.height))
+        {
+          #if DEBUG_TEXT
+          g_print("7");
+          #endif
+            if ((sc->outadj->value) >
+                (sc->fixed->allocation.y + sc->fixed->allocation.height))
+            {
+              #if DEBUG_TEXT
+              g_print("8");
+              #endif
+                /* The fixed is not on the screen */
+                sc->outadj->value = sc->fixed->allocation.y +
+                    adjustment->value;
+            }
+
+
+            /* We are after the bottom of fixed-> We have to change the
+               values */
+            adjustment->page_size =
+                (sc->fixed->allocation.y + sc->fixed->allocation.height) -
+                sc->outadj->value;
+            adjustment->value =
+                sc->fixed->allocation.height - adjustment->page_size;
+        }
+        else
+        {
+          #if DEBUG_TEXT
+          g_print("9");
+          #endif
+            /* We are at the center of fixed -> The page_size is always
+               same as the outers one */
+            adjustment->page_size = sc->outadj->page_size;
+            adjustment->value =
+                sc->outadj->value - sc->fixed->allocation.y;
+        }
+        sc->last_value = adjustment->value;
+        refress = TRUE;
+    }
+
+    if (sc->last_value != adjustment->value)
+    {
+        #if DEBUG_TEXT
+        g_print("-10-");
+        #endif
+        /* We have changed from the last time */
+        if (adjustment->upper > sc->outadj->page_size)
+        {
+          #if DEBUG_TEXT
+          g_print("-11-");
+          #endif
+            /* If amount of content is greater than the page size, it will
+               be informed here. */
+            if (adjustment->page_size != sc->outadj->page_size)
+            {
+              #if DEBUG_TEXT
+              g_print("-12-");
+              #endif
+                if (sc->outadj->value < sc->fixed->allocation.y)
+                {
+                  #if DEBUG_TEXT
+                  g_print("-13-");
+                  #endif
+                    /* We are over the top of fixed */
+                    sc->outadj->value +=
+                        adjustment->value - sc->last_value;
+                    adjustment->page_size +=
+                        adjustment->value - sc->last_value;
+
+                    if (adjustment->page_size > sc->outadj->page_size)
+                    {
+                      #if DEBUG_TEXT
+                      g_print("-14-");
+                      #endif
+                      /* We see top of the widget, and keypress is asking
+                         to move out from the screen -> changing values. */
+                        adjustment->value = adjustment->page_size -
+                            sc->outadj->page_size;
+                        sc->outadj->value = sc->fixed->allocation.y +
+                            adjustment->value;
+                        adjustment->page_size = sc->outadj->page_size;
+                    }
+                    else
+                        adjustment->value = 0;
+
+                }
+                else if ((sc->outadj->value + sc->outadj->page_size) >
+                           (sc->fixed->allocation.y +
+                            sc->fixed->allocation.height))
+                {
+                  #if DEBUG_TEXT
+                  g_print("-15-");
+                  #endif
+                    /* The bottom of fixed is on the screen */
+                    if (adjustment->value < sc->last_value)
+                    {
+                      #if DEBUG_TEXT
+                      g_print("-16-");
+                      #endif
+                        adjustment->page_size +=
+                            sc->last_value - adjustment->value;
+                        sc->outadj->value +=
+                            adjustment->value - sc->last_value;
+                    }
+                    else
+                    {
+                        adjustment->page_size = sc->outadj->page_size -
+                            ((sc->outadj->value + sc->outadj->page_size) -
+                             (sc->fixed->allocation.y +
+                              adjustment->upper));
+
+
+                        if (adjustment->page_size >
+                            sc->outadj->page_size)
+                        {
+                          #if DEBUG_TEXT
+                          g_print("-17-");
+                          #endif
+                            sc->outadj->value +=
+                                adjustment->page_size -
+                                sc->outadj->page_size;
+                            adjustment->page_size = sc->outadj->page_size;
+                        }
+                        sc->last_page_size = adjustment->page_size;
+                        adjustment->value = sc->outadj->value -
+                            sc->fixed->allocation.y;
+                    }
+
+                    if (adjustment->page_size > sc->outadj->page_size)
+                    {
+                      #if DEBUG_TEXT
+                      g_print("-18-");
+                      #endif
+                        /* We went to the middle of fixed(?) */
+                        adjustment->page_size +=
+                            adjustment->value - sc->last_value;
+                        sc->outadj->value = sc->fixed->allocation.y +
+                            adjustment->value;
+                        adjustment->value =
+                            (sc->outadj->value - sc->fixed->allocation.y);
+
+                        adjustment->page_size = sc->outadj->page_size;
+                    }
+                }
+                else
+                {
+                  #if DEBUG_TEXT
+                  g_print("-19-");
+                  #endif
+                    /* We are in the center now */
+                    sc->outadj->value = sc->fixed->allocation.y +
+                        adjustment->value;
+                    adjustment->page_size = sc->outadj->page_size;
+                }
+            }
+            else
+            {
+              #if DEBUG_TEXT
+              g_print("-20-");
+              #endif
+                sc->outadj->value += adjustment->value - sc->last_value;
+            }
+            refress = TRUE;
+        }
+        else
+        {
+          #if DEBUG_TEXT
+          g_print("-21-");
+          #endif
+            if ((sc->outadj->value + sc->outadj->page_size) >
+                (sc->fixed->allocation.y + sc->fixed->allocation.height))
+            {
+              #if DEBUG_TEXT
+              g_print("-22-");
+              #endif
+                /* We are not going over the screen, from the bottom. */
+                if (sc->outadj->value < sc->fixed->allocation.y)
+                {
+                  #if DEBUG_TEXT
+                  g_print("-23-");
+                  #endif
+                    /* Whole fixed is inside the screen borders. -> We
+                       allocate some more space */
+                    sc->outadj->value +=
+                        adjustment->value - sc->last_value;
+                    adjustment->page_size += adjustment->value;
+                    adjustment->value = 0;
+                }
+                else
+                {
+                  #if DEBUG_TEXT
+                  g_print("-24-");
+                  #endif
+                    /* The fixed is at the top of screen, partly visible,
+                       partly out of the screen */
+                    sc->outadj->value += adjustment->value - sc->last_value;
+                    adjustment->page_size += sc->last_value - adjustment->value;
+                }
+                refress = TRUE;
+            }
+            else
+            {    /* We are going over the screen from the bottom */
+              #if DEBUG_TEXT
+              g_print("-25-");
+              #endif
+                if (sc->outadj->value < sc->fixed->allocation.y)
+                {
+                  #if DEBUG_TEXT
+                  g_print("-26-");
+                  #endif
+                    /* Top is not going over */
+                    sc->outadj->value += adjustment->value - sc->last_value;
+                    adjustment->page_size += adjustment->value;
+                    adjustment->value = 0;
+                    refress = TRUE;
+                }
+            }
+        }
+        sc->last_value_diff = adjustment->value - sc->last_value;
+        sc->last_value = adjustment->value;
+    }
+
+    if (refress)
+    {
+      #if DEBUG_TEXT
+      g_print("-27-");
+      #endif
+        sc->out_last_value = sc->outadj->value;
+        gtk_fixed_move(GTK_FIXED(sc->fixed), sc->swinner, 0,
+                       adjustment->value);
+
+        gtk_adjustment_changed(adjustment);
+        sc->inner_value_changed = TRUE;
+        gtk_adjustment_value_changed(adjustment);
+    }
+#if DEBUG_TEXT
+g_print("-27-");
+#endif
+}
+
+static gboolean hildon_scroll_area_event_box_press(GtkWidget *ebox,
+                                                   GdkEvent *event,
+                                                   HildonScrollArea *sc)
+{
+    gtk_widget_grab_focus(sc->child);
+    return FALSE;
+}
+
+static void hildon_scroll_area_size_allocate(GtkWidget *widget,
+                                            GtkAllocation *allocation,
+                                            HildonScrollArea *sc)
+{
+  g_signal_handlers_disconnect_by_func(widget, 
+                                       (void*)hildon_scroll_area_size_allocate,
+                                       sc );
+  gtk_widget_set_size_request(sc->child, sc->fixed->allocation.width, -1);
+}
+
diff --git a/hildon-widgets/hildon-scroll-area.h b/hildon-widgets/hildon-scroll-area.h
new file mode 100644 (file)
index 0000000..92c21db
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/*
+ * The reason why this is not made as a widget:
+ *  We can not create a widget which could return the correct child.
+ *  (ie. by gtk_bin_get_child)
+ */
+
+#ifndef HILDON_SCROLL_AREA_H
+#define HILDON_SCROLL_AREA_H
+
+#include <gtk/gtkwidget.h>
+
+G_BEGIN_DECLS
+    GtkWidget * hildon_scroll_area_new(GtkWidget * sw, GtkWidget * child);
+
+G_END_DECLS
+#endif /* HILDON_SCROLL_AREA_H */
diff --git a/hildon-widgets/hildon-search.c b/hildon-widgets/hildon-search.c
new file mode 100644 (file)
index 0000000..5ed5e55
--- /dev/null
@@ -0,0 +1,372 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "hildon-search.h"
+
+#include <gtk/gtkimage.h>
+#include <gtk/gtkiconfactory.h>
+#include <gtk/gtkstock.h>
+#include <hildon-widgets/hildon-defines.h>
+
+#include <libintl.h>
+
+#define _(String) dgettext(PACKAGE, String)
+
+#define SEARCH_FIELD_HEIGHT 54
+#define SEARCH_CHILD_HEIGHT 30
+
+#define SEARCH_ICON_WIDTH  30   /* search stock icon size */
+#define SEARCH_ICON_HEIGHT 30
+#define SEARCH_ICON_RB 12
+#define SEARCH_ICON_TB 0
+
+#define SEARCH_TOP_BORDER    12
+#define SEARCH_BOTTOM_BORDER 12
+#define SEARCH_LEFT_BORDER   20
+#define SEARCH_RIGHT_BORDER  20
+
+#define HILDON_SEARCH_GET_PRIVATE(obj) \
+    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
+     HILDON_TYPE_SEARCH, HildonSearchPrivate));
+
+typedef struct _HildonSearchPrivate HildonSearchPrivate;
+
+static void hildon_search_class_init(HildonSearchClass * class);
+static void hildon_search_init(HildonSearch * search);
+static void hildon_search_forall(GtkContainer * container,
+                                 gboolean include_internals,
+                                 GtkCallback callback,
+                                 gpointer callback_data);
+static gboolean hildon_search_expose(GtkWidget * widget,
+                                     GdkEventExpose * event);
+static void hildon_search_size_request(GtkWidget * widget,
+                                       GtkRequisition * requisition);
+static void hildon_search_size_allocate(GtkWidget * widget,
+                                        GtkAllocation * allocation);
+static void hildon_search_finalize(GObject * object);
+static void hildon_search_destroy(GtkObject * object);
+static void
+hildon_search_set_property(GObject * object, guint property_id,
+                           const GValue * value, GParamSpec * pspec);
+static void
+hildon_search_get_property(GObject * object, guint property_id,
+                           GValue * value, GParamSpec * pspec);
+
+static GtkBinClass *parent_class = NULL;
+
+enum {
+    PROP_ICON_NAME = 1
+};
+
+struct _HildonSearchPrivate {
+    GtkWidget *image;
+    gchar *icon_name;
+};
+
+GType hildon_search_get_type(void)
+{
+    static GType hildon_search_type = 0;
+
+    if (!hildon_search_type) {
+        static const GTypeInfo hildon_search_info = {
+            sizeof(HildonSearchClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_search_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonSearch),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_search_init,
+            NULL,       /* value_table */
+        };
+
+        hildon_search_type = g_type_register_static(GTK_TYPE_BIN,
+                                                    "HildonSearch",
+                                                    &hildon_search_info,
+                                                    0);
+    }
+
+    return hildon_search_type;
+}
+
+/* private functions */
+static void hildon_search_class_init(HildonSearchClass * class)
+{
+    GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(class);
+    GtkContainerClass *container_class = GTK_CONTAINER_CLASS(class);
+    GObjectClass *object_class = G_OBJECT_CLASS(class);
+
+    g_type_class_add_private(class, sizeof(HildonSearchPrivate));
+
+    parent_class = g_type_class_peek_parent(class);
+
+    object_class->finalize = hildon_search_finalize;
+    object_class->set_property = hildon_search_set_property;
+    object_class->get_property = hildon_search_get_property;
+    widget_class->expose_event = hildon_search_expose;
+    widget_class->size_request = hildon_search_size_request;
+    widget_class->size_allocate = hildon_search_size_allocate;
+    GTK_OBJECT_CLASS(class)->destroy = hildon_search_destroy;
+    container_class->forall = hildon_search_forall;
+
+    g_object_class_install_property(object_class, PROP_ICON_NAME,
+        g_param_spec_string("stock-icon-name",
+                            "Stock icon Name",
+                            "Set the stock icon name",
+                            NULL,
+                            G_PARAM_READWRITE));
+}
+
+static void
+hildon_search_set_property(GObject * object, guint property_id,
+                           const GValue * value, GParamSpec * pspec)
+{
+    HildonSearchPrivate *priv = HILDON_SEARCH_GET_PRIVATE(object);
+
+    switch (property_id) {
+    case PROP_ICON_NAME:
+    {
+        const gchar *image_text;
+
+        g_free(priv->icon_name);
+
+        /* This can be NULL in the first time */
+        if (priv->image) {        
+          gtk_widget_unparent(priv->image);
+        }
+
+        image_text = g_value_get_string(value);
+        if (!image_text)
+          image_text = GTK_STOCK_FIND;
+
+        priv->icon_name = g_strdup(image_text);
+        priv->image = gtk_image_new_from_stock(priv->icon_name,
+                                               HILDON_ICON_SIZE_WIDG);
+        gtk_widget_set_parent(priv->image, GTK_WIDGET(object));
+        gtk_widget_show(priv->image);
+    }
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
+        break;
+    }
+}
+
+
+static void
+hildon_search_get_property(GObject * object, guint property_id,
+                           GValue * value, GParamSpec * pspec)
+{
+    HildonSearchPrivate *priv = HILDON_SEARCH_GET_PRIVATE(object);
+
+    switch (property_id) {
+    case PROP_ICON_NAME:
+        g_value_set_string(value, priv->icon_name);
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
+        break;
+    }
+}
+
+static void hildon_search_init(HildonSearch * search)
+{
+    HildonSearchPrivate *priv = HILDON_SEARCH_GET_PRIVATE(search);
+
+    priv->image = NULL;
+    priv->icon_name = NULL;
+}
+
+static void hildon_search_finalize(GObject * object)
+{
+    HildonSearchPrivate *priv = HILDON_SEARCH_GET_PRIVATE(object);
+
+    if (priv->icon_name) {
+        g_free(priv->icon_name);
+    }
+    if (G_OBJECT_CLASS(parent_class)->finalize) {
+        G_OBJECT_CLASS(parent_class)->finalize(object);
+    }
+}
+
+static void hildon_search_destroy(GtkObject * object)
+{
+    HildonSearchPrivate *priv = HILDON_SEARCH_GET_PRIVATE(object);
+
+    if (priv->image) {
+        gtk_widget_unparent(priv->image);
+        priv->image = NULL;
+    }
+}
+
+/**
+ * hildon_search_new:
+ * @image : Name of the stock icon or NULL to be used 
+ * as the optional icon in the Search dialog.
+ * 
+ * Creates a new Search widget without or with the optional image 
+ * left of the search widget.
+ * 
+ * Return value: #GtkWidget pointer of #HildonSearch widget.
+ */
+GtkWidget *hildon_search_new(const gchar * stockicon)
+{
+    HildonSearch *search = g_object_new(HILDON_TYPE_SEARCH,
+                                        "stock-icon-name", stockicon,
+                                        NULL);
+
+    return GTK_WIDGET(search);
+}
+
+static void hildon_search_forall(GtkContainer * container,
+                                 gboolean include_internals,
+                                 GtkCallback callback,
+                                 gpointer callback_data)
+{
+    GtkBin *bin = GTK_BIN(container);
+    HildonSearch *search = HILDON_SEARCH(container);
+    HildonSearchPrivate *priv = HILDON_SEARCH_GET_PRIVATE(search);
+
+    if (bin->child) {
+        (*callback) (bin->child, callback_data);
+    }
+
+    if (include_internals) {
+      (*callback) (priv->image, callback_data);
+    }
+}
+
+
+/**
+ * hildon_search_set_image_stock:
+ * @search: A pointer of #HildonSearch widget to work on
+ * @stock_icon: Name of a stock icon to use as the optional image 
+ * in the Search widget. This will change the previous one if it is set.
+ *
+ * Sets or changes the optional image left of the Search widget.
+ */
+void hildon_search_set_image_stock(HildonSearch * search,
+                                   const gchar * stock_icon)
+{
+    g_return_if_fail(HILDON_IS_SEARCH(search));
+
+    g_object_set(search, "stock-icon-name", stock_icon, NULL);
+}
+
+static gboolean hildon_search_expose(GtkWidget * widget,
+                                     GdkEventExpose * event)
+{
+    if (GTK_WIDGET_DRAWABLE(widget)) {
+        gint x, y, width, height;
+
+        x = widget->allocation.x;
+        y = widget->allocation.y;
+        width = widget->allocation.width;
+        height = widget->allocation.height;
+
+        gtk_paint_box(widget->style, widget->window,
+                      GTK_WIDGET_STATE(widget), GTK_SHADOW_OUT,
+                      NULL, widget, "search", x, y, width, height);
+
+        (*GTK_WIDGET_CLASS(parent_class)->expose_event) (widget, event);
+    }
+    return FALSE;
+}
+
+static void hildon_search_size_request(GtkWidget * widget,
+                                       GtkRequisition * requisition)
+{
+    HildonSearch *search;
+    HildonSearchPrivate *priv;
+    GtkBin *bin;
+    GtkRequisition child_requisition;
+
+    search = HILDON_SEARCH(widget);
+    bin = GTK_BIN(search);
+    priv = HILDON_SEARCH_GET_PRIVATE(search);
+
+    requisition->width = GTK_CONTAINER(search)->border_width * 2;
+    requisition->height = GTK_CONTAINER(search)->border_width * 2;
+
+    gtk_widget_size_request(priv->image, &child_requisition);
+
+    if (bin->child && GTK_WIDGET_VISIBLE(bin->child)) {
+        gtk_widget_size_request(bin->child, &child_requisition);
+        requisition->width += child_requisition.width;
+    }
+
+    requisition->width += SEARCH_LEFT_BORDER + SEARCH_RIGHT_BORDER +
+        SEARCH_ICON_WIDTH + SEARCH_ICON_RB;
+    requisition->height += SEARCH_CHILD_HEIGHT +
+        SEARCH_TOP_BORDER + SEARCH_BOTTOM_BORDER;
+}
+
+static void hildon_search_size_allocate(GtkWidget * widget,
+                                        GtkAllocation * allocation)
+{
+    HildonSearch *search;
+    HildonSearchPrivate *priv;
+    GtkBin *bin;
+    GtkAllocation child_allocation;
+
+    widget->allocation = *allocation;
+
+    if (widget->allocation.height > SEARCH_FIELD_HEIGHT)
+    {
+      widget->allocation.y += (widget->allocation.height - SEARCH_FIELD_HEIGHT) / 2;
+      widget->allocation.height = SEARCH_FIELD_HEIGHT;
+    }
+
+    search = HILDON_SEARCH(widget);
+    bin = GTK_BIN(search);
+    priv = HILDON_SEARCH_GET_PRIVATE(search);
+
+    child_allocation.x = widget->allocation.x + SEARCH_LEFT_BORDER;
+    child_allocation.y = widget->allocation.y + SEARCH_TOP_BORDER;
+    child_allocation.width = SEARCH_ICON_WIDTH;
+    child_allocation.height = SEARCH_ICON_HEIGHT;
+
+    gtk_widget_size_allocate(priv->image, &child_allocation);
+
+    if (bin->child && GTK_WIDGET_VISIBLE(bin->child)) {
+        child_allocation.x = widget->allocation.x + SEARCH_LEFT_BORDER +
+            SEARCH_ICON_WIDTH + SEARCH_ICON_RB;
+        child_allocation.y = widget->allocation.y + SEARCH_TOP_BORDER;
+        child_allocation.width = MAX(1, (gint) widget->allocation.width -
+                                     (SEARCH_LEFT_BORDER +
+                                      SEARCH_RIGHT_BORDER +
+                                      SEARCH_ICON_WIDTH + SEARCH_ICON_RB));
+        child_allocation.height =
+            MAX(1,
+                (gint) widget->allocation.height - (SEARCH_TOP_BORDER +
+                                             SEARCH_BOTTOM_BORDER));
+
+        gtk_widget_size_allocate(bin->child, &child_allocation);
+    }
+}
diff --git a/hildon-widgets/hildon-search.h b/hildon-widgets/hildon-search.h
new file mode 100644 (file)
index 0000000..2bd1920
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+#ifndef __HILDON_SEARCH_H__
+#define __HILDON_SEARCH_H__
+
+#include <gdk/gdk.h>
+#include <gtk/gtkbin.h>
+
+G_BEGIN_DECLS
+#define HILDON_TYPE_SEARCH (hildon_search_get_type ())
+#define HILDON_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),\
+        HILDON_TYPE_SEARCH, HildonSearch))
+#define HILDON_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),\
+        HILDON_TYPE_SEARCH, HildonSearchClass))
+#define HILDON_IS_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\
+        HILDON_TYPE_SEARCH))
+#define HILDON_IS_SEARCH_CLASS(klass)(G_TYPE_CHECK_CLASS_TYPE ((klass),\
+        HILDON_TYPE_SEARCH))
+#define HILDON_SEARCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),\
+        HILDON_TYPE_SEARCH, HildonSearchClass))
+/**
+ * HildonSearch:
+ * 
+ * Contains only private data.
+ */
+typedef struct _HildonSearch HildonSearch;
+typedef struct _HildonSearchClass HildonSearchClass;
+
+
+struct _HildonSearch {
+    GtkBin bin;
+};
+
+struct _HildonSearchClass {
+    GtkBinClass parent_class;
+};
+
+
+GType hildon_search_get_type(void);
+GtkWidget *hildon_search_new(const gchar * image);
+void hildon_search_set_image_stock(HildonSearch * search,
+                                   const gchar * stock_icon);
+
+G_END_DECLS
+#endif /* __HILDON_SEARCH_H__ */
diff --git a/hildon-widgets/hildon-seekbar.c b/hildon-widgets/hildon-seekbar.c
new file mode 100644 (file)
index 0000000..71b4f75
--- /dev/null
@@ -0,0 +1,599 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/* 
+ * @file hildon-seekbar.c
+ *
+ * This file contains the API implementation for Hildon Seekbar widget.
+ * Based on seekbar.gob rev 1.10
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <libintl.h>
+#include <stdio.h>
+#include <math.h>
+
+#include <gtk/gtklabel.h>
+#include <gtk/gtkframe.h>
+#include <gtk/gtkalignment.h>
+#include <gtk/gtkadjustment.h>
+#include <gtk/gtktoolbar.h>
+#include <gdk/gdkkeysyms.h>
+
+#include "hildon-seekbar.h"
+
+#define _(String) dgettext(PACKAGE, String)
+
+#define HILDON_SEEKBAR_GET_PRIVATE(obj) \
+        (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
+         HILDON_TYPE_SEEKBAR, HildonSeekbarPrivate));
+
+typedef struct _HildonSeekbarPrivate HildonSeekbarPrivate;
+
+/* our parent class */
+static GtkScaleClass *parent_class = NULL;
+
+/* Init functions */
+static void hildon_seekbar_class_init(HildonSeekbarClass * seekbar_class);
+static void hildon_seekbar_init(HildonSeekbar * seekbar);
+static void hildon_seekbar_finalize(GObject * self);
+
+/* property functions */
+static void hildon_seekbar_set_property(GObject * object, guint prop_id,
+                                        const GValue * value,
+                                        GParamSpec * pspec);
+
+static void hildon_seekbar_get_property(GObject * object, guint prop_id,
+                                        GValue * value,
+                                        GParamSpec * pspec);
+
+/* virtual functions */
+static void hildon_seekbar_size_request(GtkWidget * widget,
+                                        GtkRequisition * event);
+static void hildon_seekbar_size_allocate(GtkWidget * widget,
+                                         GtkAllocation * allocation);
+static gboolean hildon_seekbar_expose(GtkWidget * widget,
+                                      GdkEventExpose * event);
+static gboolean hildon_seekbar_button_press_event(GtkWidget * widget,
+                                                  GdkEventButton * event);
+static gboolean hildon_seekbar_button_release_event(GtkWidget * widget,
+                                                    GdkEventButton * event);
+static gboolean hildon_seekbar_keypress(GtkWidget * widget,
+                                        GdkEventKey * event);
+
+/* private stuff */
+
+/*
+ * Some constants
+ * These should be named so that they are quite self
+ * explanatory
+ */
+#define MINIMUM_WIDTH 115
+#define DEFAULT_HEIGHT 58
+/* Toolbar width and height defines */
+#define TOOL_MINIMUM_WIDTH 75
+#define TOOL_DEFAULT_HEIGHT 40
+
+#define DEFAULT_DISPLAYC_BORDER 10
+#define BUFFER_SIZE 32
+#define EXTRA_SIDE_BORDER 20
+#define TOOL_EXTRA_SIDE_BORDER 0
+
+/* the number of steps it takes to move from left to right */
+#define SECONDS_PER_MINUTE 60
+#define NUM_STEPS 20
+
+/* the number of digits precision for the internal range.
+ * note, this needs to be enough so that the step size for
+ * small total_times doesn't get rounded off. Currently set to 3
+ * this is because for the smallest total time ( i.e 1 ) and the current
+ * num steps ( 20 ) is: 1/20 = 0.05.  0.05 is 2 digits, and we
+ * add one for safety */
+#define MAX_ROUND_DIGITS 3
+
+/* enum for properties */
+enum {
+    PROP_TOTAL_TIME = 1,
+    PROP_POSITION
+};
+
+/* private variables */
+struct _HildonSeekbarPrivate {
+    GtkWidget *label;
+    gboolean draw_value;
+    gboolean is_toolbar;
+    guint fraction; /* This is the amount of time that has progressed from
+                       the beginning. It should be an integer between the
+                       minimum and maximum values of the corresponding
+                       adjustment, ie. adjument->lower and ->upper.. */
+};
+
+/**
+ * Initialises, and returns the type of a hildon seekbar.
+ */
+GType hildon_seekbar_get_type(void)
+{
+    static GType seekbar_type = 0;
+
+    if (!seekbar_type) {
+        static const GTypeInfo seekbar_info = {
+            sizeof(HildonSeekbarClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_seekbar_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonSeekbar),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_seekbar_init,
+        };
+        seekbar_type = g_type_register_static(GTK_TYPE_SCALE,
+                                              "HildonSeekbar",
+                                              &seekbar_info, 0);
+    }
+    return seekbar_type;
+}
+
+/**
+ * Initialises the seekbar class.
+ */
+static void hildon_seekbar_class_init(HildonSeekbarClass * seekbar_class)
+{
+    GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(seekbar_class);
+    GObjectClass *object_class = G_OBJECT_CLASS(seekbar_class);
+
+    /* set the global parent_class */
+    parent_class = g_type_class_peek_parent(seekbar_class);
+
+    g_type_class_add_private(seekbar_class, sizeof(HildonSeekbarPrivate));
+
+    /* setup our widgets v-table */
+    widget_class->size_request = hildon_seekbar_size_request;
+    widget_class->size_allocate = hildon_seekbar_size_allocate;
+    widget_class->expose_event = hildon_seekbar_expose;
+    widget_class->button_press_event = hildon_seekbar_button_press_event;
+    widget_class->button_release_event =
+        hildon_seekbar_button_release_event;
+    widget_class->key_press_event = hildon_seekbar_keypress;
+
+    /* now the object stuff */
+    object_class->set_property = hildon_seekbar_set_property;
+    object_class->get_property = hildon_seekbar_get_property;
+    object_class->finalize = hildon_seekbar_finalize;
+
+    /* install the properties */
+    g_object_class_install_property(object_class, PROP_TOTAL_TIME,
+        g_param_spec_double("total_time",
+                            "total time",
+                            "Total playing time of this media file",
+                            0,           /* min value */
+                            G_MAXDOUBLE, /* max value */
+                            0,           /* default */
+                            G_PARAM_READABLE | G_PARAM_WRITABLE));
+
+    g_object_class_install_property(object_class, PROP_POSITION,
+        g_param_spec_double("position",
+                            "position",
+                            "Current position in this media file",
+                            0,           /* min value */
+                            G_MAXDOUBLE, /* max value */
+                            0,           /* default */
+                            G_PARAM_READABLE | G_PARAM_WRITABLE));
+    /* readable and writable */
+}
+
+
+static void hildon_seekbar_init(HildonSeekbar * seekbar)
+{
+    HildonSeekbarPrivate *priv;
+    GtkRange *range = GTK_RANGE(seekbar);
+
+    priv = HILDON_SEEKBAR_GET_PRIVATE(seekbar);
+
+    range->orientation = GTK_ORIENTATION_HORIZONTAL;
+    range->flippable = TRUE;
+    range->has_stepper_a = TRUE;
+    range->has_stepper_d = TRUE;
+    range->round_digits = MAX_ROUND_DIGITS;
+
+    gtk_scale_set_draw_value (GTK_SCALE (seekbar), FALSE);
+}
+
+/* is this even necessary? */
+static void hildon_seekbar_finalize( GObject *obj_self )       
+{      
+    HildonSeekbar *self;       
+    HildonSeekbarPrivate *priv;        
+
+    self = HILDON_SEEKBAR ( obj_self );        
+    priv = HILDON_SEEKBAR_GET_PRIVATE (self);  
+
+    if( G_OBJECT_CLASS( parent_class )->finalize )     
+        G_OBJECT_CLASS( parent_class )->finalize( obj_self );  
+}
+
+
+/* handle keypress events */
+static gboolean hildon_seekbar_keypress(GtkWidget * widget,
+                                        GdkEventKey * event)
+{
+    if (event->keyval == GDK_Up || event->keyval == GDK_Down)
+        return FALSE;
+    return ((GTK_WIDGET_CLASS(parent_class)->key_press_event) (widget,
+                                                               event));
+}
+
+/* handle setting of seekbar properties */
+static void
+hildon_seekbar_set_property(GObject * object, guint prop_id,
+                            const GValue * value, GParamSpec * pspec)
+{
+    GtkRange *range = GTK_RANGE(object);
+
+    switch (prop_id) {
+    case PROP_TOTAL_TIME:
+        range->adjustment->upper = g_value_get_double(value);
+        break;
+    case PROP_POSITION:
+        range->adjustment->value = g_value_get_double(value);
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+        break;
+    }
+}
+
+/* handle getting of seekbar properties */
+static void
+hildon_seekbar_get_property(GObject * object, guint prop_id,
+                            GValue * value, GParamSpec * pspec)
+{
+    GtkRange *range = GTK_RANGE(object);
+
+    switch (prop_id) {
+    case PROP_TOTAL_TIME:
+        g_value_set_double(value, range->adjustment->upper);
+        break;
+    case PROP_POSITION:
+        g_value_set_double(value, range->adjustment->value);
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+        break;
+    }
+}
+
+/**
+ * hildon_seekbar_new:
+ *
+ * Creates a new #HildonSeekbar widget.
+ * 
+ * Return value: A #GtkWidget pointer of #HildonSeekbar widget.
+ */
+GtkWidget *hildon_seekbar_new(void)
+{
+    /* return a new object */
+    return g_object_new(HILDON_TYPE_SEEKBAR, NULL);
+}
+
+/**
+ * hildon_seekbar_get_total_time:
+ * @seekbar: Pointer to #HildonSeekbar widget.
+ *
+ * Accessor method for getting total playing time of stream
+ * in seconds.
+ *
+ * Returns: Total time as gint.
+ **/
+gint hildon_seekbar_get_total_time(HildonSeekbar *seekbar)
+{
+    GtkWidget *widget;
+    widget = GTK_WIDGET (seekbar);
+    g_return_val_if_fail(HILDON_IS_SEEKBAR(seekbar), 0);
+    g_return_val_if_fail(GTK_RANGE(widget)->adjustment, 0);
+    return GTK_RANGE(widget)->adjustment->upper;
+}
+
+/**
+ * hildon_seekbar_set_total_time:
+ * @seekbar: Pointer to #HildonSeekbar widget.
+ * @time: Time within range of > 0 && < G_MAXINT
+ *
+ * Accessor method for setting total playing time of stream
+ * in seconds.
+ *
+ **/
+void hildon_seekbar_set_total_time(HildonSeekbar *seekbar, gint time)
+{
+    GtkAdjustment *adj;
+    GtkWidget *widget;
+    gboolean value_changed = FALSE;
+
+    g_return_if_fail(HILDON_IS_SEEKBAR(seekbar));
+    widget = GTK_WIDGET (seekbar);
+
+    if (time <= 0) {
+        return;
+    }
+
+    g_return_if_fail(GTK_RANGE(widget)->adjustment);
+
+    adj = GTK_RANGE(widget)->adjustment;
+    adj->upper = time;
+
+    if (adj->value > time) {
+        adj->value = time;
+        value_changed = TRUE;
+    }
+
+    adj->step_increment = adj->upper / NUM_STEPS;
+    adj->page_increment = adj->step_increment;
+
+    gtk_adjustment_changed(adj);
+
+    if (value_changed) {
+        gtk_adjustment_value_changed(adj);
+        hildon_seekbar_set_fraction(seekbar,
+                                    MIN(hildon_seekbar_get_fraction(seekbar),
+                                        time));
+        hildon_seekbar_set_position(seekbar,
+                                    MIN(hildon_seekbar_get_position(seekbar),
+                                        time));
+    }
+}
+
+/**
+ * hildon_seekbar_get_fraction:
+ * @seekbar: Pointer to #HildonSeekbar widget.
+ *
+ * Accessor method for getting current fraction related to the progress indicator.
+ * It should be between min and max of seekbar range.
+ *
+ * Returns: Current fraction.
+ **/
+guint hildon_seekbar_get_fraction( HildonSeekbar *seekbar )
+{
+  g_return_val_if_fail( HILDON_IS_SEEKBAR( seekbar ), 0 );
+
+  return osso_gtk_range_get_stream_position (GTK_RANGE(seekbar));
+}
+
+/**
+ * hildon_seekbar_set_fraction:
+ * @seekbar: Pointer to #HildonSeekbar widget.
+ * @fraction: The new position of the progress indicator.
+ *
+ * Method for setting current value related to the progress indicator.
+ * It should be between the minimal and maximal values of the range in seekbar.
+ **/
+void hildon_seekbar_set_fraction( HildonSeekbar *seekbar, guint fraction )
+{
+  GtkRange *range = NULL;
+  g_return_if_fail( HILDON_IS_SEEKBAR( seekbar ) );
+
+  range = GTK_RANGE(GTK_WIDGET(seekbar));
+  
+  g_return_if_fail(fraction <= range->adjustment->upper &&
+                   fraction >= range->adjustment->lower);
+  
+  /* Set to show stream indicator. */
+  g_object_set (G_OBJECT (seekbar), "stream_indicator", TRUE, NULL);
+
+  fraction = CLAMP(fraction, range->adjustment->lower,
+                   range->adjustment->upper);
+  
+  osso_gtk_range_set_stream_position( range, fraction );
+  
+  if (fraction < hildon_seekbar_get_position(seekbar))
+    hildon_seekbar_set_position(seekbar, fraction);
+}
+
+/**
+ * hildon_seekbar_get_position:
+ * @seekbar: Pointer to #HildonSeekbar widget.
+ *
+ * Accessor method for getting current position in stream
+ * in seconds.
+ *
+ *
+ * Returns: Current position in stream in seconds.
+ **/
+gint hildon_seekbar_get_position(HildonSeekbar *seekbar)
+{
+  g_return_val_if_fail(HILDON_IS_SEEKBAR(seekbar), 0);
+  g_return_val_if_fail(GTK_RANGE(seekbar)->adjustment, 0);
+
+  return GTK_RANGE(seekbar)->adjustment->value;
+}
+
+/**
+ * hildon_seekbar_set_position:
+ * @seekbar: Pointer to #HildonSeekbar widget.
+ * @time: Time within range of >= 0 && < G_MAXINT
+ *
+ * Accessor method for setting current position in stream
+ * in seconds.
+ **/
+void hildon_seekbar_set_position(HildonSeekbar *seekbar, gint time)
+{
+    GtkRange *range;
+    GtkAdjustment *adj;
+    gint value;
+
+    g_return_if_fail(time >= 0);
+    g_return_if_fail(HILDON_IS_SEEKBAR(seekbar));
+    range = GTK_RANGE(seekbar);
+    adj = range->adjustment;
+    g_return_if_fail(adj);
+    
+    /* only change value if it is a different int. this allows us to have
+       smooth scrolls for small total_times */
+    value = floor(adj->value);
+    if (time != value) {
+      value = (time < adj->upper) ? time : adj->upper;
+      if (value <= osso_gtk_range_get_stream_position (range)) {
+        adj->value = value;
+        gtk_adjustment_value_changed(adj);
+      }
+    }
+}
+
+static void hildon_seekbar_size_request(GtkWidget * widget,
+                                        GtkRequisition * req)
+{
+    HildonSeekbar *self = NULL;
+    HildonSeekbarPrivate *priv = NULL;
+    GtkWidget *parent = NULL;
+
+    self = HILDON_SEEKBAR(widget);
+    priv = HILDON_SEEKBAR_GET_PRIVATE(self)
+
+    parent =
+        gtk_widget_get_ancestor(GTK_WIDGET(self), GTK_TYPE_TOOLBAR);
+
+    priv->is_toolbar = parent ? TRUE : FALSE;
+
+    if (GTK_WIDGET_CLASS(parent_class)->size_request)
+        GTK_WIDGET_CLASS(parent_class)->size_request(widget, req);
+
+    req->width = priv->is_toolbar ? TOOL_MINIMUM_WIDTH : MINIMUM_WIDTH;
+    req->height = priv->is_toolbar ? TOOL_DEFAULT_HEIGHT : DEFAULT_HEIGHT;
+}
+
+static void hildon_seekbar_size_allocate(GtkWidget * widget,
+                                         GtkAllocation * allocation)
+{
+    HildonSeekbarPrivate *priv;
+
+    priv = HILDON_SEEKBAR_GET_PRIVATE(HILDON_SEEKBAR(widget));
+
+    if (priv->is_toolbar == TRUE)
+      {
+        if (allocation->height > TOOL_DEFAULT_HEIGHT) {
+            allocation->y +=
+             (allocation->height - TOOL_DEFAULT_HEIGHT) / 2;
+            allocation->height = TOOL_DEFAULT_HEIGHT;
+          }
+      }
+    else
+      {
+        if (allocation->height > DEFAULT_HEIGHT) {
+            allocation->y +=
+             (allocation->height - DEFAULT_HEIGHT) / 2;
+            allocation->height = DEFAULT_HEIGHT;
+          }
+      }
+
+    if (priv->is_toolbar == TRUE)
+      {
+        allocation->x += TOOL_EXTRA_SIDE_BORDER;
+        allocation->width -= 2 * TOOL_EXTRA_SIDE_BORDER;
+      }
+    else
+      {
+        allocation->x += EXTRA_SIDE_BORDER;
+        allocation->width -= 2 * EXTRA_SIDE_BORDER;
+      }
+   
+    if (GTK_WIDGET_CLASS(parent_class)->size_allocate)
+        GTK_WIDGET_CLASS(parent_class)->size_allocate(widget, allocation);
+}
+
+static gboolean hildon_seekbar_expose(GtkWidget * widget,
+                                      GdkEventExpose * event)
+{
+    HildonSeekbarPrivate *priv;
+    gint extra_side_borders = 0;
+
+    priv = HILDON_SEEKBAR_GET_PRIVATE(HILDON_SEEKBAR(widget));
+   
+    extra_side_borders = priv->is_toolbar ? TOOL_EXTRA_SIDE_BORDER :
+                                            EXTRA_SIDE_BORDER;
+
+    if (GTK_WIDGET_DRAWABLE(widget)) {
+        gtk_paint_box(widget->style, widget->window,
+                      GTK_WIDGET_STATE(widget), GTK_SHADOW_OUT,
+                      NULL, widget, "seekbar",
+                      widget->allocation.x - extra_side_borders,
+                      widget->allocation.y,
+                      widget->allocation.width + 2 * extra_side_borders,
+                      widget->allocation.height);
+
+        (*GTK_WIDGET_CLASS(parent_class)->expose_event) (widget, event);
+    }
+
+    return FALSE;
+}
+
+/*
+ * Event handler for button_press_event
+ */
+static gboolean
+hildon_seekbar_button_press_event(GtkWidget * widget,
+                                  GdkEventButton * event)
+{
+    HildonSeekbar *self;
+    HildonSeekbarPrivate *priv;
+
+    gint result = FALSE;
+
+    self = HILDON_SEEKBAR(widget);
+    priv = HILDON_SEEKBAR_GET_PRIVATE(self);
+
+    event->button = event->button == 1 ? 2 : event->button;
+
+    /* call the parent handler */
+    if (GTK_WIDGET_CLASS(parent_class)->button_press_event)
+        result = GTK_WIDGET_CLASS(parent_class)->button_press_event(widget,
+                                                                    event);
+
+    return result;
+}
+
+/*
+ * Event handler for button_release_event
+ */
+static gboolean
+hildon_seekbar_button_release_event(GtkWidget * widget,
+                                    GdkEventButton * event)
+{
+    HildonSeekbar *self;
+    HildonSeekbarPrivate *priv;
+    gboolean result = FALSE;
+
+    self = HILDON_SEEKBAR(widget);
+    priv = HILDON_SEEKBAR_GET_PRIVATE(self);
+
+    event->button = event->button == 1 ? 2 : event->button;
+
+    /* call the parent handler */
+    if (GTK_WIDGET_CLASS(parent_class)->button_release_event)
+        result =
+            GTK_WIDGET_CLASS(parent_class)->button_release_event(widget,
+                                                                 event);
+    return result;
+}
diff --git a/hildon-widgets/hildon-seekbar.h b/hildon-widgets/hildon-seekbar.h
new file mode 100644 (file)
index 0000000..143d7fb
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __HILDON_SEEKBAR_H__
+#define __HILDON_SEEKBAR_H__
+
+#include <gtk/gtkscale.h>
+
+G_BEGIN_DECLS
+#define HILDON_TYPE_SEEKBAR ( hildon_seekbar_get_type() )
+#define HILDON_SEEKBAR(obj) (GTK_CHECK_CAST (obj,\
+        HILDON_TYPE_SEEKBAR, HildonSeekbar))
+#define HILDON_SEEKBAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass),\
+        HILDON_TYPE_SEEKBAR, HildonSeekbarClass))
+#define HILDON_IS_SEEKBAR(obj) (GTK_CHECK_TYPE (obj, HILDON_TYPE_SEEKBAR))
+#define HILDON_IS_SEEKBAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass),\
+        HILDON_TYPE_SEEKBAR))
+/** 
+ * HildonSeekbar:
+ * 
+ * Contains only private data.
+ */
+typedef struct _HildonSeekbar HildonSeekbar;
+typedef struct _HildonSeekbarClass HildonSeekbarClass;
+
+struct _HildonSeekbar {
+    GtkScale scale;
+};
+
+struct _HildonSeekbarClass {
+    GtkScaleClass parent_class;
+};
+
+GType hildon_seekbar_get_type(void);
+GtkWidget *hildon_seekbar_new(void);
+gint hildon_seekbar_get_total_time(HildonSeekbar *seekbar);
+void hildon_seekbar_set_total_time(HildonSeekbar *seekbar, gint time);
+gint hildon_seekbar_get_position(HildonSeekbar *seekbar);
+void hildon_seekbar_set_position(HildonSeekbar *seekbar, gint time);
+void hildon_seekbar_set_fraction(HildonSeekbar *seekbar, guint fraction);
+guint hildon_seekbar_get_fraction(HildonSeekbar *seekbar);
+
+G_END_DECLS
+#endif
diff --git a/hildon-widgets/hildon-set-password-dialog.c b/hildon-widgets/hildon-set-password-dialog.c
new file mode 100644 (file)
index 0000000..1cc4299
--- /dev/null
@@ -0,0 +1,687 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/* 
+ * @file hildon-set-password-dialog.c
+ *
+ * This file implements API for Hildon Set and Change Password dialog.
+ * 
+ *  Change password dialog:
+ *   @desc: Change Password Dialog is used to change an existing one in
+ *   situtations where the password can be removed. Unselecting the check
+ *   box dims the password fields below it. If the dialog is accepted with
+ *   'OK' while the check box is unselected, a Confirmation Note is played.
+ *   If a Confirmation Note Dialog is accepted with 'Remove', the password
+ *   protection is removed.  
+ * 
+ *  Set password dialog:
+ *   @desc: Set Password Dialog is used to define a password, or change a
+ *   password that cannot be removed.
+ *   @seealso: #HildonGetPasswordDialog
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gtk/gtktogglebutton.h>
+#include <gtk/gtkcheckbutton.h>
+#include <gtk/gtkbox.h>
+#include <gtk/gtkentry.h>
+#include <gtk/gtksignal.h>
+#include <gdk/gdkkeysyms.h>
+#include <string.h>
+
+#include <hildon-widgets/hildon-caption.h>
+#include <hildon-widgets/gtk-infoprint.h>
+#include "hildon-set-password-dialog.h"
+#include "hildon-note.h"
+
+#include <libintl.h>
+#define _(String) dgettext(PACKAGE, String)
+
+static GtkDialogClass *parent_class;
+
+#define HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE(obj)\
+ (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
+  HILDON_TYPE_SET_PASSWORD_DIALOG, HildonSetPasswordDialogPrivate));
+
+typedef struct
+_HildonSetPasswordDialogPrivate HildonSetPasswordDialogPrivate;
+
+static void
+hildon_set_password_dialog_class_init(HildonSetPasswordDialogClass *
+                                      class);
+static void hildon_set_password_dialog_init(HildonSetPasswordDialog *
+                                            dialog);
+static void hildon_checbox_toggled(GtkWidget * widget, gpointer data);
+static void
+hildon_set_password_response_change(GtkDialog * d, gint arg1,
+                                    GtkWindow * parent);
+static void
+hildon_set_password_response_set(GtkDialog * d, gint arg1,
+                                 GtkWindow * parent);
+static gboolean
+hildon_set_password_dialog_released(GtkWidget * widget,
+                                    GdkEventButton * event,
+                                    gpointer user_data);
+static gboolean
+hildon_set_password_dialog_keypress(GtkWidget * widget,
+                                    GdkEventKey * event, gpointer data);
+
+static GObject *
+hildon_set_password_dialog_constructor(GType type,
+                                       guint n_construct_properties,
+                                       GObjectConstructParam *
+                                       construct_properties);
+static void hildon_set_password_set_property(GObject * object,
+                                             guint prop_id,
+                                             const GValue * value,
+                                             GParamSpec * pspec);
+static void hildon_set_password_get_property(GObject * object,
+                                             guint prop_id, GValue * value,
+                                             GParamSpec * pspec);
+
+/* Private struct */
+
+struct _HildonSetPasswordDialogPrivate {
+    /* Checkbox tab */
+    GtkWidget *caption;
+    GtkWidget *checkbox;
+
+    /* Tab one */
+    GtkWidget *entry1;
+    GtkWidget *caption1;
+    gchar *caption1_string;
+
+    /* Tab two */
+    GtkWidget *entry2;
+    GtkWidget *caption2;
+    gchar *caption2_string;
+
+    /* OK/Cancel buttons */
+    GtkWidget *okButton;
+    GtkWidget *cancelButton;
+
+    gboolean protection;
+
+};
+
+enum {
+    PROP_NONE = 0,
+    PROP_PASSWORD,
+    PROP_HILDON_PASSWORD_DIALOG
+};
+
+/* Private functions */
+static void
+hildon_set_password_set_property(GObject * object,
+                                 guint prop_id,
+                                 const GValue * value, GParamSpec * pspec)
+{
+    HildonSetPasswordDialog *dialog = HILDON_SET_PASSWORD_DIALOG(object);
+    HildonSetPasswordDialogPrivate *priv;
+
+    priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE(dialog);
+    
+    switch (prop_id) {
+    case PROP_PASSWORD:
+        gtk_entry_set_text(GTK_ENTRY(priv->entry1), g_value_get_string(value));
+        break;
+    case PROP_HILDON_PASSWORD_DIALOG:
+        priv->protection = g_value_get_boolean(value);
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+        break;
+    }
+}
+
+static void
+hildon_set_password_get_property(GObject * object,
+                                 guint prop_id,
+                                 GValue * value, GParamSpec * pspec)
+{
+    HildonSetPasswordDialog *dialog = HILDON_SET_PASSWORD_DIALOG(object);
+    HildonSetPasswordDialogPrivate *priv;
+    const gchar *string;
+
+    priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE(dialog);
+    
+    switch (prop_id) {
+    case PROP_PASSWORD:
+        string = gtk_entry_get_text(GTK_ENTRY(priv->entry1));
+        g_value_set_string(value, string);
+        break;
+    case PROP_HILDON_PASSWORD_DIALOG:
+        g_value_set_boolean(value, g_value_get_boolean(value));
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+        break;
+    }
+}
+
+static GObject *
+hildon_set_password_dialog_constructor(GType type,
+                                       guint n_construct_properties,
+                                       GObjectConstructParam *
+                                       construct_properties)
+{
+    GObject *dialog;
+    GObjectClass *parent_class;
+    HildonSetPasswordDialogPrivate *priv;
+    GtkSizeGroup *group;
+
+    parent_class = G_OBJECT_CLASS(g_type_class_peek_parent
+                                  (g_type_class_peek(type)));
+    dialog = parent_class->constructor(type, n_construct_properties,
+                                       construct_properties);
+
+    gtk_window_set_modal(GTK_WINDOW(dialog), TRUE);
+
+    priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE(dialog);
+
+    priv->checkbox = NULL;
+
+    group = GTK_SIZE_GROUP(gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL));
+
+    gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
+
+    if (priv->protection == TRUE) {
+        /* create checkbox */
+        priv->caption1_string = _("ckdg_fi_dialog_c_passwd_new_pwd");
+        priv->caption2_string = _("ckdg_fi_dialog_c_passwd_ver_pwd");
+
+        priv->checkbox = gtk_check_button_new();
+        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->checkbox),
+                                     TRUE);
+        gtk_widget_show(priv->checkbox);
+
+        priv->caption = hildon_caption_new(group,
+                                           _("ckdg_fi_dialog_c_passwd_pwd_protect"),
+                                           priv->checkbox,
+                                           NULL, HILDON_CAPTION_OPTIONAL);
+
+        gtk_signal_connect(GTK_OBJECT(priv->checkbox), "toggled",
+                           G_CALLBACK(hildon_checbox_toggled), dialog);
+
+        g_signal_connect(GTK_OBJECT(priv->checkbox),
+                         "key-press-event",
+                         G_CALLBACK(hildon_set_password_dialog_keypress),
+                         dialog);
+
+        gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),
+                           priv->caption, TRUE, TRUE, 0);
+        gtk_widget_show(priv->caption);
+    } else {
+        priv->caption1_string = _("ecdg_fi_set_passwd_enter_pwd");
+        priv->caption2_string = _("ecdg_fi_set_passwd_confirm");
+    }
+
+    /* create tab1 */
+    priv->entry1 = gtk_entry_new();
+    gtk_widget_show(priv->entry1);
+
+    priv->caption1 = hildon_caption_new(group,
+                                        priv->caption1_string,
+                                        priv->entry1,
+                                        NULL, HILDON_CAPTION_OPTIONAL);
+
+    gtk_entry_set_visibility(GTK_ENTRY(priv->entry1), FALSE);
+
+    gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),
+                       priv->caption1, TRUE, TRUE, 0);
+    gtk_widget_show(priv->caption1);
+
+    /* create tab2 */
+    priv->entry2 = gtk_entry_new();
+    gtk_widget_show(priv->entry2);
+
+    priv->caption2 = hildon_caption_new(group,
+                                        priv->caption2_string,
+                                        priv->entry2,
+                                        NULL, HILDON_CAPTION_OPTIONAL);
+
+    gtk_entry_set_visibility(GTK_ENTRY(priv->entry2), FALSE);
+
+    gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),
+                       priv->caption2, TRUE, TRUE, 0);
+
+    gtk_widget_show(priv->caption2);
+
+    /* Callback functions */
+    g_signal_connect(priv->entry1, "button-release-event",
+                     G_CALLBACK(hildon_set_password_dialog_released),
+                     NULL);
+    g_signal_connect(priv->entry2, "button-release-event",
+                     G_CALLBACK(hildon_set_password_dialog_released),
+                     NULL);
+
+    gtk_signal_connect(GTK_OBJECT(priv->entry1),
+                       "key-press-event",
+                       G_CALLBACK(hildon_set_password_dialog_keypress),
+                       dialog);
+    gtk_signal_connect(GTK_OBJECT(priv->entry2),
+                       "key-press-event",
+                       G_CALLBACK(hildon_set_password_dialog_keypress),
+                       dialog);
+
+    gtk_window_set_title(GTK_WINDOW(dialog),
+                         _(priv->protection
+                           ? "ckdg_ti_dialog_c_passwd_change_password"
+                           : "ecdg_ti_set_password"));
+
+    /* Create the OK/CANCEL buttons */
+    priv->okButton = gtk_dialog_add_button(GTK_DIALOG(dialog),
+                                           _(priv->protection
+                                             ? "ckdg_bd_change_password_dialog_ok"
+                                             : "ecdg_bd_set_password_dialog_ok"),
+                                           GTK_RESPONSE_OK);
+    priv->cancelButton = gtk_dialog_add_button(GTK_DIALOG(dialog),
+                                               _(priv->protection
+                                                 ? "ckdg_bd_change_password_dialog_cancel"
+                                                 : "ecdg_bd_set_password_dialog_cancel"),
+                                               GTK_RESPONSE_CANCEL);
+
+    gtk_window_resize(GTK_WINDOW(dialog), 370, 110);
+
+    gtk_widget_show(priv->okButton);
+    gtk_widget_show(priv->cancelButton);
+
+
+    return dialog;
+}
+
+static void
+hildon_set_password_dialog_class_init(HildonSetPasswordDialogClass * class)
+{
+    GParamSpec *pspec1, *pspec2;
+
+    GObjectClass *object_class = G_OBJECT_CLASS(class);
+
+    parent_class = g_type_class_peek_parent(class);
+
+    object_class->set_property = hildon_set_password_set_property;
+    object_class->get_property = hildon_set_password_get_property;
+    object_class->constructor = hildon_set_password_dialog_constructor;
+
+    pspec1 = g_param_spec_boolean("modify_protection",
+                                 "Password type",
+                                 "Set type to dialog",
+                                 TRUE,
+                                 G_PARAM_CONSTRUCT_ONLY |
+                                 G_PARAM_READWRITE);
+
+    g_object_class_install_property(object_class,
+                                    PROP_HILDON_PASSWORD_DIALOG, pspec1);
+    
+    pspec2 = g_param_spec_string("password",
+                               "Pasword content",
+                               "Set content to dialog",
+                               "DEFAULT",
+                               G_PARAM_READWRITE);
+    
+    g_object_class_install_property(object_class,
+                                    PROP_PASSWORD, pspec2);
+
+    g_type_class_add_private(class,
+                             sizeof(HildonSetPasswordDialogPrivate));
+}
+
+
+static void
+hildon_set_password_dialog_init(HildonSetPasswordDialog * dialog)
+{
+    HildonSetPasswordDialogPrivate *priv;
+
+    priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE(dialog);
+
+    priv->protection = FALSE;
+}
+
+static void
+hildon_set_password_response_change(GtkDialog * dialog, gint arg1,
+                                    GtkWindow * parent)
+{
+    GtkEntry *entry1;
+    GtkEntry *entry2;
+    gchar *text1;
+    gchar *text2;
+
+    HildonNote *note;
+    gint i;
+
+    HildonSetPasswordDialogPrivate *priv;
+
+    priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE(dialog);
+
+    entry1 = GTK_ENTRY(hildon_caption_get_control
+                       (HILDON_CAPTION(priv->caption1)));
+
+    entry2 = GTK_ENTRY(hildon_caption_get_control
+                       (HILDON_CAPTION(priv->caption2)));
+
+    text1 = GTK_ENTRY(entry1)->text;
+    text2 = GTK_ENTRY(entry2)->text;
+    if (arg1 == GTK_RESPONSE_OK){
+        if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(priv->checkbox))){
+           if(strcmp(text1, "" ) != 0){
+                if(strcmp (text1, text2) == 0){
+                    priv->protection = TRUE;
+                } else if(strcmp(text2, "" ) == 0){
+                    g_signal_stop_emission_by_name(G_OBJECT(dialog),
+                            "response");
+                    gtk_infoprint (NULL,
+                                  _("ckdg_ib_dialog_c_passwd_unmatched_pwd"));
+                    gtk_widget_grab_focus(GTK_WIDGET(entry2));
+                } else{
+                    g_signal_stop_emission_by_name(G_OBJECT(dialog),
+                            "response");
+                    gtk_entry_set_text(entry1, "");
+                    gtk_entry_set_text(entry2, "");
+                    gtk_infoprint (NULL,
+                                  _("ckdg_ib_dialog_c_passwd_unmatched_pwd"));
+                    gtk_widget_grab_focus(GTK_WIDGET(entry1));
+                }
+            } else {
+                g_signal_stop_emission_by_name(G_OBJECT(dialog), "response");
+                gtk_infoprint (NULL, _("ecdg_ib_password_is_empt"));
+            }
+        } else{
+           note = HILDON_NOTE(hildon_note_new_confirmation(
+                              GTK_WINDOW(dialog),
+                              _("ckdg_nc_dialog_c_passwd_remove_pwd")));
+           
+            hildon_note_set_button_text(HILDON_NOTE(note),
+                                    _("ckdg_bd_dialog_c_passwd_remove_button"));
+
+            i = gtk_dialog_run(GTK_DIALOG(note));
+
+            gtk_widget_destroy(GTK_WIDGET(note));
+
+            if (i == GTK_RESPONSE_OK)
+               priv->protection = FALSE;
+            else {
+               priv->protection = TRUE;
+                g_signal_stop_emission_by_name(G_OBJECT(dialog), "response");
+           }
+        }
+    }else{
+        priv->protection = TRUE;
+    }
+}
+
+static void
+hildon_set_password_response_set(GtkDialog * dialog, gint arg1,
+                                 GtkWindow * parent)
+{
+    GtkEntry *entry1;
+    GtkEntry *entry2;
+    gchar *text1;
+    gchar *text2;
+
+    HildonSetPasswordDialogPrivate *priv;
+
+    priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE(dialog);
+
+    entry1 = GTK_ENTRY(hildon_caption_get_control
+                       (HILDON_CAPTION(priv->caption1)));
+
+    entry2 = GTK_ENTRY(hildon_caption_get_control
+                       (HILDON_CAPTION(priv->caption2)));
+
+    text1 = GTK_ENTRY(entry1)->text;
+    text2 = GTK_ENTRY(entry2)->text;
+
+    if (arg1 == GTK_RESPONSE_OK) {
+        if (strcmp (text1, "") != 0) {
+            if (strcmp (text1, text2) == 0) {
+                priv->protection = TRUE;
+            } else if (strcmp (text2, "") == 0) {
+                g_signal_stop_emission_by_name(G_OBJECT(dialog), "response");
+                gtk_infoprint (NULL, _("ecdg_ib_password_is_empty"));
+                gtk_widget_grab_focus (GTK_WIDGET (priv->entry2));
+            } else {
+                g_signal_stop_emission_by_name(G_OBJECT(dialog), "response");
+               gtk_entry_set_text(entry1, "");
+               gtk_entry_set_text(entry2, "");
+               gtk_infoprint (NULL, _("ecdg_ib_passwords_do_not_match"));
+                gtk_widget_grab_focus(GTK_WIDGET(priv->entry1));
+           }
+        } else {
+            g_signal_stop_emission_by_name(G_OBJECT(dialog), "response");
+            gtk_entry_set_text(entry2, "");
+            gtk_infoprint (NULL, _("ecdg_ib_password_is_empty"));
+            gtk_widget_grab_focus(GTK_WIDGET(priv->entry1));
+        }
+    } else { 
+        priv->protection = FALSE;
+    }            
+}
+
+static void hildon_checbox_toggled(GtkWidget * widget, gpointer data)
+{
+    HildonSetPasswordDialog *dialog;
+    HildonSetPasswordDialogPrivate *priv;
+
+    dialog = HILDON_SET_PASSWORD_DIALOG(data);
+    priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE(dialog);
+
+    if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) {
+        gtk_widget_set_sensitive(GTK_WIDGET(priv->entry1), TRUE);
+        gtk_widget_set_sensitive(GTK_WIDGET(priv->entry2), TRUE);
+    } else {
+        gtk_widget_set_sensitive(GTK_WIDGET(priv->entry1), FALSE);
+        gtk_widget_set_sensitive(GTK_WIDGET(priv->entry2), FALSE);
+    }
+}
+
+static gboolean
+hildon_set_password_dialog_released(GtkWidget * widget,
+                                    GdkEventButton * event,
+                                    gpointer user_data)
+{
+    GtkEditable *editable = GTK_EDITABLE(widget);
+
+    gtk_editable_select_region(GTK_EDITABLE(editable), 0, -1);
+    gtk_widget_grab_focus(GTK_WIDGET(editable));
+
+    return FALSE;
+}
+
+static gboolean
+hildon_set_password_dialog_keypress(GtkWidget * widget,
+                                    GdkEventKey * event, gpointer data)
+{
+    HildonSetPasswordDialog *dialog;
+    HildonSetPasswordDialogPrivate *priv;
+
+    dialog = HILDON_SET_PASSWORD_DIALOG(data);
+    priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE(dialog);
+
+    if ((widget == priv->checkbox) &&
+             ((event->keyval == GDK_Left) || (event->keyval == GDK_KP_Left)
+              || (event->keyval == GDK_Right)
+              || (event->keyval == GDK_KP_Right))) {
+        gtk_widget_grab_focus(priv->checkbox);
+
+        return TRUE;
+    } else if ((widget == priv->checkbox) &&
+               ((event->keyval == GDK_Return) ||
+                (event->keyval == GDK_KP_Enter))) {
+        if (gtk_toggle_button_get_active
+            (GTK_TOGGLE_BUTTON(priv->checkbox))) {
+            gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->checkbox),
+                                         FALSE);
+        } else {
+            gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->checkbox),
+                                         TRUE);
+        }
+        return TRUE;
+    } else if ((event->keyval == GDK_Return)
+               || (event->keyval == GDK_KP_Enter)) {
+        gtk_dialog_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
+
+        return TRUE;
+    } else {
+        return FALSE;   /* pass the keypress on */
+    }
+}
+
+/* Public functions */
+
+/**
+ * hildon_set_password_dialog_get_type:
+ *
+ * Returns GType for HildonPasswordDialog as produced by
+ * g_type_register_static().
+ *
+ * Return value: HildonSetPasswordDialog type
+ **/
+GType hildon_set_password_dialog_get_type()
+{
+    static GType dialog_type = 0;
+
+    if (!dialog_type) {
+        static const GTypeInfo dialog_info = {
+            sizeof(HildonSetPasswordDialogClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_set_password_dialog_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonSetPasswordDialog),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_set_password_dialog_init
+        };
+
+        dialog_type = g_type_register_static(GTK_TYPE_DIALOG,
+                                             "HildonSetPasswordDialog",
+                                             &dialog_info, 0);
+    }
+    return dialog_type;
+}
+
+/**
+ * hildon_set_password_dialog_new:
+ * @parent: parent window; can be NULL
+ * @modify_protection: TRUE creates a new change password dialog and FALSE
+ *                     creates a new set password dialog 
+ * 
+ * Construct a new HildonSetPasswordDialog.
+ *
+ * Return value: a new #GtkWidget of type HildonSetPasswordDialog
+ **/
+
+GtkWidget *hildon_set_password_dialog_new(GtkWindow * parent,
+                                          gboolean modify_protection)
+{
+    GtkWidget *dialog = g_object_new
+        (HILDON_TYPE_SET_PASSWORD_DIALOG, "modify_protection",
+         modify_protection, NULL);
+
+    if (modify_protection == TRUE) {
+        g_signal_connect(G_OBJECT(dialog), "response",
+                         G_CALLBACK(hildon_set_password_response_change),
+                         parent);
+    } else {
+        g_signal_connect(G_OBJECT(dialog), "response",
+                         G_CALLBACK(hildon_set_password_response_set),
+                         parent);
+    }
+    if (parent != NULL) {
+        gtk_window_set_transient_for(GTK_WINDOW(dialog), parent);
+    }
+
+    return dialog;
+}
+
+/**
+ * hildon_set_password_dialog_new_with_default:
+ * @parent: parent window; can be NULL
+ * @password: a default password to be shown in password field.
+ * @modify_protection: TRUE creates a new change password dialog and FALSE
+ *                     creates a new set password dialog 
+ * 
+ * Same as #hildon_set_password_dialog_new, but with a default password
+ * in password field.
+ *
+ * Return value: a new #GtkWidget of type HildonSetPasswordDialog
+ **/
+
+GtkWidget *hildon_set_password_dialog_new_with_default
+                                         (GtkWindow *parent,
+                                         gchar *password,
+                                          gboolean modify_protection)
+{
+    GtkWidget *dialog;
+
+    dialog = hildon_set_password_dialog_new(parent, 
+                                           modify_protection);
+    if(password != NULL)
+        g_object_set(G_OBJECT(dialog), "password", password, NULL);
+    
+    return dialog;
+}
+
+/**
+ * hildon_set_password_dialog_get_password:
+ * @dialog: pointer to HildonSetPasswordDialog
+ * 
+ * Returns current password.
+ *
+ * Return value: changed password ( if the dialog is successfully 
+ * accepted with 'OK' ( and when the check box is 'ON' ( in Change Password
+ * Dialog ))
+ **/
+const gchar
+    *hildon_set_password_dialog_get_password(HildonSetPasswordDialog *
+                                             dialog)
+{
+    HildonSetPasswordDialogPrivate *priv;
+
+    priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE(dialog);
+
+    return GTK_ENTRY(priv->entry1)->text;
+}
+
+/**
+ * hildon_set_password_dialog_get_protected:
+ * @dialog: pointer to HildonSetPasswordDialog
+ * 
+ * Returns protection mode.
+ *
+ * Return value: password protection mode ( TRUE when the protection is
+ *               'ON' and FALSE when the protection is 'OFF' )
+ **/
+gboolean
+hildon_set_password_dialog_get_protected(HildonSetPasswordDialog * dialog)
+{
+    HildonSetPasswordDialogPrivate *priv;
+
+    priv = HILDON_SET_PASSWORD_DIALOG_GET_PRIVATE(dialog);
+
+    return priv->protection;
+}
diff --git a/hildon-widgets/hildon-set-password-dialog.h b/hildon-widgets/hildon-set-password-dialog.h
new file mode 100644 (file)
index 0000000..0ead920
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __HILDON_SET_PASSWORD_DIALOG_H__
+#define __HILDON_SET_PASSWORD_DIALOG_H__
+
+#include <gtk/gtkdialog.h>
+
+G_BEGIN_DECLS
+#define HILDON_TYPE_SET_PASSWORD_DIALOG \
+  ( hildon_set_password_dialog_get_type() )
+#define HILDON_SET_PASSWORD_DIALOG(obj) \
+  (GTK_CHECK_CAST (obj, HILDON_TYPE_SET_PASSWORD_DIALOG,\
+   HildonSetPasswordDialog))
+#define HILDON_SET_PASSWORD_DIALOG_CLASS(klass) \
+  (GTK_CHECK_CLASS_CAST ((klass), HILDON_TYPE_SET_PASSWORD_DIALOG, \
+   HildonSetPasswordDialogClass))
+#define HILDON_IS_SET_PASSWORD_DIALOG(obj) \
+  (GTK_CHECK_TYPE (obj, HILDON_TYPE_SET_PASSWORD_DIALOG))
+#define HILDON_IS_SET_PASSWORD_DIALOG_CLASS(klass) \
+  (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_SET_PASSWORD_DIALOG))
+/**
+ * HildonSetPasswordDialog:
+ * 
+ * Contains only private data.
+ */
+typedef struct _HildonSetPasswordDialog HildonSetPasswordDialog;
+typedef struct _HildonSetPasswordDialogClass HildonSetPasswordDialogClass;
+
+struct _HildonSetPasswordDialog {
+    GtkDialog parent;
+};
+
+struct _HildonSetPasswordDialogClass {
+    GtkDialogClass parent_class;
+};
+
+/*
+ * Public methods
+ */
+
+GtkWidget *hildon_set_password_dialog_new(GtkWindow * parent,
+                                          gboolean modify_protection);
+
+GtkWidget *hildon_set_password_dialog_new_with_default
+                                         (GtkWindow *parent,
+                                         gchar *password,
+                                          gboolean modify_protection);
+
+GType hildon_set_password_dialog_get_type(void);
+
+const gchar
+    *hildon_set_password_dialog_get_password(HildonSetPasswordDialog *
+                                             dialog);
+
+gboolean hildon_set_password_dialog_get_protected(HildonSetPasswordDialog *
+                                                  dialog);
+
+G_END_DECLS
+#endif /* HILDON_SET_PASSWORD_DIALOG_H */
diff --git a/hildon-widgets/hildon-sort-dialog.c b/hildon-widgets/hildon-sort-dialog.c
new file mode 100644 (file)
index 0000000..d2a727b
--- /dev/null
@@ -0,0 +1,320 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/* 
+ * @file hildon-sort-dialog.c
+ * 
+ * This file contains API for Hildon Sort dialog.
+ * @desc: The sort dialog is used to define the order in which item are 
+ * shown in a list. Choise lists always display the current value when 
+ * the dialog is opened. 
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <libintl.h>
+
+#include <gtk/gtkcombobox.h>
+#include <gtk/gtkbox.h>
+#include <gdk/gdkkeysyms.h>
+#include <glib-object.h>
+
+#include <hildon-widgets/hildon-caption.h>
+#include "hildon-sort-dialog.h"
+
+
+#define _(String) dgettext(PACKAGE, String)
+
+static GtkDialogClass *parent_class;
+
+#define HILDON_SORT_DIALOG_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE \
+                ((obj), HILDON_TYPE_SORT_DIALOG, HildonSortDialogPrivate));
+
+typedef struct _HildonSortDialogPrivate HildonSortDialogPrivate;
+
+static void hildon_sort_dialog_class_init(HildonSortDialogClass * class);
+static void hildon_sort_dialog_init(HildonSortDialog * widget);
+
+/* private data */
+struct _HildonSortDialogPrivate {
+    /* Tab one */
+    GtkWidget *combo1;
+    GtkWidget *caption1;
+
+    /* Tab two */
+    GtkWidget *combo2;
+    GtkWidget *caption2;
+
+    /* OK/Cancel buttons */
+    GtkWidget *okButton;
+    GtkWidget *cancelButton;
+
+    /* Index value for sort_by */
+    gint sort_by_value;
+
+    /* Index value for sort_order */
+    gint sort_order_type;
+
+    gboolean index_first;
+    /* Index value counter */
+    gint index_counter;
+};
+
+/* Private functions */
+
+/*
+ * Initialises the sort dialog class.
+ */
+static void hildon_sort_dialog_class_init(HildonSortDialogClass * class)
+{
+    parent_class = g_type_class_peek_parent(class);
+    g_type_class_add_private(class, sizeof(HildonSortDialogPrivate));
+}
+
+static void hildon_sort_dialog_init(HildonSortDialog * dialog)
+{
+    HildonSortDialogPrivate *priv;
+    GtkSizeGroup *group;
+
+    g_return_if_fail(HILDON_IS_SORT_DIALOG(dialog));
+
+    priv = HILDON_SORT_DIALOG_GET_PRIVATE(dialog);
+
+    priv->index_first = TRUE;
+    priv->index_counter = 0;
+
+    group = GTK_SIZE_GROUP(gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL));
+
+    gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
+    gtk_window_set_modal(GTK_WINDOW(dialog), TRUE);
+    gtk_window_set_title(GTK_WINDOW(dialog), _("ckdg_ti_sort"));
+
+    /* Tab one */
+    priv->combo1 = gtk_combo_box_new_text();
+    priv->caption1 = hildon_caption_new(group, _("ckdg_fi_sort_field"), priv->combo1,
+                                        NULL, HILDON_CAPTION_OPTIONAL);
+
+    gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),
+                       priv->caption1, FALSE, FALSE, 0);
+
+    /* Tab two */
+    priv->combo2 = gtk_combo_box_new_text();
+    gtk_combo_box_append_text(GTK_COMBO_BOX(priv->combo2),
+                              _("ckdg_va_sort_ascending"));
+    gtk_combo_box_append_text(GTK_COMBO_BOX(priv->combo2),
+                              _("ckdg_va_sort_descending"));
+
+    priv->caption2 = hildon_caption_new(group, _("ckdg_fi_sort_order"),
+                                        priv->combo2,
+                                        NULL, HILDON_CAPTION_OPTIONAL);
+
+    gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),
+                       priv->caption2, FALSE, FALSE, 0);
+
+    gtk_combo_box_set_active(GTK_COMBO_BOX(priv->combo1), 0);
+    gtk_combo_box_set_active(GTK_COMBO_BOX(priv->combo2), 0);
+
+    /* Create the OK/CANCEL buttons */
+    priv->okButton = gtk_dialog_add_button(GTK_DIALOG(dialog),
+                                           _("ckdg_bd_sort_dialog_ok"),
+                                           GTK_RESPONSE_OK);
+    priv->cancelButton = gtk_dialog_add_button(GTK_DIALOG(dialog),
+                                               _("ckdg_bd_sort_dialog_cancel"),
+                                               GTK_RESPONSE_CANCEL);
+
+    gtk_window_resize(GTK_WINDOW(dialog), 370, 100);
+    gtk_widget_show_all(GTK_DIALOG(dialog)->vbox);
+}
+
+/* Public functions */
+
+/**
+ * hildon_sort_dialog_get_type:
+ *
+ * Returns GType for HildonSortDialog as produced by 
+ * g_type_register_static().
+ *
+ * Return value: HildonSortDialog type
+ **/
+GType hildon_sort_dialog_get_type()
+{
+    static GType dialog_type = 0;
+
+    if (!dialog_type) {
+        static const GTypeInfo dialog_info = {
+            sizeof(HildonSortDialogClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_sort_dialog_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonSortDialog),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_sort_dialog_init
+        };
+
+        dialog_type = g_type_register_static(GTK_TYPE_DIALOG,
+                                             "HildonSortDialog",
+                                             &dialog_info, 0);
+    }
+    return dialog_type;
+}
+
+/**
+ * hildon_sort_dialog_new:
+ * @parent: Widget to be transient for, or NULL if none.
+ *
+ * HildonSortDialog contains two #HildonCaption:s with combo boxes. 
+ *
+ * Return value: pointer to a new @HildonSortDialog widget.
+ */
+GtkWidget *hildon_sort_dialog_new(GtkWindow * parent)
+{
+    GtkWidget *sort_dialog = g_object_new(HILDON_TYPE_SORT_DIALOG, NULL);
+
+    if (parent)
+        gtk_window_set_transient_for(GTK_WINDOW(sort_dialog), parent);
+
+    return sort_dialog;
+}
+
+/**
+ * hildon_sort_dialog_get_sort_key:
+ * @dialog: the #HildonSortDialog widget.
+ *
+ * Gets index to currently active sort key.
+ * 
+ * Return value: An integer which is the index value of the "Sort by" 
+ * field 
+ */
+gint hildon_sort_dialog_get_sort_key(HildonSortDialog * dialog)
+{
+    GtkWidget *combo_key;
+    HildonSortDialogPrivate *priv;
+
+    g_return_val_if_fail(HILDON_IS_SORT_DIALOG(dialog), -1);
+
+    priv = HILDON_SORT_DIALOG_GET_PRIVATE(dialog);
+    combo_key = hildon_caption_get_control(HILDON_CAPTION(priv->caption1));
+    priv->sort_by_value =
+        gtk_combo_box_get_active(GTK_COMBO_BOX(combo_key));
+    return priv->sort_by_value;
+}
+
+/**
+ * hildon_sort_dialog_get_sort_order:
+ * @dialog: the #HildonSortDialog widget.
+ *
+ * Gets current sorting order from "Sort order" field.
+ *
+ * Return value: current sorting order as #GtkSortType.
+ */
+GtkSortType hildon_sort_dialog_get_sort_order(HildonSortDialog * dialog)
+{
+    GtkWidget *combo_key;
+    HildonSortDialogPrivate *priv;
+
+    g_return_val_if_fail(HILDON_IS_SORT_DIALOG(dialog), 0);
+
+    priv = HILDON_SORT_DIALOG_GET_PRIVATE(dialog);
+    combo_key = hildon_caption_get_control(HILDON_CAPTION(priv->caption2));
+    priv->sort_order_type =
+        gtk_combo_box_get_active(GTK_COMBO_BOX(combo_key));
+    return priv->sort_order_type;
+}
+
+/**
+ * hildon_sort_dialog_set_sort_key:
+ * @dialog: the #HildonSortDialog widget.
+ * @key: Combo box's index value.
+ *
+ * Sets the index value of the #HildonSortDialog widget.
+ */
+void hildon_sort_dialog_set_sort_key(HildonSortDialog * dialog, gint key)
+{
+    GtkWidget *combo_key;
+    HildonSortDialogPrivate *priv;
+
+    g_return_if_fail(HILDON_IS_SORT_DIALOG(dialog));
+
+    priv = HILDON_SORT_DIALOG_GET_PRIVATE(dialog);
+    combo_key = hildon_caption_get_control(HILDON_CAPTION(priv->caption1));
+    gtk_combo_box_set_active(GTK_COMBO_BOX(combo_key), key);
+}
+
+/**
+ * hildon_sort_dialog_set_sort_order:
+ * @dialog: the #HildonSortDialog widget.
+ * @order: Combo box's index value.
+ *
+ * Sets the index value of the #HildonSortDialog widget.
+ */
+void
+hildon_sort_dialog_set_sort_order(HildonSortDialog * dialog,
+                                  GtkSortType order)
+{
+    GtkWidget *combo_order;
+    HildonSortDialogPrivate *priv;
+
+    g_return_if_fail(HILDON_IS_SORT_DIALOG(dialog));
+
+    priv = HILDON_SORT_DIALOG_GET_PRIVATE(dialog);
+    combo_order =
+        hildon_caption_get_control(HILDON_CAPTION(priv->caption2));
+    gtk_combo_box_set_active(GTK_COMBO_BOX(combo_order), order);
+}
+
+/**
+ * hildon_sort_dialog_add_sort_key:
+ * @dialog: the #HildonSortDialog widget.
+ * @sort_key: Combo box's index value
+ *
+ * Adds a new sort key and returns the respective index in
+ * sort key combobox.
+ *
+ * Return value: An integer which is the index of the added combo box's
+ * item.
+ */
+gint
+hildon_sort_dialog_add_sort_key(HildonSortDialog * dialog,
+                                const gchar * sort_key)
+{
+    HildonSortDialogPrivate *priv;
+
+    g_return_val_if_fail(HILDON_IS_SORT_DIALOG(dialog), -1);
+
+    priv = HILDON_SORT_DIALOG_GET_PRIVATE(dialog);
+    gtk_combo_box_append_text(GTK_COMBO_BOX(priv->combo1), sort_key);
+
+    if (priv->index_first == TRUE) {
+        priv->index_first = FALSE;
+        return priv->index_counter;
+
+    } else {
+        return priv->index_counter += 1;
+    }
+}
diff --git a/hildon-widgets/hildon-sort-dialog.h b/hildon-widgets/hildon-sort-dialog.h
new file mode 100644 (file)
index 0000000..32e4cd8
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __HILDON_SORT_DIALOG_H__
+#define __HILDON_SORT_DIALOG_H__
+
+#include <gtk/gtkdialog.h>
+
+G_BEGIN_DECLS
+#define HILDON_TYPE_SORT_DIALOG \
+  ( hildon_sort_dialog_get_type() )
+#define HILDON_SORT_DIALOG(obj) \
+  (GTK_CHECK_CAST (obj, HILDON_TYPE_SORT_DIALOG, HildonSortDialog))
+#define HILDON_SORT_DIALOG_CLASS(klass) \
+  (GTK_CHECK_CLASS_CAST ((klass), HILDON_TYPE_SORT_DIALOG, \
+  HildonSortDialogClass))
+#define HILDON_IS_SORT_DIALOG(obj) \
+  (GTK_CHECK_TYPE (obj, HILDON_TYPE_SORT_DIALOG))
+#define HILDON_IS_SORT_DIALOG_CLASS(klass) \
+  (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_SORT_DIALOG))
+typedef struct _HildonSortDialog HildonSortDialog;
+typedef struct _HildonSortDialogClass HildonSortDialogClass;
+
+
+
+struct _HildonSortDialog {
+    GtkDialog parent;
+};
+
+struct _HildonSortDialogClass {
+    GtkDialogClass parent_class;
+};
+
+GType hildon_sort_dialog_get_type(void);
+
+
+GtkWidget *hildon_sort_dialog_new(GtkWindow * parent);
+gint hildon_sort_dialog_get_sort_key(HildonSortDialog * dialog);
+GtkSortType hildon_sort_dialog_get_sort_order(HildonSortDialog * dialog);
+void hildon_sort_dialog_set_sort_key(HildonSortDialog * dialog, gint key);
+void hildon_sort_dialog_set_sort_order(HildonSortDialog * dialog,
+                                       GtkSortType order);
+gint hildon_sort_dialog_add_sort_key(HildonSortDialog * dialog,
+                                     const gchar * sort_key);
+
+G_END_DECLS
+#endif
diff --git a/hildon-widgets/hildon-telephone-editor.c b/hildon-widgets/hildon-telephone-editor.c
new file mode 100644 (file)
index 0000000..8f050fe
--- /dev/null
@@ -0,0 +1,1409 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/*
+ * @file hildon-telephone-editor.c
+ * 
+ * This file implements the HildonTelephoneEditor widget.
+ */
+
+/*
+ * TODO:
+ * - update hildon doc
+ *
+ */
+
+/* HILDON DOC
+ * @shortdesc: 
+ * @longdesc: 
+ *
+ * @seealso: 
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
+#include <libintl.h>
+#include <string.h>
+#include "hildon-telephone-editor.h"
+#include "hildon-composite-widget.h"
+
+#define _(String) gettext (String)
+#define HILDON_TELEPHONE_EDITOR_GET_PRIVATE(obj) \
+        (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
+        HILDON_TELEPHONE_EDITOR_TYPE, HildonTelephoneEditorPriv));
+
+#define AREA_LEN 4
+#define COUNTRY_LEN 7
+#define NUMBER_LEN 10
+
+#define AREA_STR "Area"
+#define COUNTRY_STR "Country"
+#define NUMBER_STR "Number"
+
+typedef struct _HildonTelephoneEditorPriv HildonTelephoneEditorPriv;
+
+enum {
+    PROP_0,
+    PROP_COUNTRY_STR,
+    PROP_AREA_STR,
+    PROP_NUMBER_STR,
+    PROP_FORMAT
+};
+
+/*< private >*/
+struct _HildonTelephoneEditorPriv {
+    HildonTelephoneEditorFormat format; /* format of the editor */
+
+    gboolean edited_country;    /* is the country edited */
+    gboolean edited_area;       /* is the area edited */
+    gboolean edited_number;     /* is the number edited */
+
+    gboolean editable_country;  /* is the country editable */
+    gboolean editable_area;     /* is the area editable */
+    gboolean editable_number;   /* is the number editable */
+
+    gboolean show_plus; /* show '+' sign in country */
+    gboolean show_border;       /* show border around the widget */
+
+    GtkWidget *frame;   /* frame for border lines */
+    GtkWidget *plus;    /* + in front of country code */
+    GtkWidget *plus_event;      /* event box for the + -label */
+    GtkWidget *country; /* country code */
+    GtkWidget *area;    /* area code */
+    GtkWidget *number;  /* telephone number */
+
+    gint j;
+};
+
+
+static GtkContainerClass *parent_class;
+
+static void
+hildon_telephone_editor_class_init(HildonTelephoneEditorClass *
+                                   editor_class);
+
+static void 
+hildon_telephone_editor_init(HildonTelephoneEditor * editor);
+
+static void
+hildon_telephone_editor_forall(GtkContainer * container,
+                               gboolean include_internals,
+                               GtkCallback callback,
+                               gpointer callback_data);
+static void 
+hildon_telephone_editor_destroy(GtkObject * self);
+
+static void
+hildon_telephone_editor_size_allocate(GtkWidget * widget,
+                                      GtkAllocation * allocation);
+
+static void
+hildon_telephone_editor_size_request(GtkWidget * widget,
+                                     GtkRequisition * requisition);
+
+static gboolean
+hildon_telephone_editor_button_release(GtkWidget * widget,
+                                     GdkEventButton * event,
+                                     gpointer data);
+static void
+hildon_telephone_editor_focus_dest_entry(GtkWidget * widget,
+                                         gboolean edited,
+                                         gboolean move_left);
+static gboolean
+hildon_telephone_editor_entry_keypress(GtkWidget * widget,
+                                       GdkEventKey * event, gpointer data);
+
+static gboolean
+hildon_telephone_editor_mnemonic_activate( GtkWidget *widget,
+                                           gboolean group_cycling);
+
+static void
+hildon_telephone_editor_set_property(GObject * object,
+                                     guint prop_id,
+                                     const GValue * value,
+                                     GParamSpec * pspec);
+static void
+hildon_telephone_editor_get_property(GObject * object,
+                                     guint prop_id,
+                                     GValue * value, GParamSpec * pspec);
+
+GType hildon_telephone_editor_get_type(void)
+{
+    static GType editor_type = 0;
+
+    if (!editor_type) {
+        static const GTypeInfo editor_info = {
+            sizeof(HildonTelephoneEditorClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_telephone_editor_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonTelephoneEditor),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_telephone_editor_init,
+        };
+        editor_type = g_type_register_static(GTK_TYPE_CONTAINER,
+                                             "HildonTelephoneEditor",
+                                             &editor_info, 0);
+    }
+    return editor_type;
+}
+
+static void
+hildon_telephone_editor_class_init(HildonTelephoneEditorClass *
+                                   editor_class)
+{
+    GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(editor_class);
+    GtkContainerClass *container_class = GTK_CONTAINER_CLASS(editor_class);
+    GObjectClass *object_class = G_OBJECT_CLASS(editor_class);
+
+    parent_class = g_type_class_peek_parent(editor_class);
+
+    g_type_class_add_private(editor_class, sizeof(HildonTelephoneEditorPriv));
+
+    widget_class->size_request = hildon_telephone_editor_size_request;
+    widget_class->size_allocate = hildon_telephone_editor_size_allocate;
+    container_class->forall = hildon_telephone_editor_forall;
+    widget_class->mnemonic_activate = hildon_telephone_editor_mnemonic_activate;
+    widget_class->focus = hildon_composite_widget_focus;
+    object_class->set_property = hildon_telephone_editor_set_property;
+    object_class->get_property = hildon_telephone_editor_get_property;
+
+    GTK_OBJECT_CLASS(editor_class)->destroy = hildon_telephone_editor_destroy;
+
+    /* Install properties */
+    g_object_class_install_property(object_class, PROP_COUNTRY_STR,
+        g_param_spec_string("set-country",
+                            ("Country string"),
+                            ("Sets country string"),
+                            COUNTRY_STR, G_PARAM_READABLE | G_PARAM_WRITABLE));
+
+    g_object_class_install_property(object_class, PROP_AREA_STR,
+        g_param_spec_string("set-area",
+                            ("Country string"),
+                            ("Sets country string"),
+                            AREA_STR, G_PARAM_READABLE | G_PARAM_WRITABLE));
+
+    g_object_class_install_property(object_class, PROP_NUMBER_STR,
+        g_param_spec_string("set-number",
+                            ("Country string"),
+                            ("Sets country string"),
+                            NUMBER_STR, G_PARAM_READABLE | G_PARAM_WRITABLE));
+
+    g_object_class_install_property(object_class, PROP_FORMAT,
+        g_param_spec_int("set-format",
+                         ("Format"),
+                         ("Sets telephoneditor format"),
+                         HILDON_TELEPHONE_EDITOR_FORMAT_FREE,
+                         HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA,
+                         0, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
+}
+
+static void
+hildon_telephone_editor_init(HildonTelephoneEditor * editor)
+{
+    HildonTelephoneEditorPriv *priv;
+    gboolean use_frames = FALSE;       /* in entries, for debug purposes */
+
+    priv = HILDON_TELEPHONE_EDITOR_GET_PRIVATE(editor);
+
+    priv->frame = gtk_frame_new(NULL);
+    priv->plus = gtk_label_new("+");
+    priv->plus_event = gtk_event_box_new();
+    priv->country = gtk_entry_new();
+    priv->area = gtk_entry_new();
+    priv->number = gtk_entry_new();
+    priv->edited_country = FALSE;
+    priv->edited_area = FALSE;
+    priv->edited_number = FALSE;
+    priv->show_plus = TRUE;
+    priv->show_border = TRUE;
+    priv->editable_country = TRUE;
+    priv->editable_area = TRUE;
+    priv->editable_number = TRUE;
+
+    gtk_container_add(GTK_CONTAINER(priv->plus_event), priv->plus);
+
+    gtk_entry_set_has_frame(GTK_ENTRY(priv->country), use_frames);
+    gtk_entry_set_has_frame(GTK_ENTRY(priv->area), use_frames);
+    gtk_entry_set_has_frame(GTK_ENTRY(priv->number), use_frames);
+
+    gtk_widget_set_parent(priv->frame, GTK_WIDGET(editor));
+    gtk_widget_set_parent(priv->plus_event, GTK_WIDGET(editor));
+    
+    hildon_telephone_editor_set_widths(editor, COUNTRY_LEN, AREA_LEN,
+                                       NUMBER_LEN);
+
+    /* set signals for country entry */
+    gtk_signal_connect(GTK_OBJECT(priv->country), "button_release_event",
+                       G_CALLBACK(hildon_telephone_editor_button_release),
+                       editor);
+
+    gtk_signal_connect(GTK_OBJECT(priv->country), "key-press-event",
+                       G_CALLBACK(hildon_telephone_editor_entry_keypress),
+                       editor);
+
+    /* set signals for plus label */
+    gtk_signal_connect(GTK_OBJECT(priv->plus_event), "button_press_event",
+                       G_CALLBACK(hildon_telephone_editor_button_release),
+                       editor);
+
+    /* set signals for area entry */
+    gtk_signal_connect(GTK_OBJECT(priv->area), "button_release_event",
+                       G_CALLBACK(hildon_telephone_editor_button_release),
+                       editor);
+
+    gtk_signal_connect(GTK_OBJECT(priv->area), "key-press-event",
+                       G_CALLBACK(hildon_telephone_editor_entry_keypress),
+                       editor);
+
+    /* set signals for number entry */
+    gtk_signal_connect(GTK_OBJECT(priv->number), "button_release_event",
+                       G_CALLBACK(hildon_telephone_editor_button_release),
+                       editor);
+
+    gtk_signal_connect(GTK_OBJECT(priv->number), "key-press-event",
+                       G_CALLBACK(hildon_telephone_editor_entry_keypress),
+                       editor);
+
+    GTK_WIDGET_SET_FLAGS(editor, GTK_NO_WINDOW);
+
+    gtk_widget_show(priv->number);
+    gtk_widget_show(priv->area);
+    gtk_widget_show(priv->country);
+    gtk_widget_show_all(priv->frame);
+    gtk_widget_show_all(priv->plus_event);
+}
+
+/**
+ * hildon_telephone_editor_new:
+ * @format: Format of the editor.
+ *
+ * Creates a new #HildonTelephoneEditor. The editor can be in a free
+ * format where the user can type in country code, area code and the
+ * phone number and can type in other characters than just digits. In
+ * coerse format the editor has fields where the user can input only
+ * digits. See #HildonTelephoneEditorFormat for the different coerse
+ * formats.
+ * 
+ * Return value: New #HildonTelephoneEditor.
+ */
+GtkWidget *
+hildon_telephone_editor_new(HildonTelephoneEditorFormat format)
+{
+
+    HildonTelephoneEditor *editor;
+
+    editor =
+        g_object_new(HILDON_TELEPHONE_EDITOR_TYPE, "set-format", format,
+                     "set-country", _(COUNTRY_STR), "set-area",
+                     _(AREA_STR), "set-number", _(NUMBER_STR), NULL);
+
+    return GTK_WIDGET(editor);
+}
+
+/**
+ * hildon_telephone_editor_new_with_strings:
+ * @format: Format of the editor.
+ * @country: Default text for the country field.
+ * @area: Default text for the area field.
+ * @number: Default text for the number field.
+ *
+ * Creates a new #HildonTelephoneEditor. See hildon_telephone_editor_new
+ * for details.
+ * 
+ * Return value: New #HildonTelephoneEditor.
+ */
+GtkWidget *
+hildon_telephone_editor_new_with_strings(HildonTelephoneEditorFormat
+                                              format,
+                                              const gchar * country,
+                                              const gchar * area,
+                                              const gchar * number)
+{
+    HildonTelephoneEditor *editor;
+
+    editor =
+        g_object_new(HILDON_TELEPHONE_EDITOR_TYPE, "set-format", format,
+                     "set-country", country, "set-area", area,
+                     "set-number", number, NULL);
+
+    return GTK_WIDGET(editor);
+}
+
+static void 
+hildon_telephone_editor_get_property(GObject * object,
+                                                 guint prop_id,
+                                                 GValue * value,
+                                                 GParamSpec * pspec)
+{
+    HildonTelephoneEditorPriv *priv;
+
+    priv = HILDON_TELEPHONE_EDITOR_GET_PRIVATE(object);
+
+    switch (prop_id) {
+    case PROP_COUNTRY_STR:
+        g_value_set_string(value, GTK_ENTRY(priv->country)->text);
+        break;
+    case PROP_AREA_STR:
+        g_value_set_string(value, GTK_ENTRY(priv->area)->text);
+        break;
+    case PROP_NUMBER_STR:
+        if (priv->format != HILDON_TELEPHONE_EDITOR_FORMAT_FREE) {
+            g_value_set_string(value, GTK_ENTRY(priv->number)->text);
+        }
+        break;
+    case PROP_FORMAT:
+        g_value_set_int(value, priv->format);
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+        break;
+    }
+}
+
+static void 
+hildon_telephone_editor_set_property(GObject * object,
+                                                 guint prop_id,
+                                                 const GValue * value,
+                                                 GParamSpec * pspec)
+{
+    HildonTelephoneEditorPriv *priv;
+    priv = HILDON_TELEPHONE_EDITOR_GET_PRIVATE(object);
+
+    switch (prop_id) {
+    case PROP_COUNTRY_STR:
+        gtk_entry_set_text(GTK_ENTRY(priv->country),
+                           _(g_value_get_string(value)));
+        break;
+    case PROP_AREA_STR:
+        gtk_entry_set_text(GTK_ENTRY(priv->area),
+                           _(g_value_get_string(value)));
+        break;
+    case PROP_NUMBER_STR:
+        gtk_entry_set_text(GTK_ENTRY(priv->number),
+                           _(g_value_get_string(value)));
+        break;
+    case PROP_FORMAT:
+        priv->format = g_value_get_int(value);
+        if (priv->format != HILDON_TELEPHONE_EDITOR_FORMAT_FREE)
+            gtk_entry_set_text(GTK_ENTRY(priv->number), _(NUMBER_STR));
+
+        /* set proper fields according to selected format */
+        switch (priv->format) {
+        case HILDON_TELEPHONE_EDITOR_FORMAT_COERCE:
+            gtk_widget_set_parent(priv->number, GTK_WIDGET(object));
+        case HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA:
+            gtk_widget_set_parent(priv->area, GTK_WIDGET(object));
+        case HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY:
+            gtk_widget_set_parent(priv->country, GTK_WIDGET(object));
+            break;
+        case HILDON_TELEPHONE_EDITOR_FORMAT_FREE:
+            gtk_widget_set_parent(priv->number, GTK_WIDGET(object));
+            break;
+        default:
+            g_assert_not_reached();
+        }
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+        break;
+    }
+}
+
+static gboolean
+hildon_telephone_editor_mnemonic_activate( GtkWidget *widget,
+                                  gboolean group_cycling)
+{
+  HildonTelephoneEditorPriv *priv;
+  priv = HILDON_TELEPHONE_EDITOR_GET_PRIVATE(widget);
+
+  if (!GTK_CONTAINER(widget)->focus_child)
+  {
+    if (priv->format == HILDON_TELEPHONE_EDITOR_FORMAT_FREE)
+    {
+      gtk_widget_grab_focus(priv->number);
+
+      if (priv->editable_number && !priv->edited_number)
+        gtk_editable_select_region(GTK_EDITABLE(priv->number), 0, -1);
+    }
+    else
+    {
+      if (priv->editable_country)
+      {
+        gtk_widget_grab_focus(priv->country);
+        if (!priv->edited_country)
+          gtk_editable_select_region(GTK_EDITABLE(priv->country), 0, -1);
+      }
+      else if ((priv->editable_area) && (priv->format !=
+               HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY))
+      {
+        gtk_widget_grab_focus(priv->area);
+        if (!priv->edited_area)
+          gtk_editable_select_region(GTK_EDITABLE(priv->area), 0, -1);
+      }
+      else if ((priv->editable_number) && (priv->format ==
+               HILDON_TELEPHONE_EDITOR_FORMAT_COERCE))
+      {
+        gtk_widget_grab_focus(priv->number);
+        if (!priv->edited_number)
+          gtk_editable_select_region(GTK_EDITABLE(priv->number), 0, -1);
+      }
+      else
+        gtk_widget_grab_focus(priv->country);
+    }
+  }
+  return TRUE;
+}
+
+static void 
+hildon_telephone_editor_forall(GtkContainer * container,
+                                           gboolean include_internals,
+                                           GtkCallback callback,
+                                           gpointer callback_data)
+{
+    HildonTelephoneEditor *editor;
+    HildonTelephoneEditorPriv *priv;
+
+    editor = HILDON_TELEPHONE_EDITOR(container);
+    priv = HILDON_TELEPHONE_EDITOR_GET_PRIVATE(editor);
+
+    g_return_if_fail(container);
+    g_return_if_fail(callback);
+
+    if (!include_internals)
+        return;
+
+    switch (priv->format) {
+    case HILDON_TELEPHONE_EDITOR_FORMAT_COERCE:
+        (*callback) (priv->number, callback_data);
+    case HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA:
+        (*callback) (priv->area, callback_data);
+    case HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY:
+        (*callback) (priv->country, callback_data);
+        break;
+    case HILDON_TELEPHONE_EDITOR_FORMAT_FREE:
+        (*callback) (priv->number, callback_data);
+        break;
+    default:
+        g_return_if_reached();
+    }
+
+    if (priv->show_plus)
+        (*callback) (priv->plus_event, callback_data);
+
+    if (priv->show_border)
+        (*callback) (priv->frame, callback_data);
+
+}
+
+static void 
+hildon_telephone_editor_destroy(GtkObject * self)
+{
+    HildonTelephoneEditorPriv *priv;
+
+    priv = HILDON_TELEPHONE_EDITOR_GET_PRIVATE(self);
+
+    switch (priv->format) {
+    case HILDON_TELEPHONE_EDITOR_FORMAT_COERCE:
+        if (priv->number) {
+            gtk_widget_unparent(priv->number);
+            priv->number = NULL;
+        }
+    case HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA:
+        if (priv->area) {
+            gtk_widget_unparent(priv->area);
+            priv->area = NULL;
+        }
+    case HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY:
+        if (priv->country) {
+            gtk_widget_unparent(priv->country);
+            priv->country = NULL;
+        }
+        break;
+    case HILDON_TELEPHONE_EDITOR_FORMAT_FREE:
+        if (priv->number) {
+            gtk_widget_unparent(priv->number);
+            priv->number = NULL;
+        }
+        break;
+    default:
+        g_return_if_reached();
+    }
+
+    if (priv->plus_event) {
+        gtk_widget_unparent(priv->plus_event);
+        priv->plus_event = NULL;
+    }
+    if (priv->frame) {
+        gtk_widget_unparent(priv->frame);
+        priv->frame = NULL;
+    }
+    if (GTK_OBJECT_CLASS(parent_class)->destroy)
+        GTK_OBJECT_CLASS(parent_class)->destroy(self);
+}
+
+static void 
+hildon_telephone_editor_size_request(GtkWidget *widget,
+                                     GtkRequisition *requisition)
+{
+    HildonTelephoneEditor *editor;
+    HildonTelephoneEditorPriv *priv;
+    GtkRequisition req;
+
+    g_return_if_fail(requisition);
+
+    editor = HILDON_TELEPHONE_EDITOR(widget);
+    priv = HILDON_TELEPHONE_EDITOR_GET_PRIVATE(editor);
+
+    if (priv->show_border)
+        gtk_widget_size_request(priv->frame, requisition);
+
+    requisition->width = 0;
+    requisition->height = 0;
+
+    switch (priv->format)
+    {
+      case HILDON_TELEPHONE_EDITOR_FORMAT_COERCE:
+        gtk_widget_size_request(priv->number, &req);
+        requisition->width += req.width;
+        if (requisition->height < req.height)
+            requisition->height = req.height;
+
+      case HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA:
+        gtk_widget_size_request(priv->area, &req);
+        requisition->width += req.width;
+        if (requisition->height < req.height)
+            requisition->height = req.height;
+
+      case HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY:
+        gtk_widget_size_request(priv->country, &req);
+        requisition->width += req.width;
+        if (requisition->height < req.height)
+            requisition->height = req.height;
+
+        break;
+      case HILDON_TELEPHONE_EDITOR_FORMAT_FREE:
+        gtk_widget_size_request(priv->number, &req);
+        requisition->width += req.width;
+        if (requisition->height < req.height)
+            requisition->height = req.height;
+
+        break;
+      default:
+        g_return_if_reached();
+    }
+
+    if (priv->show_plus)
+    {
+        gtk_widget_size_request(priv->plus_event, &req);
+        requisition->width += req.width;
+        if (requisition->height < req.height)
+            requisition->height = req.height;
+    }
+
+    requisition->width += GTK_CONTAINER(priv->frame)->border_width * 2;
+    requisition->height += GTK_CONTAINER(priv->frame)->border_width * 2;
+}
+
+static void 
+hildon_telephone_editor_size_allocate(GtkWidget *widget,
+                                      GtkAllocation *allocation)
+{
+    HildonTelephoneEditor *editor;
+    HildonTelephoneEditorPriv *priv;
+    gint header_x = 6, frame_w = 12;
+    GtkAllocation alloc, country_alloc, area_alloc, number_alloc;
+    GtkRequisition requisition, country_requisition, area_requisition,
+        number_requisition;
+
+    g_return_if_fail(widget);
+    g_return_if_fail(allocation);
+
+    if (allocation->height < 0 )
+      allocation->height = 0;
+    
+    widget->allocation = *allocation;
+    
+    header_x += allocation->x;
+    editor = HILDON_TELEPHONE_EDITOR(widget);
+    priv = HILDON_TELEPHONE_EDITOR_GET_PRIVATE(editor);
+
+
+    if (priv->show_plus &&
+        priv->format != HILDON_TELEPHONE_EDITOR_FORMAT_FREE) {
+        gtk_widget_get_child_requisition(priv->plus_event, &requisition);
+
+        alloc.x = header_x;
+        alloc.y = allocation->y + 1;
+        alloc.width = requisition.width;
+        alloc.height = requisition.height;
+
+        header_x += alloc.width;
+        gtk_widget_size_allocate(priv->plus_event, &alloc);
+        frame_w += alloc.width;
+    }
+    
+    gtk_widget_get_child_requisition(priv->number, &number_requisition);
+
+    number_alloc.width = number_requisition.width;
+
+    number_alloc.height = allocation->height - 4 -
+                          GTK_CONTAINER(priv->frame)->border_width * 2;
+
+    /* get sizes */
+    switch (priv->format) {
+    case HILDON_TELEPHONE_EDITOR_FORMAT_COERCE:
+    case HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA:
+        gtk_widget_get_child_requisition(priv->area, &area_requisition);
+
+        area_alloc.width = area_requisition.width;
+        area_alloc.height = number_alloc.height;
+    case HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY:
+        gtk_widget_get_child_requisition(priv->country, &country_requisition);
+
+        country_alloc.width = country_requisition.width;
+        country_alloc.height = number_alloc.height;
+        break;
+    case HILDON_TELEPHONE_EDITOR_FORMAT_FREE:
+        break;
+    default:
+        g_return_if_reached();
+    }
+
+
+    /* allocate in coerce formats */
+    switch (priv->format) {
+    case HILDON_TELEPHONE_EDITOR_FORMAT_COERCE:
+        number_alloc.x = header_x + country_alloc.width + area_alloc.width;
+        number_alloc.y = allocation->y + 1;
+
+        gtk_widget_size_allocate(priv->number, &number_alloc);
+        frame_w += number_alloc.width;
+    case HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA:
+        area_alloc.x = header_x + country_alloc.width;
+        area_alloc.y = allocation->y + 1;
+
+        gtk_widget_size_allocate(priv->area, &area_alloc);
+        frame_w += area_alloc.width;
+    case HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY:
+        country_alloc.x = header_x;
+        country_alloc.y = allocation->y + 1;
+
+        gtk_widget_size_allocate(priv->country, &country_alloc);
+        frame_w += country_alloc.width;
+        break;
+    case HILDON_TELEPHONE_EDITOR_FORMAT_FREE:
+        number_alloc.x = header_x;
+        number_alloc.y = allocation->y + 1;
+
+        gtk_widget_size_allocate(priv->number, &number_alloc);
+        frame_w += number_alloc.width;
+        break;
+    default:
+        g_return_if_reached();
+    }
+
+    if (priv->show_border)
+    {
+        alloc.x = allocation->x;
+        alloc.y = allocation->y;
+
+        alloc.width = frame_w - 4;
+
+        alloc.height = allocation->height;
+        gtk_widget_size_allocate( GTK_WIDGET(priv->frame), &alloc );
+    }
+}
+
+static gboolean
+hildon_telephone_editor_button_release(GtkWidget * widget,
+                                     GdkEventButton * event, gpointer data)
+{
+  gtk_editable_select_region(GTK_EDITABLE(widget), 0, -1);
+  return FALSE;
+}
+
+static void 
+hildon_telephone_editor_focus_dest_entry(GtkWidget * widget,
+                                                     gboolean edited,
+                                                     gboolean move_left)
+{
+    /* full coerse mode, wrap to field */
+    gtk_widget_grab_focus(widget);
+
+    if (move_left)
+        gtk_editable_set_position(GTK_EDITABLE(widget), -1);
+    else
+        gtk_editable_set_position(GTK_EDITABLE(widget), 0);
+    /* new field not yet edited, select all */
+    if (!edited)
+        gtk_editable_select_region(GTK_EDITABLE(widget), 0, -1);
+}
+
+static gboolean
+hildon_telephone_editor_entry_keypress(GtkWidget * widget,
+                                       GdkEventKey * event, gpointer data)
+{
+    HildonTelephoneEditor *editor;
+    HildonTelephoneEditorPriv *priv;
+    gint pos, width;
+    gint cpos, start, end;
+
+    g_return_val_if_fail(widget, FALSE);
+    g_return_val_if_fail(event, FALSE);
+    g_return_val_if_fail(data, FALSE);
+
+    editor = HILDON_TELEPHONE_EDITOR(data);
+    priv = HILDON_TELEPHONE_EDITOR_GET_PRIVATE(editor);
+    cpos = gtk_editable_get_position(GTK_EDITABLE(widget));
+    gtk_editable_get_selection_bounds(GTK_EDITABLE(widget), &start, &end);
+
+    if( event->keyval == GDK_Up || event->keyval == GDK_KP_Up ||
+        event->keyval == GDK_Down || event->keyval == GDK_KP_Down )
+      return FALSE;
+
+    /* Wrap around should not happen; that's why following code */
+    switch (priv->format) {
+    case HILDON_TELEPHONE_EDITOR_FORMAT_COERCE:
+        if (((event->keyval == GDK_Left || event->keyval == GDK_KP_Left) &&
+             (widget == priv->country) && ((cpos == 0) ||
+             ((start == 0 && end == strlen(GTK_ENTRY(priv->country)->text)))))
+            ||
+            ((event->keyval == GDK_Right || event->keyval == GDK_KP_Right)
+             && (widget == priv->number)
+             && (cpos >= strlen(GTK_ENTRY(priv->number)->text))))
+            return TRUE;
+        break;
+    case HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA:
+        if (((event->keyval == GDK_Left || event->keyval == GDK_KP_Left) &&
+             (widget == priv->country) && ((cpos == 0) ||
+                                           ((start == 0
+                                             && end ==
+                                             strlen(GTK_ENTRY
+                                                    (priv->country)->
+                                                    text)))))
+            ||
+            ((event->keyval == GDK_Right || event->keyval == GDK_KP_Right)
+             && (widget == priv->area)
+             && (cpos >= strlen(GTK_ENTRY(priv->area)->text))))
+            return TRUE;
+        break;
+    case HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY:
+        break;
+    case HILDON_TELEPHONE_EDITOR_FORMAT_FREE:
+        break;
+    }
+
+    /* valid key pressed */
+    if (event->keyval == GDK_Left || event->keyval == GDK_KP_Left ||
+        event->keyval == GDK_Right || event->keyval == GDK_KP_Right ||
+        event->keyval == GDK_BackSpace || event->keyval == GDK_Delete ||
+        event->keyval == GDK_KP_Delete ||
+        (event->keyval >= GDK_0 && event->keyval <= GDK_9) ||
+        (priv->format == HILDON_TELEPHONE_EDITOR_FORMAT_FREE &&
+         (event->keyval == GDK_slash || event->keyval == GDK_space ||
+          event->keyval == GDK_parenleft || event->keyval == GDK_parenright
+          || event->keyval == GDK_period || event->keyval == GDK_hyphen
+          || event->keyval == GDK_plus || event->keyval == GDK_asterisk
+          || event->keyval == GDK_KP_Multiply
+          || event->keyval == GDK_KP_Add || event->keyval == GDK_numbersign
+          || event->keyval == GDK_question || event->keyval == GDK_KP_Subtract
+          || event->keyval == GDK_minus)))
+    {
+        if ((event->keyval >= GDK_0 && event->keyval <= GDK_9) ||
+            (priv->format == HILDON_TELEPHONE_EDITOR_FORMAT_FREE &&
+             (event->keyval == GDK_slash || event->keyval == GDK_space ||
+              event->keyval == GDK_parenleft ||
+              event->keyval == GDK_parenright ||
+              event->keyval == GDK_period || event->keyval == GDK_hyphen ||
+              event->keyval == GDK_plus || event->keyval == GDK_asterisk ||
+              event->keyval == GDK_KP_Add ||
+              event->keyval == GDK_KP_Multiply ||
+              event->keyval == GDK_numbersign ||
+              event->keyval == GDK_question ||
+              event->keyval == GDK_KP_Subtract || 
+              event->keyval == GDK_minus)))
+        {
+            if (widget == priv->country)
+                priv->edited_country = TRUE;
+            if (widget == priv->area)
+                priv->edited_area = TRUE;
+            if (widget == priv->number)
+                priv->edited_number = TRUE;
+        }
+
+        pos = gtk_editable_get_position(GTK_EDITABLE(widget));
+
+        /* going left */
+        if (event->keyval == GDK_Left || event->keyval == GDK_KP_Left) {
+            /* not yet on the left edge and the widget is edited */
+            if (pos != 0 &&
+                ((widget == priv->country && priv->edited_country == TRUE)
+                 || (widget == priv->area && priv->edited_area == TRUE)
+                 || (widget == priv->number
+                     && priv->edited_number == TRUE)))
+                return FALSE;
+
+            /* left edge of number field */
+            if (widget == priv->number) {
+                /* Stop signal handler, if only number field exists */
+                if (priv->format == HILDON_TELEPHONE_EDITOR_FORMAT_FREE)
+                    return TRUE;
+                else {
+                    /* Grab the focus to the area field, if it is editable 
+                     */
+                    if (priv->editable_area) {
+                        hildon_telephone_editor_focus_dest_entry
+                            (priv->area, priv->edited_area, TRUE);
+                    }
+                    /* Grab the focus to the country field, if it is
+                       editable */
+                    else if (priv->editable_country) {
+                        hildon_telephone_editor_focus_dest_entry
+                            (priv->country, priv->edited_country, TRUE);
+                    } else
+                        return TRUE;
+                }
+            }
+
+            /* left edge of area field */
+            if (widget == priv->area) { /* grab the focus to the country
+                                           field, if it is editable */
+                if (priv->editable_country) {
+                    hildon_telephone_editor_focus_dest_entry
+                        (priv->country, priv->edited_country, TRUE);
+                } else
+                    return TRUE;
+            }
+
+            /* left edge of country field, let's wrap */
+            if (widget == priv->country) {
+                /* Stop the signal handler, if only country field exists */
+                if (priv->format ==
+                    HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY)
+                    return TRUE;
+                /* wrap to area, if in AREA mode */
+                else if (priv->format ==
+                         HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA) {
+                    hildon_telephone_editor_focus_dest_entry
+                        (priv->area, priv->edited_area, TRUE);
+                }
+
+                else {
+                    hildon_telephone_editor_focus_dest_entry
+                        (priv->number, priv->edited_number, TRUE);
+                }
+            }
+        }
+        /* going right */
+        else if (event->keyval == GDK_Right || event->keyval == GDK_KP_Right) {
+            width = g_utf8_strlen(gtk_entry_get_text(GTK_ENTRY(widget)), -1);
+
+            /* not yet on the rigth edge and the widget is edited */
+            if (pos != width &&
+                ((widget == priv->country && priv->edited_country == TRUE)
+                 || (widget == priv->area && priv->edited_area == TRUE)
+                 || (widget == priv->number
+                     && priv->edited_number == TRUE)))
+                return FALSE;
+
+            /* rigth edge of number field */
+            if (widget == priv->number) {
+                /* Stop signal handler, if only number field exists */
+                if (priv->format == HILDON_TELEPHONE_EDITOR_FORMAT_FREE)
+                    return TRUE;
+                else {
+                    hildon_telephone_editor_focus_dest_entry
+                        (priv->country, priv->edited_country, FALSE);
+                }
+            }
+
+            /* rigth edge of area field */
+            if (widget == priv->area) {
+                /* area mode, wrap to country field */
+                if (priv->format ==
+                    HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA) {
+                    hildon_telephone_editor_focus_dest_entry
+                        (priv->country, priv->edited_country, FALSE);
+                }
+                /* grab the focus to the number field, if it is editable */
+                else if (priv->editable_number) {
+                    hildon_telephone_editor_focus_dest_entry
+                        (priv->number, priv->edited_number, FALSE);
+                } else
+                    return TRUE;
+            }
+
+            /* rigth edge of country field */
+            if (widget == priv->country) {
+                /* wrap around, if only country field exists */
+                if (priv->format ==
+                    HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY)
+                    return TRUE;
+
+                /* area mode, move to area field */
+                else if (priv->format ==
+                         HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA ||
+                         priv->format ==
+                         HILDON_TELEPHONE_EDITOR_FORMAT_COERCE) {
+                    /* grab the focus to the area field, if it is editable 
+                     */
+                    if (priv->editable_area) {
+                        hildon_telephone_editor_focus_dest_entry
+                            (priv->area, priv->edited_area, FALSE);
+                    }
+                    /* grab the focus to the area field, if it is editable 
+                     */
+                    else if ((priv->format ==
+                              HILDON_TELEPHONE_EDITOR_FORMAT_COERCE) &&
+                             priv->editable_number) {
+                        hildon_telephone_editor_focus_dest_entry
+                            (priv->number, priv->edited_number, FALSE);
+                    } else
+                        return TRUE;
+                }
+
+                else {
+                    hildon_telephone_editor_focus_dest_entry
+                        (priv->number, priv->edited_number, FALSE);
+                }
+            }
+        }
+        return FALSE;
+    }
+    return TRUE;
+}
+
+/**
+ * hildon_telephone_editor_set_editable:
+ * @hte: #HildonTelephoneEditor.
+ * @country: Set the editable status of the country field in coarce format.
+ * @area: Set the editable status of the area field in coarce format.
+ * @number: Set the editable status of the number field in coarce format.
+ * 
+ * Specify wheter the fields in coerse format are editable or
+ * not. This function is ignored if the editor is in free mode. The
+ * number or area and number parameters are ignored if the editor is
+ * in HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA or
+ * HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY formats,
+ * respectively.
+ * 
+ * 
+ **/
+void 
+hildon_telephone_editor_set_editable(HildonTelephoneEditor * editor,
+                                          gboolean country,
+                                          gboolean area, gboolean number)
+{
+    HildonTelephoneEditorPriv *priv;
+
+    g_return_if_fail(editor);
+
+    priv = HILDON_TELEPHONE_EDITOR_GET_PRIVATE(editor);
+
+    priv->editable_country = country;
+    priv->editable_area = area;
+    priv->editable_number = number;
+
+    if (priv->country)
+    {
+        gtk_editable_set_editable(GTK_EDITABLE(priv->country), country);
+        gtk_widget_set_sensitive(GTK_WIDGET(priv->plus), country);
+    }
+
+    if (priv->area)
+        gtk_editable_set_editable(GTK_EDITABLE(priv->area), area);
+
+    if (priv->number)
+        gtk_editable_set_editable(GTK_EDITABLE(priv->number), number);
+}
+
+/**
+ * hildon_telephone_editor_set_widths:
+ * @hte: #HildonTelephoneEditor.
+ * @country: Width (characters) of the country field in coarce mode.
+ * @area: Width (characters) of the area field in coarce mode.
+ * @number: Width (characters) of the number field in coarce mode.
+ *
+ * Set widths of the fields in coerse format. Country and area parameters
+ * are ignored, if the editor is in free mode. The number or area and number
+ * parameters are ignored if the editor is in
+ * HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA or
+ * HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY mode, respectively.
+ * 
+ **/
+void 
+hildon_telephone_editor_set_widths(HildonTelephoneEditor * editor,
+                                        guint country,
+                                        guint area, guint number)
+{
+    HildonTelephoneEditorPriv *priv;
+
+    g_return_if_fail(editor);
+
+    priv = HILDON_TELEPHONE_EDITOR_GET_PRIVATE(editor);
+
+    if (priv->country) {
+        /*gtk_entry_set_max_length(GTK_ENTRY(priv->country), country);*/
+        gtk_entry_set_width_chars(GTK_ENTRY(priv->country), country);
+    }
+
+    if (priv->area) {
+        /*gtk_entry_set_max_length(GTK_ENTRY(priv->area), area);*/
+        gtk_entry_set_width_chars(GTK_ENTRY(priv->area), area);
+    }
+
+    if (priv->number) {
+        /*gtk_entry_set_max_length(GTK_ENTRY(priv->number), number);*/
+        gtk_entry_set_width_chars(GTK_ENTRY(priv->number), number);
+    }
+
+}
+
+/**
+ * hildon_telephone_editor_set_show_plus:
+ * @hte: #HildonTelephoneEditor.
+ * @show: Show the plus sign.
+ *
+ * Show or hide the plus sign in front of coerce format's country field.
+ *
+ * 
+ **/
+void 
+hildon_telephone_editor_set_show_plus(HildonTelephoneEditor * editor,
+                                           gboolean show)
+{
+    HildonTelephoneEditorPriv *priv;
+
+    g_return_if_fail(editor);
+
+    priv = HILDON_TELEPHONE_EDITOR_GET_PRIVATE(editor);
+
+    /* do nothing in FREE format */
+    if (priv->format == HILDON_TELEPHONE_EDITOR_FORMAT_FREE)
+        return;
+
+    if (show && !priv->show_plus) {
+        priv->show_plus = TRUE;
+        gtk_widget_set_parent(priv->plus_event, GTK_WIDGET(editor));
+        gtk_widget_show(priv->plus_event);
+    } else if (!show && priv->show_plus) {
+        gtk_widget_hide(priv->plus_event);
+        gtk_widget_unparent(priv->plus_event);
+        priv->show_plus = FALSE;
+    }
+}
+
+/**
+ * hildon_telephone_editor_get_show_plus:
+ * @hte: #HildonTelephoneEditor.
+ *
+ * Get the visibility status of the plus sign in
+ * front of coerce format's country field.
+ *
+ * Return value: gboolean.
+ * 
+ **/
+gboolean 
+hildon_telephone_editor_get_show_plus(HildonTelephoneEditor *
+                                               editor)
+{
+    HildonTelephoneEditorPriv *priv;
+    g_return_val_if_fail(editor, FALSE);
+    priv = HILDON_TELEPHONE_EDITOR_GET_PRIVATE(editor);
+
+    /* no plus in FREE format */
+    if (priv->format == HILDON_TELEPHONE_EDITOR_FORMAT_FREE)
+        return FALSE;
+    return priv->show_plus;
+}
+
+/**
+ * hildon_telephone_editor_set_show_border:
+ * @hte: #HildonTelephoneEditor.
+ * @show: Show the border.
+ *
+ * Show or hide the border around the widget
+ *
+ * 
+ **/
+void 
+hildon_telephone_editor_set_show_border(HildonTelephoneEditor *
+                                             editor, gboolean show)
+{
+    HildonTelephoneEditorPriv *priv;
+    g_return_if_fail(editor);
+    priv = HILDON_TELEPHONE_EDITOR_GET_PRIVATE(editor);
+
+    if (show && !priv->show_border) {
+        priv->show_border = TRUE;
+        gtk_widget_set_parent(priv->frame, GTK_WIDGET(editor));
+        gtk_widget_show(priv->frame);
+    } else if (!show && priv->show_border) {
+        gtk_widget_hide(priv->frame);
+        gtk_widget_unparent(priv->frame);
+        priv->show_border = FALSE;
+    }
+}
+
+/**
+ * hildon_telephone_editor_get_show_border:
+ * @hte: #HildonTelephoneEditor.
+ *
+ * Get the visibility status of the border around the widget.
+ *
+ * Return value: gboolean.
+ * 
+ **/
+gboolean
+hildon_telephone_editor_get_show_border(HildonTelephoneEditor * editor)
+{
+    HildonTelephoneEditorPriv *priv;
+    g_return_val_if_fail(editor, FALSE);
+    priv = HILDON_TELEPHONE_EDITOR_GET_PRIVATE(editor);
+
+    return priv->show_border;
+}
+
+/**
+ * hildon_telephone_editor_get_country:
+ * @hte: #HildonTelephoneEditor.
+ *
+ * Get text in the country field in coarse format. This function must
+ * not be called if in free mode.
+ *
+ * Return value: pointer to the text in the country field. It must not
+ * be changed or freed.
+ **/
+const gchar *
+hildon_telephone_editor_get_country(HildonTelephoneEditor *
+                                                 editor)
+{
+    HildonTelephoneEditorPriv *priv;
+    g_return_val_if_fail(editor, NULL);
+    priv = HILDON_TELEPHONE_EDITOR_GET_PRIVATE(editor);
+
+    /* return NULL if in FREE format */
+    if (priv->format == HILDON_TELEPHONE_EDITOR_FORMAT_FREE)
+        return NULL;
+
+    return gtk_entry_get_text(GTK_ENTRY(priv->country));
+}
+
+/**
+ * hildon_telephone_editor_set_country:
+ * @hte: #HildonTelephoneEditor.
+ * @country: text to be set in country field.
+ *
+ * Set text in the country field in coarse format. This function must
+ * not be called if in free mode.
+ **/
+void 
+hildon_telephone_editor_set_country(HildonTelephoneEditor * editor,
+                                         const gchar * country)
+{
+    HildonTelephoneEditorPriv *priv;
+    const gchar *p;
+    gunichar u;
+
+    g_return_if_fail(editor);
+    g_return_if_fail(country);
+
+    priv = HILDON_TELEPHONE_EDITOR_GET_PRIVATE(editor);
+
+    /* do nothing in FREE format */
+    if (priv->format == HILDON_TELEPHONE_EDITOR_FORMAT_FREE)
+        return;
+
+    if (!priv->country)
+        return;
+
+    p = country;
+    g_return_if_fail(g_utf8_validate(p, -1, NULL));
+
+    /* allow only digits */
+    do {
+        u = g_utf8_get_char(p);
+        if (!g_unichar_isdigit(*p))
+            return;
+
+        p = g_utf8_next_char(p);
+    } while (*p);
+
+    gtk_entry_set_text(GTK_ENTRY(priv->country), country);
+}
+
+/**
+ * hildon_telephone_editor_get_area:
+ * @hte: #HildonTelephoneEditor.
+ *
+ * Get text in the area field in coarse format. This function must not
+ * be called if in free mode or in
+ * HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY mode.
+ *
+ * Return value: pointer to the text in the area field. It must not be
+ * changed or freed.
+ **/
+const gchar *
+hildon_telephone_editor_get_area(HildonTelephoneEditor *
+                                              editor)
+{
+    HildonTelephoneEditorPriv *priv;
+    g_return_val_if_fail(editor, NULL);
+    priv = HILDON_TELEPHONE_EDITOR_GET_PRIVATE(editor);
+
+    /* return NULL if in FREE format or if in COERCE_COUNTRY format */
+    if (priv->format == HILDON_TELEPHONE_EDITOR_FORMAT_FREE)
+        return NULL;
+    if (priv->format == HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY)
+        return NULL;
+
+    return gtk_entry_get_text(GTK_ENTRY(priv->area));
+}
+
+/**
+ * hildon_telephone_editor_set_area:
+ * @hte: #HildonTelephoneEditor.
+ * @area: text to be set in area field.
+ *
+ * Set text in the area field in coarse format. This function must not
+ * be called if in free mode or in
+ * HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY mode.
+ **/
+void
+hildon_telephone_editor_set_area(HildonTelephoneEditor * editor,
+                                      const gchar * area)
+{
+    HildonTelephoneEditorPriv *priv;
+    const gchar *p;
+    gunichar u;
+
+    g_return_if_fail(editor);
+    g_return_if_fail(area);
+
+    priv = HILDON_TELEPHONE_EDITOR_GET_PRIVATE(editor);
+
+    /* do nothing in FREE format */
+    if (priv->format == HILDON_TELEPHONE_EDITOR_FORMAT_FREE)
+        return;
+
+    if (!priv->area)
+        return;
+
+    p = area;
+    g_return_if_fail(g_utf8_validate(p, -1, NULL));
+
+    /* allow only digits */
+    do {
+        u = g_utf8_get_char(p);
+        if (!g_unichar_isdigit(u))
+            return;
+
+        p = g_utf8_next_char(p);
+    } while (*p);
+
+    gtk_entry_set_text(GTK_ENTRY(priv->area), area);
+}
+
+/**
+ * hildon_telephone_editor_get_number:
+ * @hte: #HildonTelephoneEditor.
+ *
+ * Get text in the number field in all formats. If in free mode this
+ * functions returns the whole phone number and if in coarce mode only
+ * the number field's is returned. This function must not be called if
+ * the editor is in HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA or
+ * HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY modes.
+ *
+ * Return value: pointer to text in the number field. It must not be
+ * changed or freed.
+ **/
+const gchar *
+hildon_telephone_editor_get_number(HildonTelephoneEditor *
+                                                editor)
+{
+    HildonTelephoneEditorPriv *priv;
+    g_return_val_if_fail(editor, NULL);
+    priv = HILDON_TELEPHONE_EDITOR_GET_PRIVATE(editor);
+
+    return gtk_entry_get_text(GTK_ENTRY(priv->number));
+}
+
+/**
+ * hildon_telephone_editor_set_number:
+ * @hte: #HildonTelephoneEditor.
+ * @number: text to be set to number field.
+ *
+ * Set text in the number field in all formats. If in free mode this
+ * functions sets the whole phone number and if in coerce mode only
+ * the number field's is set. This function must not be called if
+ * the editor is in HILDON_TELEPHONE_EDITOR_FORMAT_COERSE_AREA or
+ * HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY modes.
+ **/
+void 
+hildon_telephone_editor_set_number(HildonTelephoneEditor * editor,
+                                        const gchar * number)
+{
+    HildonTelephoneEditorPriv *priv;
+    const gchar *p;
+    gunichar u;
+
+    g_return_if_fail(editor);
+    g_return_if_fail(number);
+
+    priv = HILDON_TELEPHONE_EDITOR_GET_PRIVATE(editor);
+
+    if (!priv->number)
+        return;
+
+    p = number;
+    g_return_if_fail(g_utf8_validate(p, -1, NULL));
+
+    /* allow only digits in coerce format or some other in free format */
+    do {
+        u = g_utf8_get_char(p);
+        if (g_unichar_isdigit(u) ||
+            (priv->format == HILDON_TELEPHONE_EDITOR_FORMAT_FREE &&
+             (u == '+' ||
+              u == 'p' ||
+              u == 'w' ||
+              u == '(' ||
+              u == ')' ||
+              u == '/' ||
+              u == ' ' ||
+              u == '.' || u == '-' || u == '*' || u == '#' || u == '?')))
+            p = g_utf8_next_char(p);
+        else
+            return;
+
+    } while (*p);
+
+    gtk_entry_set_text(GTK_ENTRY(priv->number), number);
+}
diff --git a/hildon-widgets/hildon-telephone-editor.h b/hildon-widgets/hildon-telephone-editor.h
new file mode 100644 (file)
index 0000000..2b90e67
--- /dev/null
@@ -0,0 +1,133 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __HILDON_TELEPHONE_EDITOR_H__
+#define __HILDON_TELEPHONE_EDITOR_H__
+
+#include <gtk/gtkcontainer.h>
+
+G_BEGIN_DECLS
+/**
+ * HILDON_TELEPHONE_EDITOR_TYPE:
+ *
+ * Macro for getting type of telephone editor.
+ */
+#define HILDON_TELEPHONE_EDITOR_TYPE \
+  ( hildon_telephone_editor_get_type() )
+#define HILDON_TELEPHONE_EDITOR(obj) \
+  (GTK_CHECK_CAST (obj, HILDON_TELEPHONE_EDITOR_TYPE, \
+  HildonTelephoneEditor))
+#define HILDON_TELEPHONE_EDITOR_CLASS(klass) \
+  (GTK_CHECK_CLASS_CAST ((klass), HILDON_TELEPHONE_EDITOR_TYPE, \
+  HildonTelephoneEditorClass))
+#define HILDON_IS_TELEPHONE_EDITOR(obj) \
+  (GTK_CHECK_TYPE (obj, HILDON_TELEPHONE_EDITOR_TYPE))
+#define HILDON_IS_TELEPHONE_EDITOR_CLASS(klass) \
+  (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TELEPHONE_EDITOR_TYPE))
+/**
+ * HildonTelephoneEditorFormat:
+ * @HILDON_TELEPHONE_EDITOR_FORMAT_FREE: Free format.
+ * @HILDON_TELEPHONE_EDITOR_FORMAT_COERCE: Coerce format, three fields.
+ * @HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY: Coerce format, only
+ * country field.
+ * @HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA: Coerce format, country
+ * and area fields.
+ * 
+ * Define all possible format modes for the HildonTelephoneEditor.
+ *
+ */
+    typedef enum {
+    HILDON_TELEPHONE_EDITOR_FORMAT_FREE = 0,
+    HILDON_TELEPHONE_EDITOR_FORMAT_COERCE,
+    HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY,
+    HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA
+} HildonTelephoneEditorFormat;
+
+
+/**
+ * HildonTelephoneEditor:
+ *
+ * Internal struct for telephone editor.
+ */
+typedef struct _HildonTelephoneEditor HildonTelephoneEditor;
+typedef struct _HildonTelephoneEditorClass HildonTelephoneEditorClass;
+
+/*< private >*/
+struct _HildonTelephoneEditor {
+    GtkContainer parent;
+};
+
+struct _HildonTelephoneEditorClass {
+    GtkContainerClass parent_class;
+};
+
+GType hildon_telephone_editor_get_type(void);
+
+GtkWidget *hildon_telephone_editor_new(HildonTelephoneEditorFormat format);
+GtkWidget
+    *hildon_telephone_editor_new_with_strings(HildonTelephoneEditorFormat
+                                              format,
+                                              const gchar * country,
+                                              const gchar * area,
+                                              const gchar * number);
+void hildon_telephone_editor_set_editable(HildonTelephoneEditor * hte,
+                                          gboolean country, gboolean area,
+                                          gboolean number);
+
+void hildon_telephone_editor_set_show_plus(HildonTelephoneEditor * hte,
+                                           gboolean show);
+
+gboolean hildon_telephone_editor_get_show_plus(HildonTelephoneEditor *
+                                               hte);
+
+void hildon_telephone_editor_set_show_border(HildonTelephoneEditor * hte,
+                                             gboolean show);
+
+gboolean hildon_telephone_editor_get_show_border(HildonTelephoneEditor *
+                                                 hte);
+
+
+void hildon_telephone_editor_set_widths(HildonTelephoneEditor * hte,
+                                        guint country,
+                                        guint area, guint number);
+
+const gchar *hildon_telephone_editor_get_country(HildonTelephoneEditor *
+                                                 hte);
+
+void hildon_telephone_editor_set_country(HildonTelephoneEditor * hte,
+                                         const gchar * country);
+
+const gchar *hildon_telephone_editor_get_area(HildonTelephoneEditor * hte);
+
+void hildon_telephone_editor_set_area(HildonTelephoneEditor * hte,
+                                      const gchar * area);
+
+const gchar *hildon_telephone_editor_get_number(HildonTelephoneEditor *
+                                                hte);
+
+void hildon_telephone_editor_set_number(HildonTelephoneEditor * hte,
+                                        const gchar * number);
+
+G_END_DECLS
+#endif
diff --git a/hildon-widgets/hildon-time-editor.c b/hildon-widgets/hildon-time-editor.c
new file mode 100644 (file)
index 0000000..38e1984
--- /dev/null
@@ -0,0 +1,1571 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/* HILDON DOC
+ * @shortdesc: TimeEditor is a widget for setting, getting and showing a
+ * time.
+ * @longdesc: The Time Editor widget is used to enter the system time
+ * (hours and minutes) in the Date/Time system plugin. It is a composite
+ * widget consisting of two GtkEntry widgets that are placed next to each
+ * other. The leftmost GtkEntry is used to enter the hours, and it accepts
+ * the values 0--23, while the rightmost GtkEntry accepts values 0--59
+ * and is used to set the minutes. Between the two GtkEntries there
+ * is a label displaying a colon.
+ * </para><para>
+ * From the usability point of view, the GtkSpinbutton widget would
+ * have been a better choice than the GtkEntry widgets, but it uses
+ * floating point operations and is thus not acceptable in this
+ * project.
+ *
+ * @seealso: #HildonDateEditor
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <pango/pango.h>
+#include <gtk/gtkbox.h>
+#include <gtk/gtkentry.h>
+#include <gtk/gtk.h>
+#include <gdk/gdkkeysyms.h>
+#include <gtk/gtkwidget.h>
+
+#include <string.h>
+#include <time.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <langinfo.h>
+#include <libintl.h>
+
+#include <hildon-widgets/hildon-defines.h>
+#include <hildon-widgets/hildon-time-editor.h>
+#include <hildon-widgets/hildon-time-picker.h>
+#include <hildon-widgets/gtk-infoprint.h>
+#include "hildon-composite-widget.h"
+
+#define _(String) dgettext(PACKAGE, String)
+
+/* empty space on left and right side of a GtkEntry. Space needed
+is 12, we add 4 extra pixels so that the arabic locale works
+correctly. (With 12 only one digit would be shown in the entries).
+*/
+#define TIME_EDITOR_LBORDER         6
+#define TIME_EDITOR_RBORDER         6
+#define TIME_EDITOR_HEIGHT         30
+#define TIME_EDITOR_CLOCK_BORDER    6
+#define ICON_WIDTH                 26
+#define ICON_HEIGHT                26
+#define ICON_NAME                  "qgn_widg_timedit"
+#define ICON_SIZE                  "timepicker-size"
+#define HILDON_TIME_EDITOR_GET_PRIVATE(obj) \
+    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
+     HILDON_TYPE_TIME_EDITOR, HildonTimeEditorPrivate));
+#define MIN_DURATION 0
+#define MAX_DURATION (3600 * 99) + (60 * 59) + 59
+
+static GtkContainerClass *parent_class;
+
+typedef struct _HildonTimeEditorPrivate HildonTimeEditorPrivate;
+
+static void
+hildon_time_editor_class_init(HildonTimeEditorClass * editor_class);
+
+static void hildon_time_editor_init(HildonTimeEditor * editor);
+
+static void hildon_time_editor_finalize(GObject * obj_self);
+
+static gboolean
+hildon_time_editor_entry_focusout(GtkWidget * widget,
+                                  GdkEventFocus * event, gpointer data);
+static void hildon_time_editor_entry_activate(GtkWidget * widget,
+                                              gpointer data);
+
+static void
+hildon_time_editor_entry_activate(GtkWidget * widget, gpointer data);
+
+static gboolean
+hildon_time_editor_mnemonic_activate(GtkWidget * widget,
+                                     gboolean group_cycling);
+
+static gboolean
+hildon_time_editor_ampm_clicked(GtkWidget * widget, GdkEventButton * event,
+                                gpointer data);
+static gboolean
+hildon_time_editor_icon_clicked(GtkWidget * widget, gpointer data);
+
+static gboolean
+hildon_time_editor_entry_clicked(GtkWidget * widget,
+                                 GdkEventButton * event, gpointer data);
+
+static void
+hildon_time_editor_size_request(GtkWidget * widget,
+                                GtkRequisition * requisition);
+
+static void
+hildon_time_editor_size_allocate(GtkWidget * widget,
+                                 GtkAllocation * allocation);
+static void
+hildon_time_editor_forall(GtkContainer * container,
+                          gboolean include_internals, GtkCallback callback,
+                          gpointer callback_data);
+static void hildon_time_editor_destroy(GtkObject * self);
+
+static gboolean
+hildon_time_editor_entry_keypress(GtkWidget * widget, GdkEventKey * event,
+                                  gpointer data);
+static void hildon_time_editor_add_style(void);
+
+static void
+set_widget_allocation(GtkWidget * widget, GtkAllocation * alloc,
+                      GtkAllocation * allocation);
+static guint
+hildon_time_editor_check_duration_validity(HildonTimeEditor * editor);
+
+static void
+hildon_time_editor_duration_handle_error(HildonTimeEditor * editor,
+                                         guint type);
+
+static gboolean hildon_time_editor_check_locale(HildonTimeEditor * editor);
+
+static
+void hildon_time_editor_tap_and_hold_setup(GtkWidget * widget,
+                                           GtkWidget * menu,
+                                           GtkCallback func,
+                                           GtkWidgetTapAndHoldFlags flags);
+
+enum {
+    DURATION_MIN_EXCEED,
+    DURATION_MAX_EXCEED,
+    DURATION_OK
+};
+
+struct _HildonTimeEditorPrivate {
+    gchar h_time[4];    /* These hold current */
+    gchar m_time[4];    /* time */
+    gchar s_time[4];
+    gchar *am_symbol;
+    gchar *pm_symbol;
+
+    GtkWidget *eventbox;        /* hold entries */
+    GtkWidget *iconbutton;      /* button for icon */
+
+    GtkWidget *h_entry;
+    GtkWidget *m_entry;
+    GtkWidget *s_entry;
+    GtkWidget *label;   /* between h and m */
+    GtkWidget *label2;  /* between m and s */
+    GtkWidget *ampm;    /* label for showing am or pm */
+    GtkWidget *icon;    /* label for showing am or pm */
+    GtkWidget *frame;   /* frame around the entries */
+
+    gboolean duration_mode;     /* In HildonDurationEditor mode */
+    gboolean show_s;    /* show seconds */
+    gboolean ampm_pos_after;    /* is the am/pm shown after others */
+    gboolean clock_24h; /* whether to show a 24h clock */
+    gboolean am;        /* TRUE == showing am, FALSE == pm */
+    gboolean valid_value; /* If entry has an valid value */
+
+    /* Duration editor ranges */
+    guint duration_min;
+    guint duration_max;
+};
+
+GType hildon_time_editor_get_type(void)
+{
+    static GType editor_type = 0;
+
+    if (!editor_type) {
+        static const GTypeInfo editor_info = {
+            sizeof(HildonTimeEditorClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_time_editor_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonTimeEditor),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_time_editor_init,
+        };
+        editor_type = g_type_register_static(GTK_TYPE_CONTAINER,
+                                             "HildonTimeEditor",
+                                             &editor_info, 0);
+    }
+    return editor_type;
+}
+
+static void hildon_time_editor_forall(GtkContainer * container,
+                                      gboolean include_internals,
+                                      GtkCallback callback,
+                                      gpointer callback_data)
+{
+    HildonTimeEditor *editor;
+    HildonTimeEditorPrivate *priv;
+
+    editor = HILDON_TIME_EDITOR(container);
+    priv = HILDON_TIME_EDITOR_GET_PRIVATE(editor);
+
+    g_return_if_fail(container);
+    g_return_if_fail(callback);
+
+    if (!include_internals)
+        return;
+
+
+    /* widget that are always shown */
+    (*callback) (priv->h_entry, callback_data);
+    (*callback) (priv->m_entry, callback_data);
+    (*callback) (priv->label, callback_data);
+    (*callback) (priv->iconbutton, callback_data);
+    (*callback) (priv->frame, callback_data);
+    (*callback) (priv->label2, callback_data);
+    (*callback) (priv->s_entry, callback_data);
+    (*callback) (priv->eventbox, callback_data);
+}
+
+static void hildon_time_editor_destroy(GtkObject * self)
+{
+    HildonTimeEditorPrivate *priv;
+
+    priv = HILDON_TIME_EDITOR_GET_PRIVATE(self);
+
+    if (priv->h_entry) {
+        gtk_widget_unparent(priv->h_entry);
+        priv->h_entry = NULL;
+    }
+    if (priv->m_entry) {
+        gtk_widget_unparent(priv->m_entry);
+        priv->m_entry = NULL;
+    }
+    if (priv->label) {
+        gtk_widget_unparent(priv->label);
+        priv->label = NULL;
+    }
+    if (priv->iconbutton) {
+        gtk_widget_unparent(priv->iconbutton);
+        priv->iconbutton = NULL;
+    }
+    if (priv->frame) {
+        gtk_widget_unparent(priv->frame);
+        priv->frame = NULL;
+    }
+    if (priv->eventbox) {
+        gtk_widget_unparent(priv->eventbox);
+        priv->eventbox = NULL;
+        priv->ampm = NULL;
+    }
+    if (priv->label2) {
+        gtk_widget_unparent(priv->label2);
+        priv->label2 = NULL;
+    }
+    if (priv->s_entry) {
+        gtk_widget_unparent(priv->s_entry);
+        priv->s_entry = NULL;
+    }
+
+    if (GTK_OBJECT_CLASS(parent_class)->destroy)
+        GTK_OBJECT_CLASS(parent_class)->destroy(self);
+
+}
+
+static void
+hildon_time_editor_class_init(HildonTimeEditorClass * editor_class)
+{
+    GObjectClass *object_class = G_OBJECT_CLASS(editor_class);
+    GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(editor_class);
+    GtkContainerClass *container_class = GTK_CONTAINER_CLASS(editor_class);
+
+    parent_class = g_type_class_peek_parent(editor_class);
+
+    g_type_class_add_private(editor_class,
+                             sizeof(HildonTimeEditorPrivate));
+
+    widget_class->mnemonic_activate = hildon_time_editor_mnemonic_activate;
+    widget_class->size_request = hildon_time_editor_size_request;
+    widget_class->size_allocate = hildon_time_editor_size_allocate;
+    widget_class->tap_and_hold_setup =
+        hildon_time_editor_tap_and_hold_setup;
+    widget_class->focus = hildon_composite_widget_focus;
+
+    container_class->forall = hildon_time_editor_forall;
+    GTK_OBJECT_CLASS(editor_class)->destroy = hildon_time_editor_destroy;
+
+    object_class->finalize = hildon_time_editor_finalize;
+}
+
+static
+void hildon_time_editor_tap_and_hold_setup(GtkWidget * widget,
+                                           GtkWidget * menu,
+                                           GtkCallback func,
+                                           GtkWidgetTapAndHoldFlags flags)
+{
+    HildonTimeEditorPrivate *priv = HILDON_TIME_EDITOR_GET_PRIVATE(widget);
+
+    gtk_widget_tap_and_hold_setup(priv->h_entry, menu, func,
+                                  GTK_TAP_AND_HOLD_NO_SIGNALS);
+    gtk_widget_tap_and_hold_setup(priv->m_entry, menu, func,
+                                  GTK_TAP_AND_HOLD_NO_SIGNALS);
+    gtk_widget_tap_and_hold_setup(priv->s_entry, menu, func,
+                                  GTK_TAP_AND_HOLD_NO_SIGNALS);
+    gtk_widget_tap_and_hold_setup(priv->eventbox, menu, func,
+                                  GTK_TAP_AND_HOLD_NO_SIGNALS);
+    gtk_widget_tap_and_hold_setup(priv->iconbutton, menu, func,
+                                  GTK_TAP_AND_HOLD_NONE);
+}
+
+static void hildon_time_editor_init(HildonTimeEditor * editor)
+{
+    HildonTimeEditorPrivate *priv;
+    gchar hours[3] = "01";
+    gchar minutes[3] = "00";
+    gchar seconds[3] = "00";
+
+    priv = HILDON_TIME_EDITOR_GET_PRIVATE(editor);
+
+    gtk_widget_push_composite_child();
+    
+    priv->show_s = FALSE;
+    priv->ampm_pos_after = TRUE;
+    priv->clock_24h = TRUE;
+    priv->duration_mode = FALSE;
+    priv->iconbutton = gtk_button_new();
+    priv->h_entry = gtk_entry_new();
+    priv->m_entry = gtk_entry_new();
+    priv->s_entry = gtk_entry_new();
+    priv->ampm = gtk_label_new(NULL);
+    priv->label = gtk_label_new(":");
+    priv->label2 = gtk_label_new(":");
+    priv->icon = gtk_image_new_from_icon_name(ICON_NAME, HILDON_ICON_SIZE_26);
+    priv->frame = gtk_frame_new(NULL);
+    priv->eventbox = gtk_event_box_new();
+    priv->valid_value = TRUE;
+    
+    GTK_WIDGET_SET_FLAGS(editor, GTK_NO_WINDOW);
+    GTK_WIDGET_UNSET_FLAGS(priv->iconbutton, GTK_CAN_FOCUS);
+    
+    gtk_event_box_set_visible_window(GTK_EVENT_BOX(priv->eventbox), FALSE);
+
+    gtk_container_add(GTK_CONTAINER(priv->iconbutton), priv->icon);
+    gtk_container_add(GTK_CONTAINER(priv->eventbox), priv->ampm);
+
+    gtk_entry_set_has_frame(GTK_ENTRY(priv->h_entry), FALSE);
+    gtk_entry_set_has_frame(GTK_ENTRY(priv->m_entry), FALSE);
+    gtk_entry_set_has_frame(GTK_ENTRY(priv->s_entry), FALSE);
+
+    /* connect the activate signal to a function. */
+    g_signal_connect(G_OBJECT(priv->h_entry), "activate",
+                     G_CALLBACK(hildon_time_editor_entry_activate),
+                     editor);
+    g_signal_connect(G_OBJECT(priv->m_entry), "activate",
+                     G_CALLBACK(hildon_time_editor_entry_activate),
+                     editor);
+    g_signal_connect(G_OBJECT(priv->s_entry), "activate",
+                     G_CALLBACK(hildon_time_editor_entry_activate),
+                     editor);
+
+    /* clicked signal for am/pm label */
+    g_signal_connect(G_OBJECT(priv->eventbox), "button_press_event",
+                     G_CALLBACK(hildon_time_editor_ampm_clicked), editor);
+
+    /* clicked signal for icon */
+    g_signal_connect(G_OBJECT(priv->iconbutton), "clicked",
+                     G_CALLBACK(hildon_time_editor_icon_clicked), editor);
+
+    /* clicked signal for hour entry */
+    g_signal_connect(G_OBJECT(priv->h_entry), "button_release_event",
+                     G_CALLBACK(hildon_time_editor_entry_clicked), editor);
+
+    /* clicked signal for minute entry */
+    g_signal_connect(G_OBJECT(priv->m_entry), "button_release_event",
+                     G_CALLBACK(hildon_time_editor_entry_clicked), editor);
+
+    /* clicked signal for second entry */
+    g_signal_connect(G_OBJECT(priv->s_entry), "button_release_event",
+                     G_CALLBACK(hildon_time_editor_entry_clicked), editor);
+
+    /* focus out events */
+    g_signal_connect(G_OBJECT(priv->h_entry), "focus-out-event",
+                     G_CALLBACK(hildon_time_editor_entry_focusout),
+                     editor);
+    g_signal_connect(G_OBJECT(priv->m_entry), "focus-out-event",
+                     G_CALLBACK(hildon_time_editor_entry_focusout),
+                     editor);
+    g_signal_connect(G_OBJECT(priv->s_entry), "focus-out-event",
+                     G_CALLBACK(hildon_time_editor_entry_focusout),
+                     editor);
+
+    /* key press events */
+    g_signal_connect(G_OBJECT(priv->h_entry), "key-press-event",
+                     G_CALLBACK(hildon_time_editor_entry_keypress),
+                     editor);
+    g_signal_connect(G_OBJECT(priv->m_entry), "key-press-event",
+                     G_CALLBACK(hildon_time_editor_entry_keypress),
+                     editor);
+    g_signal_connect(G_OBJECT(priv->s_entry), "key-press-event",
+                     G_CALLBACK(hildon_time_editor_entry_keypress),
+                     editor);
+
+    gtk_widget_set_parent(priv->iconbutton, GTK_WIDGET(editor));
+    gtk_widget_set_parent(priv->label, GTK_WIDGET(editor));
+
+    gtk_widget_set_parent(priv->label2, GTK_WIDGET(editor));
+    gtk_widget_set_parent(priv->s_entry, GTK_WIDGET(editor));
+    gtk_widget_set_parent(priv->eventbox, GTK_WIDGET(editor));
+    gtk_widget_set_parent(priv->m_entry, GTK_WIDGET(editor));
+    gtk_widget_set_parent(priv->h_entry, GTK_WIDGET(editor));
+
+    gtk_widget_show(priv->h_entry);
+    gtk_widget_show(priv->m_entry);
+    gtk_widget_show_all(priv->iconbutton);
+    gtk_widget_show(priv->label);
+
+    gtk_widget_set_parent(priv->frame, GTK_WIDGET(editor));
+    gtk_widget_show_all(priv->frame);
+
+    /* Check if we are in am/pm time locale */
+    if (!hildon_time_editor_check_locale(editor)) {
+        priv->clock_24h = FALSE;
+        gtk_widget_show_all(priv->eventbox);
+    }
+
+    {   /* get current time */
+        time_t tm;
+        struct tm *stm;
+
+        tm = time(NULL);
+        stm = localtime(&tm);
+
+        if (stm) {
+            if (!priv->clock_24h) {
+                /* Clock is showed in 24h format If hour is 12 we can be
+                   either in am or pm mode */
+                if (stm->tm_hour > 12) {
+                    priv->am = FALSE;
+                    sprintf(hours, "%2d", stm->tm_hour - 12);
+                } else if (stm->tm_hour < 12) {
+                    priv->am = TRUE;
+                    sprintf(hours, "%2d", stm->tm_hour);
+                } else if (stm->tm_hour == 12) {
+                    priv->am = FALSE;
+                    sprintf(hours, "%2d", stm->tm_hour);
+                }
+            } else
+                sprintf(hours, "%02d", stm->tm_hour);
+            sprintf(minutes, "%02d", stm->tm_min);
+            sprintf(seconds, "%02d", stm->tm_sec);
+        }
+    }
+
+    /* set current time (am/pm) */
+    gtk_label_set_label(GTK_LABEL(priv->ampm), priv->am ? priv->am_symbol :
+                        priv->pm_symbol);
+
+    /* Read time values to our internal struct */
+    g_snprintf(priv->h_time, 4, "%s", hours);
+    g_snprintf(priv->m_time, 4, "%s", minutes);
+    g_snprintf(priv->s_time, 4, "%s", seconds);
+
+    gtk_entry_set_text(GTK_ENTRY(priv->h_entry), hours);
+    gtk_entry_set_text(GTK_ENTRY(priv->m_entry), minutes);
+    gtk_entry_set_text(GTK_ENTRY(priv->s_entry), seconds);
+
+    gtk_entry_set_max_length(GTK_ENTRY(priv->h_entry), 2);
+    gtk_entry_set_width_chars(GTK_ENTRY(priv->h_entry), 2);
+    gtk_entry_set_max_length(GTK_ENTRY(priv->m_entry), 2);
+    gtk_entry_set_width_chars(GTK_ENTRY(priv->m_entry), 2);
+    gtk_entry_set_max_length(GTK_ENTRY(priv->s_entry), 2);
+    gtk_entry_set_width_chars(GTK_ENTRY(priv->s_entry), 2);
+
+    hildon_time_editor_add_style();
+    gtk_widget_set_name(GTK_WIDGET(priv->iconbutton),
+                        "hildon-time-editor-icon");
+    
+    gtk_widget_pop_composite_child();
+}
+
+static gboolean
+hildon_time_editor_mnemonic_activate( GtkWidget *widget,
+                                      gboolean group_cycling)
+{
+  HildonTimeEditorPrivate *priv = HILDON_TIME_EDITOR_GET_PRIVATE(widget);
+  gtk_widget_grab_focus( priv->h_entry );
+  gtk_editable_select_region(GTK_EDITABLE(priv->h_entry), 0, 2);
+  return TRUE;
+}
+
+/**
+ * hildon_time_editor_new:
+ *
+ * This function creates a new time editor. 
+ *
+ * Return value: pointer to a new #HildonTimeEditor widget.
+ **/
+
+GtkWidget *hildon_time_editor_new(void)
+{
+    return GTK_WIDGET(g_object_new(HILDON_TYPE_TIME_EDITOR, NULL));
+}
+
+static void hildon_time_editor_finalize(GObject * obj_self)
+{
+    HildonTimeEditorPrivate *priv = HILDON_TIME_EDITOR_GET_PRIVATE(obj_self);
+
+    if (priv->am_symbol)
+        g_free(priv->am_symbol);
+    if (priv->pm_symbol)
+        g_free(priv->pm_symbol);
+
+    if (G_OBJECT_CLASS(parent_class)->finalize)
+        G_OBJECT_CLASS(parent_class)->finalize(obj_self);
+}
+
+static void hildon_time_editor_add_style(void)
+{
+    gtk_rc_parse_string("  style \"hildon-time-editor-icon\" {"
+                        "    GtkButton::default_border = { 0, 0, 0, 0 }"
+                        "    xthickness = 0"
+                        "    ythickness = 0"
+                        "    engine \"pixmap\" {"
+                        "      image {"
+                        "        function = BOX"
+                        "      }"
+                        "    }"
+                        "  }"
+                        "  widget \"*.hildon-time-editor-icon\""
+                        "    style \"hildon-time-editor-icon\"");
+}
+
+/**
+ * hildon_time_editor_set_time:
+ * @editor: the @HildonTimeEditor widget.
+ * @hours: hours
+ * @minutes: minutes
+ * @seconds: seconds
+ *
+ * This function sets the time on an existing time editor. If the
+ * time specified by the arguments is invalid, the function returns
+ * without doing anything else. 
+ **/
+
+void hildon_time_editor_set_time(HildonTimeEditor * editor, guint hours,
+                                 guint minutes, guint seconds)
+{
+    HildonTimeEditorPrivate *priv;
+    gchar h_time[3];
+    gchar m_time[3];
+    gchar s_time[3];
+
+    g_return_if_fail(time);
+    g_return_if_fail(HILDON_IS_TIME_EDITOR(editor));
+
+    priv = HILDON_TIME_EDITOR_GET_PRIVATE(editor);
+
+    if ((priv->duration_mode && hours > 99) ||
+        (!priv->duration_mode && hours > 23) ||
+         minutes > 59 || seconds > 59)
+        return;
+
+    if (priv->clock_24h || priv->duration_mode)
+        sprintf(h_time, "%02u", hours);
+    else {
+        /* we are showing 12h clock and its after noon */
+        if (hours > 12) {
+            hours -= 12;
+            priv->am = FALSE;
+            gtk_label_set_text(GTK_LABEL(priv->ampm), priv->pm_symbol);
+        }
+        /* before noon */
+        else if (hours < 12) {
+            if (hours == 0)
+                hours = 12;
+            priv->am = TRUE;
+            gtk_label_set_text(GTK_LABEL(priv->ampm), priv->am_symbol);
+        } else if (hours == 12) {
+            priv->am = FALSE;
+            gtk_label_set_text(GTK_LABEL(priv->ampm), priv->pm_symbol);
+        }
+
+
+        sprintf(h_time, "%2u", hours);
+    }
+    sprintf(m_time, "%02u", minutes);
+    sprintf(s_time, "%02u", seconds);
+
+    gtk_entry_set_text(GTK_ENTRY(priv->h_entry), h_time);
+    gtk_entry_set_text(GTK_ENTRY(priv->m_entry), m_time);
+    gtk_entry_set_text(GTK_ENTRY(priv->s_entry), s_time);
+
+    /* If in duration mode check time validity */
+    if (priv->duration_mode) {
+        guint response =
+            hildon_time_editor_check_duration_validity(editor);
+        if (response != DURATION_OK)
+            hildon_time_editor_duration_handle_error(editor, response);
+    }
+}
+
+/**
+ * hildon_time_editor_get_time:
+ * @editor: the @HildonTimeEditor widget.
+ * @hours: hours
+ * @minutes: minutes
+ * @seconds: seconds
+ *
+ * Gets the time of the @HildonTimeEditor widget. 
+ **/
+
+void hildon_time_editor_get_time(HildonTimeEditor * editor,
+                                 guint * hours,
+                                 guint * minutes, guint * seconds)
+{
+    HildonTimeEditorPrivate *priv;
+
+    g_return_if_fail(editor);
+    g_return_if_fail(HILDON_IS_TIME_EDITOR(editor));
+
+    priv = HILDON_TIME_EDITOR_GET_PRIVATE(editor);
+
+    *hours = atoi(GTK_ENTRY(priv->h_entry)->text);
+
+    if( !priv->duration_mode )
+    {
+       /* if using 12h clock and its after noon, add 12h hours to get 24h
+          clock */
+       if (!priv->clock_24h && !priv->am) {
+           if (*hours != 12)
+               *hours += 12;
+       }
+       if (*hours == 12 && priv->am)
+           *hours = 0;
+    }
+
+    *minutes = atoi(GTK_ENTRY(priv->m_entry)->text);
+    *seconds = atoi(GTK_ENTRY(priv->s_entry)->text);
+}
+
+/**
+ * hildon_time_editor_set_duration_range:
+ * @editor: the @HildonTimeEditor widget.
+ * @min_seconds: minimum allowed time in seconds
+ * @max_seconds: maximum allowed time in seconds
+ *
+ * Sets the duration editor time range of the @HildonTimeEditor widget.
+ **/
+
+void hildon_time_editor_set_duration_range(HildonTimeEditor * editor,
+                                           guint min_seconds,
+                                           guint max_seconds)
+{
+    HildonTimeEditorPrivate *priv;
+    guint hours, minutes, seconds;
+
+    g_return_if_fail(editor);
+    g_return_if_fail(HILDON_IS_TIME_EDITOR(editor));
+
+    g_return_if_fail(min_seconds >= MIN_DURATION);
+    g_return_if_fail(max_seconds <= MAX_DURATION);
+    g_return_if_fail(min_seconds < max_seconds);
+
+    priv = HILDON_TIME_EDITOR_GET_PRIVATE(editor);
+
+
+    if( !priv->duration_mode )
+      return;
+
+    priv->duration_min = min_seconds;
+    priv->duration_max = max_seconds;
+
+    hours = (min_seconds / 3600);
+    seconds = min_seconds - (hours * 3600);
+    minutes = (seconds / 60);
+    seconds = seconds - (minutes * 60);
+
+    /* Set minimum allowed value for duration editor */
+    hildon_time_editor_set_time(editor, hours, minutes, seconds);
+}
+
+/**
+ * hildon_time_editor_get_duration_range:
+ * @editor: the @HildonTimeEditor widget.
+ * @min_seconds: pointer to guint
+ * @max_seconds: pointer to guint
+ *
+ * Gets the duration editor time range of the @HildonTimeEditor widget.
+ **/
+
+void hildon_time_editor_get_duration_range(HildonTimeEditor * editor,
+                                           guint * min_seconds,
+                                           guint * max_seconds)
+{
+    HildonTimeEditorPrivate *priv;
+
+    g_return_if_fail(editor);
+    g_return_if_fail(HILDON_IS_TIME_EDITOR(editor));
+
+    priv = HILDON_TIME_EDITOR_GET_PRIVATE(editor);
+
+    *min_seconds = priv->duration_min;
+    *max_seconds = priv->duration_max;
+}
+
+static gboolean hildon_time_editor_check_locale(HildonTimeEditor * editor)
+{
+    HildonTimeEditorPrivate *priv;
+    gchar *t_fm;
+
+    priv = HILDON_TIME_EDITOR_GET_PRIVATE(editor);
+
+    priv->am_symbol = g_strdup(nl_langinfo(AM_STR));
+    priv->pm_symbol = g_strdup(nl_langinfo(PM_STR));
+
+    if (!strcmp(priv->am_symbol, ""))
+        return TRUE;
+    else {
+        t_fm = g_strdup(nl_langinfo(T_FMT_AMPM));
+        /* Check what format am/pm time should be */
+        if (!strncmp(t_fm, "%p", 2))
+            priv->ampm_pos_after = FALSE;
+        priv->am_symbol =
+            g_ascii_strdown((const gchar *) priv->am_symbol, -1);
+        priv->pm_symbol =
+            g_ascii_strdown((const gchar *) priv->pm_symbol, -1);
+       g_free(t_fm);
+        return FALSE;
+    }
+}
+
+static
+guint hildon_time_editor_check_duration_validity(HildonTimeEditor * editor)
+{
+    HildonTimeEditorPrivate *priv;
+    guint seconds;
+
+    priv = HILDON_TIME_EDITOR_GET_PRIVATE(editor);
+
+    /* Get current time */
+    seconds =
+        3600 * (guint) atoi(gtk_entry_get_text(GTK_ENTRY(priv->h_entry)))
+        + 60 * (guint) atoi(gtk_entry_get_text(GTK_ENTRY(priv->m_entry)))
+        + (guint) atoi(gtk_entry_get_text(GTK_ENTRY(priv->s_entry)));
+
+    if (seconds > priv->duration_max)
+        return DURATION_MAX_EXCEED;
+    else if (seconds < priv->duration_min)
+        return DURATION_MIN_EXCEED;
+    else
+        return DURATION_OK;
+}
+
+static gboolean hildon_time_editor_entry_focusout(GtkWidget * widget,
+                                                  GdkEventFocus * event,
+                                                  gpointer data)
+{
+    HildonTimeEditor *editor;
+    HildonTimeEditorPrivate *priv;
+
+    editor = HILDON_TIME_EDITOR(data);
+    priv = HILDON_TIME_EDITOR_GET_PRIVATE(editor);
+
+    /* If entry is deleted we should restore previous value for it and
+       infoprint is showed */
+    if (!strcmp(GTK_ENTRY(widget)->text, "")) {
+        if (widget == priv->h_entry) {
+            if (!priv->duration_mode && priv->clock_24h) {
+                gtk_infoprintf(GTK_WINDOW
+                              (gtk_widget_get_ancestor
+                               (widget, GTK_TYPE_WINDOW)),
+                              _("Ckct_ib_set_a_value_within_range"), 0, 23);
+            } else if (!priv->duration_mode && !priv->clock_24h) {
+                gtk_infoprintf(GTK_WINDOW
+                              (gtk_widget_get_ancestor
+                               (widget, GTK_TYPE_WINDOW)),
+                              _("Ckct_ib_set_a_value_within_range"), 1, 12); 
+            } else if (priv->duration_mode) {
+                gtk_infoprintf(GTK_WINDOW
+                              (gtk_widget_get_ancestor
+                               (widget, GTK_TYPE_WINDOW)),
+                              _("Ckct_ib_set_a_value_within_range"), 0, 99);
+            }
+            gtk_entry_set_text(GTK_ENTRY(priv->h_entry), priv->h_time);
+            gtk_widget_grab_focus (widget);
+            gtk_editable_select_region(GTK_EDITABLE(widget), 0, 2);
+            priv->valid_value = FALSE;
+        } else if (widget == priv->m_entry) {
+            gtk_infoprintf(GTK_WINDOW
+                          (gtk_widget_get_ancestor
+                           (widget, GTK_TYPE_WINDOW)),
+                          _("Ckct_ib_set_a_value_within_range"), 0, 59);
+            gtk_entry_set_text(GTK_ENTRY(priv->m_entry), priv->m_time);
+            gtk_widget_grab_focus (widget);
+            gtk_editable_select_region(GTK_EDITABLE(widget), 0, 2);
+            priv->valid_value = FALSE;
+        } else {
+            gtk_infoprintf(GTK_WINDOW
+                          (gtk_widget_get_ancestor
+                           (widget, GTK_TYPE_WINDOW)),
+                          _("Ckct_ib_set_a_value_within_range"), 0, 59);
+            gtk_entry_set_text(GTK_ENTRY(priv->s_entry), priv->s_time);
+            gtk_widget_grab_focus (widget);
+            gtk_editable_select_region(GTK_EDITABLE(widget), 0, 2);
+            priv->valid_value = FALSE;
+        }
+    }
+
+    hildon_time_editor_entry_activate(widget, data);
+
+    /* FIXME - Next part is a kludge. This can only be fixed by writing
+     *         some parts of the widget again.
+     *         Widget has went trough many changes in time, so it would be
+     *         smart to re-write the whole widget and remove this kind of
+     *         kludges at the same time.
+     */
+    if( GTK_WINDOW(gtk_widget_get_ancestor(widget,
+        GTK_TYPE_WINDOW))->focus_widget == widget )
+    {
+      gtk_editable_select_region( GTK_EDITABLE(widget), 0, 2);
+      return TRUE; /*This has to be here! , I hope it wont break any other
+                     implementations runned after this*/
+    }
+    return FALSE;
+}
+
+static void hildon_time_editor_entry_activate(GtkWidget * widget,
+                                              gpointer data)
+{
+
+    HildonTimeEditor *editor;
+    HildonTimeEditorPrivate *priv;
+    gint val;
+    gchar str[3];
+
+    g_return_if_fail(widget);
+    g_return_if_fail(data);
+
+    editor = HILDON_TIME_EDITOR(data);
+    priv = HILDON_TIME_EDITOR_GET_PRIVATE(editor);
+
+    /* check value of the entry */
+    val = atoi(GTK_ENTRY(widget)->text);
+
+    /* check limit of the hour entry */
+    if (widget == priv->h_entry) {
+        /* 24h clock or in duration editor mode */
+        if (priv->clock_24h || priv->duration_mode) {
+            /* too big */
+            if (!priv->duration_mode && val > 23) {
+                gtk_infoprintf(GTK_WINDOW
+                              (gtk_widget_get_ancestor
+                               (widget, GTK_TYPE_WINDOW)),
+                              _("Ckct_ib_maximum_value"), 23);
+                gtk_entry_set_text(GTK_ENTRY(widget), "23");
+                gtk_widget_grab_focus(widget);
+                gtk_editable_select_region(GTK_EDITABLE(widget), 0, 2);
+                priv->valid_value = FALSE;
+            }
+            /* ok, pad with 0 */
+            /* too big */
+            else if (priv->duration_mode && val > 99) {
+                gtk_infoprintf(GTK_WINDOW
+                              (gtk_widget_get_ancestor
+                               (widget, GTK_TYPE_WINDOW)),
+                              _("Ckct_ib_maximum_value"), 99);
+                gtk_entry_set_text(GTK_ENTRY(widget), "99");
+                gtk_widget_grab_focus(widget);
+                gtk_editable_select_region(GTK_EDITABLE(widget), 0, 2);
+                priv->valid_value = FALSE;
+            } else {
+                sprintf(str, "%02d", val);
+                gtk_entry_set_text(GTK_ENTRY(widget), str);
+            }
+        }
+        /* 12h clock */
+        else {
+            /* too big */
+            if (val > 12) {
+                gtk_infoprintf(GTK_WINDOW
+                              (gtk_widget_get_ancestor
+                               (widget, GTK_TYPE_WINDOW)),
+                              _("Ckct_ib_maximum_value"), 12);
+                gtk_entry_set_text(GTK_ENTRY(widget), "12");
+                gtk_widget_grab_focus(widget);
+                gtk_editable_select_region(GTK_EDITABLE(widget), 0, 2);
+                priv->valid_value = FALSE;
+            }
+            /* ok, no padding */
+            else if (val < 1) {
+                gtk_infoprintf(GTK_WINDOW
+                              (gtk_widget_get_ancestor
+                               (widget, GTK_TYPE_WINDOW)),
+                              _("Ckct_ib_minimum_value"), 1);
+                gtk_entry_set_text(GTK_ENTRY(widget), "01");
+                gtk_widget_grab_focus(widget);
+                gtk_editable_select_region(GTK_EDITABLE(widget), 0, 2);
+                priv->valid_value = FALSE;
+            } else {
+                sprintf(str, "%02d", val);
+                gtk_entry_set_text(GTK_ENTRY(widget), str);
+            }
+        }
+
+    }
+    /* check limit of the minute entries */
+    else if (widget == priv->m_entry) {
+        /* too big */
+        if (val > 59) {
+            gtk_infoprintf(GTK_WINDOW
+                          (gtk_widget_get_ancestor
+                           (widget, GTK_TYPE_WINDOW)),
+                          _("Ckct_ib_maximum_value"), 59);
+            gtk_entry_set_text(GTK_ENTRY(widget), "59");
+            gtk_widget_grab_focus(widget);
+            gtk_editable_select_region(GTK_EDITABLE(widget), 0, 2);
+            priv->valid_value = FALSE;
+        }
+        /* ok, pad with 0 */
+        else {
+            sprintf(str, "%02d", val);
+            gtk_entry_set_text(GTK_ENTRY(widget), str);
+        }
+    }
+    /* check limit of the seconds entries */
+    else if (widget == priv->s_entry) {
+        /* too big */
+        if (val > 59) {
+            gtk_infoprintf(GTK_WINDOW
+                          (gtk_widget_get_ancestor
+                           (widget, GTK_TYPE_WINDOW)),
+                          _("Ckct_ib_maximum_value"), 59);
+            gtk_entry_set_text(GTK_ENTRY(widget), "59");
+            gtk_widget_grab_focus(widget);
+            gtk_editable_select_region(GTK_EDITABLE(widget), 0, 2);
+            priv->valid_value = FALSE;
+        }
+        /* ok, pad with 0 */
+        else {
+            sprintf(str, "%02d", val);
+            gtk_entry_set_text(GTK_ENTRY(widget), str);
+        }
+    }
+    /* Handle duration mode minimum and maximum range */
+    if (priv->duration_mode) {
+        guint response;
+
+        response = hildon_time_editor_check_duration_validity(editor);
+        if (response != DURATION_OK)
+        {
+            hildon_time_editor_duration_handle_error(editor, response);
+            /* We have to grab focus back, as the specification says. */
+            if( GTK_IS_EDITABLE(widget) )
+              gtk_widget_grab_focus( widget );
+        }
+    }
+}
+
+static void
+hildon_time_editor_duration_handle_error(HildonTimeEditor * editor,
+                                         guint type)
+{
+    HildonTimeEditorPrivate *priv;
+    guint hours, minutes, seconds, totalsecs;
+    gchar str[256], t_str[3];
+
+    priv = HILDON_TIME_EDITOR_GET_PRIVATE(editor);
+
+    if (type == DURATION_MAX_EXCEED)
+        totalsecs = priv->duration_max;
+    else
+        totalsecs = priv->duration_min;
+
+    hours = (totalsecs / 3600);
+    seconds = totalsecs - (hours * 3600);
+    minutes = (seconds / 60);
+    seconds = seconds - (minutes * 60);
+
+    if (!type)
+        g_snprintf(str, 256,
+                   _("Minimum allowed duration is %02d:%02d:%02d\n"),
+                   hours, minutes, seconds);
+     
+    else
+        g_snprintf(str, 256,
+                   _("Maximum allowed duration is %02d:%02d:%02d\n"),
+                   hours, minutes, seconds);
+
+    /* set correct values to duration editor */
+    sprintf(t_str, "%02u", hours);
+    gtk_entry_set_text(GTK_ENTRY(priv->h_entry), t_str);
+    sprintf(t_str, "%02u", minutes);
+    gtk_entry_set_text(GTK_ENTRY(priv->m_entry), t_str);
+    sprintf(t_str, "%02u", seconds);
+    gtk_entry_set_text(GTK_ENTRY(priv->s_entry), t_str);
+
+    /* show infoprint */
+    gtk_infoprint(GTK_WINDOW
+                  (gtk_widget_get_ancestor
+                  (GTK_WIDGET(editor), GTK_TYPE_WINDOW)), str);
+}
+
+static gboolean
+hildon_time_editor_ampm_clicked(GtkWidget * widget,
+                                GdkEventButton * event, gpointer data)
+{
+    HildonTimeEditor *editor;
+    HildonTimeEditorPrivate *priv;
+
+    g_return_val_if_fail(widget, FALSE);
+    g_return_val_if_fail(data, FALSE);
+
+    editor = HILDON_TIME_EDITOR(data);
+    priv = HILDON_TIME_EDITOR_GET_PRIVATE(editor);
+
+    if (priv->am) {
+        gtk_label_set_text(GTK_LABEL(priv->ampm), priv->pm_symbol);
+        priv->am = FALSE;
+    } else {
+        gtk_label_set_text(GTK_LABEL(priv->ampm), priv->am_symbol);
+        priv->am = TRUE;
+    }
+    return FALSE;
+}
+
+static gboolean
+hildon_time_editor_icon_clicked(GtkWidget * widget, gpointer data)
+{
+    HildonTimeEditor *editor;
+    HildonTimeEditorPrivate *priv;
+    GtkWidget *picker;
+    GtkWidget *parent;
+    guint h, m, s, result;
+
+    g_return_val_if_fail(widget, FALSE);
+    g_return_val_if_fail(data, FALSE);
+
+    editor = HILDON_TIME_EDITOR(data);
+    priv = HILDON_TIME_EDITOR_GET_PRIVATE(editor);
+
+    /* icon is passive in duration editor mode */
+    if (priv->duration_mode)
+        return FALSE;
+
+    /* Check that we have valid values in entries */
+    hildon_time_editor_entry_activate(priv->h_entry, data);
+    hildon_time_editor_entry_activate(priv->m_entry, data);
+    hildon_time_editor_entry_activate(priv->s_entry, data);
+
+    parent = gtk_widget_get_ancestor(GTK_WIDGET(editor), GTK_TYPE_WINDOW);
+    picker = hildon_time_picker_new(GTK_WINDOW(parent));
+
+    hildon_time_editor_get_time(editor, &h, &m, &s);
+    hildon_time_picker_set_time(HILDON_TIME_PICKER(picker), h, m);
+
+    result = gtk_dialog_run(GTK_DIALOG(picker));
+    switch (result) {
+    case GTK_RESPONSE_OK:
+    case GTK_RESPONSE_ACCEPT:
+        hildon_time_picker_get_time(HILDON_TIME_PICKER(picker), &h, &m);
+        hildon_time_editor_set_time(editor, h, m, 0);
+        break;
+    default:
+        break;
+    }
+
+    gtk_widget_destroy(picker);
+    return FALSE;
+}
+
+static gboolean hildon_time_editor_entry_clicked(GtkWidget * widget,
+                                                 GdkEventButton * event,
+                                                 gpointer data)
+{
+     HildonTimeEditor *editor;
+     HildonTimeEditorPrivate *priv;
+
+     editor = HILDON_TIME_EDITOR (data);
+     priv = HILDON_TIME_EDITOR_GET_PRIVATE (editor);
+     
+     if (!priv->valid_value)
+       priv->valid_value = TRUE;
+     else
+       gtk_editable_select_region(GTK_EDITABLE(widget), 0, 2);
+
+    return FALSE;
+}
+
+static void hildon_time_editor_size_request(GtkWidget * widget,
+                                            GtkRequisition * requisition)
+{
+    HildonTimeEditor *editor;
+    HildonTimeEditorPrivate *priv;
+    GtkRequisition req;
+
+    editor = HILDON_TIME_EDITOR(widget);
+    priv = HILDON_TIME_EDITOR_GET_PRIVATE(editor);
+
+    gtk_widget_size_request(priv->frame, &req);
+    *requisition = req;
+
+    requisition->width = TIME_EDITOR_LBORDER +
+        TIME_EDITOR_RBORDER + TIME_EDITOR_CLOCK_BORDER +
+        widget->style->xthickness * 2;
+
+
+    gtk_widget_size_request(priv->h_entry, &req);
+    requisition->width += req.width;
+
+    gtk_widget_size_request(priv->m_entry, &req);
+    requisition->width += req.width;
+
+    gtk_widget_size_request(priv->label, &req);
+    requisition->width += req.width;
+
+    gtk_widget_size_request(priv->iconbutton, &req);
+    requisition->width += req.width;
+
+    if (priv->show_s) {
+        gtk_widget_size_request(priv->s_entry, &req);
+        requisition->width += req.width;
+
+        gtk_widget_size_request(priv->label2, &req);
+        requisition->width += req.width;
+    }
+
+    if (!priv->clock_24h && !priv->duration_mode) {
+        gtk_widget_size_request(priv->eventbox, &req);
+        requisition->width += req.width + 4;
+    }
+
+    requisition->height = TIME_EDITOR_HEIGHT;
+}
+
+static void set_widget_allocation(GtkWidget * widget,
+                                  GtkAllocation * alloc,
+                                  GtkAllocation * allocation)
+{
+    GtkRequisition child_requisition;
+
+    gtk_widget_get_child_requisition(widget, &child_requisition);
+
+    if (allocation->width + allocation->x >
+        alloc->x + child_requisition.width)
+        alloc->width = child_requisition.width;
+    else {
+        alloc->width = allocation->width - (alloc->x - allocation->x);
+        if (alloc->width < 0)
+            alloc->width = 0;
+    }
+    gtk_widget_size_allocate(widget, alloc);
+    alloc->x += alloc->width;
+}
+
+static void hildon_time_editor_size_allocate(GtkWidget * widget,
+                                             GtkAllocation * allocation)
+{
+        HildonTimeEditor *editor;
+        HildonTimeEditorPrivate *priv;
+        GtkAllocation alloc;
+        GtkRequisition child_requisition;
+        gint frame_w = 0, mod_w = 0;
+
+        editor = HILDON_TIME_EDITOR(widget);
+        priv = HILDON_TIME_EDITOR_GET_PRIVATE(editor);
+
+        widget->allocation = *allocation;
+
+/*Init start values*/
+        alloc.y = widget->allocation.y + widget->style->ythickness;
+        
+        if (widget->allocation.height > TIME_EDITOR_HEIGHT) {
+            alloc.height =
+                TIME_EDITOR_HEIGHT - widget->style->ythickness * 2;
+            alloc.y +=
+                (widget->allocation.height - TIME_EDITOR_HEIGHT) / 2;
+        } else
+            alloc.height =
+                widget->allocation.height - widget->style->ythickness * 2;
+
+        if (alloc.height < 0)
+            alloc.height = 0;
+
+        gtk_widget_size_request(widget, &child_requisition);
+        if (allocation->width > child_requisition.width) {
+            mod_w = (allocation->width - child_requisition.width) / 2;
+            alloc.x = allocation->x + mod_w + widget->style->xthickness +
+                      TIME_EDITOR_LBORDER;
+        } else
+            alloc.x = allocation->x + widget->style->xthickness +
+                      TIME_EDITOR_LBORDER;
+
+        /* am/pm label */
+        if (!priv->duration_mode) {
+            if (!priv->clock_24h && !priv->ampm_pos_after) {
+                gint tmp = alloc.height;
+
+                alloc.x += 4;
+                alloc.y -= 5;
+                alloc.height = 27;
+                set_widget_allocation(priv->eventbox, &alloc,
+                                      &widget->allocation);
+                alloc.y += 5;
+                alloc.height = tmp;
+            }
+        }
+        
+        /* hour */
+        if (priv->h_entry && GTK_WIDGET_VISIBLE(priv->h_entry))
+            set_widget_allocation(priv->h_entry, &alloc,
+                                  &widget->allocation);
+
+/* -5/+5 just to make it look nice -- Hildon --
+ * Same y -value for the label, does not just look good
+ * This may be a kludge, or then not
+ */
+        /* first label */
+        if (priv->label && GTK_WIDGET_VISIBLE(priv->label)) {
+            alloc.y -= 5;
+            set_widget_allocation(priv->label, &alloc,
+                                  &widget->allocation);
+            alloc.y += 5;
+        }
+
+        /* minutes */
+        if (priv->m_entry && GTK_WIDGET_VISIBLE(priv->m_entry))
+            set_widget_allocation(priv->m_entry, &alloc,
+                                  &widget->allocation);
+
+        if (priv->show_s) {
+            /* seconds label */
+            if (priv->label2) {
+                alloc.y -= 5;
+                set_widget_allocation(priv->label2, &alloc,
+                                      &widget->allocation);
+                alloc.y += 5;
+            }
+
+            /* seconds */
+            if (priv->s_entry)
+                set_widget_allocation(priv->s_entry, &alloc,
+                                      &widget->allocation);
+        }
+
+        /* am/pm label after the rest */
+        if (!priv->duration_mode) {
+            if (!priv->clock_24h && priv->ampm_pos_after) {
+                gint tmp = alloc.height;
+
+                alloc.y -= 5;
+                alloc.height = 27;
+                set_widget_allocation(priv->eventbox, &alloc,
+                                      &widget->allocation);
+                alloc.y += 5;
+                alloc.height = tmp;
+                alloc.x += 4;
+            }
+        }
+        frame_w = alloc.x - widget->allocation.x + TIME_EDITOR_RBORDER;
+
+        /* icon */
+        if (priv->iconbutton && GTK_WIDGET_VISIBLE(priv->iconbutton)) {
+            alloc.x += TIME_EDITOR_CLOCK_BORDER;
+            alloc.height = ICON_HEIGHT;
+            alloc.width = ICON_WIDTH;
+            set_widget_allocation(priv->iconbutton, &alloc,
+                                  &widget->allocation);
+        }
+
+        /* frame */
+        if (allocation->width > child_requisition.width) {
+            alloc.x = allocation->x + mod_w;
+            alloc.width = frame_w - mod_w;
+
+        } else {
+            alloc.x = allocation->x;
+            alloc.width = frame_w;
+        }
+
+        gtk_widget_get_child_requisition(priv->frame, &child_requisition);
+
+        alloc.y = allocation->y;
+        
+        if (widget->allocation.height > TIME_EDITOR_HEIGHT) {
+            alloc.height = TIME_EDITOR_HEIGHT;
+            alloc.y +=
+                (widget->allocation.height - TIME_EDITOR_HEIGHT) / 2;
+
+        } else
+            alloc.height = widget->allocation.height;
+
+        gtk_widget_size_allocate(priv->frame, &alloc);
+}
+
+static gboolean hildon_time_editor_entry_keypress(GtkWidget * widget,
+                                                  GdkEventKey * event,
+                                                  gpointer data)
+{
+    HildonTimeEditor *editor;
+    HildonTimeEditorPrivate *priv;
+    gint pos;
+
+    g_return_val_if_fail(widget, FALSE);
+    g_return_val_if_fail(event, FALSE);
+    g_return_val_if_fail(data, FALSE);
+
+    editor = HILDON_TIME_EDITOR(data);
+    priv = HILDON_TIME_EDITOR_GET_PRIVATE(editor);
+
+    pos = gtk_editable_get_position(GTK_EDITABLE(widget));
+
+    if (event->keyval == GDK_KP_Enter || event->keyval == GDK_Return) {
+        /* Check that we have correct values in entries */
+        hildon_time_editor_entry_activate(widget, data);
+        _gtk_button_set_depressed(GTK_BUTTON(priv->iconbutton), TRUE);
+        hildon_time_editor_icon_clicked(widget, data);
+        _gtk_button_set_depressed(GTK_BUTTON(priv->iconbutton), FALSE);
+    }
+
+    /* We don't want wrap */
+    if (event->keyval == GDK_KP_Left || event->keyval == GDK_Left) {
+        if (pos == 0 && widget == priv->h_entry) {
+            return TRUE;
+        }
+    }
+
+    if (event->keyval == GDK_KP_Right || event->keyval == GDK_Right) {
+        if (pos >= strlen(GTK_ENTRY(widget)->text)) {
+            if ((widget == priv->m_entry
+                 && !GTK_WIDGET_REALIZED(priv->s_entry))
+                || (widget == priv->s_entry
+                    && GTK_WIDGET_REALIZED(priv->s_entry))) {
+                return TRUE;
+            }
+        }
+    }
+
+    /* numeric key pressed */
+    if (event->keyval >= GDK_0 && event->keyval <= GDK_9) {
+        GtkWidgetClass *c = GTK_WIDGET_GET_CLASS(widget);
+
+        c->key_press_event(widget, event);
+
+        /* Set time values to our internal struct */
+        g_snprintf(priv->h_time, 4, "%s", GTK_ENTRY(priv->h_entry)->text);
+        g_snprintf(priv->m_time, 4, "%s", GTK_ENTRY(priv->m_entry)->text);
+        g_snprintf(priv->s_time, 4, "%s", GTK_ENTRY(priv->s_entry)->text);
+
+        return TRUE;
+    }
+    /* tab pressed in hour entry */
+    else if (widget == priv->h_entry && (event->keyval == GDK_Tab ||
+                   event->keyval == GDK_KP_Tab)) {
+        gtk_widget_grab_focus(priv->m_entry);
+        return TRUE;
+    }
+    /* tab pressed in minute entry */
+    else if (widget == priv->m_entry && (event->keyval == GDK_Tab ||
+                   event->keyval == GDK_KP_Tab)) {
+        if (priv->show_s)
+            gtk_widget_grab_focus(priv->s_entry);
+        else
+            gtk_widget_grab_focus(priv->h_entry);
+        return TRUE;
+    }
+    /* tab pressed in second entry */
+    else if (widget == priv->s_entry && (event->keyval == GDK_Tab ||
+                   event->keyval == GDK_KP_Tab)) {
+        gtk_widget_grab_focus(priv->h_entry);
+        return TRUE;
+    }
+    /* left tab pressed in second entry */
+    else if (widget == priv->s_entry &&
+             event->keyval == GDK_ISO_Left_Tab) {
+        gtk_widget_grab_focus(priv->m_entry);
+        return TRUE;
+    }
+    /* left tab pressed in minute entry */
+    else if (widget == priv->m_entry &&
+             event->keyval == GDK_ISO_Left_Tab) {
+        gtk_widget_grab_focus(priv->h_entry);
+        return TRUE;
+    }
+    /* left tab pressed in hour entry */
+    else if (widget == priv->h_entry &&
+             event->keyval == GDK_ISO_Left_Tab) {
+        if (priv->show_s)
+            gtk_widget_grab_focus(priv->s_entry);
+        else
+            gtk_widget_grab_focus(priv->m_entry);
+        return TRUE;
+    }
+    /* right arrow pressed in hour entry */
+    else if (widget == priv->h_entry &&
+             (event->keyval == GDK_Right || event->keyval == GDK_KP_Right)
+             && pos >= GTK_ENTRY(priv->h_entry)->text_length) {
+        gtk_widget_grab_focus(priv->m_entry);
+        gtk_editable_set_position(GTK_EDITABLE(priv->m_entry), 0);
+        return TRUE;
+    }
+    /* right arrow pressed in minute entry */
+    else if (widget == priv->m_entry &&
+             (event->keyval == GDK_Right || event->keyval == GDK_KP_Right)
+             && pos >= GTK_ENTRY(priv->m_entry)->text_length) {
+        if (priv->show_s) {
+            gtk_widget_grab_focus(priv->s_entry);
+            gtk_editable_set_position(GTK_EDITABLE(priv->s_entry), 0);
+        } else {
+            gtk_widget_grab_focus(priv->h_entry);
+            gtk_editable_set_position(GTK_EDITABLE(priv->h_entry), 0);
+        }
+        return TRUE;
+    }
+    /* right arrow pressed in second entry */
+    else if (widget == priv->s_entry &&
+             (event->keyval == GDK_Right || event->keyval == GDK_KP_Right)
+             && pos >= GTK_ENTRY(priv->s_entry)->text_length) {
+        gtk_widget_grab_focus(priv->h_entry);
+        gtk_editable_set_position(GTK_EDITABLE(priv->h_entry), 0);
+        return TRUE;
+    }
+    /* left arrow key pressed in hour entry */
+    else if (widget == priv->h_entry &&
+             (event->keyval == GDK_Left || event->keyval == GDK_KP_Left) &&
+             pos <= 0) {
+        if (priv->show_s) {
+            gtk_widget_grab_focus(priv->s_entry);
+            gtk_editable_set_position(GTK_EDITABLE(priv->s_entry), -1);
+        } else {
+            gtk_widget_grab_focus(priv->m_entry);
+            gtk_editable_set_position(GTK_EDITABLE(priv->m_entry), -1);
+        }
+        return TRUE;
+    }
+    /* left arrow key pressed in minute entry */
+    else if (widget == priv->m_entry &&
+             (event->keyval == GDK_Left || event->keyval == GDK_KP_Left) &&
+             pos <= 0) {
+        gtk_widget_grab_focus(priv->h_entry);
+        gtk_editable_set_position(GTK_EDITABLE(priv->h_entry), -1);
+        return TRUE;
+    }
+    /* left arrow key pressed in seconds entry */
+    else if (widget == priv->s_entry &&
+             (event->keyval == GDK_Left || event->keyval == GDK_KP_Left) &&
+             pos <= 0) {
+        gtk_widget_grab_focus(priv->m_entry);
+        gtk_editable_set_position(GTK_EDITABLE(priv->m_entry), -1);
+        return TRUE;
+    }
+    /* pass other arrow key presses and backspace and del onwards */
+    else if (event->keyval == GDK_Left || event->keyval == GDK_KP_Left ||
+             event->keyval == GDK_Right || event->keyval == GDK_KP_Right ||
+             event->keyval == GDK_Up || event->keyval == GDK_KP_Up ||
+             event->keyval == GDK_Down || event->keyval == GDK_KP_Down ||
+             event->keyval == GDK_BackSpace || event->keyval == GDK_Delete
+             || event->keyval == GDK_KP_Delete)
+        return FALSE;   /* pass the keypress on */
+
+    /* ingore other keys */
+    return TRUE;
+}
+
+/**
+ * hildon_time_editor_show_seconds:
+ * @editor: The #HildonTimeEditor.
+ * @enable: Enable or disable showing of seconds.
+ *
+ * This function shows or hides the seconds field.
+ *
+ **/
+void hildon_time_editor_show_seconds(HildonTimeEditor * editor,
+                                     gboolean enable)
+{
+    HildonTimeEditorPrivate *priv;
+
+    g_return_if_fail(editor);
+
+    priv = HILDON_TIME_EDITOR_GET_PRIVATE(editor);
+
+    if (!priv->show_s && enable) {
+        priv->show_s = TRUE;
+
+        gtk_widget_show(priv->s_entry);
+        gtk_widget_show(priv->label2);
+        
+    } else if (priv->show_s && !enable) {
+
+        gtk_widget_hide(priv->s_entry);
+        gtk_widget_hide(priv->label2);
+
+        priv->show_s = FALSE;
+    } else
+        return;
+
+    gtk_widget_queue_resize(GTK_WIDGET(editor));
+}
+
+/**
+ * hildon_time_editor_enable_duration_mode:
+ * @editor: The #HildonTimeEditor.
+ * @enable: Enable or disable duration editor mode
+ *
+ * This function sets the duration editor mode in which the maximum hours
+ * is 99 and the #HildonTimePicker is disabled.
+ *
+ **/
+void hildon_time_editor_enable_duration_mode(HildonTimeEditor * editor,
+                                             gboolean enable)
+{
+    HildonTimeEditorPrivate *priv;
+
+    g_return_if_fail(editor);
+
+    priv = HILDON_TIME_EDITOR_GET_PRIVATE(editor);
+
+    /* switch to duration editor mode */
+    if (enable && !priv->duration_mode) {
+        priv->duration_mode = enable;
+        hildon_time_editor_set_duration_range(editor, MIN_DURATION,
+                                              MAX_DURATION);
+
+        if (!priv->clock_24h)
+            gtk_widget_hide(GTK_WIDGET(priv->ampm));
+
+        gtk_widget_hide(GTK_WIDGET(priv->eventbox));
+        gtk_widget_hide(GTK_WIDGET(priv->icon));
+
+        /* Show seconds for duration editor */
+        hildon_time_editor_show_seconds(editor, TRUE);
+    }
+    /* switch to time editor mode */
+    else if (!enable && priv->duration_mode) {
+        priv->duration_mode = enable;
+
+        if (!priv->clock_24h)
+            gtk_widget_show(GTK_WIDGET(priv->ampm));
+
+        gtk_widget_show(GTK_WIDGET(priv->eventbox));
+        gtk_widget_show(GTK_WIDGET(priv->icon));
+    }
+    gtk_widget_queue_resize(GTK_WIDGET(editor));
+}
+
diff --git a/hildon-widgets/hildon-time-editor.h b/hildon-widgets/hildon-time-editor.h
new file mode 100644 (file)
index 0000000..70ceb26
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __HILDON_TIME_EDITOR_H__
+#define __HILDON_TIME_EDITOR_H__
+
+#include <gtk/gtkcontainer.h>
+
+G_BEGIN_DECLS
+#define HILDON_TYPE_TIME_EDITOR ( hildon_time_editor_get_type() )
+#define HILDON_TIME_EDITOR(obj) (GTK_CHECK_CAST (obj,\
+        HILDON_TYPE_TIME_EDITOR, HildonTimeEditor))
+#define HILDON_TIME_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass),\
+        HILDON_TYPE_TIME_EDITOR, HildonTimeEditorClass))
+#define HILDON_IS_TIME_EDITOR(obj) (GTK_CHECK_TYPE (obj,\
+        HILDON_TYPE_TIME_EDITOR))
+#define HILDON_IS_TIME_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass),\
+        HILDON_TYPE_TIME_EDITOR))
+typedef struct _HildonTimeEditor HildonTimeEditor;
+typedef struct _HildonTimeEditorClass HildonTimeEditorClass;
+
+struct _HildonTimeEditor {
+    GtkContainer parent;
+};
+
+struct _HildonTimeEditorClass {
+    GtkContainerClass parent_class;
+};
+
+/**
+ * HildonTimeEditorField:
+ * @HILDON_TIME_EDITOR_HOUR_FIELD: select and highlight hour field.
+ * @HILDON_TIME_EDITOR_MINUTE_FIELD: select and highlight minute field.
+ * @HILDON_TIME_EDITOR_SECOND_FIELD: select and highlight second field.
+ *
+ * These values are used to indicate which editor field should be highlighted.
+ */
+typedef enum {
+    HILDON_TIME_EDITOR_HOUR_FIELD,
+    HILDON_TIME_EDITOR_MINUTE_FIELD,
+    HILDON_TIME_EDITOR_SECOND_FIELD
+} HildonTimeEditorField;
+
+GType hildon_time_editor_get_type(void);
+GtkWidget *hildon_time_editor_new(void);
+
+void hildon_time_editor_set_time(HildonTimeEditor * editor, guint hours,
+                                 guint minutes, guint seconds);
+void hildon_time_editor_get_time(HildonTimeEditor * editor, guint * hours,
+                                 guint * minutes, guint * seconds);
+
+void hildon_time_editor_show_seconds(HildonTimeEditor * editor,
+                                     gboolean enable);
+void hildon_time_editor_enable_duration_mode(HildonTimeEditor * editor,
+                                             gboolean enable);
+
+void hildon_time_editor_set_duration_range(HildonTimeEditor * editor,
+                                           guint min_seconds,
+                                           guint max_seconds);
+void hildon_time_editor_get_duration_range(HildonTimeEditor * editor,
+                                           guint * min_seconds,
+                                           guint * max_seconds);
+
+
+G_END_DECLS
+#endif
diff --git a/hildon-widgets/hildon-time-picker.c b/hildon-widgets/hildon-time-picker.c
new file mode 100644 (file)
index 0000000..d9cf297
--- /dev/null
@@ -0,0 +1,1173 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/*
+ * @file hildon-time-picker.c
+ * 
+ * This file implements the HildonTimePicker widget. This widget
+ * is used with HildonTimeEditor widget to set time.
+ */
+
+/* HILDON DOC
+ * @shortdesc: TimePicker is a widget for setting a time.
+ * @longdesc: The TimePicker contains two fields for setting the
+ * time. Arrow buttons can be used to increment and decrement time. If
+ * specified in systems locale setting AM/PM button is displayed.
+ * 
+ * @seealso: #HildonTimeEditor
+ */
+
+#include <hildon-widgets/hildon-time-picker.h>
+#include <hildon-widgets/hildon-defines.h>
+#include <gtk/gtk.h>
+#include <gdk/gdkkeysyms.h>
+#include <gdk/gdk.h>
+#include <time.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <langinfo.h>
+#include <libintl.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#define _(String) dgettext(PACKAGE, String)
+
+#define HILDON_TIME_PICKER_GET_PRIVATE(obj) \
+    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
+     HILDON_TYPE_TIME_PICKER, HildonTimePickerPriv));
+
+typedef struct _HildonTimePickerPriv HildonTimePickerPriv;
+
+/* 
+ * Pointer parent class 
+ */
+static GtkDialogClass *parent_class;
+
+/*< private >*/
+struct _HildonTimePickerPriv
+{
+    GtkWidget *ht_label;
+    GtkWidget *hs_label;
+    GtkWidget *mt_label;
+    GtkWidget *ms_label;
+    GtkWidget *h_frame;
+    GtkWidget *m_frame;
+    GtkWidget *ampm_frame;
+    GtkWidget *h_ebox;
+    GtkWidget *mt_ebox;
+    GtkWidget *ms_ebox;
+    GtkWidget *h_up;
+    GtkWidget *h_down;
+    GtkWidget *mt_up;
+    GtkWidget *mt_down;
+    GtkWidget *ms_up;
+    GtkWidget *ms_down;
+    GtkWidget *d_label;
+
+    /* Localisation stuff */
+    GtkWidget *ampm_button;   /* Eventbox to hold label */
+    GtkWidget *ampm_label;    /* Label to hold am or pm symbol */
+
+    gboolean ampm_pos_after;  /* Position eventbox before of after clock */
+    gboolean clock_24h; /* 12h or 24h time */
+    gboolean am;        /* Indicates before or after noon */
+
+    gchar *am_symbol;   /* Local symbol for am */
+    gchar *pm_symbol;   /* Local symbol for pm */
+
+    /* These are for timeout */
+    guint id;   /* key repeat timer id */
+    guint start_id;     /* key repeat start timer id */
+    GtkWidget *press_button;
+};
+
+/* 
+ * Private function prototype definitions 
+ */
+static void
+hildon_time_picker_class_init (HildonTimePickerClass *picker_class);
+
+static void
+hildon_time_picker_init (HildonTimePicker *picker);
+
+static void
+hildon_time_picker_finalize (GObject *obj_self);
+
+static gboolean
+hildon_time_picker_key_press (GtkWidget *widget, GdkEventKey *event,
+                              gpointer data);
+
+static void
+hildon_time_picker_clicked (GtkButton *button, gpointer data);
+
+static void
+hildon_time_picker_add_style (void);
+
+static gboolean
+hildon_time_picker_timeout (gpointer data);
+
+static gboolean
+hildon_time_picker_start_timer (gpointer data);
+
+static gboolean
+hildon_time_picker_button_press (GtkWidget *widget, GdkEventButton *event,
+                                 gpointer data);
+
+static gboolean
+hildon_time_picker_button_release (GtkWidget *widget, GdkEventButton *event,
+                                   gpointer data);
+static gboolean
+hildon_time_picker_focus_in (GtkWidget *widget, GdkEventFocus *event,
+                             gpointer data);
+static void
+hildon_time_picker_handle_hours (GtkButton *button, HildonTimePicker *tp);
+
+static gboolean
+hildon_time_picker_check_locale (HildonTimePicker *picker);
+
+static gboolean
+hildon_time_picker_ampm_clicked (GtkWidget *widget, GdkEventButton *event,
+                                 gpointer data);
+
+static gboolean
+hildon_time_picker_change_ampm_label (HildonTimePicker *picker);
+
+/* 
+ * Public functions start here
+ */
+GType hildon_time_picker_get_type(void)
+{
+    static GType picker_type = 0;
+
+    if (!picker_type)
+      {
+        static const GTypeInfo picker_info =
+          {
+            sizeof (HildonTimePickerClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_time_picker_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof (HildonTimePicker),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_time_picker_init,
+          };
+        picker_type = g_type_register_static (GTK_TYPE_DIALOG,
+                                             "HildonTimePicker",
+                                             &picker_info, 0);
+      }
+    return picker_type;
+}
+
+/**
+ * hildon_time_picker_new:
+ * @parent: parent window.
+ *
+ * Hildon Time Picker shows time picker dialog. Close button is placed
+ * in dialog's action area and time picker is placed in dialogs vbox.
+ * Actual time picker consists two #GtkLabel fields one for hour and
+ * one for minutes, arrow buttons and an AM/PM button. A : is placed
+ * between hour and minute fields.
+ *
+ * Return value: pointer to a new #HildonTimePicker widget.
+ **/
+GtkWidget *hildon_time_picker_new(GtkWindow * parent)
+{
+    GtkWidget *widget = g_object_new (HILDON_TYPE_TIME_PICKER, NULL);
+
+    if (parent)
+      {
+        gtk_window_set_transient_for (GTK_WINDOW(widget), parent);
+      }
+
+    return GTK_WIDGET (widget);
+}
+
+/**
+ * hildon_time_picker_set_time:
+ * @picker: the #HildonTimePicker widget.
+ * @hours: hours
+ * @minutes: minutes
+ *
+ * Sets the time of the #HildonTimePicker widget.
+ **/
+void hildon_time_picker_set_time(HildonTimePicker * picker,
+                                 guint hours, guint minutes)
+{
+    HildonTimePickerPriv *priv;
+    gchar h_str[3], m_str[3], mt_str[2], ms_str[2], ht_str[2], hs_str[2];
+
+    g_return_if_fail (picker);
+
+    priv = HILDON_TIME_PICKER_GET_PRIVATE (picker);
+
+    if ((hours >= 0) && (hours < 24) && (minutes >= 0) && (minutes < 60))
+      {
+        /* If we are using 12h clock, convert the time and check if it's
+           after or before noon */
+        if (!priv->clock_24h)
+          {
+            if (hours > 12)
+              {
+                priv->am = FALSE;
+                hours = hours - 12;
+              }
+            else if (hours < 12)
+              {
+                priv->am = TRUE;
+                if (hours == 0)
+                  hours = 12;
+              }
+            else if (hours == 12)
+                priv->am = FALSE;
+            gtk_label_set_text (GTK_LABEL (priv->ampm_label),
+                                priv->am ? priv->am_symbol : priv->pm_symbol);
+          }
+
+        sprintf (h_str, "%02d", hours);
+        sprintf (m_str, "%02d", minutes);
+
+        mt_str[0] = m_str[0];
+        ms_str[0] = m_str[1];
+        ht_str[0] = h_str[0];
+        hs_str[0] = h_str[1];
+        mt_str[1] = ms_str[1] = ht_str[1] = hs_str[1] = '\0';
+
+        gtk_label_set_text (GTK_LABEL (priv->ht_label), ht_str);
+        gtk_label_set_text (GTK_LABEL (priv->hs_label), hs_str);
+        gtk_label_set_text (GTK_LABEL (priv->mt_label), mt_str);
+        gtk_label_set_text (GTK_LABEL (priv->ms_label), ms_str);
+      }
+}
+
+/**
+ * hildon_time_picker_get_time:
+ * @picker: the #HildonTimePicker widget.
+ * @hours: hours
+ * @minutes: minutes
+ *
+ * Gets the time of the #HildonTimePicker widget.
+ **/
+void hildon_time_picker_get_time(HildonTimePicker * picker,
+                                 guint * hours, guint * minutes)
+{
+    HildonTimePickerPriv *priv;
+
+    g_return_if_fail (picker);
+    g_return_if_fail (hours);
+    g_return_if_fail (minutes);
+
+    priv = HILDON_TIME_PICKER_GET_PRIVATE (picker);
+
+    *hours = 10 * atoi (gtk_label_get_text (GTK_LABEL (priv->ht_label))) +
+        atoi (gtk_label_get_text (GTK_LABEL (priv->hs_label)));
+    *minutes = 10 * atoi (gtk_label_get_text (GTK_LABEL (priv->mt_label))) +
+        atoi (gtk_label_get_text (GTK_LABEL (priv->ms_label)));
+
+    /* If we use 12h clock, we convert time to 24h time, because all time
+       related APIs use 24h clock */
+    if (!priv->clock_24h && !priv->am)
+      {
+        if (*hours != 12)
+          *hours += 12;
+      }
+    if (!priv->clock_24h && *hours == 12 && priv->am)
+      *hours = 0;
+}
+
+/*
+ * Private functions start here
+ */
+
+static void
+hildon_time_picker_class_init(HildonTimePickerClass * picker_class)
+{
+    GObjectClass *object_class = G_OBJECT_CLASS (picker_class);
+    parent_class = g_type_class_peek_parent (picker_class);
+    object_class->finalize = hildon_time_picker_finalize;
+
+    g_type_class_add_private (picker_class, sizeof (HildonTimePickerPriv));
+    hildon_time_picker_add_style();
+}
+
+static void hildon_time_picker_init(HildonTimePicker * picker)
+{
+    HildonTimePickerPriv *priv;
+    GtkDialog *dlg;
+    GtkRequisition req;
+    PangoFontDescription *font;
+    GtkWidget *h_box, *hl_box, *ml_box, *mmain_box, *mup_box, *mmid_box,
+              *mdown_box, *w_box, *ampm_box, *event_box, *event_label;
+    GtkWidget *hu_img, *hd_img, *mtu_img, *mtd_img, *msu_img, *msd_img;
+    GtkSizeGroup *sgroup;
+    struct tm *local;
+    time_t stamp;
+
+    gint px, py;
+
+    priv = HILDON_TIME_PICKER_GET_PRIVATE (picker);
+
+    priv->ampm_pos_after = TRUE;
+    priv->press_button = NULL;
+    priv->id = 0;
+
+    dlg = GTK_DIALOG (picker);
+    gtk_dialog_set_has_separator (dlg, FALSE);
+
+    priv->ht_label = gtk_label_new(NULL);
+    priv->hs_label = gtk_label_new(NULL);
+    priv->mt_label = gtk_label_new(NULL);
+    priv->ms_label = gtk_label_new(NULL);
+    priv->d_label = gtk_label_new (":");
+    priv->ampm_label = gtk_label_new (NULL);
+    event_label = gtk_label_new (NULL);
+
+/* +3/+1 -- Hildon specifications --
+ * Forcing to the specification pixel cordinates
+ */
+    px = py = 0;
+    gtk_misc_set_padding (GTK_MISC (priv->ht_label), 3, py + 1);
+    gtk_misc_set_padding (GTK_MISC (priv->hs_label), 3, py + 1);
+
+    gtk_misc_set_padding (GTK_MISC (priv->mt_label), 3, py + 1);
+    gtk_misc_set_padding (GTK_MISC (priv->ms_label), 3, py + 1);
+
+    gtk_misc_set_padding (GTK_MISC (priv->d_label), 0, py + 1);
+
+    priv->h_frame = gtk_frame_new (NULL);
+    priv->m_frame = gtk_frame_new (NULL);
+    priv->ampm_frame = gtk_frame_new (NULL);
+
+    priv->h_ebox = gtk_event_box_new();
+    priv->mt_ebox = gtk_event_box_new();
+    priv->ms_ebox = gtk_event_box_new();
+    priv->ampm_button = gtk_event_box_new();
+
+    GTK_WIDGET_SET_FLAGS (priv->h_ebox, GTK_CAN_FOCUS);
+    GTK_WIDGET_SET_FLAGS (priv->mt_ebox, GTK_CAN_FOCUS);
+    GTK_WIDGET_SET_FLAGS (priv->ms_ebox, GTK_CAN_FOCUS);
+    GTK_WIDGET_SET_FLAGS (priv->ampm_button, GTK_CAN_FOCUS);
+
+    gtk_widget_set_name (priv->ht_label, "timepickerlabel");
+    gtk_widget_set_name (priv->hs_label, "timepickerlabel");
+    gtk_widget_set_name (priv->mt_label, "timepickerlabel");
+    gtk_widget_set_name (priv->ms_label, "timepickerlabel");
+
+    gtk_widget_set_name (priv->h_ebox, "timepickerebox");
+    gtk_widget_set_name (priv->mt_ebox, "timepickerebox");
+    gtk_widget_set_name (priv->ms_ebox, "timepickerebox");
+    gtk_widget_set_name (priv->ampm_button, "timepickerebox");
+
+    gtk_widget_set_name (priv->h_frame, "numberframe");
+    gtk_widget_set_name (priv->m_frame, "numberframe");
+    
+    gtk_widget_set_name (priv->ampm_frame, "am_pm_frame");
+
+    hl_box = gtk_hbox_new (FALSE, 0);
+    ml_box = gtk_hbox_new (FALSE, 0);
+    ampm_box = gtk_vbox_new (FALSE, 0);
+
+    /* Hour box */
+    gtk_box_pack_start (GTK_BOX (hl_box), priv->ht_label, FALSE, FALSE, 0);
+    gtk_box_pack_start (GTK_BOX (hl_box), priv->hs_label, FALSE, FALSE, 0);
+
+    gtk_container_add (GTK_CONTAINER (priv->h_frame), hl_box);
+    gtk_container_add (GTK_CONTAINER (priv->h_ebox), priv->h_frame);
+
+    /* Minutes box */
+    gtk_box_pack_start (GTK_BOX (ml_box), priv->mt_ebox, FALSE, FALSE, 0);
+    gtk_box_pack_start (GTK_BOX (ml_box), priv->ms_ebox, FALSE, FALSE, 0);
+
+    gtk_container_add (GTK_CONTAINER (priv->mt_ebox), priv->mt_label);
+    gtk_container_add (GTK_CONTAINER (priv->ms_ebox), priv->ms_label);
+
+    gtk_container_add (GTK_CONTAINER (priv->m_frame), ml_box);
+
+    /* am/pm box */
+    gtk_box_pack_start (GTK_BOX (ampm_box), priv->ampm_label, FALSE, FALSE,
+                        0);
+
+    gtk_container_add (GTK_CONTAINER (priv->ampm_frame), ampm_box);
+    gtk_container_add (GTK_CONTAINER (priv->ampm_button), priv->ampm_frame);
+
+    /* Check locale settings */
+    priv->clock_24h = hildon_time_picker_check_locale (picker);
+
+    stamp = time(NULL);
+    local = localtime(&stamp);
+    hildon_time_picker_set_time(picker, local->tm_hour, local->tm_min);
+
+    sgroup = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
+
+    priv->h_up = gtk_button_new();
+    priv->h_down = gtk_button_new();
+    priv->mt_up = gtk_button_new();
+    priv->mt_down = gtk_button_new();
+    priv->ms_up = gtk_button_new();
+    priv->ms_down = gtk_button_new();
+
+    hu_img = 
+        gtk_image_new_from_stock ("hildon-picker-up", HILDON_ICON_SIZE_WIDG);
+    hd_img =
+        gtk_image_new_from_stock ("hildon-picker-down", HILDON_ICON_SIZE_WIDG);
+    mtu_img =
+        gtk_image_new_from_stock ("hildon-picker-up", HILDON_ICON_SIZE_WIDG);
+    mtd_img =
+        gtk_image_new_from_stock ("hildon-picker-down", HILDON_ICON_SIZE_WIDG);
+    msu_img =
+        gtk_image_new_from_stock ("hildon-picker-up", HILDON_ICON_SIZE_WIDG);
+    msd_img =
+        gtk_image_new_from_stock ("hildon-picker-down", HILDON_ICON_SIZE_WIDG);
+
+    gtk_container_add (GTK_CONTAINER (priv->h_up), hu_img);
+    gtk_container_add (GTK_CONTAINER (priv->h_down), hd_img);
+    gtk_container_add (GTK_CONTAINER (priv->mt_up), mtu_img);
+    gtk_container_add (GTK_CONTAINER (priv->mt_down), mtd_img);
+    gtk_container_add (GTK_CONTAINER (priv->ms_up), msu_img);
+    gtk_container_add (GTK_CONTAINER (priv->ms_down), msd_img);
+
+    gtk_widget_set_name (priv->h_up, "hildon-arrow-item");
+    gtk_widget_set_name (priv->h_down, "hildon-arrow-item");
+    gtk_widget_set_name (priv->mt_up, "hildon-arrow-item");
+    gtk_widget_set_name (priv->mt_down, "hildon-arrow-item");
+    gtk_widget_set_name (priv->ms_up, "hildon-arrow-item");
+    gtk_widget_set_name (priv->ms_down, "hildon-arrow-item");
+
+    h_box = gtk_vbox_new (FALSE, 0);
+    mmain_box = gtk_vbox_new (FALSE, 0);
+    mup_box = gtk_hbox_new (TRUE, 0);
+    mmid_box = gtk_hbox_new (FALSE, 0);
+    mdown_box = gtk_hbox_new (TRUE, 0);
+    event_box = gtk_vbox_new (FALSE, 0);
+    w_box = gtk_hbox_new (FALSE, 0);
+
+    /* Add widgets to same group... makes am/pm eventbox look good */
+    gtk_size_group_add_widget (sgroup, priv->h_up);
+    gtk_size_group_add_widget (sgroup, priv->mt_up);
+    gtk_size_group_add_widget (sgroup, priv->ms_up);
+    gtk_size_group_add_widget (sgroup, event_label);
+
+    gtk_box_pack_start (GTK_BOX (h_box), priv->h_up, FALSE, FALSE, 0);
+    gtk_box_pack_start (GTK_BOX (h_box), priv->h_ebox, FALSE, FALSE, 0);
+    gtk_box_pack_start (GTK_BOX (h_box), priv->h_down, FALSE, FALSE, 0);
+
+    gtk_box_pack_start (GTK_BOX (mmain_box), mup_box, FALSE, FALSE, 0);
+    gtk_box_pack_start (GTK_BOX (mmain_box), mmid_box, FALSE, FALSE, 0);
+    gtk_box_pack_start (GTK_BOX (mmain_box), mdown_box, FALSE, FALSE, 0);
+
+    gtk_box_pack_start (GTK_BOX (event_box), event_label, FALSE, FALSE, 0);
+    gtk_box_pack_start (GTK_BOX (event_box), priv->ampm_button, FALSE, FALSE, 
+                        0);
+
+    gtk_box_pack_start (GTK_BOX (mup_box), priv->mt_up, FALSE, FALSE, 0);
+    gtk_box_pack_start (GTK_BOX (mup_box), priv->ms_up, FALSE, FALSE, 0);
+
+    gtk_box_pack_start (GTK_BOX (mmid_box), priv->m_frame, FALSE, FALSE, 0);
+    gtk_box_pack_start (GTK_BOX (mdown_box), priv->mt_down, FALSE, FALSE, 0);
+    gtk_box_pack_start (GTK_BOX (mdown_box), priv->ms_down, FALSE, FALSE, 0);
+
+    /* Pack am/pm eventbox before time fields if locale says so */
+    if (!priv->clock_24h && !priv->ampm_pos_after)
+        gtk_box_pack_start (GTK_BOX (w_box), event_box, FALSE, FALSE, 12);
+
+    /* Pack other stuff */
+    gtk_box_pack_start (GTK_BOX (w_box), h_box, FALSE, FALSE, 0);
+    gtk_box_pack_start (GTK_BOX (w_box), priv->d_label, FALSE, FALSE, 1);
+    gtk_box_pack_start (GTK_BOX (w_box), mmain_box, FALSE, FALSE, 0);
+
+    /* Pack am/pm eventbox after time fields if locale says so */
+    if (!priv->clock_24h && priv->ampm_pos_after)
+        gtk_box_pack_start (GTK_BOX (w_box), event_box, FALSE, FALSE, 12);
+
+    gtk_box_pack_start (GTK_BOX (dlg->vbox), w_box, FALSE, FALSE, 0);
+
+    gtk_widget_show_all (dlg->vbox);
+    gtk_dialog_add_button (dlg, _("ecdg_bd_time_picker_close"),
+                           GTK_RESPONSE_OK);
+
+    g_signal_connect (GTK_OBJECT (priv->h_up), "clicked",
+                      G_CALLBACK (hildon_time_picker_clicked), picker);
+    g_signal_connect (GTK_OBJECT (priv->h_up), "button-press-event",
+                      G_CALLBACK (hildon_time_picker_button_press), picker);
+    g_signal_connect (GTK_OBJECT (priv->h_up), "button-release-event",
+                      G_CALLBACK (hildon_time_picker_button_release), picker);
+
+    g_signal_connect (GTK_OBJECT (priv->h_down), "clicked",
+                      G_CALLBACK (hildon_time_picker_clicked), picker);
+    g_signal_connect (GTK_OBJECT (priv->h_down), "button-press-event",
+                      G_CALLBACK (hildon_time_picker_button_press), picker);
+    g_signal_connect (GTK_OBJECT (priv->h_down), "button-release-event",
+                      G_CALLBACK (hildon_time_picker_button_release), picker);
+
+    g_signal_connect (GTK_OBJECT (priv->mt_up), "clicked",
+                      G_CALLBACK (hildon_time_picker_clicked), picker);
+    g_signal_connect (GTK_OBJECT (priv->mt_up), "button-press-event",
+                      G_CALLBACK (hildon_time_picker_button_press), picker);
+    g_signal_connect (GTK_OBJECT (priv->mt_up), "button-release-event",
+                      G_CALLBACK (hildon_time_picker_button_release), picker);
+
+    g_signal_connect (GTK_OBJECT (priv->mt_down), "clicked",
+                      G_CALLBACK (hildon_time_picker_clicked), picker);
+    g_signal_connect (GTK_OBJECT (priv->mt_down), "button-press-event",
+                      G_CALLBACK (hildon_time_picker_button_press), picker);
+    g_signal_connect (GTK_OBJECT (priv->mt_down), "button-release-event",
+                      G_CALLBACK (hildon_time_picker_button_release), picker);
+
+    g_signal_connect (GTK_OBJECT (priv->ms_up), "clicked",
+                      G_CALLBACK (hildon_time_picker_clicked), picker);
+    g_signal_connect (GTK_OBJECT (priv->ms_up), "button-press-event",
+                      G_CALLBACK (hildon_time_picker_button_press), picker);
+    g_signal_connect (GTK_OBJECT (priv->ms_up), "button-release-event",
+                      G_CALLBACK (hildon_time_picker_button_release), picker);
+
+    g_signal_connect (GTK_OBJECT (priv->ms_down), "clicked",
+                      G_CALLBACK (hildon_time_picker_clicked), picker);
+    g_signal_connect (GTK_OBJECT (priv->ms_down), "button-press-event",
+                      G_CALLBACK (hildon_time_picker_button_press), picker);
+    g_signal_connect (GTK_OBJECT (priv->ms_down), "button-release-event",
+                      G_CALLBACK (hildon_time_picker_button_release),picker);
+
+    g_signal_connect (GTK_OBJECT (priv->h_ebox), "focus-in-event",
+                      G_CALLBACK (hildon_time_picker_focus_in), picker);
+    g_signal_connect (GTK_OBJECT (priv->mt_ebox), "focus-in-event",
+                      G_CALLBACK (hildon_time_picker_focus_in), picker);
+    g_signal_connect (GTK_OBJECT (priv->ms_ebox), "focus-in-event",
+                      G_CALLBACK (hildon_time_picker_focus_in), picker);
+    g_signal_connect (GTK_OBJECT (priv->ampm_button), "focus-in-event",
+                      G_CALLBACK (hildon_time_picker_focus_in), picker);
+
+    g_signal_connect (GTK_OBJECT (priv->h_ebox), "key-press-event",
+                      G_CALLBACK (hildon_time_picker_key_press), picker);
+    g_signal_connect (GTK_OBJECT (priv->mt_ebox), "key-press-event",
+                      G_CALLBACK (hildon_time_picker_key_press), picker);
+    g_signal_connect (GTK_OBJECT (priv->ms_ebox), "key-press-event",
+                      G_CALLBACK (hildon_time_picker_key_press), picker);
+    g_signal_connect (GTK_OBJECT (priv->ampm_button), "key-press-event",
+                      G_CALLBACK (hildon_time_picker_key_press), picker);
+
+    g_signal_connect (GTK_OBJECT (priv->h_ebox), "button-press-event",
+                      G_CALLBACK (hildon_time_picker_button_press), picker);
+    g_signal_connect (GTK_OBJECT (priv->mt_ebox), "button-press-event",
+                      G_CALLBACK (hildon_time_picker_button_press), picker);
+    g_signal_connect (GTK_OBJECT (priv->ms_ebox), "button-press-event",
+                      G_CALLBACK (hildon_time_picker_button_press), picker);
+    g_signal_connect (GTK_OBJECT (priv->ampm_button), "button-press-event",
+                      G_CALLBACK (hildon_time_picker_ampm_clicked), picker);
+
+    gtk_widget_realize (GTK_WIDGET (dlg));
+    gdk_window_set_decorations (GTK_WIDGET (dlg)->window, GDK_DECOR_BORDER);
+    gtk_window_set_modal (GTK_WINDOW (dlg), FALSE);
+
+    font = pango_font_description_copy (priv->ht_label->style->font_desc);
+
+    pango_font_description_set_size (font, 34 * PANGO_SCALE);
+    gtk_widget_modify_font (priv->d_label, font);
+
+    pango_font_description_set_size (font, 42 * PANGO_SCALE);
+    gtk_widget_modify_font (priv->mt_label, font);
+    gtk_widget_modify_font (priv->ms_label, font);
+    gtk_widget_modify_font (priv->ht_label, font);
+    gtk_widget_modify_font (priv->hs_label, font);
+
+    gtk_widget_size_request (priv->ht_label, &req);
+    req.height += 1;
+    gtk_widget_set_size_request (priv->ht_label, req.width, req.height);
+
+    gtk_widget_size_request (priv->hs_label, &req);
+    req.height += 1;
+    gtk_widget_set_size_request (priv->hs_label, req.width, req.height);
+
+    gtk_widget_size_request (priv->mt_label, &req);
+    req.height += 1;
+    gtk_widget_set_size_request (priv->mt_label, req.width, req.height);
+
+    gtk_widget_size_request (priv->ms_label, &req);
+    req.height += 1;
+    gtk_widget_set_size_request (priv->ms_label, req.width, req.height);
+
+    pango_font_description_free (font);
+
+    gtk_widget_grab_focus (priv->h_ebox);
+
+}
+
+static void
+hildon_time_picker_finalize (GObject *obj_self)
+{
+    HildonTimePicker *picker;
+    HildonTimePickerPriv *priv;
+
+    picker = HILDON_TIME_PICKER (obj_self);
+    priv = HILDON_TIME_PICKER_GET_PRIVATE (picker);
+
+    /* free timers */
+    if (priv->start_id)
+        g_source_remove (priv->start_id);
+
+    if (priv->id)
+        g_source_remove (priv->id);
+
+    g_free (priv->am_symbol);
+    g_free (priv->pm_symbol);
+
+    /* Call parent class finalize, if have one */
+    if (G_OBJECT_CLASS (parent_class)->finalize)
+        G_OBJECT_CLASS (parent_class)->finalize(obj_self);
+}
+
+static gboolean
+hildon_time_picker_check_locale(HildonTimePicker *picker)
+{
+    HildonTimePickerPriv *priv;
+
+    priv = HILDON_TIME_PICKER_GET_PRIVATE (picker);
+
+    /* Now am/pm symbols always contain a copy. Value returned by
+        nl_langinfo must not be modified. */
+    priv->am_symbol = g_ascii_strdown (nl_langinfo (AM_STR), -1);
+    priv->pm_symbol = g_ascii_strdown (nl_langinfo (PM_STR), -1);
+
+    if (priv->am_symbol[0] == 0)
+        return TRUE;
+
+    /* Check what format am/pm time should be */
+    if (!strncmp (nl_langinfo (T_FMT_AMPM), "%p", 2))
+      priv->ampm_pos_after = FALSE;
+
+    return FALSE;
+}
+
+static gboolean
+hildon_time_picker_ampm_clicked(GtkWidget *widget, GdkEventButton *event,
+                                gpointer data)
+{
+    HildonTimePicker *picker;
+    HildonTimePickerPriv *priv;
+
+    g_return_val_if_fail (widget, FALSE);
+    g_return_val_if_fail (data, FALSE);
+
+    picker = HILDON_TIME_PICKER (data);
+    priv = HILDON_TIME_PICKER_GET_PRIVATE (picker);
+
+    gtk_widget_grab_focus (widget);
+    hildon_time_picker_change_ampm_label (picker);
+
+    return FALSE;
+}
+
+static gboolean
+hildon_time_picker_change_ampm_label(HildonTimePicker * picker)
+{
+    HildonTimePickerPriv *priv;
+
+    g_return_val_if_fail (picker, FALSE);
+    priv = HILDON_TIME_PICKER_GET_PRIVATE (picker);
+
+    if (priv->am)
+      {
+        gtk_label_set_text (GTK_LABEL (priv->ampm_label), priv->pm_symbol);
+        priv->am = FALSE;
+      }
+    else
+      {
+        gtk_label_set_text (GTK_LABEL (priv->ampm_label), priv->am_symbol);
+        priv->am = TRUE;
+      }
+    return TRUE;
+}
+
+static gboolean
+hildon_time_picker_key_press (GtkWidget *widget, GdkEventKey *event,
+                             gpointer data)
+{
+    HildonTimePicker *tp;
+    HildonTimePickerPriv *priv;
+
+    g_return_val_if_fail (data, FALSE);
+    g_return_val_if_fail (event, FALSE);
+    g_return_val_if_fail (widget, FALSE);
+
+    tp = HILDON_TIME_PICKER (data);
+    priv = HILDON_TIME_PICKER_GET_PRIVATE (tp);
+
+    /* If ESC pressed we should close dialog and not select value */
+
+    /* We don't want wrap */
+    if ((event->keyval == GDK_KP_Left || event->keyval == GDK_Left)
+        && (widget == priv->h_ebox))
+      {
+        return TRUE;
+      }
+    else if ((event->keyval == GDK_KP_Right || event->keyval == GDK_Right)
+            && (widget == priv->ampm_button))
+      {
+        return TRUE;
+      }
+
+    /* Handle ampm button */
+    if ((event->keyval == GDK_Up || event->keyval == GDK_Down)
+        && widget == priv->ampm_button)
+      {
+        hildon_time_picker_change_ampm_label (tp);
+        return TRUE;
+      }
+
+    switch (event->keyval)
+    {
+      case GDK_Left:
+        if (widget == priv->h_ebox)
+            gtk_widget_grab_focus (priv->ampm_button);
+        else if (widget == priv->ampm_button)
+            gtk_widget_grab_focus (priv->ms_ebox);
+        else if (widget == priv->ms_ebox)
+            gtk_widget_grab_focus (priv->mt_ebox);
+        else
+            gtk_widget_grab_focus (priv->h_ebox);
+
+        return TRUE;
+
+      case GDK_Right:
+        if (widget == priv->h_ebox)
+            gtk_widget_grab_focus (priv->mt_ebox);
+        else if (widget == priv->mt_ebox)
+            gtk_widget_grab_focus (priv->ms_ebox);
+        else if (widget == priv->ms_ebox)
+            gtk_widget_grab_focus (priv->ampm_button);
+        else
+            gtk_widget_grab_focus (priv->h_ebox);
+
+        return TRUE;
+
+      case GDK_Up:
+        if (widget == priv->h_ebox)
+            hildon_time_picker_clicked (GTK_BUTTON (priv->h_up), data);
+        if (widget == priv->mt_ebox)
+            hildon_time_picker_clicked (GTK_BUTTON (priv->mt_up), data);
+        if (widget == priv->ms_ebox)
+            hildon_time_picker_clicked (GTK_BUTTON (priv->ms_up), data);
+
+        return TRUE;
+
+      case GDK_Down:
+        if (widget == priv->h_ebox)
+            hildon_time_picker_clicked (GTK_BUTTON (priv->h_down), data);
+        if (widget == priv->mt_ebox)
+            hildon_time_picker_clicked (GTK_BUTTON (priv->mt_down), data);
+        if (widget == priv->ms_ebox)
+            hildon_time_picker_clicked (GTK_BUTTON (priv->ms_down), data);
+
+        return TRUE;
+
+      case GDK_Escape:
+        gtk_dialog_response (GTK_DIALOG (data), GTK_RESPONSE_REJECT);
+        return TRUE;
+
+      case GDK_KP_Enter:
+      case GDK_Return:
+        gtk_dialog_response (GTK_DIALOG (data), GTK_RESPONSE_ACCEPT);
+        return TRUE;
+
+      default:
+        return TRUE;
+    }
+
+    return FALSE;
+}
+
+static void
+hildon_time_picker_clicked (GtkButton *button, gpointer data)
+{
+    gchar new_val[3];
+    gint val, tval;
+    HildonTimePicker *tp;
+    HildonTimePickerPriv *priv;
+
+    g_return_if_fail (button);
+    g_return_if_fail (data);
+
+    tp = HILDON_TIME_PICKER (data);
+    priv = HILDON_TIME_PICKER_GET_PRIVATE (tp);
+
+    if (button == GTK_BUTTON (priv->h_up) ||
+        button == GTK_BUTTON (priv->h_down))
+      {
+        hildon_time_picker_handle_hours (button, tp);
+      }
+
+    if (button == GTK_BUTTON (priv->mt_up))
+      {
+        val = atoi (gtk_label_get_text (GTK_LABEL (priv->mt_label)));
+        val++;
+        if (val > 5)
+          {
+            val = 0;
+            hildon_time_picker_handle_hours (GTK_BUTTON (priv->h_up), tp);
+          }
+        sprintf (new_val, "%d", val);
+        gtk_label_set_text (GTK_LABEL (priv->mt_label), new_val);
+        gtk_widget_grab_focus (priv->mt_ebox);
+      }
+
+    if (button == GTK_BUTTON (priv->mt_down))
+      {
+        val = atoi (gtk_label_get_text (GTK_LABEL (priv->mt_label)));
+        val--;
+
+        if (val < 0)
+          {
+            val = 5;
+            hildon_time_picker_handle_hours (GTK_BUTTON (priv->h_down), tp);
+          }
+
+        sprintf (new_val, "%d", val);
+        gtk_label_set_text (GTK_LABEL (priv->mt_label), new_val);
+        gtk_widget_grab_focus (priv->mt_ebox);
+      }
+
+    if (button == GTK_BUTTON (priv->ms_up))
+      {
+        tval = atoi (gtk_label_get_text (GTK_LABEL (priv->mt_label)));
+        val = atoi (gtk_label_get_text (GTK_LABEL (priv->ms_label)));
+        val++;
+
+        if (val > 9)
+          {
+            val = 0;
+            tval++;
+
+            if (tval > 5)
+              {
+                tval = 0;
+                hildon_time_picker_handle_hours (GTK_BUTTON (priv->h_up), tp);
+              }
+            sprintf (new_val, "%d", tval);
+            gtk_label_set_text (GTK_LABEL (priv->mt_label), new_val);
+          }
+
+        sprintf (new_val, "%d", val);
+        gtk_label_set_text (GTK_LABEL (priv->ms_label), new_val);
+        gtk_widget_grab_focus (priv->ms_ebox);
+      }
+
+    if (button == GTK_BUTTON (priv->ms_down))
+      {
+        tval = atoi(gtk_label_get_text (GTK_LABEL (priv->mt_label)));
+        val = atoi(gtk_label_get_text (GTK_LABEL (priv->ms_label)));
+        val--;
+
+        if (val < 0)
+          {
+            val = 9;
+            tval--;
+
+            if (tval < 0)
+              {
+                tval = 5;
+                hildon_time_picker_handle_hours (GTK_BUTTON (priv->h_down),
+                                                 tp);
+              }
+            sprintf (new_val, "%d", tval);
+            gtk_label_set_text (GTK_LABEL (priv->mt_label), new_val);
+          }
+
+        sprintf (new_val, "%d", val);
+        gtk_label_set_text (GTK_LABEL (priv->ms_label), new_val);
+        gtk_widget_grab_focus (priv->ms_ebox);
+      }
+}
+
+static void
+hildon_time_picker_handle_hours (GtkButton *button, HildonTimePicker *tp)
+{
+    gchar new_val[3];
+    gint val;
+    HildonTimePickerPriv *priv;
+
+    g_return_if_fail (button);
+
+    priv = HILDON_TIME_PICKER_GET_PRIVATE (tp);
+
+    if (button == GTK_BUTTON (priv->h_up))
+      {
+        val = 10 * atoi (gtk_label_get_text (GTK_LABEL (priv->ht_label))) +
+            atoi (gtk_label_get_text (GTK_LABEL (priv->hs_label)));
+        val++;
+
+        if (priv->clock_24h && val > 23)
+            val = 0;
+        else if (!priv->clock_24h && val == 12 && priv->am)
+          {
+            gtk_label_set_text (GTK_LABEL (priv->ampm_label),
+                               priv->pm_symbol);
+            priv->am = FALSE;
+          }
+        else if (!priv->clock_24h && val == 12 && !priv->am)
+          {
+            gtk_label_set_text (GTK_LABEL (priv->ampm_label),
+                               priv->am_symbol);
+            priv->am = TRUE;
+          }
+        else if (!priv->clock_24h && val > 12)
+          val = 1;
+
+        sprintf (new_val, "%02d", val);
+        gtk_label_set_text (GTK_LABEL (priv->hs_label), &new_val[1]);
+        new_val[1] = '\0';
+        gtk_label_set_text (GTK_LABEL (priv->ht_label), new_val);
+        gtk_widget_grab_focus (priv->h_ebox);
+      }
+
+    if (button == GTK_BUTTON (priv->h_down))
+      {
+        val = 10 * atoi (gtk_label_get_text (GTK_LABEL (priv->ht_label))) +
+            atoi (gtk_label_get_text (GTK_LABEL (priv->hs_label)));
+        val--;
+
+        if (priv->clock_24h && val < 0)
+            val = 23;
+        else if (!priv->clock_24h && val == 11 && priv->am)
+          {
+            gtk_label_set_text (GTK_LABEL (priv->ampm_label),
+                                priv->pm_symbol);
+            priv->am = FALSE;
+          }
+        else if (!priv->clock_24h && val == 11 && !priv->am)
+          {
+            gtk_label_set_text (GTK_LABEL (priv->ampm_label),
+                                priv->am_symbol);
+            priv->am = TRUE;
+          }
+        else if (!priv->clock_24h && val < 1)
+            val = 12;
+
+        sprintf (new_val, "%02d", val);
+        gtk_label_set_text (GTK_LABEL (priv->hs_label), &new_val[1]);
+        new_val[1] = '\0';
+        gtk_label_set_text (GTK_LABEL (priv->ht_label), new_val);
+        gtk_widget_grab_focus (priv->h_ebox);
+      }
+}
+
+static void
+hildon_time_picker_add_style (void)
+{
+    gtk_rc_parse_string ("  style \"hildon-arrow-item\" {"
+                         "    xthickness = 0"
+                         "    ythickness = 0"
+                         "    engine \"pixmap\" {"
+                         "      image {"
+                         "        function = BOX"
+                         "      }"
+                         "    }"
+                         "  }"
+                         "  widget \"*.hildon-arrow-item\""
+                         "    style \"hildon-arrow-item\"");
+}
+
+static gboolean
+hildon_time_picker_timeout (gpointer data)
+{
+    HildonTimePicker *p;
+    HildonTimePickerPriv *priv;
+    GtkWidget *b;
+
+    if (!data)
+        return FALSE;
+
+    p = HILDON_TIME_PICKER (data);
+    priv = HILDON_TIME_PICKER_GET_PRIVATE (p);
+
+    b = priv->press_button;
+
+    if (b)
+      {
+        hildon_time_picker_clicked (GTK_BUTTON(b), data);
+        return TRUE;
+      }
+
+    priv->id = 0;
+    return FALSE;
+}
+
+static gboolean
+hildon_time_picker_start_timer (gpointer data)
+{
+    HildonTimePicker *p;
+    HildonTimePickerPriv *priv;
+    GtkSettings *settings;
+    guint interval;
+
+    if (!data)
+        return FALSE;
+
+    p = HILDON_TIME_PICKER (data);
+    priv = HILDON_TIME_PICKER_GET_PRIVATE (p);
+
+    settings = gtk_settings_get_default();
+    g_object_get (settings, "gtk-update-timeout", &interval, NULL);
+
+    if ((priv->press_button) && (priv->id == 0))
+        priv->id = g_timeout_add (interval, hildon_time_picker_timeout, data);
+
+    priv->start_id = 0;
+
+    return FALSE;
+}
+
+static gboolean
+hildon_time_picker_button_press (GtkWidget *widget, GdkEventButton *event,
+                                 gpointer data)
+{
+    HildonTimePicker *p;
+    HildonTimePickerPriv *priv;
+
+    g_return_val_if_fail (widget, FALSE);
+    g_return_val_if_fail (data, FALSE);
+
+    p = HILDON_TIME_PICKER (data);
+    priv = HILDON_TIME_PICKER_GET_PRIVATE (p);
+
+    if ((widget == priv->h_ebox) || (widget == priv->ms_ebox) ||
+        (widget == priv->mt_ebox))
+      {
+        gtk_widget_grab_focus(widget);
+        return FALSE;
+      }
+
+    if ((widget == priv->h_up) || (widget == priv->h_down)
+        || (widget == priv->mt_up) || (widget == priv->mt_down)
+        || (widget == priv->ms_up) || (priv->ms_down))
+      {
+        GtkSettings *settings;
+        guint interval;
+
+        settings = gtk_settings_get_default();
+        g_object_get (settings, "gtk-initial-timeout", &interval, NULL);
+
+        priv->press_button = widget;
+        if (priv->start_id != 0)
+            g_source_remove (priv->start_id);
+        priv->start_id =
+            g_timeout_add (interval, hildon_time_picker_start_timer, data);
+      }
+
+    if ((widget == priv->h_up) || (widget == priv->h_down))
+        gtk_widget_grab_focus (priv->h_ebox);
+    else if ((widget == priv->mt_up) || (widget == priv->mt_down))
+        gtk_widget_grab_focus (priv->mt_ebox);
+    else if ((widget == priv->ms_up) || (widget == priv->ms_down))
+        gtk_widget_grab_focus (priv->ms_ebox);
+
+    return FALSE;
+}
+
+static gboolean
+hildon_time_picker_button_release (GtkWidget *widget, GdkEventButton *event,
+                                   gpointer data)
+{
+    HildonTimePicker *p;
+    HildonTimePickerPriv *priv;
+
+    g_return_val_if_fail (widget, FALSE);
+    g_return_val_if_fail (data, FALSE);
+
+    p = HILDON_TIME_PICKER (data);
+    priv = HILDON_TIME_PICKER_GET_PRIVATE( p);
+
+    /* Setting this to NULL will result hanler to fail and return FALSE.
+       Timeout will be removed if FALSE is returned. */
+    priv->press_button = NULL;
+
+    return FALSE;
+}
+
+static gboolean
+hildon_time_picker_focus_in (GtkWidget *widget, GdkEventFocus *event,
+                             gpointer data)
+{
+    HildonTimePicker *p;
+    HildonTimePickerPriv *priv;
+
+    g_return_val_if_fail (widget, FALSE);
+    g_return_val_if_fail (data, FALSE);
+
+    p = HILDON_TIME_PICKER (data);
+    priv = HILDON_TIME_PICKER_GET_PRIVATE (p);
+
+    if (widget == priv->h_ebox)
+      {
+        gtk_widget_set_state (priv->h_ebox, GTK_STATE_SELECTED);
+        gtk_widget_set_state (priv->ht_label, GTK_STATE_SELECTED);
+        gtk_widget_set_state (priv->hs_label, GTK_STATE_SELECTED);
+        gtk_widget_set_state (priv->mt_ebox, GTK_STATE_NORMAL);
+        gtk_widget_set_state (priv->ms_ebox, GTK_STATE_NORMAL);
+        gtk_widget_set_state (priv->mt_label, GTK_STATE_NORMAL);
+        gtk_widget_set_state (priv->ms_label, GTK_STATE_NORMAL);
+        gtk_widget_set_state (priv->ampm_button, GTK_STATE_NORMAL);
+        gtk_widget_set_state (priv->ampm_label, GTK_STATE_NORMAL);
+      }
+    if (widget == priv->mt_ebox)
+      {
+        gtk_widget_set_state (priv->h_ebox, GTK_STATE_NORMAL);
+        gtk_widget_set_state (priv->ht_label, GTK_STATE_NORMAL);
+        gtk_widget_set_state (priv->hs_label, GTK_STATE_NORMAL);
+        gtk_widget_set_state (priv->mt_ebox, GTK_STATE_SELECTED);
+        gtk_widget_set_state (priv->ms_ebox, GTK_STATE_NORMAL);
+        gtk_widget_set_state (priv->mt_label, GTK_STATE_SELECTED);
+        gtk_widget_set_state (priv->ms_label, GTK_STATE_NORMAL);
+        gtk_widget_set_state (priv->ampm_button, GTK_STATE_NORMAL);
+        gtk_widget_set_state (priv->ampm_label, GTK_STATE_NORMAL);
+      }
+    if (widget == priv->ms_ebox)
+      {
+        gtk_widget_set_state (priv->h_ebox, GTK_STATE_NORMAL);
+        gtk_widget_set_state (priv->ht_label, GTK_STATE_NORMAL);
+        gtk_widget_set_state (priv->hs_label, GTK_STATE_NORMAL);
+        gtk_widget_set_state (priv->mt_ebox, GTK_STATE_NORMAL);
+        gtk_widget_set_state (priv->ms_ebox, GTK_STATE_SELECTED);
+        gtk_widget_set_state (priv->mt_label, GTK_STATE_NORMAL);
+        gtk_widget_set_state (priv->ms_label, GTK_STATE_SELECTED);
+        gtk_widget_set_state (priv->ampm_button, GTK_STATE_NORMAL);
+        gtk_widget_set_state (priv->ampm_label, GTK_STATE_NORMAL);
+      }
+    if (widget == priv->ampm_button)
+      {
+        gtk_widget_set_state (priv->h_ebox, GTK_STATE_NORMAL);
+        gtk_widget_set_state (priv->ht_label, GTK_STATE_NORMAL);
+        gtk_widget_set_state (priv->hs_label, GTK_STATE_NORMAL);
+        gtk_widget_set_state (priv->mt_ebox, GTK_STATE_NORMAL);
+        gtk_widget_set_state (priv->ms_ebox, GTK_STATE_NORMAL);
+        gtk_widget_set_state (priv->mt_label, GTK_STATE_NORMAL);
+        gtk_widget_set_state (priv->ms_label, GTK_STATE_NORMAL);
+        gtk_widget_set_state (priv->ampm_button, GTK_STATE_SELECTED);
+        gtk_widget_set_state (priv->ampm_label, GTK_STATE_SELECTED);
+      }
+
+  return FALSE;
+}
diff --git a/hildon-widgets/hildon-time-picker.h b/hildon-widgets/hildon-time-picker.h
new file mode 100644 (file)
index 0000000..278cdc0
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+#ifndef __HILDON_TIME_PICKER_H__
+#define __HILDON_TIME_PICKER_H__
+
+#include <gtk/gtkdialog.h>
+
+G_BEGIN_DECLS
+#define HILDON_TYPE_TIME_PICKER (hildon_time_picker_get_type())
+#define HILDON_TIME_PICKER(obj) (GTK_CHECK_CAST (obj, \
+                                 HILDON_TYPE_TIME_PICKER, \
+                                 HildonTimePicker))
+#define HILDON_TIME_PICKER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), \
+                                         HILDON_TYPE_TIME_PICKER,\
+                                         HildonTimePickerClass))
+#define HILDON_IS_TIME_PICKER(obj) (GTK_CHECK_TYPE (obj, \
+                                    HILDON_TYPE_TIME_PICKER))
+#define HILDON_IS_TIME_PICKER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass),\
+                                            HILDON_TYPE_TIME_PICKER))
+typedef struct _HildonTimePicker HildonTimePicker;
+typedef struct _HildonTimePickerClass HildonTimePickerClass;
+
+/*< private >*/
+struct _HildonTimePicker {
+    GtkDialog parent;
+};
+
+struct _HildonTimePickerClass {
+    GtkDialogClass parent_class;
+};
+
+GType hildon_time_picker_get_type(void);
+
+GtkWidget *hildon_time_picker_new(GtkWindow * parent);
+
+void hildon_time_picker_set_time(HildonTimePicker * picker,
+                                 guint hours, guint minutes);
+
+void hildon_time_picker_get_time(HildonTimePicker * picker,
+                                 guint * hours, guint * minutes);
+
+G_END_DECLS
+#endif
diff --git a/hildon-widgets/hildon-volumebar-private.h b/hildon-widgets/hildon-volumebar-private.h
new file mode 100644 (file)
index 0000000..dd02eb1
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+#ifndef __HILDON_VOLUMEBAR_PRIVATE__
+#define __HILDON_VOLUMEBAR_PRIVATE__
+
+#define HILDON_VOLUMEBAR_GET_PRIVATE(obj) \
+        (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
+       HILDON_TYPE_VOLUMEBAR, HildonVolumebarPrivate));
+
+typedef struct _HildonVolumebarPrivate HildonVolumebarPrivate;
+
+struct _HildonVolumebarPrivate {
+  HildonVolumebarRange *volumebar;
+
+  GtkOrientation orientation;
+  GtkOrientation ownorientation;
+  GtkToggleButton *tbutton;
+
+  gboolean is_toolbar;
+};
+
+#endif /* __HILDON_VOLUMEBAR_PRIVATE__ */
diff --git a/hildon-widgets/hildon-volumebar-range.c b/hildon-widgets/hildon-volumebar-range.c
new file mode 100644 (file)
index 0000000..bba31fc
--- /dev/null
@@ -0,0 +1,227 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/** 
+ * @file hildon-volumebar-range.c
+ *
+ * This file contains the implementation of the HildonVolumebarRange.
+ * This widget is an "workhorse" for #HildonVolumebar widget. 
+ * It is not designed to be used as a standalone widget.
+ *
+ * Purpose of this widget is to act as an "container" for GtkScale
+ * widget. #HildonVolumebarRange changes some event parameters so
+ * that #HildonVolumebar can meet it's specifications.
+ *
+ * Currently #HildonVolumebarRange models range of [0..100].
+ * 
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gtk/gtkrange.h>
+#include <gdk/gdkkeysyms.h>
+#include "hildon-volumebar-range.h"
+
+#define VOLUMEBAR_RANGE_INITIAL_VALUE 50.0
+#define VOLUMEBAR_RANGE_MINIMUM_VALUE 0.0
+#define VOLUMEBAR_RANGE_MAXIMUM_VALUE 100.0
+#define VOLUMEBAR_RANGE_STEP_INCREMENT_VALUE 5.0
+#define VOLUMEBAR_RANGE_PAGE_INCREMENT_VALUE 5.0
+#define VOLUMEBAR_RANGE_PAGE_SIZE_VALUE 0.0
+
+static GtkScaleClass *parent_class;
+
+static void hildon_volumebar_range_class_init(HildonVolumebarRangeClass *  
+                                              volumerange_class);
+static void hildon_volumebar_range_init(HildonVolumebarRange *
+                                        volumerange);
+
+static gint hildon_volumebar_range_button_press_event(GtkWidget * widget,
+                                                      GdkEventButton *
+                                                      event);
+static gint hildon_volumebar_range_button_release_event(GtkWidget * widget,
+                                                        GdkEventButton *
+                                                        event);
+static gboolean hildon_volumebar_range_keypress(GtkWidget * widget,
+                                                GdkEventKey * event);
+
+GType 
+hildon_volumebar_range_get_type(void)
+{
+    static GType volumerange_type = 0;
+
+    if (!volumerange_type) {
+        static const GTypeInfo volumerange_info = {
+            sizeof(HildonVolumebarRangeClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_volumebar_range_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonVolumebarRange),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_volumebar_range_init,
+        };
+        volumerange_type = g_type_register_static(GTK_TYPE_SCALE,
+                                                  "HildonVolumebarRange",
+                                                  &volumerange_info, 0);
+    }
+    return volumerange_type;
+}
+
+static void 
+hildon_volumebar_range_class_init(HildonVolumebarRangeClass *
+                                 volumerange_class)
+{
+    GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(volumerange_class);
+
+    parent_class = g_type_class_peek_parent(volumerange_class);
+
+    widget_class->button_press_event =
+        hildon_volumebar_range_button_press_event;
+    widget_class->button_release_event =
+        hildon_volumebar_range_button_release_event;
+    widget_class->key_press_event = hildon_volumebar_range_keypress;
+
+    return;
+}
+
+static void 
+hildon_volumebar_range_init(HildonVolumebarRange * volumerange)
+{
+   
+  GTK_RANGE(volumerange)->has_stepper_a = TRUE;
+  GTK_RANGE(volumerange)->has_stepper_d = TRUE;
+  
+  return;
+}
+
+static
+gboolean hildon_volumebar_range_keypress(GtkWidget * widget,
+                                         GdkEventKey * event)
+{
+    if (GTK_RANGE (widget)->orientation == GTK_ORIENTATION_HORIZONTAL)
+      {
+        if (event->keyval == GDK_Up || event->keyval == GDK_Down) {
+          return FALSE;
+        }
+      }
+    else
+      {
+        if (event->keyval == GDK_Left || event->keyval == GDK_Right) {
+          return FALSE;
+        }
+      }
+
+    return ((GTK_WIDGET_CLASS(parent_class)->key_press_event) (widget,
+                                                               event));
+}
+
+GtkWidget *
+hildon_volumebar_range_new(GtkOrientation orientation)
+{
+    GtkAdjustment * adjustment = GTK_ADJUSTMENT (gtk_adjustment_new (VOLUMEBAR_RANGE_INITIAL_VALUE,
+                                             VOLUMEBAR_RANGE_MINIMUM_VALUE,
+                                             VOLUMEBAR_RANGE_MAXIMUM_VALUE,
+                                             VOLUMEBAR_RANGE_STEP_INCREMENT_VALUE,
+                                             VOLUMEBAR_RANGE_PAGE_INCREMENT_VALUE,
+                                             VOLUMEBAR_RANGE_PAGE_SIZE_VALUE));
+    HildonVolumebarRange *self =
+        g_object_new(HILDON_VOLUMEBAR_RANGE_TYPE,
+                    "adjustment", adjustment,
+                    NULL);
+
+    GTK_RANGE(self)->orientation = orientation;
+
+    /* invert vertical range */
+    gtk_range_set_inverted(GTK_RANGE(self),
+                           (orientation == GTK_ORIENTATION_VERTICAL));
+
+    return GTK_WIDGET(self);
+}
+
+gdouble 
+hildon_volumebar_range_get_level(HildonVolumebarRange * self)
+{
+    g_return_val_if_fail(self, -1.0);
+    return GTK_RANGE (self)->adjustment->value;
+}
+
+void 
+hildon_volumebar_range_set_level(HildonVolumebarRange * self,
+                                gdouble level)
+{
+    gdouble newlevel;
+    g_return_if_fail(self);
+   
+    /* Although the range can clamp by itself, we do the clamping
+     * here to prevent sending value-changed signal when someone
+     * unsuccessfully tries to set level to illegal value. */
+    newlevel = CLAMP (level, GTK_RANGE (self)->adjustment->lower,
+                     GTK_RANGE (self)->adjustment->upper);
+
+    /* Check that value is actually changed. Note that it's not safe to
+     * just compare if floats are equivalent or not */
+    if (ABS(GTK_RANGE (self)->adjustment->value - newlevel) > 0.001) {
+        /* This might be a bit faster because this skips
+        * gtkadjustment's own clamping and check if value has
+        * indeed changed. */
+        GTK_RANGE (self)->adjustment->value = newlevel;
+        gtk_adjustment_value_changed(GTK_RANGE (self)->adjustment);
+    }
+}
+
+static gint 
+hildon_volumebar_range_button_press_event(GtkWidget * widget,
+                                         GdkEventButton *
+                                         event)
+{
+    gboolean result = FALSE;
+
+    event->button = event->button == 1 ? 2 : event->button;
+    if (GTK_WIDGET_CLASS(parent_class)->button_press_event) {
+        result =
+            GTK_WIDGET_CLASS(parent_class)->button_press_event(widget,
+                                                               event);
+    }
+    return result;
+}
+
+static gint 
+hildon_volumebar_range_button_release_event(GtkWidget * widget,
+                                           GdkEventButton *
+                                           event)
+{
+    gboolean result = FALSE;
+
+    event->button = event->button == 1 ? 2 : event->button;
+    if (GTK_WIDGET_CLASS(parent_class)->button_release_event) {
+        result =
+            GTK_WIDGET_CLASS(parent_class)->button_release_event(widget,
+                                                                 event);
+    }
+    return result;
+}
diff --git a/hildon-widgets/hildon-volumebar-range.h b/hildon-widgets/hildon-volumebar-range.h
new file mode 100644 (file)
index 0000000..b4d78ba
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef HILDON_VOLUMEBAR_RANGE_H
+#define HILDON_VOLUMEBAR_RANGE_H
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gtk/gtkscale.h>
+
+G_BEGIN_DECLS
+#define HILDON_VOLUMEBAR_RANGE_TYPE ( hildon_volumebar_range_get_type() )
+#define HILDON_VOLUMEBAR_RANGE(obj) (GTK_CHECK_CAST (obj,\
+        HILDON_VOLUMEBAR_RANGE_TYPE, HildonVolumebarRange))
+#define HILDON_VOLUMEBAR_RANGE_CLASS(klass) \
+        (GTK_CHECK_CLASS_CAST ((klass),\
+        HILDON_VOLUMEBAR_RANGE_TYPE, HildonVolumebarRangeClass))
+#define HILDON_IS_VOLUMEBAR_RANGE(obj) (GTK_CHECK_TYPE (obj,\
+        HILDON_VOLUMEBAR_RANGE_TYPE))
+#define HILDON_IS_VOLUMEBAR_RANGE_CLASS(klass) \
+        (GTK_CHECK_CLASS_TYPE ((klass), HILDON_VOLUMEBAR_RANGE_TYPE))
+typedef struct _HildonVolumebarRange HildonVolumebarRange;
+typedef struct _HildonVolumebarRangeClass HildonVolumebarRangeClass;
+
+struct _HildonVolumebarRange {
+    GtkScale scale;
+};
+
+struct _HildonVolumebarRangeClass {
+    GtkScaleClass parent_class;
+};
+
+GType hildon_volumebar_range_get_type(void);
+GtkWidget *hildon_volumebar_range_new(GtkOrientation orientation);
+gdouble hildon_volumebar_range_get_level(HildonVolumebarRange * self);
+void hildon_volumebar_range_set_level(HildonVolumebarRange * self,
+                                      gdouble level);
+
+
+G_END_DECLS
+#endif
diff --git a/hildon-widgets/hildon-volumebar.c b/hildon-widgets/hildon-volumebar.c
new file mode 100644 (file)
index 0000000..c52ac73
--- /dev/null
@@ -0,0 +1,452 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/*
+ * @file hildon-volumebar.c
+ *
+ * This file contains the implementation of the Hildon Volumebar.
+ * It is a base class for Hildon Vertical Volumebar and for
+ * Hildon Horizontal Volumebar classes.
+ */
+#include <gtk/gtksignal.h>
+#include <gdk/gdkkeysyms.h>
+
+#include "hildon-volumebar.h"
+#include "hildon-volumebar-range.h"
+#include "hildon-volumebar-private.h"
+
+static GtkContainerClass *parent_class;
+
+static void
+hildon_volumebar_class_init(HildonVolumebarClass * volumebar_class);       
+static void 
+hildon_volumebar_init(HildonVolumebar * volumebar);
+
+static void 
+hildon_child_forall(GtkContainer * container,
+                   gboolean include_internals,
+                   GtkCallback callback,
+                   gpointer callback_data);
+static void 
+hildon_volumebar_destroy(GtkObject * self);
+
+static void hildon_volumebar_set_property(GObject * object,
+                                           guint prop_id,
+                                           const GValue * value,
+                                           GParamSpec * pspec);
+static void hildon_volumebar_get_property(GObject * object,
+                                           guint prop_id,
+                                           GValue * value, 
+                                           GParamSpec * pspec);
+
+static void mute_toggled (HildonVolumebar *self, gpointer data);
+
+static gboolean
+hildon_volumebar_key_press(GtkWidget * widget,
+                           GdkEventKey * event,
+                           gpointer data);
+
+
+enum 
+{
+    MUTE_TOGGLED_SIGNAL,
+    LEVEL_CHANGED_SIGNAL,
+    LAST_SIGNAL
+};
+
+enum {
+    PROP_NONE = 0,
+    PROP_HILDON_HAS_MUTE,
+    PROP_HILDON_FOCUSABLE
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
+GType 
+hildon_volumebar_get_type(void)
+{
+    static GType volumebar_type = 0;
+
+    if (!volumebar_type) {
+        static const GTypeInfo volumebar_info = {
+            sizeof(HildonVolumebarClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_volumebar_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonVolumebar),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_volumebar_init,
+        };
+        volumebar_type = g_type_register_static(GTK_TYPE_CONTAINER,
+                                                "HildonVolumebar",
+                                                &volumebar_info, 0);
+    }
+    return volumebar_type;
+}
+
+static void 
+hildon_volumebar_class_init(HildonVolumebarClass *volumebar_class)
+{
+    GtkContainerClass *container_class =
+        GTK_CONTAINER_CLASS(volumebar_class);
+    GObjectClass *object_class = G_OBJECT_CLASS(volumebar_class);
+
+    parent_class = g_type_class_peek_parent(volumebar_class);
+
+    g_type_class_add_private(volumebar_class,
+                             sizeof(HildonVolumebarPrivate));
+
+    /* Because we derived our widget from GtkContainer, we should also
+       override forall method */
+    container_class->forall = hildon_child_forall;
+    GTK_OBJECT_CLASS(volumebar_class)->destroy = hildon_volumebar_destroy;
+
+    signals[MUTE_TOGGLED_SIGNAL] = g_signal_new("mute_toggled",
+                                                G_OBJECT_CLASS_TYPE
+                                                (object_class),
+                                                G_SIGNAL_RUN_LAST |
+                                                G_SIGNAL_ACTION,
+                                                G_STRUCT_OFFSET
+                                                (HildonVolumebarClass,
+                                                 mute_toggled), NULL, NULL,
+                                                gtk_marshal_VOID__VOID,
+                                                G_TYPE_NONE, 0);
+
+    signals[LEVEL_CHANGED_SIGNAL] = g_signal_new("level_changed",
+                                                 G_OBJECT_CLASS_TYPE
+                                                 (object_class),
+                                                 G_SIGNAL_RUN_LAST |
+                                                 G_SIGNAL_ACTION,
+                                                 G_STRUCT_OFFSET
+                                                 (HildonVolumebarClass,
+                                                  level_changed), NULL,
+                                                 NULL,
+                                                 gtk_marshal_VOID__VOID,
+                                                 G_TYPE_NONE, 0);
+    
+    object_class->set_property = hildon_volumebar_set_property;
+    object_class->get_property = hildon_volumebar_get_property; 
+
+    /*This kind of property could be usefull in the gtkcontainer*/
+    g_object_class_install_property(object_class,
+                                    PROP_HILDON_FOCUSABLE, 
+                                    g_param_spec_boolean("can-focus",
+                                    "The widget focusablility",
+                                "The widget focusablility. TRUE is focusable",
+                                    TRUE,
+                                    G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
+
+    g_object_class_install_property(object_class,
+                                    PROP_HILDON_HAS_MUTE, 
+                                    g_param_spec_boolean("has_mute",
+                                    "Show/Hide the mute button",
+               "Whether the mute button is visible. Default value: TRUE",
+                                    TRUE,
+                                    G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
+
+}
+
+static void 
+hildon_volumebar_init(HildonVolumebar * volumebar)
+{
+    HildonVolumebarPrivate *priv;
+
+    priv = HILDON_VOLUMEBAR_GET_PRIVATE(volumebar);
+
+    /* Should set GTK_NO_WINDOW flag, because widget is derived from
+       GtkContainer */
+    GTK_WIDGET_SET_FLAGS(GTK_WIDGET(volumebar), GTK_NO_WINDOW);
+    GTK_WIDGET_UNSET_FLAGS(GTK_WIDGET(volumebar), GTK_CAN_FOCUS);
+    
+    priv->tbutton = GTK_TOGGLE_BUTTON(gtk_toggle_button_new());
+    g_object_set (G_OBJECT (priv->tbutton), "can-focus", FALSE, NULL);
+    g_signal_connect (G_OBJECT (volumebar), "mute_toggled",
+                      G_CALLBACK (mute_toggled), NULL);
+    
+    /* set keypress handler (select hardkey) */
+    g_signal_connect(G_OBJECT(volumebar), "key-press-event",
+            G_CALLBACK(hildon_volumebar_key_press),
+            NULL);
+
+}
+
+static void
+hildon_child_forall(GtkContainer * container,
+                    gboolean include_internals,
+                    GtkCallback callback, gpointer callback_data)
+{
+    HildonVolumebar *vbar;
+    HildonVolumebarPrivate *priv;
+
+    vbar = HILDON_VOLUMEBAR(container);
+    priv = HILDON_VOLUMEBAR_GET_PRIVATE(vbar);
+
+    g_return_if_fail(callback != NULL);
+
+    if (!include_internals)
+        return;
+
+    (*callback) (GTK_WIDGET(priv->tbutton), callback_data);
+    (*callback) (GTK_WIDGET(priv->volumebar), callback_data);
+}
+
+static void 
+hildon_volumebar_destroy(GtkObject * self)
+{
+    HildonVolumebarPrivate *priv;
+
+    priv = HILDON_VOLUMEBAR_GET_PRIVATE(self);
+
+    if (priv->tbutton) {
+        gtk_widget_unparent(GTK_WIDGET(priv->tbutton));
+        priv->tbutton = NULL;
+    }
+    if (priv->volumebar) {
+        gtk_widget_unparent(GTK_WIDGET(priv->volumebar));
+        priv->volumebar = NULL;
+    }
+
+    if (GTK_OBJECT_CLASS(parent_class)->destroy)
+        GTK_OBJECT_CLASS(parent_class)->destroy(self);
+}
+
+static void
+hildon_volumebar_set_property(GObject * object,
+                              guint prop_id,
+                              const GValue * value, 
+                              GParamSpec * pspec)
+{  
+    HildonVolumebar *vbar = HILDON_VOLUMEBAR(object);
+    HildonVolumebarPrivate *priv;
+    gboolean has_mute = TRUE;
+
+    priv = HILDON_VOLUMEBAR_GET_PRIVATE(vbar)
+
+    switch (prop_id) {
+    case PROP_HILDON_HAS_MUTE:
+        has_mute = g_value_get_boolean(value);
+
+        if (has_mute)
+        {
+            gtk_widget_show(GTK_WIDGET(priv->tbutton));
+
+        }
+        else
+        {
+            gtk_widget_hide(GTK_WIDGET(priv->tbutton));
+        }
+        
+        break;
+    case PROP_HILDON_FOCUSABLE:
+        g_object_set( G_OBJECT(priv->volumebar), "can-focus", 
+                      g_value_get_boolean(value), NULL );
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+
+        break;
+    }
+}
+
+static void
+hildon_volumebar_get_property(GObject * object,
+                              guint prop_id, GValue * value, 
+                              GParamSpec * pspec)
+{
+  HildonVolumebarPrivate *priv;
+  priv = HILDON_VOLUMEBAR_GET_PRIVATE(object)
+    switch (prop_id) {
+    case PROP_HILDON_HAS_MUTE:
+        g_value_set_boolean(value, g_value_get_boolean(value));
+        break;
+     case PROP_HILDON_FOCUSABLE:
+        g_value_set_boolean(value, g_value_get_boolean(value));
+        g_object_set( G_OBJECT(priv->volumebar), "can-focus", 
+                      g_value_get_boolean(value), NULL );
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+        break;
+    }
+}
+
+/**
+ * hildon_volumebar_level_change:
+ * @self: a HildonVolumebar widget.
+ *
+ * Emits "level_changed" signal to the given volumebar. This function
+ * is mainly used by derived classes.
+ */
+void 
+hildon_volumebar_level_change(HildonVolumebar * self)
+{
+    g_return_if_fail(HILDON_IS_VOLUMEBAR(self));
+    g_signal_emit_by_name(GTK_WIDGET(self), "level_changed");
+}
+
+/**
+ * hildon_volumebar_set_level:
+ * @self: volumebar to change level on
+ * @level: new level
+ *
+ * Sets new volumelevel for this #HildonVolumebar.
+ **/
+void 
+hildon_volumebar_set_level(HildonVolumebar * self, gdouble level)
+{
+    HildonVolumebarPrivate *priv;
+
+    g_return_if_fail(self);
+
+    priv = HILDON_VOLUMEBAR_GET_PRIVATE(self);
+   
+    /* No need to clamp the level to legal values here as volumebarrange
+     * will do it anyway. And here we don't know the correct values anyway.
+     */
+    hildon_volumebar_range_set_level(priv->volumebar, level);
+}
+
+/**
+ * hildon_volumebar_get_level:
+ * @self: volumebar to query level on
+ *
+ * Gets the volumelevel of this #HildonVolumebar.
+ *
+ * Return value: Volume level.
+ **/
+gdouble 
+hildon_volumebar_get_level(HildonVolumebar * self)
+{
+    HildonVolumebarPrivate *priv;
+
+    g_return_val_if_fail(self, -1);
+
+    priv = HILDON_VOLUMEBAR_GET_PRIVATE(self);
+
+    return hildon_volumebar_range_get_level(priv->volumebar);
+}
+
+/**
+ * hildon_volumebar_set_mute:
+ * @self: volumebar to work on
+ * @mute: mute ON/OFF
+ *
+ * Sets mute status for this #HildonVolumebar.
+ *
+ **/
+void 
+hildon_volumebar_set_mute(HildonVolumebar * self, gboolean mute)
+{
+    HildonVolumebarPrivate *priv;
+
+    g_return_if_fail(self);
+
+    priv = HILDON_VOLUMEBAR_GET_PRIVATE(self);
+    gtk_widget_set_sensitive(GTK_WIDGET(priv->volumebar), !mute);
+    
+    if (mute){   
+        g_object_set (G_OBJECT (priv->tbutton), "can-focus", TRUE, NULL);
+        gtk_widget_grab_focus (GTK_WIDGET(priv->tbutton));
+    }
+    else
+    {
+        g_object_set (G_OBJECT (priv->tbutton), "can-focus", FALSE, NULL);
+        gtk_widget_grab_focus (GTK_WIDGET (self));
+    }
+}
+
+/**
+ * hildon_volumebar_get_mute:
+ * @self: volumebar to query mute status
+ *
+ * Gets mute status of this #HildonVolumebar (ON/OFF).
+ *
+ * Return value: Mute status as #gboolean value.
+ **/
+gboolean 
+hildon_volumebar_get_mute(HildonVolumebar * self)
+{
+    HildonVolumebarPrivate *priv;
+
+    g_return_val_if_fail(self, TRUE);
+
+    priv = HILDON_VOLUMEBAR_GET_PRIVATE(self);
+
+    return gtk_toggle_button_get_active(priv->tbutton);
+}
+
+/**
+ * hildon_volumebar_get_adjustment
+ * @self : A #HildonVolumebar
+ * 
+ * Gets the GtkAdjustment used in volumebar. This can be handy
+ * to give to hildon_appview_set_connected_adjustment which
+ * will allow changing the volume with increase / decrease
+ * hardware buttons.
+ *
+ * This is a temporary solution until volumebar is restructured to
+ * be a child class of GtkRange.
+ * 
+ * Return value: A @GtkAdjustment used by volumebar.
+ **/
+GtkAdjustment * 
+hildon_volumebar_get_adjustment (HildonVolumebar * self)
+{
+    HildonVolumebarPrivate *priv;
+
+    g_return_val_if_fail(self, NULL);
+
+    priv = HILDON_VOLUMEBAR_GET_PRIVATE(self);
+
+    return gtk_range_get_adjustment (GTK_RANGE (priv->volumebar));
+}
+
+static void
+mute_toggled (HildonVolumebar *self, gpointer data)
+{
+  /* only call hildon_volumebar_set_mute. everything is done there */
+  hildon_volumebar_set_mute (self, hildon_volumebar_get_mute(self));
+}
+
+static gboolean
+hildon_volumebar_key_press (GtkWidget * widget,
+                            GdkEventKey * event,
+                            gpointer data)
+{
+    HildonVolumebarPrivate *priv;
+    
+    g_return_val_if_fail(widget, FALSE);
+    g_return_val_if_fail(event, FALSE);
+
+    priv = HILDON_VOLUMEBAR_GET_PRIVATE(widget);
+    
+    if (event->keyval == GDK_Return) {
+        gtk_toggle_button_set_active(priv->tbutton, 
+                !hildon_volumebar_get_mute(HILDON_VOLUMEBAR(widget)));
+        return TRUE;
+    }
+
+    return FALSE;
+}
diff --git a/hildon-widgets/hildon-volumebar.h b/hildon-widgets/hildon-volumebar.h
new file mode 100644 (file)
index 0000000..33462c3
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+#ifndef __HILDON_VOLUMEBAR_H__
+#define __HILDON_VOLUMEBAR_H__
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gtk/gtkcontainer.h>
+/*#include <gtk/gtkframe.h>*/
+#include <gtk/gtktogglebutton.h>
+#include <gtk/gtkbox.h>
+#include <gtk/gtkhbox.h>
+#include <gtk/gtkvbox.h>
+#include <gtk/gtkadjustment.h>
+
+G_BEGIN_DECLS
+#define HILDON_TYPE_VOLUMEBAR ( hildon_volumebar_get_type() )
+#define HILDON_VOLUMEBAR(obj) (GTK_CHECK_CAST (obj,\
+        HILDON_TYPE_VOLUMEBAR, HildonVolumebar))
+#define HILDON_VOLUMEBAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass),\
+        HILDON_TYPE_VOLUMEBAR, HildonVolumebarClass))
+#define HILDON_IS_VOLUMEBAR(obj) (GTK_CHECK_TYPE (obj,\
+        HILDON_TYPE_VOLUMEBAR))
+#define HILDON_IS_VOLUMEBAR_CLASS(klass) \
+        (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_VOLUMEBAR))
+typedef struct _HildonVolumebar HildonVolumebar;
+typedef struct _HildonVolumebarClass HildonVolumebarClass;
+
+struct _HildonVolumebar {
+    GtkContainer par;
+};
+
+struct _HildonVolumebarClass {
+    GtkContainerClass parent_class;
+
+    /* signal */
+    void (*mute_toggled) (HildonVolumebar * self);
+    void (*level_changed) (HildonVolumebar * self);
+};
+
+GType hildon_volumebar_get_type(void);
+
+void hildon_volumebar_set_level(HildonVolumebar * self, gdouble level);
+double hildon_volumebar_get_level(HildonVolumebar * self);
+void hildon_volumebar_set_mute(HildonVolumebar * self, gboolean mute);
+gboolean hildon_volumebar_get_mute(HildonVolumebar * self);
+void hildon_volumebar_level_change(HildonVolumebar * self);
+GtkAdjustment * hildon_volumebar_get_adjustment (HildonVolumebar * self);
+
+G_END_DECLS
+#endif
diff --git a/hildon-widgets/hildon-vvolumebar.c b/hildon-widgets/hildon-vvolumebar.c
new file mode 100644 (file)
index 0000000..3737021
--- /dev/null
@@ -0,0 +1,228 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/**
+ * @file hildon-vvolumebar.c
+ *
+ * This file contains the implementation of HildonVVolumebar.
+ * This widget is a subclass of HildonVolumebar and implements
+ * horizontal version of Volumebar.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include "hildon-vvolumebar.h"
+#include "hildon-volumebar.h"
+#include "hildon-volumebar-range.h"
+#include "hildon-volumebar-private.h"
+
+#define DEFAULT_BAR_WIDTH               58
+#define MINIMUM_BAR_HEIGHT             165
+#define DEFAULT_VERTICAL_TBUTTON_WIDTH  26
+#define DEFAULT_VERTICAL_TBUTTON_HEIGHT 26
+#define DEFAULT_ENDING_SIZE             20
+#define HORIZONTAL_MUTE_GAP             16
+#define VERTICAL_MUTE_GAP                6
+
+static HildonVolumebarClass *parent_class;
+static void vvolumebar_class_init(HildonVVolumebarClass * klass);
+static void vvolumebar_init(HildonVVolumebar * vvolumebar);
+static void hildon_vvolumebar_mute(GtkWidget * widget,
+                                   HildonVVolumebar * self);
+static gboolean hildon_vvolumebar_expose(GtkWidget * widget,
+                                         GdkEventExpose * event);
+static void hildon_vvolumebar_size_request(GtkWidget * widget,
+                                           GtkRequisition * requisition);
+static void hildon_vvolumebar_size_allocate(GtkWidget * widget,
+                                            GtkAllocation * allocation);
+
+GType hildon_vvolumebar_get_type(void)
+{
+    static GType type = 0;
+
+    if (!type) {
+        static const GTypeInfo info = {
+            sizeof(HildonVVolumebarClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) vvolumebar_class_init,     /* class_init */
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonVVolumebar),
+            0,
+            (GInstanceInitFunc) vvolumebar_init,
+        };
+        type =
+            g_type_register_static(HILDON_TYPE_VOLUMEBAR,
+                                   "HildonVVolumebar", &info, 0);
+    }
+    return type;
+}
+
+static void vvolumebar_class_init(HildonVVolumebarClass * klass)
+{
+    GtkWidgetClass *volumebar_class = GTK_WIDGET_CLASS(klass);
+
+    parent_class = g_type_class_peek_parent(klass);
+
+    volumebar_class->size_request = hildon_vvolumebar_size_request;
+    volumebar_class->size_allocate = hildon_vvolumebar_size_allocate;
+    volumebar_class->expose_event = hildon_vvolumebar_expose;
+}
+
+static void vvolumebar_init(HildonVVolumebar * vvolumebar)
+{
+    HildonVolumebar *v_ptr = HILDON_VOLUMEBAR(vvolumebar);
+    HildonVolumebarPrivate *priv;
+
+    priv = HILDON_VOLUMEBAR_GET_PRIVATE(vvolumebar);
+
+    priv->ownorientation = GTK_ORIENTATION_VERTICAL;
+    priv->orientation = GTK_ORIENTATION_VERTICAL;
+
+    priv->volumebar =
+        HILDON_VOLUMEBAR_RANGE(hildon_volumebar_range_new
+                               (GTK_ORIENTATION_VERTICAL));
+
+    GTK_WIDGET_UNSET_FLAGS(GTK_WIDGET(vvolumebar), GTK_CAN_FOCUS);
+
+    gtk_widget_set_parent(GTK_WIDGET(priv->tbutton), GTK_WIDGET(v_ptr));
+    gtk_widget_set_parent(GTK_WIDGET(priv->volumebar), GTK_WIDGET(v_ptr));
+
+    gtk_scale_set_draw_value(GTK_SCALE(priv->volumebar), FALSE);
+
+    /* Signals */
+    g_signal_connect_swapped(G_OBJECT(priv->volumebar), "value-changed",
+                             G_CALLBACK(hildon_volumebar_level_change),
+                             vvolumebar);
+    g_signal_connect(G_OBJECT(priv->tbutton), "toggled",
+                     G_CALLBACK(hildon_vvolumebar_mute), vvolumebar);
+    /* end here */
+
+    gtk_widget_show(GTK_WIDGET(priv->volumebar));
+}
+
+/**
+ * hildon_vvolumebar_new:
+ *
+ * Creates a new #HildonVVolumebar widget.
+ *
+ * Returns: a new #HildonVVolumebar.
+ */
+GtkWidget *hildon_vvolumebar_new()
+{
+    return GTK_WIDGET(g_object_new(HILDON_TYPE_VVOLUMEBAR, NULL));
+}
+
+static gboolean hildon_vvolumebar_expose(GtkWidget * widget,
+                                         GdkEventExpose * event)
+{
+    if (GTK_WIDGET_DRAWABLE(widget)) {
+        gtk_paint_box(widget->style, widget->window,
+                      GTK_WIDGET_STATE(widget), GTK_SHADOW_OUT,
+                      NULL, widget, "background",
+                      widget->allocation.x,
+                      widget->allocation.y,
+                      widget->allocation.width,
+                      widget->allocation.height);
+
+        (*GTK_WIDGET_CLASS(parent_class)->expose_event) (widget, event);
+    }
+
+    return FALSE;
+}
+
+static void
+hildon_vvolumebar_size_request(GtkWidget * widget,
+                               GtkRequisition * requisition)
+{
+    requisition->height = MINIMUM_BAR_HEIGHT;
+    requisition->width = DEFAULT_BAR_WIDTH;
+}
+
+static void
+hildon_vvolumebar_size_allocate(GtkWidget * widget,
+                                GtkAllocation * allocation)
+{
+    HildonVolumebar *vbar;
+    HildonVolumebarPrivate *priv;
+
+    GtkAllocation range_allocation, button_allocation;
+
+    vbar = HILDON_VOLUMEBAR(widget);
+    priv = HILDON_VOLUMEBAR_GET_PRIVATE(vbar);
+
+    if (allocation->width > DEFAULT_BAR_WIDTH) {
+        allocation->x +=
+         (allocation->width - DEFAULT_BAR_WIDTH) / 2;
+        allocation->width = DEFAULT_BAR_WIDTH;
+    }
+
+    widget->allocation = *allocation;
+
+    if (priv->volumebar && GTK_WIDGET_VISIBLE(priv->volumebar)) {
+        range_allocation.x = allocation->x;
+        range_allocation.y = allocation->y + DEFAULT_ENDING_SIZE;
+
+        range_allocation.width = DEFAULT_BAR_WIDTH;
+        
+        if (priv->tbutton && GTK_WIDGET_VISIBLE(priv->tbutton))
+        {
+            range_allocation.height = MAX(0,
+                                          allocation->height
+                                          - 2 * DEFAULT_ENDING_SIZE
+                                          - DEFAULT_VERTICAL_TBUTTON_HEIGHT
+                                          - VERTICAL_MUTE_GAP);
+        }
+        
+        else
+        {
+            range_allocation.height = MAX(0,
+                                          allocation->height
+                                          - 2 * DEFAULT_ENDING_SIZE);
+        }
+        
+        gtk_widget_size_allocate(GTK_WIDGET(priv->volumebar),
+                                 &range_allocation);
+    }
+    
+    if (priv->tbutton && GTK_WIDGET_VISIBLE(priv->tbutton)) {
+        button_allocation.x = allocation->x + HORIZONTAL_MUTE_GAP;
+        button_allocation.y = allocation->y + allocation->height -
+                              VERTICAL_MUTE_GAP - 2 * DEFAULT_ENDING_SIZE;
+        button_allocation.width = DEFAULT_VERTICAL_TBUTTON_WIDTH;
+        button_allocation.height = DEFAULT_VERTICAL_TBUTTON_HEIGHT;
+        gtk_widget_size_allocate(GTK_WIDGET(priv->tbutton),
+                                 &button_allocation);
+    }
+}
+
+static void
+hildon_vvolumebar_mute(GtkWidget * widget, HildonVVolumebar * self)
+{
+    g_signal_emit_by_name(GTK_WIDGET(self), "mute_toggled");
+}
diff --git a/hildon-widgets/hildon-vvolumebar.h b/hildon-widgets/hildon-vvolumebar.h
new file mode 100644 (file)
index 0000000..60ed284
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef HILDON_VVOLUMEBAR_H
+#define HILDON_VVOLUMEBAR_H
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gtk/gtkalignment.h>
+#include <gtk/gtkframe.h>
+#include <gtk/gtktogglebutton.h>
+#include <hildon-widgets/hildon-volumebar.h>
+
+G_BEGIN_DECLS
+#define HILDON_TYPE_VVOLUMEBAR ( hildon_vvolumebar_get_type() )
+#define HILDON_VVOLUMEBAR(obj) (GTK_CHECK_CAST (obj,\
+        HILDON_TYPE_VVOLUMEBAR, HildonVVolumebar))
+#define HILDON_VVOLUMEBAR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass),\
+        HILDON_TYPE_VVOLUMEBAR, HildonVVolumebarClass))
+#define HILDON_IS_VVOLUMEBAR(obj) (GTK_CHECK_TYPE (obj,\
+        HILDON_TYPE_VVOLUMEBAR))
+#define HILDON_IS_VVOLUMEBAR_CLASS(klass) \
+        (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_VVOLUMEBAR))
+typedef struct _HildonVVolumebar HildonVVolumebar;
+typedef struct _HildonVVolumebarClass HildonVVolumebarClass;
+
+struct _HildonVVolumebar {
+    /* This is our parent class */
+    HildonVolumebar volumebar;
+};
+
+struct _HildonVVolumebarClass {
+    HildonVolumebarClass parent_class;
+};
+
+GType hildon_vvolumebar_get_type(void);
+GtkWidget *hildon_vvolumebar_new(void);
+
+G_END_DECLS
+#endif /* HILDON_VVOLUMEBAR */
diff --git a/hildon-widgets/hildon-weekday-picker.c b/hildon-widgets/hildon-weekday-picker.c
new file mode 100644 (file)
index 0000000..97c0196
--- /dev/null
@@ -0,0 +1,564 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/*
+ * TODO:
+ * - Must check if graphics should be added to widgets weekday
+ *   buttons
+ *
+ */
+
+/* HILDON DOC
+ * @shortdesc: Weekday Picker is a widget for selecting weekdays
+ * @longdesc: Weekday Picker is a widget for selecting weekdays. 
+ * It shows seven toggle buttons that can have state on or off.
+ *
+ * @seealso: #HildonTimePicker
+ */
+
+ /* GDate numbers days from 1 to 7 and G_DATE_MONDAY is 1st day. However
+    according to locale settings first day is sunday. To get around this
+    problem, we addjust GDate days numbering to be same as locale
+    numbering */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <libintl.h>
+#include <langinfo.h>
+#include <time.h>
+#include <gtk/gtksignal.h>
+#include <gdk/gdkkeysyms.h>
+#include <gtk/gtktogglebutton.h>
+#include <gtk/gtksizegroup.h>
+#include <gtk/gtkwindow.h>
+#include "hildon-weekday-picker.h"
+#include "hildon-composite-widget.h"
+
+#define _(String) gettext (String)
+
+#define HILDON_WEEKDAY_PICKER_GET_PRIVATE(obj) \
+    (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
+     HILDON_WEEKDAY_PICKER_TYPE, HildonWeekdayPickerPrivate));
+
+static GtkContainerClass *parent_class;
+
+typedef struct _HildonWeekdayPickerPrivate HildonWeekdayPickerPrivate;
+
+static void
+hildon_weekday_picker_class_init(HildonWeekdayPickerClass * picker_class);
+
+static void 
+hildon_weekday_picker_init(HildonWeekdayPicker * picker);
+
+static void
+hildon_weekday_picker_size_allocate(GtkWidget * widget,
+                                    GtkAllocation * allocation);
+
+static void
+hildon_weekday_picker_size_request(GtkWidget * widget,
+                                   GtkRequisition * requisition);
+
+static void
+hildon_weekday_picker_forall(GtkContainer * container,
+                             gboolean include_internals,
+                             GtkCallback callback, gpointer callback_data);
+
+static void
+hildon_weekday_picker_destroy(GtkObject * self);
+
+static gboolean
+hildon_weekday_picker_mnemonic_activate(GtkWidget *widget,
+                                        gboolean group_cycling);
+
+static void
+button_toggle(GtkToggleButton * togglebutton, gpointer data);
+
+struct _HildonWeekdayPickerPrivate {
+    guint dayorder[8];  /* Lookup table for weekdays */
+    GtkWidget *buttons[8];      /* weekday buttons */
+    guint days;
+    guint last_index;
+};
+
+enum {
+  SELECTION_CHANGED_SIGNAL,
+  LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
+GType hildon_weekday_picker_get_type(void)
+{
+    static GType picker_type = 0;
+
+    if (!picker_type) {
+        static const GTypeInfo picker_info = {
+            sizeof(HildonWeekdayPickerClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_weekday_picker_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonWeekdayPicker),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_weekday_picker_init,
+        };
+        picker_type = g_type_register_static(GTK_TYPE_CONTAINER,
+                                             "HildonWeekdayPicker",
+                                             &picker_info, 0);
+    }
+    return picker_type;
+}
+
+static void
+hildon_weekday_picker_class_init(HildonWeekdayPickerClass * picker_class)
+{
+    GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(picker_class);
+    GtkContainerClass *container_class = GTK_CONTAINER_CLASS(picker_class);
+    GObjectClass *object_class = G_OBJECT_CLASS(picker_class);
+
+    parent_class = g_type_class_peek_parent(picker_class);
+
+    g_type_class_add_private(picker_class,
+                             sizeof(HildonWeekdayPickerPrivate));
+
+    widget_class->mnemonic_activate = hildon_weekday_picker_mnemonic_activate;
+    widget_class->size_request = hildon_weekday_picker_size_request;
+    widget_class->size_allocate = hildon_weekday_picker_size_allocate;
+    widget_class->focus = hildon_composite_widget_focus;
+    container_class->forall = hildon_weekday_picker_forall;
+    GTK_OBJECT_CLASS(picker_class)->destroy =
+        hildon_weekday_picker_destroy;
+
+    signals[SELECTION_CHANGED_SIGNAL] = g_signal_new("selection_changed",
+                                                G_OBJECT_CLASS_TYPE
+                                                (object_class),
+                                                G_SIGNAL_RUN_LAST |
+                                                G_SIGNAL_ACTION,
+                                                G_STRUCT_OFFSET
+                                                (HildonWeekdayPickerClass,
+                                                 selection_changed), NULL, NULL,
+                                                gtk_marshal_VOID__INT,
+                                                G_TYPE_NONE, 1, G_TYPE_INT);
+}
+
+static void
+hildon_weekday_picker_init(HildonWeekdayPicker * picker)
+{
+    HildonWeekdayPickerPrivate *priv;
+    gint i, day;
+    const gchar *wdays[8];
+    GtkSizeGroup *sgroup;
+
+    sgroup = gtk_size_group_new(GTK_SIZE_GROUP_BOTH);
+
+    /* NOTE: we query locales with "first_weekday" parameter, but this
+       seems to be broken on some installations. e.g. on my system I
+       receive "1" (Sunday) to be first day of the week on "fi_FI"
+       locale, when it should be "2" (Monday). */
+
+    /* Check our first weekday */
+    day = *nl_langinfo(_NL_TIME_FIRST_WEEKDAY);
+
+    wdays[1] = nl_langinfo(ABDAY_1);
+    wdays[2] = nl_langinfo(ABDAY_2);
+    wdays[3] = nl_langinfo(ABDAY_3);
+    wdays[4] = nl_langinfo(ABDAY_4);
+    wdays[5] = nl_langinfo(ABDAY_5);
+    wdays[6] = nl_langinfo(ABDAY_6);
+    wdays[7] = nl_langinfo(ABDAY_7);
+
+    priv = HILDON_WEEKDAY_PICKER_GET_PRIVATE(picker);
+
+    for (i = 1; i <= 7; i++) {
+        priv->buttons[i] = gtk_toggle_button_new_with_label(wdays[day]);
+        priv->dayorder[i] = day++;
+
+        if (day > 7)
+            day = 1;
+
+        g_signal_connect(GTK_WIDGET(priv->buttons[i]),
+                         "toggled", G_CALLBACK(button_toggle), picker);
+
+        priv->last_index = i;
+        gtk_size_group_add_widget(sgroup, priv->buttons[i]);
+
+        gtk_widget_set_parent(priv->buttons[i], GTK_WIDGET(picker));
+        gtk_widget_show(priv->buttons[i]);
+    }
+
+    GTK_WIDGET_SET_FLAGS(picker, GTK_NO_WINDOW);
+}
+
+/**
+ * hildon_weekday_picker_new:
+ *
+ * Creates a new #HildonWeekdayPicker.
+ *
+ * Return value: Pointer to a new @HildonWeekdayPicker widget.
+ */
+GtkWidget *hildon_weekday_picker_new(void)
+{
+    return g_object_new(HILDON_WEEKDAY_PICKER_TYPE, NULL);
+}
+
+static gboolean
+hildon_weekday_picker_mnemonic_activate(GtkWidget *widget,
+                                        gboolean group_cycling)
+{
+  HildonWeekdayPickerPrivate *priv = HILDON_WEEKDAY_PICKER_GET_PRIVATE(widget);
+  gtk_widget_grab_focus(priv->buttons[1]);
+  return TRUE;
+}
+
+static void 
+hildon_weekday_picker_forall(GtkContainer * container,
+                             gboolean include_internals, GtkCallback callback,
+                             gpointer callback_data)
+{
+    HildonWeekdayPicker *picker;
+    HildonWeekdayPickerPrivate *priv;
+    gint i;
+
+    g_return_if_fail(container);
+    g_return_if_fail(callback);
+
+    picker = HILDON_WEEKDAY_PICKER(container);
+    priv = HILDON_WEEKDAY_PICKER_GET_PRIVATE(picker);
+
+    if (!include_internals)
+        return;
+
+    for (i = 1; i <= 7; ++i) {
+        (*callback) (priv->buttons[i], callback_data);
+    }
+
+}
+
+static void 
+hildon_weekday_picker_destroy(GtkObject * self)
+{
+    HildonWeekdayPickerPrivate *priv;
+    gint i;
+
+    priv = HILDON_WEEKDAY_PICKER_GET_PRIVATE(self);
+
+    for (i = 1; i <= 7; ++i) {
+      if (priv->buttons[i])
+      {
+        gtk_widget_unparent(priv->buttons[i]);
+        priv->buttons[i] = NULL;
+      }
+    }
+
+    if (GTK_OBJECT_CLASS(parent_class)->destroy)
+        GTK_OBJECT_CLASS(parent_class)->destroy(self);
+
+}
+
+static void 
+hildon_weekday_picker_size_request(GtkWidget * widget,
+                                   GtkRequisition *requisition)
+{
+    HildonWeekdayPicker *picker;
+    HildonWeekdayPickerPrivate *priv;
+    gint i;
+    GtkRequisition req;
+
+    picker = HILDON_WEEKDAY_PICKER(widget);
+    priv = HILDON_WEEKDAY_PICKER_GET_PRIVATE(picker);
+    requisition->width = 0;
+    requisition->height = 0;
+
+    for (i = 1; i <= 7; ++i) {
+        gtk_widget_size_request(priv->buttons[i], &req);
+        requisition->width += req.width;
+        if (req.height > requisition->height)
+            requisition->height = req.height;
+
+    }
+}
+
+static void 
+hildon_weekday_picker_size_allocate(GtkWidget * widget,
+                                                GtkAllocation * allocation)
+{
+    HildonWeekdayPicker *picker;
+    HildonWeekdayPickerPrivate *priv;
+    gint i;
+    GtkAllocation alloc;
+    GtkRequisition child_requisition;
+    gint header_x;
+    guint sval;
+    GtkTextDirection direction;
+
+    g_return_if_fail(widget);
+    g_return_if_fail(allocation);
+
+    /* Check orientation */
+    direction = gtk_widget_get_direction(widget);
+
+    picker = HILDON_WEEKDAY_PICKER(widget);
+    priv = HILDON_WEEKDAY_PICKER_GET_PRIVATE(picker);
+    header_x = allocation->x;
+    widget->allocation = *allocation;
+
+    if (direction == GTK_TEXT_DIR_LTR || direction == GTK_TEXT_DIR_NONE)
+        sval = 1;
+    else
+        sval = 7;
+    for (i = 1; i <= 7; ++i) {
+        gtk_widget_get_child_requisition(priv->buttons[sval],
+                                         &child_requisition);
+
+        alloc.x = header_x;
+        alloc.y = allocation->y;
+        alloc.width = child_requisition.width;
+        alloc.height = child_requisition.height;
+        header_x += alloc.width;
+        gtk_widget_size_allocate(priv->buttons[sval], &alloc);
+        if (direction == GTK_TEXT_DIR_RTL)
+            sval--;
+        else
+            sval++;
+    }
+}
+
+static void
+button_toggle(GtkToggleButton * button, gpointer data)
+{
+    HildonWeekdayPicker *picker;
+    HildonWeekdayPickerPrivate *priv;
+    gint i;
+    static guint wdays[] = { 1, 2, 4, 8, 16, 32, 64, 128 };
+
+    g_return_if_fail(button);
+    g_return_if_fail(data);
+
+    picker = HILDON_WEEKDAY_PICKER(data);
+    priv = HILDON_WEEKDAY_PICKER_GET_PRIVATE(picker);
+
+    for (i = 1; i <= 7; ++i) {
+        if (GTK_WIDGET(button) == priv->buttons[i]) {
+            priv->days ^= wdays[i];
+            g_signal_emit (GTK_WIDGET(picker), signals[SELECTION_CHANGED_SIGNAL],
+                   0, priv->dayorder[i]);
+            break;
+        }
+    }
+}
+
+/**
+ * hildon_weekday_picker_set_day:
+ * @picker: the @HildonWeekdayPicker widget
+ * @day: Day to be set
+ *
+ * Select specified weekday.
+ */
+void 
+hildon_weekday_picker_set_day(HildonWeekdayPicker * picker,
+                                   GDateWeekday day)
+{
+    HildonWeekdayPickerPrivate *priv;
+    static guint wdays[] = { 1, 2, 4, 8, 16, 32, 64, 128 };
+    guint i;
+
+    g_return_if_fail(picker);
+    g_return_if_fail(day >= 1 && day <= 7);
+
+    priv = HILDON_WEEKDAY_PICKER_GET_PRIVATE(picker);
+
+    if (day == G_DATE_SUNDAY)
+        day = G_DATE_MONDAY;
+    else
+        day++;
+
+    for (i = 1; i <= 7; i++) {
+        if (priv->dayorder[i] == day) {
+            if (!(priv->days & wdays[i]))
+                gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+                                             (priv->buttons[i]), TRUE);
+        }
+    }
+}
+
+/**
+ * hildon_weekday_picker_unset_day:
+ * @picker: the @HildonWeekdayPicker widget
+ * @day: Day to be unset
+ *
+ * Unselect specified weekday.
+ */
+void 
+hildon_weekday_picker_unset_day(HildonWeekdayPicker * picker,
+                                     GDateWeekday day)
+{
+    HildonWeekdayPickerPrivate *priv;
+    static guint wdays[] = { 1, 2, 4, 8, 16, 32, 64, 128 };
+    guint i;
+
+    g_return_if_fail(picker);
+    g_return_if_fail(day >= 1 && day <= 7);
+
+    priv = HILDON_WEEKDAY_PICKER_GET_PRIVATE(picker);
+
+    if (day == G_DATE_SUNDAY)
+        day = G_DATE_MONDAY;
+    else
+        day++;
+
+    for (i = 1; i <= 7; i++) {
+        if (priv->dayorder[i] == day) {
+            if (priv->days & wdays[i])
+                gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+                                             (priv->buttons[i]), FALSE);
+        }
+    }
+}
+
+/**
+ * hildon_weekday_picker_toggle_day:
+ * @picker: the @HildonWeekdayPicker widget
+ * @day: Day to be toggled
+ *
+ * Toggle current status of the specified weekday.
+ */
+void 
+hildon_weekday_picker_toggle_day(HildonWeekdayPicker * picker,
+                                      GDateWeekday day)
+{
+    HildonWeekdayPickerPrivate *priv;
+    guint i;
+    gboolean is_active;
+   
+    g_return_if_fail(picker);
+    g_return_if_fail(day >= 1 && day <= 7);
+
+    priv = HILDON_WEEKDAY_PICKER_GET_PRIVATE(picker);
+
+    if (day == G_DATE_SUNDAY)
+        day = G_DATE_MONDAY;
+    else
+        day++;
+
+    for (i = 1; i <= 7; i++) {
+        if (priv->dayorder[i] == day) {
+            is_active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
+                                       (priv->buttons[i]));
+            gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+                                         (priv->buttons[i]),
+                                         is_active ? FALSE : TRUE);
+        }
+    }
+}
+
+/**
+ * hildon_weekday_picker_set_all:
+ * @picker: the @HildonWeekdayPicker widget
+ *
+ * Set all weekdays.
+ */
+void 
+hildon_weekday_picker_set_all(HildonWeekdayPicker * picker)
+{
+    HildonWeekdayPickerPrivate *priv;
+    gint i;
+    static guint wdays[] = { 1, 2, 4, 8, 16, 32, 64, 128 };
+
+    g_return_if_fail(picker);
+
+    priv = HILDON_WEEKDAY_PICKER_GET_PRIVATE(picker);
+
+    for (i = 1; i <= 7; i++) {
+        if (!(priv->days & wdays[i]))
+            gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+                                         (priv->buttons[i]), TRUE);
+    }
+}
+
+/**
+ * hildon_weekday_picker_unset_all:
+ * @picker: the @HildonWeekdayPicker widget
+ *
+ * Unset all weekdays.
+ */
+void 
+hildon_weekday_picker_unset_all(HildonWeekdayPicker * picker)
+{
+    HildonWeekdayPickerPrivate *priv;
+    gint i;
+    static guint wdays[] = { 1, 2, 4, 8, 16, 32, 64, 128 };
+
+    g_return_if_fail(picker);
+
+    priv = HILDON_WEEKDAY_PICKER_GET_PRIVATE(picker);
+
+    for (i = 1; i <= 7; i++) {
+        if (priv->days & wdays[i])
+            gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
+                                         (priv->buttons[i]), FALSE);
+    }
+}
+
+/**
+ * hildon_weekday_picker_set_all:
+ * @picker: the @HildonWeekdayPicker widget
+ * @day: Day to be checked.
+ *
+ * Check if the specified weekday is set.
+ *
+ * Return value: TRUE if the day is set. 
+ */
+gboolean 
+hildon_weekday_picker_isset_day(HildonWeekdayPicker * picker,
+                                         GDateWeekday day)
+{
+    HildonWeekdayPickerPrivate *priv;
+    guint i;
+
+    g_return_val_if_fail(picker, FALSE);
+    g_return_val_if_fail(day >= 1 && day <= 7, FALSE);
+
+    priv = HILDON_WEEKDAY_PICKER_GET_PRIVATE(picker);
+
+    if (day == G_DATE_SUNDAY)
+        day = G_DATE_MONDAY;
+    else
+        day++;
+
+    for (i = 1; i <= 7; i++) {
+        if ( priv->dayorder[i] == day && 
+             gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
+                                         (priv->buttons[i]))) {
+             return TRUE;
+        }
+    }
+    return FALSE;
+}
diff --git a/hildon-widgets/hildon-weekday-picker.h b/hildon-widgets/hildon-weekday-picker.h
new file mode 100644 (file)
index 0000000..c518dec
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __HILDON_WEEKDAY_PICKER_H__
+#define __HILDON_WEEKDAY_PICKER_H__
+
+#include <gtk/gtkcontainer.h>
+
+G_BEGIN_DECLS
+/**
+ * HILDON_WEEKDAY_PICKER_TYPE:
+ *
+ * Macro for getting type of weekday picker.
+ */
+#define HILDON_WEEKDAY_PICKER_TYPE \
+        ( hildon_weekday_picker_get_type() )
+#define HILDON_WEEKDAY_PICKER(obj) \
+        (GTK_CHECK_CAST (obj, HILDON_WEEKDAY_PICKER_TYPE, \
+         HildonWeekdayPicker))
+#define HILDON_WEEKDAY_PICKER_CLASS(klass) \
+        (GTK_CHECK_CLASS_CAST ((klass), \
+         HILDON_WEEKDAY_PICKER_TYPE, HildonWeekdayPickerClass))
+#define HILDON_IS_WEEKDAY_PICKER(obj) \
+        (GTK_CHECK_TYPE (obj, HILDON_WEEKDAY_PICKER_TYPE))
+#define HILDON_IS_WEEKDAY_PICKER_CLASS(klass) \
+        (GTK_CHECK_CLASS_TYPE ((klass), HILDON_WEEKDAY_PICKER_TYPE))
+/**
+ * HildonWeekdayPicker:
+ *
+ * Internal struct for weekday picker.
+ */
+typedef struct _HildonWeekdayPicker HildonWeekdayPicker;
+typedef struct _HildonWeekdayPickerClass HildonWeekdayPickerClass;
+
+struct _HildonWeekdayPicker {
+    GtkContainer parent;
+};
+
+struct _HildonWeekdayPickerClass {
+    GtkContainerClass parent_class;
+
+    void (*selection_changed) (HildonWeekdayPicker * self);
+};
+  
+GType hildon_weekday_picker_get_type(void);
+
+/**
+ * hildon_weekday_picker_new:
+ *
+ * Creates a new #HildonWeekdayPicker.
+ * 
+ * Return value: New #HildonWeekdayPicker.
+ **/
+GtkWidget *hildon_weekday_picker_new(void);
+
+/**
+ * hildon_weekday_picker_set_day:
+ * @picker: #HildonWeekdayPicker.
+ * @day: #GDateWeekday.
+ *
+ * Select specified weekday.
+ *
+ **/
+void hildon_weekday_picker_set_day(HildonWeekdayPicker * picker,
+                                   GDateWeekday day);
+
+/**
+ * hildon_weekday_picker_unset_day:
+ * @picker: #HildonWeekdayPicker.
+ * @day: #GDateWeekday.
+ *
+ * Unselect specified weekday.
+ *
+ **/
+void hildon_weekday_picker_unset_day(HildonWeekdayPicker * picker,
+                                     GDateWeekday day);
+
+/**
+ * hildon_weekday_picker_toggle_day:
+ * @picker: #HildonWeekdayPicker.
+ * @day: #GDateWeekday.
+ *
+ * Toggle current status of the specified weekday.
+ *
+ **/
+void hildon_weekday_picker_toggle_day(HildonWeekdayPicker * picker,
+                                      GDateWeekday day);
+
+/**
+ * hildon_weekday_picker_set_all:
+ * @picker: #HildonWeekdayPicker.
+ *
+ * Select all weekdays. 
+ *
+ **/
+void hildon_weekday_picker_set_all(HildonWeekdayPicker * picker);
+
+/**
+ * hildon_weekday_picker_unset_all:
+ * @picker: #HildonWeekdayPicker.
+ *
+ * Unselect all weekdays. 
+ *
+ **/
+void hildon_weekday_picker_unset_all(HildonWeekdayPicker * picker);
+
+/**
+ * hildon_weekday_picker_isset_day:
+ * @picker: #HildonWeekdayPicker.
+ * @day: #GDateWeekday.
+ *
+ * Check if the specified weekday is set. 
+ *
+ * Return value: Set/not set.
+ **/
+gboolean hildon_weekday_picker_isset_day(HildonWeekdayPicker * picker,
+                                         GDateWeekday day);
+
+G_END_DECLS
+#endif
diff --git a/hildon-widgets/hildon-wizard-dialog.c b/hildon-widgets/hildon-wizard-dialog.c
new file mode 100644 (file)
index 0000000..c8599fe
--- /dev/null
@@ -0,0 +1,373 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <gtk/gtkdialog.h>
+#include <gtk/gtknotebook.h>
+#include <gtk/gtkimage.h>
+#include <gtk/gtkbox.h>
+#include <gtk/gtkhbox.h>
+#include <hildon-widgets/hildon-defines.h>
+
+#include "hildon-wizard-dialog.h"
+
+#include <libintl.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#define _(String) dgettext(PACKAGE, String)
+
+static GtkDialogClass *parent_class;
+
+static void hildon_wizard_dialog_class_init(HildonWizardDialogClass *
+                                            wizard_dialog_class);
+static void hildon_wizard_dialog_init(HildonWizardDialog * wizard_dialog);
+static void
+hildon_wizard_dialog_create_title(HildonWizardDialog * wizard_dialog);
+static void hildon_wizard_dialog_response(HildonWizardDialog *
+                                          wizard_dialog, gint response_id,
+                                          gpointer data);
+static void hildon_wizard_dialog_set_property(GObject * object,
+                                              guint property_id,
+                                              const GValue * value,
+                                              GParamSpec * pspec);
+static void hildon_wizard_dialog_get_property(GObject * object,
+                                              guint property_id,
+                                              GValue * value,
+                                              GParamSpec * pspec);
+static void hildon_wizard_dialog_finalize(GObject * object);
+
+
+enum {
+    PROP_WIZARD_NAME = 1,
+    PROP_WIZARD_NOTEBOOK
+};
+
+struct _HildonWizardDialogPrivate {
+    gchar *wizard_name;
+    GtkNotebook *notebook;
+    GtkBox *box;
+    GtkImage *image;
+};
+
+
+GType hildon_wizard_dialog_get_type(void)
+{
+    static GType wizard_dialog_type = 0;
+
+    if (!wizard_dialog_type) {
+        static const GTypeInfo wizard_dialog_info = {
+            sizeof(HildonWizardDialogClass),
+            NULL,       /* base_init */
+            NULL,       /* base_finalize */
+            (GClassInitFunc) hildon_wizard_dialog_class_init,
+            NULL,       /* class_finalize */
+            NULL,       /* class_data */
+            sizeof(HildonWizardDialog),
+            0,  /* n_preallocs */
+            (GInstanceInitFunc) hildon_wizard_dialog_init,
+        };
+        wizard_dialog_type = g_type_register_static(GTK_TYPE_DIALOG,
+                                                    "HildonWizardDialog",
+                                                    &wizard_dialog_info,
+                                                    0);
+    }
+    return wizard_dialog_type;
+}
+
+
+static void
+hildon_wizard_dialog_class_init(HildonWizardDialogClass *
+                                wizard_dialog_class)
+{
+    GObjectClass *object_class = G_OBJECT_CLASS(wizard_dialog_class);
+
+    parent_class = g_type_class_peek_parent(wizard_dialog_class);
+
+    g_type_class_add_private(wizard_dialog_class,
+                             sizeof(HildonWizardDialogPrivate));
+
+    object_class->set_property = hildon_wizard_dialog_set_property;
+    object_class->get_property = hildon_wizard_dialog_get_property;
+    object_class->finalize = hildon_wizard_dialog_finalize;
+
+    g_object_class_install_property(object_class, PROP_WIZARD_NAME,
+        g_param_spec_string("wizard-name",
+                            "Wizard Name",
+                            "Set the HildonWizardDialog name",
+                            NULL,
+                            G_PARAM_READWRITE));
+
+    g_object_class_install_property(object_class, PROP_WIZARD_NOTEBOOK,
+        g_param_spec_object("wizard-notebook",
+                            "Wizard Notebook",
+                            "Set the GtkNotebook to be used in the "
+                              "HildonWizardDialog",
+                            GTK_TYPE_NOTEBOOK, G_PARAM_READWRITE));
+}
+
+static void hildon_wizard_dialog_finalize(GObject * object)
+{
+    g_free(HILDON_WIZARD_DIALOG(object)->priv->wizard_name);
+    if (G_OBJECT_CLASS(parent_class)->finalize)
+        G_OBJECT_CLASS(parent_class)->finalize(object);
+}
+
+static void hildon_wizard_dialog_init(HildonWizardDialog * wizard_dialog)
+{
+    HildonWizardDialogPrivate *priv =
+        G_TYPE_INSTANCE_GET_PRIVATE(wizard_dialog,
+                                    HILDON_TYPE_WIZARD_DIALOG,
+                                    HildonWizardDialogPrivate);
+    GtkDialog *dialog = GTK_DIALOG(wizard_dialog);
+
+    wizard_dialog->priv = priv;
+    priv->box = GTK_BOX(gtk_hbox_new(FALSE, 0));
+    priv->image = GTK_IMAGE(gtk_image_new_from_stock("hildon-wizard-icon",
+                                                     HILDON_ICON_SIZE_WIDG_WIZARD));
+    priv->notebook = NULL;
+    priv->wizard_name = NULL;
+
+    gtk_box_pack_start_defaults(GTK_BOX(dialog->vbox),
+                                GTK_WIDGET(priv->box));
+    gtk_box_pack_start_defaults(GTK_BOX(priv->box),
+                                GTK_WIDGET(priv->image));
+
+    gtk_dialog_add_button(dialog, _("Ecdg_bd_wizard_cancel"),
+                          HILDON_WIZARD_DIALOG_CANCEL);
+    gtk_dialog_add_button(dialog, _("Ecdg_bd_wizard_previous"),
+                          HILDON_WIZARD_DIALOG_PREVIOUS);
+    gtk_dialog_add_button(dialog, _("Ecdg_bd_wizard_next"),
+                          HILDON_WIZARD_DIALOG_NEXT);
+    gtk_dialog_add_button(dialog, _("Ecdg_bd_wizard_finish"),
+                          HILDON_WIZARD_DIALOG_FINISH);
+
+    g_signal_connect(G_OBJECT(dialog), "response",
+                     G_CALLBACK(hildon_wizard_dialog_response), NULL);
+
+    gtk_dialog_set_response_sensitive(GTK_DIALOG(wizard_dialog),
+                                      HILDON_WIZARD_DIALOG_PREVIOUS,
+                                      FALSE);
+    gtk_dialog_set_response_sensitive(GTK_DIALOG(wizard_dialog),
+                                      HILDON_WIZARD_DIALOG_FINISH,
+                                      FALSE);
+
+    hildon_wizard_dialog_create_title(wizard_dialog);
+}
+
+
+static void
+hildon_wizard_dialog_set_property(GObject * object, guint property_id,
+                                  const GValue * value, GParamSpec * pspec)
+{
+    HildonWizardDialogPrivate *priv = HILDON_WIZARD_DIALOG(object)->priv;
+
+    switch (property_id) {
+    case PROP_WIZARD_NAME:
+        if (priv->wizard_name)
+            g_free(priv->wizard_name);
+        priv->wizard_name = g_strdup((gchar *) g_value_get_string(value));
+        if (priv->notebook)
+            hildon_wizard_dialog_create_title(HILDON_WIZARD_DIALOG
+                                              (object));
+        break;
+    case PROP_WIZARD_NOTEBOOK:
+        priv->notebook = GTK_NOTEBOOK(g_value_get_object(value));
+        gtk_notebook_set_show_tabs(priv->notebook, FALSE);
+        gtk_box_pack_start_defaults(GTK_BOX(priv->box),
+                                    GTK_WIDGET(priv->notebook));
+        if (priv->wizard_name)
+            hildon_wizard_dialog_create_title(HILDON_WIZARD_DIALOG
+                                              (object));
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
+        break;
+    }
+}
+
+
+static void
+hildon_wizard_dialog_get_property(GObject * object, guint property_id,
+                                  GValue * value, GParamSpec * pspec)
+{
+    HildonWizardDialogPrivate *priv = HILDON_WIZARD_DIALOG(object)->priv;
+
+    switch (property_id) {
+    case PROP_WIZARD_NAME:
+        g_value_set_string(value, priv->wizard_name);
+        break;
+    case PROP_WIZARD_NOTEBOOK:
+        g_value_set_object(value, priv->notebook);
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
+        break;
+    }
+}
+
+
+static void
+hildon_wizard_dialog_create_title(HildonWizardDialog * wizard_dialog)
+{
+    gint pages, current;
+    gchar *str = NULL;
+    HildonWizardDialogPrivate *priv = wizard_dialog->priv;
+    GtkNotebook *notebook = priv->notebook;
+    /*
+    const gchar *step = _("step");
+    const gchar *welcome = _("Welcome");
+    const gchar *wizard_completed = _("Wizard completed");
+    */
+    if (!notebook)
+        return;
+    pages = gtk_notebook_get_n_pages(notebook);
+    current = gtk_notebook_get_current_page(priv->notebook);
+    if (current < 0)
+        current = 0;
+
+    if (current == 0) {
+        str = g_strdup_printf(_("Ecdg_ti_wizard_welcome"), 
+                              priv->wizard_name, pages);
+    } else if (current + 1 == pages) {
+        gchar *steps = (gchar *) gtk_notebook_get_tab_label_text(notebook,
+            gtk_notebook_get_nth_page(notebook, current));
+        str = g_strdup_printf(_("Ecdg_ti_wizard_step"), 
+                              priv->wizard_name, current + 1, pages, steps);
+    } else {
+        gchar *steps = (gchar *) gtk_notebook_get_tab_label_text(notebook,
+            gtk_notebook_get_nth_page(notebook, current));
+        str = g_strdup_printf(_("Ecdg_ti_wizard_step"), 
+                              priv->wizard_name, current + 1, pages, steps);
+    }
+    /*
+    if (current == 0)
+        str = g_strdup_printf("%s %s %d/%d %s", priv->wizard_name, step,
+                              current + 1, pages, welcome);
+    else if (current + 1 == pages)
+        str = g_strdup_printf("%s %s %d/%d %s",
+                              priv->wizard_name, step, current + 1, pages,
+                              wizard_completed);
+    else {
+        gchar *steps = (gchar *) gtk_notebook_get_tab_label_text(notebook,
+            gtk_notebook_get_nth_page(notebook, current));
+        str = g_strdup_printf("%s %s %d/%d: %s", priv->wizard_name, step,
+                              current + 1, pages, steps);
+    }
+    */
+    gtk_window_set_title(GTK_WINDOW(wizard_dialog), str);
+    g_free(str);
+}
+
+
+static void hildon_wizard_dialog_response(HildonWizardDialog *
+                                          wizard_dialog, gint response_id,
+                                          gpointer data)
+{
+    HildonWizardDialogPrivate *priv = wizard_dialog->priv;
+    GtkNotebook *notebook = priv->notebook;
+    gint current = 0;
+    gint last = gtk_notebook_get_n_pages(notebook) - 1;
+
+    switch (response_id) {
+    case HILDON_WIZARD_DIALOG_PREVIOUS:
+        gtk_notebook_prev_page(notebook);
+        current = gtk_notebook_get_current_page(notebook);
+        if (current == 0)
+        {
+            gtk_dialog_set_response_sensitive
+                (GTK_DIALOG(wizard_dialog),
+                 HILDON_WIZARD_DIALOG_PREVIOUS,
+                 FALSE);
+            gtk_dialog_set_response_sensitive
+                (GTK_DIALOG(wizard_dialog),
+                 HILDON_WIZARD_DIALOG_FINISH,
+                 FALSE);
+        }
+        if (current != last)
+            gtk_dialog_set_response_sensitive(GTK_DIALOG(wizard_dialog),
+                                              HILDON_WIZARD_DIALOG_NEXT,
+                                              TRUE);
+
+        g_signal_stop_emission_by_name(wizard_dialog, "response");
+        break;
+    case HILDON_WIZARD_DIALOG_NEXT:
+        gtk_notebook_next_page(notebook);
+        current = gtk_notebook_get_current_page(notebook);
+        if (gtk_notebook_get_current_page(notebook) != 0)
+        {
+            gtk_dialog_set_response_sensitive
+                (GTK_DIALOG(wizard_dialog),
+                 HILDON_WIZARD_DIALOG_PREVIOUS,
+                 TRUE);
+            gtk_dialog_set_response_sensitive
+                (GTK_DIALOG(wizard_dialog),
+                 HILDON_WIZARD_DIALOG_FINISH,
+                 TRUE);
+        }
+        if (current == last)
+            gtk_dialog_set_response_sensitive(GTK_DIALOG(wizard_dialog),
+                                              HILDON_WIZARD_DIALOG_NEXT,
+                                              FALSE);
+        g_signal_stop_emission_by_name(wizard_dialog, "response");
+        break;
+    case HILDON_WIZARD_DIALOG_CANCEL:
+    case HILDON_WIZARD_DIALOG_FINISH:
+        return;
+    };
+
+    if (current == last || current == 0)
+        gtk_widget_show(GTK_WIDGET(priv->image));
+    else
+        gtk_widget_hide(GTK_WIDGET(priv->image));
+    hildon_wizard_dialog_create_title(wizard_dialog);
+}
+
+
+/**
+ * hildon_wizard_dialog_new:
+ * @parent: A #GtkWindow
+ * @wizard_name: The name of dialog
+ * @notebook: The notebook to be shown on the dialog
+ *
+ * Creates a new #HildonWizardDialog
+ *
+ * Return value: A new HildonWizardDialog
+ */
+GtkWidget *hildon_wizard_dialog_new(GtkWindow * parent,
+                                    const char *wizard_name,
+                                    GtkNotebook * notebook)
+{
+    GtkWidget *widget;
+
+    g_return_val_if_fail(GTK_IS_NOTEBOOK(notebook), NULL);
+    widget = GTK_WIDGET(g_object_new(HILDON_TYPE_WIZARD_DIALOG,
+                                     "wizard-name", wizard_name,
+                                     "wizard-notebook", notebook, NULL));
+    if (parent)
+        gtk_window_set_transient_for(GTK_WINDOW(widget), parent);
+
+    return widget;
+}
diff --git a/hildon-widgets/hildon-wizard-dialog.h b/hildon-widgets/hildon-wizard-dialog.h
new file mode 100644 (file)
index 0000000..cb6d90f
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+#ifndef __HILDON_WIZARD_DIALOG_H__
+#define __HILDON_WIZARD_DIALOG_H__
+
+#include<gtk/gtkwidget.h>
+#include<gtk/gtkwindow.h>
+#include<gtk/gtknotebook.h>
+#include<gtk/gtkdialog.h>
+
+G_BEGIN_DECLS
+#define HILDON_TYPE_WIZARD_DIALOG ( hildon_wizard_dialog_get_type() )
+#define HILDON_WIZARD_DIALOG(obj) (GTK_CHECK_CAST (obj,\
+        HILDON_TYPE_WIZARD_DIALOG, HildonWizardDialog))
+#define HILDON_WIZARD_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass),\
+        HILDON_TYPE_WIZARD_DIALOG, HildonWizardDialogClass))
+#define HILDON_IS_WIZARD_DIALOG(obj) (GTK_CHECK_TYPE (obj,\
+        HILDON_TYPE_WIZARD_DIALOG))
+#define HILDON_IS_WIZARD_DIALOG_CLASS(klass) \
+        (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_WIZARD_DIALOG))
+typedef struct _HildonWizardDialog HildonWizardDialog;
+typedef struct _HildonWizardDialogClass HildonWizardDialogClass;
+typedef struct _HildonWizardDialogPrivate HildonWizardDialogPrivate;
+
+
+enum {
+    HILDON_WIZARD_DIALOG_CANCEL,
+    HILDON_WIZARD_DIALOG_PREVIOUS,
+    HILDON_WIZARD_DIALOG_NEXT,
+    HILDON_WIZARD_DIALOG_FINISH
+};
+
+struct _HildonWizardDialog {
+    GtkDialog parent;
+    HildonWizardDialogPrivate *priv;
+};
+
+struct _HildonWizardDialogClass {
+    GtkDialogClass parent_class;
+    void (*_gtk_reserved1) (void);
+    void (*_gtk_reserved2) (void);
+    void (*_gtk_reserved3) (void);
+    void (*_gtk_reserved4) (void);
+};
+
+
+GType hildon_wizard_dialog_get_type(void);
+
+GtkWidget *hildon_wizard_dialog_new(GtkWindow * parent,
+                                    const char *wizard_name,
+                                    GtkNotebook * notebook);
+
+G_END_DECLS
+#endif
diff --git a/install-sh b/install-sh
new file mode 100755 (executable)
index 0000000..6ce63b9
--- /dev/null
@@ -0,0 +1,294 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+#
+# 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.  It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+    case $1 in
+       -c) instcmd=$cpprog
+           shift
+           continue;;
+
+       -d) dir_arg=true
+           shift
+           continue;;
+
+       -m) chmodcmd="$chmodprog $2"
+           shift
+           shift
+           continue;;
+
+       -o) chowncmd="$chownprog $2"
+           shift
+           shift
+           continue;;
+
+       -g) chgrpcmd="$chgrpprog $2"
+           shift
+           shift
+           continue;;
+
+       -s) stripcmd=$stripprog
+           shift
+           continue;;
+
+       -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+           shift
+           continue;;
+
+       -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+           shift
+           continue;;
+
+       *)  if [ x"$src" = x ]
+           then
+               src=$1
+           else
+               # this colon is to work around a 386BSD /bin/sh bug
+               :
+               dst=$1
+           fi
+           shift
+           continue;;
+    esac
+done
+
+if [ x"$src" = x ]
+then
+       echo "$0: no input file specified" >&2
+       exit 1
+else
+       :
+fi
+
+if [ x"$dir_arg" != x ]; then
+       dst=$src
+       src=""
+
+       if [ -d "$dst" ]; then
+               instcmd=:
+               chmodcmd=""
+       else
+               instcmd=$mkdirprog
+       fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad
+# if $src (and thus $dsttmp) contains '*'.
+
+       if [ -f "$src" ] || [ -d "$src" ]
+       then
+               :
+       else
+               echo "$0: $src does not exist" >&2
+               exit 1
+       fi
+
+       if [ x"$dst" = x ]
+       then
+               echo "$0: no destination specified" >&2
+               exit 1
+       else
+               :
+       fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+       if [ -d "$dst" ]
+       then
+               dst=$dst/`basename "$src"`
+       else
+               :
+       fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+#  this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+       '
+IFS="${IFS-$defaultIFS}"
+
+oIFS=$IFS
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS=$oIFS
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+       pathcomp=$pathcomp$1
+       shift
+
+       if [ ! -d "$pathcomp" ] ;
+        then
+               $mkdirprog "$pathcomp"
+       else
+               :
+       fi
+
+       pathcomp=$pathcomp/
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+       $doit $instcmd "$dst" &&
+
+       if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
+       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
+       if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
+       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+       if [ x"$transformarg" = x ]
+       then
+               dstfile=`basename "$dst"`
+       else
+               dstfile=`basename "$dst" $transformbasename |
+                       sed $transformarg`$transformbasename
+       fi
+
+# don't allow the sed command to completely eliminate the filename
+
+       if [ x"$dstfile" = x ]
+       then
+               dstfile=`basename "$dst"`
+       else
+               :
+       fi
+
+# Make a couple of temp file names in the proper directory.
+
+       dsttmp=$dstdir/_inst.$$_
+       rmtmp=$dstdir/_rm.$$_
+
+# Trap to clean up temp files at exit.
+
+       trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
+       trap '(exit $?); exit' 1 2 13 15
+
+# Move or copy the file name to the temp name
+
+       $doit $instcmd "$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 $instcmd $src $dsttmp" command.
+
+       if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
+       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
+       if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
+       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
+
+# 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.
+
+{
+       if [ -f "$dstdir/$dstfile" ]
+       then
+               $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
+               $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
+               {
+                 echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+                 (exit 1); exit
+               }
+       else
+               :
+       fi
+} &&
+
+# Now rename the file to the real destination.
+
+       $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+
+fi &&
+
+# The final little trick to "correctly" pass the exit status to the exit trap.
+
+{
+       (exit 0); exit
+}
diff --git a/ltmain.sh b/ltmain.sh
new file mode 100644 (file)
index 0000000..70f0b2d
--- /dev/null
+++ b/ltmain.sh
@@ -0,0 +1,6422 @@
+# ltmain.sh - Provide generalized library-building support services.
+# NOTE: Changing this file will not affect anything until you rerun configure.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
+# Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 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 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.
+
+basename="s,^.*/,,g"
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# The name of this program:
+progname=`echo "$progpath" | $SED $basename`
+modename="$progname"
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=1.5.6
+TIMESTAMP=" (1.1220.2.94 2004/04/10 16:27:27)"
+
+
+# Check that we have a working $echo.
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell, and then maybe $echo will work.
+  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit $EXIT_SUCCESS
+fi
+
+default_mode=
+help="Try \`$progname --help' for more information."
+magic="%%%MAGIC variable%%%"
+mkdir="mkdir"
+mv="mv -f"
+rm="rm -f"
+
+# 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'
+# test EBCDIC or ASCII
+case `echo A|tr A '\301'` in
+ A) # EBCDIC based system
+  SP2NL="tr '\100' '\n'"
+  NL2SP="tr '\r\n' '\100\100'"
+  ;;
+ *) # Assume ASCII based system
+  SP2NL="tr '\040' '\012'"
+  NL2SP="tr '\015\012' '\040\040'"
+  ;;
+esac
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+# We save the old values to restore during execute mode.
+if test "${LC_ALL+set}" = set; then
+  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
+fi
+if test "${LANG+set}" = set; then
+  save_LANG="$LANG"; LANG=C; export LANG
+fi
+
+# Make sure IFS has a sensible default
+: ${IFS="      
+"}
+
+if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+  $echo "$modename: not configured to build any kind of library" 1>&2
+  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+  exit $EXIT_FAILURE
+fi
+
+# Global variables.
+mode=$default_mode
+nonopt=
+prev=
+prevopt=
+run=
+show="$echo"
+show_help=
+execute_dlfiles=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+
+#####################################
+# Shell function definitions:
+# This seems to be the best place for them
+
+# 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.
+func_win32_libid () {
+  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
+    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
+      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+      win32_nmres=`eval $NM -f posix -A $1 | \
+       sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
+      if test "X$win32_nmres" = "Ximport" ; then
+        win32_libid_type="x86 archive import"
+      else
+        win32_libid_type="x86 archive static"
+      fi
+    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_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 () {
+    if test -n "$available_tags" && test -z "$tagname"; then
+      CC_quoted=
+      for arg in $CC; do
+       case $arg in
+         *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+         arg="\"$arg\""
+         ;;
+       esac
+       CC_quoted="$CC_quoted $arg"
+      done
+      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 "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
+      # 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.
+           case $arg in
+             *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
+             arg="\"$arg\""
+             ;;
+           esac
+           CC_quoted="$CC_quoted $arg"
+         done
+           case "$@ " in
+             " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
+             # 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
+         $echo "$modename: unable to infer tagged configuration"
+         $echo "$modename: specify a tag with \`--tag'" 1>&2
+         exit $EXIT_FAILURE
+#        else
+#          $echo "$modename: using $tagname tagged configuration"
+       fi
+       ;;
+      esac
+    fi
+}
+# End of Shell function definitions
+#####################################
+
+# Darwin sucks
+eval std_shrext=\"$shrext_cmds\"
+
+# Parse our command line options once, thoroughly.
+while test "$#" -gt 0
+do
+  arg="$1"
+  shift
+
+  case $arg in
+  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg= ;;
+  esac
+
+  # If the previous option needs an argument, assign it.
+  if test -n "$prev"; then
+    case $prev in
+    execute_dlfiles)
+      execute_dlfiles="$execute_dlfiles $arg"
+      ;;
+    tag)
+      tagname="$arg"
+      preserve_args="${preserve_args}=$arg"
+
+      # Check whether tagname contains only valid characters
+      case $tagname in
+      *[!-_A-Za-z0-9,/]*)
+       $echo "$progname: invalid tag name: $tagname" 1>&2
+       exit $EXIT_FAILURE
+       ;;
+      esac
+
+      case $tagname in
+      CC)
+       # Don't test for the "default" C tag, as we know, it's there, but
+       # not specially marked.
+       ;;
+      *)
+       if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
+         taglist="$taglist $tagname"
+         # Evaluate the configuration.
+         eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
+       else
+         $echo "$progname: ignoring unknown tag $tagname" 1>&2
+       fi
+       ;;
+      esac
+      ;;
+    *)
+      eval "$prev=\$arg"
+      ;;
+    esac
+
+    prev=
+    prevopt=
+    continue
+  fi
+
+  # Have we seen a non-optional argument yet?
+  case $arg in
+  --help)
+    show_help=yes
+    ;;
+
+  --version)
+    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
+    $echo
+    $echo "Copyright (C) 2003  Free Software Foundation, Inc."
+    $echo "This is free software; see the source for copying conditions.  There is NO"
+    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+    exit $EXIT_SUCCESS
+    ;;
+
+  --config)
+    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
+    # Now print the configurations for the tags.
+    for tagname in $taglist; do
+      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
+    done
+    exit $EXIT_SUCCESS
+    ;;
+
+  --debug)
+    $echo "$progname: enabling shell trace mode"
+    set -x
+    preserve_args="$preserve_args $arg"
+    ;;
+
+  --dry-run | -n)
+    run=:
+    ;;
+
+  --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 $EXIT_SUCCESS
+    ;;
+
+  --finish) mode="finish" ;;
+
+  --mode) prevopt="--mode" prev=mode ;;
+  --mode=*) mode="$optarg" ;;
+
+  --preserve-dup-deps) duplicate_deps="yes" ;;
+
+  --quiet | --silent)
+    show=:
+    preserve_args="$preserve_args $arg"
+    ;;
+
+  --tag) prevopt="--tag" prev=tag ;;
+  --tag=*)
+    set tag "$optarg" ${1+"$@"}
+    shift
+    prev=tag
+    preserve_args="$preserve_args --tag"
+    ;;
+
+  -dlopen)
+    prevopt="-dlopen"
+    prev=execute_dlfiles
+    ;;
+
+  -*)
+    $echo "$modename: unrecognized option \`$arg'" 1>&2
+    $echo "$help" 1>&2
+    exit $EXIT_FAILURE
+    ;;
+
+  *)
+    nonopt="$arg"
+    break
+    ;;
+  esac
+done
+
+if test -n "$prevopt"; then
+  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
+  $echo "$help" 1>&2
+  exit $EXIT_FAILURE
+fi
+
+# 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=
+
+if test -z "$show_help"; then
+
+  # Infer the operation mode.
+  if test -z "$mode"; then
+    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
+    $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
+    case $nonopt in
+    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
+      mode=link
+      for arg
+      do
+       case $arg in
+       -c)
+          mode=compile
+          break
+          ;;
+       esac
+      done
+      ;;
+    *db | *dbx | *strace | *truss)
+      mode=execute
+      ;;
+    *install*|cp|mv)
+      mode=install
+      ;;
+    *rm)
+      mode=uninstall
+      ;;
+    *)
+      # If we have no mode, but dlfiles were specified, then do execute mode.
+      test -n "$execute_dlfiles" && mode=execute
+
+      # Just use the default operation mode.
+      if test -z "$mode"; then
+       if test -n "$nonopt"; then
+         $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
+       else
+         $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
+       fi
+      fi
+      ;;
+    esac
+  fi
+
+  # Only execute mode is allowed to have -dlopen flags.
+  if test -n "$execute_dlfiles" && test "$mode" != execute; then
+    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
+    $echo "$help" 1>&2
+    exit $EXIT_FAILURE
+  fi
+
+  # Change the help message to a mode-specific one.
+  generic_help="$help"
+  help="Try \`$modename --help --mode=$mode' for more information."
+
+  # These modes are in order of execution frequency so that they run quickly.
+  case $mode in
+  # libtool compile mode
+  compile)
+    modename="$modename: compile"
+    # 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=
+
+    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)
+         if test -n "$libobj" ; then
+           $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+           exit $EXIT_FAILURE
+         fi
+         arg_mode=target
+         continue
+         ;;
+
+       -static | -prefer-pic | -prefer-non-pic)
+         later="$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,*)
+         args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
+         lastarg=
+         save_ifs="$IFS"; IFS=','
+         for arg in $args; do
+           IFS="$save_ifs"
+
+           # Double-quote args containing other shell metacharacters.
+           # Many Bourne shells cannot handle close brackets correctly
+           # in scan sets, so we specify it separately.
+           case $arg in
+             *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
+             arg="\"$arg\""
+             ;;
+           esac
+           lastarg="$lastarg $arg"
+         done
+         IFS="$save_ifs"
+         lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
+
+         # Add the arguments to base_compile.
+         base_compile="$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.
+      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
+
+      case $lastarg in
+      # Double-quote args containing other shell metacharacters.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
+       lastarg="\"$lastarg\""
+       ;;
+      esac
+
+      base_compile="$base_compile $lastarg"
+    done # for arg
+
+    case $arg_mode in
+    arg)
+      $echo "$modename: you must specify an argument for -Xcompile"
+      exit $EXIT_FAILURE
+      ;;
+    target)
+      $echo "$modename: you must specify a target with \`-o'" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    *)
+      # Get the name of the library object.
+      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+      ;;
+    esac
+
+    # Recognize several different file suffixes.
+    # If the user specifies -o file.o, it is replaced with file.lo
+    xform='[cCFSifmso]'
+    case $libobj in
+    *.ada) xform=ada ;;
+    *.adb) xform=adb ;;
+    *.ads) xform=ads ;;
+    *.asm) xform=asm ;;
+    *.c++) xform=c++ ;;
+    *.cc) xform=cc ;;
+    *.ii) xform=ii ;;
+    *.class) xform=class ;;
+    *.cpp) xform=cpp ;;
+    *.cxx) xform=cxx ;;
+    *.f90) xform=f90 ;;
+    *.for) xform=for ;;
+    *.java) xform=java ;;
+    esac
+
+    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+
+    case $libobj in
+    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
+    *)
+      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    esac
+
+    func_infer_tag $base_compile
+
+    for arg in $later; do
+      case $arg in
+      -static)
+       build_old_libs=yes
+       continue
+       ;;
+
+      -prefer-pic)
+       pic_mode=yes
+       continue
+       ;;
+
+      -prefer-non-pic)
+       pic_mode=no
+       continue
+       ;;
+      esac
+    done
+
+    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+    if test "X$xdir" = "X$obj"; then
+      xdir=
+    else
+      xdir=$xdir/
+    fi
+    lobj=${xdir}$objdir/$objname
+
+    if test -z "$base_compile"; then
+      $echo "$modename: you must specify a compilation command" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    # 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
+
+    $run $rm $removelist
+    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
+
+    # On Cygwin there's no "real" PIC flag so we must build both object types
+    case $host_os in
+    cygwin* | mingw* | pw32* | os2*)
+      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 "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+      lockfile="$output_obj.lock"
+      removelist="$removelist $output_obj $lockfile"
+      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
+    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 $run ln "$progpath" "$lockfile" 2>/dev/null; do
+       $show "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."
+
+       $run $rm $removelist
+       exit $EXIT_FAILURE
+      fi
+      $echo $srcfile > "$lockfile"
+    fi
+
+    if test -n "$fix_srcfile_path"; then
+      eval srcfile=\"$fix_srcfile_path\"
+    fi
+
+    $run $rm "$libobj" "${libobj}T"
+
+    # Create a libtool object file (analogous to a ".la" file),
+    # but don't create it if we're doing a dry run.
+    test -z "$run" && cat > ${libobj}T <<EOF
+# $libobj - a libtool object file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+EOF
+
+    # 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 $srcfile $pic_flag"
+      else
+       # Don't build PIC code
+       command="$base_compile $srcfile"
+      fi
+
+      if test ! -d "${xdir}$objdir"; then
+       $show "$mkdir ${xdir}$objdir"
+       $run $mkdir ${xdir}$objdir
+       status=$?
+       if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
+         exit $status
+       fi
+      fi
+
+      if test -z "$output_obj"; then
+       # Place PIC objects in $objdir
+       command="$command -o $lobj"
+      fi
+
+      $run $rm "$lobj" "$output_obj"
+
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+       test -n "$output_obj" && $run $rm $removelist
+       exit $EXIT_FAILURE
+      fi
+
+      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."
+
+       $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
+       $show "$mv $output_obj $lobj"
+       if $run $mv $output_obj $lobj; then :
+       else
+         error=$?
+         $run $rm $removelist
+         exit $error
+       fi
+      fi
+
+      # Append the name of the PIC object to the libtool object file.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object='$objdir/$objname'
+
+EOF
+
+      # Allow error messages only from the first compilation.
+      if test "$suppress_opt" = yes; then
+        suppress_output=' >/dev/null 2>&1'
+      fi
+    else
+      # No PIC object so indicate it doesn't exist in the libtool
+      # object file.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object=none
+
+EOF
+    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 $srcfile"
+      else
+       command="$base_compile $srcfile $pic_flag"
+      fi
+      if test "$compiler_c_o" = yes; then
+       command="$command -o $obj"
+      fi
+
+      # Suppress compiler output if we already did a PIC compilation.
+      command="$command$suppress_output"
+      $run $rm "$obj" "$output_obj"
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+       $run $rm $removelist
+       exit $EXIT_FAILURE
+      fi
+
+      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."
+
+       $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
+       $show "$mv $output_obj $obj"
+       if $run $mv $output_obj $obj; then :
+       else
+         error=$?
+         $run $rm $removelist
+         exit $error
+       fi
+      fi
+
+      # Append the name of the non-PIC object the libtool object file.
+      # Only append if the libtool object file exists.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object='$objname'
+
+EOF
+    else
+      # Append the name of the non-PIC object the libtool object file.
+      # Only append if the libtool object file exists.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object=none
+
+EOF
+    fi
+
+    $run $mv "${libobj}T" "${libobj}"
+
+    # Unlock the critical section if it was locked
+    if test "$need_locks" != no; then
+      $run $rm "$lockfile"
+    fi
+
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool link mode
+  link | relink)
+    modename="$modename: link"
+    case $host in
+    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+      # 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=
+
+    avoid_version=no
+    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
+
+    func_infer_tag $base_compile
+
+    # We need to know -static, to get the right output filenames.
+    for arg
+    do
+      case $arg in
+      -all-static | -static)
+       if test "X$arg" = "X-all-static"; then
+         if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+           $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
+         fi
+         if test -n "$link_static_flag"; then
+           dlopen_self=$dlopen_self_static
+         fi
+       else
+         if test -z "$pic_flag" && test -n "$link_static_flag"; then
+           dlopen_self=$dlopen_self_static
+         fi
+       fi
+       build_libtool_libs=no
+       build_old_libs=yes
+       prefer_static_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
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
+       qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
+       ;;
+      *) qarg=$arg ;;
+      esac
+      libtool_args="$libtool_args $qarg"
+
+      # If the previous option needs an argument, assign it.
+      if test -n "$prev"; then
+       case $prev in
+       output)
+         compile_command="$compile_command @OUTPUT@"
+         finalize_command="$finalize_command @OUTPUT@"
+         ;;
+       esac
+
+       case $prev in
+       dlfiles|dlprefiles)
+         if test "$preload" = no; then
+           # Add the symbol object into the linking commands.
+           compile_command="$compile_command @SYMFILE@"
+           finalize_command="$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
+             dlfiles="$dlfiles $arg"
+           else
+             dlprefiles="$dlprefiles $arg"
+           fi
+           prev=
+           continue
+           ;;
+         esac
+         ;;
+       expsyms)
+         export_symbols="$arg"
+         if test ! -f "$arg"; then
+           $echo "$modename: symbol file \`$arg' does not exist"
+           exit $EXIT_FAILURE
+         fi
+         prev=
+         continue
+         ;;
+       expsyms_regex)
+         export_symbols_regex="$arg"
+         prev=
+         continue
+         ;;
+       inst_prefix)
+         inst_prefix_dir="$arg"
+         prev=
+         continue
+         ;;
+       precious_regex)
+         precious_files_regex="$arg"
+         prev=
+         continue
+         ;;
+       release)
+         release="-$arg"
+         prev=
+         continue
+         ;;
+       objectlist)
+         if test -f "$arg"; then
+           save_arg=$arg
+           moreargs=
+           for fil in `cat $save_arg`
+           do
+#            moreargs="$moreargs $fil"
+             arg=$fil
+             # A libtool-controlled object.
+
+             # Check to see that this really is a libtool object.
+             if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+               pic_object=
+               non_pic_object=
+
+               # Read the .lo file
+               # If there is no directory component, then add one.
+               case $arg in
+               */* | *\\*) . $arg ;;
+               *) . ./$arg ;;
+               esac
+
+               if test -z "$pic_object" || \
+                  test -z "$non_pic_object" ||
+                  test "$pic_object" = none && \
+                  test "$non_pic_object" = none; then
+                 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+                 exit $EXIT_FAILURE
+               fi
+
+               # Extract subdirectory from the argument.
+               xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+               if test "X$xdir" = "X$arg"; then
+                 xdir=
+               else
+                 xdir="$xdir/"
+               fi
+
+               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
+                     dlfiles="$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.
+                   dlprefiles="$dlprefiles $pic_object"
+                   prev=
+                 fi
+
+                 # A PIC object.
+                 libobjs="$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
+                 non_pic_objects="$non_pic_objects $non_pic_object"
+                 if test -z "$pic_object" || test "$pic_object" = none ; then
+                   arg="$non_pic_object"
+                 fi
+               fi
+             else
+               # Only an error if not doing a dry-run.
+               if test -z "$run"; then
+                 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+                 exit $EXIT_FAILURE
+               else
+                 # Dry-run case.
+
+                 # Extract subdirectory from the argument.
+                 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+                 if test "X$xdir" = "X$arg"; then
+                   xdir=
+                 else
+                   xdir="$xdir/"
+                 fi
+
+                 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+                 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+                 libobjs="$libobjs $pic_object"
+                 non_pic_objects="$non_pic_objects $non_pic_object"
+               fi
+             fi
+           done
+         else
+           $echo "$modename: link input file \`$save_arg' does not exist"
+           exit $EXIT_FAILURE
+         fi
+         arg=$save_arg
+         prev=
+         continue
+         ;;
+       rpath | xrpath)
+         # We need an absolute path.
+         case $arg in
+         [\\/]* | [A-Za-z]:[\\/]*) ;;
+         *)
+           $echo "$modename: only absolute run-paths are allowed" 1>&2
+           exit $EXIT_FAILURE
+           ;;
+         esac
+         if test "$prev" = rpath; then
+           case "$rpath " in
+           *" $arg "*) ;;
+           *) rpath="$rpath $arg" ;;
+           esac
+         else
+           case "$xrpath " in
+           *" $arg "*) ;;
+           *) xrpath="$xrpath $arg" ;;
+           esac
+         fi
+         prev=
+         continue
+         ;;
+       xcompiler)
+         compiler_flags="$compiler_flags $qarg"
+         prev=
+         compile_command="$compile_command $qarg"
+         finalize_command="$finalize_command $qarg"
+         continue
+         ;;
+       xlinker)
+         linker_flags="$linker_flags $qarg"
+         compiler_flags="$compiler_flags $wl$qarg"
+         prev=
+         compile_command="$compile_command $wl$qarg"
+         finalize_command="$finalize_command $wl$qarg"
+         continue
+         ;;
+       xcclinker)
+         linker_flags="$linker_flags $qarg"
+         compiler_flags="$compiler_flags $qarg"
+         prev=
+         compile_command="$compile_command $qarg"
+         finalize_command="$finalize_command $qarg"
+         continue
+         ;;
+       shrext)
+         shrext_cmds="$arg"
+         prev=
+         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
+         compile_command="$compile_command $link_static_flag"
+         finalize_command="$finalize_command $link_static_flag"
+       fi
+       continue
+       ;;
+
+      -allow-undefined)
+       # FIXME: remove this flag sometime in the future.
+       $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
+       continue
+       ;;
+
+      -avoid-version)
+       avoid_version=yes
+       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
+         $echo "$modename: more than one -exported-symbols argument is not allowed"
+         exit $EXIT_FAILURE
+       fi
+       if test "X$arg" = "X-export-symbols"; then
+         prev=expsyms
+       else
+         prev=expsyms_regex
+       fi
+       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*)
+         compile_command="$compile_command $arg"
+         finalize_command="$finalize_command $arg"
+         ;;
+       esac
+       continue
+       ;;
+
+      -L*)
+       dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
+       # We need an absolute path.
+       case $dir in
+       [\\/]* | [A-Za-z]:[\\/]*) ;;
+       *)
+         absdir=`cd "$dir" && pwd`
+         if test -z "$absdir"; then
+           $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
+           exit $EXIT_FAILURE
+         fi
+         dir="$absdir"
+         ;;
+       esac
+       case "$deplibs " in
+       *" -L$dir "*) ;;
+       *)
+         deplibs="$deplibs -L$dir"
+         lib_search_path="$lib_search_path $dir"
+         ;;
+       esac
+       case $host in
+       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+         case :$dllsearchpath: in
+         *":$dir:"*) ;;
+         *) dllsearchpath="$dllsearchpath:$dir";;
+         esac
+         ;;
+       esac
+       continue
+       ;;
+
+      -l*)
+       if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+         case $host in
+         *-*-cygwin* | *-*-pw32* | *-*-beos*)
+           # These systems don't actually have a C or math library (as such)
+           continue
+           ;;
+         *-*-mingw* | *-*-os2*)
+           # These systems don't actually have a C library (as such)
+           test "X$arg" = "X-lc" && continue
+           ;;
+         *-*-openbsd* | *-*-freebsd*)
+           # 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
+           deplibs="$deplibs -framework System"
+           continue
+         esac
+       elif test "X$arg" = "X-lc_r"; then
+        case $host in
+        *-*-openbsd* | *-*-freebsd*)
+          # Do not include libc_r directly, use -pthread flag.
+          continue
+          ;;
+        esac
+       fi
+       deplibs="$deplibs $arg"
+       continue
+       ;;
+
+     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+       deplibs="$deplibs $arg"
+       continue
+       ;;
+
+      -module)
+       module=yes
+       continue
+       ;;
+
+      # gcc -m* arguments should be passed to the linker via $compiler_flags
+      # in order to pass architecture information to the linker
+      # (e.g. 32 vs 64-bit).  This may also be accomplished via -Wl,-mfoo
+      # but this is not reliable with gcc because gcc may use -mfoo to
+      # select a different linker, different libraries, etc, while
+      # -Wl,-mfoo simply passes -mfoo to the linker.
+      -m*)
+       # Unknown arguments in both finalize_command and compile_command need
+       # to be aesthetically quoted because they are evaled later.
+       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+       case $arg in
+       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
+         arg="\"$arg\""
+         ;;
+       esac
+        compile_command="$compile_command $arg"
+        finalize_command="$finalize_command $arg"
+        if test "$with_gcc" = "yes" ; then
+          compiler_flags="$compiler_flags $arg"
+        fi
+        continue
+        ;;
+
+      -shrext)
+       prev=shrext
+       continue
+       ;;
+
+      -no-fast-install)
+       fast_install=no
+       continue
+       ;;
+
+      -no-install)
+       case $host in
+       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+         # The PATH hackery in wrapper scripts is required on Windows
+         # in order for the loader to find any dlls it needs.
+         $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
+         $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
+         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*)
+       dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
+       # We need an absolute path.
+       case $dir in
+       [\\/]* | [A-Za-z]:[\\/]*) ;;
+       *)
+         $echo "$modename: only absolute run-paths are allowed" 1>&2
+         exit $EXIT_FAILURE
+         ;;
+       esac
+       case "$xrpath " in
+       *" $dir "*) ;;
+       *) xrpath="$xrpath $dir" ;;
+       esac
+       continue
+       ;;
+
+      -static)
+       # 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
+       ;;
+
+      -Wc,*)
+       args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
+       arg=
+       save_ifs="$IFS"; IFS=','
+       for flag in $args; do
+         IFS="$save_ifs"
+         case $flag in
+           *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*|"")
+           flag="\"$flag\""
+           ;;
+         esac
+         arg="$arg $wl$flag"
+         compiler_flags="$compiler_flags $flag"
+       done
+       IFS="$save_ifs"
+       arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+       ;;
+
+      -Wl,*)
+       args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
+       arg=
+       save_ifs="$IFS"; IFS=','
+       for flag in $args; do
+         IFS="$save_ifs"
+         case $flag in
+           *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*|"")
+           flag="\"$flag\""
+           ;;
+         esac
+         arg="$arg $wl$flag"
+         compiler_flags="$compiler_flags $wl$flag"
+         linker_flags="$linker_flags $flag"
+       done
+       IFS="$save_ifs"
+       arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+       ;;
+
+      -Xcompiler)
+       prev=xcompiler
+       continue
+       ;;
+
+      -Xlinker)
+       prev=xlinker
+       continue
+       ;;
+
+      -XCClinker)
+       prev=xcclinker
+       continue
+       ;;
+
+      # Some other compiler flag.
+      -* | +*)
+       # Unknown arguments in both finalize_command and compile_command need
+       # to be aesthetically quoted because they are evaled later.
+       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+       case $arg in
+       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
+         arg="\"$arg\""
+         ;;
+       esac
+       ;;
+
+      *.$objext)
+       # A standard object.
+       objs="$objs $arg"
+       ;;
+
+      *.lo)
+       # A libtool-controlled object.
+
+       # Check to see that this really is a libtool object.
+       if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+         pic_object=
+         non_pic_object=
+
+         # Read the .lo file
+         # If there is no directory component, then add one.
+         case $arg in
+         */* | *\\*) . $arg ;;
+         *) . ./$arg ;;
+         esac
+
+         if test -z "$pic_object" || \
+            test -z "$non_pic_object" ||
+            test "$pic_object" = none && \
+            test "$non_pic_object" = none; then
+           $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+           exit $EXIT_FAILURE
+         fi
+
+         # Extract subdirectory from the argument.
+         xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+         if test "X$xdir" = "X$arg"; then
+           xdir=
+         else
+           xdir="$xdir/"
+         fi
+
+         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
+               dlfiles="$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.
+             dlprefiles="$dlprefiles $pic_object"
+             prev=
+           fi
+
+           # A PIC object.
+           libobjs="$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
+           non_pic_objects="$non_pic_objects $non_pic_object"
+           if test -z "$pic_object" || test "$pic_object" = none ; then
+             arg="$non_pic_object"
+           fi
+         fi
+       else
+         # Only an error if not doing a dry-run.
+         if test -z "$run"; then
+           $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+           exit $EXIT_FAILURE
+         else
+           # Dry-run case.
+
+           # Extract subdirectory from the argument.
+           xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+           if test "X$xdir" = "X$arg"; then
+             xdir=
+           else
+             xdir="$xdir/"
+           fi
+
+           pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+           non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+           libobjs="$libobjs $pic_object"
+           non_pic_objects="$non_pic_objects $non_pic_object"
+         fi
+       fi
+       ;;
+
+      *.$libext)
+       # An archive.
+       deplibs="$deplibs $arg"
+       old_deplibs="$old_deplibs $arg"
+       continue
+       ;;
+
+      *.la)
+       # A libtool-controlled library.
+
+       if test "$prev" = dlfiles; then
+         # This library was specified with -dlopen.
+         dlfiles="$dlfiles $arg"
+         prev=
+       elif test "$prev" = dlprefiles; then
+         # The library was specified with -dlpreopen.
+         dlprefiles="$dlprefiles $arg"
+         prev=
+       else
+         deplibs="$deplibs $arg"
+       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.
+       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+       case $arg in
+       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
+         arg="\"$arg\""
+         ;;
+       esac
+       ;;
+      esac # arg
+
+      # Now actually substitute the argument into the commands.
+      if test -n "$arg"; then
+       compile_command="$compile_command $arg"
+       finalize_command="$finalize_command $arg"
+      fi
+    done # argument parsing loop
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+      eval arg=\"$export_dynamic_flag_spec\"
+      compile_command="$compile_command $arg"
+      finalize_command="$finalize_command $arg"
+    fi
+
+    oldlibs=
+    # calculate the name of the file, without its directory
+    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
+    libobjs_save="$libobjs"
+
+    if test -n "$shlibpath_var"; then
+      # get the directories listed in $shlibpath_var
+      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'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\"
+
+    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+    if test "X$output_objdir" = "X$output"; then
+      output_objdir="$objdir"
+    else
+      output_objdir="$output_objdir/$objdir"
+    fi
+    # Create the object directory.
+    if test ! -d "$output_objdir"; then
+      $show "$mkdir $output_objdir"
+      $run $mkdir $output_objdir
+      status=$?
+      if test "$status" -ne 0 && test ! -d "$output_objdir"; then
+       exit $status
+      fi
+    fi
+
+    # Determine the type of output
+    case $output in
+    "")
+      $echo "$modename: you must specify an output file" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    *.$libext) linkmode=oldlib ;;
+    *.lo | *.$objext) linkmode=obj ;;
+    *.la) linkmode=lib ;;
+    *) linkmode=prog ;; # Anything else should be a program.
+    esac
+
+    case $host in
+    *cygwin* | *mingw* | *pw32*)
+      # don't eliminate duplications in $postdeps and $predeps
+      duplicate_compiler_generated_deps=yes
+      ;;
+    *)
+      duplicate_compiler_generated_deps=$duplicate_deps
+      ;;
+    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 test "X$duplicate_deps" = "Xyes" ; then
+       case "$libs " in
+       *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+       esac
+      fi
+      libs="$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 test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
+       for pre_post_dep in $predeps $postdeps; do
+         case "$pre_post_deps " in
+         *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+         esac
+         pre_post_deps="$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 link"
+       for file in $dlfiles $dlprefiles; do
+         case $file in
+         *.la) ;;
+         *)
+           $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
+           exit $EXIT_FAILURE
+           ;;
+         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
+      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% $dependency_libs" ;;
+       esac
+      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)
+         if test "$linkmode,$pass" = "prog,link"; then
+           compile_deplibs="$deplib $compile_deplibs"
+           finalize_deplibs="$deplib $finalize_deplibs"
+         else
+           deplibs="$deplib $deplibs"
+         fi
+         continue
+         ;;
+       -l*)
+         if test "$linkmode" != lib && test "$linkmode" != prog; then
+           $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
+           continue
+         fi
+         if test "$pass" = conv; then
+           deplibs="$deplib $deplibs"
+           continue
+         fi
+         name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
+         for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; 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 (${SED} -e '2q' $lib |
+                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+                 library_names=
+                 old_library=
+                 case $lib in
+                 */* | *\\*) . $lib ;;
+                 *) . ./$lib ;;
+                 esac
+                 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
+                   ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+                   test "X$ladir" = "X$lib" && ladir="."
+                   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
+       -L*)
+         case $linkmode in
+         lib)
+           deplibs="$deplib $deplibs"
+           test "$pass" = conv && continue
+           newdependency_libs="$deplib $newdependency_libs"
+           newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+           ;;
+         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
+           newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+           ;;
+         *)
+           $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
+           ;;
+         esac # linkmode
+         continue
+         ;; # -L
+       -R*)
+         if test "$pass" = link; then
+           dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+           # Make sure the xrpath contains only unique directories.
+           case "$xrpath " in
+           *" $dir "*) ;;
+           *) xrpath="$xrpath $dir" ;;
+           esac
+         fi
+         deplibs="$deplib $deplibs"
+         continue
+         ;;
+       *.la) lib="$deplib" ;;
+       *.$libext)
+         if test "$pass" = conv; then
+           deplibs="$deplib $deplibs"
+           continue
+         fi
+         case $linkmode in
+         lib)
+           if test "$deplibs_check_method" != pass_all; 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 used here."
+           else
+             $echo
+             $echo "*** Warning: Linking the shared library $output against the"
+             $echo "*** static library $deplib is not portable!"
+             deplibs="$deplib $deplibs"
+           fi
+           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.
+             newdlprefiles="$newdlprefiles $deplib"
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           else
+             newdlfiles="$newdlfiles $deplib"
+           fi
+         fi
+         continue
+         ;;
+       %DEPLIBS%)
+         alldeplibs=yes
+         continue
+         ;;
+       esac # case $deplib
+       if test "$found" = yes || test -f "$lib"; then :
+       else
+         $echo "$modename: cannot find the library \`$lib'" 1>&2
+         exit $EXIT_FAILURE
+       fi
+
+       # Check to see that this really is a libtool archive.
+       if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+       else
+         $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+         exit $EXIT_FAILURE
+       fi
+
+       ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+       test "X$ladir" = "X$lib" && ladir="."
+
+       dlname=
+       dlopen=
+       dlpreopen=
+       libdir=
+       library_names=
+       old_library=
+       # If the library was installed with an old release of libtool,
+       # it will not redefine variables installed, or shouldnotlink
+       installed=yes
+       shouldnotlink=no
+
+       # Read the .la file
+       case $lib in
+       */* | *\\*) . $lib ;;
+       *) . ./$lib ;;
+       esac
+
+       if test "$linkmode,$pass" = "lib,link" ||
+          test "$linkmode,$pass" = "prog,scan" ||
+          { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+         test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+         test -n "$dlpreopen" && dlprefiles="$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
+             $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+             exit $EXIT_FAILURE
+           fi
+           # It is a libtool convenience library, so add in its objects.
+           convenience="$convenience $ladir/$objdir/$old_library"
+           old_convenience="$old_convenience $ladir/$objdir/$old_library"
+           tmp_libs=
+           for deplib in $dependency_libs; do
+             deplibs="$deplib $deplibs"
+              if test "X$duplicate_deps" = "Xyes" ; then
+               case "$tmp_libs " in
+               *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+               esac
+              fi
+             tmp_libs="$tmp_libs $deplib"
+           done
+         elif test "$linkmode" != prog && test "$linkmode" != lib; then
+           $echo "$modename: \`$lib' is not a convenience library" 1>&2
+           exit $EXIT_FAILURE
+         fi
+         continue
+       fi # $pass = conv
+
+
+       # Get the name of the library we link against.
+       linklib=
+       for l in $old_library $library_names; do
+         linklib="$l"
+       done
+       if test -z "$linklib"; then
+         $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+         exit $EXIT_FAILURE
+       fi
+
+       # This library was specified with -dlopen.
+       if test "$pass" = dlopen; then
+         if test -z "$libdir"; then
+           $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
+           exit $EXIT_FAILURE
+         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.
+           dlprefiles="$dlprefiles $lib $dependency_libs"
+         else
+           newdlfiles="$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
+           $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
+           $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
+           abs_ladir="$ladir"
+         fi
+         ;;
+       esac
+       laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+
+       # Find the relevant object directory and library name.
+       if test "X$installed" = Xyes; then
+         if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+           $echo "$modename: warning: library \`$lib' was moved." 1>&2
+           dir="$ladir"
+           absdir="$abs_ladir"
+           libdir="$abs_ladir"
+         else
+           dir="$libdir"
+           absdir="$libdir"
+         fi
+       else
+         dir="$ladir/$objdir"
+         absdir="$abs_ladir/$objdir"
+         # Remove this search path later
+         notinst_path="$notinst_path $abs_ladir"
+       fi # $installed = yes
+       name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+
+       # This library was specified with -dlpreopen.
+       if test "$pass" = dlpreopen; then
+         if test -z "$libdir"; then
+           $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
+           exit $EXIT_FAILURE
+         fi
+         # Prefer using a static library (so that no silly _DYNAMIC symbols
+         # are required to link).
+         if test -n "$old_library"; then
+           newdlprefiles="$newdlprefiles $dir/$old_library"
+         # Otherwise, use the dlname, so that lt_dlopen finds it.
+         elif test -n "$dlname"; then
+           newdlprefiles="$newdlprefiles $dir/$dlname"
+         else
+           newdlprefiles="$newdlprefiles $dir/$linklib"
+         fi
+       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
+         newlib_search_path="$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*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
+           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 test "X$duplicate_deps" = "Xyes" ; then
+             case "$tmp_libs " in
+             *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+             esac
+           fi
+           tmp_libs="$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 -z "$old_library"; }; then
+           # We need to hardcode the library path
+           if test -n "$shlibpath_var"; then
+             # Make sure the rpath contains only unique directories.
+             case "$temp_rpath " in
+             *" $dir "*) ;;
+             *" $absdir "*) ;;
+             *) temp_rpath="$temp_rpath $dir" ;;
+             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 "*) ;;
+             *) compile_rpath="$compile_rpath $absdir"
+             esac
+             ;;
+           esac
+           case " $sys_lib_dlsearch_path " in
+           *" $libdir "*) ;;
+           *)
+             case "$finalize_rpath " in
+             *" $libdir "*) ;;
+             *) finalize_rpath="$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
+       if test -n "$library_names" &&
+          { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+         if test "$installed" = no; then
+           notinst_deplibs="$notinst_deplibs $lib"
+           need_relink=yes
+         fi
+         # This is a shared library
+
+         # Warn about portability, can't link against -module's on
+         # some systems (darwin)
+         if 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 "*) ;;
+             *) compile_rpath="$compile_rpath $absdir"
+             esac
+             ;;
+           esac
+           case " $sys_lib_dlsearch_path " in
+           *" $libdir "*) ;;
+           *)
+             case "$finalize_rpath " in
+             *" $libdir "*) ;;
+             *) finalize_rpath="$finalize_rpath $libdir"
+             esac
+             ;;
+           esac
+         fi
+
+         if test -n "$old_archive_from_expsyms_cmds"; then
+           # figure out the soname
+           set dummy $library_names
+           realname="$2"
+           shift; 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*)
+               major=`expr $current - $age`
+               versuffix="-$major"
+               ;;
+             esac
+             eval soname=\"$soname_spec\"
+           else
+             soname="$realname"
+           fi
+
+           # Make a new name for the extract_expsyms_cmds to use
+           soroot="$soname"
+           soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
+           newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
+
+           # If the library has no export list, then create one now
+           if test -f "$output_objdir/$soname-def"; then :
+           else
+             $show "extracting exported symbol list from \`$soname'"
+             save_ifs="$IFS"; IFS='~'
+             cmds=$extract_expsyms_cmds
+             for cmd in $cmds; do
+               IFS="$save_ifs"
+               eval cmd=\"$cmd\"
+               $show "$cmd"
+               $run eval "$cmd" || exit $?
+             done
+             IFS="$save_ifs"
+           fi
+
+           # Create $newlib
+           if test -f "$output_objdir/$newlib"; then :; else
+             $show "generating import library for \`$soname'"
+             save_ifs="$IFS"; IFS='~'
+             cmds=$old_archive_from_expsyms_cmds
+             for cmd in $cmds; do
+               IFS="$save_ifs"
+               eval cmd=\"$cmd\"
+               $show "$cmd"
+               $run eval "$cmd" || exit $?
+             done
+             IFS="$save_ifs"
+           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 "$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* ) add_dir="-L$dir" ;;
+                 *-*-darwin* )
+                   # if the lib is a module then we can not link against
+                   # it, someone is ignoring the new warnings I added
+                   if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; 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
+                   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; then
+               add="$dir/$linklib"
+             elif test "$hardcode_minus_L" = yes; then
+               add_dir="-L$dir"
+               # Try looking first in the location we're being installed to.
+               if test -n "$inst_prefix_dir"; then
+                 case "$libdir" in
+                   [\\/]*)
+                     add_dir="$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
+             $echo "$modename: configuration error: unsupported hardcode properties"
+             exit $EXIT_FAILURE
+           fi
+
+           if test -n "$add_shlibpath"; then
+             case :$compile_shlibpath: in
+             *":$add_shlibpath:"*) ;;
+             *) compile_shlibpath="$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:"*) ;;
+               *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+               esac
+             fi
+           fi
+         fi
+
+         if test "$linkmode" = prog || test "$mode" = relink; then
+           add_shlibpath=
+           add_dir=
+           add=
+           # Finalize command for both is simple: just hardcode it.
+           if test "$hardcode_direct" = yes; 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:"*) ;;
+             *) finalize_shlibpath="$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
+                 [\\/]*)
+                   add_dir="$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
+           convenience="$convenience $dir/$old_library"
+           old_convenience="$old_convenience $dir/$old_library"
+           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*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
+                  case " $xrpath " in
+                  *" $temp_xrpath "*) ;;
+                  *) xrpath="$xrpath $temp_xrpath";;
+                  esac;;
+             *) temp_deplibs="$temp_deplibs $libdir";;
+             esac
+           done
+           dependency_libs="$temp_deplibs"
+         fi
+
+         newlib_search_path="$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"
+           if test "X$duplicate_deps" = "Xyes" ; then
+             case "$tmp_libs " in
+             *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+             esac
+           fi
+           tmp_libs="$tmp_libs $deplib"
+         done
+
+         if test "$link_all_deplibs" != no; then
+           # Add the search paths of all dependency libraries
+           for deplib in $dependency_libs; do
+             case $deplib in
+             -L*) path="$deplib" ;;
+             *.la)
+               dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
+               test "X$dir" = "X$deplib" && dir="."
+               # We need an absolute path.
+               case $dir in
+               [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+               *)
+                 absdir=`cd "$dir" && pwd`
+                 if test -z "$absdir"; then
+                   $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
+                   absdir="$dir"
+                 fi
+                 ;;
+               esac
+               if grep "^installed=no" $deplib > /dev/null; then
+                 path="$absdir/$objdir"
+               else
+                 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+                 if test -z "$libdir"; then
+                   $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+                   exit $EXIT_FAILURE
+                 fi
+                 if test "$absdir" != "$libdir"; then
+                   $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
+                 fi
+                 path="$absdir"
+               fi
+               depdepl=
+               case $host in
+               *-*-darwin*)
+                 # we do not want to link against static libs,
+                 # but need to link against shared
+                 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 "$path/$depdepl" ; then
+                     depdepl="$path/$depdepl"
+                   fi
+                   # do not add paths which are already there
+                   case " $newlib_search_path " in
+                   *" $path "*) ;;
+                   *) newlib_search_path="$newlib_search_path $path";;
+                   esac
+                 fi
+                 path=""
+                 ;;
+               *)
+                 path="-L$path"
+                 ;;
+               esac
+               ;;
+             -l*)
+               case $host in
+               *-*-darwin*)
+                 # Again, we only want to link against shared libraries
+                 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
+                 for tmp in $newlib_search_path ; do
+                   if test -f "$tmp/lib$tmp_libs.dylib" ; then
+                     eval depdepl="$tmp/lib$tmp_libs.dylib"
+                     break
+                   fi
+                 done
+                 path=""
+                 ;;
+               *) continue ;;
+               esac
+               ;;
+             *) continue ;;
+             esac
+             case " $deplibs " in
+             *" $depdepl "*) ;;
+             *) deplibs="$depdepl $deplibs" ;;
+             esac
+             case " $deplibs " in
+             *" $path "*) ;;
+             *) deplibs="$deplibs $path" ;;
+             esac
+           done
+         fi # link_all_deplibs != no
+       fi # linkmode = lib
+      done # for deplib in $libs
+      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 "*) ;;
+           *) lib_search_path="$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 "*) ;;
+             *) tmp_libs="$tmp_libs $deplib" ;;
+             esac
+             ;;
+           *) tmp_libs="$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
+         tmp_libs="$tmp_libs $i"
+       fi
+      done
+      dependency_libs=$tmp_libs
+    done # for pass
+    if test "$linkmode" = prog; then
+      dlfiles="$newdlfiles"
+      dlprefiles="$newdlprefiles"
+    fi
+
+    case $linkmode in
+    oldlib)
+      if test -n "$deplibs"; then
+       $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+       $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+       $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+       $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+       $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$release"; then
+       $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+       $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
+      fi
+
+      # Now set the variables for building old libraries.
+      build_libtool_libs=no
+      oldlibs="$output"
+      objs="$objs$old_deplibs"
+      ;;
+
+    lib)
+      # Make sure we only generate libraries of the form `libNAME.la'.
+      case $outputname in
+      lib*)
+       name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+       eval shared_ext=\"$shrext_cmds\"
+       eval libname=\"$libname_spec\"
+       ;;
+      *)
+       if test "$module" = no; then
+         $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
+         $echo "$help" 1>&2
+         exit $EXIT_FAILURE
+       fi
+       if test "$need_lib_prefix" != no; then
+         # Add the "lib" prefix for modules if required
+         name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+         eval shared_ext=\"$shrext_cmds\"
+         eval libname=\"$libname_spec\"
+       else
+         libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+       fi
+       ;;
+      esac
+
+      if test -n "$objs"; then
+       if test "$deplibs_check_method" != pass_all; then
+         $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
+         exit $EXIT_FAILURE
+       else
+         $echo
+         $echo "*** Warning: Linking the shared library $output against the non-libtool"
+         $echo "*** objects $objs is not portable!"
+         libobjs="$libobjs $objs"
+       fi
+      fi
+
+      if test "$dlself" != no; then
+       $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
+      fi
+
+      set dummy $rpath
+      if test "$#" -gt 2; then
+       $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
+      fi
+      install_libdir="$2"
+
+      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
+
+       if test -n "$vinfo"; then
+         $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
+       fi
+
+       if test -n "$release"; then
+         $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
+       fi
+      else
+
+       # Parse the version information argument.
+       save_ifs="$IFS"; IFS=':'
+       set dummy $vinfo 0 0 0
+       IFS="$save_ifs"
+
+       if test -n "$8"; then
+         $echo "$modename: too many parameters to \`-version-info'" 1>&2
+         $echo "$help" 1>&2
+         exit $EXIT_FAILURE
+       fi
+
+       # 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="$2"
+         number_minor="$3"
+         number_revision="$4"
+         #
+         # 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
+         darwin|linux|osf|windows)
+           current=`expr $number_major + $number_minor`
+           age="$number_minor"
+           revision="$number_revision"
+           ;;
+         freebsd-aout|freebsd-elf|sunos)
+           current="$number_major"
+           revision="$number_minor"
+           age="0"
+           ;;
+         irix|nonstopux)
+           current=`expr $number_major + $number_minor - 1`
+           age="$number_minor"
+           revision="$number_minor"
+           ;;
+         esac
+         ;;
+       no)
+         current="$2"
+         revision="$3"
+         age="$4"
+         ;;
+       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]) ;;
+       *)
+         $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
+         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+         exit $EXIT_FAILURE
+         ;;
+       esac
+
+       case $revision in
+       0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+       *)
+         $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
+         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+         exit $EXIT_FAILURE
+         ;;
+       esac
+
+       case $age in
+       0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+       *)
+         $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
+         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+         exit $EXIT_FAILURE
+         ;;
+       esac
+
+       if test "$age" -gt "$current"; then
+         $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
+         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+         exit $EXIT_FAILURE
+       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
+         major=.`expr $current - $age`
+         versuffix="$major.$age.$revision"
+         # Darwin ld doesn't like 0 for these options...
+         minor_current=`expr $current + 1`
+         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)
+         major=`expr $current - $age + 1`
+
+         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
+           iface=`expr $revision - $loop`
+           loop=`expr $loop - 1`
+           verstring="$verstring_prefix$major.$iface:$verstring"
+         done
+
+         # Before this point, $major must not contain `.'.
+         major=.$major
+         versuffix="$major.$revision"
+         ;;
+
+       linux)
+         major=.`expr $current - $age`
+         versuffix="$major.$age.$revision"
+         ;;
+
+       osf)
+         major=.`expr $current - $age`
+         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
+           iface=`expr $current - $loop`
+           loop=`expr $loop - 1`
+           verstring="$verstring:${iface}.0"
+         done
+
+         # Make executables depend on our current version.
+         verstring="$verstring:${current}.0"
+         ;;
+
+       sunos)
+         major=".$current"
+         versuffix=".$current.$revision"
+         ;;
+
+       windows)
+         # Use '-' rather than '.', since we only want one
+         # extension on DOS 8.3 filesystems.
+         major=`expr $current - $age`
+         versuffix="-$major"
+         ;;
+
+       *)
+         $echo "$modename: unknown library version type \`$version_type'" 1>&2
+         $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+         exit $EXIT_FAILURE
+         ;;
+       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
+           $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
+           build_libtool_libs=no
+           build_old_libs=yes
+         fi
+       else
+         # Don't allow undefined symbols.
+         allow_undefined_flag="$no_undefined_flag"
+       fi
+      fi
+
+      if test "$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)
+              ;;
+           $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
+              removelist="$removelist $p"
+              ;;
+           *) ;;
+         esac
+       done
+       if test -n "$removelist"; then
+         $show "${rm}r $removelist"
+         $run ${rm}r $removelist
+       fi
+      fi
+
+      # Now set the variables for building old libraries.
+      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+       oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+       # Transform .lo files to .o files.
+       oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+      fi
+
+      # Eliminate all temporary directories.
+      for path in $notinst_path; do
+       lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
+       deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
+       dependency_libs=`$echo "$dependency_libs " | ${SED} -e '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
+         temp_xrpath="$temp_xrpath -R$libdir"
+         case "$finalize_rpath " in
+         *" $libdir "*) ;;
+         *) finalize_rpath="$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 "*) ;;
+       *) dlfiles="$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 "*) ;;
+       *) dlprefiles="$dlprefiles $lib" ;;
+       esac
+      done
+
+      if test "$build_libtool_libs" = yes; then
+       if test -n "$rpath"; then
+         case $host in
+         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
+           # these systems don't actually have a c library (as such)!
+           ;;
+         *-*-rhapsody* | *-*-darwin1.[012])
+           # Rhapsody C library is in the System framework
+           deplibs="$deplibs -framework System"
+           ;;
+         *-*-netbsd*)
+           # Don't link with libc until the a.out ld.so is fixed.
+           ;;
+         *-*-openbsd* | *-*-freebsd*)
+           # Do not include libc due to us having libc/libc_r.
+           test "X$arg" = "X-lc" && continue
+           ;;
+         *)
+           # Add libc to deplibs on all other systems if necessary.
+           if test "$build_libtool_need_lc" = "yes"; then
+             deplibs="$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.
+         $rm conftest.c
+         cat > conftest.c <<EOF
+         int main() { return 0; }
+EOF
+         $rm conftest
+         $LTCC -o conftest conftest.c $deplibs
+         if test "$?" -eq 0 ; then
+           ldd_output=`ldd conftest`
+           for i in $deplibs; do
+             name="`expr $i : '-l\(.*\)'`"
+             # If $name is empty we are operating on a -L argument.
+              if test "$name" != "" && test "$name" -ne "0"; then
+               if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+                 case " $predeps $postdeps " in
+                 *" $i "*)
+                   newdeplibs="$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
+                 deplib_match=$2
+                 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+                   newdeplibs="$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
+             else
+               newdeplibs="$newdeplibs $i"
+             fi
+           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
+             name="`expr $i : '-l\(.*\)'`"
+             # If $name is empty we are operating on a -L argument.
+              if test "$name" != "" && test "$name" != "0"; then
+               $rm conftest
+               $LTCC -o conftest conftest.c $i
+               # Did it work?
+               if test "$?" -eq 0 ; then
+                 ldd_output=`ldd conftest`
+                 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+                   case " $predeps $postdeps " in
+                   *" $i "*)
+                     newdeplibs="$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
+                   deplib_match=$2
+                   if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+                     newdeplibs="$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
+             else
+               newdeplibs="$newdeplibs $i"
+             fi
+           done
+         fi
+         ;;
+       file_magic*)
+         set dummy $deplibs_check_method
+         file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+         for a_deplib in $deplibs; do
+           name="`expr $a_deplib : '-l\(.*\)'`"
+           # If $name is empty we are operating on a -L argument.
+            if test "$name" != "" && test  "$name" != "0"; then
+             if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+               case " $predeps $postdeps " in
+               *" $a_deplib "*)
+                 newdeplibs="$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
+                     # 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 "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+                       esac
+                     done
+                     if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
+                        | ${SED} 10q \
+                        | $EGREP "$file_magic_regex" > /dev/null; then
+                       newdeplibs="$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
+           else
+             # Add a -L argument.
+             newdeplibs="$newdeplibs $a_deplib"
+           fi
+         done # Gone through all deplibs.
+         ;;
+       match_pattern*)
+         set dummy $deplibs_check_method
+         match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+         for a_deplib in $deplibs; do
+           name="`expr $a_deplib : '-l\(.*\)'`"
+           # If $name is empty we are operating on a -L argument.
+           if test -n "$name" && test "$name" != "0"; then
+             if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+               case " $predeps $postdeps " in
+               *" $a_deplib "*)
+                 newdeplibs="$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
+                     newdeplibs="$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
+           else
+             # Add a -L argument.
+             newdeplibs="$newdeplibs $a_deplib"
+           fi
+         done # Gone through all deplibs.
+         ;;
+       none | unknown | *)
+         newdeplibs=""
+         tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
+           -e '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 "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
+           done
+         fi
+         if $echo "X $tmp_deplibs" | $Xsed -e 's/[     ]//g' \
+           | grep . >/dev/null; then
+           $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
+         fi
+         ;;
+       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 is the System framework
+         newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
+         ;;
+       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
+
+      # 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
+       if test "$hardcode_into_libs" = yes; then
+         # Hardcode the library paths
+         hardcode_libdirs=
+         dep_rpath=
+         rpath="$finalize_rpath"
+         test "$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
+               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"*)
+                   ;;
+                 *)
+                   hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+                   ;;
+                 esac
+               fi
+             else
+               eval flag=\"$hardcode_libdir_flag_spec\"
+               dep_rpath="$dep_rpath $flag"
+             fi
+           elif test -n "$runpath_var"; then
+             case "$perm_rpath " in
+             *" $libdir "*) ;;
+             *) perm_rpath="$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"
+           if test -n "$hardcode_libdir_flag_spec_ld"; then
+             eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+           else
+             eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+           fi
+         fi
+         if test -n "$runpath_var" && test -n "$perm_rpath"; then
+           # We should set the runpath_var.
+           rpath=
+           for dir in $perm_rpath; do
+             rpath="$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 "$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
+       realname="$2"
+       shift; 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"
+       for link
+       do
+         linknames="$linknames $link"
+       done
+
+       # Use standard objects if they are pic
+       test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+
+       # Prepare the list of exported symbols
+       if test -z "$export_symbols"; then
+         if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+           $show "generating symbol list for \`$libname.la'"
+           export_symbols="$output_objdir/$libname.exp"
+           $run $rm $export_symbols
+           cmds=$export_symbols_cmds
+           save_ifs="$IFS"; IFS='~'
+           for cmd in $cmds; do
+             IFS="$save_ifs"
+             eval cmd=\"$cmd\"
+             if len=`expr "X$cmd" : ".*"` &&
+              test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+               $show "$cmd"
+               $run eval "$cmd" || exit $?
+               skipped_export=false
+             else
+               # The command line is too long to execute in one step.
+               $show "using reloadable object file for export list..."
+               skipped_export=:
+             fi
+           done
+           IFS="$save_ifs"
+           if test -n "$export_symbols_regex"; then
+             $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+             $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+             $show "$mv \"${export_symbols}T\" \"$export_symbols\""
+             $run eval '$mv "${export_symbols}T" "$export_symbols"'
+           fi
+         fi
+       fi
+
+       if test -n "$export_symbols" && test -n "$include_expsyms"; then
+         $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
+       fi
+
+       tmp_deplibs=
+       for test_deplib in $deplibs; do
+               case " $convenience " in
+               *" $test_deplib "*) ;;
+               *)
+                       tmp_deplibs="$tmp_deplibs $test_deplib"
+                       ;;
+               esac
+       done
+       deplibs="$tmp_deplibs"
+
+       if test -n "$convenience"; then
+         if test -n "$whole_archive_flag_spec"; then
+           save_libobjs=$libobjs
+           eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+         else
+           gentop="$output_objdir/${outputname}x"
+           $show "${rm}r $gentop"
+           $run ${rm}r "$gentop"
+           $show "$mkdir $gentop"
+           $run $mkdir "$gentop"
+           status=$?
+           if test "$status" -ne 0 && test ! -d "$gentop"; then
+             exit $status
+           fi
+           generated="$generated $gentop"
+
+           for xlib in $convenience; do
+             # Extract the objects.
+             case $xlib in
+             [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+             *) xabs=`pwd`"/$xlib" ;;
+             esac
+             xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+             xdir="$gentop/$xlib"
+
+             $show "${rm}r $xdir"
+             $run ${rm}r "$xdir"
+             $show "$mkdir $xdir"
+             $run $mkdir "$xdir"
+             status=$?
+             if test "$status" -ne 0 && test ! -d "$xdir"; then
+               exit $status
+             fi
+             # We will extract separately just the conflicting names and we will no
+             # longer touch any unique names. It is faster to leave these extract
+             # automatically by $AR in one run.
+             $show "(cd $xdir && $AR x $xabs)"
+             $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+             if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
+               :
+             else
+               $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
+               $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
+               $AR t "$xabs" | sort | uniq -cd | while read -r count name
+               do
+                 i=1
+                 while test "$i" -le "$count"
+                 do
+                  # Put our $i before any first dot (extension)
+                  # Never overwrite any file
+                  name_to="$name"
+                  while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
+                  do
+                    name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
+                  done
+                  $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
+                  $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
+                  i=`expr $i + 1`
+                 done
+               done
+             fi
+
+             libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+           done
+         fi
+       fi
+
+       if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+         eval flag=\"$thread_safe_flag_spec\"
+         linker_flags="$linker_flags $flag"
+       fi
+
+       # Make a backup of the uninstalled library when relinking
+       if test "$mode" = relink; then
+         $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:" && len=`expr "X$test_cmds" : ".*"` &&
+          test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+         :
+       else
+         # The command line is too long to link in one step, link piecewise.
+         $echo "creating reloadable object files..."
+
+         # 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
+
+         # Clear the reloadable object creation command queue and
+         # initialize k to one.
+         test_cmds=
+         concat_cmds=
+         objlist=
+         delfiles=
+         last_robj=
+         k=1
+         output=$output_objdir/$save_output-${k}.$objext
+         # Loop over the list of objects to be linked.
+         for obj in $save_libobjs
+         do
+           eval test_cmds=\"$reload_cmds $objlist $last_robj\"
+           if test "X$objlist" = X ||
+              { len=`expr "X$test_cmds" : ".*"` &&
+                test "$len" -le "$max_cmd_len"; }; then
+             objlist="$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.
+               eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+             else
+               # All subsequent reloadable object files will link in
+               # the last one created.
+               eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
+             fi
+             last_robj=$output_objdir/$save_output-${k}.$objext
+             k=`expr $k + 1`
+             output=$output_objdir/$save_output-${k}.$objext
+             objlist=$obj
+             len=1
+           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~
+         eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+
+         if ${skipped_export-false}; then
+           $show "generating symbol list for \`$libname.la'"
+           export_symbols="$output_objdir/$libname.exp"
+           $run $rm $export_symbols
+           libobjs=$output
+           # Append the command to create the export file.
+           eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
+          fi
+
+         # Set up a command to remove the reloadale object files
+         # after they are used.
+         i=0
+         while test "$i" -lt "$k"
+         do
+           i=`expr $i + 1`
+           delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
+         done
+
+         $echo "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"
+           $show "$cmd"
+           $run eval "$cmd" || exit $?
+         done
+         IFS="$save_ifs"
+
+         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\"
+         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
+
+         # Append the command to remove the reloadable object files
+         # to the just-reset $cmds.
+         eval cmds=\"\$cmds~\$rm $delfiles\"
+       fi
+       save_ifs="$IFS"; IFS='~'
+       for cmd in $cmds; do
+         IFS="$save_ifs"
+         eval cmd=\"$cmd\"
+         $show "$cmd"
+         $run eval "$cmd" || exit $?
+       done
+       IFS="$save_ifs"
+
+       # Restore the uninstalled library and exit
+       if test "$mode" = relink; then
+         $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
+         exit $EXIT_SUCCESS
+       fi
+
+       # Create links to the real library.
+       for linkname in $linknames; do
+         if test "$realname" != "$linkname"; then
+           $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
+           $run 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 "$deplibs"; then
+       $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+       $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+       $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+       $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+       $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$release"; then
+       $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
+      fi
+
+      case $output in
+      *.lo)
+       if test -n "$objs$old_deplibs"; then
+         $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
+         exit $EXIT_FAILURE
+       fi
+       libobj="$output"
+       obj=`$echo "X$output" | $Xsed -e "$lo2o"`
+       ;;
+      *)
+       libobj=
+       obj="$output"
+       ;;
+      esac
+
+      # Delete the old objects.
+      $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
+      wl=
+
+      if test -n "$convenience"; then
+       if test -n "$whole_archive_flag_spec"; then
+         eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
+       else
+         gentop="$output_objdir/${obj}x"
+         $show "${rm}r $gentop"
+         $run ${rm}r "$gentop"
+         $show "$mkdir $gentop"
+         $run $mkdir "$gentop"
+         status=$?
+         if test "$status" -ne 0 && test ! -d "$gentop"; then
+           exit $status
+         fi
+         generated="$generated $gentop"
+
+         for xlib in $convenience; do
+           # Extract the objects.
+           case $xlib in
+           [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+           *) xabs=`pwd`"/$xlib" ;;
+           esac
+           xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+           xdir="$gentop/$xlib"
+
+           $show "${rm}r $xdir"
+           $run ${rm}r "$xdir"
+           $show "$mkdir $xdir"
+           $run $mkdir "$xdir"
+           status=$?
+           if test "$status" -ne 0 && test ! -d "$xdir"; then
+             exit $status
+           fi
+           # We will extract separately just the conflicting names and we will no
+           # longer touch any unique names. It is faster to leave these extract
+           # automatically by $AR in one run.
+           $show "(cd $xdir && $AR x $xabs)"
+           $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+           if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
+             :
+           else
+             $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
+             $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
+             $AR t "$xabs" | sort | uniq -cd | while read -r count name
+             do
+               i=1
+               while test "$i" -le "$count"
+               do
+                # Put our $i before any first dot (extension)
+                # Never overwrite any file
+                name_to="$name"
+                while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
+                do
+                  name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
+                done
+                $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
+                $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
+                i=`expr $i + 1`
+               done
+             done
+           fi
+
+           reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+         done
+       fi
+      fi
+
+      # Create the old-style object.
+      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+      output="$obj"
+      cmds=$reload_cmds
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+       IFS="$save_ifs"
+       eval cmd=\"$cmd\"
+       $show "$cmd"
+       $run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+
+      # Exit if we aren't doing a library object file.
+      if test -z "$libobj"; then
+       if test -n "$gentop"; then
+         $show "${rm}r $gentop"
+         $run ${rm}r $gentop
+       fi
+
+       exit $EXIT_SUCCESS
+      fi
+
+      if test "$build_libtool_libs" != yes; then
+       if test -n "$gentop"; then
+         $show "${rm}r $gentop"
+         $run ${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"
+       # $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"
+       cmds=$reload_cmds
+       save_ifs="$IFS"; IFS='~'
+       for cmd in $cmds; do
+         IFS="$save_ifs"
+         eval cmd=\"$cmd\"
+         $show "$cmd"
+         $run eval "$cmd" || exit $?
+       done
+       IFS="$save_ifs"
+      fi
+
+      if test -n "$gentop"; then
+       $show "${rm}r $gentop"
+       $run ${rm}r $gentop
+      fi
+
+      exit $EXIT_SUCCESS
+      ;;
+
+    prog)
+      case $host in
+       *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
+      esac
+      if test -n "$vinfo"; then
+       $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
+      fi
+
+      if test -n "$release"; then
+       $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
+      fi
+
+      if test "$preload" = yes; then
+       if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
+          test "$dlopen_self_static" = unknown; then
+         $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
+       fi
+      fi
+
+      case $host in
+      *-*-rhapsody* | *-*-darwin1.[012])
+       # On Rhapsody replace the C library is the System framework
+       compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+       finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+       ;;
+      esac
+
+      case $host in
+      *darwin*)
+        # Don't allow lazy linking, it breaks C++ global constructors
+        if test "$tagname" = CXX ; then
+        compile_command="$compile_command ${wl}-bind_at_load"
+        finalize_command="$finalize_command ${wl}-bind_at_load"
+        fi
+        ;;
+      esac
+
+      compile_command="$compile_command $compile_deplibs"
+      finalize_command="$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 "*) ;;
+         *) finalize_rpath="$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"*)
+               ;;
+             *)
+               hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+               ;;
+             esac
+           fi
+         else
+           eval flag=\"$hardcode_libdir_flag_spec\"
+           rpath="$rpath $flag"
+         fi
+       elif test -n "$runpath_var"; then
+         case "$perm_rpath " in
+         *" $libdir "*) ;;
+         *) perm_rpath="$perm_rpath $libdir" ;;
+         esac
+       fi
+       case $host in
+       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+         case :$dllsearchpath: in
+         *":$libdir:"*) ;;
+         *) dllsearchpath="$dllsearchpath:$libdir";;
+         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"*)
+               ;;
+             *)
+               hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+               ;;
+             esac
+           fi
+         else
+           eval flag=\"$hardcode_libdir_flag_spec\"
+           rpath="$rpath $flag"
+         fi
+       elif test -n "$runpath_var"; then
+         case "$finalize_perm_rpath " in
+         *" $libdir "*) ;;
+         *) finalize_perm_rpath="$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 "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+       finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+      fi
+
+      dlsyms=
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+       if test -n "$NM" && test -n "$global_symbol_pipe"; then
+         dlsyms="${outputname}S.c"
+       else
+         $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
+       fi
+      fi
+
+      if test -n "$dlsyms"; then
+       case $dlsyms in
+       "") ;;
+       *.c)
+         # Discover the nlist of each of the dlfiles.
+         nlist="$output_objdir/${outputname}.nm"
+
+         $show "$rm $nlist ${nlist}S ${nlist}T"
+         $run $rm "$nlist" "${nlist}S" "${nlist}T"
+
+         # Parse the name list into a source file.
+         $show "creating $output_objdir/$dlsyms"
+
+         test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
+/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
+/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* Prevent the only kind of declaration conflicts we can make. */
+#define lt_preloaded_symbols some_other_symbol
+
+/* External symbol declarations for the compiler. */\
+"
+
+         if test "$dlself" = yes; then
+           $show "generating symbol list for \`$output'"
+
+           test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
+
+           # Add our own program objects to the symbol list.
+           progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+           for arg in $progfiles; do
+             $show "extracting global C symbols from \`$arg'"
+             $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+           done
+
+           if test -n "$exclude_expsyms"; then
+             $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+             $run eval '$mv "$nlist"T "$nlist"'
+           fi
+
+           if test -n "$export_symbols_regex"; then
+             $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+             $run eval '$mv "$nlist"T "$nlist"'
+           fi
+
+           # Prepare the list of exported symbols
+           if test -z "$export_symbols"; then
+             export_symbols="$output_objdir/$output.exp"
+             $run $rm $export_symbols
+             $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+           else
+             $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
+             $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
+             $run eval 'mv "$nlist"T "$nlist"'
+           fi
+         fi
+
+         for arg in $dlprefiles; do
+           $show "extracting global C symbols from \`$arg'"
+           name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
+           $run eval '$echo ": $name " >> "$nlist"'
+           $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+         done
+
+         if test -z "$run"; then
+           # 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/$dlsyms"'
+           else
+             $echo '/* NONE */' >> "$output_objdir/$dlsyms"
+           fi
+
+           $echo >> "$output_objdir/$dlsyms" "\
+
+#undef lt_preloaded_symbols
+
+#if defined (__STDC__) && __STDC__
+# define lt_ptr void *
+#else
+# define lt_ptr char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+  const char *name;
+  lt_ptr address;
+}
+lt_preloaded_symbols[] =
+{\
+"
+
+           eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
+
+           $echo >> "$output_objdir/$dlsyms" "\
+  {0, (lt_ptr) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+         fi
+
+         pic_flag_for_symtable=
+         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*)
+           case "$compile_command " in
+           *" -static "*) ;;
+           *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
+           esac;;
+         *-*-hpux*)
+           case "$compile_command " in
+           *" -static "*) ;;
+           *) pic_flag_for_symtable=" $pic_flag";;
+           esac
+         esac
+
+         # Now compile the dynamic symbol file.
+         $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+         $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+
+         # Clean up the generated files.
+         $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
+         $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
+
+         # Transform the symbol file into the correct name.
+         compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+         finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+         ;;
+       *)
+         $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
+         exit $EXIT_FAILURE
+         ;;
+       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 "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+       finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+      fi
+
+      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+       # Replace the output file specification.
+       compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+       link_command="$compile_command$compile_rpath"
+
+       # We have no uninstalled library dependencies, so finalize right now.
+       $show "$link_command"
+       $run eval "$link_command"
+       status=$?
+
+       # Delete the generated files.
+       if test -n "$dlsyms"; then
+         $show "$rm $output_objdir/${outputname}S.${objext}"
+         $run $rm "$output_objdir/${outputname}S.${objext}"
+       fi
+
+       exit $status
+      fi
+
+      if test -n "$shlibpath_var"; then
+       # We should set the shlibpath_var
+       rpath=
+       for dir in $temp_rpath; do
+         case $dir in
+         [\\/]* | [A-Za-z]:[\\/]*)
+           # Absolute path.
+           rpath="$rpath$dir:"
+           ;;
+         *)
+           # Relative path: add a thisdir entry.
+           rpath="$rpath\$thisdir/$dir:"
+           ;;
+         esac
+       done
+       temp_rpath="$rpath"
+      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
+           rpath="$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
+           rpath="$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 "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+       # Delete the old output file.
+       $run $rm $output
+       # Link the executable and exit
+       $show "$link_command"
+       $run eval "$link_command" || exit $?
+       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"
+
+       $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
+       $echo "$modename: \`$output' will be relinked during installation" 1>&2
+      else
+       if test "$fast_install" != no; then
+         link_command="$finalize_var$compile_command$finalize_rpath"
+         if test "$fast_install" = yes; then
+           relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e '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 "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+      # Delete the old output files.
+      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+      $show "$link_command"
+      $run eval "$link_command" || exit $?
+
+      # Now create the wrapper script.
+      $show "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}\" || 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
+           var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+           relink_command="$var=\"$var_value\"; export $var; $relink_command"
+         fi
+       done
+       relink_command="(cd `pwd`; $relink_command)"
+       relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Quote $echo for shipping.
+      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
+       case $progpath in
+       [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+       *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
+       esac
+       qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
+      else
+       qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Only actually do things if our run command is non-null.
+      if test -z "$run"; then
+       # win32 will think the script is a binary if it has
+       # a .exe suffix, so we strip it off here.
+       case $output in
+         *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
+       esac
+       # test for cygwin because mv fails w/o .exe extensions
+       case $host in
+         *cygwin*)
+           exeext=.exe
+           outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
+         *) exeext= ;;
+       esac
+       case $host in
+         *cygwin* | *mingw* )
+           cwrappersource=`$echo ${objdir}/lt-${output}.c`
+           cwrapper=`$echo ${output}.exe`
+           $rm $cwrappersource $cwrapper
+           trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+           cat > $cwrappersource <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+   Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+
+   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.
+
+   Currently, it simply execs the wrapper *script* "/bin/sh $output",
+   but could eventually absorb all of the scripts functionality and
+   exec $objdir/$outputname directly.
+*/
+EOF
+           cat >> $cwrappersource<<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef DIR_SEPARATOR
+#define DIR_SEPARATOR '/'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+  defined (__OS2__)
+#define HAVE_DOS_BASED_FILE_SYSTEM
+#ifndef DIR_SEPARATOR_2
+#define DIR_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 */
+
+#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+  if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+const char *program_name = NULL;
+
+void * xmalloc (size_t num);
+char * xstrdup (const char *string);
+char * basename (const char *name);
+char * fnqualify(const char *path);
+char * strendzap(char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+
+int
+main (int argc, char *argv[])
+{
+  char **newargz;
+  int i;
+
+  program_name = (char *) xstrdup ((char *) basename (argv[0]));
+  newargz = XMALLOC(char *, argc+2);
+EOF
+
+           cat >> $cwrappersource <<EOF
+  newargz[0] = "$SHELL";
+EOF
+
+           cat >> $cwrappersource <<"EOF"
+  newargz[1] = fnqualify(argv[0]);
+  /* we know the script has the same name, without the .exe */
+  /* so make sure newargz[1] doesn't end in .exe */
+  strendzap(newargz[1],".exe");
+  for (i = 1; i < argc; i++)
+    newargz[i+1] = xstrdup(argv[i]);
+  newargz[argc+1] = NULL;
+EOF
+
+           cat >> $cwrappersource <<EOF
+  execv("$SHELL",newargz);
+EOF
+
+           cat >> $cwrappersource <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+  void * p = (void *) malloc (num);
+  if (!p)
+    lt_fatal ("Memory exhausted");
+
+  return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
+;
+}
+
+char *
+basename (const char *name)
+{
+  const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  /* Skip over the disk name in MSDOS pathnames. */
+  if (isalpha (name[0]) && name[1] == ':')
+    name += 2;
+#endif
+
+  for (base = name; *name; name++)
+    if (IS_DIR_SEPARATOR (*name))
+      base = name + 1;
+  return (char *) base;
+}
+
+char *
+fnqualify(const char *path)
+{
+  size_t size;
+  char *p;
+  char tmp[LT_PATHMAX + 1];
+
+  assert(path != NULL);
+
+  /* Is it qualified already? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  if (isalpha (path[0]) && path[1] == ':')
+    return xstrdup (path);
+#endif
+  if (IS_DIR_SEPARATOR (path[0]))
+    return xstrdup (path);
+
+  /* prepend the current directory */
+  /* doesn't handle '~' */
+  if (getcwd (tmp, LT_PATHMAX) == NULL)
+    lt_fatal ("getcwd failed");
+  size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
+  p = XMALLOC(char, size);
+  sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
+  return p;
+}
+
+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;
+}
+
+static void
+lt_error_core (int exit_status, const char * mode,
+          const char * message, va_list ap)
+{
+  fprintf (stderr, "%s: %s: ", program_name, mode);
+  vfprintf (stderr, message, ap);
+  fprintf (stderr, ".\n");
+
+  if (exit_status >= 0)
+    exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+  va_list ap;
+  va_start (ap, message);
+  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+  va_end (ap);
+}
+EOF
+         # we should really use a build-platform specific compiler
+         # here, but OTOH, the wrappers (shell script and this C one)
+         # are only useful if you want to execute the "real" binary.
+         # Since the "real" binary is built for $host, then this
+         # wrapper might as well be built for $host, too.
+         $run $LTCC -s -o $cwrapper $cwrappersource
+         ;;
+       esac
+       $rm $output
+       trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
+
+       $echo > $output "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# 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.
+Xsed='${SED} -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+  # install mode needs the following variable:
+  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
+    echo=\"$qecho\"
+    file=\"\$0\"
+    # Make sure echo works.
+    if test \"X\$1\" = X--no-reexec; then
+      # Discard the --no-reexec flag, and continue.
+      shift
+    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
+      # Yippee, \$echo works!
+      :
+    else
+      # Restart under the correct shell, and then maybe \$echo will work.
+      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+    fi
+  fi\
+"
+       $echo >> $output "\
+
+  # Find the directory that this script lives in.
+  thisdir=\`\$echo \"X\$file\" | \$Xsed -e '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 \"X\$file\" | \$Xsed -e '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 \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+  done
+
+  # Try to get the absolute directory name.
+  absdir=\`cd \"\$thisdir\" && pwd\`
+  test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+       if test "$fast_install" = yes; then
+         $echo >> $output "\
+  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 >> $output "\
+
+    # 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 $EXIT_FAILURE
+      fi
+    fi
+
+    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+    { $rm \"\$progdir/\$program\";
+      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+    $rm \"\$progdir/\$file\"
+  fi"
+       else
+         $echo >> $output "\
+  program='$outputname'
+  progdir=\"\$thisdir/$objdir\"
+"
+       fi
+
+       $echo >> $output "\
+
+  if test -f \"\$progdir/\$program\"; then"
+
+       # Export our shlibpath_var if we have one.
+       if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+         $echo >> $output "\
+    # 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 \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+    export $shlibpath_var
+"
+       fi
+
+       # fixup the dll searchpath if we need to.
+       if test -n "$dllsearchpath"; then
+         $echo >> $output "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+       fi
+
+       $echo >> $output "\
+    if test \"\$libtool_execute_magic\" != \"$magic\"; then
+      # Run the actual program with our arguments.
+"
+       case $host in
+       # Backslashes separate directories on plain windows
+       *-*-mingw | *-*-os2*)
+         $echo >> $output "\
+      exec \$progdir\\\\\$program \${1+\"\$@\"}
+"
+         ;;
+
+       *)
+         $echo >> $output "\
+      exec \$progdir/\$program \${1+\"\$@\"}
+"
+         ;;
+       esac
+       $echo >> $output "\
+      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
+      exit $EXIT_FAILURE
+    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 $EXIT_FAILURE
+  fi
+fi\
+"
+       chmod +x $output
+      fi
+      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"
+       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"
+       fi
+       addlibs="$old_convenience"
+      fi
+
+      if test -n "$addlibs"; then
+       gentop="$output_objdir/${outputname}x"
+       $show "${rm}r $gentop"
+       $run ${rm}r "$gentop"
+       $show "$mkdir $gentop"
+       $run $mkdir "$gentop"
+       status=$?
+       if test "$status" -ne 0 && test ! -d "$gentop"; then
+         exit $status
+       fi
+       generated="$generated $gentop"
+
+       # Add in members from convenience archives.
+       for xlib in $addlibs; do
+         # Extract the objects.
+         case $xlib in
+         [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+         *) xabs=`pwd`"/$xlib" ;;
+         esac
+         xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+         xdir="$gentop/$xlib"
+
+         $show "${rm}r $xdir"
+         $run ${rm}r "$xdir"
+         $show "$mkdir $xdir"
+         $run $mkdir "$xdir"
+         status=$?
+         if test "$status" -ne 0 && test ! -d "$xdir"; then
+           exit $status
+         fi
+         # We will extract separately just the conflicting names and we will no
+         # longer touch any unique names. It is faster to leave these extract
+         # automatically by $AR in one run.
+         $show "(cd $xdir && $AR x $xabs)"
+         $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+         if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
+           :
+         else
+           $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
+           $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
+           $AR t "$xabs" | sort | uniq -cd | while read -r count name
+           do
+             i=1
+             while test "$i" -le "$count"
+             do
+              # Put our $i before any first dot (extension)
+              # Never overwrite any file
+              name_to="$name"
+              while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
+              do
+                name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
+              done
+              $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
+              $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
+              i=`expr $i + 1`
+             done
+           done
+         fi
+
+         oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
+       done
+      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
+       eval cmds=\"$old_archive_cmds\"
+
+       if len=`expr "X$cmds" : ".*"` &&
+            test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+         cmds=$old_archive_cmds
+       else
+         # the command line is too long to link in one step, link in parts
+         $echo "using piecewise archive linking..."
+         save_RANLIB=$RANLIB
+         RANLIB=:
+         objlist=
+         concat_cmds=
+         save_oldobjs=$oldobjs
+         # GNU ar 2.10+ was changed to match POSIX; thus no paths are
+         # encoded into archives.  This makes 'ar r' malfunction in
+         # this piecewise linking case whenever conflicting object
+         # names appear in distinct ar calls; check, warn and compensate.
+           if (for obj in $save_oldobjs
+           do
+             $echo "X$obj" | $Xsed -e 's%^.*/%%'
+           done | sort | sort -uc >/dev/null 2>&1); then
+           :
+         else
+           $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
+           $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
+           AR_FLAGS=cq
+         fi
+         # Is there a better way of finding the last object in the list?
+         for obj in $save_oldobjs
+         do
+           last_oldobj=$obj
+         done
+         for obj in $save_oldobjs
+         do
+           oldobjs="$objlist $obj"
+           objlist="$objlist $obj"
+           eval test_cmds=\"$old_archive_cmds\"
+           if len=`expr "X$test_cmds" : ".*"` &&
+              test "$len" -le "$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=
+           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
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+        eval cmd=\"$cmd\"
+       IFS="$save_ifs"
+       $show "$cmd"
+       $run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+    done
+
+    if test -n "$generated"; then
+      $show "${rm}r$generated"
+      $run ${rm}r$generated
+    fi
+
+    # Now create the libtool archive.
+    case $output in
+    *.la)
+      old_library=
+      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      $show "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}\" || 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
+         var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+         relink_command="$var=\"$var_value\"; 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 "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      if test "$hardcode_automatic" = yes ; then
+       relink_command=
+      fi
+
+
+      # Only create the output if not a dry run.
+      if test -z "$run"; then
+       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)
+               name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
+               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+               if test -z "$libdir"; then
+                 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+                 exit $EXIT_FAILURE
+               fi
+               newdependency_libs="$newdependency_libs $libdir/$name"
+               ;;
+             *) newdependency_libs="$newdependency_libs $deplib" ;;
+             esac
+           done
+           dependency_libs="$newdependency_libs"
+           newdlfiles=
+           for lib in $dlfiles; do
+             name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+             eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+             if test -z "$libdir"; then
+               $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+               exit $EXIT_FAILURE
+             fi
+             newdlfiles="$newdlfiles $libdir/$name"
+           done
+           dlfiles="$newdlfiles"
+           newdlprefiles=
+           for lib in $dlprefiles; do
+             name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+             eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+             if test -z "$libdir"; then
+               $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+               exit $EXIT_FAILURE
+             fi
+             newdlprefiles="$newdlprefiles $libdir/$name"
+           done
+           dlprefiles="$newdlprefiles"
+         else
+           newdlfiles=
+           for lib in $dlfiles; do
+             case $lib in
+               [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+               *) abs=`pwd`"/$lib" ;;
+             esac
+             newdlfiles="$newdlfiles $abs"
+           done
+           dlfiles="$newdlfiles"
+           newdlprefiles=
+           for lib in $dlprefiles; do
+             case $lib in
+               [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+               *) abs=`pwd`"/$lib" ;;
+             esac
+             newdlprefiles="$newdlprefiles $abs"
+           done
+           dlprefiles="$newdlprefiles"
+         fi
+         $rm $output
+         # place dlname in correct position for cygwin
+         tdlname=$dlname
+         case $host,$output,$installed,$module,$dlname in
+           *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+         esac
+         $echo > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# 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'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_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
+      fi
+
+      # Do a symbolic link so that the libtool archive can be found in
+      # LD_LIBRARY_PATH before the program is installed.
+      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
+      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
+      ;;
+    esac
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool install mode
+  install)
+    modename="$modename: install"
+
+    # 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.
+       $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
+      # Aesthetically quote it.
+      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*)
+       arg="\"$arg\""
+       ;;
+      esac
+      install_prog="$arg "
+      arg="$1"
+      shift
+    else
+      install_prog=
+      arg="$nonopt"
+    fi
+
+    # The real first argument should be the name of the installation program.
+    # Aesthetically quote it.
+    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+    case $arg in
+    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \      ]*|*]*)
+      arg="\"$arg\""
+      ;;
+    esac
+    install_prog="$install_prog$arg"
+
+    # We need to accept at least all the BSD install flags.
+    dest=
+    files=
+    opts=
+    prev=
+    install_type=
+    isdir=no
+    stripme=
+    for arg
+    do
+      if test -n "$dest"; then
+       files="$files $dest"
+       dest="$arg"
+       continue
+      fi
+
+      case $arg in
+      -d) isdir=yes ;;
+      -f) prev="-f" ;;
+      -g) prev="-g" ;;
+      -m) prev="-m" ;;
+      -o) prev="-o" ;;
+      -s)
+       stripme=" -s"
+       continue
+       ;;
+      -*) ;;
+
+      *)
+       # If the previous option needed an argument, then skip it.
+       if test -n "$prev"; then
+         prev=
+       else
+         dest="$arg"
+         continue
+       fi
+       ;;
+      esac
+
+      # Aesthetically quote the argument.
+      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*)
+       arg="\"$arg\""
+       ;;
+      esac
+      install_prog="$install_prog $arg"
+    done
+
+    if test -z "$install_prog"; then
+      $echo "$modename: you must specify an install program" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prev' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test -z "$files"; then
+      if test -z "$dest"; then
+       $echo "$modename: no file or destination specified" 1>&2
+      else
+       $echo "$modename: you must specify a destination" 1>&2
+      fi
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    # Strip any trailing slash from the destination.
+    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
+
+    # Check to see that the destination is a directory.
+    test -d "$dest" && isdir=yes
+    if test "$isdir" = yes; then
+      destdir="$dest"
+      destname=
+    else
+      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
+      test "X$destdir" = "X$dest" && destdir=.
+      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
+
+      # Not a directory, so check to see that there is only one file specified.
+      set dummy $files
+      if test "$#" -gt 2; then
+       $echo "$modename: \`$dest' is not a directory" 1>&2
+       $echo "$help" 1>&2
+       exit $EXIT_FAILURE
+      fi
+    fi
+    case $destdir in
+    [\\/]* | [A-Za-z]:[\\/]*) ;;
+    *)
+      for file in $files; do
+       case $file in
+       *.lo) ;;
+       *)
+         $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
+         $echo "$help" 1>&2
+         exit $EXIT_FAILURE
+         ;;
+       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.
+       staticlibs="$staticlibs $file"
+       ;;
+
+      *.la)
+       # Check to see that this really is a libtool archive.
+       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+       else
+         $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
+         $echo "$help" 1>&2
+         exit $EXIT_FAILURE
+       fi
+
+       library_names=
+       old_library=
+       relink_command=
+       # If there is no directory component, then add one.
+       case $file in
+       */* | *\\*) . $file ;;
+       *) . ./$file ;;
+       esac
+
+       # Add the libdir to current_libdirs if it is the destination.
+       if test "X$destdir" = "X$libdir"; then
+         case "$current_libdirs " in
+         *" $libdir "*) ;;
+         *) current_libdirs="$current_libdirs $libdir" ;;
+         esac
+       else
+         # Note the libdir as a future libdir.
+         case "$future_libdirs " in
+         *" $libdir "*) ;;
+         *) future_libdirs="$future_libdirs $libdir" ;;
+         esac
+       fi
+
+       dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
+       test "X$dir" = "X$file/" && dir=
+       dir="$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 "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.
+         if test "$inst_prefix_dir" = "$destdir"; then
+           $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
+           exit $EXIT_FAILURE
+         fi
+
+         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
+
+         $echo "$modename: warning: relinking \`$file'" 1>&2
+         $show "$relink_command"
+         if $run eval "$relink_command"; then :
+         else
+           $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+           exit $EXIT_FAILURE
+         fi
+       fi
+
+       # See the names of the shared library.
+       set dummy $library_names
+       if test -n "$2"; then
+         realname="$2"
+         shift
+         shift
+
+         srcname="$realname"
+         test -n "$relink_command" && srcname="$realname"T
+
+         # Install the shared library and build the symlinks.
+         $show "$install_prog $dir/$srcname $destdir/$realname"
+         $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
+         if test -n "$stripme" && test -n "$striplib"; then
+           $show "$striplib $destdir/$realname"
+           $run eval "$striplib $destdir/$realname" || exit $?
+         fi
+
+         if test "$#" -gt 0; then
+           # Delete the old symlinks, and create new ones.
+           for linkname
+           do
+             if test "$linkname" != "$realname"; then
+               $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+               $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+             fi
+           done
+         fi
+
+         # Do each command in the postinstall commands.
+         lib="$destdir/$realname"
+         cmds=$postinstall_cmds
+         save_ifs="$IFS"; IFS='~'
+         for cmd in $cmds; do
+           IFS="$save_ifs"
+           eval cmd=\"$cmd\"
+           $show "$cmd"
+           $run eval "$cmd" || exit $?
+         done
+         IFS="$save_ifs"
+       fi
+
+       # Install the pseudo-library for information purposes.
+       name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+       instname="$dir/$name"i
+       $show "$install_prog $instname $destdir/$name"
+       $run eval "$install_prog $instname $destdir/$name" || exit $?
+
+       # Maybe install the static library, too.
+       test -n "$old_library" && staticlibs="$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
+         destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+         destfile="$destdir/$destfile"
+       fi
+
+       # Deduce the name of the destination old-style object file.
+       case $destfile in
+       *.lo)
+         staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
+         ;;
+       *.$objext)
+         staticdest="$destfile"
+         destfile=
+         ;;
+       *)
+         $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
+         $echo "$help" 1>&2
+         exit $EXIT_FAILURE
+         ;;
+       esac
+
+       # Install the libtool object if requested.
+       if test -n "$destfile"; then
+         $show "$install_prog $file $destfile"
+         $run eval "$install_prog $file $destfile" || exit $?
+       fi
+
+       # Install the old object if enabled.
+       if test "$build_old_libs" = yes; then
+         # Deduce the name of the old-style object file.
+         staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
+
+         $show "$install_prog $staticobj $staticdest"
+         $run 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
+         destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+         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
+             file=`$echo $file|${SED} 's,.exe$,,'`
+             stripped_ext=".exe"
+           fi
+           ;;
+       esac
+
+       # Do a test to see if this is really a libtool program.
+       case $host in
+       *cygwin*|*mingw*)
+           wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
+           ;;
+       *)
+           wrapper=$file
+           ;;
+       esac
+       if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
+         notinst_deplibs=
+         relink_command=
+
+         # To insure that "foo" is sourced, and not "foo.exe",
+         # finese the cygwin/MSYS system by explicitly sourcing "foo."
+         # which disallows the automatic-append-.exe behavior.
+         case $build in
+         *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
+         *) wrapperdot=${wrapper} ;;
+         esac
+         # If there is no directory component, then add one.
+         case $file in
+         */* | *\\*) . ${wrapperdot} ;;
+         *) . ./${wrapperdot} ;;
+         esac
+
+         # Check the variables that should have been set.
+         if test -z "$notinst_deplibs"; then
+           $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
+           exit $EXIT_FAILURE
+         fi
+
+         finalize=yes
+         for lib in $notinst_deplibs; do
+           # Check to see that each library is installed.
+           libdir=
+           if test -f "$lib"; then
+             # If there is no directory component, then add one.
+             case $lib in
+             */* | *\\*) . $lib ;;
+             *) . ./$lib ;;
+             esac
+           fi
+           libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+           if test -n "$libdir" && test ! -f "$libfile"; then
+             $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+             finalize=no
+           fi
+         done
+
+         relink_command=
+         # To insure that "foo" is sourced, and not "foo.exe",
+         # finese the cygwin/MSYS system by explicitly sourcing "foo."
+         # which disallows the automatic-append-.exe behavior.
+         case $build in
+         *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
+         *) wrapperdot=${wrapper} ;;
+         esac
+         # If there is no directory component, then add one.
+         case $file in
+         */* | *\\*) . ${wrapperdot} ;;
+         *) . ./${wrapperdot} ;;
+         esac
+
+         outputname=
+         if test "$fast_install" = no && test -n "$relink_command"; then
+           if test "$finalize" = yes && test -z "$run"; then
+             tmpdir="/tmp"
+             test -n "$TMPDIR" && tmpdir="$TMPDIR"
+             tmpdir="$tmpdir/libtool-$$"
+             save_umask=`umask`
+             umask 0077
+             if $mkdir "$tmpdir"; then
+               umask $save_umask
+             else
+               umask $save_umask
+               $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
+               continue
+             fi
+             file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
+             outputname="$tmpdir/$file"
+             # Replace the output file specification.
+             relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+             $show "$relink_command"
+             if $run eval "$relink_command"; then :
+             else
+               $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+               ${rm}r "$tmpdir"
+               continue
+             fi
+             file="$outputname"
+           else
+             $echo "$modename: warning: cannot relink \`$file'" 1>&2
+           fi
+         else
+           # Install the binary that we compiled earlier.
+           file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+         fi
+       fi
+
+       # remove .exe since cygwin /usr/bin/install will append another
+       # one anyways
+       case $install_prog,$host in
+       */usr/bin/install*,*cygwin*)
+         case $file:$destfile in
+         *.exe:*.exe)
+           # this is ok
+           ;;
+         *.exe:*)
+           destfile=$destfile.exe
+           ;;
+         *:*.exe)
+           destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
+           ;;
+         esac
+         ;;
+       esac
+       $show "$install_prog$stripme $file $destfile"
+       $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
+       test -n "$outputname" && ${rm}r "$tmpdir"
+       ;;
+      esac
+    done
+
+    for file in $staticlibs; do
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+
+      # Set up the ranlib parameters.
+      oldlib="$destdir/$name"
+
+      $show "$install_prog $file $oldlib"
+      $run eval "$install_prog \$file \$oldlib" || exit $?
+
+      if test -n "$stripme" && test -n "$old_striplib"; then
+       $show "$old_striplib $oldlib"
+       $run eval "$old_striplib $oldlib" || exit $?
+      fi
+
+      # Do each command in the postinstall commands.
+      cmds=$old_postinstall_cmds
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+       IFS="$save_ifs"
+       eval cmd=\"$cmd\"
+       $show "$cmd"
+       $run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+    done
+
+    if test -n "$future_libdirs"; then
+      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
+    fi
+
+    if test -n "$current_libdirs"; then
+      # Maybe just do a dry run.
+      test -n "$run" && current_libdirs=" -n$current_libdirs"
+      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+    else
+      exit $EXIT_SUCCESS
+    fi
+    ;;
+
+  # libtool finish mode
+  finish)
+    modename="$modename: finish"
+    libdirs="$nonopt"
+    admincmds=
+
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      for dir
+      do
+       libdirs="$libdirs $dir"
+      done
+
+      for libdir in $libdirs; do
+       if test -n "$finish_cmds"; then
+         # Do each command in the finish commands.
+         cmds=$finish_cmds
+         save_ifs="$IFS"; IFS='~'
+         for cmd in $cmds; do
+           IFS="$save_ifs"
+           eval cmd=\"$cmd\"
+           $show "$cmd"
+           $run eval "$cmd" || admincmds="$admincmds
+       $cmd"
+         done
+         IFS="$save_ifs"
+       fi
+       if test -n "$finish_eval"; then
+         # Do the single finish_eval.
+         eval cmds=\"$finish_eval\"
+         $run eval "$cmds" || admincmds="$admincmds
+       $cmds"
+       fi
+      done
+    fi
+
+    # Exit here if they wanted silent mode.
+    test "$show" = : && exit $EXIT_SUCCESS
+
+    $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"
+    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
+    $echo "----------------------------------------------------------------------"
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool execute mode
+  execute)
+    modename="$modename: execute"
+
+    # The first argument is the command name.
+    cmd="$nonopt"
+    if test -z "$cmd"; then
+      $echo "$modename: you must specify a COMMAND" 1>&2
+      $echo "$help"
+      exit $EXIT_FAILURE
+    fi
+
+    # Handle -dlopen flags immediately.
+    for file in $execute_dlfiles; do
+      if test ! -f "$file"; then
+       $echo "$modename: \`$file' is not a file" 1>&2
+       $echo "$help" 1>&2
+       exit $EXIT_FAILURE
+      fi
+
+      dir=
+      case $file in
+      *.la)
+       # Check to see that this really is a libtool archive.
+       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+       else
+         $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+         $echo "$help" 1>&2
+         exit $EXIT_FAILURE
+       fi
+
+       # Read the libtool library.
+       dlname=
+       library_names=
+
+       # If there is no directory component, then add one.
+       case $file in
+       */* | *\\*) . $file ;;
+       *) . ./$file ;;
+       esac
+
+       # Skip this library if it cannot be dlopened.
+       if test -z "$dlname"; then
+         # Warn if it was a shared library.
+         test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
+         continue
+       fi
+
+       dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+       test "X$dir" = "X$file" && dir=.
+
+       if test -f "$dir/$objdir/$dlname"; then
+         dir="$dir/$objdir"
+       else
+         $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+         exit $EXIT_FAILURE
+       fi
+       ;;
+
+      *.lo)
+       # Just add the directory containing the .lo file.
+       dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+       test "X$dir" = "X$file" && dir=.
+       ;;
+
+      *)
+       $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
+       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
+      -*) ;;
+      *)
+       # Do a test to see if this is really a libtool program.
+       if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+         # If there is no directory component, then add one.
+         case $file in
+         */* | *\\*) . $file ;;
+         *) . ./$file ;;
+         esac
+
+         # Transform arg to wrapped name.
+         file="$progdir/$program"
+       fi
+       ;;
+      esac
+      # Quote arguments (to preserve shell metacharacters).
+      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
+      args="$args \"$file\""
+    done
+
+    if test -z "$run"; then
+      if test -n "$shlibpath_var"; then
+       # Export the shlibpath_var.
+       eval "export $shlibpath_var"
+      fi
+
+      # Restore saved environment variables
+      if test "${save_LC_ALL+set}" = set; then
+       LC_ALL="$save_LC_ALL"; export LC_ALL
+      fi
+      if test "${save_LANG+set}" = set; then
+       LANG="$save_LANG"; export LANG
+      fi
+
+      # 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
+    ;;
+
+  # libtool clean and uninstall mode
+  clean | uninstall)
+    modename="$modename: $mode"
+    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) rm="$rm $arg"; rmforce=yes ;;
+      -*) rm="$rm $arg" ;;
+      *) files="$files $arg" ;;
+      esac
+    done
+
+    if test -z "$rm"; then
+      $echo "$modename: you must specify an RM program" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    rmdirs=
+
+    origobjdir="$objdir"
+    for file in $files; do
+      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+      if test "X$dir" = "X$file"; then
+       dir=.
+       objdir="$origobjdir"
+      else
+       objdir="$dir/$origobjdir"
+      fi
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+      test "$mode" = uninstall && objdir="$dir"
+
+      # Remember objdir for removal later, being careful to avoid duplicates
+      if test "$mode" = clean; then
+       case " $rmdirs " in
+         *" $objdir "*) ;;
+         *) rmdirs="$rmdirs $objdir" ;;
+       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 (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+         . $dir/$name
+
+         # Delete the libtool libraries and symlinks.
+         for n in $library_names; do
+           rmfiles="$rmfiles $objdir/$n"
+         done
+         test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+         test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+
+         if test "$mode" = uninstall; then
+           if test -n "$library_names"; then
+             # Do each command in the postuninstall commands.
+             cmds=$postuninstall_cmds
+             save_ifs="$IFS"; IFS='~'
+             for cmd in $cmds; do
+               IFS="$save_ifs"
+               eval cmd=\"$cmd\"
+               $show "$cmd"
+               $run eval "$cmd"
+               if test "$?" -ne 0 && test "$rmforce" != yes; then
+                 exit_status=1
+               fi
+             done
+             IFS="$save_ifs"
+           fi
+
+           if test -n "$old_library"; then
+             # Do each command in the old_postuninstall commands.
+             cmds=$old_postuninstall_cmds
+             save_ifs="$IFS"; IFS='~'
+             for cmd in $cmds; do
+               IFS="$save_ifs"
+               eval cmd=\"$cmd\"
+               $show "$cmd"
+               $run eval "$cmd"
+               if test "$?" -ne 0 && test "$rmforce" != yes; then
+                 exit_status=1
+               fi
+             done
+             IFS="$save_ifs"
+           fi
+           # FIXME: should reinstall the best remaining shared library.
+         fi
+       fi
+       ;;
+
+      *.lo)
+       # Possibly a libtool object, so verify it.
+       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+
+         # Read the .lo file
+         . $dir/$name
+
+         # Add PIC object to the list of files to remove.
+         if test -n "$pic_object" \
+            && test "$pic_object" != none; then
+           rmfiles="$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
+           rmfiles="$rmfiles $dir/$non_pic_object"
+         fi
+       fi
+       ;;
+
+      *)
+       if test "$mode" = clean ; then
+         noexename=$name
+         case $file in
+         *.exe)
+           file=`$echo $file|${SED} 's,.exe$,,'`
+           noexename=`$echo $name|${SED} 's,.exe$,,'`
+           # $file with .exe has already been added to rmfiles,
+           # add $file without .exe
+           rmfiles="$rmfiles $file"
+           ;;
+         esac
+         # Do a test to see if this is a libtool program.
+         if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+           relink_command=
+           . $dir/$noexename
+
+           # note $name still contains .exe if it was in $file originally
+           # as does the version of $file that was added into $rmfiles
+           rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+           if test "$fast_install" = yes && test -n "$relink_command"; then
+             rmfiles="$rmfiles $objdir/lt-$name"
+           fi
+           if test "X$noexename" != "X$name" ; then
+             rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+           fi
+         fi
+       fi
+       ;;
+      esac
+      $show "$rm $rmfiles"
+      $run $rm $rmfiles || exit_status=1
+    done
+    objdir="$origobjdir"
+
+    # Try to remove the ${objdir}s in the directories where we deleted files
+    for dir in $rmdirs; do
+      if test -d "$dir"; then
+       $show "rmdir $dir"
+       $run rmdir $dir >/dev/null 2>&1
+      fi
+    done
+
+    exit $exit_status
+    ;;
+
+  "")
+    $echo "$modename: you must specify a MODE" 1>&2
+    $echo "$generic_help" 1>&2
+    exit $EXIT_FAILURE
+    ;;
+  esac
+
+  if test -z "$exec_cmd"; then
+    $echo "$modename: invalid operation mode \`$mode'" 1>&2
+    $echo "$generic_help" 1>&2
+    exit $EXIT_FAILURE
+  fi
+fi # test -z "$show_help"
+
+if test -n "$exec_cmd"; then
+  eval exec $exec_cmd
+  exit $EXIT_FAILURE
+fi
+
+# We need to display help for each of the modes.
+case $mode in
+"") $echo \
+"Usage: $modename [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
+    --finish          same as \`--mode=finish'
+    --help            display this help message and exit
+    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
+    --quiet           same as \`--silent'
+    --silent          don't print informational messages
+    --tag=TAG         use configuration variables from tag TAG
+    --version         print version information
+
+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.  Try \`$modename --help --mode=MODE' for
+a more detailed description of MODE.
+
+Report bugs to <bug-libtool@gnu.org>."
+  exit $EXIT_SUCCESS
+  ;;
+
+clean)
+  $echo \
+"Usage: $modename [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: $modename [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
+  -prefer-pic       try to building PIC objects only
+  -prefer-non-pic   try to building non-PIC objects only
+  -static           always build a \`.o' file suitable for static linking
+
+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: $modename [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: $modename [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: $modename [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 rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+  ;;
+
+link)
+  $echo \
+"Usage: $modename [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
+  -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
+  -static           do not do any dynamic linking of libtool libraries
+  -version-info CURRENT[:REVISION[:AGE]]
+                   specify library version info [each variable defaults to 0]
+
+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: $modename [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."
+  ;;
+
+*)
+  $echo "$modename: invalid operation mode \`$mode'" 1>&2
+  $echo "$help" 1>&2
+  exit $EXIT_FAILURE
+  ;;
+esac
+
+$echo
+$echo "Try \`$modename --help' for more information about other modes."
+
+exit $EXIT_SUCCESS
+
+# 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:
diff --git a/missing b/missing
new file mode 100755 (executable)
index 0000000..fc54c64
--- /dev/null
+++ b/missing
@@ -0,0 +1,336 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@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, 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.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+case "$1" in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing 0.4 - GNU automake"
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+  aclocal*)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case "$f" in
+      *:*) touch_files="$touch_files "`echo "$f" |
+                                      sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+          sed 's/\.am$/.in/' |
+          while read f; do touch "$f"; done
+    ;;
+
+  autom4te)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+         system.  You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+    if test -f "$file"; then
+       touch $file
+    else
+       test -z "$file" || exec >$file
+       echo "#! /bin/sh"
+       echo "# Created by GNU Automake missing as a replacement of"
+       echo "#  $ $@"
+       echo "exit 0"
+       chmod +x $file
+       exit 1
+    fi
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+       case "$LASTARG" in
+       *.y)
+           SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+           if [ -f "$SRCFILE" ]; then
+                cp "$SRCFILE" y.tab.c
+           fi
+           SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+           if [ -f "$SRCFILE" ]; then
+                cp "$SRCFILE" y.tab.h
+           fi
+         ;;
+       esac
+    fi
+    if [ ! -f y.tab.h ]; then
+       echo >y.tab.h
+    fi
+    if [ ! -f y.tab.c ]; then
+       echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+       case "$LASTARG" in
+       *.l)
+           SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+           if [ -f "$SRCFILE" ]; then
+                cp "$SRCFILE" lex.yy.c
+           fi
+         ;;
+       esac
+    fi
+    if [ ! -f lex.yy.c ]; then
+       echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+        you modified a dependency of a manual page.  You may need the
+        \`Help2man' package in order for those modifications to take
+        effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+       file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+    fi
+    if [ -f "$file" ]; then
+       touch $file
+    else
+       test -z "$file" || exec >$file
+       echo ".ab help2man is required to generate this page"
+       exit 1
+    fi
+    ;;
+
+  makeinfo)
+    if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
+       # We have makeinfo, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+    fi
+    touch $file
+    ;;
+
+  tar)
+    shift
+    if test -n "$run"; then
+      echo 1>&2 "ERROR: \`tar' requires --run"
+      exit 1
+    fi
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+       case "$firstarg" in
+       *o*)
+           firstarg=`echo "$firstarg" | sed s/o//`
+           tar "$firstarg" "$@" && exit 0
+           ;;
+       esac
+       case "$firstarg" in
+       *h*)
+           firstarg=`echo "$firstarg" | sed s/h//`
+           tar "$firstarg" "$@" && exit 0
+           ;;
+       esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+         system.  You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequisites for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
diff --git a/mkinstalldirs b/mkinstalldirs
new file mode 100755 (executable)
index 0000000..d2d5f21
--- /dev/null
@@ -0,0 +1,111 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+errstatus=0
+dirmode=""
+
+usage="\
+Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
+
+# process command line arguments
+while test $# -gt 0 ; do
+  case $1 in
+    -h | --help | --h*)         # -h for help
+      echo "$usage" 1>&2
+      exit 0
+      ;;
+    -m)                         # -m PERM arg
+      shift
+      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+      dirmode=$1
+      shift
+      ;;
+    --)                         # stop option processing
+      shift
+      break
+      ;;
+    -*)                         # unknown option
+      echo "$usage" 1>&2
+      exit 1
+      ;;
+    *)                          # first non-opt arg
+      break
+      ;;
+  esac
+done
+
+for file
+do
+  if test -d "$file"; then
+    shift
+  else
+    break
+  fi
+done
+
+case $# in
+  0) exit 0 ;;
+esac
+
+case $dirmode in
+  '')
+    if mkdir -p -- . 2>/dev/null; then
+      echo "mkdir -p -- $*"
+      exec mkdir -p -- "$@"
+    fi
+    ;;
+  *)
+    if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
+      echo "mkdir -m $dirmode -p -- $*"
+      exec mkdir -m "$dirmode" -p -- "$@"
+    fi
+    ;;
+esac
+
+for file
+do
+  set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+  shift
+
+  pathcomp=
+  for d
+  do
+    pathcomp="$pathcomp$d"
+    case $pathcomp in
+      -*) pathcomp=./$pathcomp ;;
+    esac
+
+    if test ! -d "$pathcomp"; then
+      echo "mkdir $pathcomp"
+
+      mkdir "$pathcomp" || lasterr=$?
+
+      if test ! -d "$pathcomp"; then
+       errstatus=$lasterr
+      else
+       if test ! -z "$dirmode"; then
+         echo "chmod $dirmode $pathcomp"
+         lasterr=""
+         chmod "$dirmode" "$pathcomp" || lasterr=$?
+
+         if test ! -z "$lasterr"; then
+           errstatus=$lasterr
+         fi
+       fi
+      fi
+    fi
+
+    pathcomp="$pathcomp/"
+  done
+done
+
+exit $errstatus
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# End:
+# mkinstalldirs ends here
diff --git a/po/Makefile.am b/po/Makefile.am
new file mode 100644 (file)
index 0000000..77b4128
--- /dev/null
@@ -0,0 +1,32 @@
+languages := @ALL_LINGUAS@
+
+CLEANFILES = $(foreach mo,$(languages),$(mo).mo)
+EXTRA_DIST = $(foreach po,$(languages),$(po).po) POTFILES.in README \
+       debian/compat \
+       debian/control \
+       debian/rules \
+       debian/hildon-libs-l10n-engb.install
+
+%.mo: %.po
+       msgfmt --statistics -v -o$(top_builddir)/po/$@ $(srcdir)/$<
+
+all: $(foreach mo,$(languages),$(mo).mo)
+
+merge:
+       for mo in $(languages); do \
+               xgettext -fPOTFILES --foreign-user -C -o$$mo.pot -k_; \
+               msgmerge -v $$mo.po $$mo.pot >messages.tmp; \
+               mv messages.tmp $$mo.po; \
+               rm $$mo.pot; \
+       done
+
+install-data-local: all
+       for mo in $(languages); do \
+               $(mkinstalldirs) $(DESTDIR)$(localedir)/$$mo/LC_MESSAGES; \
+               $(INSTALL_DATA) $(top_builddir)/po/$$mo.mo $(DESTDIR)$(localedir)/$$mo/LC_MESSAGES/$(PACKAGE).mo; \
+       done
+
+uninstall-local:
+       for mo in $(languages); do \
+               rm -f $(DESTDIR)$(localedir)/$$mo/LC_MESSAGES/$(PACKAGE).mo; \
+       done
diff --git a/po/Makefile.in b/po/Makefile.in
new file mode 100644 (file)
index 0000000..aa2f848
--- /dev/null
@@ -0,0 +1,357 @@
+# Makefile.in generated by automake 1.7.9 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+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 = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DOXYGEN_FOUND = @DOXYGEN_FOUND@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_GTK_DOC_FALSE = @ENABLE_GTK_DOC_FALSE@
+ENABLE_GTK_DOC_TRUE = @ENABLE_GTK_DOC_TRUE@
+ESD_CFLAGS = @ESD_CFLAGS@
+ESD_LIBS = @ESD_LIBS@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GCONF_CFLAGS = @GCONF_CFLAGS@
+GCONF_LIBS = @GCONF_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GNOME_VFS_CFLAGS = @GNOME_VFS_CFLAGS@
+GNOME_VFS_LIBS = @GNOME_VFS_LIBS@
+GTKDOC = @GTKDOC@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_VERSION = @GTK_VERSION@
+HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@
+HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@
+HTML_DIR = @HTML_DIR@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJEXT = @OBJEXT@
+OUTO_CFLAGS = @OUTO_CFLAGS@
+OUTO_LIBS = @OUTO_LIBS@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+docdir = @docdir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+outomoduledir = @outomoduledir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+languages := @ALL_LINGUAS@
+
+CLEANFILES = $(foreach mo,$(languages),$(mo).mo)
+EXTRA_DIST = $(foreach po,$(languages),$(po).po) POTFILES.in README \
+       debian/compat \
+       debian/control \
+       debian/rules \
+       debian/hildon-libs-l10n-engb.install
+
+subdir = po
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = porules.mk
+DIST_SOURCES =
+DIST_COMMON = README $(srcdir)/Makefile.in Makefile.am porules.mk.in
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --foreign  po/Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+porules.mk: $(top_builddir)/config.status porules.mk.in
+       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+
+distclean-libtool:
+       -rm -f libtool
+uninstall-info-am:
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+       $(mkinstalldirs) $(distdir)/debian
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkinstalldirs) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile
+
+installdirs:
+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:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+       -rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-data-local
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-local
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+       distclean distclean-generic distclean-libtool distdir dvi \
+       dvi-am info info-am install install-am install-data \
+       install-data-am install-data-local install-exec install-exec-am \
+       install-info install-info-am install-man install-strip \
+       installcheck installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-generic \
+       mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
+       uninstall-info-am uninstall-local
+
+
+%.mo: %.po
+       msgfmt --statistics -v -o$(top_builddir)/po/$@ $(srcdir)/$<
+
+all: $(foreach mo,$(languages),$(mo).mo)
+
+merge:
+       for mo in $(languages); do \
+               xgettext -fPOTFILES --foreign-user -C -o$$mo.pot -k_; \
+               msgmerge -v $$mo.po $$mo.pot >messages.tmp; \
+               mv messages.tmp $$mo.po; \
+               rm $$mo.pot; \
+       done
+
+install-data-local: all
+       for mo in $(languages); do \
+               $(mkinstalldirs) $(DESTDIR)$(localedir)/$$mo/LC_MESSAGES; \
+               $(INSTALL_DATA) $(top_builddir)/po/$$mo.mo $(DESTDIR)$(localedir)/$$mo/LC_MESSAGES/$(PACKAGE).mo; \
+       done
+
+uninstall-local:
+       for mo in $(languages); do \
+               rm -f $(DESTDIR)$(localedir)/$$mo/LC_MESSAGES/$(PACKAGE).mo; \
+       done
+# 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/po/POTFILES b/po/POTFILES
new file mode 100644 (file)
index 0000000..5c90f5c
--- /dev/null
@@ -0,0 +1,22 @@
+       /home/ferenc/014/2_rebuild/hildon-libs-0.9.6/../hildon-widgets/hildon-add-home-dialog.c \
+       /home/ferenc/014/2_rebuild/hildon-libs-0.9.6/../hildon-widgets/hildon-calendar-popup.c \
+       /home/ferenc/014/2_rebuild/hildon-libs-0.9.6/../hildon-widgets/hildon-color-selector.c \
+       /home/ferenc/014/2_rebuild/hildon-libs-0.9.6/../hildon-widgets/hildon-controlbar.c \
+       /home/ferenc/014/2_rebuild/hildon-libs-0.9.6/../hildon-widgets/hildon-date-editor.c \
+       /home/ferenc/014/2_rebuild/hildon-libs-0.9.6/../hildon-widgets/hildon-file-details-dialog.c \
+       /home/ferenc/014/2_rebuild/hildon-libs-0.9.6/../hildon-widgets/hildon-file-handling-note.c \
+       /home/ferenc/014/2_rebuild/hildon-libs-0.9.6/../hildon-widgets/hildon-find-object-dialog.c \
+       /home/ferenc/014/2_rebuild/hildon-libs-0.9.6/../hildon-widgets/hildon-font-selection-dialog.c \
+       /home/ferenc/014/2_rebuild/hildon-libs-0.9.6/../hildon-widgets/hildon-get-password-dialog.c \
+       /home/ferenc/014/2_rebuild/hildon-libs-0.9.6/../hildon-widgets/hildon-grid.c \
+       /home/ferenc/014/2_rebuild/hildon-libs-0.9.6/../hildon-widgets/hildon-insert-object-dialog.c \
+       /home/ferenc/014/2_rebuild/hildon-libs-0.9.6/../hildon-widgets/hildon-name-password-dialog.c \
+       /home/ferenc/014/2_rebuild/hildon-libs-0.9.6/../hildon-widgets/hildon-note.c \
+       /home/ferenc/014/2_rebuild/hildon-libs-0.9.6/../hildon-widgets/hildon-number-editor.c \
+       /home/ferenc/014/2_rebuild/hildon-libs-0.9.6/../hildon-widgets/hildon-set-password-dialog.c \
+       /home/ferenc/014/2_rebuild/hildon-libs-0.9.6/../hildon-widgets/hildon-sort-dialog.c \
+       /home/ferenc/014/2_rebuild/hildon-libs-0.9.6/../hildon-widgets/hildon-telephone-editor.c \
+       /home/ferenc/014/2_rebuild/hildon-libs-0.9.6/../hildon-widgets/hildon-time-editor.c \
+       /home/ferenc/014/2_rebuild/hildon-libs-0.9.6/../hildon-widgets/hildon-time-picker.c \
+       /home/ferenc/014/2_rebuild/hildon-libs-0.9.6/../ut/hildon-clock-widgets_tests.c \
+       /home/ferenc/014/2_rebuild/hildon-libs-0.9.6/../ut/hildon-widgets_tests.c
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644 (file)
index 0000000..da60cdb
--- /dev/null
@@ -0,0 +1,25 @@
+# List of source files containing translatable strings.
+
+# Package source files
+../hildon-widgets/hildon-add-home-dialog.c
+../hildon-widgets/hildon-calendar-popup.c
+../hildon-widgets/hildon-color-selector.c
+../hildon-widgets/hildon-controlbar.c
+../hildon-widgets/hildon-date-editor.c
+../hildon-widgets/hildon-file-details-dialog.c
+../hildon-widgets/hildon-file-handling-note.c
+../hildon-widgets/hildon-find-object-dialog.c
+../hildon-widgets/hildon-font-selection-dialog.c
+../hildon-widgets/hildon-get-password-dialog.c
+../hildon-widgets/hildon-grid.c
+../hildon-widgets/hildon-insert-object-dialog.c
+../hildon-widgets/hildon-name-password-dialog.c
+../hildon-widgets/hildon-note.c
+../hildon-widgets/hildon-number-editor.c
+../hildon-widgets/hildon-set-password-dialog.c
+../hildon-widgets/hildon-sort-dialog.c
+../hildon-widgets/hildon-telephone-editor.c
+../hildon-widgets/hildon-time-editor.c
+../hildon-widgets/hildon-time-picker.c
+../ut/hildon-clock-widgets_tests.c
+../ut/hildon-widgets_tests.c
diff --git a/po/README b/po/README
new file mode 100644 (file)
index 0000000..c17a550
--- /dev/null
+++ b/po/README
@@ -0,0 +1,13 @@
+How to make .po files up to date with the current sources?
+
+  1. make merge
+
+How to add a new locale?
+
+  1. xgettext -fPOTFILES --foreign-user -C -onew.po -k_
+  2. edit Makefile.am first line: add your locale to the "languages" variable
+
+How to add a new source file that contains gettext macros?
+
+  1. edit POTFILES and add your file there
+  2. make merge
diff --git a/po/debian/compat b/po/debian/compat
new file mode 100644 (file)
index 0000000..b8626c4
--- /dev/null
@@ -0,0 +1 @@
+4
diff --git a/po/debian/control b/po/debian/control
new file mode 100644 (file)
index 0000000..785c834
--- /dev/null
@@ -0,0 +1,11 @@
+Source: hildon-libs-l10n-src
+Section: x11
+Priority: optional
+Maintainer: Luc Piochon <luc.piochon@nokia.com>
+Build-Depends: debhelper (>= 4.0.0), gettext
+Standards-Version: 3.6.0
+
+Package: hildon-libs-l10n-engb
+Architecture: all
+Description: Locale for package hildon-libs
+ en_GB locale for hildon-libs.
diff --git a/po/debian/rules b/po/debian/rules
new file mode 100755 (executable)
index 0000000..d02d2e0
--- /dev/null
@@ -0,0 +1,106 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -O0
+else
+       CFLAGS += -O2
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+       INSTALL_PROGRAM += -s
+endif
+
+config.status: configure
+       dh_testdir
+       # Add here commands to configure the package.
+       #CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
+
+
+build: build-stamp
+
+build-stamp: 
+       dh_testdir
+
+       # Add here commands to compile the package.
+       $(MAKE) -f porules.mk 
+
+       touch build-stamp
+
+clean:
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp 
+
+       # Add here commands to clean up after the build process.
+       -$(MAKE) -f porules.mk distclean
+#ifneq "$(wildcard /usr/share/misc/config.sub)" ""
+#      cp -f /usr/share/misc/config.sub config.sub
+#endif
+#ifneq "$(wildcard /usr/share/misc/config.guess)" ""
+#      cp -f /usr/share/misc/config.guess config.guess
+#endif
+
+
+       dh_clean 
+
+install: build
+       dh_testdir
+       dh_testroot
+       dh_clean -k 
+       dh_installdirs
+
+       # Add here commands to install the package into debian/pkgname/
+       $(MAKE) -f porules.mk install DESTDIR=$(CURDIR)/debian/tmp
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+       dh_testdir
+       dh_testroot
+       dh_installchangelogs 
+       dh_installdocs
+#      dh_installexamples
+       dh_install --sourcedir=debian/tmp
+#      dh_installmenu
+#      dh_installdebconf       
+#      dh_installlogrotate
+#      dh_installemacsen
+#      dh_installpam
+#      dh_installmime
+#      dh_installinit
+#      dh_installcron
+#      dh_installinfo
+#      dh_installman
+       dh_link
+       dh_strip
+       dh_compress
+       dh_fixperms
+#      dh_perl
+#      dh_python
+#      dh_makeshlibs
+       dh_installdeb
+       dh_shlibdeps
+       dh_gencontrol
+       dh_md5sums
+       dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install 
diff --git a/po/en_GB.po b/po/en_GB.po
new file mode 100644 (file)
index 0000000..48ccd01
--- /dev/null
@@ -0,0 +1,438 @@
+# English (GB) translation of hildon-libs
+# Copyright (C) 2005 Nokia Corporation
+# This file is distributed under the same license as the hildon-libs package
+#
+
+msgid ""
+msgstr ""
+"Project-Id-Version: hildon-libs 0.1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-02-15 16:15+0200\n"
+"PO-Revision-Date: 2005-03-13 12:00+0200\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
+
+#: ../hildon-widgets/hildon-add-home-dialog.c:78
+msgid "addtoHome_button_ok"
+msgstr "OK"
+
+#: ../hildon-widgets/hildon-add-home-dialog.c:81
+msgid "addtoHome_button_cancel"
+msgstr "Cancel"
+
+#: ../hildon-widgets/hildon-add-home-dialog.c:150
+msgid "ckdg_ti_rename_link"
+msgstr "Rename shortcut"
+
+#: ../hildon-widgets/hildon-add-home-dialog.c:153
+msgid "addtoHome_dialog_title"
+msgstr "Add to Home"
+
+#: ../hildon-widgets/hildon-add-home-dialog.c:159
+msgid "ckdg_ib_link_exists"
+msgstr "Shortcut name already in use"
+
+#: ../hildon-widgets/hildon-add-home-dialog.c:176
+msgid "addtoHome_editor_caption"
+msgstr "Name"
+
+#: ../hildon-widgets/hildon-add-home-dialog.c:186
+msgid "ckdg_fi_rename_name"
+msgstr "Name:"
+
+#: ../hildon-widgets/hildon-calendar-popup.c:217
+msgid "Ecdg_bd_calendar_popout_done"
+msgstr "Done"
+
+
+msgid "ecdg_ti_colour_selector"
+msgstr "Colour Selector"
+
+#: ../hildon-widgets/hildon-color-selector.c:341
+#: ../hildon-widgets/hildon-color-selector.c:688
+msgid "ecdg_bd_colour_selector_ok"
+msgstr "OK"
+
+#: ../hildon-widgets/hildon-color-selector.c:345
+#: ../hildon-widgets/hildon-color-selector.c:689
+msgid "ecdg_bd_colour_selector_cancel"
+msgstr "Cancel"
+
+
+msgid "ecdg_bd_5bit_colour_selector_ok"
+msgstr "OK"
+
+#: ../hildon-widgets/hildon-color-selector.c:343
+msgid "ecdg_ti_5bit_colour_selector"
+msgstr "Modify colour"
+
+msgid "Ecdg_bd_5bit_colour_selector_cancel"
+msgstr "Cancel"
+
+msgid "Ecdg_fi_5bit_colour_selector_red"
+msgstr "Red"
+
+msgid "Ecdg_fi_5bit_colour_selector_green"
+msgstr "Green"
+
+msgid "Ecdg_fi_5bit_colour_selector_blue"
+msgstr "Blue"
+
+
+
+#: ../hildon-widgets/hildon-note.c:37
+#: ../hildon-widgets/hildon-note.c:445
+msgid "Ecdg_bd_information_note_ok"
+msgstr "OK"
+
+#: ../hildon-widgets/hildon-note.c:431
+msgid "Ecdg_bd_confirmation_note_ok"
+msgstr "OK"
+
+#: ../hildon-widgets/hildon-note.c:436
+msgid "Ecdg_bd_confirmation_note_cancel"
+msgstr "Cancel"
+
+#: ../hildon-widgets/hildon-note.c:475
+msgid "Ecdg_bd_cancel_note_cancel"
+msgstr "Cancel"
+
+#: ../hildon-widgets/hildon-file-details-dialog.c:183
+msgid "sfil_ti_notebook_file"
+msgstr "File"
+
+#:
+msgid "sfil_fi_properties_device_prompt"
+msgstr "Device:"
+
+#: ../hildon-widgets/hildon-file-details-dialog.c:198
+msgid "sfil_fi_properties_location_prompt"
+msgstr "Location:"
+
+#: ../hildon-widgets/hildon-file-details-dialog.c:202
+msgid "ckdg_fi_properties_name_prompt"
+msgstr "Name:"
+
+#: ../hildon-widgets/hildon-file-details-dialog.c:206
+msgid "ckdg_fi_properties_type_prompt"
+msgstr "Type:"
+
+#: ../hildon-widgets/hildon-file-details-dialog.c:210
+msgid "ckdg_fi_properties_size_prompt"
+msgstr "Size:"
+
+#: ../hildon-widgets/hildon-file-details-dialog.c:214
+msgid "ckdg_fi_properties_date_prompt"
+msgstr "Date:"
+
+#: ../hildon-widgets/hildon-file-details-dialog.c:218
+msgid "ckdg_fi_properties_time_prompt"
+msgstr "Time:"
+
+#: ../hildon-widgets/hildon-file-details-dialog.c:222
+msgid "ckdg_fi_properties_read_only"
+msgstr "Read-only:"
+
+#: ../hildon-widgets/hildon-file-details-dialog.c:236
+msgid "sfil_ti_notebook_common"
+msgstr "Common"
+
+#: ../hildon-widgets/hildon-file-details-dialog.c:242
+msgid "sfil_bd_filetype_details_dialog_ok"
+msgstr "OK"
+
+#:
+msgid "sfil_bd_filetype_details_dialog_cancel"
+msgstr "Cancel"
+
+#: ../hildon-widgets/hildon-file-details-dialog.c:280
+msgid "sfil_ia_filetype_no_details"
+msgstr "(no details)"
+
+#: ../hildon-widgets/hildon-file-details-dialog.c:381
+#: ../hildon-widgets/hildon-file-details-dialog.c:411
+msgid "sfil_ti_file_details"
+msgstr "File details"
+
+#: ../hildon-widgets/hildon-file-details-dialog.c:466
+msgid "ckdg_va_properties_size_bytes"
+msgstr "%d B"
+
+#: ../hildon-widgets/hildon-file-details-dialog.c:469
+msgid "ckdg_va_properties_size_kb"
+msgstr "%d kB"
+
+#: ../hildon-widgets/hildon-time-picker.c:487
+msgid "ecdg_bd_time_picker_close"
+msgstr "Close"
+
+#: ../hildon-widgets/hildon-font-selection-dialog.c:228
+msgid "ecdg_fi_font_font"
+msgstr "Font face:"
+
+#: ../hildon-widgets/hildon-font-selection-dialog.c:238
+msgid "ecdg_fi_font_size"
+msgstr "Font size:"
+
+#: ../hildon-widgets/hildon-font-selection-dialog.c:270
+msgid "ecdg_fi_font_color_selector"
+msgstr "Color:"
+
+#: ../hildon-widgets/hildon-font-selection-dialog.c:280
+msgid "ecdg_fi_font_bold"
+msgstr "Bold:"
+
+#: ../hildon-widgets/hildon-font-selection-dialog.c:291
+msgid "ecdg_fi_font_italic"
+msgstr "Italic:"
+
+#: ../hildon-widgets/hildon-font-selection-dialog.c:301
+msgid "ecdg_fi_font_underline"
+msgstr "Underline:"
+
+#: ../hildon-widgets/hildon-font-selection-dialog.c:315
+msgid "ecdg_fi_font_strikethrough"
+msgstr "Strikethrough:"
+
+#: ../hildon-widgets/hildon-font-selection-dialog.c:324
+msgid "ecdg_fi_font_special"
+msgstr "Positioning:"
+
+#: ../hildon-widgets/hildon-font-selection-dialog.c:335
+msgid "ecdg_ti_font_dialog_style"
+msgstr "Style"
+
+#: ../hildon-widgets/hildon-font-selection-dialog.c:337
+msgid "ecdg_ti_font_dialog_format"
+msgstr "Formatting"
+
+#: ../hildon-widgets/hildon-font-selection-dialog.c:339
+msgid "ecdg_ti_font_dialog_other"
+msgstr "Other"
+
+#: ../hildon-widgets/hildon-font-selection-dialog.c:346
+msgid "ecdg_bd_font_dialog_ok"
+msgstr "OK"
+
+#: ../hildon-widgets/hildon-font-selection-dialog.c:349
+msgid "ecdg_bd_font_dialog_preview"
+msgstr "Preview"
+
+#: ../hildon-widgets/hildon-font-selection-dialog.c:352
+msgid "ecdg_bd_font_dialog_cancel"
+msgstr "Cancel"
+
+#: ../hildon-widgets/hildon-font-selection-dialog.c:356
+msgid "ecdg_fi_preview_font_preview_text"
+msgstr "The quick brown fox jumped over the lazy dogs"
+
+#: ../hildon-widgets/hildon-font-selection-dialog.c:383
+msgid "ecdg_ti_preview_font"
+msgstr "Preview"
+
+#: ../hildon-widgets/hildon-font-selection-dialog.c:407
+msgid "ecdg_ti_font"
+msgstr "Font"
+
+#: ../hildon-widgets/hildon-font-selection-dialog.c:840
+msgid "ecdg_va_font_printpos_1"
+msgstr "Normal"
+
+#: ../hildon-widgets/hildon-font-selection-dialog.c:842
+msgid "ecdg_va_font_printpos_2"
+msgstr "Superscript"
+
+#: ../hildon-widgets/hildon-font-selection-dialog.c:844
+msgid "ecdg_va_font_printpos_3"
+msgstr "Subscript"
+
+#: ../hildon-widgets/hildon-get-password-dialog.c:44
+msgid "ecdg_fi_verify_pwd_enter_pwd"
+msgstr "Enter password:"
+
+#: ../hildon-widgets/hildon-get-password-dialog.c:45
+msgid "ecdg_bd_verify_password_dialog_ok"
+msgstr "OK"
+
+#: ../hildon-widgets/hildon-get-password-dialog.c:46
+msgid "ecdg_bd_verify_password_dialog_cancel"
+msgstr "Cancel"
+
+#: ../hildon-widgets/hildon-get-password-dialog.c:47
+msgid "ecdg_bd_verify_password"
+msgstr "Password protected"
+
+#: ../hildon-widgets/hildon-get-password-dialog.c:48
+msgid "ecdg_ti_get_old_password"
+msgstr "Enter current password"
+
+#: ../hildon-widgets/hildon-insert-object-dialog.c:127
+msgid "ckdg_ti_insert_insert_objec"
+msgstr "Insert object"
+
+#: ../hildon-widgets/hildon-insert-object-dialog.c:134
+msgid "ckdg_bd_insert_new"
+msgstr "Insert new"
+
+#: ../hildon-widgets/hildon-insert-object-dialog.c:139
+msgid "ckdg_bd_insert_existing"
+msgstr "Insert existing"
+
+#: ../hildon-widgets/hildon-insert-object-dialog.c:144
+msgid "ckdg_bd_insert_cancel"
+msgstr "Cancel"
+
+#: ../hildon-widgets/hildon-name-password-dialog.c:68
+msgid "frw_ti_get_user_name_and_pwd"
+msgstr "Enter user name and password"
+
+#: ../hildon-widgets/hildon-name-password-dialog.c:72
+msgid "frw_bd_get_user_name_and_pwd_ok"
+msgstr "OK"
+
+#: ../hildon-widgets/hildon-name-password-dialog.c:76
+msgid "frw_bd_get_user_name_and_pwd_cancel"
+msgstr "Cancel"
+
+#: ../hildon-widgets/hildon-name-password-dialog.c:82
+msgid "frw_ti_get_user_name_and_pwd_enter_user_name"
+msgstr "Enter user name:"
+
+#: ../hildon-widgets/hildon-name-password-dialog.c:91
+msgid "frw_ti_get_user_name_and_pwd_enter_pwd"
+msgstr "Enter password:"
+
+#: ../hildon-widgets/hildon-number-editor.c:367
+#, c-format
+msgid "Ckct_ib_maximum_value"
+msgstr "Maximum value is %d"
+
+#: ../hildon-widgets/hildon-number-editor.c:372
+#, c-format
+msgid "Ckct_ib_minimum_value"
+msgstr "Minimum value is %d"
+
+#: ../hildon-widgets/hildon-number-editor.c:378
+#, c-format
+msgid "Ckct_ib_set_a_value_within_range"
+msgstr "Set a value between %d and %d"
+
+#: ../hildon-widgets/hildon-set-password-dialog.c:179
+msgid "ckdg_fi_dialog_c_passwd_new_pwd"
+msgstr "New password:"
+
+#: ../hildon-widgets/hildon-set-password-dialog.c:180
+msgid "ckdg_fi_dialog_c_passwd_ver_pwd"
+msgstr "Verify new password:"
+
+#: ../hildon-widgets/hildon-set-password-dialog.c:188
+msgid "ckdg_fi_dialog_c_passwd_pwd_protect"
+msgstr "Password protected:"
+
+#: ../hildon-widgets/hildon-set-password-dialog.c:204
+msgid "ecdg_fi_set_passwd_enter_pwd"
+msgstr "New password:"
+
+#: ../hildon-widgets/hildon-set-password-dialog.c:205
+msgid "ecdg_fi_set_passwd_confirm"
+msgstr "Verify new password:"
+
+#: ../hildon-widgets/hildon-set-password-dialog.c:258
+msgid "ckdg_ti_dialog_c_passwd_change_password"
+msgstr "Change password"
+
+#: ../hildon-widgets/hildon-set-password-dialog.c:259
+msgid "ecdg_ti_set_password"
+msgstr "Set password"
+
+#: ../hildon-widgets/hildon-set-password-dialog.c:264
+msgid "ckdg_bd_change_password_dialog_ok"
+msgstr "OK"
+
+#: ../hildon-widgets/hildon-set-password-dialog.c:265
+msgid "ecdg_bd_set_password_dialog_ok"
+msgstr "OK"
+
+#: ../hildon-widgets/hildon-set-password-dialog.c:269
+msgid "ckdg_bd_change_password_dialog_cancel"
+msgstr "Cancel"
+
+#: ../hildon-widgets/hildon-set-password-dialog.c:270
+msgid "ecdg_bd_set_password_dialog_cancel"
+msgstr "Cancel"
+
+#: ../hildon-widgets/hildon-set-password-dialog.c:362
+msgid "ckdg_nc_dialog_c_passwd_remove_pwd"
+msgstr "Remove password protection?"
+
+#: ../hildon-widgets/hildon-set-password-dialog.c:365
+msgid "ckdg_bd_dialog_c_passwd_remove_button"
+msgstr "Remove"
+
+#: ../hildon-widgets/hildon-set-password-dialog.c:423
+msgid "ecdg_ib_password_is_empty"
+msgstr "Enter a password"
+
+#: ../hildon-widgets/hildon-set-password-dialog.c:423
+msgid "ecdg_ib_passwords_do_not_match"
+msgstr "Passwords do not match"
+
+#: ../hildon-widgets/hildon-set-password-dialog.c:423
+msgid "ckdg_ib_dialog_c_passwd_unmatched_pwd"
+msgstr "Passwords do not match"
+
+#: ../hildon-widgets/hildon-sort-dialog.c:94
+msgid "ckdg_ti_sort"
+msgstr "Sort"
+
+#: ../hildon-widgets/hildon-sort-dialog.c:98
+msgid "ckdg_fi_sort_field"
+msgstr "Sort by:"
+
+#: ../hildon-widgets/hildon-sort-dialog.c:107
+msgid "ckdg_va_sort_ascending"
+msgstr "Ascending"
+
+#: ../hildon-widgets/hildon-sort-dialog.c:109
+msgid "ckdg_va_sort_descending"
+msgstr "Descending"
+
+#: ../hildon-widgets/hildon-sort-dialog.c:111
+msgid "ckdg_fi_sort_order"
+msgstr "Sorting order:"
+
+#: ../hildon-widgets/hildon-sort-dialog.c:123
+msgid "ckdg_bd_sort_dialog_ok"
+msgstr "OK"
+
+#: ../hildon-widgets/hildon-sort-dialog.c:126
+msgid "ckdg_bd_sort_dialog_cancel"
+msgstr "Cancel"
+
+#, c-format
+msgid "Ecdg_ti_wizard_welcome"
+msgstr "%s step 1/%d: Welcome"
+
+#, c-format
+msgid "Ecdg_ti_wizard_step"
+msgstr "%s step %d/%d: %s"
+
+#: ../hildon-widgets/hildon-wizard-dialog.c:139
+msgid "Ecdg_bd_wizard_cancel"
+msgstr "Cancel"
+
+#: ../hildon-widgets/hildon-wizard-dialog.c:141
+msgid "Ecdg_bd_wizard_previous"
+msgstr "Previous"
+
+#: ../hildon-widgets/hildon-wizard-dialog.c:143
+msgid "Ecdg_bd_wizard_next"
+msgstr "Next"
+
+#: ../hildon-widgets/hildon-wizard-dialog.c:145
+msgid "Ecdg_bd_wizard_finish"
+msgstr "Finish"
+
diff --git a/po/porules.mk.in b/po/porules.mk.in
new file mode 100644 (file)
index 0000000..d2e48d5
--- /dev/null
@@ -0,0 +1,140 @@
+# Makefile for program source directory in GNU NLS utilities package.\r
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>\r
+#\r
+# This file file be copied and used freely without restrictions.  It can\r
+# be used in projects which are not available under the GNU Public License\r
+# but which still want to provide support for the GNU gettext functionality.\r
+# Please note that the actual code is *not* freely available.\r
+#\r
+\r
+GETTEXT_PACKAGE = @PACKAGE@\r
+PACKAGE = @PACKAGE@\r
+VERSION = @VERSION@\r
+\r
+SHELL = /bin/sh\r
+\r
+prefix = /usr\r
+exec_prefix = ${prefix}\r
+datadir = ${prefix}/share\r
+gnulocaledir = $(datadir)/locale\r
+\r
+INSTALL = @INSTALL@\r
+INSTALL_DATA = @INSTALL_DATA@\r
+MKINSTALLDIRS = mkdir -p\r
+\r
+GENCAT = @GENCAT@\r
+GMSGFMT = @GMSGFMT@\r
+MSGFMT = @MSGFMT@\r
+XGETTEXT = @XGETTEXT@\r
+MSGMERGE = msgmerge\r
+\r
+\r
+POFILES = @POFILES@\r
+GMOFILES = @GMOFILES@\r
+DISTFILES = $(GMOFILES)\r
+\r
+CATALOGS = @CATALOGS@\r
+CATOBJEXT = @CATOBJEXT@\r
+INSTOBJEXT = @INSTOBJEXT@\r
+\r
+.SUFFIXES:\r
+.SUFFIXES: .po .gmo .mo\r
+\r
+.po.mo:\r
+       $(MSGFMT) -o $@ $<\r
+\r
+.po.gmo:\r
+       file=`echo $* | sed 's,.*/,,'`.gmo \\r
+         && rm -f $$file && $(GMSGFMT) -o $$file $<\r
+\r
+all: all-yes\r
+\r
+all-yes: $(CATALOGS)\r
+all-no:\r
+\r
+install: install-exec install-data\r
+install-exec:\r
+install-data: install-data-yes\r
+install-data-no: all\r
+install-data-yes: all\r
+       $(MKINSTALLDIRS) $(DESTDIR)$(datadir)\r
+       @catalogs='$(CATALOGS)'; \\r
+       for cat in $$catalogs; do \\r
+         cat=`basename $$cat`; \\r
+         case "$$cat" in \\r
+           *.gmo) destdir=$(gnulocaledir);; \\r
+           *)     destdir=$(localedir);; \\r
+         esac; \\r
+         lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \\r
+         dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \\r
+         $(MKINSTALLDIRS) $$dir; \\r
+         if test -r $$cat; then \\r
+           $(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \\r
+           echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \\r
+         else \\r
+           $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \\r
+           echo "installing $(srcdir)/$$cat as" \\r
+                "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \\r
+         fi; \\r
+         if test -r $$cat.m; then \\r
+           $(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \\r
+           echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \\r
+         else \\r
+           if test -r $(srcdir)/$$cat.m ; then \\r
+             $(INSTALL_DATA) $(srcdir)/$$cat.m \\r
+               $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \\r
+             echo "installing $(srcdir)/$$cat as" \\r
+                  "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \\r
+           else \\r
+             true; \\r
+           fi; \\r
+         fi; \\r
+       done\r
+\r
+\r
+# Define this as empty until I found a useful application.\r
+installcheck:\r
+\r
+uninstall:\r
+       catalogs='$(CATALOGS)'; \\r
+       for cat in $$catalogs; do \\r
+         cat=`basename $$cat`; \\r
+         lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \\r
+         rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \\r
+         rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \\r
+         rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \\r
+         rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \\r
+       done\r
+       if test "$(PACKAGE)" = "glib"; then \\r
+         rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \\r
+       fi\r
+\r
+check: all\r
+\r
+dvi info tags TAGS ID:\r
+\r
+mostlyclean:\r
+       rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp\r
+       rm -fr *.o\r
+\r
+clean: mostlyclean\r
+\r
+distclean: clean\r
+       rm -f *.gmo *.mo *.msg *.cat *.cat.m\r
+\r
+maintainer-clean: distclean\r
+       @echo "This command is intended for maintainers to use;"\r
+       @echo "it deletes files that may require special tools to rebuild."\r
+       rm -f $(GMOFILES)\r
+\r
+distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir)\r
+dist distdir: update-po $(DISTFILES)\r
+       dists="$(DISTFILES)"; \\r
+       for file in $$dists; do \\r
+         ln $(srcdir)/$$file $(distdir) 2> /dev/null \\r
+           || cp -p $(srcdir)/$$file $(distdir); \\r
+       done\r
+\r
+# Tell versions [3.59,3.63) of GNU make not to export all variables.\r
+# Otherwise a system limit (for SysV at least) may be exceeded.\r
+.NOEXPORT:\r
diff --git a/ut/Makefile.am b/ut/Makefile.am
new file mode 100644 (file)
index 0000000..e95cb18
--- /dev/null
@@ -0,0 +1,12 @@
+outomodule_LTLIBRARIES = \
+       libhildonwidgets_unittests.la \
+       libhildonwidgets_clock_unittests.la
+
+INCLUDES = $(GTK_CFLAGS) $(GNOME_VFS_CFLAGS) -I$(top_srcdir)/hildon-widgets $(OUTO_CFLAGS)
+LDFLAGS = -module -avoid-version
+
+libhildonwidgets_unittests_la_SOURCES = hildon-widgets_tests.c
+libhildonwidgets_unittests_la_LIBADD = $(GTK_LIBS) $(GNOME_VFS_LIBS) $(top_builddir)/hildon-widgets/libhildonwidgets.la
+
+libhildonwidgets_clock_unittests_la_SOURCES = hildon-clock-widgets_tests.c
+libhildonwidgets_clock_unittests_la_LIBADD = $(GTK_LIBS) $(GNOME_VFS_LIBS) $(top_builddir)/hildon-widgets/libhildonwidgets.la
diff --git a/ut/Makefile.in b/ut/Makefile.in
new file mode 100644 (file)
index 0000000..5d3c35f
--- /dev/null
@@ -0,0 +1,495 @@
+# Makefile.in generated by automake 1.7.9 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+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 = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DBUS_CFLAGS = @DBUS_CFLAGS@
+DBUS_LIBS = @DBUS_LIBS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DOXYGEN_FOUND = @DOXYGEN_FOUND@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_GTK_DOC_FALSE = @ENABLE_GTK_DOC_FALSE@
+ENABLE_GTK_DOC_TRUE = @ENABLE_GTK_DOC_TRUE@
+ESD_CFLAGS = @ESD_CFLAGS@
+ESD_LIBS = @ESD_LIBS@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GCONF_CFLAGS = @GCONF_CFLAGS@
+GCONF_LIBS = @GCONF_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GNOME_VFS_CFLAGS = @GNOME_VFS_CFLAGS@
+GNOME_VFS_LIBS = @GNOME_VFS_LIBS@
+GTKDOC = @GTKDOC@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_VERSION = @GTK_VERSION@
+HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@
+HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@
+HTML_DIR = @HTML_DIR@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+LDFLAGS = -module -avoid-version
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJEXT = @OBJEXT@
+OUTO_CFLAGS = @OUTO_CFLAGS@
+OUTO_LIBS = @OUTO_LIBS@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+docdir = @docdir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+outomoduledir = @outomoduledir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+outomodule_LTLIBRARIES = \
+       libhildonwidgets_unittests.la \
+       libhildonwidgets_clock_unittests.la
+
+
+INCLUDES = $(GTK_CFLAGS) $(GNOME_VFS_CFLAGS) -I$(top_srcdir)/hildon-widgets $(OUTO_CFLAGS)
+
+libhildonwidgets_unittests_la_SOURCES = hildon-widgets_tests.c
+libhildonwidgets_unittests_la_LIBADD = $(GTK_LIBS) $(GNOME_VFS_LIBS) $(top_builddir)/hildon-widgets/libhildonwidgets.la
+
+libhildonwidgets_clock_unittests_la_SOURCES = hildon-clock-widgets_tests.c
+libhildonwidgets_clock_unittests_la_LIBADD = $(GTK_LIBS) $(GNOME_VFS_LIBS) $(top_builddir)/hildon-widgets/libhildonwidgets.la
+subdir = ut
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(outomodule_LTLIBRARIES)
+
+libhildonwidgets_clock_unittests_la_LDFLAGS =
+libhildonwidgets_clock_unittests_la_DEPENDENCIES = \
+       $(top_builddir)/hildon-widgets/libhildonwidgets.la
+am_libhildonwidgets_clock_unittests_la_OBJECTS = \
+       hildon-clock-widgets_tests.lo
+libhildonwidgets_clock_unittests_la_OBJECTS = \
+       $(am_libhildonwidgets_clock_unittests_la_OBJECTS)
+libhildonwidgets_unittests_la_LDFLAGS =
+libhildonwidgets_unittests_la_DEPENDENCIES = \
+       $(top_builddir)/hildon-widgets/libhildonwidgets.la
+am_libhildonwidgets_unittests_la_OBJECTS = hildon-widgets_tests.lo
+libhildonwidgets_unittests_la_OBJECTS = \
+       $(am_libhildonwidgets_unittests_la_OBJECTS)
+
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/hildon-clock-widgets_tests.Plo \
+@AMDEP_TRUE@   ./$(DEPDIR)/hildon-widgets_tests.Plo
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
+       $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(libhildonwidgets_clock_unittests_la_SOURCES) \
+       $(libhildonwidgets_unittests_la_SOURCES)
+DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
+SOURCES = $(libhildonwidgets_clock_unittests_la_SOURCES) $(libhildonwidgets_unittests_la_SOURCES)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --foreign  ut/Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+outomoduleLTLIBRARIES_INSTALL = $(INSTALL)
+install-outomoduleLTLIBRARIES: $(outomodule_LTLIBRARIES)
+       @$(NORMAL_INSTALL)
+       $(mkinstalldirs) $(DESTDIR)$(outomoduledir)
+       @list='$(outomodule_LTLIBRARIES)'; for p in $$list; do \
+         if test -f $$p; then \
+           f="`echo $$p | sed -e 's|^.*/||'`"; \
+           echo " $(LIBTOOL) --mode=install $(outomoduleLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(outomoduledir)/$$f"; \
+           $(LIBTOOL) --mode=install $(outomoduleLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(outomoduledir)/$$f; \
+         else :; fi; \
+       done
+
+uninstall-outomoduleLTLIBRARIES:
+       @$(NORMAL_UNINSTALL)
+       @list='$(outomodule_LTLIBRARIES)'; for p in $$list; do \
+           p="`echo $$p | sed -e 's|^.*/||'`"; \
+         echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(outomoduledir)/$$p"; \
+         $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(outomoduledir)/$$p; \
+       done
+
+clean-outomoduleLTLIBRARIES:
+       -test -z "$(outomodule_LTLIBRARIES)" || rm -f $(outomodule_LTLIBRARIES)
+       @list='$(outomodule_LTLIBRARIES)'; for p in $$list; do \
+         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+         test "$$dir" = "$$p" && dir=.; \
+         echo "rm -f \"$${dir}/so_locations\""; \
+         rm -f "$${dir}/so_locations"; \
+       done
+libhildonwidgets_clock_unittests.la: $(libhildonwidgets_clock_unittests_la_OBJECTS) $(libhildonwidgets_clock_unittests_la_DEPENDENCIES) 
+       $(LINK) -rpath $(outomoduledir) $(libhildonwidgets_clock_unittests_la_LDFLAGS) $(libhildonwidgets_clock_unittests_la_OBJECTS) $(libhildonwidgets_clock_unittests_la_LIBADD) $(LIBS)
+libhildonwidgets_unittests.la: $(libhildonwidgets_unittests_la_OBJECTS) $(libhildonwidgets_unittests_la_DEPENDENCIES) 
+       $(LINK) -rpath $(outomoduledir) $(libhildonwidgets_unittests_la_LDFLAGS) $(libhildonwidgets_unittests_la_OBJECTS) $(libhildonwidgets_unittests_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-clock-widgets_tests.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-widgets_tests.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@     -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@   else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@   fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
+
+.c.obj:
+@am__fastdepCC_TRUE@   if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@     -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+@am__fastdepCC_TRUE@   else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@   fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+
+.c.lo:
+@am__fastdepCC_TRUE@   if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+@am__fastdepCC_TRUE@     -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+@am__fastdepCC_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \
+@am__fastdepCC_TRUE@   else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+@am__fastdepCC_TRUE@   fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+
+distclean-libtool:
+       -rm -f libtool
+uninstall-info-am:
+
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       mkid -fID $$unique
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(ETAGS_ARGS)$$tags$$unique" \
+         || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+            $$tags $$unique
+
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkinstalldirs) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+
+installdirs:
+       $(mkinstalldirs) $(DESTDIR)$(outomoduledir)
+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:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-outomoduleLTLIBRARIES \
+       mostlyclean-am
+
+distclean: distclean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-outomoduleLTLIBRARIES
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -rf ./$(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-info-am uninstall-outomoduleLTLIBRARIES
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+       clean-libtool clean-outomoduleLTLIBRARIES ctags distclean \
+       distclean-compile distclean-generic distclean-libtool \
+       distclean-tags distdir dvi dvi-am info info-am install \
+       install-am install-data install-data-am install-exec \
+       install-exec-am install-info install-info-am install-man \
+       install-outomoduleLTLIBRARIES install-strip installcheck \
+       installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags uninstall uninstall-am uninstall-info-am \
+       uninstall-outomoduleLTLIBRARIES
+
+# 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/ut/hildon-clock-widgets_tests.c b/ut/hildon-clock-widgets_tests.c
new file mode 100644 (file)
index 0000000..943bd0d
--- /dev/null
@@ -0,0 +1,686 @@
+/* -*- mode: C; c-file-style: "stroustrup"; indent-tabs-mode: nil; -*- */
+/* Copyright (c) 2003 Nokia Oyj*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <assert.h>
+
+#include <gtk/gtk.h>
+
+#include <hildon-widgets/hildon-date-editor.h>
+#include <hildon-widgets/hildon-time-editor.h>
+#include <hildon-widgets/hildon-calendar-popup.h>
+
+#include <outo.h>
+
+/* Prototypes */
+void init_test (void);
+testcase* get_tests (void);
+
+void init_test (void)
+{
+    int plop = 0;
+    gtk_init (&plop, NULL);
+}
+
+/* time editor: new time: ok parameters */
+static int test01a()
+{
+  HildonTimeEditor *time_editor;
+
+  
+  time_editor = HILDON_TIME_EDITOR(hildon_time_editor_new());
+  assert(time_editor);
+  return 1;
+}
+
+/* time editor: get time: ok parameters */
+static int test02a()
+{
+  HildonTimeEditor *time_editor;
+  guint hours = 99, minutes = 99, seconds = 99;
+
+  
+
+  time_editor = HILDON_TIME_EDITOR(hildon_time_editor_new());
+  hildon_time_editor_get_time( time_editor, &hours, &minutes, &seconds );
+
+  assert (hours   >= 0 && hours   < 24);
+  assert (minutes >= 0 && minutes < 60);
+  assert (seconds >= 0 && seconds < 60);
+
+  return 1;
+}
+
+/* time editor: get time: null time editor */
+static int test02b()
+{
+  HildonTimeEditor *time_editor = NULL;
+  guint hours = 99, minutes = 99, seconds = 99;
+
+  
+
+  hildon_time_editor_get_time( time_editor, &hours, &minutes, &seconds );
+
+  assert (hours   >= 0 && hours   < 24);
+  assert (minutes >= 0 && minutes < 60);
+  assert (seconds >= 0 && seconds < 60);
+
+  return 1;
+}
+
+/* time editor: get time: null minutes */
+static int test02c()
+{
+  HildonTimeEditor *time_editor = NULL;
+  guint hours = 99, seconds = 99;
+
+  
+
+  hildon_time_editor_get_time (time_editor, &hours, NULL, &seconds);
+
+  return 1;
+}
+
+/* time editor: get time: null hours */
+static int test02d()
+{
+  HildonTimeEditor *time_editor = NULL;
+  guint minutes = 99, seconds = 99;
+
+  
+
+  hildon_time_editor_get_time (time_editor, NULL, &minutes, &seconds);
+
+  return 1;
+}
+
+/* time editor: get time: null hours, null minutes, null seconds */
+static int test02e()
+{
+  HildonTimeEditor *time_editor = NULL;
+
+  
+
+  hildon_time_editor_get_time (time_editor, NULL, NULL, NULL);
+
+  return 1;
+}
+
+/* time editor: get time: null seconds */
+static int test02f()
+{
+  HildonTimeEditor *time_editor = NULL;
+  guint hours = 99, minutes = 99;;
+
+  init_test();
+
+  hildon_time_editor_get_time (time_editor, &hours, &minutes, NULL);
+
+  return 1;
+}
+
+/* time editor: set time: hours, minutes, seconds are the minimum */
+static int test03a()
+{
+  HildonTimeEditor *time_editor;
+  guint hours = 0, minutes = 0, seconds = 0;
+
+  
+
+  time_editor = HILDON_TIME_EDITOR(hildon_time_editor_new());
+
+  hildon_time_editor_set_time (time_editor, hours, minutes, seconds);
+  hildon_time_editor_get_time (time_editor, &hours, &minutes, &seconds);
+
+  assert (hours   == 0);
+  assert (minutes == 0);
+  assert (seconds == 0);
+
+  return 1;
+}
+
+/* time editor: set time: ok parameters */
+static int test03b()
+{
+  HildonTimeEditor *time_editor;
+  guint hours = 12, minutes = 30, seconds = 30;
+
+  
+
+  time_editor = HILDON_TIME_EDITOR(hildon_time_editor_new());
+
+  hildon_time_editor_set_time (time_editor, hours, minutes, seconds);
+  hildon_time_editor_get_time (time_editor, &hours, &minutes, &seconds);
+
+  assert (hours   == 12);
+  assert (minutes == 30);
+  assert (seconds == 30);
+
+  return 1;
+}
+
+/* time editor: set time: hours on limit */
+static int test03c()
+{
+  HildonTimeEditor *time_editor;
+  guint hours = 24, minutes = 30, seconds = 0;
+
+  
+
+  time_editor = HILDON_TIME_EDITOR(hildon_time_editor_new());
+
+  hildon_time_editor_set_time (time_editor, hours, minutes, seconds);
+  hildon_time_editor_get_time (time_editor, &hours, &minutes, &seconds);
+
+  assert (hours   == 24);
+  assert (minutes == 30);
+  assert (seconds == 0);
+
+
+  return 1;
+}
+
+/* time editor: set time: minutes on limit */
+static int test03d()
+{
+  HildonTimeEditor *time_editor;
+  guint hours = 12, minutes = 60, seconds = 0;
+
+  
+
+  time_editor = HILDON_TIME_EDITOR(hildon_time_editor_new());
+
+  hildon_time_editor_set_time (time_editor, hours, minutes, seconds);
+  hildon_time_editor_get_time (time_editor, &hours, &minutes, &seconds);
+
+  assert (hours   == 12);
+  assert (minutes == 60);
+  assert (seconds == 0);
+
+
+  return 1;
+}
+
+/* time editor: set time: seconds on limit */
+static int test03da()
+{
+  HildonTimeEditor *time_editor;
+  guint hours = 12, minutes = 30, seconds = 60;
+
+  init_test();
+
+  time_editor = HILDON_TIME_EDITOR(hildon_time_editor_new());
+
+  hildon_time_editor_set_time (time_editor, hours, minutes, seconds);
+  hildon_time_editor_get_time (time_editor, &hours, &minutes, &seconds);
+
+  assert (hours   == 12);
+  assert (minutes == 30);
+  assert (seconds == 60);
+
+  return 1;
+}
+
+
+/* time editor: set time: hours, minutes on limit */
+static int test03e()
+{
+  HildonTimeEditor *time_editor;
+  guint hours = 24, minutes = 60, seconds = 0;
+
+  
+
+  time_editor = HILDON_TIME_EDITOR(hildon_time_editor_new());
+
+  hildon_time_editor_set_time (time_editor, hours, minutes, seconds);
+  hildon_time_editor_get_time (time_editor, &hours, &minutes, &seconds);
+
+  assert (hours   == 24);
+  assert (minutes == 60);
+  assert (seconds == 0);
+
+  return 1;
+}
+
+/* time editor: set time: hours, minutes, second on limit */
+static int test03ea()
+{
+  HildonTimeEditor *time_editor;
+  guint hours = 24, minutes = 60, seconds = 60;
+
+  init_test();
+
+  time_editor = HILDON_TIME_EDITOR(hildon_time_editor_new());
+
+  hildon_time_editor_set_time (time_editor, hours, minutes, seconds);
+  hildon_time_editor_get_time (time_editor, &hours, &minutes, &seconds);
+
+  assert( hours   == 24 );
+  assert( minutes == 60 );
+  assert( seconds == 60 );
+
+  return 1;
+}
+
+/* time editor: set time: hours, minutes over max */
+static int test03f()
+{
+  HildonTimeEditor *time_editor;
+  guint hours = 25, minutes = 61, seconds = 0;
+
+  
+
+  time_editor = HILDON_TIME_EDITOR(hildon_time_editor_new());
+
+  hildon_time_editor_set_time (time_editor, hours, minutes, seconds);
+  hildon_time_editor_get_time (time_editor, &hours, &minutes, &seconds);
+
+  assert (hours   == 25);
+  assert (minutes == 61);
+  assert (seconds == 0);
+
+  return 1;
+}
+
+/* time editor: set time: hours, minutes, seconds over max */
+static int test03fa()
+{
+  HildonTimeEditor *time_editor;
+  guint hours = 25, minutes = 61, seconds = 61;
+
+  init_test();
+
+  time_editor = HILDON_TIME_EDITOR(hildon_time_editor_new());
+
+  hildon_time_editor_set_time (time_editor, hours, minutes, seconds);
+  hildon_time_editor_get_time (time_editor, &hours, &minutes, &seconds);
+
+  assert (hours   == 25);
+  assert (minutes == 61);
+  assert (seconds == 61);
+
+  return 1;
+}
+
+/* time editor: set time: null time editor*/
+static int test03g()
+{
+  HildonTimeEditor *time_editor = NULL;
+  guint hours = 23, minutes = 59, seconds = 0;
+
+  init_test();
+
+  hildon_time_editor_set_time (time_editor, hours, minutes, seconds);
+
+  return 1;
+}
+
+/* time editor: show seconds: ok parameters */
+static int test03h()
+{
+  HildonTimeEditor *time_editor = NULL;
+
+  init_test();
+
+  time_editor = HILDON_TIME_EDITOR( hildon_time_editor_new () );
+  hildon_time_editor_show_seconds( time_editor, TRUE );
+
+  return 1;
+}
+
+/* time editor: show seconds: null time editor*/
+static int test03i()
+{
+  HildonTimeEditor *time_editor = NULL;
+
+  
+
+  hildon_time_editor_show_seconds( time_editor, TRUE );
+
+  return 1;
+}
+
+/* time editor: get type: */
+static int test04a()
+{
+  GType t;
+
+  
+  
+  t = hildon_time_editor_get_type();
+
+  assert (t);
+
+  return 1;
+}
+
+/* date editor: new: ok parameters */
+static int test05a()
+{
+  HildonDateEditor *date_editor;
+
+  
+  date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+  assert (date_editor);
+  return 1;
+}
+
+/* date editor: get date: ok parameters */
+static int test06a()
+{
+  HildonDateEditor *date_editor;
+  guint year = 99999, month = 99, day = 999;
+
+  
+
+  date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+
+  hildon_date_editor_get_date (date_editor, &year, &month, &day);
+
+  assert (year  > 0);
+  assert (month > 0 && month < 13);
+  assert (day   > 0 && day   < 32);
+
+  return 1;
+}
+
+/* date editor: get date: null date editor */
+static int test06b()
+{
+  HildonDateEditor *date_editor = NULL;
+  guint year = 99999, month = 99, day = 999;
+
+  
+
+  hildon_date_editor_get_date (date_editor, &year, &month, &day);
+
+  assert (year  > 0);
+  assert (month > 0 && month < 13);
+  assert (day   > 0 && day   < 32);
+
+  return 1;
+}
+
+/* date editor: get date: null year */
+static int test06c()
+{
+  HildonDateEditor *date_editor;
+  guint month = 99, day = 999;
+
+  
+
+  date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+
+  hildon_date_editor_get_date (date_editor, NULL, &month, &day);
+
+  return 1;
+}
+
+/* date editor: get date: null month */
+static int test06d()
+{
+  HildonDateEditor *date_editor;
+  guint  month = 99, day = 999;
+
+  
+
+  date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+
+  hildon_date_editor_get_date (date_editor, &month, NULL, &day);
+
+  return 1;
+}
+
+/* date editor: get date: null day */
+static int test06e()
+{
+  HildonDateEditor *date_editor;
+  guint year = 99999, month = 99;
+
+  
+
+  date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+
+  hildon_date_editor_get_date (date_editor, &year, &month, NULL);
+
+  return 1;
+}
+
+/* date editor: get date: null year, month, day */
+static int test06f()
+{
+  HildonDateEditor *date_editor;
+
+  
+
+  date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+
+  hildon_date_editor_get_date (date_editor, NULL, NULL, NULL);
+
+  return 1;
+}
+
+/* date editor: set date: year, month, day are zero */
+static int test07a()
+{
+  HildonDateEditor *date_editor;
+  guint year = 0, month = 0, day = 0;
+
+  
+
+  date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+
+  hildon_date_editor_set_date (date_editor, year, month, day);
+  hildon_date_editor_get_date (date_editor, &year, &month, &day);
+
+  assert (year  == 0);
+  assert (month == 0);
+  assert (day   == 0);
+
+  return 1;
+}
+
+/* date editor: set date: year, month, day are the minumum */
+static int test07ai()
+{
+  HildonDateEditor *date_editor;
+  guint year = 1, month = 1, day = 1;
+
+  
+
+  date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+
+  hildon_date_editor_set_date (date_editor, year, month, day);
+  hildon_date_editor_get_date (date_editor, &year, &month, &day);
+
+  assert (year  == 1);
+  assert (month == 1);
+  assert (day   == 1);
+
+  return 1;
+}
+
+/* date editor: set date: month less than minimum */
+static int test07b()
+{
+  HildonDateEditor *date_editor;
+  guint year = 2003, month = 0, day = 2;
+
+  
+
+  date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+
+  hildon_date_editor_set_date (date_editor, year, month, day);
+  hildon_date_editor_get_date (date_editor, &year, &month, &day);
+
+  assert (year  == 2003);
+  assert (month == 0);
+  assert (day   == 2);
+
+  return 1;
+}
+
+/* date editor: set date: day less than minimum */
+static int test07c()
+{
+  HildonDateEditor *date_editor;
+  guint year = 2003, month = 12, day = 0;
+
+  
+
+  date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+
+  hildon_date_editor_set_date (date_editor, year, month, day);
+  hildon_date_editor_get_date (date_editor, &year, &month, &day);
+
+  assert (year  == 2003);
+  assert (month == 12);
+  assert (day   == 0);
+
+  return 1;
+}
+
+/* date editor: set date: ok parameters */
+static int test07d()
+{
+  HildonDateEditor *date_editor;
+  guint year = 2003, month = 12, day = 2;
+
+  
+
+  date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+
+  hildon_date_editor_set_date (date_editor, year, month, day);
+  hildon_date_editor_get_date (date_editor, &year, &month, &day);
+
+  assert (year  == 2003);
+  assert (month == 12);
+  assert (day   == 2);
+
+  return 1;
+}
+
+/* date editor: set date: big year, should be ok */
+static int test07e()
+{
+  HildonDateEditor *date_editor;
+  /* hmm.. year seems to fail between 2020 and 2030 */
+  guint year = 2500, month = 12, day = 2;
+
+  
+
+  date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+
+  hildon_date_editor_set_date (date_editor, year, month, day);
+  hildon_date_editor_get_date (date_editor, &year, &month, &day);
+
+  assert (year  == 2500);
+  assert (month == 12);
+  assert (day   == 2);
+
+  return 1;
+}
+
+/* date editor: set date: month over max */
+static int test07f()
+{
+  HildonDateEditor *date_editor;
+  guint year = 2003, month = 13, day = 2;
+
+  
+
+  date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+
+  hildon_date_editor_set_date (date_editor, year, month, day);
+  hildon_date_editor_get_date (date_editor, &year, &month, &day);
+
+  assert (year  == 2003);
+  assert (month == 13);
+  assert (day   == 2);
+
+  return 1;
+}
+
+/* date editor: set date: day over max */
+static int test07g()
+{
+  HildonDateEditor *date_editor;
+  guint year = 2003, month = 11, day = 31;
+
+  
+
+  date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+
+  hildon_date_editor_set_date (date_editor, year, month, day);
+  hildon_date_editor_get_date (date_editor, &year, &month, &day);
+
+  assert (year  == 2003);
+  assert (month == 11);
+  assert (day   == 31);
+
+  return 1;
+}
+
+/* date editor: set date: null date editor */
+static int test07h()
+{
+  
+
+  hildon_date_editor_set_date (NULL, 0, 0, 0);
+
+  return 1;
+}
+
+
+testcase tcases[] =
+{
+    {*test01a, " 01a_time_editor_new",                EXPECT_OK},
+    {*test02a, " 02a_time_editor_get_time",           EXPECT_OK},
+    {*test02b, " 02b_time_editor_get_time_null",      EXPECT_ASSERT},
+    {*test02c, " 02c_time_editor_get_time_null2",     EXPECT_ASSERT},
+    {*test02d, " 02d_time_editor_get_time_null3",     EXPECT_ASSERT},
+    {*test02e, " 02e_time_editor_get_time_null4",     EXPECT_ASSERT},
+    {*test02f, " 02e_time_editor_get_time_null5",     EXPECT_ASSERT},
+    {*test03a, " 03a_time_editor_set_time_both_0",    EXPECT_OK},
+    {*test03b, " 03b_..._both_between",               EXPECT_OK},
+    {*test03c, " 03c_..._hours_limit",                EXPECT_ASSERT},
+    {*test03d, " 03d_..._minutes_limit",              EXPECT_ASSERT},
+    {*test03da," 03d_..._seconds_limit",              EXPECT_ASSERT},
+    {*test03e, " 03e_..._both_limit",                 EXPECT_ASSERT},
+    {*test03ea," 03e_..._all_limit",                  EXPECT_ASSERT},
+    {*test03f, " 03f_..._both_over",                  EXPECT_ASSERT},
+    {*test03fa," 03f_..._all_over",                   EXPECT_ASSERT},
+    {*test03g, " 03g_..._null",                       EXPECT_ASSERT},
+    {*test03h, " 03h_show_seconds_ok",                EXPECT_OK},
+    {*test03i, " 03i_show_seconds_null",              EXPECT_ASSERT},
+    {*test04a, " 04a_time_editor_get_type",           EXPECT_OK},
+    {*test05a, " 05a_date_editor_new",                EXPECT_OK},
+    {*test06a, " 06a_date_editor_get_date",           EXPECT_OK},
+    {*test06b, " 06b_date_editor_get_date_null",      EXPECT_ASSERT},
+    {*test06c, " 06c_date_editor_get_date_null2",     EXPECT_ASSERT},
+    {*test06d, " 06d_date_editor_get_date_null3",     EXPECT_ASSERT},
+    {*test06e, " 06e_date_editor_get_date_null4",     EXPECT_ASSERT},
+    {*test06f, " 06f_date_editor_get_date_null5",     EXPECT_ASSERT},
+    {*test07a, " 07a_date_editor_set_date_valid1",    EXPECT_ASSERT},
+    {*test07ai," 07ai_date_editor_set_date_valid1a",  EXPECT_OK},
+    {*test07b, " 07b_date_editor_set_date_valid2",    EXPECT_ASSERT},
+    {*test07c, " 07c_date_editor_set_date_valid3",    EXPECT_ASSERT},
+    {*test07d, " 07d_date_editor_set_date_valid4",    EXPECT_OK},
+    {*test07e, " 07e_date_editor_set_date_valid5",    EXPECT_OK},
+    {*test07f, " 07f_date_editor_set_date_valid6",    EXPECT_ASSERT},
+    {*test07g, " 07g_date_editor_set_date_valid7",    EXPECT_ASSERT},
+    {*test07h, " 07h_date_editor_set_date_null",      EXPECT_ASSERT},
+    
+    {0} /*REMEMBER THE TERMINATING NULL*/
+};
+
+/*use EXPECT_ASSERT for the tests that are _ment_ to throw assert so they are 
+  consider passed when they throw assert and failed when tehy do not*/
+
+testcase* get_tests (void)
+{
+    g_log_set_always_fatal (G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING);
+    return tcases;
+}
diff --git a/ut/hildon-widgets_tests.c b/ut/hildon-widgets_tests.c
new file mode 100644 (file)
index 0000000..25c3256
--- /dev/null
@@ -0,0 +1,3251 @@
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <assert.h>
+
+#include <gtk/gtk.h>
+
+#include "hildon-controlbar.h"
+#include "hildon-search.h"
+#include "hildon-seekbar.h"
+#include "hildon-note.h"
+#include <hildon-widgets/gtk-infoprint.h>
+#include <hildon-widgets/hildon-weekday-picker.h>
+#include <hildon-widgets/hildon-telephone-editor.h>
+#include <hildon-widgets/hildon-find-object-dialog.h>
+#include <hildon-widgets/hildon-range-editor.h>
+#include <hildon-widgets/hildon-sort-dialog.h>
+#include <hildon-widgets/hildon-get-password-dialog.h>
+#include <hildon-widgets/hildon-set-password-dialog.h>
+#include <hildon-widgets/hildon-hvolumebar.h>
+#include <hildon-widgets/hildon-vvolumebar.h>
+#include <hildon-widgets/hildon-font-selection-dialog.h>
+#include <hildon-widgets/hildon-insert-object-dialog.h>
+#include <hildon-widgets/hildon-number-editor.h>
+#include <hildon-widgets/hildon-color-selector.h>
+#include <hildon-widgets/hildon-file-handling-note.h>
+#include <hildon-widgets/hildon-add-home-dialog.h>
+#include <hildon-widgets/hildon-grid-item.h>
+#include <hildon-widgets/hildon-grid.h>
+#include <hildon-widgets/hildon-time-editor.h>
+#include <hildon-widgets/hildon-find-replace-dialog.h>
+#include <hildon-widgets/hildon-name-password-dialog.h>
+#include <hildon-widgets/hildon-file-details-dialog.h>
+
+#include <outo.h>
+
+/* Icon which must exist (HildonGridItem). */
+#define VALID_ICON  "Help"
+
+/*prototypes to keep the compiler happy*/
+testcase *get_tests(void);
+void init_test(void);
+
+     /* the testfuncs */
+int test1a(void);
+int test1b(void);
+int test1c(void);
+int test1d(void);
+int test1e(void);
+int test1f(void);
+int test1g(void);
+int test1h(void);
+int test1i(void);
+int test2a(void);
+int test2b(void);
+int test2c(void);
+int test2d(void);
+int test2e(void);
+int test3a(void);
+int test3b(void);
+int test3c(void);
+int test3d(void);
+int test3e(void);
+int test3f(void);
+int test3g(void);
+int test3h(void);
+int test3i(void);
+int test3j(void);
+int test3k(void);
+/*int test3l(void);*/
+int test3m(void);
+int test3n(void);
+int test3o(void);
+int test3p(void);
+int test3q(void);
+int test3r(void);
+int test3s(void);
+int test3t(void);
+int test3u(void);
+int test3v(void);
+
+/* notes */
+int test4a(void);
+int test4b(void);
+int test4c(void);
+int test4d(void);
+int test4e(void);
+int test4f(void);
+int test4g(void);
+int test4h(void);
+int test4i(void);
+int test4j(void);
+int test4k(void);
+int test4l(void);
+
+/* volumebar */
+int test6a(void);
+int test6b(void);
+int test6c(void);
+int test6d(void);
+int test6e(void);
+
+int test7a(void);
+int test7b(void);
+int test7c(void);
+int test7d(void);
+int test7e(void);
+int test8a(void);
+int test8b(void);
+int test8c(void);
+int test8d(void);
+int test8e(void);
+int test8f(void);
+int test8g(void);
+int test8h(void);
+int test8i(void);
+int test8j(void);
+int test8k(void);
+
+/* weekday picker */
+int test10a(void);
+int test11a(void);
+int test11b(void);
+int test11c(void);
+int test11d(void);
+int test12a(void);
+int test12b(void);
+int test12c(void);
+
+/* telephone editor */
+int test13a(void);
+int test13b(void);
+int test14a(void);
+int test14b(void);
+int test15a(void);
+int test15b(void);
+int test15c(void);
+int test15d(void);
+int test15e(void);
+int test15f(void);
+int test16a(void);
+int test16b(void);
+int test17a(void);
+int test17b(void);
+int test17c(void);
+int test17d(void);
+int test18a(void);
+int test18b(void);
+int test18c(void);
+int test18d(void);
+int test19a(void);
+int test19b(void);
+int test19c(void);
+int test19d(void);
+int test19e(void);
+
+/* find object dialog */
+int test20a(void);
+int test20b(void);
+int test20c(void);
+int test20d(void);
+
+/* find object options dialog */
+/*int test21a(void);
+int test21b(void);
+int test21c(void);
+int test21d(void);
+int test21e(void);
+int test21f(void);
+int test21g(void);
+int test21h(void);
+int test21i(void);
+int test21j(void);*/
+
+/* range editor */
+int test22a(void);
+int test22b(void);
+int test22c(void);
+int test22d(void);
+int test22e(void);
+int test22f(void);
+int test22g(void);
+int test22h(void);
+int test22i(void);
+int test22j(void);
+int test22k(void);
+int test22l(void);
+int test22m(void);
+
+/* sort dialog */
+int test23a(void);
+int test23b(void);
+int test23c(void);
+int test23d(void);
+int test23e(void);
+int test23f(void);
+int test23g(void);
+
+/* get / get old password dialog */
+int test24a(void);
+int test24b(void);
+int test24c(void);
+int test24d(void);
+
+/* set / change password dialog */
+int test25a(void);
+int test25b(void);
+int test25c(void);
+int test25d(void);
+int test25e(void);
+
+/*FontSelectionDialog*/
+int fsd_set_font(void);
+int fsd_get_font(void);
+int fsd_set_pretext(void);
+int fsd_get_pretext(void);
+
+int test27a(void);
+int test27b(void);
+int test27c(void);
+
+/* NumberEditor */
+int test28a(void);
+int test28b(void);
+int test28c(void);
+int test28d(void);
+
+/* ColorSelector */
+int test29a(void);
+int test29b(void);
+
+/* FontHandlingNote */
+int test30a(void);
+int test30b(void);
+int test30c(void);
+int test30d(void);
+
+/* Add to Home / Rename dialog */
+int test31a(void);
+int test31b(void);
+int test32a(void);
+int test32b(void);
+
+/* HildonGridItem */
+int test33a1(void);
+int test33a2(void);
+int test33b1(void);
+int test33b2(void);
+int test33b3(void);
+int test33b4(void);
+int test33c1(void);
+int test33c2(void);
+int test33c3(void);
+int test33c4(void);
+int test33d1(void);
+int test33d2(void);
+int test33d3(void);
+int test33e(void);
+
+/* HildonGrid */
+int test34a(void);
+int test34b1(void);
+int test34b2(void);
+int test34b3(void);
+int test34b4(void);
+int test34c1(void);
+int test34c2(void);
+int test34c3(void);
+int test34d1(void);
+int test34d2(void);
+int test34e1(void);
+int test34e2(void);
+int test34f1(void);
+int test34f2(void);
+int test34f3(void);
+int test34f4(void);
+int test34f5(void);
+int test34g1(void);
+int test34g2(void);
+int test34g3(void);
+int test34g4(void);
+int test34g5(void);
+int test34g6(void);
+int test34h1(void);
+int test34h2(void);
+int test34h3(void);
+int test34h4(void);
+int test34i1(void);
+int test34i2(void);
+int test34j1(void);
+int test34j2(void);
+
+/* Time/Duration Editor */
+int test35a(void);
+int test35b(void);
+int test35c(void);
+int test35d(void);
+int test35e(void);
+int test35f(void);
+int test35g(void);
+int test35h(void);
+int test36a(void);
+int test36b(void);
+int test36c(void);
+int test36d(void);
+
+/* New infoprint/banner functionalities. */
+int test37a(void);
+int test37b(void);
+int test38a(void);
+
+/* namepassworddialog */
+int test39a(void);
+int test39b(void);
+
+/* file details dialog */
+int test41a(void);
+
+/* this has to be like this (not static). outo
+   calls for this! */
+testcase *get_tests(void);
+void init_test( void )
+{
+    int plop = 0;
+    gtk_init (&plop, NULL);
+}
+
+int test1a()
+{
+    HildonControlbar *controlBar;
+    controlBar = HILDON_CONTROLBAR(hildon_controlbar_new());
+
+    assert(controlBar);
+    return 1;
+}
+
+int test1b()
+{
+    HildonControlbar *controlBar;
+    gint max=500;
+    
+    controlBar = HILDON_CONTROLBAR(hildon_controlbar_new());
+    hildon_controlbar_set_max(controlBar, max);
+    assert(hildon_controlbar_get_max(controlBar) == max);
+    return 1;
+}
+
+int test1c()
+{
+    HildonControlbar *controlBar;
+    gint max=500;
+    gint value=250;
+    
+    controlBar = HILDON_CONTROLBAR(hildon_controlbar_new());
+    hildon_controlbar_set_max(controlBar, max);
+    hildon_controlbar_set_value(controlBar, value);
+    assert(hildon_controlbar_get_value(controlBar) == value);
+    return 1;
+}
+
+int test1d()
+{
+    HildonControlbar *controlBar;
+    
+    controlBar = HILDON_CONTROLBAR(hildon_controlbar_new());
+    gtk_widget_destroy(GTK_WIDGET(controlBar));
+    return 1;
+}
+
+int test1e()
+{
+    gint getmin;
+    HildonControlbar *controlBar;
+
+    controlBar = HILDON_CONTROLBAR(hildon_controlbar_new());
+    hildon_controlbar_set_min(controlBar, 5);
+    getmin = hildon_controlbar_get_min (controlBar);
+    assert (getmin == 5);
+    return 1;
+}
+
+int test1f()
+{
+   gint min = 10;
+   gint max = 50;
+
+   HildonControlbar *controlBar;
+
+   controlBar = HILDON_CONTROLBAR(hildon_controlbar_new());
+   hildon_controlbar_set_range (controlBar, min, max);
+   return 1;
+}
+
+int test1g()
+{
+    gint minval;
+    gint maxval;
+
+    HildonControlbar *controlBar;
+
+    controlBar = HILDON_CONTROLBAR(hildon_controlbar_new());
+    hildon_controlbar_set_range (controlBar, 57, 219);
+    minval = hildon_controlbar_get_min (controlBar);
+    maxval = hildon_controlbar_get_max (controlBar);
+    assert (minval == 57);
+    assert (maxval == 219);
+    return 1;
+}
+
+int test1h()
+{
+    gint value;
+
+    HildonControlbar *controlBar;
+
+    controlBar = HILDON_CONTROLBAR(hildon_controlbar_new());
+    hildon_controlbar_set_range (controlBar, 250, 550);
+    hildon_controlbar_set_value (controlBar, 100);
+   
+    value = hildon_controlbar_get_value (controlBar);
+
+    assert (value == 250);
+    return 1;
+}
+
+int test1i()
+{
+    gint value;
+
+    HildonControlbar *controlBar;
+
+    controlBar = HILDON_CONTROLBAR(hildon_controlbar_new());
+    hildon_controlbar_set_range (controlBar, 250, 550);
+    hildon_controlbar_set_value (controlBar, 650);
+    
+    value = hildon_controlbar_get_value (controlBar);
+
+    assert (value == 550);
+    return 1;
+}
+
+int test2a()
+{
+    GtkWidget *seekBar;
+    
+    seekBar = hildon_seekbar_new();
+    assert(seekBar);
+    return 1;
+}
+
+int test2b()
+{
+    GtkWidget *seekBar;
+    gint totalTime=500;
+    
+    seekBar = hildon_seekbar_new();
+    hildon_seekbar_set_total_time(HILDON_SEEKBAR(seekBar), totalTime);
+    assert(hildon_seekbar_get_total_time(HILDON_SEEKBAR(seekBar)) == totalTime);
+    return 1;
+}
+
+int test2c()
+{
+    GtkWidget *seekBar;
+    gint totalTime=500;
+    gint position=250;
+    
+    seekBar = hildon_seekbar_new();
+    hildon_seekbar_set_total_time(HILDON_SEEKBAR(seekBar), totalTime);
+    hildon_seekbar_set_position(HILDON_SEEKBAR(seekBar), position);
+    assert(hildon_seekbar_get_position(HILDON_SEEKBAR(seekBar)) == position);
+    return 1;
+}
+
+int test2d()
+{
+    GtkWidget *seekBar;
+    
+    seekBar = hildon_seekbar_new();
+    gtk_widget_destroy(GTK_WIDGET(seekBar));
+    return 1;
+}
+
+int test2e()
+{
+    GtkWidget *seekBar;
+    gint totalTime=500;
+    
+    seekBar = hildon_seekbar_new();
+    hildon_seekbar_set_total_time(HILDON_SEEKBAR(seekBar), totalTime);
+    hildon_seekbar_set_fraction(HILDON_SEEKBAR(seekBar), 200);
+    assert(hildon_seekbar_get_fraction(HILDON_SEEKBAR(seekBar)) == 200);
+    return 1;
+}
+
+int test3a()
+{
+    
+    gtk_infoprint(NULL,"infoprint");
+    return 1;
+}
+
+int test3b()
+{
+    
+    gtk_infoprint(NULL, NULL);
+    return 1;
+}
+
+int test3c()
+{
+    
+    gtk_infoprint_with_icon_stock(NULL, "infoprint", GTK_STOCK_DIALOG_QUESTION);
+    return 1;
+}
+
+int test3d()
+{
+    
+    gtk_infoprint_with_icon_stock(NULL, "infoprint", "");
+    return 1;
+}
+
+int test3e()
+{
+
+    gtk_infoprint_with_icon_stock(NULL, "infoprint", NULL);
+    return 1;
+}
+
+int test3f()
+{
+    
+    gtk_infoprintf (NULL, "mambo %d", 2+3);
+    return 1;
+}
+
+int test3g()
+{
+    
+    gtk_infoprintf (NULL, NULL);
+    return 1;
+}
+
+
+int test3h()
+{
+    gtk_confirmation_banner (NULL, "Insert our favourite testing text here.", NULL);
+    return 1;
+}
+
+int test3i()
+{
+    gtk_confirmation_banner (NULL, NULL, NULL);
+    return 1;
+}
+
+int test3j()
+{
+    GtkWindow *win = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
+    gtk_banner_show_animation (win, "Insert our favourite testing text here.");
+    gtk_banner_set_text (win, "Insert our second favourite testing text here.");
+    gtk_banner_set_text (win, "");
+    gtk_banner_set_text (win, NULL); 
+    gtk_banner_close (win);
+    gtk_widget_destroy (GTK_WIDGET (win));
+    return 1;
+}
+
+int test3k()
+{
+    GtkWindow *win = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
+    gtk_banner_show_animation (win, "Insert our favourite testing text here.");
+    gtk_banner_set_fraction (win, 0.5);
+    gtk_banner_set_fraction (win, -0.5);
+    gtk_banner_set_fraction (win, 1.5);
+    gtk_banner_close (win);
+    gtk_widget_destroy (GTK_WIDGET (win));
+    return 1;
+}
+
+/*int test3l()
+{
+    GtkWindow *win = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
+    gtk_banner_show_animation (win, "Insert our favourite testing text here.");
+    gtk_banner_close (win);
+    gtk_banner_close (win);
+    gtk_widget_destroy (GTK_WIDGET (win));
+    return 1;
+}*/
+
+int test3m()
+{
+    GtkWindow *win = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
+    gtk_banner_show_animation (win, "Insert our favourite testing text here.");
+    gtk_widget_destroy (GTK_WIDGET (win));
+    return 1;
+}
+
+int test3n()
+{
+    GtkWindow *win = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
+    gtk_banner_show_bar (win, "Insert our favourite testing text here.");
+    gtk_banner_set_text (win, "Insert our second favourite testing text here.");
+    gtk_banner_set_text (win, "");
+    gtk_banner_set_text (win, NULL);
+    gtk_banner_set_fraction (win, 0.5);
+    gtk_banner_close (win);
+    return 1;
+}
+
+int test3o()
+{
+    GtkWindow *win = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
+    gtk_banner_show_bar (win, "Insert our favourite testing text here.");
+    gtk_banner_set_text (win, "Insert our second favourite testing text here.");
+    gtk_banner_set_text (win, "");
+    gtk_banner_set_text (win, NULL);
+    gtk_banner_set_fraction (win, 0.5);
+    gtk_widget_destroy (GTK_WIDGET (win));
+    return 1;
+}
+
+int test3p()
+{
+    gtk_banner_show_bar (NULL, "Insert our favourite testing text here.");
+    gtk_banner_close (NULL);
+    return 1;
+}
+
+int test3q()
+{
+    gtk_banner_set_text (NULL, "Insert our second favourite testing text here.");
+    return 1;
+}
+
+int test3r()
+{
+    gtk_banner_set_fraction (NULL, 0.5);
+    return 1;
+}
+
+int test3s()
+{
+    gtk_banner_close (NULL);
+    return 1;
+}
+
+int test3t()
+{
+    GtkWindow *win = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
+    gtk_banner_show_bar (win, "Insert our favourite testing text here.");
+    gtk_banner_set_fraction (win, -0.5);
+    gtk_banner_close (win);
+    return 1;
+}
+
+int test3u()
+{
+    GtkWindow *win = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
+    gtk_banner_show_bar (win, "Insert our favourite testing text here.");
+    gtk_banner_set_fraction (win, 1.5);
+    gtk_banner_close (win);
+    return 1;
+}
+
+int test3v()
+{
+    gtk_banner_show_animation (NULL, "Insert our favourite testing text here.");
+    gtk_banner_close (NULL);
+    return 1;
+}
+
+
+/* note: confirmation note */
+int test4a()
+{
+    HildonNote *note =  HILDON_NOTE( hildon_note_new_confirmation(  NULL, 
+    "Delete the presentation?\nHildon Slides" ));
+    assert(note);
+    return 1;
+}
+/* note: confirmation note with icon stock */
+int test4b()
+{
+    HildonNote *note;
+    note = HILDON_NOTE( hildon_note_new_confirmation_with_icon_stock(NULL, 
+    "Delete the presentation?\nHildon Slides", GTK_STOCK_OPEN));
+    assert(note);   
+    return 1;
+}
+/* note: confirmation note with 10 additional buttons */
+int test4c()
+{
+    
+    HildonNote *note =  HILDON_NOTE( hildon_note_new_confirmation_add_buttons( NULL,
+                                    "Delete the presentation?\nHildon Slides", 
+                                  "add 1", 12345,  "add 2", 13579, 
+                                  "add 3", 12345,  "add 4", 13579,
+                                   "add 5", 12345,  "add 6", 13579,                    
+                                   "add 7", 12345,  "add 8", 13579,                 
+                                  "add 9", 24680,  "add 9", 24680, NULL) );  
+    assert(note);   
+    return 1;
+}
+
+/* note: confirmation note: Set button text*/
+int test4d()
+{
+    HildonNote *note;
+    note = HILDON_NOTE( hildon_note_new_confirmation(NULL, 
+    "Delete the presentation?\nHildon Slides"));
+    hildon_note_set_button_text( HILDON_NOTE( note ) , "Remove" );
+    return 1;
+}
+
+/* note: information note */
+int test4e()
+{
+    HildonNote *note;
+    note = HILDON_NOTE( hildon_note_new_information(NULL, 
+    "Only one button present\nin this information note"));
+    return 1;
+}
+
+/* note: information note with icon stock */
+int test4f()
+{
+    HildonNote *note;
+    note = HILDON_NOTE( hildon_note_new_information_with_icon_stock(NULL, 
+    "Only one button present\nin this information note", GTK_STOCK_HARDDISK));
+    return 1;
+}
+
+/* note: information note: Set button text*/
+int test4g()
+{
+    HildonNote *note;
+    note = HILDON_NOTE( hildon_note_new_information(NULL, 
+    "Only one button present\nin this information note"));
+    hildon_note_set_button_text( HILDON_NOTE( note ) , "Continue" );
+    return 1;
+}
+
+/* note: new cancel
+int test4h()
+{
+    HildonNote *note;
+    
+    note = HILDON_NOTE( hildon_note_new_cancel( NULL, 
+    "Deleting files.." )); 
+    assert(note);
+    return 1;
+}*/
+
+/* note: new cancel: set button text
+int test4i()
+{
+    HildonNote *note;
+    
+    note = HILDON_NOTE( hildon_note_new_cancel( NULL, 
+    "Deleting files.." )); 
+    hildon_note_set_button_text( HILDON_NOTE( note ) , "Stop" );
+    return 1;
+}*/
+
+/* note: new cancel with progress bar*/
+int test4j()
+{
+  GtkWidget *progbar;
+  GtkWidget *progress_note;
+    
+  progbar = gtk_progress_bar_new();
+
+  gtk_progress_bar_set_fraction( GTK_PROGRESS_BAR( progbar ), 0.7 );
+
+  progress_note = hildon_note_new_cancel_with_progress_bar( 
+  NULL, "Deleting files..", 
+  GTK_PROGRESS_BAR( progbar ));
+  assert(progress_note);
+  return 1;
+}
+
+/* note: new cancel with progress bar: set button text*/
+int test4k()
+{
+  GtkWidget *progbar;
+  GtkWidget *progress_note;
+    
+  progbar = gtk_progress_bar_new();
+
+  gtk_progress_bar_set_fraction( GTK_PROGRESS_BAR( progbar ), 0.7 );
+
+  progress_note = hildon_note_new_cancel_with_progress_bar( 
+  NULL, "Deleting files..", 
+  GTK_PROGRESS_BAR( progbar ));
+  hildon_note_set_button_text( HILDON_NOTE( progress_note ) , "Stop" );
+  return 1;
+}
+/* destroy note widgets */
+int test4l()
+{
+    GtkWidget *conf;
+    GtkWidget *inf;
+    /*    GtkWidget *cancel;*/
+    GtkWidget *progress;
+    GtkWidget *progbar;
+    GtkWidget *conf_button;
+    
+    conf = hildon_note_new_confirmation(NULL, NULL);
+    assert(conf);
+    gtk_widget_destroy(conf);
+    
+    inf = hildon_note_new_information(NULL, NULL);
+    assert(inf);
+    gtk_widget_destroy(inf);
+    
+    /*
+    cancel = hildon_note_new_cancel( NULL, NULL ); 
+    assert(cancel);
+    gtk_widget_destroy(cancel);
+    */
+    
+    progbar = gtk_progress_bar_new();
+    progress = hildon_note_new_cancel_with_progress_bar( 
+    NULL, NULL, GTK_PROGRESS_BAR( progbar ));
+    assert(progress);
+    gtk_widget_destroy(progress);
+
+    conf_button =  hildon_note_new_confirmation_add_buttons( NULL, NULL, NULL );
+    assert(conf_button);
+    gtk_widget_destroy(conf_button);
+    
+    return 1;
+}
+
+int test6a()
+{
+    HildonHVolumebar *volumeBar;
+    
+    volumeBar = HILDON_HVOLUMEBAR(hildon_hvolumebar_new());
+    assert(volumeBar);
+    return 1;
+}
+
+int test6b()
+{
+    HildonVVolumebar *volumeBar;
+    
+    volumeBar = HILDON_VVOLUMEBAR(hildon_vvolumebar_new());
+    assert(volumeBar);
+    return 1;
+}
+
+int test6c()
+{
+    HildonHVolumebar *volumeBar;
+    gdouble volumeLevel = 0.5;
+    
+    volumeBar = HILDON_HVOLUMEBAR(hildon_hvolumebar_new());
+    hildon_volumebar_set_level(HILDON_VOLUMEBAR(volumeBar), volumeLevel);
+    assert(hildon_volumebar_get_level(HILDON_VOLUMEBAR(volumeBar)) == volumeLevel);
+    return 1;
+}
+
+int test6d()
+{
+    HildonHVolumebar *volumeBar;
+    gboolean mute = FALSE;
+    
+    volumeBar = HILDON_HVOLUMEBAR(hildon_hvolumebar_new());
+    hildon_volumebar_set_mute(HILDON_VOLUMEBAR(volumeBar), mute);
+    assert(hildon_volumebar_get_mute(HILDON_VOLUMEBAR(volumeBar)) == mute);
+    return 1;
+}
+
+int test6e()
+{
+    HildonVVolumebar *volumeBar;
+    
+    volumeBar = HILDON_VVOLUMEBAR(hildon_vvolumebar_new());
+    gtk_widget_destroy(GTK_WIDGET(volumeBar));
+    return 1;
+}
+
+int test7a()
+{
+    GtkWidget *search;
+    
+    search = hildon_search_new( NULL );
+    assert(search);
+    return 1;
+}
+
+int test7b()
+{
+    GtkWidget *search;
+    
+    search = hildon_search_new( "some text" );
+    assert(search);
+    return 1;
+}
+
+int test7c()
+{
+    GtkWidget *search;
+    
+    search = hildon_search_new( "gtk-add" );
+    hildon_search_set_image_stock(HILDON_SEARCH(search), "soopaa");
+    assert(search);
+    return 1;
+}
+
+int test7d()
+{
+    GtkWidget *search;
+    
+    search = hildon_search_new( NULL );
+    hildon_search_set_image_stock(HILDON_SEARCH(search), "gtk-add");
+    return 1;
+}
+
+int test7e()
+{
+    GtkWidget *search;
+    
+    search = hildon_search_new( NULL );
+    gtk_widget_destroy(search);
+    return 1;
+}
+
+/* weekday_picker: new: ok */
+int test10a()
+{
+    GtkWidget *picker;
+
+    
+    picker = hildon_weekday_picker_new();
+    assert( picker );
+    return 1;
+}
+
+/* weekday_picker: set/unset/isset: ok */
+int test11a()
+{
+    gint i, j;
+    HildonWeekdayPicker *picker;
+
+    
+    picker = HILDON_WEEKDAY_PICKER( hildon_weekday_picker_new() );
+    assert( picker );
+   
+    /* set all one by one */
+    for( i = 1; i < 8; ++i )
+         hildon_weekday_picker_set_day( picker, i );
+
+    /* check that the proper days are set */
+       for( j = 1; j < 8; ++j )
+          assert( hildon_weekday_picker_isset_day( picker, j ) );
+    
+    /* unset all one by one */
+    for( i = 1; i < 8; ++i )
+         hildon_weekday_picker_unset_day( picker, i );
+
+    /* check that the proper days are unset */
+       for( j = 1; j < 8; ++j )
+         assert( !hildon_weekday_picker_isset_day( picker, j ) );
+    
+    return 1;
+}
+
+/* weekday_picker: set_day: null */
+int test11b()
+{
+    
+    hildon_weekday_picker_set_day( NULL, 0 );
+    return 1;
+}
+
+/* weekday_picker: unset_day: null */
+int test11c()
+{
+    
+    hildon_weekday_picker_unset_day( NULL, 0 );
+    return 1;
+}
+
+/* weekday_picker: isset_day: null */
+int test11d()
+{
+    
+    hildon_weekday_picker_isset_day( NULL, 0 );
+    return 1;
+}
+
+/* weekday_picker: toggle: ok */
+int test12a()
+{
+    gint i, j;
+    HildonWeekdayPicker *picker;
+
+    picker = HILDON_WEEKDAY_PICKER( hildon_weekday_picker_new() );
+    assert( picker );
+    
+    /* set all one by one */
+    for( i = 1; i < 8; i++ )
+         hildon_weekday_picker_toggle_day( picker, i );
+    
+    /* check that the proper days are set */
+       for( j = 1; j < 8; j++ )
+      assert ( hildon_weekday_picker_isset_day( picker, j ) );
+   
+    /* unset all one by one */
+    for( i = 1; i < 8; ++i )
+         hildon_weekday_picker_toggle_day( picker, i );
+    
+    /* check that the proper days are unset */
+       for( j = 1; j < 8; ++j )
+         assert( !hildon_weekday_picker_isset_day( picker, j ) );
+    
+    return 1;
+}
+
+/* weekday_picker: toggle_day: null */
+int test12b()
+{
+    HildonWeekdayPicker *picker;
+    picker = HILDON_WEEKDAY_PICKER( hildon_weekday_picker_new() );
+    hildon_weekday_picker_toggle_day( NULL, 0 );
+    return 1;
+}
+
+/* weekday_picker: set_all/unset_all*/
+int test12c()
+{
+    HildonWeekdayPicker *picker;
+    picker = HILDON_WEEKDAY_PICKER( hildon_weekday_picker_new() );
+    hildon_weekday_picker_set_all( picker );
+    hildon_weekday_picker_unset_all( picker );
+    return 1;
+}
+
+/* telephone editor: new: ok */
+int test13a()
+{
+    GtkWidget *editor;
+
+    
+
+    editor = hildon_telephone_editor_new( HILDON_TELEPHONE_EDITOR_FORMAT_FREE );
+    assert( editor );
+
+    editor = hildon_telephone_editor_new
+      ( HILDON_TELEPHONE_EDITOR_FORMAT_COERCE );
+    assert( editor );
+
+    editor = hildon_telephone_editor_new
+      ( HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY );
+    assert( editor );
+
+    editor = hildon_telephone_editor_new
+      ( HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA );
+    assert( editor );
+
+    return 1;
+}
+
+/* telephone editor: new: inv */
+int test13b()
+{
+    GtkWidget *editor;
+
+    
+
+    editor = hildon_telephone_editor_new( 17 );
+
+    return 1;
+}
+
+
+/* telephone editor: set_editable: ok  */
+int test14a()
+{
+    GtkWidget *editor;
+    HildonTelephoneEditorFormat fmt[4] =  {
+       HILDON_TELEPHONE_EDITOR_FORMAT_FREE,
+       HILDON_TELEPHONE_EDITOR_FORMAT_COERCE,
+       HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY, 
+       HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA };
+    gint i;
+
+    
+    
+    for( i = 0; i < 4; ++i )
+    {
+       editor = hildon_telephone_editor_new( fmt[i] );
+       hildon_telephone_editor_set_editable( HILDON_TELEPHONE_EDITOR( editor ),
+                                             TRUE, TRUE, TRUE );
+       hildon_telephone_editor_set_editable( HILDON_TELEPHONE_EDITOR( editor ),
+                                             FALSE, FALSE, FALSE );
+       gtk_widget_destroy( editor );
+    }
+
+    return 1;
+}
+
+/* telephone editor: set_editable: null  */
+int test14b()
+{
+    
+    hildon_telephone_editor_set_editable( NULL, TRUE, TRUE, TRUE );
+
+    return 1;
+}
+/* telephone editor: set_show_plus: ok  */
+int test15a()
+{
+    GtkWidget *editor;
+    HildonTelephoneEditorFormat fmt[4] =  {
+       HILDON_TELEPHONE_EDITOR_FORMAT_FREE,
+       HILDON_TELEPHONE_EDITOR_FORMAT_COERCE,
+       HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY, 
+       HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA };
+    gint i;
+
+    
+    
+    for( i = 0; i < 4; ++i )
+    {
+       editor = hildon_telephone_editor_new( fmt[i] );
+
+       assert( editor );
+
+       hildon_telephone_editor_set_show_plus( HILDON_TELEPHONE_EDITOR( editor ),
+                                              TRUE );
+
+       /* only check if not in free mode (no plus there) */
+       if( i )
+         assert( hildon_telephone_editor_get_show_plus( HILDON_TELEPHONE_EDITOR( editor ) ) 
+                 == TRUE );
+       hildon_telephone_editor_set_show_plus( HILDON_TELEPHONE_EDITOR( editor ),
+                                              FALSE );
+       if( i )
+         assert( hildon_telephone_editor_get_show_plus( HILDON_TELEPHONE_EDITOR( editor ) )
+                 == FALSE );
+       gtk_widget_destroy( editor );
+    }
+
+    return 1;
+}
+
+/* telephone editor: set_show_plus: null  */
+int test15b()
+{
+    
+    hildon_telephone_editor_set_show_plus( NULL, TRUE );
+
+    return 1;
+}
+
+/* telephone editor: get_show_plus: null  */
+int test15c()
+{
+    
+    hildon_telephone_editor_get_show_plus( NULL );
+
+    return 1;
+}
+
+/* telephone editor: set_show_border: ok  */
+int test15d()
+{
+    GtkWidget *editor;
+    HildonTelephoneEditorFormat fmt[4] =  {
+       HILDON_TELEPHONE_EDITOR_FORMAT_FREE,
+       HILDON_TELEPHONE_EDITOR_FORMAT_COERCE,
+       HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY, 
+       HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA };
+    gint i;
+
+    
+    
+    for( i = 0; i < 4; ++i )
+    {
+       editor = hildon_telephone_editor_new( fmt[i] );
+
+       assert( editor );
+
+       hildon_telephone_editor_set_show_border( HILDON_TELEPHONE_EDITOR( editor ),
+                                                TRUE );
+       assert( hildon_telephone_editor_get_show_border
+               ( HILDON_TELEPHONE_EDITOR( editor ) ) == TRUE );
+
+       hildon_telephone_editor_set_show_border( HILDON_TELEPHONE_EDITOR( editor ),
+                                                FALSE );
+       assert( hildon_telephone_editor_get_show_border( HILDON_TELEPHONE_EDITOR( editor ) )
+               == FALSE );
+
+       gtk_widget_destroy( editor );
+    }
+
+    return 1;
+}
+
+/* telephone editor: set_show_border: null  */
+int test15e()
+{
+    
+    hildon_telephone_editor_set_show_border( NULL, TRUE );
+
+    return 1;
+}
+
+/* telephone editor: get_show_border: null  */
+int test15f()
+{
+    
+    hildon_telephone_editor_get_show_border( NULL );
+
+    return 1;
+}
+
+/* telephone editor: set_widths: ok  */
+int test16a()
+{
+    GtkWidget *editor;
+    HildonTelephoneEditorFormat fmt[4] =  {
+       HILDON_TELEPHONE_EDITOR_FORMAT_FREE,
+       HILDON_TELEPHONE_EDITOR_FORMAT_COERCE,
+       HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY, 
+       HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA };
+    gint i;
+
+    
+    
+    for( i = 0; i < 4; ++i )
+    {
+       editor = hildon_telephone_editor_new( fmt[i] );
+       hildon_telephone_editor_set_widths( HILDON_TELEPHONE_EDITOR( editor ),
+                                           0, 0, 0 );
+       hildon_telephone_editor_set_widths( HILDON_TELEPHONE_EDITOR( editor ),
+                                           10, 10, 10 );
+       hildon_telephone_editor_set_widths( HILDON_TELEPHONE_EDITOR( editor ),
+                                           100, 100, 100 );
+       gtk_widget_destroy( editor );
+    }
+
+    return 1;
+}
+
+/* telephone editor: set_widths: null  */
+int test16b()
+{
+    
+    hildon_telephone_editor_set_widths( NULL, 1, 1, 1 );
+
+    return 1;
+}
+
+/* telephone editor: set/get_country: ok  */
+int test17a()
+{
+    GtkWidget *editor;
+    const gchar *c;
+    gchar teststr[] = "123456";
+    HildonTelephoneEditorFormat fmt[4] =  {
+       HILDON_TELEPHONE_EDITOR_FORMAT_FREE,
+       HILDON_TELEPHONE_EDITOR_FORMAT_COERCE,
+       HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY, 
+       HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA };
+    gint i;
+
+    
+    
+    for( i = 0; i < 4; ++i )
+    {
+       editor = hildon_telephone_editor_new( fmt[i] );
+       hildon_telephone_editor_set_country( HILDON_TELEPHONE_EDITOR( editor ),
+                                            teststr );
+       c = hildon_telephone_editor_get_country
+           ( HILDON_TELEPHONE_EDITOR( editor ) );
+
+       /* format != FREE */
+       if( i )
+       {
+           g_assert( c );
+           g_assert( strcmp( teststr, c ) == 0 );
+       }
+
+       gtk_widget_destroy( editor );
+    }
+
+    return 1;
+}
+
+/* telephone editor: set/get_country: inv  */
+int test17b()
+{
+    GtkWidget *editor;
+    const gchar *c;
+    gchar teststr[] = "123456p";
+
+    
+    
+    editor = hildon_telephone_editor_new( 
+       HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY );
+    hildon_telephone_editor_set_country( HILDON_TELEPHONE_EDITOR( editor ),
+                                        teststr );
+    c = hildon_telephone_editor_get_country
+       ( HILDON_TELEPHONE_EDITOR( editor ) );
+
+    g_assert( c );
+    g_assert( strcmp( teststr, c ) != 0 );
+
+    gtk_widget_destroy( editor );
+
+    return 1;
+}
+
+/* telephone editor: set_country: null  */
+int test17c()
+{
+    
+    hildon_telephone_editor_set_country( NULL, "123" );
+
+    return 1;
+}
+
+/* telephone editor: get_country: null  */
+int test17d()
+{
+    
+    hildon_telephone_editor_get_country( NULL );
+
+    return 1;
+}
+
+/* telephone editor: set/get_area: ok  */
+int test18a()
+{
+    GtkWidget *editor;
+    const gchar *c;
+    gchar teststr[] = "123456";
+    HildonTelephoneEditorFormat fmt[4] =  {
+       HILDON_TELEPHONE_EDITOR_FORMAT_FREE,
+       HILDON_TELEPHONE_EDITOR_FORMAT_COERCE,
+       HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY, 
+       HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA };
+    gint i;
+
+    
+    
+    for( i = 0; i < 4; ++i )
+    {
+       editor = hildon_telephone_editor_new( fmt[i] );
+       hildon_telephone_editor_set_area( HILDON_TELEPHONE_EDITOR( editor ),
+                                            teststr );
+       c = hildon_telephone_editor_get_area
+           ( HILDON_TELEPHONE_EDITOR( editor ) );
+
+       /* format != FREE nor COUNTRY */
+       if( i && i != 2 )
+       {
+           g_assert( c );
+           
+           g_assert( strncmp( teststr, c, strlen( c ) ) == 0 );
+       }
+
+       gtk_widget_destroy( editor );
+    }
+
+    return 1;
+}
+
+/* telephone editor: set/get_area: inv  */
+int test18b()
+{
+    GtkWidget *editor;
+    const gchar *c;
+    gchar teststr[] = "123456p";
+
+    
+    
+    editor = hildon_telephone_editor_new( 
+       HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA );
+    hildon_telephone_editor_set_area( HILDON_TELEPHONE_EDITOR( editor ),
+                                        teststr );
+    c = hildon_telephone_editor_get_area
+       ( HILDON_TELEPHONE_EDITOR( editor ) );
+
+    g_assert( c );
+    g_assert( strcmp( teststr, c ) != 0 );
+
+    gtk_widget_destroy( editor );
+
+    return 1;
+}
+
+/* telephone editor: set_area: null  */
+int test18c()
+{
+    
+    hildon_telephone_editor_set_area( NULL, "123" );
+
+    return 1;
+}
+
+/* telephone editor: get_area: null  */
+int test18d()
+{
+    
+    hildon_telephone_editor_get_area( NULL );
+
+    return 1;
+}
+/* telephone editor: set/get_number: ok  */
+int test19a()
+{
+    GtkWidget *editor;
+    const gchar *c;
+    gchar teststr[] = "123456";
+    HildonTelephoneEditorFormat fmt[4] =  {
+       HILDON_TELEPHONE_EDITOR_FORMAT_FREE,
+       HILDON_TELEPHONE_EDITOR_FORMAT_COERCE,
+       HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY, 
+       HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA };
+    gint i;
+
+    
+    
+    for( i = 0; i < 4; ++i )
+    {
+       editor = hildon_telephone_editor_new( fmt[i] );
+       hildon_telephone_editor_set_number( HILDON_TELEPHONE_EDITOR( editor ),
+                                            teststr );
+       c = hildon_telephone_editor_get_number
+           ( HILDON_TELEPHONE_EDITOR( editor ) );
+
+       /* free != COUNTRY nor AREA */
+       if( i != 2 && i != 3 )
+       {
+           g_assert( c );
+           g_assert( strcmp( teststr, c ) == 0 );
+       }
+
+       gtk_widget_destroy( editor );
+    }
+
+    return 1;
+}
+
+/* telephone editor: set/get_number: ok in FREE format  */
+int test19b()
+{
+    GtkWidget *editor;
+    const gchar *c;
+    gchar teststr[] = "()+?*pw1234567890";
+    
+    editor = hildon_telephone_editor_new( 
+       HILDON_TELEPHONE_EDITOR_FORMAT_FREE );
+    hildon_telephone_editor_set_number( HILDON_TELEPHONE_EDITOR( editor ),
+                                        teststr );
+    c = hildon_telephone_editor_get_number
+       ( HILDON_TELEPHONE_EDITOR( editor ) );
+
+    g_assert( c );
+    g_assert( strncmp( teststr, c, strlen(c) ) == 0 );
+
+    gtk_widget_destroy( editor );
+
+    return 1;
+}
+
+/* telephone editor: set/get_number: inv  */
+int test19c()
+{
+    GtkWidget *editor;
+    const gchar *c;
+    gchar teststr[] = "123456f";
+
+    
+    
+    editor = hildon_telephone_editor_new( 
+       HILDON_TELEPHONE_EDITOR_FORMAT_FREE );
+    hildon_telephone_editor_set_number( HILDON_TELEPHONE_EDITOR( editor ),
+                                        teststr );
+    c = hildon_telephone_editor_get_number
+       ( HILDON_TELEPHONE_EDITOR( editor ) );
+
+    g_assert( c );
+    g_assert( strcmp( teststr, c ) != 0 );
+
+    gtk_widget_destroy( editor );
+
+    return 1;
+}
+
+/* telephone editor: set_number: null  */
+int test19d()
+{   
+    hildon_telephone_editor_set_number( NULL, "123" );
+
+    return 1;
+}
+
+/* telephone editor: get_number: null  */
+int test19e()
+{    
+    hildon_telephone_editor_get_number( NULL );
+
+    return 1;
+}
+
+/* find object dialog: new */
+int test20a(void){
+  GtkWidget *dialog;
+  dialog = hildon_find_object_dialog_new(NULL);
+  g_assert(dialog);
+  return 1;  
+}
+
+/* find object dialog: new with options */
+int test20b(void){
+  GtkWidget *dialog;
+  GtkWidget *options;
+  
+  options = gtk_dialog_new();
+  dialog = hildon_find_object_dialog_new_with_options(NULL,GTK_DIALOG(options));
+  gtk_widget_destroy(dialog);
+
+  return 1;
+}
+
+/* find object dialog: get_text */
+int test20c(void){
+  const gchar *string;
+  GtkWidget *dialog;
+
+  dialog = hildon_find_object_dialog_new(NULL);
+  string = hildon_find_object_dialog_get_text(HILDON_FIND_OBJECT_DIALOG(dialog));
+  g_assert(string);
+  return 1;
+}
+
+/* find object dialog: set_label */
+int test20d(void){
+  GtkWidget *dialog;
+
+  dialog = hildon_find_object_dialog_new(NULL);
+  hildon_find_object_dialog_set_label(HILDON_FIND_OBJECT_DIALOG(dialog),"labeltext");
+  
+  return 1;
+}
+
+/* find object options dialog: new */
+/*int test21a(void){
+  GtkWidget *dialog;
+  dialog = hildon_find_object_options_dialog_new(NULL);
+  g_assert(dialog);
+  return 1;
+}*/
+
+/* find object options dialog: hide_location */
+/*int test21b(void){
+  GtkWidget *dialog;
+  dialog = hildon_find_object_options_dialog_new(NULL);
+  hildon_find_object_options_dialog_hide_location(
+            HILDON_FIND_OBJECT_OPTIONS_DIALOG(dialog));
+  gtk_widget_destroy(dialog);
+  
+  return 1;
+}*/
+
+/* find object options dialog: hide_find_in */
+/*int test21c(void){
+  GtkWidget *dialog;
+  dialog = hildon_find_object_options_dialog_new(NULL);
+  hildon_find_object_options_dialog_hide_find_in(
+            HILDON_FIND_OBJECT_OPTIONS_DIALOG(dialog));
+
+  return 1;  
+}*/
+
+/* find object options dialog: get_location */
+/*int test21d(void){
+  const gchar *retString;
+  GtkWidget *dialog;
+  dialog = hildon_find_object_options_dialog_new(NULL);
+  retString = hildon_find_object_options_dialog_get_location(
+                                HILDON_FIND_OBJECT_OPTIONS_DIALOG(dialog));
+  
+  g_assert(retString);
+
+  return 1;
+}*/
+
+/* find object options dialog: get_find_type */
+/*int test21e(void){
+  HildonFindInType find_type;
+  GtkWidget *dialog;
+  dialog = hildon_find_object_options_dialog_new(NULL);
+  
+  find_type = hildon_find_object_options_dialog_get_find_type(
+                     HILDON_FIND_OBJECT_OPTIONS_DIALOG(dialog));
+
+  return 1;
+}*/
+
+/* find object options dialog: get_time_period_type */
+/*int test21f(void){
+  HildonTimePeriodType type;
+  GtkWidget *dialog;
+  dialog = hildon_find_object_options_dialog_new(NULL);
+  type = hildon_find_object_options_dialog_get_time_period_type(
+                     HILDON_FIND_OBJECT_OPTIONS_DIALOG(dialog));
+  return 1;
+}*/
+
+/* find object options dialog: get_start_date */
+/*int test21g(void){
+  GtkWidget *dialog;
+  gint year, month, day;
+
+  dialog = hildon_find_object_options_dialog_new(NULL);
+
+  hildon_find_object_options_dialog_get_start_date(HILDON_FIND_OBJECT_OPTIONS_DIALOG(dialog),
+                                                  &year, &month, &day);
+
+  g_assert(year);
+  g_assert(month);
+  g_assert(day);
+
+  return 1;
+}*/
+
+/* find object options dialog: get_end_date */
+/*int test21h(void){
+  GtkWidget *dialog;
+  gint year, month, day;
+
+  dialog = hildon_find_object_options_dialog_new(NULL);
+
+  hildon_find_object_options_dialog_get_end_date(HILDON_FIND_OBJECT_OPTIONS_DIALOG(dialog), 
+                                                &year, &month, &day);
+
+  g_assert(year);
+  g_assert(month);
+  g_assert(day);
+
+  return 1;
+}*/
+
+/* find object options dialog: add_custom_options */
+/*int test21i(void){
+  GtkWidget *dialog;
+  GtkWidget *widget = gtk_entry_new();
+
+  dialog = hildon_find_object_options_dialog_new(NULL);
+
+  hildon_find_object_options_dialog_add_custom_option(
+      HILDON_FIND_OBJECT_OPTIONS_DIALOG(dialog), "New widget", widget);
+
+  return 1;
+}*/
+
+/* find object options dialog: date_matches */
+/*int test21j(void){
+  GtkWidget *dialog;
+  dialog = hildon_find_object_options_dialog_new(NULL);
+  
+  g_assert(hildon_find_object_dialog_date_matches(HILDON_FIND_OBJECT_OPTIONS_DIALOG(dialog),
+                                                 1, 1, 1979));
+
+  return 1;
+}*/
+/* range editor: new range editor: ok parameters */
+int test22a()
+{
+  HildonRangeEditor *range_editor;
+
+  range_editor = HILDON_RANGE_EDITOR(hildon_range_editor_new());
+  assert(range_editor);
+  return 1;
+}
+
+/* range editor: new range editor with separator: ok parameters */
+int test22b()
+{
+  HildonRangeEditor *range_editor;
+  
+  range_editor = HILDON_RANGE_EDITOR(hildon_range_editor_new_with_separator(
+                                     "String"));
+  assert(range_editor);
+  return 1;
+}
+
+/* range editor: new range editor with separator: NULL parameters */
+int test22c()
+{
+  HildonRangeEditor *range_editor;
+
+  range_editor = HILDON_RANGE_EDITOR(hildon_range_editor_new_with_separator(NULL));
+  assert(range_editor);
+  return 1;
+}
+
+/* range editor: get range: ok parameters */
+int test22d()
+{
+  HildonRangeEditor *range_editor;
+  gint start, end;
+
+  range_editor = HILDON_RANGE_EDITOR(hildon_range_editor_new());
+  hildon_range_editor_get_range (range_editor, &start, &end);
+
+  assert (start == -999);
+  assert (end == 999);
+
+  return 1;
+}
+
+/* range editor: get range: null range editor */
+int test22e()
+{
+  HildonRangeEditor *range_editor = NULL;
+  gint start, end;
+
+  hildon_range_editor_get_range (range_editor, &start, &end);
+
+  return 1;
+}
+
+/* range editor: get range: null end */
+int test22f()
+{
+  HildonRangeEditor *range_editor = NULL;
+  gint start;
+
+  hildon_range_editor_get_range (range_editor, &start, NULL);
+
+  return 1;
+}
+
+/* range editor: get range: null start */
+ int test22g()
+{
+  HildonRangeEditor *range_editor = NULL;
+  gint end;
+
+  hildon_range_editor_get_range (range_editor, NULL, &end);
+
+  return 1;
+}
+
+/* range editor: get range: null start, end */
+int test22h()
+{
+  HildonRangeEditor *range_editor = NULL;
+
+  hildon_range_editor_get_range (range_editor, NULL, NULL);
+
+  return 1;
+}
+
+/* range editor: set range: ok parameters */
+int test22i()
+{
+  HildonRangeEditor *range_editor;
+  gint start = 5, end = 6;
+
+  range_editor = HILDON_RANGE_EDITOR(hildon_range_editor_new());
+
+  hildon_range_editor_set_range (range_editor, start, end);
+  hildon_range_editor_get_range (range_editor, &start, &end);
+
+  assert (start   == 5);
+  assert (end == 6);
+
+  return 1;
+}
+
+/* range editor: set range: null range editor*/
+int test22j()
+{
+  HildonRangeEditor *range_editor = NULL;
+  gint start = 5, end = 6;
+
+  hildon_range_editor_set_range (range_editor, start, end);
+
+  return 1;
+}
+
+/* range editor: set limits: ok parameters */
+int test22k()
+{
+  HildonRangeEditor *range_editor;
+  gint start = 0, end = 0;
+
+  range_editor = HILDON_RANGE_EDITOR(hildon_range_editor_new());
+
+  hildon_range_editor_set_limits (range_editor, start, end);
+  hildon_range_editor_get_range (range_editor, &start, &end);
+
+  assert (start == 0);
+  assert (end == 0);
+
+  return 1;
+}
+
+/* range editor: set limits: set range over start minimum and end maximum */
+int test22l()
+{
+  HildonRangeEditor *range_editor;
+  gint start = -1, end = 1;
+
+  range_editor = HILDON_RANGE_EDITOR(hildon_range_editor_new());
+
+  hildon_range_editor_set_limits (range_editor, 0, 0);
+  hildon_range_editor_set_range (range_editor, start, end);
+  hildon_range_editor_get_range (range_editor, &start, &end);
+
+  assert (start  == 0);
+  assert (end == 0);
+
+  return 1;
+}
+
+/* range editor: set limits: NULL editor */
+int test22m()
+{
+  HildonRangeEditor *range_editor = NULL;
+  gint start = 0, end = 0;
+
+  hildon_range_editor_set_limits (range_editor, start, end);
+
+  return 1;
+}
+
+
+/* sort dialog:  */
+int test23a(void)
+{
+
+  HildonSortDialog *sort_dialog;
+
+  sort_dialog = HILDON_SORT_DIALOG(hildon_sort_dialog_new(NULL));
+  assert(sort_dialog);
+  return 1;
+}
+
+/* sort dialog: Get sort key. '0' is the default index value */
+int test23b(void)
+{
+
+  HildonSortDialog *sort_dialog;
+  gint default_key = 0;
+    
+  sort_dialog = HILDON_SORT_DIALOG(hildon_sort_dialog_new(NULL));
+  assert(hildon_sort_dialog_get_sort_key( sort_dialog ) == default_key );
+  return 1;
+}
+
+/* sort dialog: Set sort key */
+int test23c(void)
+{
+
+  HildonSortDialog *sort_dialog;
+  gint key = 1;
+   
+  sort_dialog = HILDON_SORT_DIALOG(hildon_sort_dialog_new(NULL));
+  hildon_sort_dialog_set_sort_key( sort_dialog, key );
+  assert(hildon_sort_dialog_get_sort_key( sort_dialog ) == 1 );
+  return 1;
+}
+
+/* sort dialog: add sort key */
+int test23d(void)
+{
+
+  HildonSortDialog *sort_dialog;
+  gint key = 1;
+  gint added_key_index = 0;
+   
+  sort_dialog = HILDON_SORT_DIALOG (hildon_sort_dialog_new(NULL));
+  hildon_sort_dialog_add_sort_key (sort_dialog, "Random");
+  added_key_index = hildon_sort_dialog_add_sort_key (sort_dialog,
+                                                    "Date");
+                                                     
+  hildon_sort_dialog_set_sort_key( sort_dialog, added_key_index );
+  assert(hildon_sort_dialog_get_sort_key( sort_dialog ) == key );
+  return 1;
+}
+
+/* sort dialog: get sort order. '0' is the default index value */
+int test23e(void)
+{
+
+  HildonSortDialog *sort_dialog;
+  GtkSortType type = 0;
+
+  sort_dialog = HILDON_SORT_DIALOG(hildon_sort_dialog_new(NULL));
+  assert(hildon_sort_dialog_get_sort_order( sort_dialog ) == type);
+  return 1;
+}
+
+/* sort dialog: set sort order */
+int test23f(void)
+{
+
+  HildonSortDialog *sort_dialog;
+  GtkSortType type = 1;
+
+  sort_dialog = HILDON_SORT_DIALOG(hildon_sort_dialog_new(NULL));
+  hildon_sort_dialog_set_sort_order( sort_dialog , type);
+  assert(hildon_sort_dialog_get_sort_order( sort_dialog ) == 1);
+  return 1;
+}
+
+/* sort dialog: gtk_widget_destroy  */
+int test23g()
+{
+    GtkWidget *sort_dialog;
+     
+    sort_dialog = hildon_sort_dialog_new(FALSE);
+    gtk_widget_destroy(GTK_WIDGET(sort_dialog));
+        
+    return 1;
+}
+
+/* Get password dialog */
+int test24a(void)
+{
+
+  HildonGetPasswordDialog *get_dialog;
+  get_dialog = HILDON_GET_PASSWORD_DIALOG(hildon_get_password_dialog_new(NULL,
+                                          FALSE));
+  assert(get_dialog);
+  return 1;
+}
+
+/* Get Old password dialog */
+int test24b(void)
+{
+
+  HildonGetPasswordDialog *get_old_dialog;
+  get_old_dialog = HILDON_GET_PASSWORD_DIALOG(hildon_get_password_dialog_new(NULL,
+                                              TRUE));
+  assert(get_old_dialog);
+  return 1;
+}
+
+/* Get / Get Old password dialog: get password  */
+int test24c(void)
+{
+  HildonGetPasswordDialog *get_dialog;
+  HildonGetPasswordDialog *get_old_dialog;
+  const gchar *get_string;
+  const gchar *get_old_string;
+  get_dialog = HILDON_GET_PASSWORD_DIALOG(hildon_get_password_dialog_new(NULL, 
+                                          FALSE));
+  get_string = hildon_get_password_dialog_get_password( get_dialog);
+  assert(get_string);
+  
+  get_old_dialog = HILDON_GET_PASSWORD_DIALOG(hildon_get_password_dialog_new(NULL,
+                                              TRUE));
+  get_old_string = hildon_get_password_dialog_get_password( get_old_dialog);
+  assert(get_old_string);
+  return 1;
+}
+
+/* get / get old password dialog: gtk_widget_destroy  */
+int test24d()
+{
+    GtkWidget *get_dialog;
+    GtkWidget *get_old_dialog;
+    
+    get_dialog = hildon_get_password_dialog_new(NULL, FALSE);
+    gtk_widget_destroy(GTK_WIDGET(get_dialog));
+    
+    get_old_dialog = hildon_get_password_dialog_new(NULL, TRUE);
+    gtk_widget_destroy(GTK_WIDGET(get_old_dialog));
+    
+    return 1;
+}
+
+/* set password dialog */
+int test25a(void)
+{
+
+  HildonSetPasswordDialog *set_dialog;
+  set_dialog = HILDON_SET_PASSWORD_DIALOG(hildon_set_password_dialog_new(NULL, 
+                                          FALSE));
+  assert(set_dialog);
+  return 1;
+}
+
+/* change password dialog */
+int test25b(void)
+{
+
+  HildonSetPasswordDialog *change_dialog;
+  change_dialog = HILDON_SET_PASSWORD_DIALOG(hildon_set_password_dialog_new(
+                                             NULL, TRUE));
+  assert(change_dialog);
+  return 1;
+}
+
+/* set / change password dialog: get password  */
+int test25c(void)
+{
+  HildonSetPasswordDialog *set_dialog;
+  HildonSetPasswordDialog *change_dialog;
+  const gchar *set_string;
+  const gchar *change_string;
+  set_dialog = HILDON_SET_PASSWORD_DIALOG(hildon_set_password_dialog_new(
+                                          NULL, FALSE));
+  set_string = hildon_set_password_dialog_get_password( set_dialog);
+  assert(set_string);
+  
+  change_dialog = HILDON_SET_PASSWORD_DIALOG(hildon_set_password_dialog_new(
+                                             NULL, TRUE));
+  change_string = hildon_set_password_dialog_get_password( change_dialog);
+  assert(change_string);
+  return 1;
+}
+
+/* set / change password dialog: get protected  */
+int test25d(void)
+{                                     
+  HildonSetPasswordDialog *set_dialog;
+  HildonSetPasswordDialog *change_dialog;
+  gboolean set;
+  gboolean change;
+  set_dialog = HILDON_SET_PASSWORD_DIALOG(hildon_set_password_dialog_new(
+                                          NULL, FALSE));
+  set = hildon_set_password_dialog_get_protected(set_dialog);
+  assert(set);
+  
+  change_dialog = HILDON_SET_PASSWORD_DIALOG(hildon_set_password_dialog_new(
+                                             NULL, TRUE));
+  change = hildon_set_password_dialog_get_protected(change_dialog);
+  assert(change);
+  return 1; 
+} 
+/* set / change password dialog: gtk_widget_destroy  */
+int test25e()
+{
+    GtkWidget *set_dialog;
+    GtkWidget *change_dialog;
+    
+    set_dialog = hildon_set_password_dialog_new(NULL, FALSE);
+    gtk_widget_destroy(GTK_WIDGET(set_dialog));
+    
+    change_dialog = hildon_set_password_dialog_new(NULL, TRUE);
+    gtk_widget_destroy(GTK_WIDGET(change_dialog));
+    
+    return 1;
+}
+int fsd_get_font(void)
+{
+       GtkWidget *fsd;
+       PangoAttrList *list = NULL;
+       fsd = hildon_font_selection_dialog_new( NULL, "fsd" );
+       list = hildon_font_selection_dialog_get_font(HILDON_FONT_SELECTION_DIALOG(fsd));
+       assert( list!=NULL );
+       return 1;
+}
+
+int fsd_set_font(void)
+{
+       GtkWidget *fsd;
+       PangoAttrList *list = NULL;
+       fsd = hildon_font_selection_dialog_new( NULL, "fsd" );
+       list = hildon_font_selection_dialog_get_font(HILDON_FONT_SELECTION_DIALOG(fsd));
+       hildon_font_selection_dialog_set_font(HILDON_FONT_SELECTION_DIALOG(fsd), list);
+       return 1;
+}
+
+int fsd_set_pretext(void)
+{
+       GtkWidget *fsd;
+       char *str = "Mopo karkas käsistä";
+       fsd = hildon_font_selection_dialog_new( NULL, "fsd" );
+       hildon_font_selection_dialog_set_preview_text(HILDON_FONT_SELECTION_DIALOG(fsd),str);
+       return 1;
+}
+
+int fsd_get_pretext(void)
+{
+       GtkWidget *fsd;
+       char *str = NULL;
+       fsd = hildon_font_selection_dialog_new( NULL, "fsd" );
+       str = (char*)hildon_font_selection_dialog_get_preview_text(
+           HILDON_FONT_SELECTION_DIALOG(fsd));
+
+       assert( str!=NULL );
+       return 1;
+}
+/* insert object dialog: new */
+int test27a(void){
+  GtkWidget *dialog;
+  dialog = hildon_insert_object_dialog_new(NULL);
+  g_assert(dialog);
+  return 1;  
+}
+
+/* insert object dialog: get_name */
+int test27b(void){
+  const gchar *string;
+  GtkWidget *dialog;
+
+  dialog = hildon_insert_object_dialog_new(NULL);
+  string = hildon_insert_object_dialog_get_name(HILDON_INSERT_OBJECT_DIALOG(dialog));
+  g_assert(string);
+  return 1;
+}
+
+/* insert object dialog: get_mime_type */
+int test27c(void){
+  const gchar *string;
+  GtkWidget *dialog;
+
+  dialog = hildon_insert_object_dialog_new(NULL);
+  string = hildon_insert_object_dialog_get_mime_type(HILDON_INSERT_OBJECT_DIALOG(dialog));
+  g_assert(string);
+  return 1;
+}
+
+/* hildon_number_editor_new */
+int test28a(void){
+  GtkWidget *editor;
+  gint min = -120;
+  gint max = 900;
+
+  editor = hildon_number_editor_new (min, max);
+  g_assert(editor);
+
+  return 1;
+}
+
+/* hildon_number_editor_get_value  */
+int test28b(void){
+  GtkWidget *editor;
+  gint min = 450;
+  gint max = 7500;
+  gint value;
+
+  editor = hildon_number_editor_new (min, max);
+  value = hildon_number_editor_get_value (HILDON_NUMBER_EDITOR(editor));
+  g_assert (value == max);
+
+  return 1;
+}
+
+/* hildon_number_editor_set_range  */
+int test28c(void){
+  GtkWidget *editor;
+  gint min = 450;
+  gint max = 7500;
+  gint value;
+
+  editor = hildon_number_editor_new (min, max);
+  hildon_number_editor_set_range (HILDON_NUMBER_EDITOR (editor), 30, 80);
+  value = hildon_number_editor_get_value (HILDON_NUMBER_EDITOR(editor));
+  g_assert (value == 80);
+
+  return 1;
+}
+
+/* hildon_number_editor_set_value */
+int test28d(void){
+  GtkWidget *editor;
+  gint min = 450;
+  gint max = 7500;
+  gint value;
+
+  editor = hildon_number_editor_new (min, max);
+  hildon_number_editor_set_value (HILDON_NUMBER_EDITOR (editor), 3450);
+  value = hildon_number_editor_get_value (HILDON_NUMBER_EDITOR(editor));
+  g_assert (value == 3450);
+
+return 1;
+}
+
+/* Hildon-Color-Selector: 
+    hildon_color_selector_new() 
+    with base color
+ */ 
+int test29a(void){
+  GtkWidget *colselector;
+  GdkColor redcolor = {0, 65535, 0, 0 };
+  GdkColor *color;
+
+  colselector = hildon_color_selector_new( NULL );
+
+  hildon_color_selector_set_color( HILDON_COLOR_SELECTOR(colselector), &(redcolor) );
+  color = hildon_color_selector_get_color( HILDON_COLOR_SELECTOR(colselector) );
+
+  g_assert( colselector );
+  g_assert( redcolor.pixel == color->pixel );
+  g_assert( redcolor.red   == color->red   );
+  g_assert( redcolor.green == color->green );
+  g_assert( redcolor.blue  == color->blue  );
+
+  g_free(color);
+  gtk_widget_destroy ( colselector );   
+
+  return 1;
+}
+/* Hildon-Color-Selector: 
+   HildonColorSelector with non-base color
+ */ 
+int test29b(void){
+
+  HildonColorSelector *colorsel;
+  GtkWidget *obj_self;
+  GdkColor mixedcolor = { 0, 7281, 21845, 65535 };   
+  GdkColor *color;
+
+  obj_self =  hildon_color_selector_new( NULL );
+  colorsel = HILDON_COLOR_SELECTOR ( obj_self  );
+
+  hildon_color_selector_set_color( colorsel, &mixedcolor );
+  color = hildon_color_selector_get_color( colorsel );         
+
+  g_assert( colorsel );
+  g_assert( color->pixel == 0 );
+  g_assert( color->red   == 7281 );
+  g_assert( color->green == 21845 );
+  g_assert( color->blue  == 65535 ); 
+
+  g_free( color ); 
+  g_object_unref ( obj_self );
+  gtk_widget_destroy( GTK_WIDGET(colorsel) );
+  
+  return 1;
+}
+
+/* hildon_file_handling_note_new_moving */
+int test30a(void){
+
+   GtkWidget *file_note;
+  
+   file_note = hildon_file_handling_note_new_moving (NULL);
+   hildon_file_handling_note_set_fraction (HILDON_FILE_HANDLING_NOTE(file_note), 0.7);
+
+   g_assert (file_note);
+  
+   return 1;
+}
+
+/* hildon_file_handling_note_new_deleting */
+int test30b(void){
+    
+   GtkWidget *file_note;
+  
+   file_note = hildon_file_handling_note_new_deleting (NULL);
+   hildon_file_handling_note_set_counter_and_name (HILDON_FILE_HANDLING_NOTE (file_note), 
+                                                  1, 2, "bar.txt");
+   hildon_file_handling_note_set_counter_and_name (HILDON_FILE_HANDLING_NOTE (file_note), 
+                                                  2, 2, "foo.txt"); 
+   g_assert (file_note);
+  
+   return 1;
+}
+
+/* hildon_file_handling_note_new_opening */
+int test30c(void){
+    
+   GtkWidget *file_note;
+  
+   file_note = hildon_file_handling_note_new_opening (NULL);
+   hildon_file_handling_note_set_name (HILDON_FILE_HANDLING_NOTE (file_note),
+   "baz.txt");
+   g_assert (file_note);
+  
+   return 1;
+}
+
+/* hildon_file_handling_note_new_saving */
+int test30d(void){
+    
+   GtkWidget *file_note;
+  
+   file_note = hildon_file_handling_note_new_saving (NULL);
+   hildon_file_handling_note_set_fraction (HILDON_FILE_HANDLING_NOTE (file_note), 0.7);
+   g_assert (file_note);
+  
+   return 1;
+}
+
+/* Add to Home dialog new: ok parameters */
+int test31a(void){
+    GtkWidget *d;
+    
+    d = hildon_add_home_dialog_new( NULL, "name" , NULL);
+    g_assert( d );
+
+    return 1;
+}
+
+/* Add to Home dialog new: NULL parameter (is ok) */
+int test31b(void){
+    GtkWidget *d;
+    
+    d = hildon_add_home_dialog_new( NULL, NULL, NULL );
+    g_assert( d );
+
+    return 1;
+}
+
+/* Rename dialog new: ok parameters */
+int test32a(void){
+    GtkWidget *d;
+    
+    d = hildon_add_home_dialog_new( NULL, "name", "newname" );
+    g_assert( d );
+
+    return 1;
+}
+
+/* Rename dialog new: NULL parameter (is ok) */
+int test32b(void){
+    GtkWidget *d;
+    
+    d = hildon_add_home_dialog_new( NULL, NULL, "newname" );
+    g_assert( d );
+
+    return 1;
+}
+
+/* Create item with icon basename. */
+int test33a1 (void)
+{
+    /* If test fails, first see if icon exists. */
+    GtkWidget *item;
+    item = hildon_grid_item_new (VALID_ICON);
+    g_assert (item);
+    return 1;
+}
+
+/* Create item without icon basename. */
+int test33a2 (void)
+{
+    GtkWidget *item;
+    item = hildon_grid_item_new (NULL);
+    g_assert (item);
+    return 1;
+}
+
+/* Create item with icon basename and label. */
+int test33b1 (void)
+{
+    /* If test fails, first see if icon exists. */
+    GtkWidget *item;
+    item = hildon_grid_item_new_with_label (VALID_ICON, "foo");
+    g_assert (item);
+    return 1;
+}
+
+/* Create item with icon basename but with no label. */
+int test33b2 (void)
+{
+    /* If test fails, first see if icon exists. */
+    GtkWidget *item;
+    item = hildon_grid_item_new_with_label (VALID_ICON, NULL);
+    g_assert (item);
+    return 1;
+}
+int test33b3 (void)
+{
+    GtkWidget *item;
+    item = hildon_grid_item_new_with_label (NULL, "foo");
+    g_assert (item);
+    return 1;
+}
+
+/* Create item without icon basename and without label. */
+int test33b4 (void)
+{
+    GtkWidget *item;
+    item = hildon_grid_item_new_with_label (NULL, NULL);
+    g_assert (item);
+    return 1;
+}
+
+/* Set emblem type. Non-NULL item, non-NULL emblem. */
+int test33c1 (void)
+{
+    /* If test fails, first see if icon exists. */
+    GtkWidget *item;
+    item = hildon_grid_item_new (VALID_ICON);
+    hildon_grid_item_set_emblem_type (HILDON_GRID_ITEM (item), VALID_ICON);
+    return 1;
+}
+
+/* Set emblem type. Non-NULL item, NULL emblem. */
+int test33c2 (void)
+{
+    /* If test fails, first see if icon exists. */
+    GtkWidget *item;
+    item = hildon_grid_item_new (VALID_ICON);
+    hildon_grid_item_set_emblem_type (HILDON_GRID_ITEM (item), NULL);
+    return 1;
+}
+
+/* Set emblem type. NULL item, non-NULL emblem. */
+int test33c3 (void)
+{
+    hildon_grid_item_set_emblem_type (NULL, VALID_ICON);
+    return 1;
+}
+
+/* Set emblem type. NULL item, NULL emblem. */
+int test33c4 (void)
+{
+    hildon_grid_item_set_emblem_type (NULL, NULL);
+    return 1;
+}
+
+/* Get emblem type from existing item - has emblem. */
+int test33d1 (void)
+{
+    /* If test fails, first see if icon exists. */
+    GtkWidget *item;
+    const gchar *type;
+    item = hildon_grid_item_new (VALID_ICON);
+    hildon_grid_item_set_emblem_type (HILDON_GRID_ITEM (item), VALID_ICON);
+    type = hildon_grid_item_get_emblem_type (HILDON_GRID_ITEM (item));
+    g_assert (type);
+    return 1;
+}
+
+/* Get emblem type from existing item - has no emblem. */
+int test33d2 (void)
+{
+    /* If test fails, first see if icon exists. */
+    GtkWidget *item;
+    const gchar *type;
+    item = hildon_grid_item_new (VALID_ICON);
+    type = hildon_grid_item_get_emblem_type (HILDON_GRID_ITEM (item));
+    g_assert (type != NULL);
+    return 1;
+}
+
+/* Get emblem type from non-existing item. */
+int test33d3 (void)
+{
+    const gchar *type;
+    type = hildon_grid_item_get_emblem_type (NULL);
+    g_assert (type != NULL);
+    return 1;
+}
+
+/* Destroy griditem. */
+int test33e(void)
+{
+    GtkWidget *item;
+    item = hildon_grid_item_new (VALID_ICON);
+    gtk_widget_destroy (item);
+    return 1;
+}
+
+/* Create new grid. */
+int test34a (void)
+{
+    GtkWidget *grid;
+    grid = hildon_grid_new ();
+    g_assert (grid);
+    return 1;
+}
+
+/* Set grid style. */
+int test34b1 (void)
+{
+    GtkWidget *grid;
+    grid = hildon_grid_new ();
+    hildon_grid_set_style (HILDON_GRID (grid), "bar");
+    return 1;
+}
+
+/* Set grid style (no style). */
+int test34b2 (void)
+{
+    GtkWidget *grid;
+    grid = hildon_grid_new ();
+    hildon_grid_set_style (HILDON_GRID (grid), NULL);
+    return 1;
+}
+
+/* Set grid style. Invalid grid. */
+int test34b3 (void)
+{
+    hildon_grid_set_style (NULL, "bar");
+    return 1;
+}
+
+/* Set grid style. Invalid grid, no style. */
+int test34b4 (void)
+{
+    hildon_grid_set_style (NULL, NULL);
+    return 1;
+}
+
+/* Get grid style. Valid grid, has style. */
+int test34c1 (void)
+{
+    GtkWidget *grid;
+    const gchar *style;
+    grid = hildon_grid_new ();
+    hildon_grid_set_style (HILDON_GRID (grid), "foo");
+    style = hildon_grid_get_style (HILDON_GRID (grid));
+    g_assert (style);
+    return 1;
+}
+
+/* Get grid style. Valid grid, has no style. */
+int test34c2 (void)
+{
+    GtkWidget *grid;
+    const gchar *style;
+    grid = hildon_grid_new ();
+    hildon_grid_set_style (HILDON_GRID (grid), NULL);
+    style = hildon_grid_get_style (HILDON_GRID (grid));
+    g_assert (style != NULL && strcmp (style, "HildonGrid") == 0);
+    return 1;
+}
+
+/* Get grid style. Invalid grid. */
+int test34c3 (void)
+{
+    const gchar *style;
+    style = hildon_grid_get_style (NULL);
+    g_assert (style);
+    return 1;
+}
+
+/* Set grid scrollbar position. Valid grid. */
+int test34d1 (void)
+{
+    GtkWidget *grid;
+    grid = hildon_grid_new ();
+    hildon_grid_set_scrollbar_pos (HILDON_GRID (grid), 0);
+    return 1;
+}
+
+/* Set grid scrollbar position. Invalid grid. */
+int test34d2 (void)
+{
+    hildon_grid_set_scrollbar_pos (NULL, 0);
+    return 1;
+}
+
+/* Get grid scrollbar position. Valid grid. */
+int test34e1 (void)
+{
+    GtkWidget *grid;
+    gint pos;
+    grid = hildon_grid_new ();
+    pos = hildon_grid_get_scrollbar_pos (HILDON_GRID (grid));
+    return 1;
+}
+
+/* Get grid scrollbar position. Inalid grid. */
+int test34e2 (void)
+{
+    gint pos;
+    pos = hildon_grid_get_scrollbar_pos (NULL);
+    return 1;
+}
+
+/* Add item to existing grid. */
+int test34f1 (void)
+{
+    GtkWidget *grid;
+    GtkWidget *item;
+    grid = hildon_grid_new ();
+    item = hildon_grid_item_new (VALID_ICON);
+    gtk_container_add (GTK_CONTAINER (grid), item);
+    return 1;
+}
+
+/* Add NULL to existing grid. */
+int test34f2 (void)
+{
+    GtkWidget *grid;
+    GtkWidget *item;
+    grid = hildon_grid_new ();
+    item = hildon_grid_item_new (VALID_ICON);
+    gtk_container_add (GTK_CONTAINER (grid), NULL);
+    return 1;
+}
+
+/* Add something to existing grid. */
+int test34f3 (void)
+{
+    GtkWidget *grid;
+    GtkWidget *item;
+    grid = hildon_grid_new ();
+    item = gtk_button_new ();
+    gtk_container_add (GTK_CONTAINER (grid), item);
+    return 1;
+}
+
+/* Add something to non-existing grid. */
+int test34f4 (void)
+{
+    GtkWidget *item;
+    item = gtk_button_new ();
+    gtk_container_add (NULL, item);
+    return 1;
+}
+
+/* Add something to invalid grid. */
+int test34f5 (void)
+{
+    GtkWidget *item;
+    item = gtk_button_new ();
+    gtk_container_add (GTK_CONTAINER (item), item);
+    return 1;
+}
+
+/* Remove item from grid. */
+int test34g1 (void)
+{
+    GtkWidget *grid;
+    GtkWidget *item;
+    grid = hildon_grid_new ();
+    item = hildon_grid_item_new (VALID_ICON);
+    gtk_container_add (GTK_CONTAINER (grid), item);
+    gtk_container_remove (GTK_CONTAINER (grid), item);
+    return 1;
+}
+
+/* Remove non-existing item from grid. */
+int test34g2 (void)
+{
+    GtkWidget *grid;
+    GtkWidget *item;
+    grid = hildon_grid_new ();
+    item = hildon_grid_item_new (VALID_ICON);
+    gtk_container_add (GTK_CONTAINER (grid), item);
+    item = hildon_grid_item_new (VALID_ICON);
+    gtk_container_remove (GTK_CONTAINER (grid), item);
+    return 1;
+}
+
+/* Remove NULL from grid. */
+int test34g3 (void)
+{
+    GtkWidget *grid;
+    GtkWidget *item;
+    grid = hildon_grid_new ();
+    item = hildon_grid_item_new (VALID_ICON);
+    gtk_container_add (GTK_CONTAINER (grid), item);
+    gtk_container_remove (GTK_CONTAINER (grid), NULL);
+    return 1;
+}
+
+/* Remove something from grid. */
+int test34g4 (void)
+{
+    GtkWidget *grid;
+    GtkWidget *item;
+    grid = hildon_grid_new ();
+    item = hildon_grid_item_new (VALID_ICON);
+    gtk_container_add (GTK_CONTAINER (grid), item);
+    item = gtk_button_new ();
+    gtk_container_remove (GTK_CONTAINER (grid), item);
+    return 1;
+}
+
+/* Remove something from NULL grid. */
+int test34g5 (void)
+{
+    GtkWidget *item;
+    item = gtk_button_new ();
+    gtk_container_remove (NULL, item);
+    return 1;
+}
+
+/* Remove something from invalid grid. */
+int test34g6 (void)
+{
+    GtkWidget *item0, *item1;
+    item0 = gtk_button_new ();
+    item1 = gtk_button_new ();
+    gtk_container_remove (GTK_CONTAINER (item0), item1);
+    return 1;
+}
+
+/* Set focus. */
+int test34h1 (void)
+{
+    GtkWidget *grid;
+    GtkWidget *item;
+    grid = hildon_grid_new ();
+    item = hildon_grid_item_new (VALID_ICON);
+    gtk_container_add (GTK_CONTAINER (grid), item);
+    item = hildon_grid_item_new (VALID_ICON);
+    gtk_container_add (GTK_CONTAINER (grid), item);
+    gtk_container_set_focus_child (GTK_CONTAINER (grid), item);
+    return 1;
+}
+
+/* Set focus to non-existing. */
+int test34h2 (void)
+{
+    GtkWidget *grid;
+    GtkWidget *item;
+    grid = hildon_grid_new ();
+    item = hildon_grid_item_new (VALID_ICON);
+    gtk_container_add (GTK_CONTAINER (grid), item);
+    item = hildon_grid_item_new (VALID_ICON);
+    gtk_container_add (GTK_CONTAINER (grid), item);
+    gtk_container_set_focus_child (GTK_CONTAINER (grid), item);
+    item = hildon_grid_item_new (VALID_ICON);
+    gtk_container_set_focus_child (GTK_CONTAINER (grid), item);
+    return 1;
+}
+
+/* Set focus to NULL. */
+int test34h3 (void)
+{
+    GtkWidget *grid;
+    GtkWidget *item;
+    grid = hildon_grid_new ();
+    item = hildon_grid_item_new (VALID_ICON);
+    gtk_container_add (GTK_CONTAINER (grid), item);
+    item = hildon_grid_item_new (VALID_ICON);
+    gtk_container_add (GTK_CONTAINER (grid), item);
+    gtk_container_set_focus_child (GTK_CONTAINER (grid), item);
+    return 1;
+}
+
+/* Set focus to something. */
+int test34h4 (void)
+{
+    GtkWidget *grid;
+    GtkWidget *item;
+    grid = hildon_grid_new ();
+    item = hildon_grid_item_new (VALID_ICON);
+    gtk_container_add (GTK_CONTAINER (grid), item);
+    item = hildon_grid_item_new (VALID_ICON);
+    gtk_container_add (GTK_CONTAINER (grid), item);
+    item = gtk_button_new ();
+    gtk_container_set_focus_child (GTK_CONTAINER (grid), item);
+    return 1;
+}
+
+/* Get focus. */
+int test34i1 (void)
+{
+    GtkWidget *grid;
+    GtkWidget *item;
+    grid = hildon_grid_new ();
+    item = hildon_grid_item_new (VALID_ICON);
+    gtk_container_add (GTK_CONTAINER (grid), item);
+    item = hildon_grid_item_new (VALID_ICON);
+    gtk_container_add (GTK_CONTAINER (grid), item);
+    gtk_container_set_focus_child (GTK_CONTAINER (grid), item);
+    g_assert (GTK_CONTAINER (grid)->focus_child == item);
+    return 1;
+}
+
+/* Get focus (no focused). */
+int test34i2 (void)
+{
+    GtkWidget *grid;
+    grid = hildon_grid_new ();
+    g_assert (GTK_CONTAINER (grid)->focus_child == NULL);
+    return 1;
+}
+
+/* Destroy grid. Has items. */
+int test34j1 (void)
+{
+    GtkWidget *grid;
+    grid = hildon_grid_new ();
+    gtk_widget_destroy (grid);
+    return 1;
+}
+
+/* Destroy grid. No items. */
+int test34j2 (void)
+{
+    GtkWidget *grid;
+    GtkWidget *item;
+    grid = hildon_grid_new ();
+    item = hildon_grid_item_new (VALID_ICON);
+    gtk_container_add (GTK_CONTAINER (grid), item);
+    gtk_widget_destroy (grid);
+    return 1;
+}
+
+/* HildonTimeEditor: create editor widget */
+int test35a (void){
+    GtkWidget *editor;
+    editor = hildon_time_editor_new ();
+    g_assert (editor);
+    return 1;
+}
+
+/* HildonTimeEditor: set time and check if returned
+ * time value is same 
+ */
+int test35b (void){
+    GtkWidget *editor;
+    guint hour, min, sec;
+    editor = hildon_time_editor_new ();
+    hildon_time_editor_set_time (HILDON_TIME_EDITOR (editor), 
+                                 21, 39, 45);
+    hildon_time_editor_get_time (HILDON_TIME_EDITOR (editor),
+                                 &hour, &min, &sec);
+    g_assert (hour == 21);
+    g_assert (min == 39);
+    g_assert (sec ==45);
+    return 1;
+}
+
+/* HildonTimeEditor: enable/disable seconds */
+int test35c (void){
+    GtkWidget *editor;
+    editor = hildon_time_editor_new ();
+    hildon_time_editor_show_seconds (HILDON_TIME_EDITOR (editor), 1);
+    hildon_time_editor_show_seconds (HILDON_TIME_EDITOR (editor), 0);
+    return 1;
+}
+
+/* HildonTimeEditor: enable duration mode */
+int test35d (void){
+    GtkWidget *editor;
+    editor = hildon_time_editor_new ();
+    hildon_time_editor_enable_duration_mode (HILDON_TIME_EDITOR (editor),
+                                             1);
+    return 1;
+}
+
+/* HildonTimeEditor: set duration range and check values
+ * against returned values 
+ */
+int test35e (void){
+    GtkWidget *editor;
+    guint min_seconds, max_seconds;
+    editor = hildon_time_editor_new ();
+    hildon_time_editor_enable_duration_mode (HILDON_TIME_EDITOR (editor),
+                                             1);
+    hildon_time_editor_set_duration_range (HILDON_TIME_EDITOR (editor),
+                                           3600, 14500);
+    hildon_time_editor_get_duration_range (HILDON_TIME_EDITOR (editor),
+                                           &min_seconds, &max_seconds);
+    g_assert (min_seconds == 3600);
+    g_assert (max_seconds == 14500);
+    return 1;
+}
+
+/* HildonTimeEditor: enable and disable duration modes */
+int test35f (void){
+    GtkWidget *editor;
+    editor = hildon_time_editor_new ();
+    hildon_time_editor_enable_duration_mode (HILDON_TIME_EDITOR (editor),
+                                             1);
+    hildon_time_editor_enable_duration_mode (HILDON_TIME_EDITOR (editor),
+                                             0);
+    return 1;
+}
+
+/* HildonTimeEditor: set time and check against
+ * foo values
+ */
+int test35g (void){
+    GtkWidget *editor;
+    guint hour, min, sec;
+    editor = hildon_time_editor_new ();
+    hildon_time_editor_set_time (HILDON_TIME_EDITOR (editor), 
+                                 21, 39, 45);
+    hildon_time_editor_get_time (HILDON_TIME_EDITOR (editor),
+                                 &hour, &min, &sec);
+    g_assert (hour == 13);
+    g_assert (min == 33);
+    g_assert (sec ==42);
+    return 1;
+}
+
+/* HildonTimeEditor: set duration range and check values
+ * against foo values
+ */
+int test35h (void){
+    GtkWidget *editor;
+    guint min_seconds, max_seconds;
+    editor = hildon_time_editor_new ();
+    hildon_time_editor_enable_duration_mode (HILDON_TIME_EDITOR (editor),
+                                             1);
+    hildon_time_editor_set_duration_range (HILDON_TIME_EDITOR (editor),
+                                           3600, 14500);
+    hildon_time_editor_get_duration_range (HILDON_TIME_EDITOR (editor),
+                                           &min_seconds, &max_seconds);
+    g_assert (min_seconds == 4600);
+    g_assert (max_seconds == 15500);
+    return 1;
+}
+
+
+/* find replace dialog: new */
+int test36a(void)
+{
+   
+     GtkWidget *dialog;
+     dialog = hildon_find_replace_dialog_new(NULL, HILDON_REPLACE_NORMAL);
+     g_assert(dialog);
+     return 1;
+}
+
+
+/* find replace dialog: new with options */
+int test36b(void)
+{
+   
+     GtkWidget *dialog;
+     GtkWidget *options;
+   
+     options = gtk_dialog_new();
+     dialog = hildon_find_replace_dialog_new_with_options(NULL,GTK_DIALOG(options), HILDON_REPLACE_NORMAL);
+     gtk_widget_destroy(dialog);
+   
+     return 1;
+}
+
+
+/* find replace dialog: get_text */
+int test36c(void)
+{
+   
+     const gchar *string;
+     GtkWidget *dialog;
+   
+     dialog = hildon_find_replace_dialog_new(NULL, HILDON_REPLACE_NORMAL);
+     string = hildon_find_replace_dialog_get_text(HILDON_FIND_REPLACE_DIALOG(dialog));
+     g_assert(string);
+     return 1;
+}
+
+/* find replace dialog: get_new_text */
+int test36d(void)
+{
+   
+     const gchar *string;
+     GtkWidget *dialog;
+   
+     dialog = hildon_find_replace_dialog_new(NULL, HILDON_REPLACE_NORMAL);
+     string = hildon_find_replace_dialog_get_new_text(HILDON_FIND_REPLACE_DIALOG(dialog));
+     g_assert(string);
+     return 1;
+}
+
+int test37a()
+{
+     gtk_infoprint_temporarily_disable_wrap ();
+     gtk_infoprint (NULL, "A suitably long text for testing the wrapping of gtkinfoprint.");
+     return 1;
+}
+
+int test37b()
+{
+     gtk_banner_temporarily_disable_wrap ();
+     gtk_banner_show_animation (NULL, "A suitably long text for testing the wrapping of gtkinfoprint.");
+     return 1;
+}
+
+int test39a()
+{
+   gchar *name;
+   GtkWidget *dialog;
+   
+   dialog = hildon_name_password_dialog_new(NULL);
+   name = (gchar *)hildon_name_password_dialog_get_name(HILDON_NAME_PASSWORD_DIALOG(dialog));
+   g_assert(name);
+   
+   return 1;
+}
+
+int test39b()
+{
+   gchar *password;
+   GtkWidget *dialog;
+   
+   dialog = hildon_name_password_dialog_new(NULL);
+   password = (gchar *)hildon_name_password_dialog_get_password(HILDON_NAME_PASSWORD_DIALOG(dialog));
+   g_assert(password);
+   
+   return 1;
+}
+
+int test41a()
+{
+  GtkWidget *fdialog;
+
+  fdialog = hildon_file_details_dialog_new (NULL, "this is probably very very long filename");
+  assert (HILDON_FILE_DETAILS_DIALOG (fdialog));
+  return 1;
+}
+
+testcase tcases[] =
+{
+    {*test1a, "hildon_controlbar_new", EXPECT_OK},
+    {*test1b, "hildon_controlbar_get/set_max", EXPECT_OK},
+    {*test1c, "hildon_controlbar_get/set_value", EXPECT_OK},
+    {*test1d, "gtk_widget_destroy", EXPECT_OK},
+    {*test1e, "hildon_controlbar_get/set_min", EXPECT_OK},
+    {*test1f, "hildon_controlbar_set_range", EXPECT_OK},
+    {*test1g, "hildon_controlbar_set/get_range", EXPECT_OK},
+    {*test1h, "hildon_controlbar_range/set/get_value (min)", EXPECT_OK},
+    {*test1i, "hildon_controlbar_range/set/get_value (max)", EXPECT_OK},
+    {*test2a, "hildon_seekbar_new", EXPECT_OK},
+    {*test2b, "hildon_seekbar_get/set_total_time", EXPECT_OK},
+    {*test2c, "hildon_seekbar_get/set_position", EXPECT_OK},
+    {*test2d, "gtk_widget_destroy", EXPECT_OK},
+    {*test2e, "hildon_seekbat_get/set_fraction", EXPECT_OK},
+    {*test3a, "gtk_infoprint system (something)", EXPECT_OK},
+    {*test3b, "gtk_infoprint system (NULL)", EXPECT_OK},
+    {*test3c, "gtk_infoprint_with_icon_stock (VALID ICON)", EXPECT_OK},
+    {*test3d, "gtk_infoprint_with_icon_stock (EMPTY STRING)", EXPECT_OK},
+    {*test3e, "gtk_infoprint_with_icon_stock (NULL STRING)", EXPECT_OK},
+    {*test3f, "gtk_infoprintf (something)", EXPECT_OK},
+    {*test3g, "gtk_infoprintf (NULL)", EXPECT_OK},
+    {*test3h, "gtk_confirmation_banner (Somestring, NULL STRING)", EXPECT_OK},
+    {*test3i, "gtk_confirmation_banner (Somestring, NULL)", EXPECT_OK},
+    {*test3j, "gtk_banner_show_animation", EXPECT_OK},
+    {*test3k, "gtk_banner_show_animation with set_fraction", EXPECT_OK},
+    /*{*test3l, "gtk_banner_show_animation with two banner_closes", EXPECT_ASSERT},*/
+    {*test3m, "gtk_banner_show_animation with destroy window", EXPECT_OK},
+    {*test3n, "gtk_banner_show_bar", EXPECT_OK},
+    {*test3o, "gtk_banner_show_bar with destroy window", EXPECT_OK},
+    {*test3p, "gtk_banner_show_bar & close with null parent", EXPECT_OK},
+    {*test3q, "gtk_banner_set_text with null parent", EXPECT_OK},
+    {*test3r, "gtk_banner_set_fraction with null parent", EXPECT_OK},
+    {*test3s, "gtk_banner_close with null parent", EXPECT_OK},
+    {*test3t, "gtk_banner_set_fraction with invalid fraction", EXPECT_ASSERT},
+    {*test3u, "gtk_banner_set_fraction with invalid fraction", EXPECT_ASSERT},
+    {*test3v, "gtk_banner_show_animation & close with null parent", EXPECT_OK},
+    {*test4a, "hildon_note_new_confirmation", EXPECT_OK},
+    {*test4b, "hildon_note_new_confirmation_with_icon_stock", EXPECT_OK},
+    {*test4c, "hildon_new_confirmation_add_buttons", EXPECT_OK},
+    {*test4d, ".._new_confirmation: set_button_text", EXPECT_OK},
+    {*test4e, "hildon_note_new_information", EXPECT_OK},
+    {*test4f, "hildon_note_new_information_with_icon_stock", EXPECT_OK},
+    {*test4g, ".._new_information: set_button_text", EXPECT_OK},
+    /*    {*test4h, "hildon_note_new_cancel", EXPECT_OK},*/
+    /*    {*test4i, ".._new_cancel: set_button_text", EXPECT_OK},*/
+    {*test4j, "hildon_note_new_cancel_with_progress_bar", EXPECT_OK},
+    {*test4k, ".._cancel_with_progress_bar: set_button_text", EXPECT_OK},
+    {*test4l, "destroy note widgets", EXPECT_OK},
+    
+    {*test6a, "hildon_volumebar_new (horizontal)", EXPECT_OK},
+    {*test6b, "hildon_volumebar_new (vertical)", EXPECT_OK},
+    {*test6c, "hildon_volumebar_get/set_level", EXPECT_OK},
+    {*test6d, "hildon_volumebar_get/set_mute", EXPECT_OK},
+    {*test6e, "gtk_widget_destroy", EXPECT_OK},
+    {*test7a, "hildon_search_new", EXPECT_OK},
+    {*test7b, "hildon_search_new (fake icon)", EXPECT_OK},
+    {*test7c, "hildon_search_set_image (fake icon)", EXPECT_OK},
+    {*test7d, "hildon_search_set_image", EXPECT_OK},
+    {*test7e, "gtk_widget_destroy", EXPECT_OK},
+    {*test10a, "hildon_weekday_picker_new", EXPECT_OK},
+    {*test11a, "hildon_weekday_picker_{,un,is}set", EXPECT_OK},
+    {*test11b, "hildon_weekday_picker_set: null", EXPECT_ASSERT},
+    {*test11c, "hildon_weekday_picker_unset: null", EXPECT_ASSERT},
+    {*test11d, "hildon_weekday_picker_isset: null", EXPECT_ASSERT},
+    {*test12a, "hildon_weekday_picker_toggle_day", EXPECT_OK},
+    {*test12b, "hildon_weekday_picker_toggle_day: null", EXPECT_ASSERT},
+    {*test12c, "hildon_weekday_picker_set_all/unset_all", EXPECT_OK},
+    {*test13a, "htp_editor_new: ok", EXPECT_OK},
+    {*test13b, "htp_editor_new: inv", EXPECT_ASSERT},
+    {*test14a, "htp_editor_set_editable: ok", EXPECT_OK},
+    {*test14b, "htp_editor_set_editable: null", EXPECT_ASSERT},
+    {*test15a, "htp_editor_set_show_plus: ok", EXPECT_OK},
+    {*test15b, "htp_editor_set_show_plus: null", EXPECT_ASSERT},
+    {*test15c, "htp_editor_get_show_plus: null", EXPECT_ASSERT},
+    {*test15d, "htp_editor_set_show_border: ok", EXPECT_OK},
+    {*test15e, "htp_editor_set_show_border: null", EXPECT_ASSERT},
+    {*test15f, "htp_editor_get_show_border: null", EXPECT_ASSERT},
+    {*test16a, "htp_editor_set_widths: ok", EXPECT_OK},
+    {*test16b, "htp_editor_set_widths: null", EXPECT_ASSERT},
+    {*test17a, "htp_editor_set/get_country: ok", EXPECT_OK},
+    {*test17b, "htp_editor_set/get_country: inv", EXPECT_OK},
+    {*test17c, "htp_editor_set_country: null", EXPECT_ASSERT},
+    {*test17d, "htp_editor_get_country: null", EXPECT_ASSERT},
+    {*test18a, "htp_editor_set/get_area: ok", EXPECT_OK},
+    {*test18b, "htp_editor_set/get_area: inv", EXPECT_OK},
+    {*test18c, "htp_editor_set_area: null", EXPECT_ASSERT},
+    {*test18d, "htp_editor_get_area: null", EXPECT_ASSERT},
+    {*test19a, "htp_editor_set/get_number: ok", EXPECT_OK},
+    {*test19b, "htp_editor_set/get_number: FREE", EXPECT_OK},
+    {*test19c, "htp_editor_set/get_number: inv", EXPECT_OK},
+    {*test19d, "htp_editor_set_number: null", EXPECT_ASSERT},
+    {*test19e, "htp_editor_get_number: null", EXPECT_ASSERT},
+    {*test20a, "hildon_find_object: new", EXPECT_OK},
+    {*test20b, "hildon_find_object: with_options", EXPECT_OK},
+    {*test20c, "hildon_find_object: get_text", EXPECT_OK},
+    {*test20d, "hildon_find_object: get_label", EXPECT_OK},
+    /*{*test21a, "hildon_find_options: new", EXPECT_OK},
+    {*test21b, "hildon_find_options: hide_loc", EXPECT_OK},
+    {*test21c, "hildon_find_options: hide_find_in", EXPECT_OK},
+    {*test21d, "hildon_find_options: get_location", EXPECT_OK},
+    {*test21e, "hildon_find_options: get_find", EXPECT_OK},
+    {*test21f, "hildon_find_options: get_time_period", EXPECT_OK},
+    {*test21g, "hildon_find_options: get_start", EXPECT_OK},
+    {*test21h, "hildon_find_options: get_end", EXPECT_OK},
+    {*test21i, "hildon_find_options: add_custom", EXPECT_OK},
+    {*test21j, "hildon_find_options: date_matches", EXPECT_ASSERT},*/
+    {*test22a, "range_editor_new", EXPECT_OK},
+    {*test22b, "range_editor_new_with_separator", EXPECT_OK},
+    {*test22c, "range_editor_new_with_separator_null", EXPECT_OK},
+    {*test22d, "hildon_range_editor_get_range", EXPECT_OK},
+    {*test22e, "hildon_range_editor_get_range_null", EXPECT_ASSERT},
+    {*test22f, "hildon_range_editor_get_range_null2", EXPECT_ASSERT},
+    {*test22g, "hildon_range_editor_get_range_null3", EXPECT_ASSERT},
+    {*test22h, "hildon_range_editor_get_range_null4", EXPECT_ASSERT},
+    {*test22i, "hildon_range_editor_set_range", EXPECT_OK},
+    {*test22j, "hildon_range_editor_set_range_null_editor", EXPECT_ASSERT},
+    {*test22k, "hildon_range_editor_set_limits", EXPECT_OK},
+    {*test22l, "hildon_range_editor_set_limits&range", EXPECT_OK},
+    {*test22m, "hildon_range_editor_set_limits_null", EXPECT_ASSERT},
+    {*test23a, "hildon_sort_dialog_new", EXPECT_OK},
+    {*test23b, "hildon_sort_dialog_get_sort_key", EXPECT_OK},
+    {*test23c, "hildon_sort_dialog_set_sort_key", EXPECT_OK},
+    {*test23d, "hildon_sort_dialog_add_sort_key", EXPECT_OK},
+    {*test23e, "hildon_sort_dialog_get_sort_order", EXPECT_OK},
+    {*test23f, "hildon_sort_dialog_set_sort_order", EXPECT_OK},
+    {*test23g, "gtk_widget_destroy", EXPECT_OK},
+    {*test24a, "get_password_dialog. get dialog", EXPECT_OK},
+    {*test24b, "get_password_dialog. get old dialog", EXPECT_OK},
+    {*test24c, "get_password_dialog_new_get_password", EXPECT_OK},
+    {*test24d, "gtk_widget_destroy", EXPECT_OK},
+    {*test25a, "set_password_dialog. set dialog ", EXPECT_OK},
+    {*test25b, "set_password_dialog. change dialog", EXPECT_OK},
+    {*test25c, "set_password_dialog_new_get_password", EXPECT_OK},
+    {*test25d, "set_password_dialog_new_get_protected", EXPECT_ASSERT},
+    {*test25e, "gtk_widget_destroy", EXPECT_OK},
+    {*fsd_set_font, "FontSelectionDialog Set font", EXPECT_OK},
+    {*fsd_get_font,"FontSelectionDialog Get font", EXPECT_OK},
+    {*fsd_set_pretext, "FontSelectionDialog Set preview text", EXPECT_OK},
+    {*fsd_get_pretext, "FontSelectionDialog Get preview text", EXPECT_OK},
+    {*test27a, "hildon_insert_object: new", EXPECT_OK},
+    {*test27b, "hildon_insert_object: get_name", EXPECT_OK},
+    {*test27c, "hildon_insert_object: get_mime_type", EXPECT_ASSERT},
+    {*test28a, "hildon_number_editor_new", EXPECT_OK},
+    {*test28b, "hildon_number_editor_get_value", EXPECT_OK},
+    {*test28c, "hildon_number_editor_set_range", EXPECT_OK},
+    {*test28d, "hildon_number_editor_set_value", EXPECT_OK},
+    {*test29a, "hildon_color_selector: set and get red color", EXPECT_OK},
+    {*test29b, "hildon_color_selector: set and get non-base color", EXPECT_ASSERT},
+    {*test30a, "hildon_file_handling_note_new_moving", EXPECT_OK},
+    {*test30b, "hildon_file_handling_note_new_deleting", EXPECT_OK},
+    {*test30c, "hildon_file_handling_note_new_opening", EXPECT_OK},
+    {*test30d, "hildon_file_handling_note_new_saving", EXPECT_OK},
+    {*test31a, "hildon_add_home_dialog_new: ok", EXPECT_OK},
+    {*test31b, "hildon_add_home_dialog_new: NULL(ok)", EXPECT_OK},
+    {*test32a, "hildon_rename_dialog: ok", EXPECT_OK},
+    {*test32b, "hildon_rename_dialog: NULL(ok)", EXPECT_OK},
+    {*test33a1, "grid_item_new (\"foo\")", EXPECT_OK},
+    {*test33a2, "grid_item_new (NULL)", EXPECT_ASSERT},
+    {*test33b1, "grid_item_new_label (\"foo\", \"bar\")", EXPECT_OK},
+    {*test33b2, "grid_item_new_label (\"foo\", NULL)", EXPECT_OK},
+    {*test33b3, "grid_item_new_label (NULL, \"bar\")", EXPECT_ASSERT},
+    {*test33b4, "grid_item_new_label (NULL, NULL)", EXPECT_ASSERT},
+    {*test33c1, "grid_item_set_emblem (foo, \"bar\")", EXPECT_OK},
+    {*test33c2, "grid_item_set_emblem (foo, NULL)", EXPECT_OK},
+    {*test33c3, "grid_item_set_emblem (NULL, \"bar\")", EXPECT_ASSERT},
+    {*test33c4, "grid_item_set_emblem (NULL, NULL)", EXPECT_ASSERT},
+    {*test33d1, "grid_item_get_emblem (foo)", EXPECT_OK},
+    {*test33d2, "grid_item_get_emblem (foo) (no emblem)", EXPECT_ASSERT},
+    {*test33d3, "grid_item_get_emblem (NULL)", EXPECT_ASSERT},
+    {*test33e, "grid_item: destroy", EXPECT_OK},
+    {*test34a, "grid_new ()", EXPECT_OK},
+    {*test34b1, "grid_set_style (foo, \"bar\")", EXPECT_OK},
+    {*test34b2, "grid_set_style (foo, NULL)", EXPECT_OK},
+    {*test34b3, "grid_set_style (NULL, \"foo\")", EXPECT_ASSERT},
+    {*test34b4, "grid_set_style (NULL, NULL)", EXPECT_ASSERT},
+    {*test34c1, "grid_get_style (foo)", EXPECT_OK},
+    {*test34c2, "grid_get_style (foo) (no style)", EXPECT_OK},
+    {*test34c3, "grid_get_style (NULL)", EXPECT_ASSERT},
+    {*test34d1, "grid_set_sb_pos (foo, 0)", EXPECT_OK},
+    {*test34d2, "grid_set_sb_pos (NULL, 0)", EXPECT_ASSERT},
+    {*test34e1, "grid_get_sb_pos (foo)", EXPECT_OK},
+    {*test34e2, "grid_get_sb_pos (NULL)", EXPECT_ASSERT},
+    {*test34f1, "grid_add (grid, item)", EXPECT_OK},
+    {*test34f2, "grid_add (grid, NULL)", EXPECT_ASSERT},
+    {*test34f3, "grid_add (grid, something)", EXPECT_ASSERT},
+    {*test34f4, "grid_add (NULL, whatever)", EXPECT_ASSERT},
+    {*test34f5, "grid_add (whatever, we)", EXPECT_ASSERT},
+    {*test34g1, "grid_remove (item) (exist)", EXPECT_OK},
+    {*test34g2, "grid_remove (item) (non-exist)", EXPECT_ASSERT},
+    {*test34g3, "grid_remove (NULL)", EXPECT_ASSERT},
+    {*test34g4, "grid_remove (something)", EXPECT_ASSERT},
+    {*test34g5, "grid_remove (NULL, some)", EXPECT_ASSERT},
+    {*test34g6, "grid_remove (some, some)", EXPECT_ASSERT},
+    {*test34h1, "grid_set_focus (item) (exist)", EXPECT_OK},
+    {*test34h2, "grid_set_focus (item) (non-exist)", EXPECT_ASSERT},
+    {*test34h3, "grid_set_focus (NULL)", EXPECT_OK},
+    {*test34h4, "grid_set_focus (something)", EXPECT_ASSERT},
+    {*test34i1, "grid: CONTAINER->focus_child (set)", EXPECT_OK},
+    {*test34i2, "grid: CONTAINER->focus_child (unset)", EXPECT_OK},
+    {*test34j1, "grid: destroy (items)", EXPECT_OK},
+    {*test34j2, "grid: destroy (no items)", EXPECT_OK},
+    {*test35a, "hildon_time_editor_new", EXPECT_OK},
+    {*test35b, "hildon_time_editor_set/get_time", EXPECT_OK},
+    {*test35c, "hildon_time_editor_show_seconds", EXPECT_OK},
+    {*test35d, "hildon_time_editor_enable_duration_mode", EXPECT_OK},
+    {*test35e, "hildon_time_editor_set/get_duration_range", EXPECT_OK},
+    {*test35f, "hildon_time_editor_enable_duration_mode (TRUE, FALSE", EXPECT_OK},
+    {*test35g, "hildon_time_editor_set/get_time with foo value check", EXPECT_ASSERT},
+    {*test35h, "hildon_time_editor_set/get_duration_range with foo value check", EXPECT_ASSERT},
+    {*test36a, "hildon_find_replace_dialog_new", EXPECT_OK},
+    {*test36b, "hildon_find_replace_dialog_new_with_options", EXPECT_OK},
+    {*test36c, "hildon_find_replace_dialog_get_text", EXPECT_OK},
+    {*test36d, "hildon_find_replace_dialog_get_new_text", EXPECT_OK},
+    {*test37a, "gtk_infoprint_temporarily_disable_wrap", EXPECT_OK},
+    {*test37b, "gtk_banner_temporarily_disable_wrap", EXPECT_OK},
+    {*test39a, "namepassword dialog get_name", EXPECT_OK},
+    {*test39b, "namepassword dialog get_password", EXPECT_OK},
+    {*test41a, "hildon_file_details_dialog_new", EXPECT_OK},
+/*    {*test38a, "gtk_confirmation_banner (sometext)", EXPECT_OK},
+    {*test38a, "gtk_confirmation_banner (NULL)", EXPECT_OK},*/
+   
+    {0} /*REMEMBER THE TERMINATING NULL*/
+};
+
+/*use EXPECT_ASSERT for the tests that are _meant_ to throw assert so they are 
+*considered passed when they throw assert and failed when they do not
+*/
+
+testcase* get_tests()
+{
+    g_log_set_always_fatal (G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING);
+    return tcases;
+}
+
+
diff --git a/ut/tmp b/ut/tmp
new file mode 100644 (file)
index 0000000..e69de29